//
// EditorUI::toggleSnap from 0x7c02b4 to 0x7c0358 (164 bytes)
//
// 5 xrefs:
// > EditorUI::init @ 0x7d100c
// > EditorUI::handleEditorAction @ 0xbd80b4
// > ??> @ 0xc5158
// > EditorUI::init @ 0x7cf548
// > ??> @ 0x1545c30
//
// 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 12:54:06 +0000
//
__int64 __fastcall EditorUI::toggleSnap(EditorUI *this, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
GameManager *GameVariable; // x0
int v5; // w20
GameManager *v6; // x0
ButtonSprite *v7; // x0
EditorSFXManager *updated; // x0
EditorSFXManager *v9; // x0
v3 = (GameManager *)GameManager::sharedState(this);
GameVariable = (GameManager *)GameManager::getGameVariable(v3, "0008");
v5 = (unsigned __int8)GameVariable;
v6 = (GameManager *)GameManager::sharedState(GameVariable);
GameManager::setGameVariable(v6, "0008", v5 ^ 1);
v7 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 122) + 1072LL))(*((_QWORD *)this + 122));
if ( v5 )
updated = (EditorSFXManager *)ButtonSprite::updateBGImage(v7, "GJ_button_01.png");
else
updated = (EditorSFXManager *)ButtonSprite::updateBGImage(v7, "GJ_button_02.png");
v9 = (EditorSFXManager *)EditorSFXManager::sharedState(updated);
return EditorSFXManager::playAction(v9, 190, 189);
}