/***********************************************************
-* 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 <string.h>
#include <fcntl.h>
#endif
-#include "libgame.h"
+#include "system.h"
+#include "sound.h"
+#include "misc.h"
+
-#if 0
/* ========================================================================= */
/* exported variables */
/* ========================================================================= */
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;
int FrameCounter = 0;
-#endif
/* ========================================================================= */
/* init functions */
{
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;
{
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);
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;
}