//
// GJSmartTemplate::offsetForDir from 0x539ca6 to 0x539d36 (144 bytes)
//
// 18 xrefs:
// > EditorUI::getSmartNeighbor @ 0x37e0fc
// > EditorUI::getNeighbor @ 0x37e1b0
// > EditorUI::addObjectsToSmartTemplate @ 0x39c544
// > EditorUI::addObjectsToSmartTemplate @ 0x39c57c
// > EditorUI::addObjectsToSmartTemplate @ 0x39c5ba
// > EditorUI::addObjectsToSmartTemplate @ 0x39c5f8
// > EditorUI::addObjectsToSmartTemplate @ 0x39c636
// > EditorUI::addObjectsToSmartTemplate @ 0x39c672
// > EditorUI::addObjectsToSmartTemplate @ 0x39c6ae
// > EditorUI::addObjectsToSmartTemplate @ 0x39c6ee
// > GJSmartTemplate::keyFromNeighbors @ 0x53abc8
// > GJSmartTemplate::keyFromNeighbors @ 0x53abee
// > GJSmartTemplate::keyFromNeighbors @ 0x53ac12
// > GJSmartTemplate::keyFromNeighbors @ 0x53ac36
// > GJSmartTemplate::keyFromNeighbors @ 0x53ac5a
// > GJSmartTemplate::keyFromNeighbors @ 0x53ac7e
// > GJSmartTemplate::keyFromNeighbors @ 0x53aca2
// > GJSmartTemplate::keyFromNeighbors @ 0x53acc6
//
// 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 *GJSmartTemplate::offsetForDir(cocos2d::CCPoint *__return_ptr retstr, GJSmartDirection a2, int a3)
{
ObjectToolbox *v6; // r0
float v7; // r2
cocos2d::CCPoint *v8; // r0
float v9; // r1
v6 = ObjectToolbox::sharedState();
if ( ObjectToolbox::gridNodeSizeForKey(v6, a3) == 15.0 )
v7 = 15.0;
else
v7 = 30.0;
switch ( a2 )
{
case 1:
v8 = retstr;
v9 = 0.0;
goto LABEL_16;
case 2:
v8 = retstr;
v9 = 0.0;
LODWORD(v7) ^= 0x80000000;
goto LABEL_16;
case 3:
v8 = retstr;
LODWORD(v9) = LODWORD(v7) ^ 0x80000000;
goto LABEL_9;
case 4:
v8 = retstr;
v9 = v7;
LABEL_9:
v7 = 0.0;
goto LABEL_16;
case 5:
v8 = retstr;
LODWORD(v9) = LODWORD(v7) ^ 0x80000000;
goto LABEL_16;
case 6:
v8 = retstr;
v9 = v7;
goto LABEL_15;
case 7:
LODWORD(v9) = LODWORD(v7) ^ 0x80000000;
v8 = retstr;
goto LABEL_15;
case 8:
v9 = v7;
v8 = retstr;
LODWORD(v7) ^= 0x80000000;
goto LABEL_16;
default:
v8 = retstr;
v9 = 0.0;
LABEL_15:
v7 = v9;
LABEL_16:
cocos2d::CCPoint::CCPoint(v8, v9, v7);
return retstr;
}
}