- redirect ST_Sound to a callback because the sound code is game specific

This commit is contained in:
Christoph Oelckers 2020-04-23 22:33:43 +02:00
parent f8e23500c7
commit 72533e2f8a
3 changed files with 8 additions and 1 deletions

View File

@ -10,6 +10,7 @@ struct SystemCallbacks
bool (*WantNativeMouse)(); bool (*WantNativeMouse)();
bool (*CaptureModeInGame)(); bool (*CaptureModeInGame)();
void (*CrashInfo)(char* buffer, size_t bufflen, const char* lfstr); void (*CrashInfo)(char* buffer, size_t bufflen, const char* lfstr);
void (*PlayStartupSound)(const char* name);
}; };

View File

@ -396,7 +396,8 @@ static const int StrifeStartupPicSizes[4 + 2 + 1] =
static void ST_Sound(const char* sndname) static void ST_Sound(const char* sndname)
{ {
//S_Sound(CHAN_BODY, 0, sndname, 1, ATTN_NONE); if (sysCallbacks && sysCallbacks->PlayStartupSound)
sysCallbacks->PlayStartupSound(sndname);
} }
//========================================================================== //==========================================================================

View File

@ -2639,6 +2639,11 @@ static bool System_CaptureModeInGame()
} }
} }
static void System_PlayStartupSound(const char* sndname)
{
S_Sound(CHAN_BODY, 0, sndname, 1, ATTN_NONE);
}
//========================================================================== //==========================================================================
// //
// DoomSpecificInfo // DoomSpecificInfo