//
// EditorUI::toggleEnableRotate from 0x100470eac to 0x100470f50 (164 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x10016320c
// > EditorUI::init @ 0x100470964
// > EditorUI::init @ 0x10046ee50
//
// This function is hookable on this platform (idp: arm, 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:05:38 +0000
//
__int64 __fastcall EditorUI::toggleEnableRotate(__int64 a1)
{
__int64 v2; // x0
_BOOL4 v3; // w21
__int64 v4; // x0
__n128 v5; // q0
__int64 v6; // x0
__int64 v7; // x0
v2 = GameManager::sharedState();
v3 = !GameManager::getGameVariable(v2, "0007");
v4 = GameManager::sharedState();
GameManager::setGameVariable(v4, "0007", v3);
v6 = EditorSFXManager::sharedState(v5);
EditorSFXManager::playAction(v6, 193, 189);
v7 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 984) + 1072LL))(*(_QWORD *)(a1 + 984));
if ( v3 )
{
ButtonSprite::updateBGImage(v7, (__int64)"GJ_button_02.png");
return EditorUI::toggleSpecialEditButtons(a1, 1);
}
else
{
ButtonSprite::updateBGImage(v7, (__int64)"GJ_button_01.png");
return EditorUI::deactivateRotationControl(a1);
}
}