//
// cocos2d::extension::CCScrollView::setZoomScale from 0x7ae1bc to 0x7ae31c (352 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCScrollView::setZoomScaleInDuration @ 0x7ae386
// > cocos2d::extension::CCScrollView::setZoomScale @ 0x7ae39c
// > cocos2d::extension::CCScrollView::ccTouchMoved @ 0x7aee6a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:00:04 +0000
//
float __fastcall cocos2d::extension::CCScrollView::setZoomScale(cocos2d::extension::CCScrollView *this, float a2)
{
float result; // r0
float *v5; // r1
float v6; // s15
float v7; // s14
float v8; // s13
int v9; // r0
int v10; // r0
_BYTE v11[8]; // [sp+4h] [bp-30h] BYREF
_BYTE v12[8]; // [sp+Ch] [bp-28h] BYREF
_BYTE v13[8]; // [sp+14h] [bp-20h] BYREF
_BYTE v14[8]; // [sp+1Ch] [bp-18h] BYREF
float v15[2]; // [sp+24h] [bp-10h] BYREF
result = (*(float (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 87) + 84))(
*((_DWORD *)this + 87),
LODWORD(a2));
if ( result != a2 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13);
if ( *((float *)this + 98) == 0.0 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, *((float *)this + 100) * 0.5, *((float *)this + 101) * 0.5);
cocos2d::CCPoint::operator=(v13, v15);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v15, this);
v5 = v15;
}
else
{
v5 = (float *)((char *)this + 384);
}
cocos2d::CCPoint::operator=(v13, v5);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v15, *((const cocos2d::CCPoint **)this + 87));
cocos2d::CCPoint::operator=(v11, v15);
v6 = *((float *)this + 103);
v7 = *((float *)this + 102);
if ( v6 > a2 )
v8 = a2;
else
v8 = *((float *)this + 103);
if ( v7 < v8 )
{
if ( v6 > a2 )
v7 = a2;
else
v7 = *((float *)this + 103);
}
(*(void (__fastcall **)(_DWORD, float))(**((_DWORD **)this + 87) + 80))(
*((_DWORD *)this + 87),
COERCE_FLOAT(LODWORD(v7)));
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v15, *((const cocos2d::CCPoint **)this + 87));
cocos2d::CCPoint::operator=(v12, v15);
cocos2d::CCPoint::operator-(v14, v13, v12);
v9 = *((_DWORD *)this + 82);
if ( v9 )
(*(void (__fastcall **)(int, cocos2d::extension::CCScrollView *))(*(_DWORD *)v9 + 12))(v9, this);
v10 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
cocos2d::CCPoint::operator+(v15, v10, v14);
return COERCE_FLOAT(cocos2d::extension::CCScrollView::setContentOffset((int)this, v15, 0));
}
return result;
}