//
// EditorUI::createEdgeForObject from 0x9cc0a4 to 0x9cc2d0 (556 bytes)
//
// 7 xrefs:
// > EditorUI::createRockEdges @ 0x9cc448
// > EditorUI::createRockEdges @ 0x9cc48c
// > EditorUI::createRockEdges @ 0x9cc4dc
// > EditorUI::createRockEdges @ 0x9cc660
// > EditorUI::createRockEdges @ 0x9cc69c
// > EditorUI::createRockEdges @ 0x9cc6e0
// > ??> @ 0x74b20
//
// 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; // w23
float v7; // s0
float v8; // s1
float v9; // s0
float v10; // s1
GameObject *result; // x0
float v12; // s0
float v13; // s0
float v14; // s1
float v15; // s0
float v16; // s0
float v17; // s1
float v18; // s0
float v19; // s1
float v20; // s0
float v21; // s1
float v22; // s0
float v23; // s0
float v24; // s1
_BYTE v25[8]; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCPoint v26; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint v27; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v28; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint v29; // 0:s0.4,4:s1.4
v6 = EditorUI::edgeForObject(a1, a2->m_objectID, a3);
if ( v6 <= 0 )
return nullptr;
EditorUI::offsetForKey(a1, v6);
cocos2d::CCPoint::CCPoint(&v26, &stru_1243DD0);
switch ( a3 )
{
case 0:
v22 = 0.0;
goto LABEL_16;
case 1:
cocos2d::CCPoint::CCPoint(&v28, 30.0, 0.0);
cocos2d::CCPoint::operator=(&v26, v20, v21);
break;
case 2:
v15 = 0.0;
goto LABEL_10;
case 3:
cocos2d::CCPoint::CCPoint(&v28, -30.0, 0.0);
cocos2d::CCPoint::operator=(&v26, v18, v19);
break;
case 4:
v12 = 30.0;
goto LABEL_8;
case 5:
v15 = 30.0;
LABEL_10:
cocos2d::CCPoint::CCPoint(&v28, v15, -30.0);
cocos2d::CCPoint::operator=(&v26, v16, v17);
break;
case 6:
v12 = -30.0;
LABEL_8:
cocos2d::CCPoint::CCPoint(&v28, v12, v12);
cocos2d::CCPoint::operator=(&v26, v13, v14);
break;
case 7:
v22 = -30.0;
LABEL_16:
cocos2d::CCPoint::CCPoint(&v28, v22, 30.0);
cocos2d::CCPoint::operator=(&v26, v23, v24);
break;
default:
break;
}
((void (__fastcall *)(cocos2d::CCPoint *__return_ptr, GameObject *))a2->getRealPosition)(&v27, a2);
cocos2d::CCPoint::operator+(&v28, &v27, v25);
cocos2d::CCPoint::operator=(&v27, v7, v8);
cocos2d::CCPoint::operator+(&v28, &v27, &v26);
cocos2d::CCPoint::operator=(&v27, v9, v10);
cocos2d::CCPoint::CCPoint(&v28, &v27);
result = EditorUI::createObject(a1, v6, v29);
if ( !result )
return nullptr;
result->m_editorLayer2 = a2->m_editorLayer + 1;
return result;
}