//
// EditorUI::getNeighbor from 0x68a158 to 0x68a26c (276 bytes)
//
// 14 xrefs:
// > EditorUI::processSmartObjectsFromType @ 0x68a380
// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8a0
// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8cc
// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb8f8
// > EditorUI::convertKeyBasedOnNeighbors @ 0x9cb924
// > EditorUI::createOutlines @ 0x9ccf08
// > EditorUI::createOutlines @ 0x9ccf30
// > EditorUI::createOutlines @ 0x9ccf58
// > EditorUI::createOutlines @ 0x9ccf80
// > EditorUI::createOutlines @ 0x9ccfa8
// > EditorUI::createOutlines @ 0x9ccfd0
// > EditorUI::createOutlines @ 0x9ccff8
// > EditorUI::createOutlines @ 0x9cd020
// > ??> @ 0x844b0
//
// 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::CCNode *EditorUI::getNeighbor(
EditorUI *a1,
int a2,
cocos2d::CCPoint a3,
GJSmartDirection a4,
cocos2d::CCArray *a5)
{
cocos2d::CCArray *v5; // x4
cocos2d::CCArray *v6; // x22
unsigned int v7; // w20
int v8; // w25
int v9; // w23
cocos2d::CCNode *v10; // x19
int x; // w21
__int64 v13; // [xsp+58h] [xbp+58h]
__int64 v14; // [xsp+68h] [xbp+68h] BYREF
_BYTE v15[8]; // [xsp+70h] [xbp+70h] BYREF
v13 = *(_QWORD *)&a4;
v6 = v5;
v7 = 0;
GJSmartTemplate::offsetForDir((GJSmartDirection)a5, a2);
cocos2d::CCPoint::operator+(&v14, v13, v15);
v8 = (int)*(float *)&v14;
v9 = (int)*((float *)&v14 + 1);
if ( !(unsigned int)cocos2d::CCArray::count(v6) )
return nullptr;
while ( 1 )
{
v10 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(v6, v7);
x = (int)v10->getPosition(v10)->x;
if ( v9 == (int)v10->getPosition(v10)->y && v8 == x )
break;
if ( ++v7 >= (unsigned int)cocos2d::CCArray::count(v6) )
return nullptr;
}
return v10;
}