//
// EditorUI::activateRotationControl from 0x70eb7c to 0x70ec70 (244 bytes)
//
// 5 xrefs:
// > EditorUI::toggleSpecialEditButtons @ 0x485fb6
// > EditorUI::undoLastAction @ 0x48c958
// > EditorUI::redoLastAction @ 0x48c99a
// > EditorUI::moveObjectCall @ 0x70edfc
// > EditorUI::updateControlsAfterAlign @ 0x70f03e
//
// 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::activateRotationControl(cocos2d::CCArray **this, cocos2d::CCObject *a2, int a3, int a4)
{
int result; // r0
int v6; // r5
void (__fastcall *v7)(int, int); // r7
int v8; // r0
int v9; // r5
void (__fastcall *v10)(int, _DWORD); // r7
float v11; // r0
_DWORD v12[3]; // [sp+4h] [bp-Ch] BYREF
v12[0] = a2;
v12[1] = a3;
v12[2] = a4;
result = cocos2d::CCArray::count(*(this + 167));
if ( result || *(this + 249) )
{
result = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 144) + 176))(*(this + 144));
if ( !result || *((_BYTE *)this + 588) )
{
EditorUI::deactivateTransformControl((EditorUI *)this);
*((_BYTE *)this + 588) = 0;
if ( cocos2d::CCArray::count(*(this + 167)) )
{
EditorUI::getGroupCenter((EditorUI *)v12, (cocos2d::CCArray *)this, *(this + 167), 0);
cocos2d::CCPoint::operator=(this + 145, v12);
(*(void (__fastcall **)(_DWORD, char *))(*(_DWORD *)*(this + 144) + 92))(*(this + 144), (char *)this + 580);
}
else
{
v6 = (int)*(this + 144);
v7 = *(void (__fastcall **)(int, int))(*(_DWORD *)v6 + 92);
v8 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 249) + 96))(*(this + 249));
v7(v6, v8);
}
v9 = (int)*(this + 144);
v10 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v9 + 80);
v11 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)*(this + 236) + 609) + 84))(*((_DWORD *)*(this + 236) + 609)));
v10(v9, 1.0 / v11);
if ( !(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 144) + 176))(*(this + 144)) )
GJRotationControl::setAngle(*(this + 144), 0.0);
return (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 144) + 172))(*(this + 144), 1);
}
}
return result;
}