projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20001129-1-src
[rocksndiamonds.git]
/
src
/
msdos.c
diff --git
a/src/msdos.c
b/src/msdos.c
index 181a9f1ada1712bd03ff9bf7ab8172a55dcef1b3..2f672ed332ac856c128d5affeddae64ac288bf72 100644
(file)
--- a/
src/msdos.c
+++ b/
src/msdos.c
@@
-63,7
+63,7
@@
extern struct SoundControl emptySoundControl;
static BITMAP *Read_PCX_to_AllegroBitmap(char *);
static BITMAP *Read_PCX_to_AllegroBitmap(char *);
-static void allegro_drivers()
+static void allegro_
init_
drivers()
{
int i;
{
int i;
@@
-89,12
+89,17
@@
static void allegro_drivers()
last_joystick_state = 0;
joystick_event = FALSE;
last_joystick_state = 0;
joystick_event = FALSE;
+}
- sysinfo.audio_available = TRUE;
+static boolean allegro_init_audio()
+{
reserve_voices(MAX_SOUNDS_PLAYING, 0);
reserve_voices(MAX_SOUNDS_PLAYING, 0);
+
if (install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL) == -1)
if (install_sound(DIGI_SB, MIDI_NONE, NULL) == -1)
if (install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL) == -1)
if (install_sound(DIGI_SB, MIDI_NONE, NULL) == -1)
- sysinfo.audio_available = FALSE;
+ return FALSE;
+
+ return TRUE;
}
static boolean hide_mouse(Display *display, int x, int y,
}
static boolean hide_mouse(Display *display, int x, int y,
@@
-325,7
+330,7
@@
Display *XOpenDisplay(char *display_name)
display->mouse_ptr = mouse_bitmap;
allegro_init();
display->mouse_ptr = mouse_bitmap;
allegro_init();
- allegro_drivers();
+ allegro_
init_
drivers();
set_color_depth(8);
/* force Windows 95 to switch to fullscreen mode */
set_color_depth(8);
/* force Windows 95 to switch to fullscreen mode */
@@
-915,6
+920,11
@@
void XAutoRepeatOff(Display *display)
keyboard_auto_repeat = FALSE;
}
keyboard_auto_repeat = FALSE;
}
+boolean MSDOSInitAudio(void)
+{
+ return allegro_init_audio();
+}
+
void NetworkServer(int port, int serveronly)
{
Error(ERR_WARN, "networking not supported in DOS version");
void NetworkServer(int port, int serveronly)
{
Error(ERR_WARN, "networking not supported in DOS version");