X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=eff8576cf417ccf793b11304a209ebe58cf32b80;hb=ff56a43aa3799aa3357f4deca4d6482fc25a6a41;hp=0304be812529fa19b895a5eb9d59bbd11e3db7bb;hpb=94b124e87edbd2e12d7b83f45254fcbfff8554cd;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 0304be81..eff8576c 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1,15 +1,14 @@ /*********************************************************** -* Rocks'n'Diamonds -- McDuffin Strikes Back! * +* Artsoft Retro-Game Library * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1994-2000 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * *----------------------------------------------------------* -* system.c * +* system.c * ***********************************************************/ #include @@ -20,9 +19,11 @@ #include #endif -#include "libgame.h" +#include "system.h" +#include "sound.h" +#include "misc.h" + -#if 0 /* ========================================================================= */ /* exported variables */ /* ========================================================================= */ @@ -33,6 +34,9 @@ struct VideoSystemInfo video; struct AudioSystemInfo audio; struct GfxInfo gfx; +struct LevelDirInfo *leveldir_first = NULL; +struct LevelDirInfo *leveldir_current = NULL; + Display *display = NULL; Visual *visual = NULL; int screen = 0; @@ -50,7 +54,6 @@ int redraw_tiles = 0; int FrameCounter = 0; -#endif /* ========================================================================= */ /* init functions */ @@ -431,6 +434,7 @@ inline boolean OpenAudio(struct AudioSystemInfo *audio) { audio->sound_available = FALSE; audio->loops_available = FALSE; + audio->sound_enabled = FALSE; audio->soundserver_pipe[0] = audio->soundserver_pipe[1] = 0; audio->soundserver_pid = 0; audio->device_name = NULL; @@ -441,12 +445,14 @@ inline boolean OpenAudio(struct AudioSystemInfo *audio) { audio->sound_available = TRUE; audio->loops_available = TRUE; + audio->sound_enabled = TRUE; } #elif defined(PLATFORM_MSDOS) if (MSDOSOpenAudio()) { audio->sound_available = TRUE; audio->loops_available = TRUE; + audio->sound_enabled = TRUE; } #elif defined(PLATFORM_UNIX) UnixOpenAudio(audio); @@ -467,6 +473,15 @@ inline void CloseAudio(struct AudioSystemInfo *audio) audio->sound_available = FALSE; audio->loops_available = FALSE; + audio->sound_enabled = FALSE; +} + +inline void SetAudioMode(boolean enabled) +{ + if (!audio.sound_available) + return; + + audio.sound_enabled = enabled; }