{"type": "func", "start": 4296402368, "end": 4296402649, "name": "GJBaseGameLayer::applySFXEditTrigger", "pseudocode": "// \n// GJBaseGameLayer::applySFXEditTrigger from 0x10015e5c0 to 0x10015e6d9 (281 bytes)\n// \n// 4 xrefs:\n// > GJBaseGameLayer::activateSongEditTrigger @ 0x10015a61e\n// > GJBaseGameLayer::activateSFXEditTrigger @ 0x10015adb6\n// > GJBaseGameLayer::activateSFXEditTrigger @ 0x10015ae11\n// > GJBaseGameLayer::activateSFXEditTrigger @ 0x10015ae45\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall GJBaseGameLayer::applySFXEditTrigger(GJBaseGameLayer *a1, int a2, int a3, SFXTriggerGameObject *a4)\n{\n  FMODAudioEngine *v6; // rax\n  FMODAudioEngine *v7; // rax\n  float m_pitch; // xmm0_4\n  FMODAudioEngine *v9; // rax\n\n  if ( *(_WORD *)&a1->m_isPracticeMode != 1 || a1->m_isPlatformer )\n  {\n    if ( a4->m_stop || a4->m_stopLoop )\n    {\n      v7 = FMODAudioEngine::sharedEngine();\n      FMODAudioEngine::stopChannel(v7, a2, (AudioTargetType)a3, a4->m_stopLoop, 0.0);\n      if ( !a4->m_changeVolume )\n      {\nLABEL_6:\n        if ( !a4->m_changeSpeed )\n          return;\n        goto LABEL_7;\n      }\n    }\n    else if ( !a4->m_changeVolume )\n    {\n      goto LABEL_6;\n    }\n    m_pitch = a4->m_pitch;\n    if ( m_pitch <= 0.0 )\n    {\n      FMODAudioEngine::sharedEngine();\n      m_pitch = FMODAudioEngine::pitchForIdx(a4->m_speed);\n    }\n    v9 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::updateChannel(v9, a2, (AudioTargetType)a3, Pitch, a4->m_duration, m_pitch);\n    if ( a4->m_changeSpeed )\n    {\nLABEL_7:\n      v6 = FMODAudioEngine::sharedEngine();\n      FMODAudioEngine::updateChannel(v6, a2, (AudioTargetType)a3, Volume, a4->m_duration, a4->m_volume);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::applySFXEditTrigger from 0x10015e5c0 to 0x10015e6d9 (281 bytes)\n; \n; 4 xrefs:\n; > GJBaseGameLayer::activateSongEditTrigger @ 0x10015a61e\n; > GJBaseGameLayer::activateSFXEditTrigger @ 0x10015adb6\n; > GJBaseGameLayer::activateSFXEditTrigger @ 0x10015ae11\n; > GJBaseGameLayer::activateSFXEditTrigger @ 0x10015ae45\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x10015e5c0\nmov     rbp, rsp                                                       ; +0x1, 0x10015e5c1\npush    r15                                                            ; +0x4, 0x10015e5c4\npush    r14                                                            ; +0x6, 0x10015e5c6\npush    rbx                                                            ; +0x8, 0x10015e5c8\npush    rax                                                            ; +0x9, 0x10015e5c9\nmov     r15, rcx                                                       ; +0xa, 0x10015e5ca\nmov     ebx, edx                                                       ; +0xd, 0x10015e5cd\nmov     r14d, esi                                                      ; +0xf, 0x10015e5cf\ncmp     byte ptr [rdi+3059h], 0                                        ; +0x12, 0x10015e5d2\njnz     short loc_10015E5F1                                            ; +0x19, 0x10015e5d9\ncmp     byte ptr [rdi+3058h], 1                                        ; +0x1b, 0x10015e5db\njnz     short loc_10015E5F1                                            ; +0x22, 0x10015e5e2\ncmp     byte ptr [rdi+2F36h], 1                                        ; +0x24, 0x10015e5e4\njnz     loc_10015E6CE                                                  ; +0x2b, 0x10015e5eb\ncmp     byte ptr [r15+7A0h], 0                                         ; +0x31, 0x10015e5f1\njnz     short loc_10015E64D                                            ; +0x39, 0x10015e5f9\ncmp     byte ptr [r15+76Fh], 1                                         ; +0x3b, 0x10015e5fb\njz      short loc_10015E64D                                            ; +0x43, 0x10015e603\ncmp     byte ptr [r15+7A2h], 1                                         ; +0x45, 0x10015e605\njz      short loc_10015E674                                            ; +0x4d, 0x10015e60d\ncmp     byte ptr [r15+7A1h], 1                                         ; +0x4f, 0x10015e60f\njnz     loc_10015E6CE                                                  ; +0x57, 0x10015e617\ncall    FMODAudioEngine__sharedEngine                                  ; +0x5d, 0x10015e61d\nmovss   xmm0, dword ptr [r15+5ACh]                                     ; +0x62, 0x10015e622\nmovss   xmm1, dword ptr [r15+758h]                                     ; +0x6b, 0x10015e62b\nmov     rdi, rax                                                       ; +0x74, 0x10015e634\nmov     esi, r14d                                                      ; +0x77, 0x10015e637\nmov     edx, ebx                                                       ; +0x7a, 0x10015e63a\nxor     ecx, ecx                                                       ; +0x7c, 0x10015e63c\nadd     rsp, 8                                                         ; +0x7e, 0x10015e63e\npop     rbx                                                            ; +0x82, 0x10015e642\npop     r14                                                            ; +0x83, 0x10015e643\npop     r15                                                            ; +0x85, 0x10015e645\npop     rbp                                                            ; +0x87, 0x10015e647\njmp     FMODAudioEngine__updateChannel                                 ; +0x88, 0x10015e648\ncall    FMODAudioEngine__sharedEngine                                  ; +0x8d, 0x10015e64d\nmovzx   ecx, byte ptr [r15+76Fh]                                       ; +0x92, 0x10015e652\nxorps   xmm0, xmm0                                                     ; +0x9a, 0x10015e65a\nmov     rdi, rax                                                       ; +0x9d, 0x10015e65d\nmov     esi, r14d                                                      ; +0xa0, 0x10015e660\nmov     edx, ebx                                                       ; +0xa3, 0x10015e663\ncall    FMODAudioEngine__stopChannel                                   ; +0xa5, 0x10015e665\ncmp     byte ptr [r15+7A2h], 1                                         ; +0xaa, 0x10015e66a\njnz     short loc_10015E60F                                            ; +0xb2, 0x10015e672\nmovss   xmm0, dword ptr [r15+74Ch]                                     ; +0xb4, 0x10015e674\nxorps   xmm1, xmm1                                                     ; +0xbd, 0x10015e67d\nucomiss xmm0, xmm1                                                     ; +0xc0, 0x10015e680\nja      short loc_10015E696                                            ; +0xc3, 0x10015e683\ncall    FMODAudioEngine__sharedEngine                                  ; +0xc5, 0x10015e685\nmov     edi, [r15+750h]                                                ; +0xca, 0x10015e68a\ncall    FMODAudioEngine__pitchForIdx                                   ; +0xd1, 0x10015e691\nmovss   [rbp+var_1C], xmm0                                             ; +0xd6, 0x10015e696\ncall    FMODAudioEngine__sharedEngine                                  ; +0xdb, 0x10015e69b\nmovss   xmm0, dword ptr [r15+5ACh]                                     ; +0xe0, 0x10015e6a0\nmov     rdi, rax                                                       ; +0xe9, 0x10015e6a9\nmov     esi, r14d                                                      ; +0xec, 0x10015e6ac\nmov     edx, ebx                                                       ; +0xef, 0x10015e6af\nmov     ecx, 1                                                         ; +0xf1, 0x10015e6b1\nmovss   xmm1, [rbp+var_1C]                                             ; +0xf6, 0x10015e6b6\ncall    FMODAudioEngine__updateChannel                                 ; +0xfb, 0x10015e6bb\ncmp     byte ptr [r15+7A1h], 1                                         ; +0x100, 0x10015e6c0\njz      loc_10015E61D                                                  ; +0x108, 0x10015e6c8\nadd     rsp, 8                                                         ; +0x10e, 0x10015e6ce\npop     rbx                                                            ; +0x112, 0x10015e6d2\npop     r14                                                            ; +0x113, 0x10015e6d3\npop     r15                                                            ; +0x115, 0x10015e6d5\npop     rbp                                                            ; +0x117, 0x10015e6d7\nretn                                                                   ; +0x118, 0x10015e6d8", "xrefs": ["GJBaseGameLayer::activateSongEditTrigger @ 0x10015a61e", "GJBaseGameLayer::activateSFXEditTrigger @ 0x10015adb6", "GJBaseGameLayer::activateSFXEditTrigger @ 0x10015ae11", "GJBaseGameLayer::activateSFXEditTrigger @ 0x10015ae45"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}