// // GJWorldNode::init from 0x62d780 to 0x62dcf0 (1392 bytes) // // 1 xrefs: // > GJWorldNode::create @ 0x62dd54 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:55:14 +0000 // int __fastcall GJWorldNode::init(cocos2d::CCArray **this, cocos2d::CCArray *a2, WorldSelectLayer *a3) { const char *v6; // r1 cocos2d::CCString *v7; // r0 const char *CString; // r5 size_t v9; // r0 cocos2d::CCSprite *v10; // r0 int v11; // r5 cocos2d::CCMenu *v12; // r0 const cocos2d::CCPoint *v13; // r11 int v14; // r5 GameStatsManager *hasCompletedMainLevel; // r0 int v16; // r6 GameStatsManager *v17; // r0 float v18; // r0 int i; // r8 GameLevelManager *v20; // r0 int v21; // r3 int MainLevel; // r0 int v23; // r3 const char *v24; // r1 cocos2d::CCSprite *v25; // r0 int v26; // r6 cocos2d::CCArray *v27; // r7 int (__fastcall *v28)(cocos2d::CCArray *, _BYTE *); // r10 cocos2d::CCNode *v29; // r0 int v30; // r9 float v31; // s17 cocos2d::CCNode *v32; // r0 int v33; // r9 void (__fastcall *v34)(int, _BYTE *); // r10 float v35; // s17 const char *v36; // r1 cocos2d::CCArray *v37; // r0 int v38; // r8 void (__fastcall *v39)(int, _BYTE *); // r9 GameStatsManager *v41; // r0 cocos2d::CCArray *v42; // r0 cocos2d::CCObject *v43; // r0 unsigned int j; // r9 int v45; // r0 const cocos2d::CCPoint *v46; // r2 cocos2d::CCEaseInOut *v47; // r0 float v48; // r2 cocos2d::CCSequence *v49; // r8 const cocos2d::CCPoint *v50; // r2 cocos2d::CCEaseInOut *v51; // r0 float v52; // r2 cocos2d::CCFiniteTimeAction *v53; // r0 cocos2d::CCRepeatForever *v54; // r0 cocos2d::CCActionInterval *v55; // r1 cocos2d::CCAction *v56; // r0 cocos2d::CCSequence *v57; // r7 cocos2d::CCFiniteTimeAction *v58; // r0 cocos2d::CCAction *v59; // r0 int v60; // [sp+Ch] [bp-88h] int v61; // [sp+10h] [bp-84h] int v62; // [sp+18h] [bp-7Ch] int v63; // [sp+1Ch] [bp-78h] int (__fastcall *v64)(int, _BYTE *); // [sp+20h] [bp-74h] _BYTE v65[8]; // [sp+30h] [bp-64h] BYREF _BYTE v66[8]; // [sp+38h] [bp-5Ch] BYREF float v67[2]; // [sp+40h] [bp-54h] BYREF _BYTE v68[4]; // [sp+48h] [bp-4Ch] BYREF float v69; // [sp+4Ch] [bp-48h] _BYTE v70[8]; // [sp+50h] [bp-44h] BYREF _DWORD (*v71)(GJWorldNode *__hidden, cocos2d::CCObject *); // [sp+58h] [bp-3Ch] int v72; // [sp+5Ch] [bp-38h] _DWORD (*v73)(GJWorldNode *__hidden); // [sp+60h] [bp-34h] int v74; // [sp+64h] [bp-30h] int v75[2]; // [sp+68h] [bp-2Ch] BYREF cocos2d::CCSprite *v76; // [sp+70h] [bp-24h] int v77[2]; // [sp+74h] [bp-20h] BYREF cocos2d::CCSprite *v78; // [sp+7Ch] [bp-18h] int v79[2]; // [sp+80h] [bp-14h] BYREF cocos2d::CCSprite *v80; // [sp+88h] [bp-Ch] v62 = cocos2d::CCNode::init((cocos2d::CCNode *)this); if ( v62 ) { *(this + 69) = a3; if ( a2 == (cocos2d::CCArray *)((char *)&dword_0 + 1) ) *((_BYTE *)this + 292) = -1; *((_BYTE *)this + 293) = -1; if ( a2 != (cocos2d::CCArray *)((char *)&dword_0 + 1) ) *((_BYTE *)this + 292) = 50; *(this + 74) = a2; if ( (int)a2 > 2 ) v6 = (char *)&dword_0 + 1; else v6 = (const char *)a2; *((_BYTE *)this + 294) = 0; v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"worldIsland_%02d.png", v6); v75[0] = 0; v75[1] = 0; v76 = nullptr; CString = (const char *)cocos2d::CCString::getCString(v7); v9 = strlen(CString); std::string::__init(v75, CString, v9); if ( (v75[0] & 1) != 0 ) v10 = v76; else v10 = (cocos2d::CCSprite *)((char *)v75 + 1); v11 = cocos2d::CCSprite::createWithSpriteFrameName(v10, (const char *)(LOBYTE(v75[0]) << 31)); v12 = (cocos2d::CCMenu *)(*((int (__fastcall **)(cocos2d::CCArray **, int))*this + 57))(this, v11); if ( (int)a2 <= 2 ) { v13 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v12); (*((void (__fastcall **)(cocos2d::CCArray **, const cocos2d::CCPoint *, int))*this + 58))(this, v13, 2); v77[0] = 0; v77[1] = 0; v14 = 0; v78 = nullptr; std::string::__init(v77, "worldLevelBtn_001.png", 0x15u); v79[0] = 0; v79[1] = 0; v80 = nullptr; hasCompletedMainLevel = (GameStatsManager *)std::string::__init(v79, "worldLevelBtn_locked_001.png", 0x1Cu); v16 = 5 * ((_DWORD)a2 - 1); v63 = v16 + 2001; do { v17 = (GameStatsManager *)GameStatsManager::sharedState(hasCompletedMainLevel); hasCompletedMainLevel = (GameStatsManager *)GameStatsManager::hasCompletedMainLevel(v17, v16 - 47 + v14); if ( !hasCompletedMainLevel ) break; ++v14; } while ( v14 != 5 ); if ( (int)a2 <= 1 || (v41 = (GameStatsManager *)GameStatsManager::sharedState(hasCompletedMainLevel), GameStatsManager::hasCompletedMainLevel(v41, v16 - 48)) ) { ++v14; } v18 = COERCE_FLOAT(cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, (const cocos2d::CCPoint *)&flt_D2CD50)); for ( i = 0; i != 5; ++i ) { v61 = v63 + i; v20 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)LODWORD(v18)); MainLevel = GameLevelManager::getMainLevel(v20, (char *)(v63 + i), 1, v21); if ( i == v14 - 1 && v61 > 2001 ) v23 = *(unsigned __int8 *)(MainLevel + 478) ^ 1; else v23 = 0; v60 = v23; GJWorldNode::positionForLevelButton((GJWorldNode *)v66, (int)this, v61); if ( i >= v14 || v60 ) { if ( (v79[0] & 1) != 0 ) v25 = v80; else v25 = (cocos2d::CCSprite *)((char *)v79 + 1); } else if ( (v77[0] & 1) != 0 ) { v25 = v78; } else { v25 = (cocos2d::CCSprite *)((char *)v77 + 1); } v26 = cocos2d::CCSprite::createWithSpriteFrameName(v25, v24); v71 = GJWorldNode::onLevel; v72 = 0; v27 = (cocos2d::CCArray *)CCMenuItemSpriteExtra::create(v26, 0, (int)this, (int)GJWorldNode::onLevel, 0); CCMenuItemSpriteExtra::setSizeMult((int)v27, 1.2); *((_DWORD *)v27 + 78) = 1067030938; (*(void (__fastcall **)(cocos2d::CCArray *, int))(*(_DWORD *)v27 + 36))(v27, v61); (*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCArray *))(*(_DWORD *)v13 + 228))(v13, v27); v28 = *(int (__fastcall **)(cocos2d::CCArray *, _BYTE *))(*(_DWORD *)v27 + 92); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v70, v13); v29 = (cocos2d::CCNode *)v28(v27, v70); v30 = cocos2d::CCNode::create(v29); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v30 + 160))(v30, &unk_D2CD58); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)v26 + 232))(v26, v30, 1); v64 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v30 + 92); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v26 + 168))(v67, v26); v31 = v67[0] * 0.5; (*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)v26 + 168))(v68, v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v31, v69 * 0.5); v32 = (cocos2d::CCNode *)v64(v30, v70); v33 = cocos2d::CCNode::create(v32); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v33 + 160))(v33, &unk_D2CD58); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)v26 + 232))(v26, v33, -1); v34 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v33 + 92); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v26 + 168))(v67, v26); v35 = v67[0] * 0.5; (*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)v26 + 168))(v68, v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v35, v69 * 0.5); v34(v33, v70); if ( i < v14 ) { v18 = COERCE_FLOAT(cocos2d::CCPoint::operator=(v65, v66)); if ( v60 ) { v42 = (cocos2d::CCArray *)cocos2d::CCPoint::operator=(this + 71, v66); v43 = (cocos2d::CCObject *)cocos2d::CCArray::create(v42); *(this + 66) = v43; cocos2d::CCObject::retain(v43); for ( j = 0; j < cocos2d::CCArray::count(*(this + 66)); ++j ) { v45 = cocos2d::CCArray::objectAtIndex(*(this + 66), j); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v45 + 172))(v45, 0); } *(this + 67) = v27; v18 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCArray *, _DWORD))(*(_DWORD *)v27 + 528))(v27, 0)); } if ( i ) { v18 = GJWorldNode::addDotsToLevel((GJWorldNode *)this, v61, v60); if ( *(this + 67) && !*((_BYTE *)this + 280) ) { *((_BYTE *)this + 280) = 1; v57 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create( COERCE_COCOS2D_CCDELAYTIME_(v18 + 0.2), *(float *)&v36); v73 = GJWorldNode::unlockActiveItem; v74 = 0; v58 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, GJWorldNode::unlockActiveItem, 0); v59 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v57, v58, 0); v18 = COERCE_FLOAT(cocos2d::CCNode::runAction((cocos2d::CCNode *)this, v59)); } } else if ( *(this + 67) ) { *((_BYTE *)this + 300) = 1; } } else { v18 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCArray *, _DWORD))(*(_DWORD *)v27 + 528))(v27, 0)); } } v37 = (cocos2d::CCArray *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_arrow_02_001.png", v36); *(this + 76) = v37; (*(void (__fastcall **)(cocos2d::CCArray *, int))(*(_DWORD *)v37 + 80))(v37, 1058642330); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 76) + 180))(*(this + 76), -1028390912); v38 = (int)*(this + 76); v39 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v38 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, 0.0, 40.0); cocos2d::CCPoint::operator+(v70, v65, v68); v39(v38, v70); (*((void (__fastcall **)(cocos2d::CCArray **, _DWORD, int))*this + 58))(this, *(this + 76), 10); if ( v14 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, 0.0, -5.0); v47 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create((cocos2d::CCMoveBy *)0x3F000000, COERCE_FLOAT(v70), v46); v49 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v47, (cocos2d::CCActionInterval *)0x3FE66666, v48); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, 0.0, 5.0); v51 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create((cocos2d::CCMoveBy *)0x3F000000, COERCE_FLOAT(v70), v50); v53 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create( v51, (cocos2d::CCActionInterval *)0x3FE66666, v52); v54 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v49, v53, 0); v56 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v54, v55); cocos2d::CCNode::runAction(*(this + 76), v56); } if ( (unsigned int)(v14 - 1) > 3 || *(this + 67) ) (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 76) + 172))(*(this + 76), 0); std::string::~string((int)v79); std::string::~string((int)v77); } else { (*(void (__fastcall **)(int, void *))(*(_DWORD *)v11 + 480))(v11, &unk_BEEE0B); (*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 456))(v11, 75); (*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1061997773); } std::string::~string((int)v75); } return v62; }
GD Web Decomp Icon

GD Web Decomp

Raw Source