//
// EditorUI::createUndoObject from 0x4821d0 to 0x4822a4 (212 bytes)
//
// 8 xrefs:
// > EditorUI::startFreeMoveTouch @ 0x6eff9a
// > EditorUI::transformObjectCall @ 0x70e442
// > EditorUI::angleChangeBegin @ 0x70e6ba
// > EditorUI::scaleChangeBegin @ 0x70ea1e
// > EditorUI::moveObjectCall @ 0x70ed48
// > EditorUI::alignObjectsOnAxis @ 0x70f1ee
// > EditorUI::alignObjects @ 0x70f4ee
// > EditorUI::transformChangeBegin @ 0x70f6b0
//
// 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:49:23 +0000
//
UndoObject *__fastcall EditorUI::createUndoObject(int a1, int a2, int a3)
{
UndoObject *v6; // r0
UndoObject *v7; // r4
int TransformState; // r5
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 668)) )
v6 = UndoObject::createWithTransformObjects(*(cocos2d::CCArray **)(a1 + 668), a2);
else
v6 = UndoObject::create(*(GameObjectCopy **)(a1 + 996), a2);
v7 = v6;
if ( (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 596) + 176))(*(_DWORD *)(a1 + 596)) )
{
TransformState = EditorUI::getTransformState((EditorUI *)a1);
*((_DWORD *)v7 + 17) = *(_DWORD *)TransformState;
*((_DWORD *)v7 + 18) = *(_DWORD *)(TransformState + 4);
*((_DWORD *)v7 + 19) = *(_DWORD *)(TransformState + 8);
*((_DWORD *)v7 + 20) = *(_DWORD *)(TransformState + 12);
*((_DWORD *)v7 + 21) = *(_DWORD *)(TransformState + 16);
*((_DWORD *)v7 + 22) = *(_DWORD *)(TransformState + 20);
*((_DWORD *)v7 + 23) = *(_DWORD *)(TransformState + 24);
*((_BYTE *)v7 + 96) = *(_BYTE *)(TransformState + 28);
*((_DWORD *)v7 + 25) = *(_DWORD *)(TransformState + 32);
*((_DWORD *)v7 + 26) = *(_DWORD *)(TransformState + 36);
cocos2d::CCPoint::operator=((char *)v7 + 108, TransformState + 40);
cocos2d::CCPoint::operator=((char *)v7 + 116, TransformState + 48);
cocos2d::CCPoint::operator=((char *)v7 + 124, TransformState + 56);
*((_DWORD *)v7 + 33) = *(_DWORD *)(TransformState + 64);
*((_DWORD *)v7 + 34) = *(_DWORD *)(TransformState + 68);
*((_BYTE *)v7 + 65) = 1;
}
if ( (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 576) + 176))(*(_DWORD *)(a1 + 576)) )
{
*((_DWORD *)v7 + 36) = *(_DWORD *)(*(_DWORD *)(a1 + 576) + 340);
*((_BYTE *)v7 + 140) = 1;
}
if ( !a3 )
LevelEditorLayer::addToUndoList(*(cocos2d::CCArray ***)(a1 + 944), v7, 0);
return v7;
}