// // PlayLayer::applyCustomEnterEffect from 0x400d78 to 0x40141a (1698 bytes) // // 1 xrefs: // > PlayLayer::updateVisibility @ 0x407150 // // 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:47:24 +0000 // int __fastcall PlayLayer::applyCustomEnterEffect(PlayLayer *this, GameObject *a2, _BOOL4 a3) { float v3; // s16 const cocos2d::CCPoint *v5; // r9 __int16 v6; // r8 int v8; // r3 int v9; // s23 int v10; // r0 char v11; // r3 __int16 *v12; // r0 __int16 v13; // r2 float v14; // s22 _DWORD *CustomEnterEffects; // r0 float v16; // s18 int v17; // r5 int v18; // r6 float *v19; // r8 int v20; // r10 float v21; // s21 float v22; // s20 float v23; // s19 int v24; // r3 int v25; // r11 float v26; // s15 bool v27; // zf float v28; // s12 float v29; // s13 float v30; // s15 float v31; // s15 float v32; // s14 float v33; // s16 float v34; // s13 float v35; // s25 float v36; // s24 float v37; // r0 float v38; // s24 float v39; // s24 float v40; // s24 float v41; // s25 float v42; // s24 float v43; // r0 int active; // r0 int v45; // r3 float v46; // r1 int v47; // r2 int v48; // r3 int v49; // r0 float v50; // s15 int v51; // r0 const cocos2d::CCPoint *v52; // r0 int v53; // r3 float v54; // r1 void (__fastcall *v55)(GameObject *, int); // r3 int result; // r0 int v57; // r0 int v59; // [sp+Ch] [bp-58h] int v60; // [sp+10h] [bp-54h] int v61; // [sp+14h] [bp-50h] int hasSecondaryColor; // [sp+18h] [bp-4Ch] int v63; // [sp+1Ch] [bp-48h] int v64; // [sp+20h] [bp-44h] int v65; // [sp+28h] [bp-3Ch] BYREF int v66; // [sp+2Ch] [bp-38h] BYREF int v67; // [sp+30h] [bp-34h] float v68; // [sp+34h] [bp-30h] BYREF float v69; // [sp+38h] [bp-2Ch] float v70; // [sp+3Ch] [bp-28h] BYREF float v71; // [sp+40h] [bp-24h] float v72; // [sp+44h] [bp-20h] int v73; // [sp+48h] [bp-1Ch] float v74; // [sp+4Ch] [bp-18h] BYREF float v75; // [sp+50h] [bp-14h] int v76; // [sp+54h] [bp-10h] int v77; // [sp+58h] [bp-Ch] v5 = (PlayLayer *)((char *)this + 11860); v6 = *((_WORD *)a2 + 434); if ( a3 ) v8 = -1; else v8 = 1; v9 = v8; v63 = v6; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v68, v5); v10 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 472))(a2); v11 = *(_BYTE *)(v10 + 2); LOWORD(v65) = *(_WORD *)v10; BYTE2(v65) = v11; hasSecondaryColor = GameObject::hasSecondaryColor(a2); if ( hasSecondaryColor ) v12 = (__int16 *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)a2 + 189) + 472))(*((_DWORD *)a2 + 189)); else v12 = &word_BEB684; v13 = *v12; BYTE2(v66) = *((_BYTE *)v12 + 2); LOWORD(v66) = v13; if ( a3 ) v14 = cameraRight; else v14 = *((float *)this + 249); CustomEnterEffects = (_DWORD *)GJBaseGameLayer::getCustomEnterEffects(this, *((__int16 *)a2 + 438), a3); if ( CustomEnterEffects ) { v16 = 1.0; v17 = 1; v18 = *CustomEnterEffects + 200; v19 = (float *)((char *)this + 4 * v6); v20 = 1; v64 = CustomEnterEffects[1]; v21 = 1.0; v61 = 1; v59 = 1; v60 = 1; v22 = 1.0; v23 = 1.0; while ( 1 ) { v24 = v18 - 200; if ( v64 == v18 - 200 ) goto LABEL_69; v25 = *(_DWORD *)(v18 - 48); v26 = *(float *)(v18 - 176); v27 = v26 == 0.0; if ( v26 == 0.0 ) v26 = 0.0; else v24 = *((__int16 *)a2 + 434); if ( !v27 ) v24 = (int)this + 4 * v24 + 2532; v28 = (float)v9; if ( !v27 ) v26 = v26 * *(float *)(v24 + 4); v29 = *(float *)(v18 - 184); if ( v29 != 0.0 ) v24 = *((__int16 *)a2 + 434); v30 = (float)(*(float *)v5 - (float)(v14 + *(float *)(v18 - 180))) + v26; if ( v29 == 0.0 ) v3 = 0.0; else v24 = (int)this + 4 * v24 + 2528; if ( v29 != 0.0 ) v3 = *(float *)(v24 + 4); v31 = v30 * v28; if ( v29 != 0.0 ) v3 = v29 * v3; v32 = *(float *)(v18 - 156); v33 = (float)(int)(float)(*(float *)(v18 - 188) + v3); if ( v32 == 0.0 ) { if ( (float)(v31 / v33) >= 1.0 || (float)(v31 / v33) > 0.0 ) { v3 = v31 / v33; goto LABEL_40; } } else { v34 = (float)((float)(v31 / v33) - v32) / (float)(1.0 - v32); if ( v34 >= 1.0 || v34 > 0.0 ) { v3 = (float)((float)(v31 / v33) - v32) / (float)(1.0 - v32); LABEL_40: if ( v3 >= 1.0 ) goto LABEL_67; goto LABEL_41; } } v3 = 0.0; LABEL_41: switch ( *(_DWORD *)(v25 + 892) ) { case 0xBC9: v17 = *(unsigned __int8 *)(v25 + 1780); if ( *(_BYTE *)(v25 + 1780) ) { v35 = (float)(*(float *)(v18 - 136) + (float)(*(float *)(v18 - 132) * v19[641])) * v28; v36 = (float)(*(float *)(v18 - 128) + (float)(*(float *)(v18 - 124) * v19[642])) * v28; if ( v35 == 0.0 && v36 == 0.0 ) goto LABEL_66; v17 = 0; v20 = 0; v37 = COERCE_FLOAT( GJBaseGameLayer::getEnterEasingValue( this, v3, *(float *)(v25 + 1728), *(float *)(v25 + 1732), *(_DWORD *)(v25 + 1736))); v68 = v68 + (float)(v35 * (float)(1.0 - v37)); v69 = v69 + (float)(v36 * (float)(1.0 - v37)); } else { v38 = *(float *)(v18 - 152) + (float)(*(float *)(v18 - 148) * v19[643]); if ( v38 != 0.0 ) { v20 = *(unsigned __int8 *)(v25 + 1780); v39 = v38 * (float)(1.0 - COERCE_FLOAT( GJBaseGameLayer::getEnterEasingValue( this, v3, *(float *)(v25 + 1728), *(float *)(v25 + 1732), *(_DWORD *)(v25 + 1736)))); cocos2d::ccpForAngle( (cocos2d *)&v74, (float)((float)(*(float *)(v18 - 144) + (float)(*(float *)(v18 - 140) * v19[644])) - 90.0) * 0.017453); v68 = v68 + (float)(v39 * v74); v69 = v69 + (float)(v39 * v75); goto LABEL_66; } } break; case 0xBCA: v40 = *(float *)(v18 - 100) + (float)(*(float *)(v18 - 96) * *((float *)this + v63 + 651)); if ( v40 != 0.0 ) { v59 = 0; v21 = v21 + (float)(v40 * (float)(1.0 - COERCE_FLOAT( GJBaseGameLayer::getEnterEasingValue( this, v3, *(float *)(v25 + 1728), *(float *)(v25 + 1732), *(_DWORD *)(v25 + 1736))))); } goto LABEL_66; case 0xBCB: v41 = *(float *)(v18 - 116) + (float)(*(float *)(v18 - 112) * v19[645]); v42 = *(float *)(v18 - 108) + (float)(*(float *)(v18 - 104) * v19[646]); if ( v41 == 0.0 && v42 == 0.0 ) goto LABEL_66; v17 = 0; v43 = COERCE_FLOAT( GJBaseGameLayer::getEnterEasingValue( this, v3, *(float *)(v25 + 1728), *(float *)(v25 + 1732), *(_DWORD *)(v25 + 1736))); v60 = 0; v23 = v23 * (float)((float)((float)(v41 - 1.0) * (float)(1.0 - v43)) + 1.0); v22 = v22 * (float)((float)((float)(v42 - 1.0) * (float)(1.0 - v43)) + 1.0); break; case 0xBCC: v17 = GameObject::ignoreFade(a2); if ( v17 ) goto LABEL_66; v16 = v16 * COERCE_FLOAT( GJBaseGameLayer::getEnterEasingValue( this, v3, *(float *)(v25 + 1728), *(float *)(v25 + 1732), *(_DWORD *)(v25 + 1736))); break; case 0xBCD: active = GJEffectManager::activeColorForIndex(*((GJEffectManager **)this + 381), *(_DWORD *)(v25 + 1768)); v45 = *(unsigned __int8 *)(v25 + 1821); LOWORD(v67) = active; BYTE2(v67) = BYTE2(active); if ( v45 ) { v46 = *(float *)(v18 - 72); v47 = *(_DWORD *)(v18 - 68); v48 = *(_DWORD *)(v18 - 64); v74 = *(float *)(v18 - 76); v75 = v46; v76 = v47; v77 = v48; GameToolbox::getMultipliedHSV((int)&v70, (int *)&v74, 1.0 - v3); if ( !*(_BYTE *)(v25 + 1454) ) { v49 = GameToolbox::transformColor((unsigned __int8 *)&v65, v70, v71, v72, v73); LOWORD(v65) = v49; BYTE2(v65) = BYTE2(v49); } if ( !*(_BYTE *)(v25 + 1453) && GameObject::hasSecondaryColor(a2) ) { v57 = GameToolbox::transformColor((unsigned __int8 *)&v66, v70, v71, v72, v73); LABEL_94: LOWORD(v66) = v57; BYTE2(v66) = BYTE2(v57); } } else { v50 = *(float *)(v18 - 92); if ( !*(_BYTE *)(v25 + 1454) ) { v51 = GameToolbox::multipliedColorValue(v67, v65, (float)(1.0 - v50) + (float)(v3 * v50)); LOWORD(v65) = v51; BYTE2(v65) = BYTE2(v51); } if ( !*(_BYTE *)(v25 + 1453) && GameObject::hasSecondaryColor(a2) ) { v57 = GameToolbox::multipliedColorValue(v67, v66, (float)(1.0 - v50) + (float)(v3 * v50)); goto LABEL_94; } } v17 = 0; v61 = 0; break; default: LABEL_66: v17 = 0; break; } LABEL_67: v18 += 200; } } v16 = 1.0; v17 = 1; v20 = 1; v61 = 1; v59 = 1; v60 = 1; v21 = 1.0; v22 = 1.0; v23 = 1.0; LABEL_69: v52 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 96))(a2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, v52); if ( a3 ) *((_WORD *)a2 + 436) = -15; else *((_WORD *)a2 + 437) = -15; (*(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)a2 + 456))( a2, (unsigned __int8)(unsigned int)(float)(v16 * 255.0)); v53 = *(_DWORD *)a2; if ( v20 ) { if ( *(float *)v5 != v74 || *((float *)this + 2966) != v75 ) (*(void (__fastcall **)(GameObject *, const cocos2d::CCPoint *))(v53 + 92))(a2, v5); } else if ( v68 != v74 || v69 != v75 ) { (*(void (__fastcall **)(GameObject *, float *))(v53 + 92))(a2, &v68); } if ( v59 ) v54 = 0.0; else v54 = v21; (*(void (__fastcall **)(GameObject *, float))(*(_DWORD *)a2 + 740))(a2, COERCE_FLOAT(LODWORD(v54))); v55 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)a2 + 720); if ( v60 ) { v55(a2, 1065353216); result = (*(int (__fastcall **)(GameObject *, int))(*(_DWORD *)a2 + 724))(a2, 1065353216); } else { v55(a2, LODWORD(v23)); result = (*(int (__fastcall **)(GameObject *, float))(*(_DWORD *)a2 + 724))(a2, COERCE_FLOAT(LODWORD(v22))); } if ( !v61 ) { result = (*(int (__fastcall **)(GameObject *, int *))(*(_DWORD *)a2 + 792))(a2, &v65); if ( hasSecondaryColor ) result = (*(int (__fastcall **)(GameObject *, int *))(*(_DWORD *)a2 + 796))(a2, &v66); } if ( v17 ) { if ( a3 ) *((_WORD *)a2 + 436) = -1; else *((_WORD *)a2 + 437) = -1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source