// // GJBaseGameLayer::update from 0x100151310 to 0x100153393 (8323 bytes) // // 3 xrefs: // > @ 0x1008b6e78 // > @ 0x1008c01c8 // > @ 0x1008c13f8 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall GJBaseGameLayer::update(GJBaseGameLayer *a1, float a2) { __m128d v2; // xmm3 cocos2d::CCDirector *v4; // rax FMODAudioEngine *v5; // rax FMODAudioEngine *v6; // rax FMODAudioEngine *v7; // rax bool m_started; // al __int128 v9; // xmm2 float m_timeWarp; // xmm0_4 bool v11; // cc double v12; // xmm0_8 double v13; // xmm1_8 __m128 v14; // xmm3 __m128 v15; // xmm4 float v16; // xmm0_4 __m128 v17; // xmm0 cocos2d::CCArray *m_indicatorSprites; // rax cocos2d::ccArray *data; // rax cocos2d::CCObject **arr; // r15 unsigned __int64 v21; // r12 cocos2d::CCObject *v22; // r14 __int64 v23; // rax double v24; // xmm0_8 float v25; // xmm1_4 cocos2d::CCDirector *v26; // rax double v27; // xmm0_8 PlayerObject *m_player1; // r14 double v29; // xmm0_8 PlayerObject *m_player2; // r14 double v31; // xmm0_8 __m128 v32; // xmm2 __m128 v33; // xmm0 __m128 v34; // xmm1 __m128 v35; // xmm0 __int64 v36; // r15 double v37; // xmm0_8 double v38; // xmm3_8 double v39; // xmm2_8 double v40; // xmm1_8 std::__compressed_pair *>> *v41; // r14 int v42; // ecx double v43; // xmm0_8 double v44; // xmm3_8 std::__vector_base::pointer begin; // r12 std::__vector_base::pointer end; // r15 double m_timestamp; // xmm0_8 double v48; // xmm1_8 double v49; // xmm0_8 std::__vector_base::pointer v50; // r12 double v51; // xmm2_8 bool IsRelevant; // al _BOOL4 m_isBetweenSteps; // r15d float v54; // xmm4_4 float v55; // xmm4_4 float v56; // xmm5_4 int v57; // r15d float v58; // xmm0_4 bool v59; // r13 int *v60; // rax double m_totalTime; // xmm0_8 float m_timeModRelated; // xmm0_4 bool m_timeModRelated2; // al PlayerObject *v64; // rdi bool v65; // r12 bool v66; // cl unsigned int m_commandIndex; // eax __m128 m_timeWarp_low; // xmm0 __m128 v69; // xmm1 int v70; // edx int v71; // eax bool v72; // al unsigned __int64 m_queuedRecordedButtonsSize; // rdi std::__vector_base::pointer v74; // rdx unsigned __int64 v75; // rax unsigned __int64 v76; // rsi int v77; // r9d __int64 v78; // r8 unsigned __int64 v79; // rcx unsigned int v80; // edi int *p_m_step; // r8 __int64 v82; // rdi __int64 v83; // r9 int *v84; // rdx signed int m_pauseCounter; // eax signed int m_pauseBufferTimer; // ecx const cocos2d::CCPoint *LastPosition; // rax float v88; // xmm1_4 PlayerObject *v89; // rdi const cocos2d::CCPoint *v90; // rax GJEffectManager *m_effectManager; // r12 bool v92; // zf float v93; // xmm0_4 float v94; // xmm1_4 GJEffectManager *v95; // r15 std::__vector_base::pointer v96; // r12 std::__vector_base::pointer v97; // r15 CCMoveCNode *MoveCommandNode; // rax bool v99; // r15 std::__vector_base::pointer v100; // rdi std::__vector_base::pointer v101; // rsi unsigned __int64 v102; // rax __int64 v103; // rax __int64 v104; // rcx std::__vector_base::pointer v105; // r12 std::__vector_base::pointer v106; // r13 char v107; // al std::__vector_base::pointer v108; // rax std::__compressed_pair, void *> *>> *v109; // r13 std::__hash_node_base, void *> *>::__next_pointer next; // rdi __int128 v111; // xmm0 __int64 v112; // r15 bool m_ignoreDamage; // r15 PlayerObject *v114; // rdi PlayerObject *v115; // rsi PlayerObject *v116; // rsi PlayerObject *v117; // r15 PlayerObject *v118; // r15 double v119; // xmm0_8 float v120; // xmm0_4 std::__hash_node_base, void *> *>::__next_pointer v121; // r11 std::__hash_node_base, void *> *> *v122; // r12 unsigned __int64 value; // rsi unsigned __int64 v124; // rcx unsigned __int64 v125; // r9 std::__hash_node_base, void *> *> **v126; // r10 _QWORD *p_next; // rax std::__hash_node_base, void *> *> *v128; // r8 unsigned __int64 v129; // rax unsigned __int64 v130; // rax unsigned __int64 v131; // rax float v132; // xmm0_4 std::__hash_node_base, void *> *>::__next_pointer v133; // r15 std::__tree, int>, std::__map_value_compare, std::__value_type, int>, std::less>, true>, std::allocator, int>>>::__iter_pointer begin_node; // r15 EnhancedGameObject *v135; // r12 std::__hash_node_base, void *> *>::__next_pointer v136; // r12 std::__hash_node_base, void *> *>::__next_pointer v137; // rcx unsigned __int64 v138; // rsi unsigned __int64 v139; // r8 std::__hash_node_base, void *> *> **v140; // r9 _QWORD *v141; // rax std::__hash_node_base, void *> *> *v142; // rdi unsigned __int64 v143; // rax std::__hash_node_base, void *> *>::__next_pointer v144; // r10 unsigned __int64 v145; // rax unsigned __int64 v146; // rax std::__tree_end_node *> *left; // rax std::__tree_end_node *> *v148; // rcx std::__tree, int>, std::__map_value_compare, std::__value_type, int>, std::less>, true>, std::allocator, int>>>::__iter_pointer v149; // rdx std::__tree_end_node *> *v150; // r12 std::__tree_end_node *> **v151; // rdx std::__tree_end_node *> *v152; // rcx float m_queuedTimeWarp; // xmm0_4 int v154; // r15d __int64 v155; // rax float v156; // xmm1_4 double v157; // xmm1_8 std::__hash_node_base>, void *> *>::__next_pointer i; // r14 LabelGameObject **v159; // r15 LabelGameObject **v160; // r12 std::__hash_node_base>, void *> *>::__next_pointer j; // r14 LabelGameObject **v162; // r15 LabelGameObject **v163; // r12 PlayerObject *v164; // r14 char v165; // r13 float m_cameraShakeFactor; // xmm0_4 float v167; // xmm0_4 GJEffectManager *v168; // rdi float v169; // xmm0_4 float v170; // xmm0_4 __m128 v171; // xmm0 cocos2d::CCArray *v172; // rax cocos2d::ccArray *v173; // rax cocos2d::CCObject **v174; // r15 unsigned __int64 v175; // r12 cocos2d::CCObject *v176; // r14 __int64 v177; // rax double v178; // xmm0_8 float v179; // xmm1_4 std::__tree, SFXTriggerInstance>, std::__map_value_compare, std::__value_type, SFXTriggerInstance>, std::less>, true>, std::allocator, SFXTriggerInstance>>>::__iter_pointer v180; // r14 float m_levelFlipping; // xmm0_4 float v182; // xmm0_4 std::__hash_node_base>, void *> *>::__next_pointer v183; // r12 int v184; // r15d AudioTargetType left_high; // r12d FMODAudioEngine *v186; // rax GJBaseGameLayer *v187; // rcx GJBaseGameLayer *v188; // rax __int64 v189; // r13 FMODAudioEngine *v190; // rax _QWORD *v191; // rdi void *v192; // rax double v193; // xmm0_8 __m128 m_levelFlipping_low; // xmm0 __m128 v195; // rt1 __m128 v196; // xmm2 __m128 v197; // xmm1 cocos2d::CCDirector *v198; // rsi float *v199; // rax __int64 v200; // r14 double v201; // xmm0_8 __int64 v202; // r14 char v203[8]; // [rsp+0h] [rbp-1B0h] BYREF int *p_m_areaMovedCount; // [rsp+8h] [rbp-1A8h] GJGameState *p_m_gameState; // [rsp+10h] [rbp-1A0h] int *p_m_unked0; // [rsp+18h] [rbp-198h] std::__compressed_pair, void *> *>> *p_p1; // [rsp+20h] [rbp-190h] double v208; // [rsp+28h] [rbp-188h] std::map,std::pair> *p_m_destroyObjectValues; // [rsp+30h] [rbp-180h] std::__compressed_pair *>> *p_pair1; // [rsp+38h] [rbp-178h] __int64 v211; // [rsp+40h] [rbp-170h] double v212; // [rsp+48h] [rbp-168h] double v213; // [rsp+50h] [rbp-160h] double v214; // [rsp+58h] [rbp-158h] double v215; // [rsp+60h] [rbp-150h] double v216; // [rsp+68h] [rbp-148h] double v217; // [rsp+70h] [rbp-140h] double v218; // [rsp+78h] [rbp-138h] __m128 v219; // [rsp+80h] [rbp-130h] char v220[8]; // [rsp+98h] [rbp-118h] BYREF char v221[8]; // [rsp+A0h] [rbp-110h] BYREF std::set> *p_m_spawnTuples; // [rsp+A8h] [rbp-108h] std::__compressed_pair *>> *v223; // [rsp+B0h] [rbp-100h] double v224; // [rsp+B8h] [rbp-F8h] int v225; // [rsp+C4h] [rbp-ECh] float v226; // [rsp+C8h] [rbp-E8h] int v227; // [rsp+CCh] [rbp-E4h] double v228; // [rsp+D0h] [rbp-E0h] __int64 v229; // [rsp+D8h] [rbp-D8h] __int64 v230; // [rsp+E0h] [rbp-D0h] double v231; // [rsp+E8h] [rbp-C8h] __m128d v232; // [rsp+F0h] [rbp-C0h] double v233; // [rsp+108h] [rbp-A8h] SFXTriggerInstance __p; // [rsp+110h] [rbp-A0h] BYREF float v235; // [rsp+134h] [rbp-7Ch] float v236; // [rsp+138h] [rbp-78h] float v237; // [rsp+13Ch] [rbp-74h] double v238; // [rsp+140h] [rbp-70h] double v239; // [rsp+148h] [rbp-68h] float v240; // [rsp+154h] [rbp-5Ch] double v241; // [rsp+158h] [rbp-58h] __m128 v242; // [rsp+160h] [rbp-50h] double v243; // [rsp+178h] [rbp-38h] bool m_isDualMode; // [rsp+187h] [rbp-29h] v242.f32[0] = a2; v4 = cocos2d::CCDirector::sharedDirector(); v212 = ((double (__fastcall *)(cocos2d::CCEGLView *))v4->m_pobOpenGLView->setContentScaleFactor)(v4->m_pobOpenGLView); if ( a1->m_resumeTimer <= 0 && a1->m_audioPaused ) { v5 = FMODAudioEngine::sharedEngine(); FMODAudioEngine::resumeAllAudio(v5); v6 = FMODAudioEngine::sharedEngine(); FMODAudioEngine::resumeAllMusic(v6); v7 = FMODAudioEngine::sharedEngine(); FMOD::System::update(v7->m_system); a1->m_audioPaused = 0; } m_started = a1->m_started; if ( m_started ) { ((void (__fastcall *)(GJBaseGameLayer *, float))a1->applyTimeWarp)(a1, a1->m_gameState.m_timeWarp); m_started = a1->m_started; } v9 = v242.u32[0]; if ( m_started ) { if ( a1->m_resumeTimer > 0 ) { cocos2d::CCDirector::sharedDirector(); --a1->m_resumeTimer; m_started = a1->m_started; v9 = 0; } m_timeWarp = a1->m_gameState.m_timeWarp; v11 = m_timeWarp >= 1.0; v12 = m_timeWarp; v13 = 0.004166666666666667; if ( !v11 ) v13 = 0.004166666666666667 * v12; *(float *)&v9 = *(float *)&v9 + a1->m_extraDelta; *(double *)&v9 = *(float *)&v9; v14.i64[1] = *((_QWORD *)&v9 + 1); *(double *)v14.i64 = *(double *)&v9 / v13; v14.f32[0] = *(double *)&v9 / v13; v15 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v14), (__m128)xmmword_1008150C0); v15.f32[0] = v15.f32[0] + v14.f32[0]; v2 = _mm_cvtepi32_pd(_mm_cvttps_epi32(_mm_round_ss((__m128)0LL, v15, 11))); v2.f64[0] = v2.f64[0] * v13; a1->m_extraDelta = *(double *)&v9 - v2.f64[0]; } else { v2.f64[0] = v242.f32[0]; a1->m_extraDelta = 0.0; v12 = a1->m_gameState.m_timeWarp; } v232 = v2; v238 = v2.f64[0] / v12; if ( !m_started || a1->m_resumeTimer > 0 ) { v16 = v232.f64[0]; v242.f32[0] = v16; a1->m_gameState.m_totalTime = v232.f64[0] + a1->m_gameState.m_totalTime; a1->m_gameState.m_unkDouble3 = v238 + a1->m_gameState.m_unkDouble3; GJEffectManager::updateEffects(a1->m_effectManager, v16); PlayerObject::updateEffects(a1->m_player1, v242.f32[0]); PlayerObject::updateEffects(a1->m_player2, v242.f32[0]); GJBaseGameLayer::updateGradientLayers(a1); GJBaseGameLayer::updateShaderLayer(a1, v242.f32[0]); v17 = (__m128)v242.u32[0]; ((void (__fastcall *)(GJBaseGameLayer *, float))a1->postUpdate)(a1, v242.f32[0]); m_indicatorSprites = a1->m_indicatorSprites; if ( m_indicatorSprites ) { data = m_indicatorSprites->data; if ( data->num ) { arr = data->arr; v21 = (unsigned __int64)&arr[data->num - 1]; do { v22 = *arr; if ( !*arr ) break; v23 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v22->__vftable[6].~CCObject_0)(*arr); if ( *(_BYTE *)(v23 + 773) == 1 ) { if ( *(_DWORD *)(v23 + 1028) == 84 && a1->m_player1->m_isUpsideDown ) { v24 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v23 + 352LL))(v23); v25 = *(float *)&v24; v17 = (__m128)0x43340000u; v17.f32[0] = 180.0 - v25; } else { *(double *)v17.i64 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v23 + 352LL))(v23); v17 = _mm_xor_ps(v17, (__m128)xmmword_1008150B0); } ((void (__fastcall *)(cocos2d::CCObject *, double))v22->__vftable[4].isEqual)(v22, *(double *)v17.i64); } ++arr; } while ( (unsigned __int64)arr <= v21 ); } } GJBaseGameLayer::updateAudioVisualizer(a1); v26 = cocos2d::CCDirector::sharedDirector(); a1->m_timestamp = ((double (__fastcall *)(cocos2d::CCEGLView *))v26->m_pobOpenGLView->setContentScaleFactor)(v26->m_pobOpenGLView); return; } if ( v232.f64[0] <= 0.0 ) return; v27 = v232.f64[0]; m_player1 = a1->m_player1; m_player1->m_maybeIsColliding = 0; a1->m_player2->m_maybeIsColliding = 0; if ( !m_player1->m_isLocked ) { v29 = sub_10028CC60(&__p); ((void (__fastcall *)(PlayerObject *, SFXTriggerInstance *, double))m_player1->setPosition)(m_player1, &__p, v29); v27 = v232.f64[0]; } v239 = 60.0 * v27; if ( a1->m_gameState.m_isDualMode ) { m_player2 = a1->m_player2; if ( !m_player2->m_isLocked ) { v31 = sub_10028CC60(&__p); ((void (__fastcall *)(PlayerObject *, SFXTriggerInstance *, double))m_player2->setPosition)(m_player2, &__p, v31); } } v32.i64[0] = 1065353216; v33 = 0; v33.f32[0] = v239 / fminf(1.0, a1->m_gameState.m_timeWarp) * 4.0; v34 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v33), (__m128)xmmword_1008150C0); v34.f32[0] = v34.f32[0] + v33.f32[0]; v35 = _mm_round_ss((__m128)0LL, v34, 11); v35.f32[0] = fmaxf(v35.f32[0], 1.0); v242 = v35; v36 = (unsigned int)(int)v35.f32[0]; a1->m_jumping = 0; if ( !a1->m_unk322a && a1->m_unk3251 ) { cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&__p); a1->m_gameState.m_cameraStepDiff.x = (float)((float)(*(float *)&__p.m_groupID1 * 0.5) + -75.0) + 15.0; } a1->m_unk3251 = 0; *(_QWORD *)&v37 = 1036831949; p_m_areaMovedCount = &a1->m_areaMovedCount; sub_100153560(&a1->m_areaMovedCountDisplay, 0.1); if ( (int)v36 > 0 ) { v230 = 0; v37 = _mm_cvtepi32_pd(_mm_cvttps_epi32(v242)).f64[0]; v38 = v232.f64[0] / v37; p_m_gameState = &a1->m_gameState; v39 = v239 / v37; v40 = v238 / v37; *(float *)&v37 = v238 / v37; v213 = *(float *)&v37; v214 = *(float *)&v37 * 0.5; v239 = v39; v216 = v39 * 0.5; v233 = v38; v217 = v38 * 0.5; v238 = v40; v218 = v40 * 0.5; v231 = 60.0 * v38; v215 = 0.5 * (60.0 * v38); v227 = v36 - 1; p_m_destroyObjectValues = &a1->m_destroyObjectValues; p_pair1 = &a1->m_destroyObjectValues.__tree_.__pair1_; p_m_spawnTuples = &a1->m_spawnTuples; v223 = &a1->m_spawnTuples.__tree_.__pair1_; p_m_unked0 = &a1->m_unked0; v219.i64[0] = (__int64)&a1->m_gameState.m_stateObjects.__table_.__p1_; v41 = &a1->m_gameState.m_activatedObjectIDs.__tree_.__pair1_; *(float *)&v37 = a1->m_gameState.m_timeWarp; v229 = 0; v211 = v36; p_p1 = &a1->m_gameState.m_gameObjectPhysics.__table_.__p1_; while ( 1 ) { v226 = *(float *)&v37; a1->m_isBetweenSteps = 0; v43 = v231; *(double *)v32.i64 = v238; *(double *)v34.i64 = v233; v44 = v239; if ( a1->m_clickBetweenSteps ) { begin = a1->m_queuedButtons.__begin_; end = a1->m_queuedButtons.__end_; v43 = v231; *(double *)v32.i64 = v238; *(double *)v34.i64 = v233; v44 = v239; if ( begin != end ) { m_timestamp = a1->m_timestamp; v48 = v214 + m_timestamp; v49 = m_timestamp + v213; v50 = begin + 1; v243 = v49; v241 = v48; while ( 1 ) { v51 = v50[-1].m_timestamp; if ( v51 >= v48 && v49 > v51 ) { v242.i64[0] = *(_QWORD *)&v50[-1].m_timestamp; IsRelevant = GJBaseGameLayer::buttonIsRelevant(a1, v50 - 1); v51 = *(double *)v242.i64; v48 = v241; v49 = v243; if ( IsRelevant ) break; } if ( v51 < v49 ) { v92 = v50++ == end; if ( !v92 ) continue; } v43 = v231; *(double *)v32.i64 = v238; *(double *)v34.i64 = v233; v44 = v239; goto LABEL_50; } a1->m_isBetweenSteps = 1; v43 = v215; *(double *)v32.i64 = v218; *(double *)v34.i64 = v217; v44 = v216; } } LABEL_50: m_isBetweenSteps = a1->m_isBetweenSteps; v54 = *(double *)v32.i64; v236 = v54; v55 = *(double *)v34.i64; v56 = v44; v240 = v56; v57 = !m_isBetweenSteps; v208 = v44 * 16.0; *(float *)&v243 = v55; v242.f32[0] = v55 * 240.0; v58 = v43; v237 = v58; v225 = v227 ^ v230; v224 = *(double *)v32.i64; v228 = *(double *)v34.i64; do { v59 = (v225 | v57 ^ 1) == 0; v60 = p_m_areaMovedCount; *((_OWORD *)p_m_areaMovedCount + 2) = 0; *((_OWORD *)v60 + 1) = 0; *(_OWORD *)v60 = 0; m_totalTime = a1->m_gameState.m_totalTime + *(double *)v34.i64; a1->m_gameState.m_totalTime = m_totalTime; a1->m_gameState.m_unkDouble3 = a1->m_gameState.m_unkDouble3 + *(double *)v32.i64; if ( !a1->m_levelEndAnimationStarted && !a1->m_playerDied ) { a1->m_timePlayed = a1->m_timePlayed + v224; a1->m_tickIndex = a1->m_tickIndex - a1->m_isBetweenSteps + 2; ((void (__fastcall *)(GJBaseGameLayer *, float))a1->updateAttemptTime)(a1, v236); m_totalTime = a1->m_gameState.m_totalTime; } a1->m_player1->m_totalTime = m_totalTime; a1->m_player2->m_totalTime = m_totalTime; if ( *(float *)&v57 == 0.0 || !a1->m_isBetweenSteps ) { sub_100054D90( (__int64)p_m_destroyObjectValues, (_QWORD *)a1->m_destroyObjectValues.__tree_.__pair1_.__value_.__left_); a1->m_destroyObjectValues.__tree_.__begin_node_ = &p_pair1->__value_; *(_OWORD *)&a1->m_destroyObjectValues.__tree_.__pair1_.__value_.__left_ = 0; sub_100054D90((__int64)p_m_spawnTuples, (_QWORD *)a1->m_spawnTuples.__tree_.__pair1_.__value_.__left_); a1->m_spawnTuples.__tree_.__begin_node_ = &v223->__value_; *(_OWORD *)&a1->m_spawnTuples.__tree_.__pair1_.__value_.__left_ = 0; } GJEffectManager::updateSpawnTriggers(a1->m_effectManager, *(float *)&v243); m_timeModRelated = a1->m_gameState.m_timeModRelated; if ( m_timeModRelated != 0.0 ) { m_timeModRelated2 = a1->m_gameState.m_timeModRelated2; a1->m_gameState.m_timeModRelated = 0.0; a1->m_gameState.m_timeModRelated2 = 0; v64 = a1->m_player1; v65 = m_timeModRelated2; *(float *)&v241 = m_timeModRelated; PlayerObject::updateTimeMod(v64, m_timeModRelated, m_timeModRelated2); if ( a1->m_gameState.m_isDualMode ) PlayerObject::updateTimeMod(a1->m_player2, *(float *)&v241, v65); } ((void (__fastcall *)(GJBaseGameLayer *, float))a1->applyTimeWarp)(a1, a1->m_gameState.m_timeWarp); v11 = v236 <= 0.0; v66 = a1->m_isBetweenSteps; m_commandIndex = a1->m_gameState.m_commandIndex; a1->m_gameState.m_unkUint4 = m_commandIndex; if ( v11 ) { if ( a1->m_playerDied ) goto LABEL_83; if ( !a1->m_clickBetweenSteps ) { LABEL_70: v72 = 1; if ( !a1->m_clickOnSteps ) goto LABEL_72; } } else { m_timeWarp_low = (__m128)LODWORD(a1->m_gameState.m_timeWarp); m_timeWarp_low.f32[0] = m_timeWarp_low.f32[0] * 1000.0; v69 = _mm_or_ps(_mm_and_ps(m_timeWarp_low, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0); v69.f32[0] = v69.f32[0] + m_timeWarp_low.f32[0]; v70 = (int)_mm_round_ss((__m128)0LL, v69, 11).f32[0]; if ( v66 ) { a1->m_gameState.m_commandIndex = m_commandIndex + 1; a1->m_gameState.m_unkUint6 = (int)(float)((float)((float)v70 * 0.5) + (float)a1->m_gameState.m_unkUint6); v71 = 1; if ( a1->m_playerDied ) goto LABEL_83; } else { a1->m_gameState.m_commandIndex = m_commandIndex + 2; a1->m_gameState.m_unkUint6 += v70; v71 = 2; if ( a1->m_playerDied ) goto LABEL_83; } a1->m_gameState.m_currentProgress += v71; if ( !a1->m_clickBetweenSteps ) goto LABEL_70; } v72 = v59; LABEL_72: GJBaseGameLayer::processQueuedButtons(a1, v236, v72); m_queuedRecordedButtonsSize = a1->m_queuedRecordedButtonsSize; v74 = a1->m_queuedRecordedButtons.__begin_; v75 = a1->m_queuedRecordedButtons.__end_ - v74; v76 = v75 - m_queuedRecordedButtonsSize; if ( v75 > m_queuedRecordedButtonsSize ) { v77 = a1->m_gameState.m_unkUint4 - a1->m_currentStep; a1->m_currentStep = a1->m_gameState.m_unkUint4; v78 = m_queuedRecordedButtonsSize; v74[m_queuedRecordedButtonsSize].m_step = v77; v79 = m_queuedRecordedButtonsSize + 1; if ( v75 > m_queuedRecordedButtonsSize + 1 ) { v80 = ((_BYTE)v75 + ~(_BYTE)m_queuedRecordedButtonsSize) & 3; if ( v80 ) { p_m_step = &v74[v78 + 1].m_step; v82 = -(__int64)v80; v83 = 0; do { *p_m_step = 0; --v83; p_m_step += 4; } while ( v82 != v83 ); v79 -= v83; } if ( v76 - 2 >= 3 ) { v84 = &v74[v79 + 3].m_step; do { *(v84 - 12) = 0; *(v84 - 8) = 0; *(v84 - 4) = 0; *v84 = 0; v79 += 4LL; v84 += 16; } while ( v75 != v79 ); } LODWORD(v79) = v75; } a1->m_queuedRecordedButtonsSize = v79; } LABEL_83: m_pauseCounter = a1->m_gameState.m_pauseCounter; if ( m_pauseCounter > 0 ) { m_pauseBufferTimer = a1->m_gameState.m_pauseBufferTimer; a1->m_gameState.m_pauseBufferTimer = m_pauseBufferTimer - 1; if ( m_pauseBufferTimer <= 0 ) { a1->m_gameState.m_pauseBufferTimer = 120; a1->m_gameState.m_pauseCounter = m_pauseCounter - 1; } } PlayerObject::resetTouchedRings(a1->m_player1, 0); if ( a1->m_gameState.m_isDualMode ) PlayerObject::resetTouchedRings(a1->m_player2, 0); PlayerObject::resetCollisionLog(a1->m_player1, 0); if ( a1->m_gameState.m_isDualMode ) PlayerObject::resetCollisionLog(a1->m_player2, 0); GJEffectManager::preCollisionCheck(a1->m_effectManager); sub_100054D90((__int64)p_m_spawnTuples, (_QWORD *)a1->m_spawnTuples.__tree_.__pair1_.__value_.__left_); a1->m_spawnTuples.__tree_.__begin_node_ = &v223->__value_; *(_OWORD *)&a1->m_spawnTuples.__tree_.__pair1_.__value_.__left_ = 0; m_isDualMode = a1->m_gameState.m_isDualMode; LODWORD(v241) = *(_DWORD *)(((__int64 (__fastcall *)(PlayerObject *))a1->m_player1->getPosition)(a1->m_player1) + 4); LastPosition = GameObject::getLastPosition(a1->m_player1); v88 = *(float *)&v241 - LastPosition->y; v89 = a1->m_player1; if ( !a1->m_playerDied && fabs(v88 - v89->m_yVelocityRelated3) > v208 ) v88 = 0.0; *(float *)&v241 = v88; v235 = *(float *)((__int64 (__fastcall *)(PlayerObject *))v89->getPosition)(v89); v90 = GameObject::getLastPosition(a1->m_player1); m_effectManager = a1->m_effectManager; v92 = !a1->m_playerDied; v93 = 0.0; v94 = 0.0; if ( !a1->m_playerDied ) v94 = v235 - v90->x; v235 = *(float *)&v57; m_effectManager->m_unk780 = v94; if ( v92 ) v93 = *(float *)&v241; m_effectManager->m_unk784 = v93; _mm_storel_ps( (double *)&m_effectManager->m_unk788, _mm_xor_ps((__m128)(unsigned __int64)a1->m_gameState.m_cameraStepDiff, (__m128)xmmword_1008150B0)); m_effectManager->m_unk790 = ((float (__fastcall *)(PlayerObject *))a1->m_player1->getRotation)(a1->m_player1) - a1->m_player1->m_unkUnused3; v95 = a1->m_effectManager; v95->m_unk794 = ((float (__fastcall *)(PlayerObject *))a1->m_player2->getRotation)(a1->m_player2) - a1->m_player2->m_unkUnused3; if ( !a1->m_playerDied ) GJEffectManager::updateTimers(a1->m_effectManager, *(float *)&v243, a1->m_gameState.m_timeWarp); GJEffectManager::prepareMoveActions(a1->m_effectManager, *(float *)&v243, !v59); *(_OWORD *)p_m_unked0 = 0; v96 = a1->m_gameState.m_dynamicMoveActions.__begin_; v97 = a1->m_gameState.m_dynamicMoveActions.__end_; while ( v96 != v97 ) { MoveCommandNode = GJEffectManager::tryGetMoveCommandNode( a1->m_effectManager, v96->m_gameObject1->m_targetGroupID); if ( MoveCommandNode ) MoveCommandNode->m_unk0d1 = 1; ++v96; } GJBaseGameLayer::processDynamicObjectActions(a1, 1, *(float *)&v243); v99 = v59; GJBaseGameLayer::processTransformActions(a1, v59); GJBaseGameLayer::processRotationActions(a1); GJBaseGameLayer::processDynamicObjectActions(a1, 0, *(float *)&v243); GJBaseGameLayer::processMoveActions(a1); GJBaseGameLayer::processPlayerFollowActions(a1, *(float *)&v243); if ( a1->m_gameState.m_unkBool27 ) { v100 = a1->m_gameState.m_advanceFollowInstances.__begin_; v101 = a1->m_gameState.m_advanceFollowInstances.__end_; _BitScanReverse64(&v102, v101 - v100); v103 = (2 * ((unsigned int)v102 ^ 0x3F)) ^ 0x7ELL; *(_QWORD *)&__p.m_groupID1 = sub_10010DE30; v104 = 0; if ( v101 != v100 ) v104 = v103; sub_10016EFB0(v100, v101, &__p, v104, 1); a1->m_gameState.m_unkBool27 = 0; } v105 = a1->m_gameState.m_advanceFollowInstances.__begin_; v106 = a1->m_gameState.m_advanceFollowInstances.__end_; if ( v105 != v106 ) { while ( 1 ) { if ( v105->m_finished ) { if ( !v105->m_doStart ) goto LABEL_112; v105->m_doStart = 0; v107 = 1; } else { v107 = v105->m_started; } GJBaseGameLayer::processAdvancedFollowAction(a1, v105, v107, v242.f32[0]); LABEL_112: if ( ++v105 == v106 ) { v105 = a1->m_gameState.m_advanceFollowInstances.__begin_; v106 = a1->m_gameState.m_advanceFollowInstances.__end_; break; } } } while ( v105 != v106 ) { if ( v105->m_started ) break; ++v105; } v108 = v105 + 1; if ( v105 != v106 && &v105[1] != v106 ) { do { if ( !v108->m_started ) { v111 = *(_OWORD *)&v108->m_gameObject; *(_OWORD *)&v105->m_controlId = *(_OWORD *)&v108->m_controlId; *(_OWORD *)&v105->m_gameObject = v111; ++v105; } ++v108; } while ( v108 != v106 ); if ( v105 == a1->m_gameState.m_advanceFollowInstances.__end_ ) goto LABEL_122; LABEL_128: a1->m_gameState.m_advanceFollowInstances.__end_ = v105; v109 = p_p1; next = p_p1->__value_.__next_; if ( !p_p1->__value_.__next_ ) goto LABEL_129; while ( 1 ) { LABEL_163: v122 = next->__next_; if ( SHIDWORD(next[7].__next_) >= (signed int)a1->m_gameState.m_commandIndex ) goto LABEL_162; value = a1->m_gameState.m_gameObjectPhysics.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_; v124 = (unsigned __int64)next[1].__next_; v125 = (0x101010101010101LL * ((((value - ((value >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((value - ((value >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((value - ((value >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((value - ((value >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v125 > 1 ) { if ( v124 >= value ) { if ( (value | v124) >> 32 ) v124 %= value; else v124 = (unsigned int)v124 % (unsigned int)value; } } else { v124 &= value - 1; } v126 = a1->m_gameState.m_gameObjectPhysics.__table_.__bucket_list_.__ptr_.__value_; p_next = &v126[v124]->__next_; do { v128 = (std::__hash_node_base, void *> *> *)p_next; p_next = (_QWORD *)*p_next; } while ( p_next != (_QWORD *)next ); if ( v128 == (std::__hash_node_base, void *> *> *)v109 ) goto LABEL_180; v129 = (unsigned __int64)v128[1].__next_; if ( (unsigned int)v125 > 1 ) { if ( v129 < value ) goto LABEL_179; if ( (value | v129) >> 32 ) { v129 %= value; LABEL_179: v121 = next->__next_; if ( v129 == v124 ) goto LABEL_189; LABEL_180: if ( v122 ) { v130 = (unsigned __int64)v122[1].__next_; if ( (unsigned int)v125 > 1 ) { if ( v130 >= value ) { if ( !((value | v130) >> 32) ) { v121 = next->__next_; if ( (unsigned int)v130 % (unsigned int)value == v124 ) goto LABEL_190; goto LABEL_188; } v130 %= value; } v121 = next->__next_; if ( v130 == v124 ) goto LABEL_190; } else { v121 = next->__next_; if ( ((value - 1) & v130) == v124 ) goto LABEL_190; } } LABEL_188: v126[v124] = nullptr; v121 = next->__next_; goto LABEL_189; } v121 = next->__next_; if ( (unsigned int)v129 % (unsigned int)value != v124 ) goto LABEL_180; } else { v121 = next->__next_; if ( ((value - 1) & v129) != v124 ) goto LABEL_180; } LABEL_189: if ( !v121 ) { v121 = nullptr; goto LABEL_161; } LABEL_190: v131 = (unsigned __int64)v121[1].__next_; if ( (unsigned int)v125 > 1 ) { if ( v131 >= value ) { if ( !((value | v131) >> 32) ) { v131 = (unsigned int)v131 % (unsigned int)value; if ( v131 == v124 ) goto LABEL_161; LABEL_197: v126[v131] = v128; v121 = next->__next_; goto LABEL_161; } v131 %= value; } if ( v131 != v124 ) goto LABEL_197; } else { v131 &= value - 1; if ( v131 != v124 ) goto LABEL_197; } LABEL_161: v128->__next_ = v121; next->__next_ = nullptr; --a1->m_gameState.m_gameObjectPhysics.__table_.__p2_.__value_; operator delete(next); LABEL_162: next = v122; if ( !v122 ) goto LABEL_129; } } if ( v105 != v106 ) goto LABEL_128; LABEL_122: v109 = p_p1; next = p_p1->__value_.__next_; if ( p_p1->__value_.__next_ ) goto LABEL_163; LABEL_129: GJBaseGameLayer::processFollowActions(a1); GJBaseGameLayer::processAreaActions(a1, *(float *)&v243, v99); if ( a1->m_isEditor && a1->m_disabledObjectsCount > 0 ) { v112 = 0; do GameObject::quickUpdatePosition(a1->m_disabledObjects.__begin_[v112++]); while ( v112 < a1->m_disabledObjectsCount ); } GJEffectManager::postMoveActions(a1->m_effectManager); ((void (__fastcall *)(GJBaseGameLayer *))a1->updateVerifyDamage)(a1); GJBaseGameLayer::updateCollisionBlocks(a1); if ( !a1->m_playerDied ) { m_ignoreDamage = 1; if ( !a1->m_isEditor ) m_ignoreDamage = a1->m_ignoreDamage; v114 = a1->m_player1; *(_OWORD *)&a1->m_player2->m_maybeReverseSpeed = *(_OWORD *)&v114->m_maybeReverseSpeed; PlayerObject::updateInternalActions(v114, *(float *)&v243); if ( a1->m_gameState.m_isDualMode ) PlayerObject::updateInternalActions(a1->m_player2, *(float *)&v243); ((void (__fastcall *)(PlayerObject *, float))a1->m_player1->update)(a1->m_player1, v240); v115 = a1->m_player1; if ( (!a1->m_enable22Changes || !v115->m_isLocked) && GJBaseGameLayer::checkCollisions(a1, v115, v240, m_ignoreDamage) == 1 && a1->m_isEditor && !a1->m_ignoreDamage ) { ((void (__fastcall *)(GJBaseGameLayer *, PlayerObject *))a1->playerTookDamage)(a1, a1->m_player1); } PlayerObject::updateSpecial(a1->m_player1, *(float *)&v243); if ( m_isDualMode && a1->m_gameState.m_isDualMode ) { ((void (__fastcall *)(PlayerObject *, float))a1->m_player2->update)(a1->m_player2, v240); v116 = a1->m_player2; if ( (!a1->m_enable22Changes || !v116->m_isLocked) && GJBaseGameLayer::checkCollisions(a1, v116, v240, m_ignoreDamage) == 1 && a1->m_isEditor && !a1->m_ignoreDamage ) { ((void (__fastcall *)(GJBaseGameLayer *, PlayerObject *))a1->playerTookDamage)(a1, a1->m_player2); } PlayerObject::updateSpecial(a1->m_player2, *(float *)&v243); } a1->m_gameState.m_levelTime = v228 / a1->m_gameState.m_timeWarp + a1->m_gameState.m_levelTime; GJBaseGameLayer::checkSpawnObjects(a1); v117 = a1->m_player1; v117->m_unkUnused3 = ((float (__fastcall *)(PlayerObject *))v117->getRotation)(v117); v118 = a1->m_player2; v118->m_unkUnused3 = ((float (__fastcall *)(PlayerObject *))v118->getRotation)(v118); PlayerObject::updateRotation_1(a1->m_player1, v237); if ( a1->m_gameState.m_isDualMode ) PlayerObject::updateRotation_1(a1->m_player2, v237); ((void (__fastcall *)(PlayerObject *))a1->m_player1->getPosition)(a1->m_player1); sub_10028CC60(&__p); v119 = sub_10028CC90(); if ( a1->m_gameState.m_isDualMode ) { ((void (__fastcall *)(PlayerObject *, SFXTriggerInstance *, double))a1->m_player2->getPosition)( a1->m_player2, &__p, v119); sub_10028CC60(&__p); sub_10028CC90(); } GJBaseGameLayer::updateSavePositionObjects(a1); if ( a1->m_gameState.m_unkPoint17.y == 0.0 || a1->m_gameState.m_unkBool1 ) { v120 = (float)(*(float *)&a1->m_gameState.m_unkInt11 / a1->m_gameState.m_cameraZoom) + fmaxf( (float)((float)((float)(*(float *)&a1->m_gameState.m_unkInt11 * -0.5) / a1->m_gameState.m_cameraZoom) + *(float *)&a1->m_gameState.m_unkInt14) + a1->m_gameState.m_cameraOffset.y, 90.0); } else { *(float *)&v241 = a1->m_gameState.m_cameraPosition2.y; v132 = *(float *)(((__int64 (__fastcall *)(GJGroundLayer *, SFXTriggerInstance *))a1->m_groundLayer2->getPosition)( a1->m_groundLayer2, &__p) + 4); v120 = (float)((float)(v132 + 1.0) / a1->m_gameState.m_cameraZoom) + *(float *)&v241; } a1->m_gameState.m_unkUint17 = v120; ((void (__fastcall *)(GJBaseGameLayer *, SFXTriggerInstance *))a1->checkForEnd)(a1, &__p); a1->m_timestamp = a1->m_timestamp + v228; } GJEffectManager::postCollisionCheck(a1->m_effectManager); GJBaseGameLayer::checkRepellPlayer(a1); v133 = a1->m_gameState.m_stateObjects.__table_.__p1_.__value_.__next_; if ( v133 ) { do { while ( 1 ) { v135 = (EnhancedGameObject *)v133[3].__next_; EnhancedGameObject::updateState(v135, a1->m_gameState.m_commandIndex); if ( !v135->m_isRingPoweredOn ) break; v133 = v133->__next_; if ( !v133 ) goto LABEL_207; } ((void (__fastcall *)(EnhancedGameObject *, GJBaseGameLayer *))v135->stateSensitiveOff)(v135, a1); v136 = v133->__next_; v137 = v133[1].__next_; v138 = a1->m_gameState.m_stateObjects.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_; v139 = (0x101010101010101LL * ((((v138 - ((v138 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v138 - ((v138 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((v138 - ((v138 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v138 - ((v138 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v139 > 1 ) { if ( (unsigned __int64)v137 >= v138 ) { if ( (v138 | (unsigned __int64)v137) >> 32 ) v137 = (std::__hash_node_base, void *> *>::__next_pointer)((unsigned __int64)v137 % v138); else v137 = (std::__hash_node_base, void *> *>::__next_pointer)((unsigned int)v137 % (unsigned int)v138); } } else { v137 = (std::__hash_node_base, void *> *>::__next_pointer)((v138 - 1) & (unsigned __int64)v137); } v140 = a1->m_gameState.m_stateObjects.__table_.__bucket_list_.__ptr_.__value_; v141 = &v140[(_QWORD)v137]->__next_; do { v142 = (std::__hash_node_base, void *> *> *)v141; v141 = (_QWORD *)*v141; } while ( v141 != (_QWORD *)v133 ); if ( v142 == (std::__hash_node_base, void *> *> *)v219.i64[0] ) goto LABEL_228; v143 = (unsigned __int64)v142[1].__next_; if ( (unsigned int)v139 > 1 ) { if ( v143 < v138 ) goto LABEL_227; if ( (v138 | v143) >> 32 ) { v143 %= v138; LABEL_227: v144 = v133->__next_; if ( (std::__hash_node_base, void *> *>::__next_pointer)v143 == v137 ) goto LABEL_237; LABEL_228: if ( v136 ) { v145 = (unsigned __int64)v136[1].__next_; if ( (unsigned int)v139 > 1 ) { if ( v145 >= v138 ) { if ( !((v138 | v145) >> 32) ) { v144 = v133->__next_; if ( (std::__hash_node_base, void *> *>::__next_pointer)((unsigned int)v145 % (unsigned int)v138) == v137 ) goto LABEL_238; goto LABEL_236; } v145 %= v138; } v144 = v133->__next_; if ( (std::__hash_node_base, void *> *>::__next_pointer)v145 == v137 ) goto LABEL_238; } else { v144 = v133->__next_; if ( (std::__hash_node_base, void *> *>::__next_pointer)((v138 - 1) & v145) == v137 ) goto LABEL_238; } } LABEL_236: v140[(_QWORD)v137] = nullptr; v144 = v133->__next_; goto LABEL_237; } v144 = v133->__next_; if ( (std::__hash_node_base, void *> *>::__next_pointer)((unsigned int)v143 % (unsigned int)v138) != v137 ) goto LABEL_228; } else { v144 = v133->__next_; if ( (std::__hash_node_base, void *> *>::__next_pointer)((v138 - 1) & v143) != v137 ) goto LABEL_228; } LABEL_237: if ( !v144 ) { v144 = nullptr; goto LABEL_247; } LABEL_238: v146 = (unsigned __int64)v144[1].__next_; if ( (unsigned int)v139 <= 1 ) { v146 &= v138 - 1; if ( (std::__hash_node_base, void *> *>::__next_pointer)v146 == v137 ) goto LABEL_247; goto LABEL_245; } if ( v146 >= v138 ) { if ( !((v138 | v146) >> 32) ) { v146 = (unsigned int)v146 % (unsigned int)v138; if ( (std::__hash_node_base, void *> *>::__next_pointer)v146 == v137 ) goto LABEL_247; LABEL_245: v140[v146] = v142; v144 = v133->__next_; goto LABEL_247; } v146 %= v138; } if ( (std::__hash_node_base, void *> *>::__next_pointer)v146 != v137 ) goto LABEL_245; LABEL_247: v142->__next_ = v144; v133->__next_ = nullptr; --a1->m_gameState.m_stateObjects.__table_.__p2_.__value_; operator delete(v133); v133 = v136; } while ( v136 ); } LABEL_207: begin_node = a1->m_gameState.m_activatedObjectIDs.__tree_.__begin_node_; if ( begin_node != (std::__tree, int>, std::__map_value_compare, std::__value_type, int>, std::less>, true>, std::allocator, int>>>::__iter_pointer)v41 ) { do { left = (std::__tree_end_node *> *)begin_node[1].__left_; if ( SHIDWORD(begin_node[4].__left_) >= (signed int)a1->m_gameState.m_commandIndex ) { if ( left ) { do { v150 = left; left = (std::__tree_end_node *> *)left->__left_; } while ( left ); } else { do { v150 = (std::__tree_end_node *> *)begin_node[2].__left_; v92 = v150->__left_ == (std::__tree_end_node *>::pointer)begin_node; begin_node = v150; } while ( !v92 ); } } else { v148 = (std::__tree_end_node *> *)begin_node[1].__left_; v149 = begin_node; if ( left ) { do { v150 = v148; v148 = (std::__tree_end_node *> *)v148->__left_; } while ( v148 ); } else { do { v150 = (std::__tree_end_node *> *)v149[2].__left_; v92 = v150->__left_ == (std::__tree_end_node *>::pointer)v149; v149 = v150; } while ( !v92 ); } v151 = (std::__tree_end_node *> **)begin_node; if ( left ) { do { v152 = left; left = (std::__tree_end_node *> *)left->__left_; } while ( left ); } else { do { v152 = v151[2]; v92 = v152->__left_ == (std::__tree_end_node *>::pointer)v151; v151 = (std::__tree_end_node *> **)v152; } while ( !v92 ); } if ( a1->m_gameState.m_activatedObjectIDs.__tree_.__begin_node_ == begin_node ) a1->m_gameState.m_activatedObjectIDs.__tree_.__begin_node_ = v152; --a1->m_gameState.m_activatedObjectIDs.__tree_.__pair3_.__value_; sub_100165F60(a1->m_gameState.m_activatedObjectIDs.__tree_.__pair1_.__value_.__left_, begin_node); operator delete(begin_node); } begin_node = v150; } while ( v150 != (std::__tree_end_node *> *)v41 ); } GJGameState::updateTweenActions(p_m_gameState, *(float *)&v243); GJBaseGameLayer::updateCamera(a1, v237); ((void (__fastcall *)(GJBaseGameLayer *))a1->checkSnapshot)(a1); if ( a1->m_isPracticeMode ) PlayerObject::updateCheckpointTest(a1->m_player1); ((void (__fastcall *)(GJBaseGameLayer *))a1->processCheckpoints)(a1); v57 = 1; *(double *)v32.i64 = v224; *(double *)v34.i64 = v228; } while ( v235 == 0.0 ); m_queuedTimeWarp = a1->m_gameState.m_queuedTimeWarp; v154 = v211; if ( m_queuedTimeWarp > 0.0 ) { ((void (__fastcall *)(GJBaseGameLayer *, float, double, double))a1->updateTimeWarp)( a1, m_queuedTimeWarp, v228, v224); ((void (__fastcall *)(GJBaseGameLayer *, float))a1->applyTimeWarp)(a1, a1->m_gameState.m_timeWarp); } *(_QWORD *)&v37 = LODWORD(a1->m_gameState.m_timeWarp); if ( *(float *)&v37 == v226 ) { v42 = v230; } else { v42 = v230; v155 = (unsigned int)(v211 + ~(_DWORD)v230); if ( (int)v155 > 0 ) { v156 = (double)(int)v155 * v233; v157 = v156; v32.i64[1] = *(_QWORD *)&v232.f64[1]; *(double *)v32.i64 = v232.f64[0] - v157; v232 = (__m128d)v32; *(double *)v34.i64 = v157 + a1->m_extraDelta; *(_QWORD *)&a1->m_extraDelta = v34.i64[0]; LOBYTE(v155) = 1; v229 = v155; v42 = v154; } } v230 = (unsigned int)(v42 + 1); if ( (int)v230 >= v154 ) goto LABEL_280; } } v229 = 0; LABEL_280: if ( a1->m_isPlatformer ) GJBaseGameLayer::updateSpecialLabels(a1); GJBaseGameLayer::updateTimerLabels(a1); for ( i = a1->m_labelObjects.__table_.__p1_.__value_.__next_; i; i = i->__next_ ) { v159 = (LabelGameObject **)i[3].__next_; v160 = (LabelGameObject **)i[4].__next_; while ( v159 != v160 ) { if ( (*v159)->m_isActivated ) LabelGameObject::updateLabelIfDirty(*v159); ++v159; } } for ( j = a1->m_timeLabelObjects.__table_.__p1_.__value_.__next_; j; j = j->__next_ ) { v162 = (LabelGameObject **)j[3].__next_; v163 = (LabelGameObject **)j[4].__next_; while ( v162 != v163 ) { if ( (*v162)->m_isActivated ) LabelGameObject::updateLabelIfDirty(*v162); ++v162; } } sub_10028CC30(v220); sub_10028CC30(v221); v164 = a1->m_player1; if ( v164->m_isLocked ) { v165 = 0; } else { ((void (__fastcall *)(PlayerObject *, double, double, double))v164->getPosition)( a1->m_player1, v37, *(double *)v34.i64, *(double *)v32.i64); sub_10028CC60(&__p); v193 = sub_10028CC90(); if ( a1->m_gameState.m_isDualMode ) { ((void (__fastcall *)(PlayerObject *, SFXTriggerInstance *, double))a1->m_player2->getPosition)( a1->m_player2, &__p, v193); sub_10028CC60(&__p); sub_10028CC90(); } m_levelFlipping_low = (__m128)LODWORD(a1->m_gameState.m_levelFlipping); v165 = 0; if ( m_levelFlipping_low.f32[0] != 0.0 && m_levelFlipping_low.f32[0] != 1.0 ) { v195.i32[0] = LODWORD(a1->m_cameraFlip); v196 = _mm_cmpeq_ss((__m128)0xBF800000, v195); v197 = (__m128)0x3F800000u; v197.f32[0] = 1.0 - m_levelFlipping_low.f32[0]; v32 = _mm_or_ps(_mm_andnot_ps(v196, m_levelFlipping_low), _mm_and_ps(v197, v196)); v219 = v32; v198 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&__p); v242.i32[0] = __p.m_groupID1; v199 = (float *)((__int64 (__fastcall *)(PlayerObject *, cocos2d::CCDirector *))a1->m_player1->getPosition)( a1->m_player1, v198); v242.f32[0] = (float)((float)(v242.f32[0] / a1->m_gameState.m_cameraZoom) - (float)((float)(*v199 - a1->m_gameState.m_cameraPosition.x) + (float)(*v199 - a1->m_gameState.m_cameraPosition.x))) * v32.f32[0]; v200 = ((__int64 (__fastcall *)(PlayerObject *))a1->m_player1->getPosition)(a1->m_player1); sub_10028CBE0(v203, v242.f32[0], 0.0); sub_10028CCE0(&__p, v200); v201 = sub_10028CC90(); v165 = 1; if ( a1->m_gameState.m_isDualMode ) { v202 = ((__int64 (__fastcall *)(PlayerObject *, SFXTriggerInstance *, double))a1->m_player2->getPosition)( a1->m_player2, &__p, v201); sub_10028CBE0(v203, v242.f32[0], 0.0); sub_10028CCE0(&__p, v202); sub_10028CC90(); } } } m_cameraShakeFactor = a1->m_gameState.m_cameraShakeFactor; a1->m_gameState.m_cameraShakeEnabled = m_cameraShakeFactor > 0.0; if ( m_cameraShakeFactor > 0.0 ) { v167 = m_cameraShakeFactor - v232.f64[0]; a1->m_gameState.m_cameraShakeFactor = v167; } v168 = a1->m_effectManager; v169 = v232.f64[0]; v242.f32[0] = v169; GJEffectManager::updateEffects(v168, v169); PlayerObject::updateEffects(a1->m_player1, v242.f32[0]); PlayerObject::updateEffects(a1->m_player2, v242.f32[0]); GJBaseGameLayer::updateGradientLayers(a1); v170 = v242.f32[0]; GJBaseGameLayer::updateShaderLayer(a1, v242.f32[0]); if ( v165 ) { ((void (__fastcall *)(PlayerObject *, char *, float, double, double))a1->m_player1->setPosition)( a1->m_player1, v220, v170, 0.0, *(double *)v32.i64); if ( a1->m_gameState.m_isDualMode ) ((void (__fastcall *)(PlayerObject *, char *))a1->m_player2->setPosition)(a1->m_player2, v221); } v171 = (__m128)v242.u32[0]; ((void (__fastcall *)(GJBaseGameLayer *, float, double, double))a1->postUpdate)( a1, v242.f32[0], 0.0, *(double *)v32.i64); v172 = a1->m_indicatorSprites; if ( v172 ) { v173 = v172->data; if ( v173->num ) { v174 = v173->arr; v175 = (unsigned __int64)&v174[v173->num - 1]; do { v176 = *v174; if ( !*v174 ) break; v177 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v176->__vftable[6].~CCObject_0)(*v174); if ( *(_BYTE *)(v177 + 773) == 1 ) { if ( *(_DWORD *)(v177 + 1028) == 84 && a1->m_player1->m_isUpsideDown ) { v178 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v177 + 352LL))(v177); v179 = *(float *)&v178; v171 = (__m128)0x43340000u; v171.f32[0] = 180.0 - v179; } else { *(double *)v171.i64 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v177 + 352LL))(v177); v171 = _mm_xor_ps(v171, (__m128)xmmword_1008150B0); } ((void (__fastcall *)(cocos2d::CCObject *, double))v176->__vftable[4].isEqual)(v176, *(double *)v171.i64); } ++v174; } while ( (unsigned __int64)v174 <= v175 ); } } v180 = a1->m_gameState.m_proximityVolumeRelated.__tree_.__begin_node_; if ( v180 != (std::__tree, SFXTriggerInstance>, std::__map_value_compare, std::__value_type, SFXTriggerInstance>, std::less>, true>, std::allocator, SFXTriggerInstance>>>::__iter_pointer)&a1->m_gameState.m_proximityVolumeRelated.__tree_.__pair1_ ) { do { v184 = (int)v180[4].__left_; left_high = HIDWORD(v180[4].__left_); __p = *(SFXTriggerInstance *)&v180[5].__left_; v242.i32[0] = GJBaseGameLayer::volumeForProximityEffect(a1, &__p); v186 = FMODAudioEngine::sharedEngine(); FMODAudioEngine::setChannelVolumeMod(v186, v184, left_high, v242.f32[0]); v187 = (GJBaseGameLayer *)v180[1].__left_; if ( v187 ) { do { v188 = v187; v187 = (GJBaseGameLayer *)v187->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; } while ( v187 ); } else { do { v188 = (GJBaseGameLayer *)v180[2].__left_; v92 = v188->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable == (GJBaseGameLayer_vtbl *)v180; v180 = (std::__tree, SFXTriggerInstance>, std::__map_value_compare, std::__value_type, SFXTriggerInstance>, std::less>, true>, std::allocator, SFXTriggerInstance>>>::__iter_pointer)v188; } while ( !v92 ); } v180 = (std::__tree, SFXTriggerInstance>, std::__map_value_compare, std::__value_type, SFXTriggerInstance>, std::less>, true>, std::allocator, SFXTriggerInstance>>>::__iter_pointer)v188; } while ( v188 != (GJBaseGameLayer *)&a1->m_gameState.m_proximityVolumeRelated.__tree_.__pair1_ ); } GJBaseGameLayer::updateAudioVisualizer(a1); m_levelFlipping = a1->m_gameState.m_levelFlipping; if ( (m_levelFlipping == 0.0 || m_levelFlipping == 1.0) && a1->m_gameState.m_unkBool12 ) { PlayerObject::levelFlipFinished(a1->m_player1); if ( a1->m_gameState.m_isDualMode ) PlayerObject::levelFlipFinished(a1->m_player2); *(_WORD *)&a1->m_gameState.m_unkBool11 = 0; } v182 = v232.f64[0] + a1->m_songTriggerInterval; a1->m_songTriggerInterval = v182; if ( v182 >= 1.0 ) { a1->m_songTriggerInterval = 0.0; v183 = a1->m_gameState.m_songTriggerStateVectors.__table_.__p1_.__value_.__next_; if ( v183 ) { do { v190 = FMODAudioEngine::sharedEngine(); if ( FMODAudioEngine::isMusicPlaying_1(v190, (int)v183[2].__next_) ) { v189 = (__int64)v183->__next_; } else { v189 = (__int64)v183->__next_; sub_100056B40((__int64)&__p, (__int64 *)&a1->m_gameState.m_songTriggerStateVectors, (__int64 *)v183); v191 = *(_QWORD **)&__p.m_groupID1; *(_QWORD *)&__p.m_groupID1 = 0; if ( v191 ) { if ( LOBYTE(__p.m_sfxTriggerGameObject) == 1 ) { v192 = (void *)v191[3]; if ( v192 ) { v191[4] = v192; operator delete(v192); } } operator delete(v191); } } v183 = (std::__hash_node_base>, void *> *>::__next_pointer)v189; } while ( v189 ); } } a1->m_areaObjectsUpdated = 0; a1->m_timestamp = v212; a1->m_isBetweenSteps = 0; if ( (v229 & 1) != 0 ) ((void (__fastcall *)(GJBaseGameLayer *, double))a1->update)(a1, 0.0); }
GD Web Decomp Icon

GD Web Decomp

Raw Source