projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20030128-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
msdos.c
diff --git
a/src/libgame/msdos.c
b/src/libgame/msdos.c
index 5ca9768d383f2cefada32a00b221b6625411c205..9cd4ddcc6f0a162998437fe8527348195c8fddcb 100644
(file)
--- a/
src/libgame/msdos.c
+++ b/
src/libgame/msdos.c
@@
-1,7
+1,7
@@
/***********************************************************
* Artsoft Retro-Game Library *
*----------------------------------------------------------*
/***********************************************************
* Artsoft Retro-Game Library *
*----------------------------------------------------------*
-* (c) 1994-200
1
Artsoft Entertainment *
+* (c) 1994-200
2
Artsoft Entertainment *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
@@
-19,6
+19,7
@@
#include "sound.h"
#include "joystick.h"
#include "misc.h"
#include "sound.h"
#include "joystick.h"
#include "misc.h"
+#include "setup.h"
#include "pcx.h"
#define AllegroDefaultScreen() (display->screens[display->default_screen])
#include "pcx.h"
#define AllegroDefaultScreen() (display->screens[display->default_screen])
@@
-53,12
+54,6
@@
static int global_colormap_entries_used = 0;
boolean wait_for_vsync;
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()
static BITMAP *Read_PCX_to_AllegroBitmap(char *);
static void allegro_init_drivers()
@@
-91,7
+86,7
@@
static void allegro_init_drivers()
static boolean allegro_init_audio()
{
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)
if (install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL) == -1)
if (install_sound(DIGI_SB, MIDI_NONE, NULL) == -1)
@@
-302,9
+297,9
@@
Display *XOpenDisplay(char *display_name)
Screen *screen;
Display *display;
BITMAP *mouse_bitmap = NULL;
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));
return NULL;
screen = malloc(sizeof(Screen));
@@
-922,6
+917,14
@@
Pixel AllegroGetPixel(Drawable d, int x, int y)
return getpixel((BITMAP *)d, x, 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())
void MSDOSOpenAudio(void)
{
if (allegro_init_audio())
@@
-930,9
+933,13
@@
void MSDOSOpenAudio(void)
audio.music_available = TRUE;
audio.loops_available = TRUE;
audio.sound_enabled = TRUE;
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)
}
void MSDOSCloseAudio(void)