// // GJBaseGameLayer::processAreaEffects from 0x9d6e40 to 0x9d7934 (2804 bytes) // // 6 xrefs: // > GJBaseGameLayer::processAreaVisualActions @ 0x9d7964 // > GJBaseGameLayer::processAreaVisualActions @ 0x9d7988 // > GJBaseGameLayer::processAreaActions @ 0x9d7a28 // > GJBaseGameLayer::processAreaActions @ 0x9d7a48 // > GJBaseGameLayer::processAreaActions @ 0x9d7a60 // > @ 0x6a840 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:58:46 +0000 // __int64 __fastcall GJBaseGameLayer::processAreaEffects(__int64 a1, __int64 *a2, int a3, unsigned __int8 a4, float a5) { __int64 *v5; // x20 __int64 v10; // x0 __int64 v11; // x28 __int64 v12; // x22 int v13; // w20 __int64 MainObject; // x0 GameObject *v15; // x21 int v16; // w1 long double v17; // q0 __int64 v18; // x0 long double v19; // q0 int v20; // w0 float v21; // s3 float v22; // s1 float v23; // s2 float v24; // s0 float v25; // s2 float v26; // s0 float v27; // s4 float v28; // s5 float v29; // s1 int v30; // w20 float v31; // s1 float v32; // s4 float v33; // s5 float v34; // s0 int v35; // w1 int v36; // w0 float v37; // s0 float v38; // s3 int v39; // w0 int v40; // w20 int v41; // w19 int v42; // w23 int v43; // w21 int v44; // w23 int v45; // w1 cocos2d::CCObject *Group; // x20 bool v47; // w25 int v48; // w0 int v49; // w0 cocos2d::CCDirector *v50; // x0 cocos2d::CCDirector *v51; // x0 float v52; // s0 float v53; // s1 float v54; // s2 float v55; // s0 long double v56; // q0 GameObject *v57; // x20 __int64 v58; // x0 long double v59; // q0 __int64 v60; // x23 __int64 LastPosition; // x0 long double v62; // q0 int v63; // w0 int v64; // w0 int v65; // w2 float v66; // s1 float v67; // s0 float v68; // s0 int v69; // w20 double v70; // d1 float v71; // s0 double v72; // d1 float v73; // s0 float v74; // s2 float v75; // s1 float v76; // s3 float v77; // s4 float v78; // s0 float v79; // s2 float v80; // s0 float v81; // s3 int v82; // w2 int v83; // w1 GameObject **v84; // x3 int v85; // w0 float v87; // s0 float v88; // s1 __int64 v89; // kr08_8 __int64 v90; // [xsp+B8h] [xbp+98h] int v92; // [xsp+D0h] [xbp+B0h] int v93; // [xsp+D4h] [xbp+B4h] int v94; // [xsp+D8h] [xbp+B8h] int v95; // [xsp+DCh] [xbp+BCh] float v96; // [xsp+E0h] [xbp+C0h] BYREF float v97; // [xsp+E4h] [xbp+C4h] float v98; // [xsp+E8h] [xbp+C8h] BYREF __int64 v99; // [xsp+F0h] [xbp+D0h] BYREF __int64 v100; // [xsp+F8h] [xbp+D8h] BYREF __int64 v101; // [xsp+100h] [xbp+E0h] BYREF bool (__fastcall *v102)(__int64, __int64); // [xsp+108h] [xbp+E8h] BYREF GameObject *v103; // [xsp+110h] [xbp+F0h] BYREF v5 = (__int64 *)(a1 + 1600); LODWORD(v103) = a3; if ( std::__hash_table,std::equal_to,std::allocator>::find( (_QWORD *)(a1 + 1600), (int *)&v103) ) { v10 = *a2; v102 = compEnterEffectSort; std::__sort( v10, a2[1], (__int64 (__fastcall **)(__int64, __int64))&v102); LODWORD(v103) = a3; std::__hash_table,std::equal_to,std::allocator>::__erase_unique(v5, (int *)&v103); } v11 = *a2; v90 = a2[1]; if ( *a2 != v90 ) { while ( *(_BYTE *)(v11 + 196) ) { LABEL_5: v11 += 240; if ( v90 == v11 ) return _stack_chk_guard; } v12 = *(_QWORD *)(v11 + 168); EnterEffectInstance::updateTransitions((EnterEffectInstance *)v11, a5, (GJBaseGameLayer *)a1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v96); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v98); v13 = *(_DWORD *)(v12 + 1540); if ( !v13 ) v13 = *(_DWORD *)(v11 + 184); if ( v13 < 0 ) { v50 = (cocos2d::CCDirector *)(unsigned int)(v13 + 2); if ( (unsigned int)v50 <= 1 ) { if ( v13 == -2 && *(_BYTE *)(a1 + 1010) ) v57 = *(GameObject **)(a1 + 3264); else v57 = *(GameObject **)(a1 + 3256); v58 = (*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)v57 + 192LL))(v57); *(__n128 *)&v59 = cocos2d::CCPoint::operator=(&v96, v58); v60 = (*(__int64 (__fastcall **)(GameObject *, long double))(*(_QWORD *)v57 + 192LL))(v57, v59); LastPosition = GameObject::getLastPosition(v57); cocos2d::CCPoint::operator-(&v101, v60, LastPosition, v62); cocos2d::CCPoint::operator=(&v98, &v101); } else { v51 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v50); cocos2d::CCDirector::getWinSize(&v99, v51); v52 = *(float *)(a1 + 424); *(float *)&v99 = *(float *)&v99 / v52; *((float *)&v99 + 1) = *((float *)&v99 + 1) / v52; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v100, (const cocos2d::CCPoint *)&unk_155D2C8); switch ( v13 ) { case -11: v87 = *(float *)&v99; goto LABEL_116; case -10: v54 = *((float *)&v99 + 1); v55 = *(float *)&v99; v53 = 0.5; goto LABEL_67; case -9: v87 = *(float *)&v99; v88 = 0.0; goto LABEL_117; case -8: v89 = v99; goto LABEL_119; case -7: v89 = (unsigned int)v99; LABEL_119: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, *(float *)&v89 * 0.5, *((float *)&v89 + 1)); cocos2d::CCPoint::operator=(&v100, &v101); goto LABEL_68; case -6: v87 = 0.0; LABEL_116: v88 = *((float *)&v99 + 1); LABEL_117: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, v87, v88); cocos2d::CCPoint::operator=(&v100, &v101); goto LABEL_68; case -5: v54 = *((float *)&v99 + 1); v55 = 0.0; v53 = 0.5; goto LABEL_67; case -4: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, 0.0, 0.0); cocos2d::CCPoint::operator=(&v100, &v101); goto LABEL_68; default: v53 = 0.5; v54 = *((float *)&v99 + 1); v55 = *(float *)&v99 * 0.5; LABEL_67: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, v55, v54 * v53); cocos2d::CCPoint::operator=(&v100, &v101); LABEL_68: cocos2d::CCPoint::operator+(&v101, a1 + 992); *(__n128 *)&v56 = cocos2d::CCPoint::operator=(&v96, &v101); cocos2d::CCPoint::operator-(&v101, a1 + 992, a1 + 1204, v56); cocos2d::CCPoint::operator=(&v98, &v101); break; } } } else { MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)a1, v13); v15 = (GameObject *)MainObject; if ( MainObject ) { if ( (unsigned int)(a3 - 3) > 1 ) { v16 = *(_DWORD *)(a1 + 944); if ( v16 > *(_DWORD *)(MainObject + 1240) ) { if ( !*(_BYTE *)(MainObject + 1290) ) { v65 = *(_DWORD *)(MainObject + 1236); if ( v16 != v65 ) { v66 = *(double *)(MainObject + 944); v67 = *(double *)(MainObject + 952); *(float *)(MainObject + 1224) = v66; *(float *)(MainObject + 1228) = v67; *(_DWORD *)(MainObject + 1236) = *(_DWORD *)(a1 + 944); GameObject::dirtifyObjectRect(MainObject); v65 = *(_DWORD *)(a1 + 944); } if ( *((_DWORD *)v15 + 311) != v65 ) { *(_QWORD *)((char *)v15 + 988) = *((_QWORD *)v15 + 144); *((_DWORD *)v15 + 311) = *(_DWORD *)(a1 + 944); GameObject::dirtifyObjectRect((__int64)v15); } } v68 = *((float *)v15 + 167); v69 = 0; if ( v68 != 0.0 ) { v70 = *((double *)v15 + 118); *((_BYTE *)v15 + 842) = 1; v69 = 1; *((_DWORD *)v15 + 167) = 0; *((double *)v15 + 118) = v70 - v68; } v71 = *((float *)v15 + 168); if ( v71 != 0.0 ) { v72 = *((double *)v15 + 119); *((_BYTE *)v15 + 842) = 1; v69 = 1; *((_DWORD *)v15 + 168) = 0; *((double *)v15 + 119) = v72 - v71; } v73 = *((float *)v15 + 175); v74 = *((float *)v15 + 176); if ( v73 != 0.0 || v74 != 0.0 ) { v75 = *((float *)v15 + 288); v76 = *((float *)v15 + 289); v77 = *((float *)v15 + 174) - v74; *((float *)v15 + 173) = *((float *)v15 + 173) - v73; *((_DWORD *)v15 + 175) = 0; *((float *)v15 + 288) = v75 - v73; *((float *)v15 + 174) = v77; *((float *)v15 + 289) = v76 - v74; *((_DWORD *)v15 + 176) = 0; } v78 = *((float *)v15 + 170); v79 = *((float *)v15 + 172); if ( v78 != 0.0 || v79 != 0.0 ) { v80 = *((float *)v15 + 169) - v78; v81 = *((float *)v15 + 171) - v79; *((_DWORD *)v15 + 170) = 0; *((float *)v15 + 169) = v80; *((float *)v15 + 171) = v81; *((_DWORD *)v15 + 172) = 0; } *((_DWORD *)v15 + 310) = *(_DWORD *)(a1 + 944); v103 = v15; v82 = *(_DWORD *)(a1 + 3584); v83 = *(_DWORD *)(a1 + 3564); if ( v82 > v83 ) { *(_QWORD *)(*(_QWORD *)(a1 + 3400) + 8LL * v83) = v15; v83 = *(_DWORD *)(a1 + 3564); } else { v84 = *(GameObject ***)(a1 + 3408); if ( v84 == *(GameObject ***)(a1 + 3416) ) { std::vector::__push_back_slow_path(a1 + 3400, &v103); v82 = *(_DWORD *)(a1 + 3584); v83 = *(_DWORD *)(a1 + 3564); } else { if ( v84 ) { *v84 = v15; v84 = *(GameObject ***)(a1 + 3408); v82 = *(_DWORD *)(a1 + 3584); v83 = *(_DWORD *)(a1 + 3564); } *(_QWORD *)(a1 + 3408) = v84 + 1; } *(_DWORD *)(a1 + 3584) = v82 + 1; } *(_DWORD *)(a1 + 3564) = v83 + 1; if ( v69 ) (*(void (__fastcall **)(__int64, GameObject *))(*(_QWORD *)a1 + 1368LL))(a1, v15); } } (*(void (__fastcall **)(__int64 *__return_ptr, GameObject *))(*(_QWORD *)v15 + 1360LL))(&v101, v15); *(__n128 *)&v17 = cocos2d::CCPoint::operator=(&v96, &v101); (*(void (__fastcall **)(__int64 *__return_ptr, GameObject *, long double))(*(_QWORD *)v15 + 1360LL))( &v100, v15, v17); v18 = GameObject::getLastPosition(v15); cocos2d::CCPoint::operator-(&v101, &v100, v18, v19); cocos2d::CCPoint::operator=(&v98, &v101); } } v20 = (int)(float)((float)((float)(*(float *)(v11 + 24) + *(float *)(v11 + 28)) + *(float *)(v11 + 32)) + *(float *)(v11 + 36)); *(_DWORD *)(v12 + 2060) = v20; v21 = (float)v20; v22 = fabsf(*(float *)(v11 + 48)); v23 = fabsf(*(float *)(v11 + 52)); if ( v23 >= v22 ) { v25 = v96; v26 = v21 * (float)(1.0 / v22); v27 = v96 - v26; if ( (float)(v96 - v26) > 0.0 ) { LABEL_16: v28 = *(float *)(a1 + 13632); if ( v27 < 10000000.0 ) v93 = (int)(float)(v27 * v28); else v93 = (int)(float)(v28 * 10000000.0); v95 = (int)(float)(v28 * 10000000.0); v29 = v26 + v25; if ( (float)(v26 + v25) > 0.0 ) { LABEL_19: v30 = v95; if ( v29 < 10000000.0 ) v30 = (int)(float)(v29 * v28); v31 = v97; v32 = v97 - v26; if ( (float)(v97 - v26) > 0.0 ) { LABEL_22: v33 = *(float *)(a1 + 13636); if ( v32 < 10000000.0 ) v92 = (int)(float)(v32 * v33); else v92 = (int)(float)(v33 * 10000000.0); v94 = (int)(float)(v33 * 10000000.0); v34 = v26 + v31; if ( v34 > 0.0 ) { LABEL_25: v35 = v94; if ( v34 < 10000000.0 ) v35 = (int)(float)(v34 * v33); v36 = *(_DWORD *)(v12 + 1968); if ( v36 != 1 ) goto LABEL_28; goto LABEL_60; } LABEL_59: v36 = *(_DWORD *)(v12 + 1968); v35 = 0; if ( v36 != 1 ) { LABEL_28: if ( v36 == 2 ) { if ( *(_BYTE *)(v12 + 2012) ) { v93 = 0; v85 = v92; if ( *(_BYTE *)(v12 + 2020) ) v85 = 0; v92 = v85; } else { v94 = v35; v63 = v92; v93 = 0; if ( !*(_BYTE *)(v12 + 2020) ) v63 = 0; v92 = v63; } } else if ( *(_BYTE *)(v12 + 2012) ) { v92 = 0; v93 = 0; } else { v94 = v35; v95 = v30; } LABEL_31: if ( v98 != 0.0 ) *(_BYTE *)(v12 + 2056) = v98 < 0.0; *(_DWORD *)(v11 + 192) += 2; if ( !a3 ) { if ( *(float *)(v11 + 72) == 0.0 ) { *(_BYTE *)(v12 + 1900) = (unsigned __int8)&dword_0 + 1; cocos2d::ccpForAngle( &v101, (cocos2d *)((char *)&dword_0 + 1), (float)(*(float *)(v11 + 68) - 90.0) * 0.017453); cocos2d::CCPoint::operator=(v12 + 1904, &v101); v25 = v96; v31 = v97; } else { *(_BYTE *)(v12 + 1900) = 0; } } v37 = *(float *)(v11 + 32); if ( *(_DWORD *)(v12 + 1968) ) { v48 = *(_DWORD *)(v11 + 36); v38 = *(float *)(v11 + 32); *(float *)(v11 + 40) = v37; *(_DWORD *)(v11 + 44) = v48; } else { v38 = *(float *)(v11 + 40); } v39 = *(unsigned __int8 *)(v12 + 2020); v96 = v25 + v37; v97 = v31 + v38; if ( v39 ) *(float *)(v11 + 48) = -fabsf(*(float *)(v11 + 48)); v40 = *(_DWORD *)(v11 + 200); v41 = 1; if ( v40 > 0 ) v42 = 2; else v42 = 1; v43 = 0; v44 = v42 + 1; v45 = 0; if ( v40 > 0 ) { LABEL_44: Group = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex( *(cocos2d::CCArray **)(a1 + 3832), v45 + v40 - 1); goto LABEL_45; } while ( 1 ) { Group = GJBaseGameLayer::getGroup((GJBaseGameLayer *)a1, *(_DWORD *)(v11 + 180)); LABEL_45: v47 = !(v41 & 1); switch ( a3 ) { case 0: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, (const cocos2d::CCPoint *)&v96); GJBaseGameLayer::processAreaMoveGroupAction( a1, Group, v11, (float *)&v101, v93, v95, v92, v94, v43, v47); break; case 1: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, (const cocos2d::CCPoint *)&v96); GJBaseGameLayer::processAreaRotateGroupAction( a1, Group, v11, (float *)&v101, v93, v95, v92, v94, v43, v47, a4); break; case 2: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, (const cocos2d::CCPoint *)&v96); GJBaseGameLayer::processAreaTransformGroupAction( a1, Group, v11, (float *)&v101, v93, v95, v92, v94, v43, v47, a4); break; case 3: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, (const cocos2d::CCPoint *)&v96); GJBaseGameLayer::processAreaFadeGroupAction(a1, Group, v11, (float *)&v101, v47); break; case 4: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, (const cocos2d::CCPoint *)&v96); GJBaseGameLayer::processAreaTintGroupAction(a1, Group, v11, (float *)&v101, v47); break; default: break; } ++v41; v43 += cocos2d::CCArray::count(Group); if ( v41 == v44 ) goto LABEL_5; v40 = *(_DWORD *)(v11 + 200); v45 = v41 - 1; if ( v40 > 0 ) goto LABEL_44; } } LABEL_60: if ( *(_BYTE *)(v12 + 2012) ) { v92 = 0; v64 = v93; if ( *(_BYTE *)(v12 + 2020) ) v64 = 0; v93 = v64; } else { v95 = v30; v49 = v93; v92 = 0; if ( !*(_BYTE *)(v12 + 2020) ) v49 = 0; v93 = v49; } goto LABEL_31; } LABEL_58: v33 = *(float *)(a1 + 13636); v92 = 0; v34 = v26 + v31; v94 = (int)(float)(v33 * 10000000.0); if ( v34 > 0.0 ) goto LABEL_25; goto LABEL_59; } LABEL_57: v31 = v97; v30 = 0; v32 = v97 - v26; if ( (float)(v97 - v26) > 0.0 ) goto LABEL_22; goto LABEL_58; } } else { v24 = 1.0 / v23; v25 = v96; v26 = v21 * v24; v27 = v96 - v26; if ( (float)(v96 - v26) > 0.0 ) goto LABEL_16; } v28 = *(float *)(a1 + 13632); v93 = 0; v29 = v26 + v25; v95 = (int)(float)(v28 * 10000000.0); if ( (float)(v26 + v25) > 0.0 ) goto LABEL_19; goto LABEL_57; } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source