//
// GJSmartTemplate::offsetForDir from 0x1402b3550 to 0x1402b3644 (244 bytes)
//
// 3 xrefs:
// > EditorUI::getSmartNeighbor @ 0x1401186fb
// > EditorUI::getNeighbor @ 0x14011880b
// > ??> @ 0x1406d23b4
//
// 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
//
// local variable allocation has failed, the output may be wrong!
cocos2d::CCPoint GJSmartTemplate::offsetForDir(GJSmartDirection a1, int a2)
{
int v2; // r8d
int v3; // ebx
float v4; // xmm6_4
cocos2d::CCPoint v6; // rdi
ObjectToolbox *v7; // rcx
float v8; // xmm0_4
float v9; // xmm1_4
v3 = v2;
v4 = 30.0;
v6 = *(cocos2d::CCPoint *)&a1;
ObjectToolbox::sharedState();
v8 = ObjectToolbox::gridNodeSizeForKey(v7, v3);
if ( v8 == 15.0 )
v4 = 15.0;
switch ( a2 )
{
case 3:
v4 = -v4;
goto LABEL_5;
case 4:
LABEL_5:
v9 = v4;
break;
case 5:
v9 = -v4;
break;
case 6:
goto LABEL_8;
case 7:
v4 = -v4;
LABEL_8:
v9 = v4;
break;
case 8:
v9 = v4;
break;
default:
v9 = 0.0;
break;
}
cocos2d::CCPoint::CCPoint(v8, v9);
return v6;
}