// // LoadingLayer::init from 0x140469080 to 0x1404698ca (2122 bytes) // // 2 xrefs: // > LoadingLayer::scene @ 0x140469035 // > @ 0x140928004 // // 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:32:36 +0000 // // Hidden C++ exception states: #wind=6 bool __fastcall LoadingLayer::init(__int64 a1, char a2) { bool result; // al __int64 v5; // rcx __int64 v6; // rcx __int64 v7; // rcx __int64 v8; // rax __int64 v9; // rcx cocos2d::CCTextureCache *v10; // rax __int64 v11; // rdx __int64 v12; // rcx cocos2d::CCSpriteFrameCache *v13; // rax __int64 v14; // rcx __int64 v15; // rax __int64 v16; // rcx cocos2d::CCString *v17; // rax const char *CString; // rax struct cocos2d::CCSprite *v19; // rdi __int64 v20; // rbx __int64 v21; // rax __int64 v22; // rcx __int64 v23; // rcx cocos2d::CCDirector *v24; // rax struct cocos2d::CCSprite *v25; // rsi __int64 v26; // rbx __int64 v27; // rax struct cocos2d::CCSprite *v28; // rdi __int64 v29; // rax __int64 v30; // rbx __int64 v31; // rax struct cocos2d::CCSprite *v32; // rsi __int64 v33; // rbx __int64 v34; // rax struct cocos2d::CCSprite *v35; // rdi __int64 v36; // rax __int64 v37; // rbx __int64 v38; // rax const char *LoadingString; // rax struct cocos2d::CCLabelBMFont *v40; // rax __int64 v41; // rdi __int64 v42; // rbx __int64 v43; // rax _BYTE *v44; // rax size_t v45; // r8 const struct cocos2d::CCPoint *v46; // rax char *v47; // rax __int64 v48; // rdi __int64 v49; // rbx __int64 v50; // rax __int64 *v51; // rcx __int64 v52; // rbx float *v53; // rsi struct cocos2d::CCSprite *v54; // rax cocos2d::CCTexture2D *v55; // rax __int64 v56; // rdi __int64 v57; // rbx __int64 v58; // rax __int64 v59; // rdi __int64 v60; // rbx __int64 v61; // rax __int64 v62; // rbx float v63; // xmm6_4 float *v64; // rax __int64 v65; // rax __int64 v66; // rcx __int64 v67; // rsi __int64 (__fastcall *v68)(__int64); // rdi __int64 v69; // rbx struct cocos2d::CCFiniteTimeAction *v70; // rax struct cocos2d::CCAction *v71; // rbx cocos2d::CCActionManager *v72; // rax void *v73; // [rsp+48h] [rbp-59h] BYREF float v74; // [rsp+50h] [rbp-51h] BYREF float v75; // [rsp+54h] [rbp-4Dh] __int128 *v76; // [rsp+58h] [rbp-49h] BYREF __int16 v77; // [rsp+60h] [rbp-41h] __int16 v78; // [rsp+64h] [rbp-3Dh] BYREF char v79; // [rsp+66h] [rbp-3Bh] __int128 v80; // [rsp+68h] [rbp-39h] BYREF __int64 v81; // [rsp+78h] [rbp-29h] __int64 v82; // [rsp+80h] [rbp-21h] _DWORD v83[4]; // [rsp+88h] [rbp-19h] BYREF result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1); if ( result ) { *(_BYTE *)(a1 + 448) = a2; *(_BYTE *)(cocos2d::CCDirector::sharedDirector(v5) + 217) = 1; cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(0); if ( !*(_BYTE *)(a1 + 448) ) { v7 = qword_14090BF60; if ( !qword_14090BF60 ) { v73 = operator new(0x8A8u); qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v73); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60); v7 = qword_14090BF60; } FMODAudioEngine::setup(v7); } v8 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v73 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v73); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v8 = qword_14090BFD0; } if ( *(_BYTE *)(v8 + 1084) ) { *(_BYTE *)(v8 + 1084) = 0; v9 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v73 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v73); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v9 = *(_QWORD *)&qword_14090BFB0; } GameLevelManager::getLevelSaveData(v9); } v10 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v6); cocos2d::CCTextureCache::addImage(v10, "GJ_LaunchSheet.png", 0); v13 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v12, v11); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v13, "GJ_LaunchSheet.plist"); v15 = cocos2d::CCDirector::sharedDirector(v14); cocos2d::CCDirector::getWinSize(v15, &v74); v16 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v73 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v73); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v16 = qword_14090BFD0; } GameManager::loadBackground(v16, 1); v17 = cocos2d::CCString::createWithFormat("game_bg_%02d_001.png", 1); CString = cocos2d::CCString::getCString(v17); v19 = cocos2d::CCSprite::create(CString); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v19); v20 = *(_QWORD *)v19; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v73, v74 * 0.5, v75 * 0.5); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v20 + 184))(v19, v21); cocos2d::CCApplication::sharedApplication(v22); v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v23); cocos2d::CCDirector::getScreenScaleFactorMax(v24); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v19 + 160LL))(v19); v77 = 26112; v78 = 26112; v79 = -1; (**((void (__fastcall ***)(__int64, __int16 *))v19 + 40))((__int64)v19 + 320, &v78); v25 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_logo_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v25); v26 = *(_QWORD *)v25; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v73, v74 * 0.5, (float)(v75 * 0.5) + 0.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v26 + 184))(v25, v27); v28 = cocos2d::CCSprite::createWithSpriteFrameName("RobTopLogoBig_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v28); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 0.0, 80.0); v30 = v29; v31 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v25 + 200LL))(v25); cocos2d::CCPoint::operator+(v31, &v73, v30); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void **))(*(_QWORD *)v28 + 184LL))(v28, &v73); *(_BYTE *)(a1 + 409) = 1; *(_DWORD *)(a1 + 412) = 0; v32 = cocos2d::CCSprite::createWithSpriteFrameName("cocos2DxLogo.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v32); v33 = *(_QWORD *)v32; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, v74 - 34.0, 13.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v33 + 184))(v32, v34); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v32 + 160LL))(v32); v35 = cocos2d::CCSprite::createWithSpriteFrameName("fmodLogo.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v35); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 0.0, 20.0); v37 = v36; v38 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v32 + 200LL))(v32); cocos2d::CCPoint::operator+(v38, &v73, v37); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void **))(*(_QWORD *)v35 + 184LL))(v35, &v73); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v35 + 160LL))(v35); (**((void (__fastcall ***)(__int64, void *))v35 + 40))((__int64)v35 + 320, &unk_1407044C0); LoadingString = (const char *)LoadingLayer::getLoadingString(a1); v40 = cocos2d::CCLabelBMFont::create(LoadingString, "goldFont.fnt"); *(_QWORD *)(a1 + 416) = v40; (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v40); v41 = **(_QWORD **)(a1 + 416); v42 = *(_QWORD *)(a1 + 416); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, v74 * 0.5, (float)(v75 * 0.5) - 70.0); (*(void (__fastcall **)(__int64, __int64))(v41 + 184))(v42, v43); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 160LL))(*(_QWORD *)(a1 + 416)); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 416) + 336LL))(*(_QWORD *)(a1 + 416), 0); v76 = &v80; v44 = (_BYTE *)LoadingLayer::getLoadingString(a1); v80 = 0; v81 = 0; v82 = 0; v45 = -1; do ++v45; while ( v44[v45] ); sub_14003D230(&v80, v44, v45); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v73, 0.5, 0.5); v47 = TextArea::create((__int64)&v80, "goldFont.fnt", 1.0, 440.0, v46, 1105199104, 0, 0); *(_QWORD *)(a1 + 424) = v47; (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)a1 + 464LL))(a1, v47); v48 = **(_QWORD **)(a1 + 424); v49 = *(_QWORD *)(a1 + 424); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, v74 * 0.5, (float)(v75 * 0.5) - 100.0); (*(void (__fastcall **)(__int64, __int64))(v48 + 184))(v49, v50); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 424) + 160LL))(*(_QWORD *)(a1 + 424)); if ( *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 320LL))(*(_QWORD *)(a1 + 416)) > 300.0 ) { v51 = *(__int64 **)(a1 + 416); v52 = *v51; (*(__int64 (__fastcall **)(__int64 *))(*v51 + 320))(v51); (*(void (__fastcall **)(_QWORD))(v52 + 160))(*(_QWORD *)(a1 + 416)); } fminf( 0.69999999, COERCE_FLOAT(COERCE_UNSIGNED_INT64((*(double (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 168LL))(*(_QWORD *)(a1 + 416))))); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 160LL))(*(_QWORD *)(a1 + 416)); v53 = (float *)cocos2d::CCSprite::create("slidergroove.png"); (*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v53, 3); v54 = cocos2d::CCSprite::create("sliderBar.png"); *(_QWORD *)(a1 + 432) = v54; *(float *)(a1 + 440) = v53[108] - 4.0; *(_DWORD *)(a1 + 444) = 1090519040; v83[0] = 9729; v83[1] = 9729; v83[2] = 10497; v83[3] = 10497; v55 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*((_QWORD *)v54 + 43) + 16LL))((__int64)v54 + 344); cocos2d::CCTexture2D::setTexParameters(v55, (struct cocos2d::_ccTexParams *)v83); (*(void (__fastcall **)(float *, _QWORD, __int64))(*(_QWORD *)v53 + 456LL))( v53, *(_QWORD *)(a1 + 432), 0xFFFFFFFFLL); v56 = **(_QWORD **)(a1 + 432); v57 = *(_QWORD *)(a1 + 432); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 0.0, 0.0); (*(void (__fastcall **)(__int64, __int64))(v56 + 288))(v57, v58); v59 = **(_QWORD **)(a1 + 432); v60 = *(_QWORD *)(a1 + 432); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 2.0, 4.0); (*(void (__fastcall **)(__int64, __int64))(v59 + 184))(v60, v61); v62 = *(_QWORD *)v53; v63 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 424) + 200LL))(*(_QWORD *)(a1 + 424)) + 4) + 40.0; v64 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 200LL))(*(_QWORD *)(a1 + 416)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, *v64, v63); (*(void (__fastcall **)(float *, __int64))(v62 + 184))(v53, v65); LoadingLayer::updateProgress(a1, 0); v67 = cocos2d::CCDirector::sharedDirector(v66); v68 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v67 + 128LL); v69 = cocos2d::CCCallFunc::create(a1, LoadingLayer::loadAssets); v70 = cocos2d::CCDelayTime::create(0.0); v71 = cocos2d::CCSequence::create(v70, v69, 0); v72 = (cocos2d::CCActionManager *)v68(v67); cocos2d::CCActionManager::addAction(v72, v71, (struct cocos2d::CCNode *)a1, 0); return 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source