//
// EditorUI::toggleEnableRotate from 0x100008060 to 0x100008115 (181 bytes)
//
// 3 xrefs:
// > EditorUI::init @ 0x100007a13
// > EditorUI::handleEditorAction @ 0x10060c778
// > EditorUI::init @ 0x100005d18
//
// 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 12:18:48 +0000
//
__int64 __fastcall EditorUI::toggleEnableRotate(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // rdi
__int64 v5; // rdx
unsigned __int8 v6; // r15
__int64 v7; // rdi
__int64 v8; // rax
__int64 v9; // rax
v4 = GameManager::sharedState(a1, a2, a3);
v6 = GameManager::getGameVariable(v4, "0007") ^ 1;
v7 = GameManager::sharedState(v4, "0007", v5);
GameManager::setGameVariable(v7, "0007", v6);
v8 = EditorSFXManager::sharedState(v7);
EditorSFXManager::playAction(v8, 193, 189);
v9 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 984) + 1072LL))(*(_QWORD *)(a1 + 984));
if ( v6 )
{
ButtonSprite::updateBGImage(v9, "GJ_button_02.png");
return EditorUI::toggleSpecialEditButtons(a1, 1);
}
else
{
ButtonSprite::updateBGImage(v9, "GJ_button_01.png");
return EditorUI::deactivateRotationControl(a1);
}
}