//
// EditorUI::activateRotationControl from 0x1402025e0 to 0x14020271c (316 bytes)
//
// 11 xrefs:
// > EditorUI::undoLastAction @ 0x1401b3c0f
// > EditorUI::redoLastAction @ 0x1401b3c7f
// > EditorUI::toggleSpecialEditButtons @ 0x1401bb33b
// > EditorUI::handleEditorAction @ 0x1401c2368
// > EditorUI::moveObjectCall_1 @ 0x1401fee0a
// > EditorUI::alignObjects @ 0x140201c8f
// > EditorUI::updateControlsAfterAlign @ 0x140201d3f
// > EditorUI::createMoveMenu @ 0x1401f28d7
// > ??> @ 0x1408a3ec4
// > ??> @ 0x1408a3ed4
// > ??> @ 0x14091aee8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:28:13 +0000
//
unsigned int __fastcall EditorUI::activateRotationControl(__int64 a1)
{
unsigned int result; // eax
cocos2d::CCArray *v3; // rcx
__int64 v4; // rcx
cocos2d::CCPoint *GroupCenter; // rax
__int64 *v6; // rdi
__int64 v7; // rbx
__int64 v8; // rax
__int64 *v9; // rdi
__int64 v10; // rbx
__int64 v11; // rdx
char v12; // [rsp+30h] [rbp+8h] BYREF
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));
if ( result || *(_QWORD *)(a1 + 1568) )
{
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 808) + 344LL))(*(_QWORD *)(a1 + 808));
if ( !(_BYTE)result || *(_BYTE *)(a1 + 824) )
{
EditorUI::deactivateTransformControl(a1);
v3 = *(cocos2d::CCArray **)(a1 + 944);
*(_BYTE *)(a1 + 824) = 0;
if ( cocos2d::CCArray::count(v3) )
{
GroupCenter = EditorUI::getGroupCenter(v4, (cocos2d::CCPoint *)&v12, *(cocos2d::CCArray **)(a1 + 944), 0);
cocos2d::CCPoint::operator=(a1 + 816, GroupCenter);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 808) + 184LL))(*(_QWORD *)(a1 + 808), a1 + 816);
}
else
{
v6 = *(__int64 **)(a1 + 808);
v7 = *v6;
v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1568) + 200LL))(*(_QWORD *)(a1 + 1568));
(*(void (__fastcall **)(__int64 *, __int64))(v7 + 184))(v6, v8);
}
v9 = *(__int64 **)(a1 + 808);
v10 = *v9;
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL));
(*(void (__fastcall **)(__int64 *))(v10 + 160))(v9);
GJRotationControl::setAngle(*(_QWORD *)(a1 + 808), 0.0);
LOBYTE(v11) = 1;
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 808) + 336LL))(*(_QWORD *)(a1 + 808), v11);
}
}
return result;
}