//
// EditorUI::updateGridNodeSize_1 from 0x1401ae1c0 to 0x1401ae322 (354 bytes)
//
// 8 xrefs:
// > EditorUI::setCustomGridNodeSize @ 0x1401ae4ef
// > EditorUI::setCustomGridEnabled @ 0x1401ae5bc
// > EditorUI::resetUI @ 0x1401afd16
// > EditorUI::onCreateButton @ 0x1401b2137
// > EditorUI::toggleSpecialEditButtons @ 0x1401bb3b5
// > ??> @ 0x1408a11cc
// > ??> @ 0x1408a1204
// > ??> @ 0x140919da8
//
// 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
//
__int64 __fastcall EditorUI::updateGridNodeSize_1(__int64 a1)
{
float v1; // xmm0_4
__int64 result; // rax
__int64 v4; // rdx
unsigned int v5; // ebp
unsigned int v6; // esi
float v7; // xmm6_4
struct cocos2d::CCObject *v8; // rbx
__int64 v9; // rcx
unsigned int v10; // r8d
__int64 v11; // rcx
if ( *(_DWORD *)(a1 + 1508) == 2 )
return EditorUI::updateGridNodeSize(a1, *(unsigned int *)(a1 + 1392));
v4 = *(_QWORD *)(a1 + 1568);
if ( v4 )
return EditorUI::updateGridNodeSize(a1, *(unsigned int *)(v4 + 1036));
if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )
{
ObjectToolbox::sharedState();
ObjectToolbox::gridNodeSizeForKey(v11, 0xFFFFFFFFLL);
if ( *(_BYTE *)(a1 + 704) )
{
if ( *(float *)(a1 + 700) > 0.0 )
v1 = *(float *)(a1 + 700);
}
result = *(_QWORD *)(a1 + 1512);
*(float *)(a1 + 696) = v1;
*(float *)(*(_QWORD *)(result + 14944) + 636LL) = v1;
return result;
}
v5 = 0;
v6 = 0;
v7 = -1.0;
if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )
return EditorUI::updateGridNodeSize(a1, v5);
while ( 1 )
{
v8 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 944), v6);
ObjectToolbox::sharedState();
ObjectToolbox::gridNodeSizeForKey(v9, *((unsigned int *)v8 + 259));
if ( v7 != -1.0 )
break;
v7 = v1;
v5 = v10;
LABEL_10:
if ( ++v6 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )
return EditorUI::updateGridNodeSize(a1, v5);
}
if ( v7 == v1 )
goto LABEL_10;
v5 = -1;
return EditorUI::updateGridNodeSize(a1, v5);
}