//
// DrawGridLayer::loadTimeMarkers from 0x1003f92f4 to 0x1003f9510 (540 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::levelSettingsUpdated @ 0x1003f924c
// > LevelEditorLayer::levelSettingsUpdated @ 0x1003f9274
// > DrawGridLayer::updateTimeMarkers @ 0x100402358
//
// 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 11:04:35 +0000
//
void __fastcall DrawGridLayer::loadTimeMarkers(__int64 a1, std::string *a2)
{
_DWORD *v4; // x0
unsigned int v5; // w8
__int64 v6; // x8
_QWORD *v7; // x0
__int64 v8; // x21
__int64 v9; // x25
__int64 v10; // x23
unsigned __int64 v11; // x24
__int64 v12; // x26
const char *v13; // x0
const char *v14; // x0
float v15; // s0
float v16; // s11
__int64 v17; // x21
__int64 v18; // x21
__int64 v19; // [xsp+10h] [xbp-80h] BYREF
__int64 v20; // [xsp+18h] [xbp-78h]
__int64 v21; // [xsp+20h] [xbp-70h]
void **v22; // [xsp+28h] [xbp-68h] BYREF
std::string::operator=((std::string *)(a1 + 504), a2);
v4 = *(_DWORD **)(a1 + 536);
if ( v4 )
{
cocos2d::CCObject::release(v4);
*(_QWORD *)(a1 + 536) = 0;
}
if ( (*(char *)(a1 + 527) & 0x8000000000000000LL) != 0 )
{
if ( !*(_QWORD *)(a1 + 512) )
return;
}
else if ( !*(_BYTE *)(a1 + 527) )
{
return;
}
v5 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 496) + 3272LL) + 332LL) - 1;
if ( v5 > 3 )
v6 = 584;
else
v6 = qword_10076E640[v5];
*(_DWORD *)(a1 + 576) = *(_DWORD *)(a1 + v6);
v19 = 0;
v20 = 0;
v21 = 0;
sub_1003F76E8(a2, "~", (__int64)&v19);
v7 = sub_1002E7510(-1431655765 * (unsigned int)((unsigned __int64)(v20 - v19) >> 3));
*(_QWORD *)(a1 + 536) = v7;
cocos2d::CCObject::retain((__int64)v7);
v9 = v19;
v8 = v20;
if ( 0xAAAAAAAAAAAAAAABLL * ((v20 - v19) >> 3) >= 2 )
{
v10 = 0;
v11 = 1;
do
{
v12 = v9 + v10;
if ( *(char *)(v9 + v10 + 23) < 0 )
v13 = *(const char **)v12;
else
v13 = (const char *)(v9 + v10);
atof(v13);
v14 = (const char *)(v12 + 24);
if ( *(char *)(v12 + 47) < 0 )
v14 = *(const char **)v14;
v15 = atof(v14);
if ( v15 == 0.0 )
v16 = 0.8;
else
v16 = v15;
if ( v16 >= 0.8 )
{
v17 = *(_QWORD *)(a1 + 536);
sub_10023D9D0(
*(_QWORD *)(a1 + 560),
*(unsigned int *)(*(_QWORD *)(*(_QWORD *)(a1 + 496) + 3272LL) + 332LL),
*(unsigned __int8 *)(*(_QWORD *)(*(_QWORD *)(a1 + 496) + 3272LL) + 341LL),
*(_QWORD *)(a1 + 496) + 832LL);
sub_1003065B0("%.02f", *(float *)&v22);
sub_1002E74E0(v17);
v18 = *(_QWORD *)(a1 + 536);
sub_1003065B0("%.02f", v16);
sub_1002E74E0(v18);
v9 = v19;
v8 = v20;
}
v10 += 48;
v11 += 2LL;
}
while ( 0xAAAAAAAAAAAAAAABLL * ((v8 - v9) >> 3) > v11 );
}
v22 = (void **)&v19;
sub_100018250(&v22);
}