//
// cocos2d::CCTMXLayer::positionAt from 0x803e5c to 0x803f0e (178 bytes)
//
// 4 xrefs:
// > cocos2d::CCTMXLayer::setupTileSprite @ 0x803f9e
// > cocos2d::CCTMXLayer::setupTileSprite @ 0x804044
// > cocos2d::CCTMXLayer::setupTileSprite @ 0x804064
// > cocos2d::CCTMXLayer::tileAt @ 0x80457a
//
// 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::positionAt(
cocos2d::CCTMXLayer *this,
const cocos2d::CCPoint *a2,
float *a3)
{
cocos2d::CCDirector *v6; // r0
int v7; // r3
float v8; // s17
cocos2d::CCDirector *v9; // r0
float v10; // r0
float v11; // s16
float v12; // s17
cocos2d::CCDirector *v13; // r0
float v14; // r0
float v16[2]; // [sp+4h] [bp-Ch] BYREF
v6 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint(this, (const cocos2d::CCPoint *)&unk_D31288);
v7 = *((_DWORD *)a2 + 78);
switch ( v7 )
{
case 1:
cocos2d::CCTMXLayer::positionForHexAt((cocos2d::CCTMXLayer *)v16, a2, a3);
goto LABEL_7;
case 0:
cocos2d::CCTMXLayer::positionForOrthoAt((cocos2d::CCTMXLayer *)v16, a2, a3);
LABEL_7:
v6 = (cocos2d::CCDirector *)cocos2d::CCPoint::operator=((float *)this, v16);
break;
case 2:
cocos2d::CCTMXLayer::positionForIsoAt((cocos2d::CCTMXLayer *)v16, a2, a3);
goto LABEL_7;
}
v8 = *(float *)this;
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
v10 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v9));
v11 = *((float *)this + 1);
v12 = v8 / v10;
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v10));
v14 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v13));
cocos2d::CCPoint::CCPoint(v16, v12, v11 / v14);
cocos2d::CCPoint::operator=((float *)this, v16);
return this;
}