//
// GJSmartTemplate::offsetForDir from 0xb0c2d0 to 0xb0c43c (364 bytes)
//
// 19 xrefs:
// > EditorUI::getSmartNeighbor @ 0x7c3064
// > EditorUI::getNeighbor @ 0x7c319c
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc434
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc46c
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc694
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc71c
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc768
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc858
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc8a4
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc8dc
// > GJSmartTemplate::keyFromNeighbors @ 0xb0dcac
// > GJSmartTemplate::keyFromNeighbors @ 0xb0dd0c
// > GJSmartTemplate::keyFromNeighbors @ 0xb0dd58
// > GJSmartTemplate::keyFromNeighbors @ 0xb0dda8
// > GJSmartTemplate::keyFromNeighbors @ 0xb0ddf8
// > GJSmartTemplate::keyFromNeighbors @ 0xb0de34
// > GJSmartTemplate::keyFromNeighbors @ 0xb0de6c
// > GJSmartTemplate::keyFromNeighbors @ 0xb0dea4
// > ??> @ 0x82900
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:01:26 +0000
//
cocos2d::CCPoint *__usercall GJSmartTemplate::offsetForDir@(
ObjectToolbox *a1@,
int a2@,
cocos2d::CCPoint *a3@)
{
int v4; // w19
ObjectToolbox *v5; // x0
float v6; // s0
float v7; // s1
cocos2d::CCPoint *result; // x0
v4 = (int)a1;
v5 = (ObjectToolbox *)ObjectToolbox::sharedState(a1);
v6 = ObjectToolbox::gridNodeSizeForKey(v5, a2);
v7 = 15.0;
if ( v6 != 15.0 )
v7 = 30.0;
switch ( v4 )
{
case 1:
cocos2d::CCPoint::CCPoint(a3, 0.0, v7);
result = a3;
break;
case 2:
cocos2d::CCPoint::CCPoint(a3, 0.0, -v7);
result = a3;
break;
case 3:
cocos2d::CCPoint::CCPoint(a3, -v7, 0.0);
result = a3;
break;
case 4:
cocos2d::CCPoint::CCPoint(a3, v7, 0.0);
result = a3;
break;
case 5:
cocos2d::CCPoint::CCPoint(a3, -v7, v7);
result = a3;
break;
case 6:
cocos2d::CCPoint::CCPoint(a3, v7, v7);
result = a3;
break;
case 7:
cocos2d::CCPoint::CCPoint(a3, -v7, -v7);
result = a3;
break;
case 8:
cocos2d::CCPoint::CCPoint(a3, v7, -v7);
result = a3;
break;
default:
cocos2d::CCPoint::CCPoint(a3, 0.0, 0.0);
result = a3;
break;
}
return result;
}