//
// EditorUI::createEdgeForObject from 0x1401fa160 to 0x1401fa7a0 (1600 bytes)
//
// 5 xrefs:
// > EditorUI::createRockEdges @ 0x1401f9fb3
// > EditorUI::createRockEdges @ 0x1401fa00b
// > EditorUI::createRockEdges @ 0x1401fa061
// > ??> @ 0x14091aba0
// > ??> @ 0x14091abac
//
// This function is hookable on this platform (idp: pc, 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 11:28:11 +0000
//
__int64 __fastcall EditorUI::createEdgeForObject(__int64 a1, __int64 a2, int a3)
{
unsigned int v5; // ebx
int v6; // r8d
int v7; // r8d
int v8; // r8d
int v9; // r8d
int v10; // r8d
float v11; // xmm1_4
float v12; // xmm2_4
__int64 v13; // rax
const struct cocos2d::CCPoint *v14; // rax
__int64 result; // rax
_BYTE v16[8]; // [rsp+20h] [rbp-10h] BYREF
_BYTE v17[8]; // [rsp+28h] [rbp-8h] BYREF
char v18; // [rsp+58h] [rbp+28h] BYREF
char v19; // [rsp+68h] [rbp+38h] BYREF
switch ( *(_DWORD *)(a2 + 1036) )
{
case 0x544:
if ( !a3 )
{
v5 = 1359;
goto LABEL_64;
}
if ( a3 == 3 )
{
v5 = 1395;
goto LABEL_70;
}
if ( a3 != 7 )
return 0;
v5 = 1363;
LABEL_78:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v11 = -30.0;
goto LABEL_79;
case 0x545:
if ( a3 )
{
v6 = a3 - 1;
if ( !v6 )
{
v5 = 1357;
goto LABEL_66;
}
if ( v6 != 3 )
return 0;
v5 = 1364;
LABEL_72:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v11 = 30.0;
v12 = 30.0;
}
else
{
v5 = 1360;
LABEL_64:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v11 = 0.0;
LABEL_79:
v12 = 30.0;
}
goto LABEL_80;
case 0x546:
v7 = a3 - 2;
if ( !v7 )
{
v5 = 1361;
goto LABEL_68;
}
v8 = v7 - 1;
if ( v8 )
{
if ( v8 != 3 )
return 0;
v5 = 1365;
LABEL_76:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v11 = -30.0;
v12 = -30.0;
}
else
{
v5 = 1356;
LABEL_70:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v11 = -30.0;
v12 = 0.0;
}
goto LABEL_80;
case 0x547:
v9 = a3 - 1;
if ( v9 )
{
v10 = v9 - 1;
if ( v10 )
{
if ( v10 != 3 )
return 0;
v5 = 1366;
LABEL_74:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v12 = -30.0;
v11 = 30.0;
}
else
{
v5 = 1362;
LABEL_68:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v12 = -30.0;
v11 = 0.0;
}
}
else
{
v5 = 1358;
LABEL_66:
offsetForKey((cocos2d::CCPoint *)&v19, v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, (const struct cocos2d::CCPoint *)&unk_14090A788);
v11 = 30.0;
v12 = 0.0;
}
LABEL_80:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v11, v12);
cocos2d::CCPoint::operator=(&v18, v13);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)a2 + 1208LL))(a2, v16);
cocos2d::CCPoint::operator+(v16, v17, &v19);
cocos2d::CCPoint::operator=(v16, v17);
cocos2d::CCPoint::operator+(v16, v17, &v18);
cocos2d::CCPoint::operator=(v16, v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const struct cocos2d::CCPoint *)v16);
result = EditorUI::createObject(a1, v5, v14);
if ( result )
*(_WORD *)(result + 1212) = *(_WORD *)(a2 + 1210) + 1;
return result;
case 0x597:
case 0x598:
case 0x599:
switch ( a3 )
{
case 0:
v5 = 1435;
goto LABEL_64;
case 1:
v5 = 1436;
goto LABEL_66;
case 2:
v5 = 1437;
goto LABEL_68;
case 3:
v5 = 1434;
goto LABEL_70;
case 4:
v5 = 1439;
goto LABEL_72;
case 5:
v5 = 1441;
goto LABEL_74;
case 6:
v5 = 1440;
goto LABEL_76;
case 7:
v5 = 1438;
goto LABEL_78;
default:
return 0;
}
case 0x5B5:
switch ( a3 )
{
case 0:
v5 = 1629;
goto LABEL_64;
case 1:
v5 = 1625;
goto LABEL_66;
case 2:
v5 = 1633;
goto LABEL_68;
case 3:
v5 = 1621;
goto LABEL_70;
case 4:
v5 = 1638;
goto LABEL_72;
case 5:
v5 = 1640;
goto LABEL_74;
case 6:
v5 = 1639;
goto LABEL_76;
case 7:
v5 = 1637;
goto LABEL_78;
default:
return 0;
}
case 0x5B6:
switch ( a3 )
{
case 0:
v5 = 1630;
goto LABEL_64;
case 1:
v5 = 1627;
goto LABEL_66;
case 2:
v5 = 1634;
goto LABEL_68;
case 3:
v5 = 1623;
goto LABEL_70;
case 4:
v5 = 1642;
goto LABEL_72;
case 5:
v5 = 1644;
goto LABEL_74;
case 6:
v5 = 1643;
goto LABEL_76;
case 7:
v5 = 1641;
goto LABEL_78;
default:
return 0;
}
case 0x5B7:
switch ( a3 )
{
case 0:
v5 = 1631;
goto LABEL_64;
case 1:
v5 = 1626;
goto LABEL_66;
case 2:
v5 = 1635;
goto LABEL_68;
case 3:
v5 = 1622;
goto LABEL_70;
case 4:
v5 = 1646;
goto LABEL_72;
case 5:
v5 = 1648;
goto LABEL_74;
case 6:
v5 = 1647;
goto LABEL_76;
case 7:
v5 = 1645;
goto LABEL_78;
default:
return 0;
}
case 0x5B8:
switch ( a3 )
{
case 0:
v5 = 1632;
goto LABEL_64;
case 1:
v5 = 1628;
goto LABEL_66;
case 2:
v5 = 1636;
goto LABEL_68;
case 3:
v5 = 1624;
goto LABEL_70;
case 4:
v5 = 1650;
goto LABEL_72;
case 5:
v5 = 1652;
goto LABEL_74;
case 6:
v5 = 1651;
goto LABEL_76;
case 7:
v5 = 1649;
goto LABEL_78;
default:
return 0;
}
default:
return 0;
}
}