// // PlayLayer::tryShowDeathMarkers from 0xc36fe4 to 0xc37a10 (2604 bytes) // // 2 xrefs: // > PlayLayer::destroyPlayer @ 0x6ff978 // > @ 0xd4818 // // 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 13:04:52 +0000 // __int64 __fastcall PlayLayer::tryShowDeathMarkers( PlayLayer *this, const cocos2d::CCPoint *a2, int a3, unsigned __int8 a4) { int v4; // w25 GameManager *v7; // x0 GameManager *v8; // x0 GameManager *IntGameVariable; // x0 int v10; // w27 GameManager *v11; // x0 GameManager *GameVariable; // x0 GameManager *v14; // x0 GameManager *v15; // x0 unsigned __int8 v16; // w26 GameManager *v17; // x0 float v18; // s8 int NormalPercent; // w0 float v20; // s9 float v21; // s11 float v22; // s8 int *v23; // x0 int *v24; // x28 int *v25; // x28 int v26; // w2 float v27; // s10 int v28; // w28 int v29; // w11 int v30; // w1 _DWORD *v31; // x3 unsigned __int64 v32; // x4 unsigned __int64 v33; // x7 int v34; // w0 float v35; // s9 int v36; // w1 int v37; // w2 int *v38; // x1 int *v39; // x0 int *v40; // x0 int *v41; // x1 int *v42; // x0 int *v43; // x0 int *v44; // x0 __int64 v45; // x0 __int64 v46; // x0 GameManager *v47; // x0 GameManager *v48; // x0 unsigned __int8 v49; // w0 unsigned __int8 v50; // w22 __int64 v51; // x0 __int64 v52; // x26 int v53; // w25 int v54; // w21 int v55; // w0 GameManager *v56; // x0 GameManager *v57; // x0 DeathMarkerLayer *v58; // x0 DeathMarkerLayer *v59; // x0 __int64 v60; // x0 __int64 v61; // x1 float v62; // s0 GameManager *v63; // x0 __int64 v64; // x1 GameManager *v65; // x0 GameManager *v66; // x0 int v67; // w0 __int64 v68; // x28 int v69; // w26 int v70; // w25 int v71; // w0 GameManager *v72; // x0 __int64 v73; // x1 __int64 hasSoundsForAction; // x0 EditorSFXManager *v75; // x0 EditorSFXManager *v76; // x0 int v77; // w1 __int64 v78; // x0 EditorSFXManager *v79; // x0 EditorSFXManager *v80; // x0 EditorSFXManager *v81; // x0 float v82; // [xsp+90h] [xbp+80h] float v83; // [xsp+94h] [xbp+84h] __int64 *v84; // [xsp+98h] [xbp+88h] bool v85[4]; // [xsp+A8h] [xbp+98h] _BOOL4 v86; // [xsp+ACh] [xbp+9Ch] int v87; // [xsp+B0h] [xbp+A0h] int v88; // [xsp+C0h] [xbp+B0h] BYREF int v89; // [xsp+C4h] [xbp+B4h] BYREF int v90; // [xsp+C8h] [xbp+B8h] BYREF int v91; // [xsp+CCh] [xbp+BCh] BYREF _BYTE v92[16]; // [xsp+D0h] [xbp+C0h] BYREF void *v93; // [xsp+E0h] [xbp+D0h] BYREF char *v94; // [xsp+E8h] [xbp+D8h] __int64 v95; // [xsp+F0h] [xbp+E0h] v4 = a4; v7 = (GameManager *)GJGameLevel::cellForPosition((float *)a2, &v88, (unsigned int *)&v89); v8 = (GameManager *)GameManager::sharedState(v7); IntGameVariable = (GameManager *)GameManager::getIntGameVariable(v8, "0205"); if ( (int)IntGameVariable <= 0 ) { v10 = 2; } else if ( (int)IntGameVariable > 5 ) { v10 = 5; } else { v10 = (_DWORD)IntGameVariable - 1; } v11 = (GameManager *)GameManager::sharedState(IntGameVariable); GameVariable = (GameManager *)(unsigned __int8)GameManager::getGameVariable(v11, "0207"); if ( (_BYTE)GameVariable ) return _stack_chk_guard; v14 = (GameManager *)GameManager::sharedState(GameVariable); v15 = (GameManager *)GameManager::getGameVariable(v14, "0200"); v16 = (unsigned __int8)v15; v17 = (GameManager *)GameManager::sharedState(v15); v87 = v16; if ( (unsigned __int8)GameManager::getGameVariable(v17, "0202") ) { if ( !*((_BYTE *)this + 14524) ) { if ( !v10 ) return _stack_chk_guard; *(_DWORD *)v85 = 1; goto LABEL_17; } LABEL_13: PlayLayer::dtRebuildLiveMarkers(this); return _stack_chk_guard; } if ( *((_BYTE *)this + 14524) ) { if ( !v16 ) return _stack_chk_guard; goto LABEL_13; } if ( !v10 || !v16 ) return _stack_chk_guard; *(_DWORD *)v85 = 0; LABEL_17: v18 = flt_119C3C0[v10]; NormalPercent = GJGameLevel::getNormalPercent(*((GJGameLevel **)this + 242)); v20 = *((float *)this + 3623); v21 = flt_119C3C0[v10 + 8]; v22 = v18 * (float)NormalPercent; if ( v22 > v20 ) v20 = v22; v86 = 0; if ( !*((_BYTE *)this + 12238) ) v86 = v20 <= (float)a3; v84 = (__int64 *)((char *)this + 14496); v23 = *((int **)this + 1814); v24 = *((int **)this + 1813); if ( v24 == v23 ) { std::vector::__push_back_slow_path((__int64)v84, &v88); v25 = *((int **)this + 1813); v23 = *((int **)this + 1814); } else { if ( v24 ) { *v24 = v88; v24 = *((int **)this + 1813); v23 = *((int **)this + 1814); } v25 = v24 + 1; *((_QWORD *)this + 1813) = v25; } if ( v25 == v23 ) { std::vector::__push_back_slow_path((__int64)v84, &v89); v26 = v89; } else { v26 = v89; if ( v25 ) { *v25 = v89; v25 = *((int **)this + 1813); v26 = v89; } *((_QWORD *)this + 1813) = v25 + 1; } v83 = flt_119C3C0[v10 + 16]; LODWORD(v82) = GJGameLevel::countDeathsNear(v84, v88, v26, 8); v90 = 0; v27 = flt_119C3C0[v10 + 24]; if ( *(_DWORD *)v85 && v27 > 0.0 ) { v28 = 0; if ( *((int *)this + 3622) > 0 ) { LODWORD(v93) = 0; GJGameLevel::accumulateDeathsInRadius((__int64 *)this + 1802, v88, v89, 8, (float *)&v93, &v90); if ( v90 > 4 ) LOBYTE(v28) = (float)v90 >= (float)((float)*((int *)this + 3622) * v27); v28 = (unsigned __int8)v28 & ((int)GJGameLevel::countDeathsNear((__int64 *)this + 1816, v88, v89, 8) <= 0); } } else { v28 = 0; } v91 = time(nullptr); v29 = *((unsigned __int8 *)this + 12238); if ( *((_BYTE *)this + 12238) && (v30 = LODWORD(flt_119C3C0[v10 + 32]), v30 > 0) ) { v31 = *((_DWORD **)this + 1819); v32 = 0; v33 = (__int64)(*((_QWORD *)this + 1820) - (_QWORD)v31) >> 2; while ( 1 ) { v32 += 3LL; if ( v32 > v33 ) break; if ( v30 * v30 >= (v31[1] - v89) * (v31[1] - v89) + (*v31 - v88) * (*v31 - v88) && v91 - v31[2] < SLODWORD(flt_119C3C0[v10 + 40]) ) { goto LABEL_43; } v31 += 3; } } else { LABEL_43: if ( !v86 && v10 <= 4 ) { if ( !v28 && (SLODWORD(v83) > SLODWORD(v82) || SLODWORD(v83) <= 0) ) goto LABEL_47; goto LABEL_113; } } if ( v10 != 5 ) { LABEL_113: if ( !(unsigned __int8)PlayLayer::dtDeathIsBarren(this, v88, v89, v16, v85[0]) ) { v29 = *((unsigned __int8 *)this + 12238); goto LABEL_103; } v29 = *((unsigned __int8 *)this + 12238); LABEL_47: if ( v29 ) return _stack_chk_guard; v34 = 0; if ( v86 ) return _stack_chk_guard; goto LABEL_49; } LABEL_103: v67 = dword_119C4A0[v10]; if ( v67 <= 0 || v4 || v67 <= v91 - *((_DWORD *)this + 3630) ) { if ( v29 ) goto LABEL_52; if ( v86 ) { *((float *)this + 3623) = (float)(a3 + dword_119C480[v10]); goto LABEL_52; } v34 = 1; } else { if ( v29 ) return _stack_chk_guard; v34 = v86; if ( v86 ) return _stack_chk_guard; } LABEL_49: v35 = v20 * v21; if ( v22 >= v35 ) v35 = v22; *((float *)this + 3623) = v35; if ( v34 ) { LABEL_52: v36 = v88; v37 = v89; *((_DWORD *)this + 3630) = v91; GJGameLevel::clearDeathsNear((void **)v84, v36, v37, 8); if ( v28 ) { v38 = *((int **)this + 1818); v39 = *((int **)this + 1817); if ( v39 == v38 ) { std::vector::__push_back_slow_path((__int64)this + 14528, &v88); v40 = *((int **)this + 1817); v38 = *((int **)this + 1818); } else { if ( v39 ) { *v39 = v88; v39 = *((int **)this + 1817); v38 = *((int **)this + 1818); } v40 = v39 + 1; *((_QWORD *)this + 1817) = v40; } if ( v40 == v38 ) { std::vector::__push_back_slow_path((__int64)this + 14528, &v89); } else { if ( v40 ) { *v40 = v89; v40 = *((int **)this + 1817); } *((_QWORD *)this + 1817) = v40 + 1; } } if ( *((_BYTE *)this + 12238) ) { v41 = *((int **)this + 1821); v42 = *((int **)this + 1820); if ( v42 == v41 ) { std::vector::__push_back_slow_path((__int64)this + 14552, &v88); v43 = *((int **)this + 1820); v41 = *((int **)this + 1821); } else { if ( v42 ) { *v42 = v88; v42 = *((int **)this + 1820); v41 = *((int **)this + 1821); } v43 = v42 + 1; *((_QWORD *)this + 1820) = v43; } if ( v41 == v43 ) { std::vector::__push_back_slow_path((__int64)this + 14552, &v89); v44 = *((int **)this + 1820); v41 = *((int **)this + 1821); } else { if ( v43 ) { *v43 = v89; v43 = *((int **)this + 1820); v41 = *((int **)this + 1821); } v44 = v43 + 1; *((_QWORD *)this + 1820) = v44; } if ( v41 == v44 ) { std::vector::__push_back_slow_path((__int64)this + 14552, &v91); } else { if ( v44 ) { *v44 = v91; v44 = *((int **)this + 1820); } *((_QWORD *)this + 1820) = v44 + 1; } } v93 = nullptr; v94 = nullptr; v95 = 0; if ( v16 ) PlayLayer::dtLocalCellTriples((__int64)this, (__int64 *)&v93); v45 = *((_QWORD *)this + 244); if ( v45 ) { (*(void (__fastcall **)(__int64))(*(_QWORD *)v45 + 520LL))(v45); *((_QWORD *)this + 244) = 0; } v46 = *((_QWORD *)this + 243); if ( v46 ) { (*(void (__fastcall **)(__int64))(*(_QWORD *)v46 + 520LL))(v46); *((_QWORD *)this + 243) = 0; } v47 = PlayLayer::dtMarkerVisibleRect(this, (cocos2d::CCRect *)v92); v48 = (GameManager *)GameManager::sharedState(v47); v49 = GameManager::getGameVariable(v48, "0201"); v50 = v49 ^ 1; DeathMarkerLayer::timescale((DeathMarkerLayer *)v49); v51 = 0; if ( *(_DWORD *)v85 ) { v68 = *((_QWORD *)this + 492); v69 = v88; v70 = v89; v71 = sub_C36304((GameManager *)((char *)&dword_0 + 1)); v51 = GJBaseGameLayer::addDeathMarkerLayer( (__int64)this, v68, 1u, (_QWORD *)this + 1802, v50, (int)v92, v69, v70, v71); } *((_QWORD *)this + 244) = v51; if ( v87 ) { v52 = *((_QWORD *)this + 492); v53 = v88; v54 = v89; v55 = sub_C36304(nullptr); v56 = (GameManager *)GJBaseGameLayer::addDeathMarkerLayer( (__int64)this, v52, 0, &v93, v50, (int)v92, v53, v54, v55); } else { v56 = nullptr; } *((_QWORD *)this + 243) = v56; v57 = (GameManager *)GameManager::sharedState(v56); if ( (unsigned __int8)GameManager::getGameVariable(v57, "0208") ) { v58 = *((DeathMarkerLayer **)this + 244); if ( v58 ) DeathMarkerLayer::setLabelsVisible(v58, 0); v59 = *((DeathMarkerLayer **)this + 243); if ( !v59 ) { v60 = *((_QWORD *)this + 244); if ( !v60 ) goto LABEL_97; goto LABEL_93; } DeathMarkerLayer::setLabelsVisible(v59, 0); } v60 = *((_QWORD *)this + 244); if ( v60 ) { v61 = *((_QWORD *)this + 243); v62 = *(float *)(v60 + 432); if ( !v61 ) goto LABEL_93; } else { v62 = 0.0; v61 = *((_QWORD *)this + 243); if ( !v61 ) goto LABEL_97; } if ( v62 < *(float *)(v61 + 432) ) { if ( !v60 ) goto LABEL_97; } else if ( !v60 ) { goto LABEL_97; } LABEL_93: v60 = *(unsigned int *)(v60 + 440); if ( (v60 & 0x80000000) == 0 ) { v63 = (GameManager *)GameManager::sharedState((GameManager *)v60); v60 = (unsigned __int8)GameManager::getGameVariable(v63, "0208"); if ( !(_BYTE)v60 ) { v64 = *((_QWORD *)this + 244); v60 = *(unsigned int *)(v64 + 440); if ( (v60 & 0x80000000) == 0 ) { v60 = *(_QWORD *)(v64 + 320) + 80LL * (int)v60; if ( *(int *)(v60 + 52) <= 0 && *(int *)(v60 + 56) <= 1 ) v60 = *(unsigned int *)(v60 + 60); } } } LABEL_97: v65 = (GameManager *)GameManager::sharedState((GameManager *)v60); v66 = (GameManager *)(unsigned __int8)GameManager::getGameVariable(v65, "0208"); if ( (_BYTE)v66 || (v72 = (GameManager *)GameManager::sharedState(v66), (unsigned __int8)GameManager::getGameVariable(v72, "0206")) ) { LABEL_98: if ( v93 ) { if ( v93 != v94 ) v94 += 4 * ~((unsigned __int64)(v94 - 4 - (_BYTE *)v93) >> 2); operator delete(v93); } return _stack_chk_guard; } v73 = *((_QWORD *)this + 244); if ( !v73 || (LODWORD(hasSoundsForAction) = *(_DWORD *)(v73 + 440), (hasSoundsForAction & 0x80000000) != 0) ) { LABEL_132: v78 = *((_QWORD *)this + 243); if ( v78 ) { v79 = (EditorSFXManager *)*(unsigned int *)(v78 + 440); if ( ((unsigned int)v79 & 0x80000000) == 0 ) { v80 = (EditorSFXManager *)EditorSFXManager::sharedState(v79); if ( (unsigned __int8)EditorSFXManager::hasSoundsForAction(v80, 272) ) DeathMarkerLayer::queueDeathLabelSound(*((DeathMarkerLayer **)this + 243), 272); } } goto LABEL_98; } hasSoundsForAction = (int)hasSoundsForAction; if ( *(int *)(*(_QWORD *)(v73 + 320) + 80LL * (int)hasSoundsForAction + 52) > 0 ) { v75 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)(int)hasSoundsForAction); if ( (unsigned __int8)EditorSFXManager::hasSoundsForAction(v75, 271) ) { v77 = 271; goto LABEL_131; } v73 = *((_QWORD *)this + 244); hasSoundsForAction = *(unsigned int *)(v73 + 440); if ( (hasSoundsForAction & 0x80000000) != 0 ) { LABEL_137: v81 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)hasSoundsForAction); if ( !(unsigned __int8)EditorSFXManager::hasSoundsForAction(v81, 270) ) goto LABEL_132; v77 = 270; goto LABEL_131; } hasSoundsForAction = (int)hasSoundsForAction; } hasSoundsForAction = *(_QWORD *)(v73 + 320) + 80 * hasSoundsForAction; if ( *(int *)(hasSoundsForAction + 56) > 1 || (hasSoundsForAction = *(unsigned int *)(hasSoundsForAction + 60), (int)hasSoundsForAction > 1) ) { v76 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)hasSoundsForAction); hasSoundsForAction = (unsigned __int8)EditorSFXManager::hasSoundsForAction(v76, 273); if ( (_BYTE)hasSoundsForAction ) { v77 = 273; LABEL_131: DeathMarkerLayer::queueDeathLabelSound(*((DeathMarkerLayer **)this + 244), v77); goto LABEL_132; } } goto LABEL_137; } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source