rnd-20020508-1-src
[rocksndiamonds.git] / src / libgame / msdos.c
index 5ca9768d383f2cefada32a00b221b6625411c205..ea75479de66edec7947d86a2a44315a4315e15e3 100644 (file)
@@ -19,6 +19,7 @@
 #include "sound.h"
 #include "joystick.h"
 #include "misc.h"
+#include "setup.h"
 #include "pcx.h"
 
 #define AllegroDefaultScreen() (display->screens[display->default_screen])
@@ -55,7 +56,7 @@ boolean wait_for_vsync;
 
 /*
 extern int playing_sounds;
-extern struct SoundControl playlist[MAX_SOUNDS_PLAYING];
+extern struct SoundControl playlist[NUM_MIXER_CHANNELS];
 extern struct SoundControl emptySoundControl;
 */
 
@@ -91,7 +92,7 @@ static void allegro_init_drivers()
 
 static boolean allegro_init_audio()
 {
-  reserve_voices(MAX_SOUNDS_PLAYING, 0);
+  reserve_voices(NUM_MIXER_CHANNELS, 0);
 
   if (install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL) == -1)
     if (install_sound(DIGI_SB, MIDI_NONE, NULL) == -1)
@@ -302,9 +303,9 @@ Display *XOpenDisplay(char *display_name)
   Screen *screen;
   Display *display;
   BITMAP *mouse_bitmap = NULL;
+  char *mouse_filename =getCustomImageFilename(program.msdos_pointer_filename);
 
-  mouse_bitmap = Read_PCX_to_AllegroBitmap(program.msdos_pointer_filename);
-  if (mouse_bitmap == NULL)
+  if ((mouse_bitmap = Read_PCX_to_AllegroBitmap(mouse_filename)) == NULL)
     return NULL;
 
   screen = malloc(sizeof(Screen));