From 4e846f8d665965dcc1e6ca01671d2c6a29aa3b8a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 26 Aug 2020 20:19:54 +0200 Subject: [PATCH] - do not print game init messages to the notify display. --- source/build/src/defs.cpp | 4 ++-- source/common/audio/sound/s_sound.cpp | 1 + source/common/audio/sound/s_soundinternal.h | 1 + source/core/raze_sound.cpp | 1 + source/exhumed/src/exhumed.cpp | 2 +- source/exhumed/src/sound.h | 2 +- source/games/duke/src/game.cpp | 2 +- source/sw/src/game.cpp | 2 +- 8 files changed, 9 insertions(+), 6 deletions(-) diff --git a/source/build/src/defs.cpp b/source/build/src/defs.cpp index e6324163c..06a25e50b 100644 --- a/source/build/src/defs.cpp +++ b/source/build/src/defs.cpp @@ -3447,7 +3447,7 @@ int32_t loaddefinitionsfile(const char *fn) if (script) { - Printf("Loading \"%s\"\n",fn); + Printf(PRINT_NONOTIFY, "Loading \"%s\"\n",fn); defsparser(script); } @@ -3468,7 +3468,7 @@ int32_t loaddefinitionsfile(const char *fn) if (!script) return -1; - Printf("\n"); + Printf(PRINT_NONOTIFY, "\n"); return 0; } diff --git a/source/common/audio/sound/s_sound.cpp b/source/common/audio/sound/s_sound.cpp index 102131fdf..f92a7d830 100644 --- a/source/common/audio/sound/s_sound.cpp +++ b/source/common/audio/sound/s_sound.cpp @@ -588,6 +588,7 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source, chan->Priority = basepriority; chan->DistanceScale = float(attenuation); chan->SourceType = type; + chan->UserData = 0; if (type == SOURCE_Unattached) { chan->Point[0] = pt->X; chan->Point[1] = pt->Y; chan->Point[2] = pt->Z; diff --git a/source/common/audio/sound/s_soundinternal.h b/source/common/audio/sound/s_soundinternal.h index 777833895..1710dc95e 100644 --- a/source/common/audio/sound/s_soundinternal.h +++ b/source/common/audio/sound/s_soundinternal.h @@ -164,6 +164,7 @@ struct FSoundChan : public FISoundChannel FSoundID OrgID; // Sound ID of sound used to start this channel. float Volume; int EntChannel; // Actor's sound channel. + int UserData; // Not used by the engine, the caller can use this to store some additional info. int16_t Pitch; // Pitch variation. int16_t NearLimit; int8_t Priority; diff --git a/source/core/raze_sound.cpp b/source/core/raze_sound.cpp index 25396794f..4020f1b0a 100644 --- a/source/core/raze_sound.cpp +++ b/source/core/raze_sound.cpp @@ -174,6 +174,7 @@ static FSerializer& Serialize(FSerializer& arc, const char* key, FSoundChan& cha ("rolloffmin", chan.Rolloff.MinDistance) ("rolloffmax", chan.Rolloff.MaxDistance) ("limitrange", chan.LimitRange) + ("userdata", chan.UserData) .Array("point", chan.Point, 3); int SourceIndex = 0; diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index e127d9500..c6503008e 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -611,7 +611,7 @@ void GameInterface::app_init() if (!loaddefinitionsfile(defsfile)) { uint32_t etime = I_msTime(); - Printf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime); + Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime); } diff --git a/source/exhumed/src/sound.h b/source/exhumed/src/sound.h index a5583e362..9e33e6b04 100644 --- a/source/exhumed/src/sound.h +++ b/source/exhumed/src/sound.h @@ -133,7 +133,7 @@ int LoadSound(const char* sound); void BendAmbientSound(); void CheckAmbience(short nSector); -void PlayFX2(unsigned short nSound, short nSprite); +void PlayFX2(unsigned short nSound, short nSprite, int sectf = 0); void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector); inline void D3PlayFX(unsigned short nSound, short nVal) { diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index f07caaef4..7fc48316f 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -284,7 +284,7 @@ static void loaddefs() if (!loaddefinitionsfile(defsfile)) { deftimer.Unclock(); - Printf("Definitions file \"%s\" loaded in %.3f ms.\n", defsfile, deftimer.TimeMS()); + Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %.3f ms.\n", defsfile, deftimer.TimeMS()); } userConfig.AddDefs.reset(); } diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 3a68114ab..edf851112 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -276,7 +276,7 @@ void GameInterface::app_init() if (!SW_SHAREWARE) LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information - if (!loaddefinitionsfile(G_DefFile())) Printf("Definitions file loaded.\n"); + if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n"); userConfig.AddDefs.reset(); enginePostInit(); videoInit();