//
// EditorUI::toggleFreeMove from 0x140110060 to 0x1401100fe (158 bytes)
//
// 4 xrefs:
// > EditorUI::init @ 0x1400e1848
// > EditorUI::keyDown @ 0x140125bfa
// > EditorUI::init @ 0x1400dff13
// > ??> @ 0x1406c8e8c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void EditorUI::toggleFreeMove(EditorUI *a1, cocos2d::CCObject *a2)
{
ButtonSprite *v3; // rax
const char *v4; // rdx
GameManager *v5; // rcx
void *v6; // [rsp+30h] [rbp+8h]
a1->m_freeMoveEnabled = !a1->m_freeMoveEnabled;
v3 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCObject *))a1->m_freeMoveBtn->getNormalImage)(
a1->m_freeMoveBtn,
a2);
v4 = "GJ_button_01.png";
if ( a1->m_freeMoveEnabled )
v4 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v3, v4);
v5 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v6 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v5 = (GameManager *)qword_1406C2ED8;
}
GameManager::setGameVariable(v5, "0004", a1->m_freeMoveEnabled);
}