// // PlayLayer::updateVisibility from 0x406b14 to 0x407320 (2060 bytes) // // 0 xrefs: // // 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:28 +0000 // int __fastcall PlayLayer::updateVisibility(PlayLayer *this, float a2) { char *v3; // r11 GJEffectManager *v4; // r6 int active; // r0 cocos2d::CCDirector *v6; // r0 unsigned __int8 *v7; // r0 int v8; // r0 int v9; // r0 char v10; // r3 GJEffectManager *v11; // r0 int v12; // r0 cocos2d::CCDirector *v13; // r0 char *i; // r6 char *v15; // r0 float v16; // s16 cocos2d::CCDirector *v17; // r0 float v18; // s19 __int16 *v19; // r3 __int16 v20; // r2 char v21; // r3 FMODAudioEngine *isFlipping; // r0 FMODAudioEngine *v23; // r0 int MeteringValue; // s15 float v25; // s17 _DWORD *v26; // r7 int *v27; // r4 int v28; // r3 _DWORD *v29; // r9 _DWORD *v30; // r8 int v31; // r10 int v32; // r0 _DWORD *v33; // r10 unsigned int v34; // r6 int v35; // r6 int v36; // r0 _DWORD *v37; // r6 _DWORD *v38; // r6 _DWORD *v39; // r0 int v40; // r6 int v41; // r9 int v42; // r8 float v43; // s15 int v44; // r0 int v45; // r3 char *v46; // r1 void (__fastcall *v47)(int *, int); // r6 int v48; // r0 _DWORD *k; // r0 _DWORD *v50; // r4 _DWORD *v51; // r2 int result; // r0 float v53; // s14 float v54; // s15 void (__fastcall *v55)(int *, _DWORD); // r6 int j; // [sp+14h] [bp-58h] int v58; // [sp+1Ch] [bp-50h] FMODAudioEngine *v59; // [sp+20h] [bp-4Ch] int v60; // [sp+24h] [bp-48h] int v61; // [sp+28h] [bp-44h] int v62; // [sp+28h] [bp-44h] unsigned int v63; // [sp+28h] [bp-44h] bool v64[4]; // [sp+30h] [bp-3Ch] int v65; // [sp+34h] [bp-38h] int v66; // [sp+38h] [bp-34h] _BYTE v67[4]; // [sp+3Ch] [bp-30h] BYREF __int16 v68; // [sp+40h] [bp-2Ch] BYREF unsigned __int8 v69; // [sp+42h] [bp-2Ah] __int16 v70; // [sp+44h] [bp-28h] BYREF char v71; // [sp+46h] [bp-26h] int v72; // [sp+48h] [bp-24h] float v73[2]; // [sp+4Ch] [bp-20h] BYREF float v74[2]; // [sp+54h] [bp-18h] BYREF unsigned int v75[2]; // [sp+5Ch] [bp-10h] BYREF v3 = (char *)this + 10928; cameraRight = *((float *)this + 249) + *((float *)this + 2721); PlayLayer::dtUpdateLiveMarkers(this); GJBaseGameLayer::preUpdateVisibility(this, a2); GJEffectManager::processColors(*((GJEffectManager **)this + 381)); v4 = *((GJEffectManager **)this + 381); active = GJEffectManager::activeColorForIndex(v4, 1005); LOWORD(v72) = active; BYTE2(v72) = BYTE2(active); v6 = (cocos2d::CCDirector *)GJEffectManager::calculateLightBGColor(v4, v72); cocos2d::CCDirector::sharedDirector(v6); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v73); v7 = (unsigned __int8 *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 612) + 472))(*((_DWORD *)this + 612)); v8 = GameToolbox::transformColor(v7, 0.0, -0.3, 0.4); LOWORD(v66) = v8; BYTE2(v66) = BYTE2(v8); v9 = GJEffectManager::activeColorForIndex(*((GJEffectManager **)this + 381), 1007); v10 = BYTE1(v9); v67[0] = v9; v67[2] = BYTE2(v9); v11 = *((GJEffectManager **)this + 381); v67[1] = v10; v12 = GJEffectManager::activeColorForIndex(v11, 1000); v68 = v12; v69 = BYTE2(v12); v13 = (cocos2d::CCDirector *)GameToolbox::transformColor((unsigned __int8 *)&v68, 0.0, -0.2, 0.2); *((_WORD *)this + 5464) = (_WORD)v13; v3[2] = BYTE2(v13); for ( i = *((char **)this + 3065); i != *((char **)this + 3066); i += 4 ) { v15 = i; v13 = (cocos2d::CCDirector *)memset(v15, 0, 4u); } v16 = (float)(v73[0] * 0.5) - 75.0; v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v13); v18 = (float)(COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v17)) - (float)(v16 + 110.0)) - 90.0; if ( (float)((unsigned __int8)v68 + HIBYTE(v68) + v69) < 150.0 ) v19 = (__int16 *)v67; else v19 = &word_BEB684; v20 = *v19; v21 = *((_BYTE *)v19 + 2); v70 = v20; v71 = v21; v58 = *(unsigned __int8 *)(*((_DWORD *)this + 519) + 1960); isFlipping = (FMODAudioEngine *)GJBaseGameLayer::isFlipping(this); v59 = isFlipping; if ( *((_BYTE *)this + 11952) ) { v23 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(isFlipping); MeteringValue = FMODAudioEngine::getMeteringValue(v23); } else { MeteringValue = *(_DWORD *)(*((_DWORD *)this + 2725) + 464); } if ( *((_BYTE *)this + 10784) && !*((_BYTE *)this + 10785) ) { v25 = 0.5; } else { if ( *((_BYTE *)this + 11872) ) MeteringValue = 0.5; v25 = *(float *)&MeteringValue; if ( !*((_BYTE *)this + 10784) ) goto LABEL_19; } MeteringValue = 0.5; if ( *((_BYTE *)this + 10785) ) MeteringValue = LODWORD(v25); LABEL_19: v26 = (_DWORD *)((char *)this + 12260); *(_DWORD *)(*((_DWORD *)this + 519) + 2140) = MeteringValue; *(_DWORD *)(*((_DWORD *)this + 520) + 2140) = MeteringValue; v60 = *((_DWORD *)this + 3019); for ( j = 0; j < *((_DWORD *)this + 2730); ++j ) { v27 = *(int **)(*((_DWORD *)this + 2727) + 4 * j); v28 = v27[285]; if ( v28 <= 0 ) { GameObject::updateMainColor(*(GameObject **)(*((_DWORD *)this + 2727) + 4 * j)); GameObject::updateSecondaryColor((GameObject *)v27); } else { v29 = (_DWORD *)((char *)this + 12236); v30 = (_DWORD *)((char *)this + 12248); if ( ((1 << (v28 - 32 * ((unsigned int)v28 >> 5))) & *(_DWORD *)(*v26 + 4 * ((unsigned int)v28 >> 5))) == 0 ) { v31 = 3 * v28; *(_DWORD *)v64 = *v29; v61 = *v29 + 3 * v28; v32 = GameObject::colorForMode(*(GameObject **)(*((_DWORD *)this + 2727) + 4 * j), v27[139], 1); *(_WORD *)(*(_DWORD *)v64 + v31) = *(_WORD *)v32; *(_BYTE *)(v61 + 2) = *(_BYTE *)(v32 + 2); v33 = (_DWORD *)(*v30 + 4 * v27[285]); *v33 = GameObject::opacityModForMode((GameObject *)v27, v27[139], 1); *(_DWORD *)(*v26 + 4 * ((unsigned int)v27[285] >> 5)) |= 1 << (v27[285] - 32 * ((unsigned int)v27[285] >> 5)); } (*(void (__fastcall **)(int *, int))(*v27 + 792))(v27, 3 * v27[285] + *v29); *(_DWORD *)(v27[240] + 8) = *(_DWORD *)(*v30 + 4 * v27[285]); if ( GameObject::hasSecondaryColor((GameObject *)v27) ) { v34 = v27[286]; if ( ((1 << (v34 - 32 * (v34 >> 5))) & *(_DWORD *)(*v26 + 4 * (v34 >> 5))) == 0 ) { v35 = 3 * v34; v62 = *v29 + v35; v65 = *v29; v36 = GameObject::colorForMode((GameObject *)v27, v27[140], 0); *(_WORD *)(v65 + v35) = *(_WORD *)v36; *(_BYTE *)(v62 + 2) = *(_BYTE *)(v36 + 2); v37 = (_DWORD *)(*v30 + 4 * v27[286]); *v37 = GameObject::opacityModForMode((GameObject *)v27, v27[140], 0); *(_DWORD *)(*v26 + 4 * ((unsigned int)v27[286] >> 5)) |= 1 << (v27[286] - 32 * ((unsigned int)v27[286] >> 5)); } (*(void (__fastcall **)(int *, int))(*v27 + 796))(v27, 3 * v27[286] + *v29); *(_DWORD *)(v27[241] + 8) = *(_DWORD *)(*v30 + 4 * v27[286]); } } if ( *((_BYTE *)v27 + 657) && v60 ) { v75[0] = v27[139]; v38 = std::__hash_table,std::equal_to,std::allocator>::find( (_DWORD *)this + 3016, v75); if ( !GameObject::hasSecondaryColor((GameObject *)v27) ) { if ( !v38 ) goto LABEL_35; LABEL_33: (*(void (__fastcall **)(int *, _DWORD))(*v27 + 640))(v27, 0); GameObject::addColorSpriteToParent((GameObject *)v27, 0); goto LABEL_35; } v75[0] = v27[140]; v39 = std::__hash_table,std::equal_to,std::allocator>::find( (_DWORD *)this + 3016, v75); if ( v38 || v39 ) goto LABEL_33; } LABEL_35: (*(void (__fastcall **)(int *))(*v27 + 652))(v27); (*(void (__fastcall **)(unsigned int *, int *))(*v27 + 680))(v75, v27); cocos2d::CCPoint::operator=((char *)this + 11860, v75); v40 = *((__int16 *)v27 + 436); if ( v40 == -1 && (*((__int16 *)v27 + 437) != -1 || *((float *)this + 2965) <= (float)(*((float *)this + 249) + *((float *)this + 2724))) ) { v40 = *((__int16 *)v27 + 437); v41 = 0; v42 = *(_DWORD *)(*((_DWORD *)this + 287) + 4 * *((__int16 *)v27 + 438)); } else { v41 = 1; v42 = *(_DWORD *)(*((_DWORD *)this + 284) + 4 * *((__int16 *)v27 + 438)); } if ( *((_BYTE *)v27 + 1165) ) { v40 = -14; v42 = -14; } if ( (*(int (__fastcall **)(int *))(*v27 + 864))(v27) ) { v43 = *((double *)this + 98); (*(void (__fastcall **)(int *, _DWORD, int))(*v27 + 924))(v27, LODWORD(v43), -1); } if ( (*(int (__fastcall **)(int *))(*v27 + 868))(v27) ) EnhancedGameObject::updateRotateAction((EnhancedGameObject *)v27, a2); if ( *((_BYTE *)v27 + 755) ) AnimatedGameObject::updateChildSpriteColor(v27, v66); if ( (*(int (__fastcall **)(int *))(*v27 + 900))(v27) == 30 ) { v44 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 366) + 96))(*((_DWORD *)this + 366)); EffectGameObject::updateInteractiveHover((EffectGameObject *)v27, *(float *)(v44 + 4)); } if ( v27[223] == 143 ) (*(void (__fastcall **)(int *, char *))(*v27 + 752))(v27, v3); if ( !*((_BYTE *)v27 + 896) ) { if ( *((_BYTE *)v27 + 832) && !*((_BYTE *)v27 + 833) ) { v45 = *v27; if ( *((_BYTE *)v27 + 918) ) (*(void (__fastcall **)(int *, _DWORD))(v45 + 728))( v27, *((float *)v27 + 230) + (float)((float)(v25 - 0.1) * (float)(*((float *)v27 + 231) - *((float *)v27 + 230)))); else (*(void (__fastcall **)(int *, float))(v45 + 728))(v27, COERCE_FLOAT(LODWORD(v25))); } if ( *((_BYTE *)v27 + 937) ) { if ( *((_BYTE *)v27 + 938) ) v46 = v67; else v46 = v3; (*(void (__fastcall **)(int *, char *))(*v27 + 752))(v27, v46); } if ( *((_BYTE *)v27 + 936) ) { if ( v58 ) { (*(void (__fastcall **)(int *, char *))(*v27 + 752))(v27, v3); (*(void (__fastcall **)(int *, int))(*v27 + 456))(v27, 255); GameObject::setGlowOpacity((GameObject *)v27, 0xFFu); } else { PlayLayer::updateInvisibleBlock( (int)this, (float *)v27, v16 + 110.0, v16, v18, v16 - 30.0, (unsigned __int8 *)&v70); } LABEL_69: if ( v42 == -15 ) goto LABEL_70; LABEL_100: PlayLayer::applyEnterEffect(this, (GameObject *)v27, v42, v41); } else { if ( GameObject::ignoreFade((GameObject *)v27) || v42 == -14 ) { (*(void (__fastcall **)(int *, int))(*v27 + 456))(v27, 255); goto LABEL_69; } if ( *((_BYTE *)v27 + 897) && (!*((_BYTE *)v27 + 900) || !*((_BYTE *)v27 + 968)) && (unsigned int)(v40 + 2) <= 1 && v42 == -2 ) { (*(void (__fastcall **)(int *, int))(*v27 + 456))(v27, 255); goto LABEL_100; } if ( v42 != -15 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, (PlayLayer *)((char *)this + 11860)); v53 = *((float *)v27 + 178); if ( v41 ) v54 = v74[0] - v53; else v54 = v74[0] + v53; v74[0] = v54; v55 = *(void (__fastcall **)(int *, _DWORD))(*v27 + 456); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v75, (const cocos2d::CCPoint *)v74); v63 = (unsigned int)(float)(COERCE_FLOAT(PlayLayer::getRelativeModNew((int)this, (float *)v75, 70.0, 0.0, 0, v41)) * 255.0); v55(v27, (unsigned __int8)v63); goto LABEL_100; } LABEL_70: if ( GameObject::ignoreEnter((GameObject *)v27) ) goto LABEL_100; PlayLayer::applyCustomEnterEffect(this, (GameObject *)v27, v41); } if ( v59 ) { PlayLayer::screenFlipObject(this, (GameObject *)v27); } else if ( *((_BYTE *)this + 10828) ) { (*(void (__fastcall **)(int *, _DWORD))(*v27 + 620))(v27, *((unsigned __int8 *)v27 + 860)); (*(void (__fastcall **)(int *, _DWORD))(*v27 + 624))(v27, *((unsigned __int8 *)v27 + 861)); (*(void (__fastcall **)(int *, int))(*v27 + 180))(v27, v27[209]); v47 = *(void (__fastcall **)(int *, int))(*v27 + 92); v48 = (*(int (__fastcall **)(int *))(*v27 + 96))(v27); v47(v27, v48); } continue; } } GJBaseGameLayer::updateEnterEffects(this, a2); GJBaseGameLayer::processAreaVisualActions(this, a2); GJBaseGameLayer::updateParticles(this, a2); *((_BYTE *)this + 10828) = 0; if ( *((_DWORD *)this + 3019) ) { for ( k = *((_DWORD **)this + 3018); k; k = v50 ) { v50 = (_DWORD *)*k; operator delete(k); } *((_DWORD *)this + 3018) = 0; v51 = *((_DWORD **)this + 3017); while ( k != v51 ) { *(_DWORD *)(*((_DWORD *)this + 3016) + 4 * (_DWORD)k) = 0; k = (_DWORD *)((char *)k + 1); } *((_DWORD *)this + 3019) = 0; } result = PlayLayer::shouldDebugDraw(this); if ( result ) return (*(int (__fastcall **)(PlayLayer *))(*(_DWORD *)this + 652))(this); return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source