//
// EditorUI::moveObjectCall from 0x70ec74 to 0x70ee22 (430 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x6f1b4c
// > EditorUI::handleEditorAction @ 0x6f1b6a
// > EditorUI::moveObjectCall @ 0x70ee3c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:43 +0000
//
int __fastcall EditorUI::moveObjectCall(int result, int a2)
{
int v2; // r4
int v4; // r0
EditorSFXManager *v5; // r0
int v6; // r0
EditorSFXManager *v7; // r0
EditorSFXManager *v8; // r0
EditorSFXManager *v9; // r0
int v10; // r1
unsigned int v11; // r6
GameObject *v12; // r0
GameObject *v13; // r9
UndoObject *v14; // r0
GameObject *v15; // r8
int v16; // r6
void (__fastcall *v17)(int, _BYTE *); // r9
int v18; // r0
int v19; // r2
_BYTE v20[8]; // [sp+4h] [bp-18h] BYREF
_BYTE v21[8]; // [sp+Ch] [bp-10h] BYREF
v2 = result;
if ( *(_DWORD *)(result + 996) || (result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(result + 668))) != 0 )
{
v4 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)result);
v5 = (EditorSFXManager *)(*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4);
if ( !*((_BYTE *)v5 + 93) )
{
v6 = *(_DWORD *)(v2 + 944) + 12104;
*(_DWORD *)(v6 + 12) = *(_DWORD *)(*(_DWORD *)(v2 + 944) + 12116) + 1;
v5 = (EditorSFXManager *)EditorBuildStats::noteAction(v6);
}
v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);
v8 = (EditorSFXManager *)EditorSFXManager::playAction(v7, 150);
switch ( a2 )
{
case 1:
case 2:
case 3:
case 4:
case 13:
case 14:
case 15:
case 16:
case 25:
case 26:
case 27:
case 28:
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
v10 = 151;
goto LABEL_11;
case 5:
case 6:
case 7:
case 8:
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
v10 = 152;
goto LABEL_11;
case 9:
case 10:
case 11:
case 12:
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
v10 = 153;
goto LABEL_11;
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 29:
case 30:
case 31:
case 32:
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
v10 = 155;
goto LABEL_11;
case 33:
case 34:
case 35:
case 36:
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
v10 = 276;
LABEL_11:
EditorSFXManager::playAction(v9, v10);
break;
default:
break;
}
EditorUI::moveForCommand((cocos2d::CCPoint *)v20, v2, a2);
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 668)) )
{
EditorUI::createUndoObject(v2, 5, 0);
v11 = 0;
while ( v11 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 668)) )
{
v12 = (GameObject *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 668), v11++);
v13 = v12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (const cocos2d::CCPoint *)v20);
EditorUI::moveObject(v2, v13, (int)v21);
}
}
else
{
v14 = UndoObject::create(*(GameObjectCopy **)(v2 + 996), 5);
LevelEditorLayer::addToUndoList(*(cocos2d::CCArray ***)(v2 + 944), v14, 0);
v15 = *(GameObject **)(v2 + 996);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (const cocos2d::CCPoint *)v20);
EditorUI::moveObject(v2, v15, (int)v21);
}
if ( (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 596) + 176))(*(_DWORD *)(v2 + 596)) )
{
v16 = *(_DWORD *)(v2 + 596);
v17 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v16 + 92);
v18 = (*(int (__fastcall **)(int))(*(_DWORD *)v16 + 96))(v16);
cocos2d::CCPoint::operator+(v21, v18, v20);
v17(v16, v21);
GJTransformControl::refreshControl(*(GJTransformControl **)(v2 + 596));
}
if ( (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 576) + 176))(*(_DWORD *)(v2 + 576)) )
{
*(_BYTE *)(v2 + 588) = 1;
EditorUI::activateRotationControl((cocos2d::CCArray **)v2, nullptr, v19, 1);
}
(*(void (__fastcall **)(int))(*(_DWORD *)v2 + 676))(v2);
return EditorUI::updateButtons((cocos2d::CCArray **)v2);
}
return result;
}