//
// EditorUI::moveForCommand from 0x14011f840 to 0x14011f9e8 (424 bytes)
//
// 2 xrefs:
// > EditorUI::moveObjectCall_1 @ 0x14011fa75
// > ??> @ 0x1406c95a0
//
// 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::CCPoint EditorUI::moveForCommand(EditorUI *a1, EditCommand a2)
{
int v2; // r8d
int v3; // ebx
float m_gridSize; // xmm6_4
cocos2d::CCPoint v5; // rdi
float v6; // xmm7_4
float v7; // xmm8_4
float v8; // xmm2_4
float v9; // xmm1_4
__int64 v10; // rax
cocos2d::CCPoint v12; // [rsp+60h] [rbp+8h] BYREF
v3 = v2 - 1;
m_gridSize = a1->m_gridSize;
v5 = *(cocos2d::CCPoint *)&a2;
v6 = m_gridSize * 5.0;
v7 = m_gridSize * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)a2);
switch ( v3 )
{
case 0:
v9 = -2.0;
goto LABEL_20;
case 1:
v9 = 2.0;
goto LABEL_20;
case 2:
v8 = 2.0;
v9 = 0.0;
goto LABEL_21;
case 3:
v8 = -2.0;
v9 = 0.0;
goto LABEL_21;
case 4:
m_gridSize = -m_gridSize;
goto LABEL_14;
case 5:
LABEL_14:
v9 = m_gridSize;
goto LABEL_20;
case 6:
goto LABEL_6;
case 7:
m_gridSize = -m_gridSize;
LABEL_6:
v8 = m_gridSize;
v9 = 0.0;
goto LABEL_21;
case 8:
v6 = -v6;
goto LABEL_16;
case 9:
LABEL_16:
v9 = v6;
goto LABEL_20;
case 10:
goto LABEL_8;
case 11:
v6 = -v6;
LABEL_8:
v8 = v6;
v9 = 0.0;
goto LABEL_21;
case 12:
v9 = -0.5;
goto LABEL_20;
case 13:
v9 = 0.5;
goto LABEL_20;
case 14:
v8 = 0.5;
v9 = 0.0;
goto LABEL_21;
case 15:
v8 = -0.5;
v9 = 0.0;
goto LABEL_21;
case 16:
v7 = -v7;
goto LABEL_19;
case 17:
LABEL_19:
v9 = v7;
LABEL_20:
v8 = 0.0;
goto LABEL_21;
case 18:
goto LABEL_11;
case 19:
v7 = -v7;
LABEL_11:
v8 = v7;
v9 = 0.0;
LABEL_21:
cocos2d::CCPoint::CCPoint(&v12, v9, v8);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(v5, v10);
break;
default:
return v5;
}
return v5;
}