//
// EditorUI::createEdgeForObject from 0x1006144b0 to 0x10061464a (410 bytes)
//
// 5 xrefs:
// > EditorUI::createRockEdges @ 0x1006142cb
// > EditorUI::createRockEdges @ 0x10061431b
// > EditorUI::createRockEdges @ 0x10061435c
// > EditorUI::createRockEdges @ 0x1006143a5
// > EditorUI::createRockEdges @ 0x1006143d2
//
// 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 *__fastcall EditorUI::createEdgeForObject(EditorUI *a1, GameObject *a2, int a3)
{
int v4; // eax
int v5; // r15d
double v6; // xmm0_8
float v7; // xmm1_4
float v8; // xmm0_4
GameObject *result; // rax
cocos2d::CCPoint v10; // xmm0_8
unsigned __int64 v11; // [rsp+8h] [rbp-48h] BYREF
__int64 v12; // [rsp+10h] [rbp-40h] BYREF
unsigned __int64 v13; // [rsp+18h] [rbp-38h] BYREF
unsigned __int64 v14[6]; // [rsp+20h] [rbp-30h] BYREF
v4 = EditorUI::edgeForObject(a1, a2->m_objectID, a3);
if ( !v4 )
return nullptr;
v5 = v4;
EditorUI::offsetForKey((EditorUI *)&v11, (int)a1);
v6 = sub_10028CC60(v14, &dbl_1009A3570);
switch ( a3 )
{
case 0:
v7 = 30.0;
v8 = 0.0;
goto LABEL_14;
case 1:
v8 = 30.0;
v7 = 0.0;
goto LABEL_14;
case 2:
v7 = -30.0;
v8 = 0.0;
goto LABEL_14;
case 3:
v8 = -30.0;
v7 = 0.0;
goto LABEL_14;
case 4:
v8 = 30.0;
goto LABEL_13;
case 5:
v8 = 30.0;
v7 = -30.0;
goto LABEL_14;
case 6:
v8 = -30.0;
LABEL_13:
v7 = v8;
goto LABEL_14;
case 7:
v8 = -30.0;
v7 = 30.0;
LABEL_14:
sub_10028CBE0((float *)&v13, v8, v7);
v6 = sub_10028CC90(v14, (double *)&v13);
break;
default:
break;
}
((void (__fastcall *)(unsigned __int64 *, GameObject *, double))a2->getRealPosition)(&v13, a2, v6);
sub_10028CCE0((double *)&v12, &v13, &v11);
sub_10028CC90(&v13, (double *)&v12);
sub_10028CCE0((double *)&v12, &v13, v14);
sub_10028CC90(&v13, (double *)&v12);
*(double *)&v10 = sub_10028CC60(&v12, (double *)&v13);
result = EditorUI::createObject(a1, v5, v10);
if ( result )
result->m_editorLayer2 = a2->m_editorLayer + 1;
return result;
}