rnd-20001128-1-src
[rocksndiamonds.git] / src / game.c
index 0b731c327dc35ad1276082b0193367580f70fac3..1f3aca0024d71c3808c3be9853326d37586b7f1b 100644 (file)
@@ -167,10 +167,10 @@ static unsigned int getStateCheckSum(int counter)
 
 void GetPlayerConfig()
 {
-  if (sound_status == SOUND_OFF)
+  if (!sysinfo.audio_available)
     setup.sound = FALSE;
 
-  if (!sound_loops_allowed)
+  if (!sysinfo.audio_loops_available)
   {
     setup.sound_loops = FALSE;
     setup.sound_music = FALSE;
@@ -505,7 +505,7 @@ void InitGame()
 
   network_player_action_received = FALSE;
 
-#if !defined(MSDOS) && !defined(WIN32)
+#if defined(PLATFORM_UNIX)
   /* initial null action */
   if (network_playing)
     SendToServer_MovePlayer(MV_NO_MOVING);
@@ -513,7 +513,6 @@ void InitGame()
 
   ZX = ZY = -1;
 
-  game.yam_content_nr = 0;
   FrameCounter = 0;
   TimeFrames = 0;
   TimePlayed = 0;
@@ -526,6 +525,8 @@ void InitGame()
   ScrollStepSize = 0;  /* will be correctly initialized by ScrollScreen() */
 
   AllPlayersGone = FALSE;
+
+  game.yam_content_nr = 0;
   game.magic_wall_active = FALSE;
   game.magic_wall_time_left = 0;
   game.light_time_left = 0;
@@ -4242,7 +4243,7 @@ void GameActions()
 #endif
     */
 
-#if !defined(MSDOS) && !defined(WIN32)
+#if defined(PLATFORM_UNIX)
     /* last chance to get network player actions without main loop delay */
     HandleNetworking();
 #endif
@@ -4279,7 +4280,7 @@ void GameActions()
       stored_player[i].effective_action = stored_player[i].action;
   }
 
-#if !defined(MSDOS) && !defined(WIN32)
+#if defined(PLATFORM_UNIX)
   if (network_playing)
     SendToServer_MovePlayer(summarized_player_action);
 #endif
@@ -5949,7 +5950,7 @@ void PlaySoundLevel(int x, int y, int sound_nr)
 
   volume = PSND_MAX_VOLUME;
 
-#ifndef MSDOS
+#if !defined(PLATFORM_MSDOS)
   stereo = (sx - SCR_FIELDX/2) * 12;
 #else
   stereo = PSND_MIDDLE + (2 * sx - (SCR_FIELDX - 1)) * 5;
@@ -6183,7 +6184,7 @@ static void HandleGameButtons(struct GadgetInfo *gi)
          Request("Do you really want to quit the game ?",
                  REQ_ASK | REQ_STAY_CLOSED))
       { 
-#if !defined(MSDOS) && !defined(WIN32)
+#if defined(PLATFORM_UNIX)
        if (options.network)
          SendToServer_StopPlaying();
        else
@@ -6200,7 +6201,7 @@ static void HandleGameButtons(struct GadgetInfo *gi)
     case GAME_CTRL_ID_PAUSE:
       if (options.network)
       {
-#if !defined(MSDOS) && !defined(WIN32)
+#if defined(PLATFORM_UNIX)
        if (tape.pausing)
          SendToServer_ContinuePlaying();
        else
@@ -6214,7 +6215,7 @@ static void HandleGameButtons(struct GadgetInfo *gi)
     case GAME_CTRL_ID_PLAY:
       if (tape.pausing)
       {
-#if !defined(MSDOS) && !defined(WIN32)
+#if defined(PLATFORM_UNIX)
        if (options.network)
          SendToServer_ContinuePlaying();
        else
@@ -6232,7 +6233,7 @@ static void HandleGameButtons(struct GadgetInfo *gi)
        setup.sound_music = FALSE;
        FadeSound(background_loop[level_nr % num_bg_loops]);
       }
-      else if (sound_loops_allowed)
+      else if (sysinfo.audio_loops_available)
       { 
        setup.sound = setup.sound_music = TRUE;
        PlaySoundLoop(background_loop[level_nr % num_bg_loops]);
@@ -6242,14 +6243,14 @@ static void HandleGameButtons(struct GadgetInfo *gi)
     case SOUND_CTRL_ID_LOOPS:
       if (setup.sound_loops)
        setup.sound_loops = FALSE;
-      else if (sound_loops_allowed)
+      else if (sysinfo.audio_loops_available)
        setup.sound = setup.sound_loops = TRUE;
       break;
 
     case SOUND_CTRL_ID_SIMPLE:
       if (setup.sound_simple)
        setup.sound_simple = FALSE;
-      else if (sound_status==SOUND_AVAILABLE)
+      else if (sysinfo.audio_available)
        setup.sound = setup.sound_simple = TRUE;
       break;