//
// EditorUI::transformObjectCall from 0x70e3bc to 0x70e654 (664 bytes)
//
// 8 xrefs:
// > EditorUI::handleEditorAction @ 0x6f1af8
// > EditorUI::handleEditorAction @ 0x6f1b0a
// > EditorUI::handleEditorAction @ 0x6f1b1c
// > EditorUI::handleEditorAction @ 0x6f1b2e
// > EditorUI::handleEditorAction @ 0x6f228e
// > EditorUI::handleEditorAction @ 0x6f229e
// > EditorUI::handleEditorAction @ 0x6f22ae
// > EditorUI::transformObjectCall @ 0x70e674
//
// 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:42 +0000
//
float __fastcall EditorUI::transformObjectCall(float result, int a2)
{
int v2; // r4
int v4; // r0
EditorSFXManager *v5; // r0
int v6; // r0
EditorSFXManager *v7; // r0
int v8; // r1
float v9; // s16
float v10; // s15
GJTransformControl *v11; // r0
float v12; // r1
cocos2d::CCArray *v13; // r8
int v14; // r6
cocos2d::CCObject *v15; // r1
float v16; // s16
cocos2d::CCArray *v17; // r0
cocos2d::CCArray *v18; // r6
unsigned int i; // r6
int *v20; // r0
_BYTE v21[8]; // [sp+Ch] [bp-Ch] BYREF
v2 = LODWORD(result);
if ( *(_DWORD *)(LODWORD(result) + 996)
|| (result = COERCE_FLOAT(cocos2d::CCArray::count(*(cocos2d::CCArray **)(LODWORD(result) + 668))), result != 0.0) )
{
v4 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(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);
}
switch ( a2 )
{
case '%':
case '&':
v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);
v8 = 132;
goto LABEL_9;
case '\'':
case '(':
case ')':
case '*':
v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);
v8 = 130;
goto LABEL_9;
case ',':
v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);
v8 = 131;
LABEL_9:
EditorSFXManager::playAction(v7, v8);
break;
default:
break;
}
EditorUI::createUndoObject(v2, 5, 0);
result = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 596) + 176))(*(_DWORD *)(v2 + 596)));
if ( result == 0.0 )
{
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 668)) && (unsigned int)(a2 - 37) <= 1 )
{
if ( a2 == 37 )
return COERCE_FLOAT(EditorUI::flipObjectsX((EditorUI *)v2, *(cocos2d::CCArray **)(v2 + 668)));
else
return COERCE_FLOAT(EditorUI::flipObjectsY((EditorUI *)v2, *(cocos2d::CCArray **)(v2 + 668)));
}
else if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 668)) && (unsigned int)(a2 - 39) <= 3 )
{
v13 = *(cocos2d::CCArray **)(v2 + 668);
v14 = EditorUI::rotationforCommand(v2, a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (const cocos2d::CCPoint *)&unk_D2DBE0);
return COERCE_FLOAT(EditorUI::rotateObjects((cocos2d::CCArray *)v2, v13, *(float *)&v14, (cocos2d::CCPoint *)v21, 0));
}
else if ( a2 == 44 )
{
result = COERCE_FLOAT(
EditorUI::getSnapAngle(
(LevelEditorLayer **)v2,
*(GameObject **)(v2 + 996),
*(cocos2d::CCArray **)(v2 + 668)));
v16 = result;
if ( result != -1.0 )
{
v17 = *(cocos2d::CCArray **)(v2 + 996);
if ( v17 )
v18 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(v17, v15);
else
v18 = *(cocos2d::CCArray **)(v2 + 668);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (const cocos2d::CCPoint *)&unk_D2DBE0);
return COERCE_FLOAT(EditorUI::rotateObjects((cocos2d::CCArray *)v2, v18, v16, (cocos2d::CCPoint *)v21, 0));
}
}
else if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 668)) )
{
for ( i = 0; ; ++i )
{
result = COERCE_FLOAT(cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 668)));
if ( i >= LODWORD(result) )
break;
v20 = (int *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 668), i);
EditorUI::transformObject(v2, v20, a2, 0);
}
}
else
{
if ( isSpecialSnapObject(*(char **)(*(_DWORD *)(v2 + 996) + 892)) && (unsigned int)(a2 - 39) <= 3
|| *(_DWORD *)(*(_DWORD *)(v2 + 996) + 892) == 2900 )
{
*(_BYTE *)(v2 + 512) = 1;
}
result = EditorUI::transformObject(v2, *(int **)(v2 + 996), a2, 0);
*(_BYTE *)(v2 + 512) = 0;
}
}
else
{
if ( (unsigned int)(a2 - 39) <= 3 )
{
v9 = *(float *)(*(_DWORD *)(v2 + 596) + 464);
v10 = COERCE_FLOAT(EditorUI::rotationforCommand(v2, a2));
v11 = *(GJTransformControl **)(v2 + 596);
v12 = v9 + v10;
return COERCE_FLOAT(GJTransformControl::applyRotation(v11, v12));
}
switch ( a2 )
{
case ',':
result = COERCE_FLOAT(
EditorUI::getSnapAngle(
(LevelEditorLayer **)v2,
*(GameObject **)(v2 + 996),
*(cocos2d::CCArray **)(v2 + 668)));
if ( result == -1.0 )
return result;
v12 = result;
v11 = *(GJTransformControl **)(v2 + 596);
return COERCE_FLOAT(GJTransformControl::applyRotation(v11, v12));
case '%':
*(float *)(*(_DWORD *)(v2 + 596) + 448) = -*(float *)(*(_DWORD *)(v2 + 596) + 448);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v2 + 604))(v2, *(_DWORD *)(*(_DWORD *)(v2 + 596) + 448));
break;
case '&':
*(float *)(*(_DWORD *)(v2 + 596) + 452) = -*(float *)(*(_DWORD *)(v2 + 596) + 452);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v2 + 608))(v2, *(_DWORD *)(*(_DWORD *)(v2 + 596) + 452));
break;
default:
return result;
}
return COERCE_FLOAT(GJTransformControl::updateButtons(*(GJTransformControl **)(v2 + 596), 0, 0));
}
}
return result;
}