// // GJBaseGameLayer::visit from 0x100163800 to 0x100164f80 (6016 bytes) // // 3 xrefs: // > @ 0x1008b7130 // > @ 0x1008c0480 // > @ 0x1008c16b0 // // 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::visit(GJBaseGameLayer *a1) { GJBaseGameLayer *v1; // rbx PlayerObject *m_player1; // r14 float m_levelFlipping; // xmm0_4 __int64 v4; // rax _BOOL8 v5; // rax double v6; // xmm0_8 PlayerObject *v7; // r14 double v8; // xmm0_8 PlayerObject *m_player2; // r14 double v10; // xmm0_8 PlayerObject *v11; // r14 double v12; // xmm0_8 cocos2d::CCDirector *v13; // rsi __int64 v14; // rsi double v15; // xmm0_8 __int64 v16; // rsi double v17; // xmm0_8 char v18; // al GJGroundLayer *m_groundLayer; // rcx char v20; // r15 float m_cameraAngle; // xmm0_4 __int64 v22; // rax float v23; // xmm0_4 __int64 v24; // rax __int128 m_cameraHeightOffset_low; // xmm0 double v26; // xmm0_8 __int64 v27; // rax int v28; // xmm0_4 __int64 v29; // rax float v30; // xmm0_4 __int128 v31; // xmm1 cocos2d::CCSprite *v32; // r14 __int64 v33; // r15 float v34; // xmm0_4 float v35; // xmm0_4 float v36; // xmm0_4 __int64 v37; // rax float v38; // xmm1_4 __int64 v39; // rax float v40; // xmm0_4 float v41; // xmm0_4 float *v42; // rax cocos2d::CCSprite *v43; // r14 __int64 v44; // r15 float v45; // xmm0_4 float v46; // xmm0_4 cocos2d::CCNode *m_objectParent; // r14 __int64 v48; // rax unsigned int *v49; // rax _QWORD *v50; // rbx unsigned __int64 v51; // r12 __int64 v52; // r13 __int64 v53; // rax GJBaseGameLayer *v54; // rbx cocos2d::CCNode *m_inShaderParent; // r14 __int64 v56; // rax unsigned int *v57; // rax _QWORD *v58; // rbx unsigned __int64 v59; // r12 __int64 v60; // r13 __int64 v61; // rax GJBaseGameLayer *v62; // rbx cocos2d::CCNode *m_aboveShaderParent; // r14 __int64 v64; // rax unsigned int *v65; // rax _QWORD *v66; // rbx unsigned __int64 v67; // r12 __int64 v68; // r13 __int64 v69; // rax cocos2d::CCNode *m_uiTriggerUI; // r14 const cocos2d::CCPoint *v71; // rax float *v72; // rsi __m128 v73; // xmm0 cocos2d::CCDictionary *m_gradientLayers; // rax cocos2d::CCSprite *m_background; // r14 __int64 v76; // r15 float v77; // xmm0_4 __int64 v78; // rax float v79; // xmm1_4 __int64 v80; // rax float v81; // xmm0_4 float v82; // xmm0_4 cocos2d::CCSprite *v83; // r14 __int64 v84; // r15 float v85; // xmm0_4 float v86; // xmm0_4 ShaderLayer *m_shaderLayer; // rax char v88; // r15 double v89; // xmm0_8 __m128 v90; // xmm1 int v91; // eax __m128 v92; // rt1 __m128 v93; // xmm0 double v94; // xmm2_8 __m128 v95; // xmm1 bool v96; // zf __m128 v97; // xmm4 __m128 v98; // xmm1 __int64 *v99; // rdi __int64 v100; // rax __int64 v101; // xmm0_8 cocos2d::CCSprite *v102; // r14 char v103; // r14 cocos2d::CCNode *v104; // r14 __int64 v105; // rax unsigned int *v106; // rax _QWORD *v107; // rbx unsigned __int64 v108; // r12 __int64 v109; // r13 __int64 v110; // rax cocos2d::CCNode *v111; // r14 __int64 v112; // rax unsigned int *v113; // rax _QWORD *v114; // rbx unsigned __int64 v115; // r12 __int64 v116; // r13 __int64 v117; // rax cocos2d::CCNode *v118; // r14 __int64 v119; // rax unsigned int *v120; // rax _QWORD *v121; // rbx unsigned __int64 v122; // r12 __int64 v123; // r13 __int64 v124; // rax PlayerObject *v125; // r14 double v126; // xmm0_8 PlayerObject *v127; // r14 double v128; // xmm0_8 PlayerObject *v129; // r14 double v130; // xmm0_8 PlayerObject *v131; // rbx double v132; // xmm0_8 __int64 v133; // rax __m128 v134; // xmm0 cocos2d::CCDictElement *m_pElements; // r14 cocos2d::CCPoint v136; // xmm1_8 __int64 v137; // rax cocos2d::CCLayerColor *m_pObject; // r12 cocos2d::CCObject *begin; // rax __int64 v140; // r14 intptr_t v141; // r15 cocos2d::CCDictionary *m_parentGroupsDict; // rdi intptr_t v143; // rsi cocos2d::CCObject *v144; // r13 intptr_t v145; // r15 cocos2d::CCDictionary *v146; // rdi intptr_t v147; // rsi cocos2d::CCObject *v148; // r13 intptr_t v149; // r15 cocos2d::CCDictionary *v150; // rdi intptr_t v151; // rsi cocos2d::CCObject *v152; // r13 intptr_t v153; // r15 cocos2d::CCDictionary *v154; // rdi intptr_t v155; // rsi cocos2d::CCObject *v156; // r13 __int64 v157; // rax float v158; // xmm3_4 char m_uOrderOfArrival; // al float v160; // xmm1_4 double v161; // xmm0_8 float v162; // xmm4_4 double v163; // xmm0_8 cocos2d::CCPoint v164; // xmm2_8 __int64 *m_objectLayer; // rdi __int64 v166; // rax float v167; // xmm3_4 float v168; // xmm0_4 float v169; // xmm0_4 __int64 v170; // r15 float v171; // xmm0_4 float v172; // xmm0_4 float v173; // xmm0_4 char v174[16]; // [rsp+0h] [rbp-130h] BYREF char v175[16]; // [rsp+10h] [rbp-120h] BYREF char v176[8]; // [rsp+20h] [rbp-110h] BYREF char v177[8]; // [rsp+28h] [rbp-108h] BYREF char v178[8]; // [rsp+30h] [rbp-100h] BYREF char v179[8]; // [rsp+38h] [rbp-F8h] BYREF __m128 v180; // [rsp+40h] [rbp-F0h] _BYTE v181[16]; // [rsp+58h] [rbp-D8h] BYREF char v182[8]; // [rsp+68h] [rbp-C8h] BYREF char v183[8]; // [rsp+70h] [rbp-C0h] BYREF cocos2d::CCDictElement *v184; // [rsp+78h] [rbp-B8h] char v185[8]; // [rsp+80h] [rbp-B0h] BYREF float v186; // [rsp+88h] [rbp-A8h] int v187; // [rsp+8Ch] [rbp-A4h] char v188[8]; // [rsp+90h] [rbp-A0h] BYREF int v189; // [rsp+98h] [rbp-98h] float v190; // [rsp+9Ch] [rbp-94h] __m128 v191; // [rsp+A0h] [rbp-90h] BYREF char v192[8]; // [rsp+B0h] [rbp-80h] BYREF GJBaseGameLayer *v193; // [rsp+B8h] [rbp-78h] float v194; // [rsp+C0h] [rbp-70h] BYREF float v195; // [rsp+C4h] [rbp-6Ch] float v196; // [rsp+C8h] [rbp-68h] float v197; // [rsp+CCh] [rbp-64h] BYREF float v198; // [rsp+D0h] [rbp-60h] float v199; // [rsp+D4h] [rbp-5Ch] BYREF float v200; // [rsp+D8h] [rbp-58h] float v201; // [rsp+DCh] [rbp-54h] float v202; // [rsp+E0h] [rbp-50h] float x; // [rsp+E4h] [rbp-4Ch] float v204; // [rsp+E8h] [rbp-48h] char v205; // [rsp+EFh] [rbp-41h] __int128 v206; // [rsp+F0h] [rbp-40h] float m_cameraWidthOffset; // [rsp+104h] [rbp-2Ch] double v208; // 0:xmm0_8.8 v1 = a1; if ( a1->m_loadingProgress < 1.0 ) { cocos2d::CCNode::visit(a1); return; } m_player1 = a1->m_player1; if ( !m_player1 ) { LABEL_10: LODWORD(v4) = 0; goto LABEL_11; } m_levelFlipping = a1->m_gameState.m_levelFlipping; LODWORD(v4) = 0; if ( m_levelFlipping != 0.0 && m_levelFlipping != 1.0 ) { v5 = m_levelFlipping >= 0.5; if ( a1->m_cameraFlip != 1.0 ) LOBYTE(v5) = m_levelFlipping <= 0.5; if ( v5 ) { v6 = ((double (__fastcall *)(PlayerObject *))m_player1->getScaleX)(a1->m_player1); ((void (__fastcall *)(PlayerObject *, double))m_player1->setScaleX)( m_player1, COERCE_DOUBLE(*(_QWORD *)&v6 ^ 0x8000000080000000LL)); v7 = a1->m_player1; v8 = ((double (__fastcall *)(PlayerObject *))v7->getRotation)(v7); ((void (__fastcall *)(PlayerObject *, double))v7->setRotation)( v7, COERCE_DOUBLE(*(_QWORD *)&v8 ^ 0x8000000080000000LL)); m_player2 = a1->m_player2; v10 = ((double (__fastcall *)(PlayerObject *))m_player2->getScaleX)(m_player2); ((void (__fastcall *)(PlayerObject *, double))m_player2->setScaleX)( m_player2, COERCE_DOUBLE(*(_QWORD *)&v10 ^ 0x8000000080000000LL)); v11 = a1->m_player2; v12 = ((double (__fastcall *)(PlayerObject *))v11->getRotation)(v11); v4 = ((__int64 (__fastcall *)(PlayerObject *, double))v11->setRotation)( v11, COERCE_DOUBLE(*(_QWORD *)&v12 ^ 0x8000000080000000LL)); LOBYTE(v4) = 1; goto LABEL_11; } goto LABEL_10; } LABEL_11: v187 = v4; sub_10028D180(v181); sub_10028D180(v174); sub_10028D180(v175); v13 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v194); sub_10028CBE0(v192, v194 * 0.5, v195 * 0.5); v14 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCDirector *))a1->m_background->getPosition)( a1->m_background, v13); v15 = sub_10028CC60(v182); v16 = ((__int64 (__fastcall *)(GJGroundLayer *, __int64, double))a1->m_groundLayer2->getPosition)( a1->m_groundLayer2, v14, v15); v17 = sub_10028CC60(v176); v18 = ((__int64 (__fastcall *)(GJGroundLayer *, __int64, double))a1->m_groundLayer->isVisible)( a1->m_groundLayer, v16, v17); m_groundLayer = a1->m_groundLayer; v20 = 1; if ( v18 ) v20 = !m_groundLayer->m_showGround2; ((void (__fastcall *)(cocos2d::CCSprite *, __int64))m_groundLayer->m_ground1Sprite->setOpacity)( m_groundLayer->m_ground1Sprite, 100); m_cameraAngle = a1->m_gameState.m_cameraAngle; v193 = a1; v205 = v20; if ( m_cameraAngle == 0.0 ) { sub_10028D1A0(v181, &a1->m_background->m_obRect); v26 = sub_10028D180(&v199); v27 = ((__int64 (__fastcall *)(GJGroundLayer *, _BYTE *, double))a1->m_groundLayer->getPosition)( a1->m_groundLayer, v181, v26); v28 = 0; if ( *(float *)(v27 + 4) >= 0.0 ) v28 = *(_DWORD *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer) + 4); LODWORD(v206) = v28; v29 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background); if ( v20 ) v30 = -1.0 - *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background) + 4); else v30 = (float)(*(float *)&v206 - *(float *)(v29 + 4)) + -1.0; *(float *)&v206 = v30; m_background = a1->m_background; v76 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))m_background->getPosition)(m_background); sub_10028CBE0(&v197, 0.0, *(float *)&v206); sub_10028CCE0(&v191, v76); ((void (__fastcall *)(cocos2d::CCSprite *, __m128 *))m_background->setPosition)(m_background, &v191); v77 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v200 = v200 - (float)(*(float *)&v206 / v77); if ( ((unsigned __int8 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->isVisible)(a1->m_groundLayer2) ) { v78 = ((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->getPosition)(a1->m_groundLayer2); v79 = v195; if ( *(float *)(v78 + 4) <= v195 ) v79 = *(float *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->getPosition)(a1->m_groundLayer2) + 4); } else { v79 = v195; } *(float *)&v206 = v79; v80 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background); *(float *)&v206 = (float)(*(float *)&v206 - *(float *)(v80 + 4)) + 1.0; v81 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); m_cameraWidthOffset = v202 - (float)(*(float *)&v206 / v81); v82 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v202 = *(float *)&v206 / v82; v200 = m_cameraWidthOffset + v200; *(float *)&v206 = -1.0 - *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background); v83 = a1->m_background; v84 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v83->getPosition)(v83); sub_10028CBE0(&v197, *(float *)&v206, 0.0); sub_10028CCE0(&v191, v84); ((void (__fastcall *)(cocos2d::CCSprite *, __m128 *))v83->setPosition)(v83, &v191); v85 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v199 = (float)(*(float *)&v206 / v85) + v199; *(float *)&v206 = v194 + 2.0; v86 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v201 = *(float *)&v206 / v86; v72 = &v199; v208 = ((double (__fastcall *)(cocos2d::CCSprite *, float *))a1->m_background->setTextureRect)( a1->m_background, &v199); goto LABEL_54; } sub_10028CD20(&v191, v192); v206 = *(unsigned int *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background) + 4); v22 = ((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer); v23 = a1->m_cameraHeightOffset * -0.5; if ( v23 <= *(float *)(v22 + 4) ) v23 = *(float *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer) + 4); if ( v20 ) { v24 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background); m_cameraHeightOffset_low = LODWORD(a1->m_cameraHeightOffset); *(float *)&m_cameraHeightOffset_low = (float)(*(float *)&m_cameraHeightOffset_low * 0.5) + *(float *)(v24 + 4); v206 = m_cameraHeightOffset_low; } else { v31 = v206; *(float *)&v31 = *(float *)&v206 - v23; v206 = v31; } v32 = a1->m_background; v33 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v32->getPosition)(v32); m_cameraWidthOffset = -0.5; sub_10028CBE0(&v197, a1->m_cameraWidthOffset * -0.5, -*(float *)&v206); sub_10028CCE0(&v199, v33); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v32->setPosition)(v32, &v199); sub_10028D1A0(v181, &a1->m_background->m_obRect); sub_10028D180(&v199); m_cameraWidthOffset = m_cameraWidthOffset * a1->m_cameraWidthOffset; v34 = ((float (__fastcall *)(cocos2d::CCSprite *, _BYTE *))a1->m_background->getScale)(a1->m_background, v181); v199 = (float)(m_cameraWidthOffset / v34) + v199; m_cameraWidthOffset = a1->m_cameraWidthOffset; v35 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v201 = (float)(m_cameraWidthOffset / v35) + v201; v36 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v200 = (float)(*(float *)&v206 / v36) + v200; if ( ((unsigned __int8 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->isVisible)(a1->m_groundLayer2) ) { v37 = ((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->getPosition)(a1->m_groundLayer2); v38 = (float)(a1->m_cameraHeightOffset * 0.5) + v195; if ( *(float *)(v37 + 4) <= v38 ) v38 = *(float *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->getPosition)(a1->m_groundLayer2) + 4); } else { v38 = (float)(a1->m_cameraHeightOffset * 0.5) + v195; } *(float *)&v206 = v38; v39 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background); *(float *)&v206 = (float)(*(float *)&v206 - *(float *)(v39 + 4)) + 1.0; v40 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); m_cameraWidthOffset = v202 - (float)(*(float *)&v206 / v40); v41 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v202 = *(float *)&v206 / v41; v200 = m_cameraWidthOffset + v200; *(float *)&v206 = (float)(a1->m_cameraWidthOffset * -0.5) + -1.0; v42 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background); *(float *)&v206 = *(float *)&v206 - *v42; v43 = a1->m_background; v44 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v43->getPosition)(v43); sub_10028CBE0(v188, *(float *)&v206, 0.0); sub_10028CCE0(&v197, v44); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v43->setPosition)(v43, &v197); v45 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v199 = (float)(*(float *)&v206 / v45) + v199; *(float *)&v206 = (float)(v194 + a1->m_cameraWidthOffset) + 1.0; v46 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background); v201 = *(float *)&v206 / v46; ((void (__fastcall *)(cocos2d::CCSprite *, float *))a1->m_background->setTextureRect)(a1->m_background, &v199); if ( dword_10099C680 != a1->m_gameState.m_commandIndex ) { dword_10099C680 = a1->m_gameState.m_commandIndex; if ( v205 ) { v73 = (__m128)LODWORD(a1->m_cameraHeightOffset); v73.f32[0] = v73.f32[0] * 0.5; v180 = v73; m_gradientLayers = a1->m_gradientLayers; if ( !m_gradientLayers ) goto LABEL_29; } else { v133 = ((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer); v134 = (__m128)LODWORD(a1->m_cameraHeightOffset); v134.f32[0] = v134.f32[0] * -0.5; if ( v134.f32[0] <= *(float *)(v133 + 4) ) v134 = (__m128)*(unsigned int *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer) + 4); v73 = _mm_xor_ps(v134, (__m128)xmmword_1008150B0); v180 = v73; m_gradientLayers = a1->m_gradientLayers; if ( !m_gradientLayers ) goto LABEL_29; } m_pElements = m_gradientLayers->m_pElements; while ( 1 ) { while ( 1 ) { do { if ( !m_pElements ) goto LABEL_29; m_pObject = (cocos2d::CCLayerColor *)m_pElements->m_pObject; m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next; begin = (cocos2d::CCObject *)((__int64 (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getParent)(m_pObject); } while ( !begin ); v184 = m_pElements; v140 = *(_QWORD *)&m_pObject[1].m_unknown2; v141 = *(int *)(v140 + 1848); LOBYTE(begin) = 1; x = *(float *)&begin; LOBYTE(begin) = 1; if ( v141 > 0 ) { m_parentGroupsDict = v1->m_parentGroupsDict; v143 = v141; if ( cocos2d::CCDictionary::objectForKey(m_parentGroupsDict, v141) ) { LODWORD(begin) = 0; } else { if ( (unsigned int)v141 >= 0x270F ) v141 = 9999; v144 = v1->m_groups.__begin_[v141]; if ( v144 || (v144 = (cocos2d::CCObject *)sub_10071F9E0(m_parentGroupsDict, v143), cocos2d::CCDictionary::setObject(v1->m_groupDict, v144, v141), begin = (cocos2d::CCObject *)v1->m_groups.__begin_, *((_QWORD *)&begin->__vftable + v141) = v144, LOBYTE(begin) = 1, v144) ) { LODWORD(begin) = sub_100720070(v144); v96 = (_DWORD)begin == 1; LOBYTE(begin) = 1; if ( v96 ) { begin = (cocos2d::CCObject *)sub_1007200C0(v144, 0); LOBYTE(begin) = begin == nullptr; } } } } v196 = *(float *)&begin; v145 = *(int *)(v140 + 1852); if ( v145 > 0 ) { v146 = v1->m_parentGroupsDict; v147 = *(int *)(v140 + 1852); begin = cocos2d::CCDictionary::objectForKey(v146, v147); if ( begin ) { x = 0.0; } else { if ( (unsigned int)v145 >= 0x270F ) v145 = 9999; v148 = v1->m_groups.__begin_[v145]; if ( v148 || (v148 = (cocos2d::CCObject *)sub_10071F9E0(v146, v147), cocos2d::CCDictionary::setObject(v1->m_groupDict, v148, v145), begin = (cocos2d::CCObject *)v1->m_groups.__begin_, (*((_QWORD *)&begin->__vftable + v145) = v148) != 0) ) { LODWORD(begin) = sub_100720070(v148); if ( (_DWORD)begin == 1 ) { begin = (cocos2d::CCObject *)sub_1007200C0(v148, 0); LOBYTE(begin) = begin == nullptr; x = *(float *)&begin; } } } } v149 = *(int *)(v140 + 1856); LOBYTE(begin) = 1; v204 = *(float *)&begin; LOBYTE(begin) = 1; if ( v149 > 0 ) { v150 = v1->m_parentGroupsDict; v151 = v149; if ( cocos2d::CCDictionary::objectForKey(v150, v149) ) { LODWORD(begin) = 0; } else { if ( (unsigned int)v149 >= 0x270F ) v149 = 9999; v152 = v1->m_groups.__begin_[v149]; if ( v152 || (v152 = (cocos2d::CCObject *)sub_10071F9E0(v150, v151), cocos2d::CCDictionary::setObject(v1->m_groupDict, v152, v149), begin = (cocos2d::CCObject *)v1->m_groups.__begin_, *((_QWORD *)&begin->__vftable + v149) = v152, LOBYTE(begin) = 1, v152) ) { LODWORD(begin) = sub_100720070(v152); v96 = (_DWORD)begin == 1; LOBYTE(begin) = 1; if ( v96 ) { begin = (cocos2d::CCObject *)sub_1007200C0(v152, 0); LOBYTE(begin) = begin == nullptr; } } } } v189 = (int)begin; v153 = *(int *)(v140 + 1860); if ( v153 > 0 ) { v154 = v1->m_parentGroupsDict; v155 = *(int *)(v140 + 1860); if ( cocos2d::CCDictionary::objectForKey(v154, v155) ) { v204 = 0.0; } else { if ( (unsigned int)v153 >= 0x270F ) v153 = 9999; v156 = v1->m_groups.__begin_[v153]; if ( v156 || (v156 = (cocos2d::CCObject *)sub_10071F9E0(v154, v155), cocos2d::CCDictionary::setObject(v1->m_groupDict, v156, v153), (v1->m_groups.__begin_[v153] = (cocos2d::CCArray *)v156) != nullptr) ) { if ( (unsigned int)sub_100720070(v156) == 1 ) { v157 = sub_1007200C0(v156, 0); LOBYTE(v157) = v157 == 0; v204 = *(float *)&v157; } } } } v158 = v1->m_cameraWidthOffset * 0.5; m_uOrderOfArrival = m_pObject[1].m_uOrderOfArrival; v160 = 1.0; *(float *)&v206 = v158; if ( m_uOrderOfArrival == 1 ) { v161 = ((double (__fastcall *)(cocos2d::CCLayer *, double, float))v1->m_objectLayer->getScale)( v1->m_objectLayer, *(double *)v73.i64, 1.0); v158 = *(float *)&v206; v160 = *(float *)&v161; m_uOrderOfArrival = m_pObject[1].m_uOrderOfArrival; } v162 = 1.0; v190 = v160; if ( (m_uOrderOfArrival & 1) != 0 ) { v163 = ((double (__fastcall *)(cocos2d::CCLayer *))v1->m_objectLayer->getScale)(v1->m_objectLayer); v160 = v190; v158 = *(float *)&v206; v162 = *(float *)&v163; m_uOrderOfArrival = m_pObject[1].m_uOrderOfArrival; } v164 = (cocos2d::CCPoint)LODWORD(v1->m_cameraHeightOffset); v164.x = v164.x * 0.5; if ( (m_uOrderOfArrival & 1) != 0 ) { m_objectLayer = (__int64 *)v1->m_objectLayer; v166 = *m_objectLayer; m_cameraWidthOffset = v164.x; v186 = v162; (*(void (__fastcall **)(__int64 *, float))(v166 + 168))(m_objectLayer, 1.0); v162 = v186; v160 = v190; v164 = (cocos2d::CCPoint)LODWORD(m_cameraWidthOffset); v158 = *(float *)&v206; } v164.x = v164.x / 1.0; v167 = v158 / v160; LODWORD(v136.y) = v180.i32[1]; v136.x = v180.f32[0] / v162; if ( !*(_BYTE *)(v140 + 1864) ) break; m_cameraWidthOffset = v164.x; m_pElements = v184; *(float *)&v206 = v167; if ( LOBYTE(v196) ) { sub_10028CBE0(&v197, v167, v136.x); if ( !LOBYTE(x) ) goto LABEL_143; } else { sub_10028CC60(&v197); if ( !LOBYTE(x) ) { LABEL_143: sub_10028CC60(v188); if ( !(_BYTE)v189 ) goto LABEL_144; goto LABEL_161; } } v136 = 0; sub_10028CBE0(v188, v197 + *(float *)&v206, 0.0); if ( !(_BYTE)v189 ) { LABEL_144: sub_10028CC60(v185); v168 = *(float *)&v206; if ( LOBYTE(v204) ) goto LABEL_94; goto LABEL_162; } LABEL_161: v136 = (cocos2d::CCPoint)LODWORD(v198); v136.x = v198 + m_cameraWidthOffset; sub_10028CBE0(v185, 0.0, v198 + m_cameraWidthOffset); v168 = *(float *)&v206; if ( LOBYTE(v204) ) { LABEL_94: v136 = (cocos2d::CCPoint)LODWORD(m_cameraWidthOffset); sub_10028CBE0(v183, v168, m_cameraWidthOffset); sub_10028CCE0(v177, &v197); goto LABEL_95; } LABEL_162: sub_10028CC60(v177); LABEL_95: v137 = ((__int64 (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getPosition)(m_pObject); sub_10028CD00(v183, v137, &v197); ((void (__fastcall *)(cocos2d::CCLayerColor *, char *))m_pObject->setPosition)(m_pObject, v183); sub_10028CC60(v183); sub_10028CC60(v178); *(double *)v73.i64 = sub_10028CC60(v179); cocos2d::CCLayerColor::addToVertices(m_pObject, *(cocos2d::CCPoint *)v73.f32, v136, v164); v1 = v193; } v169 = v167; m_pElements = v184; if ( (_BYTE)v189 ) { if ( LOBYTE(v204) ) { LABEL_148: if ( LOBYTE(x) ) goto LABEL_150; LABEL_149: v136.x = 0.0; goto LABEL_150; } } else { v169 = 0.0; if ( LOBYTE(v204) ) goto LABEL_148; } v167 = 0.0; if ( !LOBYTE(x) ) goto LABEL_149; LABEL_150: v204 = v169; x = v136.x; *(float *)&v206 = v167; if ( !LOBYTE(v196) ) v164.x = 0.0; m_cameraWidthOffset = v164.x; v170 = ((__int64 (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getPosition)(m_pObject); sub_10028CBE0(v188, v204, x); sub_10028CD00(&v197, v170, v188); ((void (__fastcall *)(cocos2d::CCLayerColor *, float *))m_pObject->setPosition)(m_pObject, &v197); if ( (float)(v204 + *(float *)&v206) != 0.0 ) { v196 = v194; v171 = ((float (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleX)(m_pObject); v196 = v171 * v196; *(float *)&v206 = *(float *)&v206 + (float)(v204 + v196); v172 = ((float (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleX)(m_pObject); ((void (__fastcall *)(cocos2d::CCLayerColor *, float))m_pObject->setScaleX)( m_pObject, v172 * (float)(*(float *)&v206 / v196)); } v73.i64[0] = LODWORD(x); v73.f32[0] = x + m_cameraWidthOffset; v1 = v193; if ( (float)(x + m_cameraWidthOffset) != 0.0 ) { *(float *)&v206 = v195; v173 = ((float (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleY)(m_pObject); *(float *)&v206 = v173 * *(float *)&v206; v73.i64[0] = LODWORD(m_cameraWidthOffset); m_cameraWidthOffset = m_cameraWidthOffset + (float)(x + *(float *)&v206); v73.f32[0] = ((float (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleY)(m_pObject); v73.f32[0] = v73.f32[0] * (float)(m_cameraWidthOffset / *(float *)&v206); ((void (__fastcall *)(cocos2d::CCLayerColor *, float))m_pObject->setScaleY)(m_pObject, v73.f32[0]); } } } LABEL_29: m_objectParent = v1->m_objectParent; v48 = ((__int64 (__fastcall *)(cocos2d::CCNode *))m_objectParent->getChildren)(m_objectParent); if ( v48 ) { v49 = *(unsigned int **)(v48 + 56); if ( *v49 ) { v50 = *((_QWORD **)v49 + 2); v51 = (unsigned __int64)&v50[*v49 - 1]; do { v52 = *v50; if ( !*v50 ) break; v53 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v52 + 192LL))(*v50); sub_10028CCE0(&v197, v53); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v52 + 184LL))(v52, &v197); ++v50; } while ( (unsigned __int64)v50 <= v51 ); } } ((void (__fastcall *)(cocos2d::CCNode *, char *))m_objectParent->setPosition)(m_objectParent, v192); v54 = v193; ((void (__fastcall *)(cocos2d::CCNode *, float))m_objectParent->setRotation)( m_objectParent, v193->m_gameState.m_cameraAngle); m_inShaderParent = v54->m_inShaderParent; v56 = ((__int64 (__fastcall *)(cocos2d::CCNode *))m_inShaderParent->getChildren)(m_inShaderParent); if ( v56 ) { v57 = *(unsigned int **)(v56 + 56); if ( *v57 ) { v58 = *((_QWORD **)v57 + 2); v59 = (unsigned __int64)&v58[*v57 - 1]; do { v60 = *v58; if ( !*v58 ) break; v61 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v60 + 192LL))(*v58); sub_10028CCE0(&v197, v61); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v60 + 184LL))(v60, &v197); ++v58; } while ( (unsigned __int64)v58 <= v59 ); } } ((void (__fastcall *)(cocos2d::CCNode *, char *))m_inShaderParent->setPosition)(m_inShaderParent, v192); v62 = v193; ((void (__fastcall *)(cocos2d::CCNode *, float))m_inShaderParent->setRotation)( m_inShaderParent, v193->m_gameState.m_cameraAngle); m_aboveShaderParent = v62->m_aboveShaderParent; v64 = ((__int64 (__fastcall *)(cocos2d::CCNode *))m_aboveShaderParent->getChildren)(m_aboveShaderParent); if ( v64 ) { v65 = *(unsigned int **)(v64 + 56); if ( *v65 ) { v66 = *((_QWORD **)v65 + 2); v67 = (unsigned __int64)&v66[*v65 - 1]; do { v68 = *v66; if ( !*v66 ) break; v69 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v68 + 192LL))(*v66); sub_10028CCE0(&v197, v69); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v68 + 184LL))(v68, &v197); ++v66; } while ( (unsigned __int64)v66 <= v67 ); } } ((void (__fastcall *)(cocos2d::CCNode *, char *))m_aboveShaderParent->setPosition)(m_aboveShaderParent, v192); v1 = v193; ((void (__fastcall *)(cocos2d::CCNode *, float))m_aboveShaderParent->setRotation)( m_aboveShaderParent, v193->m_gameState.m_cameraAngle); ((void (__fastcall *)(cocos2d::CCNode *, double))v1->m_uiTriggerUI->setRotation)( v1->m_uiTriggerUI, COERCE_DOUBLE(LODWORD(v1->m_gameState.m_cameraAngle) ^ 0x8000000080000000LL)); m_uiTriggerUI = v1->m_uiTriggerUI; v71 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCNode *))m_uiTriggerUI->getParent)(m_uiTriggerUI); *(cocos2d::CCPoint *)&v208 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v197, v71); v72 = &v197; ((void (__fastcall *)(cocos2d::CCNode *, float *, double))m_uiTriggerUI->setPosition)(m_uiTriggerUI, &v197, v208); LABEL_54: sub_10028D130(&v199, v72, v208); sub_10028CC30(&v197); m_shaderLayer = v1->m_shaderLayer; v88 = v205; if ( m_shaderLayer && m_shaderLayer->m_state.m_usesShaders && m_shaderLayer->m_state.m_minBlendingLayer > 0 ) { sub_10028D1A0(&v199, &v1->m_background->m_obRect); ((void (__fastcall *)(cocos2d::CCSprite *))v1->m_background->getPosition)(v1->m_background); sub_10028CC90(); v89 = sub_10028D180(&v191); v90 = (__m128)0x42C80000u; v90.f32[0] = 100.0 / ((float (__fastcall *)(cocos2d::CCSprite *, float *, double))v1->m_background->getScale)( v1->m_background, &v199, v89); LOBYTE(v91) = 1; if ( !v88 ) { v92.i32[0] = LODWORD(v1->m_gameState.m_cameraAngle); v91 = _mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss((__m128)0LL, v92)) & 1; } v93 = _mm_moveldup_ps(v90); v94 = *(double *)&v191.i64[1]; v95 = _mm_sub_ps((__m128)v191.u64[0], v93); v96 = (_BYTE)v91 == 0; v97 = (__m128)0x3F800000u; if ( (_BYTE)v91 ) v97 = (__m128)0x40000000u; v98 = _mm_movelh_ps( v95, _mm_add_ps(_mm_mul_ps(v93, _mm_insert_ps((__m128)xmmword_1008169E0, v97, 16)), (__m128)v191.u64[1])); v191 = v98; v99 = (__int64 *)v1->m_background; v100 = *v99; v101 = 3267887104LL; if ( v96 ) v101 = 0; LODWORD(v206) = v101; (*(void (__fastcall **)(__int64 *, __m128 *, double, double, double))(v100 + 1120))( v99, &v191, *(double *)&v101, *(double *)v98.i64, v94); v102 = v1->m_background; sub_10028CBE0(v185, -100.0, *(float *)&v206); sub_10028CCE0(v188, &v197); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v102->setPosition)(v102, v188); v103 = 1; } else { v103 = 0; } if ( ((unsigned __int8 (__fastcall *)(cocos2d::CCNode *))v1->m_flashNode->isVisible)(v1->m_flashNode) ) { GJBaseGameLayer::visitWithColorFlash(v1); if ( !v103 ) goto LABEL_70; goto LABEL_69; } cocos2d::CCNode::visit(v1); if ( v103 ) { LABEL_69: ((void (__fastcall *)(cocos2d::CCSprite *, float *))v1->m_background->setTextureRect)(v1->m_background, &v199); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v1->m_background->setPosition)(v1->m_background, &v197); } LABEL_70: if ( v1->m_gameState.m_cameraAngle != 0.0 ) { v104 = v1->m_objectParent; v105 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v104->getChildren)(v104); if ( v105 ) { v106 = *(unsigned int **)(v105 + 56); if ( *v106 ) { v107 = *((_QWORD **)v106 + 2); v108 = (unsigned __int64)&v107[*v106 - 1]; do { v109 = *v107; if ( !*v107 ) break; v110 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v109 + 192LL))(*v107); sub_10028CCE0(&v191, v110); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v109 + 184LL))(v109, &v191); ++v107; } while ( (unsigned __int64)v107 <= v108 ); } } ((void (__fastcall *)(cocos2d::CCNode *, double))v104->setRotation)(v104, 0.0); ((void (__fastcall *)(cocos2d::CCNode *, __int64 *))v104->setPosition)(v104, &qword_10099EFF0); v111 = v193->m_inShaderParent; v112 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v111->getChildren)(v111); if ( v112 ) { v113 = *(unsigned int **)(v112 + 56); if ( *v113 ) { v114 = *((_QWORD **)v113 + 2); v115 = (unsigned __int64)&v114[*v113 - 1]; do { v116 = *v114; if ( !*v114 ) break; v117 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v116 + 192LL))(*v114); sub_10028CCE0(&v191, v117); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v116 + 184LL))(v116, &v191); ++v114; } while ( (unsigned __int64)v114 <= v115 ); } } ((void (__fastcall *)(cocos2d::CCNode *, double))v111->setRotation)(v111, 0.0); ((void (__fastcall *)(cocos2d::CCNode *, __int64 *))v111->setPosition)(v111, &qword_10099EFF0); v118 = v193->m_aboveShaderParent; v119 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v118->getChildren)(v118); if ( v119 ) { v120 = *(unsigned int **)(v119 + 56); if ( *v120 ) { v121 = *((_QWORD **)v120 + 2); v122 = (unsigned __int64)&v121[*v120 - 1]; do { v123 = *v121; if ( !*v121 ) break; v124 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v123 + 192LL))(*v121); sub_10028CCE0(&v191, v124); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v123 + 184LL))(v123, &v191); ++v121; } while ( (unsigned __int64)v121 <= v122 ); } } ((void (__fastcall *)(cocos2d::CCNode *, double))v118->setRotation)(v118, 0.0); ((void (__fastcall *)(cocos2d::CCNode *, __int64 *))v118->setPosition)(v118, &qword_10099EFF0); v1 = v193; ((void (__fastcall *)(cocos2d::CCNode *, double))v193->m_uiTriggerUI->setRotation)(v193->m_uiTriggerUI, 0.0); ((void (__fastcall *)(cocos2d::CCNode *, __int64 *))v1->m_uiTriggerUI->setPosition)( v1->m_uiTriggerUI, &qword_10099EFF0); } ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v1->m_background->setTextureRect)(v1->m_background, v181); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v1->m_background->setPosition)(v1->m_background, v182); if ( (_BYTE)v187 ) { v125 = v1->m_player1; v126 = ((double (__fastcall *)(PlayerObject *))v125->getScaleX)(v125); ((void (__fastcall *)(PlayerObject *, double))v125->setScaleX)( v125, COERCE_DOUBLE(*(_QWORD *)&v126 ^ 0x8000000080000000LL)); v127 = v1->m_player1; v128 = ((double (__fastcall *)(PlayerObject *))v127->getRotation)(v127); ((void (__fastcall *)(PlayerObject *, double))v127->setRotation)( v127, COERCE_DOUBLE(*(_QWORD *)&v128 ^ 0x8000000080000000LL)); v129 = v1->m_player2; v130 = ((double (__fastcall *)(PlayerObject *))v129->getScaleX)(v129); ((void (__fastcall *)(PlayerObject *, double))v129->setScaleX)( v129, COERCE_DOUBLE(*(_QWORD *)&v130 ^ 0x8000000080000000LL)); v131 = v1->m_player2; v132 = ((double (__fastcall *)(PlayerObject *))v131->getRotation)(v131); ((void (__fastcall *)(PlayerObject *, double))v131->setRotation)( v131, COERCE_DOUBLE(*(_QWORD *)&v132 ^ 0x8000000080000000LL)); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source