From 75e55ab32114eeaa7a3299166227e0097d135f77 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Mon, 17 May 2010 23:34:57 +0200 Subject: games/jfsw: fix patches that got screwed up on import to git --- games/jfsw/patches/disable_ambience.patch | 88 +++++----- games/jfsw/patches/jfbuild_src_20051009.patch | 48 +++--- games/jfsw/patches/jfsw_src_20051009.patch | 240 +++++++++++++------------- 3 files changed, 188 insertions(+), 188 deletions(-) (limited to 'games/jfsw') diff --git a/games/jfsw/patches/disable_ambience.patch b/games/jfsw/patches/disable_ambience.patch index 659dff413d..221af6152d 100644 --- a/games/jfsw/patches/disable_ambience.patch +++ b/games/jfsw/patches/disable_ambience.patch @@ -2,60 +2,60 @@ diff -Naur jfsw_src_20051009.orig/source/game.c jfsw_src_20051009/source/game.c --- jfsw_src_20051009.orig/source/game.c 2005-10-09 15:28:24.000000000 -0400 +++ jfsw_src_20051009/source/game.c 2010-02-09 00:08:14.000000000 -0500 @@ -197,7 +197,7 @@ - TRUE, // fx on - TRUE, // Music on - TRUE, // talking --TRUE, // ambient -+FALSE, // ambient - FALSE, // Flip Stereo - - // Network game settings + TRUE, // fx on + TRUE, // Music on + TRUE, // talking +-TRUE, // ambient ++FALSE, // ambient + FALSE, // Flip Stereo + + // Network game settings diff -Naur jfsw_src_20051009.orig/source/menus.c jfsw_src_20051009/source/menus.c --- jfsw_src_20051009.orig/source/menus.c 2005-10-09 15:28:24.000000000 -0400 +++ jfsw_src_20051009/source/menus.c 2010-02-09 00:26:35.000000000 -0500 @@ -196,7 +196,7 @@ - {DefInert(0, NULL), OPT_XSIDE, OPT_LINE(3), 0, m_defshade, 0, NULL, NULL, NULL}, - - //{DefButton(btn_talking, 0, "Talking"), OPT_XS, OPT_LINE(4), 1, m_defshade, 0, NULL, MNU_FxCheck, NULL}, -- {DefButton(btn_ambience, 0, "Ambience"), OPT_XS, OPT_LINE(4), 1, m_defshade, 0, NULL, MNU_FxCheck, NULL}, -+ {DefButton(btn_ambience, 0, "Ambience"), OPT_XS, OPT_LINE(4), 1, m_defshade, 0, NULL, MNU_DisableButton, NULL}, - {DefButton(btn_flipstereo, 0, "Flip Stereo"), OPT_XS, OPT_LINE(5), 1, m_defshade, 0, NULL, MNU_FxCheck, NULL}, - //{DefButton(btn_playcd, 0, "Play CD"), OPT_XS, OPT_LINE(6), 1, m_defshade, 0, NULL, NULL, NULL}, - {DefNone} + {DefInert(0, NULL), OPT_XSIDE, OPT_LINE(3), 0, m_defshade, 0, NULL, NULL, NULL}, + + //{DefButton(btn_talking, 0, "Talking"), OPT_XS, OPT_LINE(4), 1, m_defshade, 0, NULL, MNU_FxCheck, NULL}, +- {DefButton(btn_ambience, 0, "Ambience"), OPT_XS, OPT_LINE(4), 1, m_defshade, 0, NULL, MNU_FxCheck, NULL}, ++ {DefButton(btn_ambience, 0, "Ambience"), OPT_XS, OPT_LINE(4), 1, m_defshade, 0, NULL, MNU_DisableButton, NULL}, + {DefButton(btn_flipstereo, 0, "Flip Stereo"), OPT_XS, OPT_LINE(5), 1, m_defshade, 0, NULL, MNU_FxCheck, NULL}, + //{DefButton(btn_playcd, 0, "Play CD"), OPT_XS, OPT_LINE(6), 1, m_defshade, 0, NULL, NULL, NULL}, + {DefNone} @@ -2695,6 +2695,13 @@ - } - - BOOL -+MNU_DisableButton(MenuItem *item) -+ { -+ SET(item->flags, mf_disabled); -+ return (TRUE); -+ } -+ -+BOOL - MNU_FxCheck(MenuItem *item) - { - if (FXDevice < 0 || !FxInitialized) + } + + BOOL ++MNU_DisableButton(MenuItem *item) ++ { ++ SET(item->flags, mf_disabled); ++ return (TRUE); ++ } ++ ++BOOL + MNU_FxCheck(MenuItem *item) + { + if (FXDevice < 0 || !FxInitialized) diff -Naur jfsw_src_20051009.orig/source/menus.h jfsw_src_20051009/source/menus.h --- jfsw_src_20051009.orig/source/menus.h 2005-10-09 15:28:24.000000000 -0400 +++ jfsw_src_20051009/source/menus.h 2010-02-09 00:27:29.000000000 -0500 @@ -289,6 +289,7 @@ - - BOOL MNU_MusicFxCheck(MenuItem_p item); - BOOL MNU_MusicCheck(MenuItem_p item); -+BOOL MNU_DisableButton(MenuItem_p item); - BOOL MNU_FxCheck(MenuItem_p item); - BOOL MNU_MouseCheck(MenuItem_p item); - BOOL MNU_BorderCheck(MenuItem_p item); + + BOOL MNU_MusicFxCheck(MenuItem_p item); + BOOL MNU_MusicCheck(MenuItem_p item); ++BOOL MNU_DisableButton(MenuItem_p item); + BOOL MNU_FxCheck(MenuItem_p item); + BOOL MNU_MouseCheck(MenuItem_p item); + BOOL MNU_BorderCheck(MenuItem_p item); diff -Naur jfsw_src_20051009.orig/source/swconfig.c jfsw_src_20051009/source/swconfig.c --- jfsw_src_20051009.orig/source/swconfig.c 2005-10-09 15:28:24.000000000 -0400 +++ jfsw_src_20051009/source/swconfig.c 2010-02-09 00:09:21.000000000 -0500 @@ -170,7 +170,7 @@ - - dummy = -1; - SCRIPT_GetNumber( scripthandle, "Options", "Ambient",&dummy); -- if (dummy != -1) gs.Ambient = dummy; -+ gs.Ambient = 0; - - dummy = -1; - SCRIPT_GetNumber( scripthandle, "Options", "FxOn",&dummy); + + dummy = -1; + SCRIPT_GetNumber( scripthandle, "Options", "Ambient",&dummy); +- if (dummy != -1) gs.Ambient = dummy; ++ gs.Ambient = 0; + + dummy = -1; + SCRIPT_GetNumber( scripthandle, "Options", "FxOn",&dummy); diff --git a/games/jfsw/patches/jfbuild_src_20051009.patch b/games/jfsw/patches/jfbuild_src_20051009.patch index 653013043a..5cf0cb2feb 100644 --- a/games/jfsw/patches/jfbuild_src_20051009.patch +++ b/games/jfsw/patches/jfbuild_src_20051009.patch @@ -2,14 +2,14 @@ diff -Nur jfbuild_src_20051009.orig/include/editor.h jfbuild_src_20051009/includ --- jfbuild_src_20051009.orig/include/editor.h 2005-10-09 15:23:02.000000000 +0200 +++ jfbuild_src_20051009/include/editor.h 2005-10-10 15:06:18.000000000 +0200 @@ -18,7 +18,7 @@ - - extern short temppicnum, tempcstat, templotag, temphitag, tempextra; - extern char tempshade, temppal, tempxrepeat, tempyrepeat; --extern char somethingintab; -+static char somethingintab; - - extern char buildkeys[NUMBUILDKEYS]; - + + extern short temppicnum, tempcstat, templotag, temphitag, tempextra; + extern char tempshade, temppal, tempxrepeat, tempyrepeat; +-extern char somethingintab; ++static char somethingintab; + + extern char buildkeys[NUMBUILDKEYS]; + diff -Nur jfbuild_src_20051009.orig/Makefile jfbuild_src_20051009/Makefile --- jfbuild_src_20051009.orig/Makefile 2005-10-09 15:23:00.000000000 +0200 +++ jfbuild_src_20051009/Makefile 2005-10-10 15:06:22.000000000 +0200 @@ -38,22 +38,22 @@ diff -Nur jfbuild_src_20051009.orig/src/crc32.c jfbuild_src_20051009/src/crc32.c --- jfbuild_src_20051009.orig/src/crc32.c 2005-10-09 15:23:00.000000000 +0200 +++ jfbuild_src_20051009/src/crc32.c 2005-10-10 15:06:18.000000000 +0200 @@ -73,16 +73,6 @@ - } - } - -- --unsigned long crc32(unsigned char *blk, unsigned long len) --{ -- unsigned long crc; -- -- crc32init(&crc); -- crc32block(&crc, blk, len); -- return crc32finish(&crc); --} -- - void crc32init(unsigned long *crcvar) - { - if (!crcvar) return; + } + } + +- +-unsigned long crc32(unsigned char *blk, unsigned long len) +-{ +- unsigned long crc; +- +- crc32init(&crc); +- crc32block(&crc, blk, len); +- return crc32finish(&crc); +-} +- + void crc32init(unsigned long *crcvar) + { + if (!crcvar) return; diff -Nur jfbuild_src_20051009.orig/src/sdlayer.c jfbuild_src_20051009/src/sdlayer.c --- jfbuild_src_20051009.orig/src/sdlayer.c 2005-10-09 15:23:00.000000000 +0200 +++ jfbuild_src_20051009/src/sdlayer.c 2005-10-10 15:06:22.000000000 +0200 diff --git a/games/jfsw/patches/jfsw_src_20051009.patch b/games/jfsw/patches/jfsw_src_20051009.patch index 0d0efeb4ca..53f928992f 100644 --- a/games/jfsw/patches/jfsw_src_20051009.patch +++ b/games/jfsw/patches/jfsw_src_20051009.patch @@ -2,34 +2,34 @@ diff -Nur jfsw_src_20051009.orig/Makefile jfsw_src_20051009/Makefile --- jfsw_src_20051009.orig/Makefile 2005-10-09 15:28:24.000000000 +0200 +++ jfsw_src_20051009/Makefile 2005-10-10 15:02:08.000000000 +0200 @@ -12,7 +12,7 @@ - NOASM = 0 - - # Debugging options --RELEASE?=0 -+RELEASE?=1 - - # build locations - SRC=source/ + NOASM = 0 + + # Debugging options +-RELEASE?=0 ++RELEASE?=1 + + # build locations + SRC=source/ @@ -56,11 +56,8 @@ - AUDIOLIB_FX=$(OBJ)mv_mix.$o \ - $(OBJ)mv_mix16.$o \ - $(OBJ)mvreverb.$o \ -- $(OBJ)pitch.$o \ -- $(OBJ)multivoc.$o \ - $(OBJ)ll_man.$o \ -- $(OBJ)fx_man.$o \ -- $(OBJ)dsoundout.$o -+ $(OBJ)fx_man.$o - AUDIOLIB_MUSIC=$(OBJ)midi.$o \ - $(OBJ)mpu401.$o \ - $(OBJ)music.$o + AUDIOLIB_FX=$(OBJ)mv_mix.$o \ + $(OBJ)mv_mix16.$o \ + $(OBJ)mvreverb.$o \ +- $(OBJ)pitch.$o \ +- $(OBJ)multivoc.$o \ + $(OBJ)ll_man.$o \ +- $(OBJ)fx_man.$o \ +- $(OBJ)dsoundout.$o ++ $(OBJ)fx_man.$o + AUDIOLIB_MUSIC=$(OBJ)midi.$o \ + $(OBJ)mpu401.$o \ + $(OBJ)music.$o @@ -157,9 +154,16 @@ - EDITOROBJS+= $(OBJ)buildres.$o - endif - --ifeq ($(RENDERTYPE),SDL) -- override CFLAGS+= $(subst -Dmain=SDL_main,,$(shell sdl-config --cflags)) -- AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) + EDITOROBJS+= $(OBJ)buildres.$o + endif + +-ifeq ($(RENDERTYPE),SDL) +- override CFLAGS+= $(subst -Dmain=SDL_main,,$(shell sdl-config --cflags)) +- AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) +ifeq ($(RENDERTYPE),SDL) + override CFLAGS+= $(subst -Dmain=SDL_main,,$(shell sdl-config --cflags) -D__cdecl=" ") + LIBS+= $(shell sdl-config --libs) -lSDL_mixer @@ -39,78 +39,78 @@ diff -Nur jfsw_src_20051009.orig/Makefile jfsw_src_20051009/Makefile + $(OBJ)unixvoc.$o + + AUDIOLIB_MUSIC=$(OBJ)sdlmusic.$o $(OBJ)unixglob.$o -+ AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) - - ifeq (1,$(HAVE_GTK2)) - override CFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0) ++ AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) + + ifeq (1,$(HAVE_GTK2)) + override CFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0) @@ -170,7 +174,11 @@ - GAMEOBJS+= $(OBJ)game_icon.$o - EDITOROBJS+= $(OBJ)build_icon.$o - endif --ifeq ($(RENDERTYPE),WIN) + GAMEOBJS+= $(OBJ)game_icon.$o + EDITOROBJS+= $(OBJ)build_icon.$o + endif +-ifeq ($(RENDERTYPE),WIN) +ifeq ($(RENDERTYPE),WIN) + AUDIOLIB_FX+= $(OBJ)audiolib_fx_fmod.$o \ + $(OBJ)dsoundout.$o \ + $(OBJ)pitch.$o \ -+ $(OBJ)multivoc.$o - AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) - endif - ++ $(OBJ)multivoc.$o + AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) + endif + diff -Nur jfsw_src_20051009.orig/Makefile.deps jfsw_src_20051009/Makefile.deps --- jfsw_src_20051009.orig/Makefile.deps 2005-10-09 15:28:24.000000000 +0200 +++ jfsw_src_20051009/Makefile.deps 2005-10-10 15:02:08.000000000 +0200 @@ -95,6 +95,11 @@ - $(OBJ)animlib.$o: $(SRC)jmact/animlib.c $(SRC)jmact/types.h $(SRC)jmact/develop.h $(SRC)jmact/util_lib.h $(SRC)jmact/animlib.h - - # jAudioLib objects -+$(OBJ)dsl.$o: $(SRC)jaudiolib/dsl.c $(SRC)jaudiolib/util.h -+$(OBJ)nodpmi.$o: $(SRC)jaudiolib/nodpmi.c $(SRC)jaudiolib/dpmi.h -+$(OBJ)unixpitch.$o: $(SRC)jaudiolib/unixpitch.c $(SRC)jaudiolib/pitch.h -+$(OBJ)unixvoc.$o: $(SRC)jaudiolib/unixvoc.c $(SRC)jaudiolib/usrhooks.h $(SRC)jaudiolib/linklist.h $(SRC)jaudiolib/pitch.h $(SRC)jaudiolib/multivoc.h $(SRC)jaudiolib/_multivc.h -+ - $(OBJ)audiolib_fxstub.$o: $(SRC)jaudiolib/audiolib_fxstub.c $(SRC)jaudiolib/fx_man.h - $(OBJ)audiolib_musicstub.$o: $(SRC)jaudiolib/audiolib_musicstub.c $(SRC)jaudiolib/music.h - + $(OBJ)animlib.$o: $(SRC)jmact/animlib.c $(SRC)jmact/types.h $(SRC)jmact/develop.h $(SRC)jmact/util_lib.h $(SRC)jmact/animlib.h + + # jAudioLib objects ++$(OBJ)dsl.$o: $(SRC)jaudiolib/dsl.c $(SRC)jaudiolib/util.h ++$(OBJ)nodpmi.$o: $(SRC)jaudiolib/nodpmi.c $(SRC)jaudiolib/dpmi.h ++$(OBJ)unixpitch.$o: $(SRC)jaudiolib/unixpitch.c $(SRC)jaudiolib/pitch.h ++$(OBJ)unixvoc.$o: $(SRC)jaudiolib/unixvoc.c $(SRC)jaudiolib/usrhooks.h $(SRC)jaudiolib/linklist.h $(SRC)jaudiolib/pitch.h $(SRC)jaudiolib/multivoc.h $(SRC)jaudiolib/_multivc.h ++ + $(OBJ)audiolib_fxstub.$o: $(SRC)jaudiolib/audiolib_fxstub.c $(SRC)jaudiolib/fx_man.h + $(OBJ)audiolib_musicstub.$o: $(SRC)jaudiolib/audiolib_musicstub.c $(SRC)jaudiolib/music.h + diff -Nur jfsw_src_20051009.orig/source/config.c jfsw_src_20051009/source/config.c --- jfsw_src_20051009.orig/source/config.c 2005-10-09 15:28:26.000000000 +0200 +++ jfsw_src_20051009/source/config.c 2005-10-10 15:02:08.000000000 +0200 @@ -63,8 +63,8 @@ - // - // Sound variables - // --int32 FXDevice = -1; --int32 MusicDevice = -1; -+int32 FXDevice = 1; -+int32 MusicDevice = 1; - int32 FXVolume = 192; - int32 MusicVolume = 128; - int32 NumVoices = 4; + // + // Sound variables + // +-int32 FXDevice = -1; +-int32 MusicDevice = -1; ++int32 FXDevice = 1; ++int32 MusicDevice = 1; + int32 FXVolume = 192; + int32 MusicVolume = 128; + int32 NumVoices = 4; @@ -215,8 +215,8 @@ - ScreenWidth = 640; - ScreenHeight = 480; - ScreenBPP = 8; -- FXDevice = -1; -- MusicDevice = -1; -+ FXDevice = 1; -+ MusicDevice = 1; - FXVolume = 192; - MusicVolume = 128; - NumVoices = 4; + ScreenWidth = 640; + ScreenHeight = 480; + ScreenBPP = 8; +- FXDevice = -1; +- MusicDevice = -1; ++ FXDevice = 1; ++ MusicDevice = 1; + FXVolume = 192; + MusicVolume = 128; + NumVoices = 4; diff -Nur jfsw_src_20051009.orig/source/game.c jfsw_src_20051009/source/game.c --- jfsw_src_20051009.orig/source/game.c 2005-10-09 15:28:24.000000000 +0200 +++ jfsw_src_20051009/source/game.c 2005-10-10 15:02:05.000000000 +0200 @@ -5182,7 +5182,10 @@ - angvel = info.dyaw >> 8; - } - -- svel -= info.dx; + angvel = info.dyaw >> 8; + } + +- svel -= info.dx; + if (!running) svel -= (info.dx / 8.75); -+ else svel -= (info.dx / 4.375); ++ else svel -= (info.dx / 4.375); + if (!running) vel -= (info.dpitch / 8.75); + else vel -= (info.dpitch / 4.375); - - switch (ControllerType) - { + + switch (ControllerType) + { diff -Nur jfsw_src_20051009.orig/source/jaudiolib/debugio.h jfsw_src_20051009/source/jaudiolib/debugio.h --- jfsw_src_20051009.orig/source/jaudiolib/debugio.h 1970-01-01 01:00:00.000000000 +0100 +++ jfsw_src_20051009/source/jaudiolib/debugio.h 2005-10-10 15:02:08.000000000 +0200 @@ -652,18 +652,18 @@ diff -Nur jfsw_src_20051009.orig/source/jaudiolib/_multivc.h jfsw_src_20051009/s --- jfsw_src_20051009.orig/source/jaudiolib/_multivc.h 2005-10-09 15:28:24.000000000 +0200 +++ jfsw_src_20051009/source/jaudiolib/_multivc.h 2005-10-10 15:02:08.000000000 +0200 @@ -67,8 +67,11 @@ - #define SILENCE_8BIT 0x80808080 - //#define SILENCE_16BIT_PAS 0 - --//#define MixBufferSize 256 -+#ifdef WINDOWS - #define MixBufferSize (MV_GetBufferSize(MV_RequestedMixRate)) -+#else -+#define MixBufferSize 256 -+#endif - - #define NumberOfBuffers 16 - #define TotalBufferSize ( MixBufferSize * NumberOfBuffers ) + #define SILENCE_8BIT 0x80808080 + //#define SILENCE_16BIT_PAS 0 + +-//#define MixBufferSize 256 ++#ifdef WINDOWS + #define MixBufferSize (MV_GetBufferSize(MV_RequestedMixRate)) ++#else ++#define MixBufferSize 256 ++#endif + + #define NumberOfBuffers 16 + #define TotalBufferSize ( MixBufferSize * NumberOfBuffers ) diff -Nur jfsw_src_20051009.orig/source/jaudiolib/nodpmi.c jfsw_src_20051009/source/jaudiolib/nodpmi.c --- jfsw_src_20051009.orig/source/jaudiolib/nodpmi.c 1970-01-01 01:00:00.000000000 +0100 +++ jfsw_src_20051009/source/jaudiolib/nodpmi.c 2005-10-10 15:02:08.000000000 +0200 @@ -4539,40 +4539,40 @@ diff -Nur jfsw_src_20051009.orig/source/lists.h jfsw_src_20051009/source/lists.h --- jfsw_src_20051009.orig/source/lists.h 2005-10-09 15:28:24.000000000 +0200 +++ jfsw_src_20051009/source/lists.h 2005-10-10 15:02:08.000000000 +0200 @@ -57,7 +57,7 @@ - ((LIST) nodep)->Next->Prev = ((LIST) nodep)->Prev) - - -- #define TRAVERSE(l, o, n) ASSERT(((LIST)l)->Next && ((LIST)l)->Prev); for ((LIST) o = ((LIST)l)->Next; \ -+ #define TRAVERSE(l, o, n) ASSERT(((LIST)l)->Next && ((LIST)l)->Prev); for (o = ((LIST)l)->Next; \ - n = o->Next, (LIST) o != (LIST) l; \ - o = n) - + ((LIST) nodep)->Next->Prev = ((LIST) nodep)->Prev) + + +- #define TRAVERSE(l, o, n) ASSERT(((LIST)l)->Next && ((LIST)l)->Prev); for ((LIST) o = ((LIST)l)->Next; \ ++ #define TRAVERSE(l, o, n) ASSERT(((LIST)l)->Next && ((LIST)l)->Prev); for (o = ((LIST)l)->Next; \ + n = o->Next, (LIST) o != (LIST) l; \ + o = n) + diff -Nur jfsw_src_20051009.orig/source/sounds.c jfsw_src_20051009/source/sounds.c --- jfsw_src_20051009.orig/source/sounds.c 2005-10-09 15:28:24.000000000 +0200 +++ jfsw_src_20051009/source/sounds.c 2005-10-10 15:02:08.000000000 +0200 @@ -392,6 +392,7 @@ - if (DemoMode) - return(MUSIC_Error); - -+#ifdef WINDOWS - if (SongPtr) - StopSong(); - + if (DemoMode) + return(MUSIC_Error); + ++#ifdef WINDOWS + if (SongPtr) + StopSong(); + @@ -412,7 +413,16 @@ - //DSPRINTF(ds,"Playing song"); - //MONO_PRINT(ds); - -- return((int)MUSIC_PlaySong(SongPtr, loopflag)); + //DSPRINTF(ds,"Playing song"); + //MONO_PRINT(ds); + +- return((int)MUSIC_PlaySong(SongPtr, loopflag)); + return((int)MUSIC_PlaySong(SongPtr, loopflag)); -+ -+#else -+ void PlayMusic(char *_filename); -+ if(MusicDevice < 0) return; -+ -+ // FIXME: I need this to get the music volume initialized (not sure why) -- Jim Bentler -+ MUSIC_SetVolume( MusicVolume ); -+ PlayMusic(song_file_name); -+#endif - } - - VOID ++ ++#else ++ void PlayMusic(char *_filename); ++ if(MusicDevice < 0) return; ++ ++ // FIXME: I need this to get the music volume initialized (not sure why) -- Jim Bentler ++ MUSIC_SetVolume( MusicVolume ); ++ PlayMusic(song_file_name); ++#endif + } + + VOID -- cgit v1.2.3