From e19a1238ded6a7c1389df0e9b58a7a56ea1882ef Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sun, 25 May 2008 08:19:31 +0000 Subject: [PATCH] Set sound distance to 0 for HUD sound taunts; Making Jukebox not crash if -nosound is enabled (should stop Jukebox since no digi system enabled); Lowered mouse axis speed a bit again; Increasing MAX_VECS to 5000 --- CHANGELOG.txt | 4 ++++ arch/sdl/digi_mixer.c | 5 ++++- arch/sdl/jukebox.c | 2 +- main/kconfig.c | 4 ++-- main/morph.h | 3 +-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b15b0f418..f2491c18b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20080825 +-------- +arch/sdl/digi_mixer.c, arch/sdl/jukebox.c, main/kconfig.c, main/morph.h: Set sound distance to 0 for HUD sound taunts; Making Jukebox not crash if -nosound is enabled (should stop Jukebox since no digi system enabled); Lowered mouse axis speed a bit again; Increasing MAX_VECS to 5000 + 20080524 -------- main/gr.c: Give render_frame call both arguments (compiler error) diff --git a/arch/sdl/digi_mixer.c b/arch/sdl/digi_mixer.c index 438717e59..71cf8a26a 100644 --- a/arch/sdl/digi_mixer.c +++ b/arch/sdl/digi_mixer.c @@ -147,7 +147,10 @@ int digi_mixer_start_sound(short soundnum, fix volume, int pan, int looping, int channel = Mix_PlayChannel(-1, &(SoundChunks[soundnum]), mix_loop); Mix_SetPanning(channel, 255-mix_pan, mix_pan); - Mix_SetDistance(channel, 255-mix_vol); + if (volume > F1_0) + Mix_SetDistance(channel, 0); + else + Mix_SetDistance(channel, 255-mix_vol); return channel; } diff --git a/arch/sdl/jukebox.c b/arch/sdl/jukebox.c index 29a2f27c2..bc60e094d 100644 --- a/arch/sdl/jukebox.c +++ b/arch/sdl/jukebox.c @@ -85,7 +85,7 @@ void jukebox_load() { jukebox_unload(); } - if (jukebox_loaded) + if (jukebox_loaded || GameArg.SndNoSound) return; if (GameCfg.JukeboxOn) { diff --git a/main/kconfig.c b/main/kconfig.c index 71c065d4b..3d561622b 100644 --- a/main/kconfig.c +++ b/main/kconfig.c @@ -1429,8 +1429,8 @@ void controls_read_all() if (CONTROL_USING_MOUSE) { //--------- Read Mouse ----------- mouse_get_delta( &dx, &dy, &dz ); - mouse_axis[0] = (dx*FrameTime)/10; - mouse_axis[1] = (dy*FrameTime)/10; + mouse_axis[0] = (dx*FrameTime)/25; + mouse_axis[1] = (dy*FrameTime)/25; mouse_axis[2] = (dz*FrameTime); mouse_buttons = mouse_get_btns(); use_mouse=1; diff --git a/main/morph.h b/main/morph.h index 1f7b73bf7..8bd7bd40b 100644 --- a/main/morph.h +++ b/main/morph.h @@ -1,4 +1,3 @@ -/* $Id: morph.h,v 1.1.1.1 2006/03/17 19:55:54 zicodxx Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -24,7 +23,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "object.h" -#define MAX_VECS 200 +#define MAX_VECS 5000 typedef struct morph_data { object *obj; // object which is morphing