//
// cocos2d::CCTMXLayer::calculateLayerOffset from 0x5f7268 to 0x5f731e (182 bytes)
//
// 1 xrefs:
// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x5f7412
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCPoint *cocos2d::CCTMXLayer::calculateLayerOffset(
cocos2d::CCPoint *__return_ptr retstr,
cocos2d::CCTMXLayer *a2,
const cocos2d::CCPoint *a3)
{
cocos2d::CCObjectType m_eObjType; // r3
float y; // s12
float v8; // r1
float v9; // s15
int v10; // r2
bool v11; // r3
cocos2d::CCPoint v13; // [sp+4h] [bp-Ch] BYREF
LODWORD(v13.x) = a2;
LODWORD(v13.y) = a3;
cocos2d::CCPoint::CCPoint(retstr, &stru_ACAB2C);
m_eObjType = a2[1].m_eObjType;
switch ( m_eObjType )
{
case 1:
cocos2d::CCPoint::equals((cocos2d::CCPoint *)a3, &stru_ACAB2C);
return retstr;
case 0:
v8 = a3->x * *(float *)&a2[1].m_nLuaID;
v9 = -(float)(a3->y * *(float *)&a2[1].m_nTag);
LABEL_6:
cocos2d::CCPoint::CCPoint(&v13, v8, v9);
cocos2d::CCPoint::operator=(retstr, &v13.x, v10, v11);
return retstr;
case 2:
y = a3->y;
v8 = (float)(*(float *)&a2[1].m_nLuaID * 0.5) * (float)(a3->x - y);
v9 = (float)(*(float *)&a2[1].m_nTag * 0.5) * (float)((float)-a3->x - y);
goto LABEL_6;
}
return retstr;
}