//
// GJWorldNode::onLevel from 0x1003adc00 to 0x1003adc7c (124 bytes)
//
// 1 xrefs:
// > GJWorldNode::init @ 0x1003ad5bd
//
// 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 12:29:24 +0000
//
__int64 __fastcall GJWorldNode::onLevel(__int64 a1, __int64 a2, double a3)
{
__int64 result; // rax
__int64 v4; // r15
unsigned int v5; // eax
__int64 MainLevel; // rax
__int64 v7; // rax
result = *(_QWORD *)(a1 + 344);
if ( !*(_BYTE *)(result + 449) && !*(_BYTE *)(result + 464) )
{
v4 = GameLevelManager::sharedState(a3);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
MainLevel = GameLevelManager::getMainLevel(v4, v5, 1);
*(_QWORD *)(a1 + 336) = MainLevel;
v7 = sub_1003ADEF0(MainLevel, a1);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
}
return result;
}