// // PlayLayer::loadFromCheckpoint from 0x10008ae80 to 0x10008b4dd (1629 bytes) // // 3 xrefs: // > PlayLayer::loadLastCheckpoint @ 0x10008ae5f // > PlayLayer::resetLevel @ 0x10008cd6f // > PlayLayer::resetLevel @ 0x10008ce66 // // 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:20:06 +0000 // void __fastcall PlayLayer::loadFromCheckpoint(__int64 a1, _DWORD *a2, double a3) { int *v5; // rsi __int64 v6; // rdx __int64 v7; // rdi __int64 v8; // rax __int64 v9; // rax __int64 v10; // rax __int64 v11; // rax float v12; // xmm0_4 __int64 *v13; // rbx _QWORD *v14; // r15 __int64 v15; // r14 __int64 v16; // r13 __int64 v17; // r13 _QWORD *v18; // r14 char v19; // r12 unsigned __int8 v20; // bl char GameVariable; // r14 __int64 v22; // rax unsigned __int8 isJumpButtonPressed; // r15 unsigned __int8 v24; // al unsigned __int8 v25; // dl __int64 v26; // rsi __int64 v27; // rdi __int64 v28; // rdx char v29; // r12 unsigned __int8 v30; // bl char v31; // r14 __int64 v32; // rax unsigned __int8 v33; // r15 unsigned __int8 v34; // dl unsigned __int8 v35; // al __int64 v36; // r14 unsigned int v37; // r15d __int64 v38; // rax _QWORD *v39; // r15 __int64 *v40; // rax __int64 *i; // rcx __int64 v42; // rdx unsigned int *v43; // rbx unsigned int *j; // r14 __int64 v45; // rax unsigned int *v46; // rax unsigned int **v47; // r15 unsigned __int64 v48; // r12 __int64 v49; // rdi unsigned int *v50; // r14 unsigned int k; // r14d __int64 Group; // rax unsigned int *v53; // rax _QWORD *v54; // rbx unsigned __int64 v55; // r15 unsigned int ActiveMode; // eax __int64 v57; // rsi __int64 v58; // rax int *v59; // [rsp-60h] [rbp-60h] BYREF __int64 *v60; // [rsp-58h] [rbp-58h] __int64 v61; // [rsp-50h] [rbp-50h] int v62; // [rsp-44h] [rbp-44h] BYREF _QWORD *v63; // [rsp-40h] [rbp-40h] char v64; // [rsp-31h] [rbp-31h] BYREF if ( a2 ) { v5 = a2 + 80; sub_100089410(a1 + 424, (__int64)v5); v7 = *(_QWORD *)(a1 + 12416); if ( v7 ) { v5 = a2 + 458; v7 += 408; sub_100089CA0(v7, (__int64)(a2 + 458)); } if ( *(_BYTE *)(a1 + 12544) != 1 || *(_BYTE *)(a1 + 12545) == 1 ) { if ( *(_BYTE *)(a1 + 12238) ) { v8 = FMODAudioEngine::sharedEngine(a3); a3 = FMODAudioEngine::pauseAllMusic(v8, 0); } else { GJBaseGameLayer::pauseAudio(a1); } v9 = FMODAudioEngine::sharedEngine(a3); v5 = a2 + 626; FMODAudioEngine::loadAudioState(v9, a2 + 626); if ( *(_BYTE *)(a1 + 12238) == 1 ) { v10 = FMODAudioEngine::sharedEngine(a3); if ( !(unsigned __int8)FMODAudioEngine::isAnyPersistentPlaying(v10) ) { v11 = FMODAudioEngine::sharedEngine(a3); FMODAudioEngine::fadeInBackgroundMusic(v11, 0.1); } } v12 = *(double *)(a1 + 928); v7 = a1; GJBaseGameLayer::processActivatedAudioTriggers(a1, v12); *(_BYTE *)(a1 + 14880) = 0; *(_BYTE *)(a1 + 13806) = 1; } v63 = a2; v13 = *(__int64 **)(a1 + 12520); v61 = a1; v60 = *(__int64 **)(a1 + 12528); if ( v13 != v60 ) { v14 = v63 + 479; do { v15 = *v13; v62 = *(_DWORD *)(*v13 + 916); v59 = &v62; v5 = &v62; v16 = sub_100099670(v14, &v62, &unk_100A04276, &v59, &v64); v7 = v15 + 1864; if ( v15 + 1864 != v16 + 24 ) { *(_DWORD *)(v15 + 1896) = *(_DWORD *)(v16 + 56); sub_100097E70(v7, *(_QWORD *)(v16 + 40), 0); *(_DWORD *)(v15 + 1936) = *(_DWORD *)(v16 + 96); v5 = *(int **)(v16 + 80); v7 = v15 + 1904; sub_100090950(v15 + 1904, v5, 0); } ++v13; } while ( v13 != v60 ); } v17 = v61; if ( *(_BYTE *)(v61 + 1010) ) { *(_BYTE *)(v61 + 1010) = 0; v7 = v17; v5 = nullptr; GJBaseGameLayer::toggleDualMode(v17, 0, 1, 0, 1); } v18 = v63; if ( *(_BYTE *)(v17 + 12238) ) { v19 = 0; } else { v20 = *(_BYTE *)(*(_QWORD *)(v17 + 3272) + 340LL); if ( *(_BYTE *)(v17 + 12448) ) { GameVariable = 0; } else { GameManager::sharedState(v7, v5, v6); GameVariable = GameManager::getGameVariable(v22, "0010"); } isJumpButtonPressed = UILayer::isJumpButtonPressed(*(_QWORD *)(v17 + 13288), 1); v19 = 0; v24 = UILayer::isJumpButtonPressed(*(_QWORD *)(v17 + 13288), 0); v25 = isJumpButtonPressed; if ( (GameVariable & 1) != 0 ) { v25 = v24; v24 = isJumpButtonPressed; } v18 = v63; if ( v25 || (v24 & (v20 ^ 1)) != 0 ) v19 = *(_BYTE *)(v63[390] + 1049LL) ^ 1; } v26 = v18[390]; *(_BYTE *)(v26 + 384) = v19; v27 = *(_QWORD *)(v17 + 3256); PlayerObject::loadFromCheckpoint(v27); if ( *(_BYTE *)(v17 + 1010) == 1 ) { if ( *(_BYTE *)(v17 + 12238) ) { v29 = 0; } else { v30 = *(_BYTE *)(*(_QWORD *)(v17 + 3272) + 340LL); if ( *(_BYTE *)(v17 + 12448) ) { v31 = 0; } else { GameManager::sharedState(v27, v26, v28); v31 = GameManager::getGameVariable(v32, "0010"); } v33 = UILayer::isJumpButtonPressed(*(_QWORD *)(v17 + 13288), 1); v29 = 0; v34 = UILayer::isJumpButtonPressed(*(_QWORD *)(v17 + 13288), 0); v35 = v33; if ( (v31 & 1) != 0 ) { v35 = v34; v34 = v33; } v18 = v63; if ( v34 || (v35 & (v30 ^ 1)) != 0 ) v29 = *(_BYTE *)(v63[391] + 1049LL) ^ 1; } *(_BYTE *)(v18[391] + 384LL) = v29; PlayerObject::loadFromCheckpoint(*(_QWORD *)(v17 + 3264)); if ( !(unsigned __int8)PlayerObject::isFlying(*(_QWORD *)(v17 + 3256)) && !*(_BYTE *)(*(_QWORD *)(v17 + 3256) + 2419LL) ) { GJBaseGameLayer::enterDualMode(v17, *(_QWORD *)(v17 + 976), 1); } } GJEffectManager::loadFromState(*(_QWORD *)(v17 + 2152), v18 + 403); v36 = v18[478]; if ( v36 && (unsigned int)sub_1007FEF90(v36) ) { v37 = 0; do { v38 = sub_1007FEFE0(v36, v37); GJBaseGameLayer::triggerGradientCommand(v17, v38); ++v37; } while ( v37 < (unsigned int)sub_1007FEF90(v36) ); } PlayLayer::processLoadedMoveActions(v17); v39 = v63; PlayLayer::loadDynamicSaveObjects(v17, v63 + 394); v40 = (__int64 *)v39[397]; for ( i = (__int64 *)v39[398]; v40 != i; v40 += 2 ) { v42 = *v40; *(_BYTE *)(v42 + 1444) = *((_BYTE *)v40 + 8); *(_BYTE *)(v42 + 1445) = *((_BYTE *)v40 + 9); } v43 = (unsigned int *)v39[400]; for ( j = (unsigned int *)v39[401]; v43 != j; v43 += 4 ) { while ( 1 ) { v49 = *(_QWORD *)v43; if ( *(_DWORD *)(*(_QWORD *)v43 + 1248LL) != 2 ) break; AnimatedGameObject::playAnimation(v49, v43[2]); v43 += 4; if ( v43 == j ) goto LABEL_51; } if ( *(_DWORD *)(v49 + 1028) == 1615 ) *(_BYTE *)(v49 + 1904) = 1; } LABEL_51: (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v17 + 1384LL))(v17, *((unsigned __int8 *)v39 + 3136) ^ 1u); GJBaseGameLayer::togglePlayerStreakBlend(v17, *(unsigned __int8 *)(v17 + 812), 1); v45 = *(_QWORD *)(v17 + 14304); if ( v45 ) { v46 = *(unsigned int **)(v45 + 56); if ( *v46 ) { v47 = *((unsigned int ***)v46 + 2); v48 = (unsigned __int64)&v47[*v46 - 1]; do { v50 = *v47; if ( !*v47 ) break; if ( (unsigned __int8)GJEffectManager::hasBeenTriggered(*(_QWORD *)(v17 + 2152), v50[229], 0) ) { GameObject::disableObject(v50); if ( (*(unsigned int (__fastcall **)(unsigned int *))(*(_QWORD *)v50 + 1800LL))(v50) == 31 ) { GJBaseGameLayer::logPickupItem(v17, v50); if ( !(unsigned __int8)GJBaseGameLayer::hasUniqueCoin(v17, v50) ) GJBaseGameLayer::pickupItem(v17, v50); } } ++v47; } while ( (unsigned __int64)v47 <= v48 ); } } for ( k = 0; k != 10000; ++k ) { if ( !(unsigned __int8)GJEffectManager::isGroupEnabled(*(_QWORD *)(v17 + 2152), k) ) { Group = GJBaseGameLayer::getGroup(v17, k); if ( Group ) { v53 = *(unsigned int **)(Group + 56); if ( *v53 ) { v54 = *((_QWORD **)v53 + 2); v55 = (unsigned __int64)&v54[*v53 - 1]; do { if ( !*v54 ) break; GameObject::groupWasDisabled(); ++v54; } while ( (unsigned __int64)v54 <= v55 ); } } } } ActiveMode = PlayerObject::getActiveMode(*(_QWORD *)(v17 + 3256)); v57 = *(_QWORD *)(v17 + 3256); GJBaseGameLayer::updateDualGround(v17, v57, ActiveMode, 1, 0.0); *(_DWORD *)(v17 + 824) = *(_DWORD *)(v17 + 816); v58 = cocos2d::CCDirector::sharedDirector(v17, v57); *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v58 + 128LL))(v58) + 56) = *(_DWORD *)(v17 + 824); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source