//
// EditorUI::cycleCustomGridPreset from 0x7c1514 to 0x7c15fc (232 bytes)
//
// 5 xrefs:
// > EditorUI::handleEditorAction @ 0xbd871c
// > EditorUI::handleEditorAction @ 0xbd8824
// > GridSettingsLayer::onCycleUp @ 0xcdc1c0
// > GridSettingsLayer::onCycleDown @ 0xcdc200
// > ??> @ 0x84988
//
// 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::cycleCustomGridPreset(EditorUI *this, char a2)
{
float v2; // s2
float v3; // s0
float v4; // s1
float v5; // s1
GameManager *v8; // x0
if ( *((_BYTE *)this + 656) )
{
v2 = *((float *)this + 163);
if ( a2 )
{
v3 = 7.5;
v5 = v2 + 0.001;
if ( (float)(v2 + 0.001) >= 7.5 )
{
v3 = 15.0;
if ( v5 >= 15.0 )
{
v3 = 30.0;
if ( v5 >= 30.0 )
{
v3 = 60.0;
if ( v5 >= 60.0 )
v3 = 120.0;
}
}
}
}
else
{
v3 = 120.0;
v4 = v2 - 0.001;
if ( (float)(v2 - 0.001) <= 120.0 )
{
v3 = 60.0;
if ( v4 <= 60.0 )
{
v3 = 30.0;
if ( v4 <= 30.0 )
{
v3 = 15.0;
if ( v4 <= 15.0 )
v3 = 7.5;
}
}
}
}
return EditorUI::setCustomGridNodeSize(this, v3);
}
else
{
*((_BYTE *)this + 656) = 1;
v8 = (GameManager *)GameManager::sharedState(this);
GameManager::setGameVariable(v8, "0194", 1u);
return EditorUI::setCustomGridNodeSize(this, 30.0);
}
}