// // GJBaseGameLayer::activateSFXTrigger from 0x5b18bc to 0x5b1a16 (346 bytes) // // 4 xrefs: // > LevelEditorLayer::activateTriggerEffect @ 0x467b8c // > EffectGameObject::triggerObject @ 0x4f5346 // > GJBaseGameLayer::processQueuedAudioTriggers @ 0x5b1c24 // > GJBaseGameLayer::processActivatedAudioTriggers @ 0x5b35a8 // // 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:33 +0000 // int __fastcall GJBaseGameLayer::activateSFXTrigger(GJBaseGameLayer *this, SFXTriggerGameObject *a2) { SFXTriggerGameObject *v3; // r1 int v4; // r2 float v5; // r0 int v6; // r3 SFXTriggerGameObject **v7; // r3 int v9; // r3 SFXTriggerGameObject *v10; // r3 char v11; // r7 int v12; // r0 GameManager *v13; // r0 SFXTriggerGameObject *v14; // r0 SFXTriggerGameObject *v15; // r3 _DWORD *v16; // r0 int *v17; // r2 int v18; // r0 int v19; // r2 SFXTriggerGameObject *v20; // [sp+4h] [bp-20h] BYREF int v21; // [sp+8h] [bp-1Ch] BYREF int v22[4]; // [sp+Ch] [bp-18h] BYREF v20 = a2; if ( !*((_BYTE *)this + 10785) && *((_BYTE *)this + 10784) ) return 0; v3 = v20; if ( *((int *)v20 + 415) <= 0 ) return 0; v4 = *((_DWORD *)this + 202); v5 = *((float *)this + 2711); if ( LODWORD(v5) != v4 ) { *((_DWORD *)this + 2711) = v4; *((_DWORD *)this + 2710) = 0; } v6 = *((_DWORD *)this + 2710); if ( v6 > 100 ) return 0; *((_DWORD *)this + 2710) = v6 + 1; if ( *((_BYTE *)this + 11568) ) { (*(void (__fastcall **)(GJBaseGameLayer *))(*(_DWORD *)this + 760))(this); return 0; } if ( *((_BYTE *)this + 1439) ) { v7 = *((SFXTriggerGameObject ***)this + 361); if ( v7 == *((SFXTriggerGameObject ***)this + 362) ) { std::vector::__push_back_slow_path( (_DWORD *)this + 360, &v20); } else { if ( v7 ) *v7 = v3; *((_DWORD *)this + 361) += 4; } return 0; } if ( !*((_BYTE *)v3 + 1742) ) { v9 = *((_DWORD *)v3 + 321); if ( v9 > 0 ) { v18 = *((_DWORD *)v3 + 322); v19 = *((_DWORD *)v3 + 373); v22[3] = (int)v3; v22[1] = v18; v22[0] = v9; v22[2] = v19; v5 = COERCE_FLOAT(GJBaseGameLayer::volumeForProximityEffect((int)this, v22)); if ( v5 <= 0.0 ) return 0; } } v10 = v20; v11 = *((_BYTE *)v20 + 1741); *((_BYTE *)v20 + 1741) = 0; if ( *((_BYTE *)v10 + 1768) ) { v12 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)LODWORD(v5)); v5 = COERCE_FLOAT(FMODAudioEngine::updateReverb(v12, *((_DWORD *)v20 + 441), 0)); } v13 = (GameManager *)GameManager::sharedState((GameManager *)LODWORD(v5)); v14 = GameManager::playSFXTrigger(v13, v20); v15 = v20; *((_BYTE *)v20 + 1741) = v11; v21 = (int)v14; if ( (int)v14 > 0 ) { v22[0] = *((_DWORD *)v15 + 195); v16 = std::unordered_map>::operator[]((int)this + 1288, (unsigned int *)v22); v17 = (int *)v16[1]; if ( v17 == (int *)v16[2] ) { std::vector::__push_back_slow_path((int)v16, &v21); } else { if ( v17 ) *v17 = v21; v16[1] += 4; } if ( *((int *)v20 + 321) > 0 ) GJBaseGameLayer::addProximityVolumeEffect((int **)this, v21, 0, v20); } return v21; }
GD Web Decomp Icon

GD Web Decomp

Raw Source