//
// EditorUI::createUndoObject from 0x39d1c6 to 0x39d27a (180 bytes)
//
// 7 xrefs:
// > EditorUI::scaleChangeBegin @ 0x39d27e
// > EditorUI::transformChangeBegin @ 0x39d28e
// > EditorUI::alignObjects @ 0x39d432
// > EditorUI::angleChangeBegin @ 0x39d5f0
// > EditorUI::moveObjectCall @ 0x39f7a6
// > EditorUI::transformObjectCall @ 0x39fe74
// > EditorUI::ccTouchBegan @ 0x3a6d54
//
// 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
//
UndoObject *EditorUI::createUndoObject(EditorUI *a1, UndoCommand a2, bool a3)
{
_BOOL4 v5; // r7
UndoObject *v6; // r0
UndoObject *v7; // r4
GJTransformState *TransformState; // r5
float m_transformRotationY; // r3
int v10; // r2
int v11; // r2
bool v12; // r3
int v13; // r2
bool v14; // r3
v5 = a3;
if ( cocos2d::CCArray::count(a1->m_selectedObjects) )
v6 = UndoObject::createWithTransformObjects(a1->m_selectedObjects, a2);
else
v6 = UndoObject::create(a1->m_selectedObject, a2);
v7 = v6;
if ( ((int (__fastcall *)(GJTransformControl *))a1->m_transformControl->isVisible)(a1->m_transformControl) )
{
TransformState = EditorUI::getTransformState(a1);
v7->m_transformState.m_scaleX = TransformState->m_scaleX;
v7->m_transformState.m_scaleY = TransformState->m_scaleY;
v7->m_transformState.m_angleX = TransformState->m_angleX;
v7->m_transformState.m_angleY = TransformState->m_angleY;
v7->m_transformState.m_skewX = TransformState->m_skewX;
v7->m_transformState.m_skewY = TransformState->m_skewY;
v7->m_transformState.m_transformRotation = TransformState->m_transformRotation;
v7->m_transformState.m_transformReset = TransformState->m_transformReset;
v7->m_transformState.m_transformRotationX = TransformState->m_transformRotationX;
m_transformRotationY = TransformState->m_transformRotationY;
v7->m_transformState.m_transformRotationY = m_transformRotationY;
cocos2d::CCPoint::operator=(
(PlayerObject *)&v7->m_transformState.m_transformPosition,
COERCE_FLOAT((GJTransformState *)&TransformState->m_transformPosition),
v10,
SLOBYTE(m_transformRotationY));
cocos2d::CCPoint::operator=(
(PlayerObject *)&v7->m_transformState.m_transformSkewX,
COERCE_FLOAT((GJTransformState *)&TransformState->m_transformSkewX),
v11,
v12);
cocos2d::CCPoint::operator=(
(PlayerObject *)&v7->m_transformState.m_transformSkewY,
COERCE_FLOAT((GJTransformState *)&TransformState->m_transformSkewY),
v13,
v14);
v7->m_transformState.m_transformScaleX = TransformState->m_transformScaleX;
v7->m_transformState.m_transformScaleY = TransformState->m_transformScaleY;
v7->m_undoTransform = 1;
}
if ( !v5 )
LevelEditorLayer::addToUndoList(a1->m_editorLayer, v7, 0);
return v7;
}