* msdos.c *
***********************************************************/
-#ifdef MSDOS
+#include "platform.h"
+
+#if defined(PLATFORM_MSDOS)
#include "main.h"
#include "misc.h"
static BITMAP *Read_PCX_to_AllegroBitmap(char *);
-static void allegro_drivers()
+static void allegro_init_drivers()
{
int i;
last_joystick_state = 0;
joystick_event = FALSE;
+}
+static boolean allegro_init_audio()
+{
reserve_voices(MAX_SOUNDS_PLAYING, 0);
+
if (install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL) == -1)
if (install_sound(DIGI_SB, MIDI_NONE, NULL) == -1)
- sound_status = SOUND_OFF;
+ return FALSE;
+
+ return TRUE;
}
static boolean hide_mouse(Display *display, int x, int y,
display->mouse_ptr = mouse_bitmap;
allegro_init();
- allegro_drivers();
+ allegro_init_drivers();
set_color_depth(8);
/* force Windows 95 to switch to fullscreen mode */
return PCX_Success;
}
-int XpmReadFileToPixmap(Display *display, Drawable d, char *filename,
- Pixmap *pixmap_return, Pixmap *shapemask_return,
- XpmAttributes *attributes)
-{
- BITMAP *bitmap;
-
- if ((bitmap = Read_PCX_to_AllegroBitmap(filename)) == NULL)
- return XpmOpenFailed;
-
- *pixmap_return = (Pixmap)bitmap;
-
- return XpmSuccess;
-}
-
int XReadBitmapFile(Display *display, Drawable d, char *filename,
unsigned int *width_return, unsigned int *height_return,
Pixmap *bitmap_return,
keyboard_auto_repeat = FALSE;
}
+boolean MSDOSOpenAudio(void)
+{
+ return allegro_init_audio();
+}
+
+boolean MSDOSCloseAudio(void)
+{
+ /* nothing to be done here */
+}
+
void NetworkServer(int port, int serveronly)
{
Error(ERR_WARN, "networking not supported in DOS version");
}
-#endif /* MSDOS */
+#endif /* PLATFORM_MSDOS */