//
// EditorUI::cycleCustomGridPreset from 0x4819e4 to 0x481aaa (198 bytes)
//
// 4 xrefs:
// > EditorUI::handleEditorAction @ 0x6f1be6
// > EditorUI::handleEditorAction @ 0x6f1bf8
// > GridSettingsLayer::onCycleUp @ 0x78e7fa
// > GridSettingsLayer::onCycleDown @ 0x78e816
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:49:22 +0000
//
int __fastcall EditorUI::cycleCustomGridPreset(EditorUI *this, int a2)
{
EditorUI *v2; // r4
GameManager *v3; // r0
float v4; // r1
float v5; // s15
float v6; // s14
float v7; // s15
float v8; // s14
v2 = this;
if ( *((_BYTE *)this + 480) )
{
v5 = *((float *)this + 119);
if ( a2 )
{
v6 = v5 + 0.001;
v7 = 7.5;
if ( v6 >= 7.5 )
{
v7 = 15.0;
if ( v6 >= 15.0 )
{
v7 = 30.0;
if ( v6 >= 30.0 )
{
v7 = 60.0;
if ( v6 >= 60.0 )
v7 = 120.0;
}
}
}
}
else
{
v8 = v5 - 0.001;
v7 = 120.0;
if ( v8 <= 120.0 )
{
v7 = 60.0;
if ( v8 <= 60.0 )
{
v7 = 30.0;
if ( v8 <= 30.0 )
{
v7 = 15.0;
if ( v8 <= 15.0 )
v7 = 7.5;
}
}
}
}
v4 = v7;
}
else
{
*((_BYTE *)this + 480) = 1;
v3 = (GameManager *)GameManager::sharedState(this);
GameManager::setGameVariable(v3, "0194", (_BYTE *)&dword_0 + 1);
this = v2;
v4 = 30.0;
}
return EditorUI::setCustomGridNodeSize(this, v4);
}