//
// EditorUI::setCustomGridEnabled from 0x1401ae520 to 0x1401ae5c1 (161 bytes)
//
// 4 xrefs:
// > EditorUI::handleEditorAction @ 0x1401c2983
// > GridSettingsLayer::valueDidChange @ 0x1402c9502
// > GridSettingsLayer::valueDidChange @ 0x1402c9509
// > ??> @ 0x140919dfc
//
// 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:54 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EditorUI::setCustomGridEnabled(__int64 a1, unsigned __int8 a2)
{
__int64 v4; // rcx
void *v6; // [rsp+30h] [rbp+8h]
*(_BYTE *)(a1 + 704) = a2;
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v6 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
GameManager::setGameVariable(v4, "0194", a2);
if ( a2 && *(float *)(a1 + 700) <= 0.0 )
return EditorUI::setCustomGridNodeSize(a1, 30.0);
else
return EditorUI::updateGridNodeSize_1(a1);
}