//
// EditorUI::toggleFreeMove from 0x1401b34c0 to 0x1401b3588 (200 bytes)
//
// 4 xrefs:
// > EditorUI::init @ 0x1401ac316
// > EditorUI::handleEditorAction @ 0x1401c2920
// > EditorUI::init @ 0x1401aa609
// > ??> @ 0x14091a024
//
// 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:27:56 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall EditorUI::toggleFreeMove(__int64 a1)
{
__int64 v2; // rax
const char *v3; // rdx
__int64 v4; // rcx
_QWORD *v5; // rbx
bool hasSoundsForAction; // al
void *v7; // [rsp+30h] [rbp+8h]
*(_BYTE *)(a1 + 912) = *(_BYTE *)(a1 + 912) == 0;
v2 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1008) + 952LL))(*(_QWORD *)(a1 + 1008));
v3 = "GJ_button_01.png";
if ( *(_BYTE *)(a1 + 912) )
v3 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v2, v3);
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v7 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
GameManager::setGameVariable(v4, "0004", *(unsigned __int8 *)(a1 + 912));
v5 = (_QWORD *)EditorSFXManager::sharedState();
hasSoundsForAction = EditorSFXManager::hasSoundsForAction(v5, 191);
EditorSFXManager::playAction((__int64)v5, 2 * hasSoundsForAction + 189);
}