//
// EditorUI::setCustomGridNodeSize from 0x1401ae390 to 0x1401ae514 (388 bytes)
//
// 11 xrefs:
// > EditorUI::setCustomGridEnabled @ 0x1401ae5aa
// > EditorUI::cycleCustomGridPreset @ 0x1401ae649
// > EditorUI::cycleCustomGridPreset @ 0x1401ae69d
// > EditorUI::cycleCustomGridPreset @ 0x1401ae6dd
// > EditorUI::cycleCustomGridPreset @ 0x1401ae6ea
// > EditorUI::adjustCustomGridSize @ 0x1401ae766
// > EditorUI::adjustCustomGridSize @ 0x1401ae782
// > GridSettingsLayer::valueDidChange @ 0x1402c9533
// > GridSettingsLayer::onReset @ 0x1402c955d
// > ??> @ 0x140919de4
// > ??> @ 0x140919df0
//
// 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=2
__int64 __fastcall EditorUI::setCustomGridNodeSize(__int64 a1, float a2)
{
float v3; // xmm6_4
float v4; // xmm0_4
__int64 v5; // rbx
__int64 v6; // rbx
struct cocos2d::CCString *v7; // rax
void *v8; // rcx
void *v10; // [rsp+30h] [rbp-48h]
void *Block[2]; // [rsp+38h] [rbp-40h] BYREF
__int64 v12; // [rsp+48h] [rbp-30h]
unsigned __int64 v13; // [rsp+50h] [rbp-28h]
v3 = 0.0;
if ( a2 > 0.0 )
{
v4 = fminf(300.0, a2);
v3 = 5.0;
if ( v4 >= 5.0 )
v3 = v4;
}
*(float *)(a1 + 700) = v3;
v5 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v5 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v12 = 3;
v13 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0193", 4u);
v6 = *(_QWORD *)(v5 + 432);
v7 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)(int)(float)(v3 * 10.0));
cocos2d::CCDictionary::setObject(v6, v7, Block);
if ( v13 > 0xF )
{
v8 = Block[0];
if ( v13 + 1 >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
return EditorUI::updateGridNodeSize_1(a1);
}