//
// GJWorldNode::onLevel from 0xaa9d3c to 0xaa9dc8 (140 bytes)
//
// 3 xrefs:
// > ??> @ 0xf9aa8
// > GJWorldNode::init @ 0xaa73d4
// > ??> @ 0x1547970
//
// 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 13:00:53 +0000
//
GJGameLevel *__fastcall GJWorldNode::onLevel(GJGameLevel *this, cocos2d::CCObject *a2)
{
__int64 v2; // x19
GJGameLevel *v4; // x19
GameLevelManager *v5; // x21
unsigned int v6; // w0
WorldLevelPage *MainLevel; // x0
GJWorldNode *v8; // x2
__int64 v9; // x0
v2 = *((_QWORD *)this + 43);
if ( !*(_BYTE *)(v2 + 449) && !*(_BYTE *)(v2 + 464) )
{
v4 = this;
v5 = (GameLevelManager *)GameLevelManager::sharedState(this);
v6 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
MainLevel = (WorldLevelPage *)GameLevelManager::getMainLevel(v5, (const char *)v6, 1u);
*((_QWORD *)v4 + 42) = MainLevel;
v9 = WorldLevelPage::create(MainLevel, v4, v8);
return (GJGameLevel *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
}
return this;
}