//
// cocos2d::CCTMXLayer::vertexZForPos from 0x803f18 to 0x803f72 (90 bytes)
//
// 2 xrefs:
// > cocos2d::CCTMXLayer::setupTileSprite @ 0x803fb2
// > cocos2d::CCTMXLayer::tileAt @ 0x80458c
//
// 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
//
int __fastcall cocos2d::CCTMXLayer::vertexZForPos(cocos2d::CCTMXLayer *this, const cocos2d::CCPoint *a2)
{
int v2; // r3
float v3; // s15
if ( !*((_BYTE *)this + 348) )
return *((_DWORD *)this + 86);
v2 = *((_DWORD *)this + 78);
if ( !v2 )
{
v3 = *((float *)this + 73) - *((float *)a2 + 1);
return (int)(float)-v3;
}
if ( v2 == 2 )
{
v3 = (float)(unsigned int)(float)(*((float *)this + 72) + *((float *)this + 73))
- (float)(*(float *)a2 + *((float *)a2 + 1));
return (int)(float)-v3;
}
return 0;
}