From 08b76e399c907181f9efa037a272b9fb354f5796 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Fri, 2 Aug 2002 11:05:26 +0000 Subject: [PATCH] junk --- arch/sdl/digi.c | 23 +---------------------- arch/sdl/gr.c | 33 +-------------------------------- include/error.h | 34 ++-------------------------------- include/oldsdl.h | 33 --------------------------------- main/gamecntl.c | 13 +++---------- main/inferno.c | 12 +----------- main/laser.c | 17 +++++++++-------- main/piggy.h | 4 +--- misc/error.c | 15 +++------------ 9 files changed, 21 insertions(+), 163 deletions(-) delete mode 100644 include/oldsdl.h diff --git a/arch/sdl/digi.c b/arch/sdl/digi.c index c536ff43..a86b4cab 100644 --- a/arch/sdl/digi.c +++ b/arch/sdl/digi.c @@ -1,23 +1,8 @@ +/* $Id: digi.c,v 1.4 2002-08-02 11:05:25 btb Exp $ */ /* - * $Source: /cvs/cvsroot/d2x/arch/sdl/digi.c,v $ - * $Revision: 1.3 $ - * $Author: bradleyb $ - * $Date: 2002-02-16 02:08:30 $ * * SDL digital audio support * - * $Log: not supported by cvs2svn $ - * Revision 1.2 2001/11/14 10:42:15 bradleyb - * implemented digi_set_volume - * - * Revision 1.1 2001/10/25 08:25:34 bradleyb - * Finished moving stuff to arch/blah. I know, it's ugly, but It'll be easier to sync with d1x. - * - * Revision 1.3 2001/10/12 06:36:55 bradleyb - * Fix a gcc 3.0 warning, couple updates from d1x - * - * Revision 1.2 2001/01/29 13:53:28 bradleyb - * Fixed build, minor fixes * */ @@ -32,10 +17,6 @@ #include #include -#ifndef SDL_VERSION_ATLEAST -#include "oldsdl.h" -#endif - #include "pstypes.h" #include "error.h" #include "mono.h" @@ -259,11 +240,9 @@ static void audio_mixcallback(void *userdata, Uint8 *stream, int len) /* Initialise audio devices. */ int digi_init() { -#if SDL_VERSION_ATLEAST(1,1,0) if (SDL_InitSubSystem(SDL_INIT_AUDIO)<0){ Error("SDL audio initialisation failed: %s.",SDL_GetError()); } -#endif //added on 980905 by adb to init sound kill system memset(SampleHandles, 255, sizeof(SampleHandles)); //end edit by adb diff --git a/arch/sdl/gr.c b/arch/sdl/gr.c index 35fe246c..2c5f9e86 100644 --- a/arch/sdl/gr.c +++ b/arch/sdl/gr.c @@ -1,32 +1,8 @@ +/* $Id: gr.c,v 1.6 2002-08-02 11:05:25 btb Exp $ */ /* - * $Source: /cvs/cvsroot/d2x/arch/sdl/gr.c,v $ - * $Revision: 1.5 $ - * $Author: bradleyb $ - * $Date: 2002-02-23 21:38:15 $ * * SDL video functions. * - * $Log: not supported by cvs2svn $ - * Revision 1.4 2002/02/16 02:08:31 bradleyb - * allow older sdl versions - * - * Revision 1.3 2002/02/14 11:29:31 bradleyb - * allow gr_init lowres - * - * Revision 1.2 2001/10/31 07:41:54 bradleyb - * Sync with d1x - * - * Revision 1.1 2001/10/25 08:25:34 bradleyb - * Finished moving stuff to arch/blah. I know, it's ugly, but It'll be easier to sync with d1x. - * - * Revision 1.5 2001/10/09 08:17:07 bradleyb - * changed window caption to include version info - * - * Revision 1.4 2001/01/31 13:59:23 bradleyb - * Fullscreen toggle added to screen res menu - * - * Revision 1.3 2001/01/29 13:47:52 bradleyb - * Fixed build, some minor cleanups. * */ @@ -38,9 +14,6 @@ #include #include -#ifndef SDL_VERSION_ATLEAST -#include "oldsdl.h" -#endif #include "gr.h" #include "grdef.h" #include "palette.h" @@ -179,11 +152,7 @@ int gr_check_fullscreen(void){ int gr_toggle_fullscreen(void){ sdl_video_flags^=SDL_FULLSCREEN; -#if SDL_VERSION_ATLEAST(1,0,5) SDL_WM_ToggleFullScreen(screen); -#else - grd_curscreen->sc_mode=0;//hack to get it to reset screen mode -#endif return (sdl_video_flags & SDL_FULLSCREEN)?1:0; } diff --git a/include/error.h b/include/error.h index be2c50bc..3f091197 100644 --- a/include/error.h +++ b/include/error.h @@ -1,3 +1,4 @@ +/* $Id: error.h,v 1.6 2002-08-02 11:05:25 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -11,36 +12,10 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* - * $Source: /cvs/cvsroot/d2x/include/error.h,v $ - * $Revision: 1.5 $ - * $Author: bradleyb $ - * $Date: 2002-02-16 02:08:31 $ * * Header for error handling/printing/exiting code * - * $Log: not supported by cvs2svn $ - * Revision 1.4 2002/01/18 07:00:59 bradleyb - * don't die on int3, unless -debug given - * - * Revision 1.3 2001/11/14 10:51:04 bradleyb - * kludge to ungrab mouse when we hit an int3 - * - * Revision 1.2 2001/01/22 15:49:14 bradleyb - * fix compiler warnings w/opengl - * - * Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb - * Import of d2x-0.0.8 - * - * Revision 1.3 1999/10/14 04:48:21 donut - * alpha fixes, and gl_font args - * - * Revision 1.2 1999/08/05 22:53:41 sekmu - * - * D3D patch(es) from ADB - * - * Revision 1.1.1.1 1999/06/14 22:02:09 donut - * Import of d1x 1.37 source. - * + * Old Log: * Revision 1.12 1994/06/17 15:22:46 matt * Added pragma for Error() for when NDEBUG * @@ -113,18 +88,13 @@ void Int3(); #else #ifdef SDL_INPUT #include -#ifndef SDL_VERSION_ATLEAST -#include "oldsdl.h" -#endif #endif #include "args.h" static inline void _Int3() { if (FindArg("-debug")) { #ifdef SDL_INPUT -#if SDL_VERSION_ATLEAST(1,0,2) SDL_WM_GrabInput(SDL_GRAB_OFF); -#endif #endif asm("int $3"); } diff --git a/include/oldsdl.h b/include/oldsdl.h deleted file mode 100644 index 386fbf4f..00000000 --- a/include/oldsdl.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Source: /cvs/cvsroot/d2x/include/oldsdl.h,v $ - * $Revision: 1.2 $ - * $Author: bradleyb $ - * $Date: 2002-02-16 02:24:53 $ - * - * Version-checking macros for SDL - * - */ - -#ifndef _OLDSDL_H -#define _OLDSDL_H - -/* This macro turns the version numbers into a numeric value: - (1,2,3) -> (1203) - This assumes that there will never be more than 100 patchlevels -*/ -#ifndef SDL_VERSIONNUM -#define SDL_VERSIONNUM(X, Y, Z) \ - (X)*1000 + (Y)*100 + (Z) -#endif - -/* This is the version number macro for the current SDL version */ -#ifndef SDL_COMPILEDVERSION -#define SDL_COMPILEDVERSION \ - SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) -#endif - -/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ -#define SDL_VERSION_ATLEAST(X, Y, Z) \ - (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) - -#endif diff --git a/main/gamecntl.c b/main/gamecntl.c index 04da5df9..0fde8029 100644 --- a/main/gamecntl.c +++ b/main/gamecntl.c @@ -1,5 +1,4 @@ -//#define DOOR_DEBUGGING - +/* $Id: gamecntl.c,v 1.12 2002-08-02 11:05:25 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -17,6 +16,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif +//#define DOOR_DEBUGGING + #include #include #include @@ -123,10 +124,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#ifndef SDL_VERSION_ATLEAST -#include "oldsdl.h" -#endif - extern void full_palette_save(void); extern void object_goto_prev_viewer(void); @@ -503,11 +500,9 @@ int do_game_pause() gr_update(); #ifdef SDL_INPUT -#if SDL_VERSION_ATLEAST(1,0,2) /* give control back to the WM */ if (FindArg("-grabmouse")) SDL_WM_GrabInput(SDL_GRAB_OFF); -#endif #endif while (Game_paused) @@ -570,11 +565,9 @@ int do_game_pause() } #ifdef SDL_INPUT -#if SDL_VERSION_ATLEAST(1,0,2) /* keep the mouse from wandering in SDL */ if (FindArg("-grabmouse")) SDL_WM_GrabInput(SDL_GRAB_ON); -#endif #endif if (VR_screen_flags & VRF_COMPATIBLE_MENUS) { diff --git a/main/inferno.c b/main/inferno.c index e19b79fb..c86f4baa 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -1,4 +1,4 @@ -/* $Id: inferno.c,v 1.35 2002-07-30 11:05:53 btb Exp $ */ +/* $Id: inferno.c,v 1.36 2002-08-02 11:05:26 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -117,10 +117,6 @@ extern int Current_display_mode; //$$ there's got to be a better way than #include #endif -#ifndef SDL_VERSION_ATLEAST -#include "oldsdl.h" -#endif - #include "vers_id.h" void mem_init(void); @@ -245,10 +241,8 @@ void print_commandline_help() // printf( " -dynamicsockets %s\n","FIXME: Undocumented"); // printf( " -forcegfx %s\n","FIXME: Undocumented"); #ifdef SDL_INPUT -#if SDL_VERSION_ATLEAST(1,0,2) printf( " -grabmouse %s\n","Keeps the mouse from wandering out of the window"); #endif -#endif // printf( " -hw_3dacc %s\n","FIXME: Undocumented"); #ifndef RELEASE printf( " -invulnerability %s\n","Make yourself invulnerable"); @@ -1007,21 +1001,17 @@ int main(int argc,char **argv) #endif #ifdef SDL_INPUT -#if SDL_VERSION_ATLEAST(1,0,2) /* keep the mouse from wandering in SDL */ if (FindArg("-grabmouse")) SDL_WM_GrabInput(SDL_GRAB_ON); -#endif #endif game(); #ifdef SDL_INPUT -#if SDL_VERSION_ATLEAST(1,0,2) /* give control back to the WM */ if (FindArg("-grabmouse")) SDL_WM_GrabInput(SDL_GRAB_OFF); -#endif #endif if ( Function_mode == FMODE_MENU ) diff --git a/main/laser.c b/main/laser.c index 7effd651..df01c2c2 100644 --- a/main/laser.c +++ b/main/laser.c @@ -1,3 +1,4 @@ +/* $Id: laser.c,v 1.6 2002-08-02 11:05:26 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -16,7 +17,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -char laser_rcsid[] = "$Id: laser.c,v 1.5 2001-11-08 10:30:28 bradleyb Exp $"; +char laser_rcsid[] = "$Id: laser.c,v 1.6 2002-08-02 11:05:26 btb Exp $"; #endif #include @@ -2041,16 +2042,16 @@ int create_homing_missile(object *objp, int goal_obj, int objtype, int make_soun extern void blast_nearby_glass(object *objp, fix damage); -// ------------------------------------------------------------------------------------------- -// Create the children of a smart bomb, which is a bunch of homing missiles. +//----------------------------------------------------------------------------- +// Create the children of a smart bomb, which is a bunch of homing missiles. void create_smart_children(object *objp, int num_smart_children) { - int parent_type, parent_num; + int parent_type, parent_num; #ifndef SHAREWARE - int make_sound; - int numobjs=0; - int objlist[MAX_OBJDISTS]; - int blob_id; + int make_sound; + int numobjs=0; + int objlist[MAX_OBJDISTS]; + int blob_id; #endif if (objp->type == OBJ_WEAPON) { diff --git a/main/piggy.h b/main/piggy.h index 19cb3a48..ce5f8e50 100644 --- a/main/piggy.h +++ b/main/piggy.h @@ -1,4 +1,4 @@ -/* $Id: piggy.h,v 1.7 2002-08-02 04:57:19 btb Exp $ */ +/* $Id: piggy.h,v 1.8 2002-08-02 11:05:26 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -12,8 +12,6 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ - - #ifndef _PIGGY_H #define _PIGGY_H diff --git a/misc/error.c b/misc/error.c index 33336c2f..4b5ece46 100644 --- a/misc/error.c +++ b/misc/error.c @@ -1,3 +1,4 @@ +/* $Id: error.c,v 1.3 2002-08-02 11:05:26 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -11,20 +12,10 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* - * $Source: /cvs/cvsroot/d2x/misc/error.c,v $ - * $Revision: 1.2 $ - * $Author: bradleyb $ - * $Date: 2001-01-31 15:18:04 $ * * Error handling/printing/exiting code * - * $Log: not supported by cvs2svn $ - * Revision 1.1.1.1 2001/01/19 03:30:14 bradleyb - * Import of d2x-0.0.8 - * - * Revision 1.1.1.1 1999/06/14 22:13:48 donut - * Import of d1x 1.37 source. - * + * Old Log: * Revision 1.12 1994/12/07 18:49:39 matt * error_init() can now take NULL as parm * @@ -70,7 +61,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: error.c,v 1.2 2001-01-31 15:18:04 bradleyb Exp $"; +static char rcsid[] = "$Id: error.c,v 1.3 2002-08-02 11:05:26 btb Exp $"; #endif #include -- 2.39.2