From 1e4d3fd0343fa76d5d1e2803b33bb6faa97403d4 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 13 Aug 2002 01:53:00 +0200 Subject: [PATCH] rocksndiamonds-2.1.1 --- CHANGES | 9 ++++++++- src/Makefile | 2 +- src/conftime.h | 2 +- src/libgame/platform.h | 4 ++-- src/libgame/sound.c | 22 ++++++++++++---------- src/libgame/system.h | 5 +++++ 6 files changed, 29 insertions(+), 15 deletions(-) diff --git a/CHANGES b/CHANGES index 3098e6c4..36357767 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,12 @@ -Release Version 2.1.1 [?? ??? ????] +Release Version 2.1.1 [13 AUG 2002] ----------------------------------- + - sound bug (causing crashes) fixed (reported by Keith Peterston) + - support for /dev/sound/dsp (devfs) added (thanks to Christoph Bauer) + - small NetBSD compilation bug fixed (thanks to Adam Ciarcinski) + - default keys for "snap field" and "place bomb" fixed for Mac OS X + - added new contributed levels from the following players: + + Alan Bond + + Gerrit Holl Release Version 2.1.0 [05 AUG 2002] ----------------------------------- diff --git a/src/Makefile b/src/Makefile index 9c22aba9..609d753f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -102,7 +102,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR) CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK) -DEBUG = -DDEBUG -g +# DEBUG = -DDEBUG -g # PROFILING = $(PROFILING_FLAGS) # OPTIONS = $(DEBUG) -Wall # only for debugging purposes diff --git a/src/conftime.h b/src/conftime.h index 371d0366..5cfe6cf0 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-08-10 15:36]" +#define COMPILE_DATE_STRING "[2002-08-13 01:52]" diff --git a/src/libgame/platform.h b/src/libgame/platform.h index 94c5c4a8..61ab27f6 100644 --- a/src/libgame/platform.h +++ b/src/libgame/platform.h @@ -66,8 +66,8 @@ #define PLATFORM_BSDI #endif -#if defined(sparc) || defined(sun) -#define PLATFORM_SOLARIS +#if defined(sparc) && defined(sun) +#define PLATFORM_SUNOS #endif #if defined(__APPLE__) && defined(__MACH__) diff --git a/src/libgame/sound.c b/src/libgame/sound.c index e7cd6461..6f485766 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -66,6 +66,7 @@ #define MUS_TYPE_MOD 2 #define DEVICENAME_DSP "/dev/dsp" +#define DEVICENAME_SOUND_DSP "/dev/sound/dsp" #define DEVICENAME_AUDIO "/dev/audio" #define DEVICENAME_AUDIOCTL "/dev/audioCtl" @@ -234,6 +235,7 @@ static boolean TestAudioDevices(void) static char *audio_device_name[] = { DEVICENAME_DSP, + DEVICENAME_SOUND_DSP, DEVICENAME_AUDIO }; int audio_device_fd = -1; @@ -350,7 +352,7 @@ static void InitAudioDevice_Linux(struct AudioFormatInfo *afmt) if (ioctl(audio.device_fd, SNDCTL_DSP_SETFRAGMENT, &fragment_spec) < 0) Error(ERR_EXIT_SOUND_SERVER, - "cannot set fragment size of /dev/dsp -- no sounds"); + "cannot set fragment size of audio device -- no sounds"); i = 0; afmt->format = 0; @@ -366,7 +368,7 @@ static void InitAudioDevice_Linux(struct AudioFormatInfo *afmt) if (afmt->format == 0) /* no supported audio format found */ Error(ERR_EXIT_SOUND_SERVER, - "cannot set audio format of /dev/dsp -- no sounds"); + "cannot set audio format of audio device -- no sounds"); /* try if we can use stereo sound */ afmt->stereo = TRUE; @@ -375,15 +377,15 @@ static void InitAudioDevice_Linux(struct AudioFormatInfo *afmt) if (ioctl(audio.device_fd, SNDCTL_DSP_SPEED, &afmt->sample_rate) < 0) Error(ERR_EXIT_SOUND_SERVER, - "cannot set sample rate of /dev/dsp -- no sounds"); + "cannot set sample rate of audio device -- no sounds"); /* get the real fragmentation size; this should return 512 */ if (ioctl(audio.device_fd, SNDCTL_DSP_GETBLKSIZE, &fragment_size_query) < 0) Error(ERR_EXIT_SOUND_SERVER, - "cannot get fragment size of /dev/dsp -- no sounds"); + "cannot get fragment size of audio device -- no sounds"); if (fragment_size_query != afmt->fragment_size) Error(ERR_EXIT_SOUND_SERVER, - "cannot set fragment size of /dev/dsp -- no sounds"); + "cannot set fragment size of audio device -- no sounds"); } #endif /* AUDIO_LINUX_IOCTL */ @@ -397,8 +399,8 @@ static void InitAudioDevice_NetBSD(struct AudioFormatInfo *afmt) a_info.play.encoding = AUDIO_ENCODING_LINEAR8; a_info.play.precision = 8; a_info.play.channels = 2; - a_info.play.sample_rate = sample_rate; - a_info.blocksize = fragment_size; + a_info.play.sample_rate = afmt->sample_rate; + a_info.blocksize = afmt->fragment_size; afmt->format = AUDIO_FORMAT_U8; afmt->stereo = TRUE; @@ -412,7 +414,7 @@ static void InitAudioDevice_NetBSD(struct AudioFormatInfo *afmt) if (ioctl(audio.device_fd, AUDIO_SETINFO, &a_info) < 0) Error(ERR_EXIT_SOUND_SERVER, - "cannot set sample rate of /dev/audio -- no sounds"); + "cannot set sample rate of audio device -- no sounds"); } } #endif /* PLATFORM_NETBSD */ @@ -425,7 +427,7 @@ static void InitAudioDevice_HPUX(struct AudioFormatInfo *afmt) audio_ctl = open("/dev/audioCtl", O_WRONLY | O_NDELAY); if (audio_ctl == -1) - Error(ERR_EXIT_SOUND_SERVER, "cannot open /dev/audioCtl -- no sounds"); + Error(ERR_EXIT_SOUND_SERVER, "cannot open audio device -- no sounds"); if (ioctl(audio_ctl, AUDIO_DESCRIBE, &ainfo) == -1) Error(ERR_EXIT_SOUND_SERVER, "no audio info -- no sounds"); @@ -916,7 +918,7 @@ static void Mixer_InsertSound(SoundControl snd_ctrl) library, we use the current playing time (in milliseconds) instead. */ #if DEBUG - /* Channel sanity check -- this should normally not be needed */ + /* channel allocation sanity check -- should not be needed */ if (mixer_active_channels == audio.num_channels - (mixer[audio.music_channel].active ? 0 : 1)) { diff --git a/src/libgame/system.h b/src/libgame/system.h index 0f6d5e2b..743a8b9b 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -51,8 +51,13 @@ #define DEFAULT_KEY_RIGHT KSYM_Right #define DEFAULT_KEY_UP KSYM_Up #define DEFAULT_KEY_DOWN KSYM_Down +#if defined(PLATFORM_MACOSX) +#define DEFAULT_KEY_SNAP KSYM_Control_L +#define DEFAULT_KEY_BOMB KSYM_KP_Enter +#else #define DEFAULT_KEY_SNAP KSYM_Shift_L #define DEFAULT_KEY_BOMB KSYM_Shift_R +#endif #define DEFAULT_KEY_OKAY KSYM_Return #define DEFAULT_KEY_CANCEL KSYM_Escape -- 2.34.1