//
// cocos2d::CCTMXLayer::calculateLayerOffset from 0x803c78 to 0x803d2e (182 bytes)
//
// 1 xrefs:
// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x8046f2
//
// 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:01:22 +0000
//
cocos2d::CCTMXLayer *__fastcall cocos2d::CCTMXLayer::calculateLayerOffset(
cocos2d::CCTMXLayer *this,
const cocos2d::CCPoint *a2,
float *a3,
float a4)
{
int v7; // r3
float v8; // s12
float v9; // r1
float v10; // s15
float v12[3]; // [sp+4h] [bp-Ch] BYREF
LODWORD(v12[0]) = a2;
LODWORD(v12[1]) = a3;
v12[2] = a4;
cocos2d::CCPoint::CCPoint(this, (const cocos2d::CCPoint *)&unk_D31288);
v7 = *((_DWORD *)a2 + 78);
switch ( v7 )
{
case 1:
cocos2d::CCPoint::equals((cocos2d::CCPoint *)a3, (const cocos2d::CCPoint *)&unk_D31288);
return this;
case 0:
v9 = *a3 * *((float *)a2 + 74);
v10 = -(float)(a3[1] * *((float *)a2 + 75));
LABEL_6:
cocos2d::CCPoint::CCPoint(v12, v9, v10);
cocos2d::CCPoint::operator=((float *)this, v12);
return this;
case 2:
v8 = a3[1];
v9 = (float)(*((float *)a2 + 74) * 0.5) * (float)(*a3 - v8);
v10 = (float)(*((float *)a2 + 75) * 0.5) * (float)((float)-*a3 - v8);
goto LABEL_6;
}
return this;
}