X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmsdos.c;h=ec19ef6389c7d639c99f9106ef17826ff53de950;hb=de8b3ae622eae10f1caf96872fb1790f7bd9644b;hp=4c84010f90e4eb59daf90befa3f556a4fefe466a;hpb=dfe0a71a9939e0c55bb54dcc92db1749e8e21747;p=rocksndiamonds.git diff --git a/src/libgame/msdos.c b/src/libgame/msdos.c index 4c84010f..ec19ef63 100644 --- a/src/libgame/msdos.c +++ b/src/libgame/msdos.c @@ -1,7 +1,7 @@ /*********************************************************** * Artsoft Retro-Game Library * *----------------------------------------------------------* -* (c) 1994-2001 Artsoft Entertainment * +* (c) 1994-2002 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -54,12 +54,6 @@ static int global_colormap_entries_used = 0; boolean wait_for_vsync; -/* -extern int playing_sounds; -extern struct SoundControl playlist[MAX_SOUNDS_PLAYING]; -extern struct SoundControl emptySoundControl; -*/ - static BITMAP *Read_PCX_to_AllegroBitmap(char *); static void allegro_init_drivers() @@ -92,7 +86,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) @@ -303,7 +297,7 @@ Display *XOpenDisplay(char *display_name) Screen *screen; Display *display; BITMAP *mouse_bitmap = NULL; - char *mouse_filename =getCustomImageFilename(program.msdos_pointer_filename); + char *mouse_filename = getCustomImageFilename(program.msdos_cursor_filename); if ((mouse_bitmap = Read_PCX_to_AllegroBitmap(mouse_filename)) == NULL) return NULL; @@ -923,6 +917,14 @@ Pixel AllegroGetPixel(Drawable d, int x, int y) return getpixel((BITMAP *)d, x, y); } +void AllegroZoomBitmap(Drawable src, Drawable dst, + int src_width, int src_height, + int dst_width, int dst_height) +{ + stretch_blit((BITMAP *)src, (BITMAP *)dst, + 0, 0, src_width, src_height, 0, 0, dst_width, dst_height); +} + void MSDOSOpenAudio(void) { if (allegro_init_audio()) @@ -931,9 +933,13 @@ void MSDOSOpenAudio(void) audio.music_available = TRUE; audio.loops_available = TRUE; audio.sound_enabled = TRUE; - } - InitPlaylist(); + audio.num_channels = NUM_MIXER_CHANNELS; + audio.music_channel = MUSIC_CHANNEL; + audio.first_sound_channel = FIRST_SOUND_CHANNEL; + + Mixer_InitChannels(); + } } void MSDOSCloseAudio(void)