// // GJBaseGameLayer::preUpdateVisibility from 0x5ae5cc to 0x5af7b2 (4582 bytes) // // 2 xrefs: // > PlayLayer::updateVisibility @ 0x406b56 // > LevelEditorLayer::updateVisibility @ 0x462c9c // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:53:29 +0000 // int __fastcall GJBaseGameLayer::preUpdateVisibility(GJBaseGameLayer *this, float a2) { float v3; // s17 int v4; // r0 float v5; // s12 float v6; // r1 float v7; // s14 float v8; // s15 float *v9; // r9 float *v10; // r6 float *v11; // r8 OBB2D *v12; // r10 OBB2D *v13; // r10 float v14; // s15 float v15; // s14 int v16; // r2 int v17; // r3 GJGroundLayer *v18; // r7 unsigned int v19; // r0 GJGroundLayer *v20; // r7 unsigned int v21; // r0 char v22; // r2 float v23; // s14 float v24; // s15 float v25; // s19 float v26; // s20 float v27; // s21 float v28; // r0 float v29; // s23 float v30; // s22 float v31; // s15 float v32; // s15 float v33; // s15 float v34; // s15 float v35; // s15 float v36; // s23 float v37; // s15 float v38; // s15 float v39; // s15 int active; // r0 int v41; // r0 char v42; // r3 cocos2d::CCDirector *v43; // r0 cocos2d::CCDirector *v44; // r0 _DWORD *v45; // r11 int v46; // r2 int v47; // r1 _DWORD *v48; // r0 int v49; // r3 int v50; // r0 int v51; // r5 _DWORD *v52; // r9 int v53; // r8 int v54; // r10 int v55; // r6 int i; // r3 int v57; // r2 _BOOL4 v58; // r3 _DWORD *v59; // r2 int v60; // r3 _BOOL4 v61; // r3 int m; // r10 int v63; // r6 int v64; // r8 int v65; // r9 unsigned int v66; // r5 unsigned int v67; // r2 int v68; // r7 _DWORD *v69; // r3 unsigned int v70; // r0 int v71; // r1 float v72; // s15 unsigned int v73; // r5 unsigned int v74; // r1 _DWORD *v75; // r3 void *v76; // r6 void *v77; // r2 cocos2d::CCRect *v78; // r5 int v79; // r8 unsigned int v80; // r9 int v81; // r7 _DWORD *v82; // r3 float v83; // s15 unsigned int v84; // r0 int v85; // r1 int v86; // r10 unsigned __int8 *v87; // r7 cocos2d::CCRect *v88; // r5 int v89; // r3 int v90; // r5 _DWORD *v91; // r3 unsigned __int8 **v92; // r10 unsigned __int8 *v93; // r6 unsigned __int8 *v94; // t1 int v95; // r8 cocos2d::CCRect *v96; // r5 float v97; // s16 int v98; // r9 GameObject ***v99; // r0 GameObject **v100; // r7 GameObject *v101; // r6 GameObject *v102; // t1 int v103; // r3 int v104; // r2 GameObject **v105; // r3 _BYTE *v106; // r0 int v107; // r5 int v108; // r2 int v109; // r1 int v110; // r3 _DWORD *v111; // r2 int v112; // r3 int v113; // r5 int v114; // r6 _DWORD *v115; // r2 int v116; // r3 int v117; // r7 int v118; // r10 int v119; // r8 _DWORD *v120; // r2 int *v121; // r5 int *v122; // r6 int v123; // r3 int v124; // r0 int v125; // t1 int v126; // r3 int v127; // r5 cocos2d::CCNode *updated; // r0 _DWORD *v129; // r0 int v130; // r3 int v131; // r3 int v132; // r2 int v133; // r3 int v134; // r5 _DWORD *v135; // r2 cocos2d::CCNode **v136; // r5 cocos2d::CCNode **v137; // r6 cocos2d::CCNode *v138; // t1 void (__fastcall *v139)(int, unsigned int *); // r8 cocos2d::CCDirector *v140; // r0 float v141; // r0 float v142; // s16 cocos2d::CCDirector *v143; // r0 float v144; // r0 unsigned int v146; // r0 int v147; // r1 unsigned int v148; // r5 unsigned int v149; // r1 int v150; // r9 unsigned int v151; // r5 unsigned int v152; // r8 int v153; // r6 _DWORD *v154; // r3 unsigned int v155; // r0 int v156; // r1 float v157; // s15 unsigned int v158; // r5 unsigned int v159; // r1 _DWORD *v160; // r3 unsigned int v161; // r0 int v162; // r1 float v163; // s16 unsigned int v164; // r5 unsigned int v165; // r6 int v166; // r7 _DWORD *v167; // r3 unsigned int v168; // r0 int v169; // r1 float v170; // s15 unsigned int v171; // r5 unsigned int v172; // r1 _DWORD *v173; // r3 unsigned int v174; // r0 int v175; // r1 int v176; // [sp+8h] [bp-6Ch] int v177; // [sp+Ch] [bp-68h] int v178; // [sp+10h] [bp-64h] int v179; // [sp+14h] [bp-60h] int v180; // [sp+18h] [bp-5Ch] unsigned __int8 **v181; // [sp+18h] [bp-5Ch] GameObject **v182; // [sp+18h] [bp-5Ch] int v183; // [sp+1Ch] [bp-58h] int j; // [sp+20h] [bp-54h] int *v185; // [sp+20h] [bp-54h] _DWORD *v186; // [sp+20h] [bp-54h] int k; // [sp+24h] [bp-50h] int v188; // [sp+24h] [bp-50h] int v189; // [sp+28h] [bp-4Ch] _DWORD *v190; // [sp+28h] [bp-4Ch] int v191; // [sp+2Ch] [bp-48h] int v192; // [sp+2Ch] [bp-48h] int *v193; // [sp+30h] [bp-44h] _DWORD *v194; // [sp+34h] [bp-40h] int v195; // [sp+38h] [bp-3Ch] int v196; // [sp+38h] [bp-3Ch] int v197; // [sp+40h] [bp-34h] _BOOL4 v198; // [sp+44h] [bp-30h] __int16 v199; // [sp+60h] [bp-14h] BYREF char v200; // [sp+62h] [bp-12h] GameObject *v201; // [sp+64h] [bp-10h] BYREF int v202; // [sp+68h] [bp-Ch] BYREF float v203; // [sp+6Ch] [bp-8h] BYREF float v204; // [sp+70h] [bp-4h] float v205[2]; // [sp+74h] [bp+0h] BYREF _DWORD *v206; // [sp+7Ch] [bp+8h] BYREF void *v207; // [sp+88h] [bp+14h] BYREF _DWORD v208[3]; // [sp+94h] [bp+20h] BYREF float v209; // [sp+A0h] [bp+2Ch] BYREF float v210; // [sp+A4h] [bp+30h] float v211; // [sp+A8h] [bp+34h] float v212; // [sp+ACh] [bp+38h] unsigned int v213[3]; // [sp+B0h] [bp+3Ch] BYREF float v214; // [sp+BCh] [bp+48h] int v215; // [sp+C0h] [bp+4Ch] BYREF unsigned int v216; // [sp+C4h] [bp+50h] _DWORD *v217; // [sp+C8h] [bp+54h] BYREF int v218; // [sp+CCh] [bp+58h] float v219; // [sp+D0h] [bp+5Ch] cocos2d::CCDirector::sharedDirector(this); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v203); v219 = 1.0; v215 = 0; v216 = 0; v217 = nullptr; v218 = 0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v205, (GJBaseGameLayer *)((char *)this + 996)); v3 = *((float *)this + 82); if ( *((_BYTE *)this + 10612) ) { if ( !*((_BYTE *)this + 10880) ) { v3 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 609) + 84))(*((_DWORD *)this + 609))); v4 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 609) + 96))(*((_DWORD *)this + 609)); cocos2d::CCPoint::operator-(&v209, v4); cocos2d::CCPoint::operator*(v213, &v209, 1.0 / v3); cocos2d::CCPoint::operator=(v205, v213); if ( *((_BYTE *)this + 1013) ) { cocos2d::CCPoint::operator-(v213, v205, (char *)this + 1040); cocos2d::CCPoint::operator=(v205, v213); } } } v5 = v203; v6 = v205[0]; v7 = v203 / v3; v8 = v204 / v3; *((float *)this + 2721) = v203 / v3; *((float *)this + 2722) = v8; *((float *)this + 2724) = v7 * 0.5; *((float *)this + 2723) = *((float *)this + 249) + (float)(v5 * 0.5); *((_DWORD *)this + 2730) = 0; cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v209, v6, v205[1], v7, v8); v9 = (float *)((char *)this + 10848); v10 = (float *)((char *)this + 10804); v11 = (float *)((char *)this + 10808); if ( *((float *)this + 177) == 0.0 ) { *v10 = 0.0; *v11 = 0.0; *v9 = 0.0; *((_DWORD *)this + 2713) = 0; } else { if ( *((_BYTE *)this + 10856) ) { v12 = *((OBB2D **)this + 2726); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v213, v203 * 0.5, v204 * 0.5); OBB2D::calculateWithCenter(v12, (int)v213, v211, v212, *((float *)this + 178) * 0.017453); OBB2D::getBoundingRect((OBB2D *)v213, *((_DWORD *)this + 2726)); *((float *)this + 2713) = v214 - v212; *((_BYTE *)this + 10856) = 0; } v13 = *((OBB2D **)this + 2726); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v213, v203 * 0.5, v204 * 0.5); OBB2D::calculateWithCenter(v13, (int)v213, v211, v212, *((float *)this + 177) * 0.017453); OBB2D::getBoundingRect((OBB2D *)v213, *((_DWORD *)this + 2726)); v14 = v214 - v212; v15 = *(float *)&v213[2] - v211; *v9 = v214 - v212; *v10 = v15 * v3; *v11 = v14 * v3; } v16 = *((_DWORD *)this + 614); v17 = *((float *)this + 177) != 0.0; if ( *(unsigned __int8 *)(v16 + 356) != v17 ) { *(_BYTE *)(v16 + 356) = v17; *(_BYTE *)(*((_DWORD *)this + 615) + 356) = v17; v18 = *((GJGroundLayer **)this + 614); v19 = (*(int (__fastcall **)(GJGroundLayer *))(*(_DWORD *)v18 + 68))(v18); GJGroundLayer::scaleGround(v18, v19); v20 = *((GJGroundLayer **)this + 615); v21 = (*(int (__fastcall **)(GJGroundLayer *))(*(_DWORD *)v20 + 68))(v20); GJGroundLayer::scaleGround(v20, v21); } if ( *((float *)this + 177) != 0.0 && *v10 != 0.0 ) { GJBaseGameLayer::updateGroundShadows((GJGroundLayer **)this); v22 = 1; v23 = *v10 / v3; v24 = *v11 / v3; v209 = v209 - (float)(v23 * 0.5); v210 = v210 - (float)(v24 * 0.5); v211 = v211 + v23; v212 = v212 + v24; LABEL_17: *((_BYTE *)this + 10812) = v22; goto LABEL_18; } if ( *((_BYTE *)this + 10812) ) { GJGroundLayer::updateShadowXPos(*((GJGroundLayer **)this + 614), 0.0, 0.0); GJGroundLayer::updateShadows(*((GJGroundLayer **)this + 614)); GJGroundLayer::updateShadowXPos(*((GJGroundLayer **)this + 615), 0.0, 0.0); GJGroundLayer::updateShadows(*((GJGroundLayer **)this + 615)); v22 = 0; goto LABEL_17; } LABEL_18: v25 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)&v209)); v26 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)&v209)); v27 = COERCE_FLOAT(cocos2d::CCRect::getMaxY((cocos2d::CCRect *)&v209)); v28 = COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)&v209)); v29 = *((float *)this + 2856); v30 = v28; if ( v26 > 10000000.0 ) v31 = 10000000.0; else v31 = v26; if ( (float)(floorf(v31 * v29) - 1.0) <= 0.0 ) { v176 = 0; } else { v32 = 10000000.0; if ( v26 <= 10000000.0 ) v32 = v26; v176 = (int)(float)(floorf(v32 * v29) - 1.0); } v33 = 10000000.0; if ( v25 <= 10000000.0 ) v33 = v25; if ( (float)(ceilf(v33 * v29) + 1.0) <= 0.0 ) { v178 = 0; } else { v34 = 10000000.0; if ( v25 <= 10000000.0 ) v34 = v25; v178 = (int)(float)(ceilf(v34 * v29) + 1.0); } v35 = 10000000.0; v36 = *((float *)this + 2857); if ( v30 <= 10000000.0 ) v35 = v30; if ( (float)(floorf(v35 * v36) - 1.0) <= 0.0 ) { v177 = 0; } else { v37 = 10000000.0; if ( v30 <= 10000000.0 ) v37 = v30; v177 = (int)(float)(floorf(v37 * v36) - 1.0); } v38 = 10000000.0; if ( v27 <= 10000000.0 ) v38 = v27; if ( (float)(ceilf(v38 * v36) + 1.0) <= 0.0 ) { v179 = 0; } else { v39 = 10000000.0; if ( v27 <= 10000000.0 ) v39 = v27; v179 = (int)(float)(ceilf(v39 * v36) + 1.0); } GJEffectManager::activeColorForIndex(*((GJEffectManager **)this + 381), 1007); active = GJEffectManager::activeColorForIndex(*((GJEffectManager **)this + 381), 1000); v199 = active; v200 = BYTE2(active); v41 = GameToolbox::transformColor((unsigned __int8 *)&v199, 0.0, -0.2, 0.2); *((_BYTE *)this + 10928) = v41; v42 = BYTE1(v41); v43 = (cocos2d::CCDirector *)BYTE2(v41); *((_BYTE *)this + 10929) = v42; *((_BYTE *)this + 10930) = (_BYTE)v43; v44 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v43); cocos2d::CCDirector::getScreenRight(v44); v45 = (_DWORD *)((char *)this + 11292); v183 = (*((_DWORD *)this + 2824) - *((_DWORD *)this + 2823)) >> 2; v46 = *((_DWORD *)this + 2649); v193 = (int *)((char *)this + 10600); v47 = 4 * v46; while ( v46 <= *v193 && v46 < v183 ) { v48 = *(_DWORD **)(*v45 + v47); if ( v48 ) v49 = (*(_DWORD *)(*(_DWORD *)(*v45 + v47) + 4) - *v48) >> 2; else v49 = -1; v50 = *((_DWORD *)this + 2651); v51 = 4 * v50; while ( v50 <= *((_DWORD *)this + 2652) && v50 < v49 ) { v52 = *(_DWORD **)(**(_DWORD **)(*v45 + v47) + v51); if ( v52 ) { v53 = 0; v54 = *(_DWORD *)(**(_DWORD **)(*((_DWORD *)this + 2844) + v47) + v51); while ( v53 < v54 ) { v55 = *(_DWORD *)(*v52 + 4 * v53++); *(_BYTE *)(v55 + 862) = 1; } } ++v50; v51 += 4; } ++v46; v47 += 4; } for ( i = 0; i < *((_DWORD *)this + 556); ++i ) { v57 = *(_DWORD *)(*((_DWORD *)this + 553) + 4 * i); *(_BYTE *)(v57 + 862) = 1; } v58 = v183 >= v178 - 1; if ( v183 <= v176 + 1 ) v58 = 1; v198 = v58; v180 = 4 * v176; for ( j = v176; j <= v178 && j < v183; ++j ) { v59 = *(_DWORD **)(*v45 + v180); if ( v59 ) v60 = (*(_DWORD *)(*(_DWORD *)(*v45 + v180) + 4) - *v59) >> 2; else v60 = -1; v189 = v60; v191 = 4 * v177; for ( k = v177; k <= v179 && k < v189; ++k ) { v61 = v198 || v189 <= v177 + 1 || v189 >= v179 - 1; v194 = *(_DWORD **)(**(_DWORD **)(*v45 + v180) + v191); if ( v194 ) { v197 = *(_DWORD *)(**(_DWORD **)(*((_DWORD *)this + 2844) + v180) + v191); if ( !v61 ) { for ( m = 0; ; ++m ) { if ( m >= v197 ) goto LABEL_149; v63 = *(_DWORD *)(*v194 + 4 * m); v64 = *(unsigned __int8 *)(v63 + 550); if ( !*(_BYTE *)(v63 + 550) ) { v195 = *(unsigned __int8 *)(v63 + 657); if ( *(_BYTE *)(v63 + 657) ) { *(_BYTE *)(v63 + 862) = v64; GJBaseGameLayer::addToObjectsToShow(this, (GameObject *)v63); v65 = *(_DWORD *)(v63 + 744); if ( v65 <= 0 ) continue; v66 = v216; if ( v216 ) { v67 = v216 - 1; if ( ((v216 - 1) & v216) != 0 ) { v67 = v216 - 1; v68 = v65 % v216; } else { v68 = v67 & v65; } v69 = *(_DWORD **)(v215 + 4 * v68); if ( v69 ) { while ( 1 ) { v69 = (_DWORD *)*v69; if ( !v69 ) break; v70 = v69[1]; v71 = ((v216 - 1) & v216) != 0 ? v70 % v216 : v67 & v70; if ( v71 != v68 ) break; if ( v69[2] == v65 ) goto LABEL_136; } } } else { v68 = 0; } std::__hash_table,std::equal_to,std::allocator>::__construct_node_hash( (int)&v206, (int)&v215, v65, (_DWORD *)(v63 + 744)); v72 = (float)(unsigned int)(v218 + 1); if ( v72 > (float)((float)v66 * v219) ) { if ( v66 > 2 ) v64 = ((v66 - 1) & v66) == 0; } else if ( v66 ) { LABEL_109: v75 = *(_DWORD **)(v215 + 4 * v68); if ( v75 ) { *v206 = *v75; v77 = v206; goto LABEL_133; } *v206 = v217; v217 = v206; *(_DWORD *)(v215 + 4 * v68) = &v217; v76 = v206; LABEL_127: if ( *(_DWORD *)v76 ) { v84 = *(_DWORD *)(*(_DWORD *)v76 + 4); if ( ((v66 - 1) & v66) != 0 ) v85 = v84 % v66; else v85 = (v66 - 1) & v84; *(_DWORD *)(v215 + 4 * v85) = v76; } LABEL_134: ++v218; continue; } v73 = (v64 ^ 1) + 2 * v66; v74 = (unsigned int)ceilf(v72 / v219); if ( v74 < v73 ) v74 = v73; std::__hash_table,std::equal_to,std::allocator>::rehash((int)&v215, v74); v66 = v216; if ( ((v216 - 1) & v216) != 0 ) v68 = v65 % v216; else v68 = (v216 - 1) & v65; goto LABEL_109; } v78 = (cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v63 + 676))(v63); if ( v25 >= COERCE_FLOAT(cocos2d::CCRect::getMinX(v78)) && COERCE_FLOAT(cocos2d::CCRect::getMaxX(v78)) >= v26 && v27 >= COERCE_FLOAT(cocos2d::CCRect::getMinY(v78)) && COERCE_FLOAT(cocos2d::CCRect::getMaxY(v78)) >= v30 || *(_BYTE *)(v63 + 760) ) { *(_BYTE *)(v63 + 862) = 0; GJBaseGameLayer::addToObjectsToShow(this, (GameObject *)v63); v79 = *(_DWORD *)(v63 + 744); if ( v79 <= 0 ) continue; v66 = v216; if ( v216 ) { v80 = v216 - 1; if ( ((v216 - 1) & v216) != 0 ) v81 = v79 % v216; else v81 = v80 & v79; v82 = *(_DWORD **)(v215 + 4 * v81); if ( v82 ) { while ( 1 ) { v82 = (_DWORD *)*v82; if ( !v82 ) break; v146 = v82[1]; v147 = ((v216 - 1) & v216) != 0 ? v146 % v216 : v80 & v146; if ( v147 != v81 ) break; if ( v82[2] == v79 ) goto LABEL_136; } } } else { v81 = 0; } std::__hash_table,std::equal_to,std::allocator>::__construct_node_hash( (int)&v207, (int)&v215, v79, (_DWORD *)(v63 + 744)); v83 = (float)(unsigned int)(v218 + 1); if ( v83 > (float)((float)v66 * v219) ) { if ( v66 > 2 ) v195 = ((v66 - 1) & v66) == 0; } else if ( v66 ) { goto LABEL_125; } v148 = (v195 ^ 1) + 2 * v66; v149 = (unsigned int)ceilf(v83 / v219); if ( v149 < v148 ) v149 = v148; std::__hash_table,std::equal_to,std::allocator>::rehash((int)&v215, v149); v66 = v216; if ( ((v216 - 1) & v216) != 0 ) v81 = v79 % v216; else v81 = (v216 - 1) & v79; LABEL_125: v75 = *(_DWORD **)(v215 + 4 * v81); if ( !v75 ) { *(_DWORD *)v207 = v217; v217 = v207; *(_DWORD *)(v215 + 4 * v81) = &v217; v76 = v207; goto LABEL_127; } *(_DWORD *)v207 = *v75; v77 = v207; LABEL_133: *v75 = v77; goto LABEL_134; } } *(_BYTE *)(v63 + 862) = 1; LABEL_136: ; } } v86 = 0; while ( 2 ) { if ( v86 >= v197 ) goto LABEL_149; v87 = *(unsigned __int8 **)(*v194 + 4 * v86); v196 = v87[550]; if ( v87[550] || ((v88 = (cocos2d::CCRect *)(*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v87 + 676))(v87), v25 < COERCE_FLOAT(cocos2d::CCRect::getMinX(v88))) || COERCE_FLOAT(cocos2d::CCRect::getMaxX(v88)) < v26 || v27 < COERCE_FLOAT(cocos2d::CCRect::getMinY(v88)) || COERCE_FLOAT(cocos2d::CCRect::getMaxY(v88)) < v30) && !v87[760] ) { v87[862] = 1; LABEL_148: ++v86; continue; } break; } v87[862] = 0; GJBaseGameLayer::addToObjectsToShow(this, (GameObject *)v87); v150 = *((_DWORD *)v87 + 186); if ( v150 <= 0 ) goto LABEL_148; v151 = v216; if ( v216 ) { v152 = v216 - 1; if ( ((v216 - 1) & v216) != 0 ) v153 = v150 % v216; else v153 = v152 & v150; v154 = *(_DWORD **)(v215 + 4 * v153); if ( v154 ) { while ( 1 ) { v154 = (_DWORD *)*v154; if ( !v154 ) break; v155 = v154[1]; v156 = ((v216 - 1) & v216) != 0 ? v155 % v216 : v152 & v155; if ( v156 != v153 ) break; if ( v154[2] == v150 ) goto LABEL_148; } } } else { v153 = 0; } std::__hash_table,std::equal_to,std::allocator>::__construct_node_hash( (int)v208, (int)&v215, v150, (_DWORD *)v87 + 186); v157 = (float)(unsigned int)(v218 + 1); if ( v157 > (float)((float)v151 * v219) ) { if ( v151 > 2 ) v196 = ((v151 - 1) & v151) == 0; } else if ( v151 ) { LABEL_283: v160 = *(_DWORD **)(v215 + 4 * v153); if ( v160 ) { *(_DWORD *)v208[0] = *v160; *v160 = v208[0]; } else { *(_DWORD *)v208[0] = v217; v217 = (_DWORD *)v208[0]; *(_DWORD *)(v215 + 4 * v153) = &v217; if ( *(_DWORD *)v208[0] ) { v161 = *(_DWORD *)(*(_DWORD *)v208[0] + 4); if ( ((v151 - 1) & v151) != 0 ) v162 = v161 % v151; else v162 = (v151 - 1) & v161; *(_DWORD *)(v215 + 4 * v162) = v208[0]; } } ++v218; goto LABEL_148; } v158 = (v196 ^ 1) + 2 * v151; v159 = (unsigned int)ceilf(v157 / v219); if ( v159 < v158 ) v159 = v158; std::__hash_table,std::equal_to,std::allocator>::rehash((int)&v215, v159); v151 = v216; if ( ((v216 - 1) & v216) != 0 ) v153 = v150 % v216; else v153 = (v216 - 1) & v150; goto LABEL_283; } LABEL_149: v191 += 4; } v180 += 4; } v89 = *((_DWORD *)this + 2811); if ( v89 ) { v91 = *(_DWORD **)(v89 + 52); if ( *v91 ) { v92 = (unsigned __int8 **)v91[3]; v181 = &(&v92[*v91])[-1]; while ( 1 ) { do { while ( 1 ) { LABEL_160: if ( v92 > v181 ) goto LABEL_152; v94 = *v92++; v93 = v94; if ( !v94 ) goto LABEL_152; v95 = v93[550]; if ( !v93[550] ) { v96 = (cocos2d::CCRect *)(*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v93 + 676))(v93); v97 = v203; if ( v97 >= COERCE_FLOAT(cocos2d::CCRect::getMinX(v96)) && COERCE_FLOAT(cocos2d::CCRect::getMaxX(v96)) >= 0.0 ) { v163 = v204; if ( v163 >= COERCE_FLOAT(cocos2d::CCRect::getMinY(v96)) && COERCE_FLOAT(cocos2d::CCRect::getMaxY(v96)) >= 0.0 ) { break; } } if ( v93[760] ) break; } v93[862] = 1; } v93[862] = 0; GJBaseGameLayer::addToObjectsToShow(this, (GameObject *)v93); v98 = *((_DWORD *)v93 + 186); } while ( v98 <= 0 ); v164 = v216; v186 = v93 + 744; if ( v216 ) { v165 = v216 - 1; if ( ((v216 - 1) & v216) != 0 ) v166 = v98 % v216; else v166 = v165 & v98; v167 = *(_DWORD **)(v215 + 4 * v166); if ( v167 ) { while ( 1 ) { v167 = (_DWORD *)*v167; if ( !v167 ) break; v168 = v167[1]; v169 = ((v216 - 1) & v216) != 0 ? v168 % v216 : v165 & v168; if ( v169 != v166 ) break; if ( v167[2] == v98 ) goto LABEL_160; } } } else { v166 = 0; } std::__hash_table,std::equal_to,std::allocator>::__construct_node_hash( (int)v213, (int)&v215, v98, v186); v170 = (float)(unsigned int)(v218 + 1); if ( v170 > (float)((float)v164 * v219) ) { if ( v164 > 2 ) v95 = ((v164 - 1) & v164) == 0; } else if ( v164 ) { goto LABEL_320; } v171 = (v95 ^ 1) + 2 * v164; v172 = (unsigned int)ceilf(v170 / v219); if ( v172 < v171 ) v172 = v171; std::__hash_table,std::equal_to,std::allocator>::rehash((int)&v215, v172); v164 = v216; if ( ((v216 - 1) & v216) != 0 ) v166 = v98 % v216; else v166 = (v216 - 1) & v98; LABEL_320: v173 = *(_DWORD **)(v215 + 4 * v166); if ( v173 ) { *(_DWORD *)v213[0] = *v173; *v173 = v213[0]; } else { *(_DWORD *)v213[0] = v217; v217 = (_DWORD *)v213[0]; *(_DWORD *)(v215 + 4 * v166) = &v217; if ( *(_DWORD *)v213[0] ) { v174 = *(_DWORD *)(*(_DWORD *)v213[0] + 4); if ( ((v164 - 1) & v164) != 0 ) v175 = v174 % v164; else v175 = (v164 - 1) & v174; *(_DWORD *)(v215 + 4 * v175) = v213[0]; } } ++v218; } } } LABEL_152: v90 = (int)v217; *((_DWORD *)this + 551) = 0; while ( v90 ) { v213[0] = *(_DWORD *)(v90 + 8); v99 = (GameObject ***)std::unordered_map>::operator[]((int)this + 2172, v213); v100 = *v99; v182 = v99[1]; while ( v100 != v182 ) { v102 = *v100++; v101 = v102; if ( (!*((_BYTE *)v102 + 657) || *((_BYTE *)v101 + 862)) && !*((_BYTE *)v101 + 550) ) { *((_BYTE *)v101 + 862) = 0; GJBaseGameLayer::addToObjectsToShow(this, v101); v103 = *((_DWORD *)this + 551); v104 = *((_DWORD *)this + 552); v201 = v101; if ( v104 > v103 ) { *(_DWORD *)(*((_DWORD *)this + 548) + 4 * v103) = v101; } else { v105 = *((GameObject ***)this + 549); if ( v105 == *((GameObject ***)this + 550) ) { std::vector::__push_back_slow_path((int)this + 2192, &v201); } else { if ( v105 ) *v105 = v101; *((_DWORD *)this + 549) += 4; } ++*((_DWORD *)this + 552); } ++*((_DWORD *)this + 551); } } v90 = *(_DWORD *)v90; } while ( v90 < *((_DWORD *)this + 556) ) { v106 = *(_BYTE **)(*((_DWORD *)this + 553) + 4 * v90); if ( v106[862] ) (*(void (__fastcall **)(_BYTE *, _DWORD))(*(_DWORD *)v106 + 656))(v106, 0); ++v90; } v107 = 0; *((_DWORD *)this + 556) = 0; while ( v107 < *((_DWORD *)this + 551) ) { v108 = *((_DWORD *)this + 556); v109 = *((_DWORD *)this + 557); v110 = *(_DWORD *)(*((_DWORD *)this + 548) + 4 * v107); v202 = v110; if ( v109 > v108 ) { *(_DWORD *)(*((_DWORD *)this + 553) + 4 * v108) = v110; } else { v111 = *((_DWORD **)this + 554); if ( v111 == *((_DWORD **)this + 555) ) { std::vector::__push_back_slow_path((int)this + 2212, &v202); } else { if ( v111 ) *v111 = v110; *((_DWORD *)this + 554) += 4; } ++*((_DWORD *)this + 557); } ++v107; ++*((_DWORD *)this + 556); } if ( !*((_BYTE *)this + 10716) ) { v113 = *((_DWORD *)this + 2649); v185 = (int *)((char *)this + 10604); v114 = 4 * v113; while ( v113 <= *v193 && v113 < v183 ) { v115 = *(_DWORD **)(*v45 + v114); if ( v115 ) v116 = (*(_DWORD *)(*(_DWORD *)(*v45 + v114) + 4) - *v115) >> 2; else v116 = -1; v188 = v116; v117 = *v185; v118 = 4 * *v185; while ( v117 <= *((_DWORD *)this + 2652) && v117 < v188 ) { v190 = *(_DWORD **)(**(_DWORD **)(*v45 + v114) + v118); if ( v190 ) { v119 = 0; v192 = *(_DWORD *)(**(_DWORD **)(*((_DWORD *)this + 2844) + v114) + v118); while ( v119 < v192 ) { (*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*v190 + 4 * v119) + 656))( *(_DWORD *)(*v190 + 4 * v119), 0); ++v119; } } ++v117; v118 += 4; } ++v113; v114 += 4; } } v112 = *((_DWORD *)this + 2811); if ( v112 ) { v120 = *(_DWORD **)(v112 + 52); if ( *v120 ) { v121 = (int *)v120[3]; v122 = &v121[*v120 - 1]; while ( v121 <= v122 ) { v125 = *v121++; v124 = v125; if ( !v125 ) break; (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v124 + 656))(v124, 0); } } } v123 = *((_DWORD *)this + 618); if ( v123 ) { v126 = *(_DWORD *)(v123 + 52); if ( v126 ) v127 = *(_DWORD *)(v126 + 272); else v127 = 0; while ( v126 ) { v129 = *(_DWORD **)(v126 + 260); v130 = v129[132]; if ( v130 < v176 || v130 > v178 || (v131 = v129[133], v131 < v177) || v131 > v179 ) (*(void (__fastcall **)(_DWORD *, int))(*v129 + 656))(v129, 1); if ( v127 ) v132 = *(_DWORD *)(v127 + 272); else v132 = 0; v126 = v127; v127 = v132; } } updated = (cocos2d::CCNode *)cocos2d::CCDictionary::removeAllObjects(*((cocos2d::CCDictionary **)this + 618)); v133 = *((_DWORD *)this + 617); if ( v133 ) { v135 = *(_DWORD **)(v133 + 52); if ( *v135 ) { v136 = (cocos2d::CCNode **)v135[3]; v137 = &v136[*v135] + 0x3FFFFFFF; while ( v136 <= v137 ) { v138 = *v136++; updated = v138; if ( !v138 ) break; updated = (cocos2d::CCNode *)cocos2d::CCNode::updateChildIndexes(updated); } } } v134 = *((_DWORD *)this + 2715); if ( v134 ) { v139 = *(void (__fastcall **)(int, unsigned int *))(*(_DWORD *)v134 + 480); v140 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(updated); v141 = COERCE_FLOAT(cocos2d::CCDirector::getScreenScaleFactorW(v140)); v142 = (float)((float)(v141 * 480.0) / 1.8) / v3; v143 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v141)); v144 = COERCE_FLOAT(cocos2d::CCDirector::getScreenScaleFactorH(v143)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v142, (float)(v144 * 320.0) * 0.5); cocos2d::CCPoint::operator/(v213, v208, LODWORD(v3)); v139(v134, v213); } *((_BYTE *)this + 10716) = 0; *((_DWORD *)this + 2649) = v176; *((_DWORD *)this + 2650) = v178; *((_DWORD *)this + 2651) = v177; *((_DWORD *)this + 2652) = v179; return std::__hash_table,std::equal_to,std::allocator>::~__hash_table((int)&v215); }
GD Web Decomp Icon

GD Web Decomp

Raw Source