//
// EditorUI::createEdgeForObject from 0x536998 to 0x536a94 (252 bytes)
//
// 3 xrefs:
// > EditorUI::createRockEdges @ 0x536ba4
// > EditorUI::createRockEdges @ 0x536c3c
// > EditorUI::createRockEdges @ 0x536c56
//
// 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
//
GameObject *EditorUI::createEdgeForObject(EditorUI *a1, GameObject *a2, int a3)
{
int v6; // r0
int v7; // r9
float v8; // r1
float v9; // r2
int v10; // r2
bool v11; // r3
int v12; // r2
bool v13; // r3
int v14; // r2
bool v15; // r3
cocos2d::CCPoint v16; // r2
GameObject *result; // r0
cocos2d::CCPoint v18; // [sp+4h] [bp-28h] BYREF
cocos2d::CCPoint v19; // [sp+Ch] [bp-20h] BYREF
cocos2d::CCPoint v20; // [sp+14h] [bp-18h] BYREF
cocos2d::CCPoint v21; // [sp+1Ch] [bp-10h] BYREF
v6 = EditorUI::edgeForObject(a1, a2->m_objectID, a3);
v7 = v6;
if ( v6 <= 0 )
return nullptr;
EditorUI::offsetForKey(&v18, a1, v6);
cocos2d::CCPoint::CCPoint(&v19, &stru_AC77D0);
switch ( a3 )
{
case 0:
v8 = 0.0;
goto LABEL_14;
case 1:
v8 = 30.0;
goto LABEL_7;
case 2:
v8 = 0.0;
goto LABEL_10;
case 3:
v8 = -30.0;
LABEL_7:
v9 = 0.0;
goto LABEL_15;
case 4:
v8 = 30.0;
goto LABEL_12;
case 5:
v8 = 30.0;
LABEL_10:
v9 = -30.0;
goto LABEL_15;
case 6:
v8 = -30.0;
LABEL_12:
v9 = v8;
goto LABEL_15;
case 7:
v8 = -30.0;
LABEL_14:
v9 = 30.0;
LABEL_15:
cocos2d::CCPoint::CCPoint(&v21, v8, v9);
cocos2d::CCPoint::operator=((PlayerObject *)&v19, COERCE_FLOAT(&v21), v10, v11);
break;
default:
break;
}
a2->getRealPosition(&v20, a2);
cocos2d::CCPoint::operator+(&v21, &v20, &v18);
cocos2d::CCPoint::operator=((PlayerObject *)&v20, COERCE_FLOAT(&v21), v12, v13);
cocos2d::CCPoint::operator+(&v21, &v20, &v19);
cocos2d::CCPoint::operator=((PlayerObject *)&v20, COERCE_FLOAT(&v21), v14, v15);
cocos2d::CCPoint::CCPoint(&v21, &v20);
LODWORD(v16.x) = &v21;
result = EditorUI::createObject(a1, v7, v16);
if ( result )
result->m_editorLayer2 = a2->m_editorLayer + 1;
return result;
}