From aea94fcc5545976291f1cc4300a2fe63ac9314e0 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Wed, 19 Mar 2003 19:21:34 +0000 Subject: [PATCH] header/extern declaration housekeeping --- 2d/font.c | 4 ++-- 2d/palette.c | 4 +--- 3d/interp.c | 6 ++---- 3d/setup.c | 8 ++++---- ChangeLog | 6 ++++++ arch/sdl/rbaudio.c | 3 +-- include/texmap.h | 11 ++++++++--- libmve/decoder16.c | 7 +++---- libmve/decoder8.c | 7 +++---- libmve/decoders.h | 16 ++++++++++++++++ libmve/mveplay.c | 8 +++----- texmap/ntmap.c | 6 ++---- texmap/texmapl.h | 3 +-- 13 files changed, 52 insertions(+), 37 deletions(-) create mode 100644 libmve/decoders.h diff --git a/2d/font.c b/2d/font.c index d9a3e78e..eada64bd 100644 --- a/2d/font.c +++ b/2d/font.c @@ -1,4 +1,4 @@ -/* $Id: font.c,v 1.24 2003-03-15 14:17:52 btb Exp $ */ +/* $Id: font.c,v 1.25 2003-03-19 19:21:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -1102,7 +1102,7 @@ int gr_internal_color_string(int x, int y, char *s ) } #else //OGL -#include "../main/inferno.h" + #include "ogl_init.h" #include "args.h" //font handling routines for OpenGL - Added 9/25/99 Matthew Mueller - they are here instead of in arch/ogl because they use all these defines diff --git a/2d/palette.c b/2d/palette.c index e3326c79..fa9a31ed 100644 --- a/2d/palette.c +++ b/2d/palette.c @@ -1,4 +1,4 @@ -/* $Id: palette.c,v 1.7 2002-10-11 03:37:58 btb Exp $ */ +/* $Id: palette.c,v 1.8 2003-03-19 19:21:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -174,8 +174,6 @@ ubyte gr_palette_faded_out = 1; int grd_fades_disabled=0; // Used to skip fading for development -extern void gr_palette_load( ubyte * pal ); - void gr_palette_set_gamma( int gamma ) { if ( gamma < 0 ) gamma = 0; diff --git a/3d/interp.c b/3d/interp.c index 82fd5943..842aa5c3 100644 --- a/3d/interp.c +++ b/3d/interp.c @@ -1,4 +1,4 @@ -/* $Id: interp.c,v 1.13 2003-02-13 22:07:58 btb Exp $ */ +/* $Id: interp.c,v 1.14 2003-03-19 19:21:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -40,7 +40,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: interp.c,v 1.13 2003-02-13 22:07:58 btb Exp $"; +static char rcsid[] = "$Id: interp.c,v 1.14 2003-03-19 19:21:34 btb Exp $"; #endif #include @@ -509,8 +509,6 @@ bool g3_draw_polygon_model(void *model_ptr,grs_bitmap **model_bitmaps,vms_angvec return 1; } -extern int gr_find_closest_color_15bpp( int rgb ); - #ifndef NDEBUG int nest_count; #endif diff --git a/3d/setup.c b/3d/setup.c index 89b10e14..5917a886 100644 --- a/3d/setup.c +++ b/3d/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.4 2002-07-17 21:55:19 bradleyb Exp $ */ +/* $Id: setup.c,v 1.5 2003-03-19 19:21:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -40,7 +40,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: setup.c,v 1.4 2002-07-17 21:55:19 bradleyb Exp $"; +static char rcsid[] = "$Id: setup.c,v 1.5 2003-03-19 19:21:34 btb Exp $"; #endif #include @@ -54,6 +54,8 @@ static char rcsid[] = "$Id: setup.c,v 1.4 2002-07-17 21:55:19 bradleyb Exp $"; #ifdef OGL #include "ogl_init.h" +#else +#include "texmap.h" // for init_interface_vars_to_assembler() #endif //initialize the 3d system @@ -66,8 +68,6 @@ void g3_init(void) //close down the 3d system void g3_close(void) {} -extern void init_interface_vars_to_assembler(void); - //start the frame void g3_start_frame(void) { diff --git a/ChangeLog b/ChangeLog index 3535669a..2396f534 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-03-19 Bradley Bell + * 2d/font.c, 2d/palette.c, 3d/interp.c, 3d/setup.c, + arch/sdl/rbaudio.c, include/texmap.h, libmve/decoder16.c, + libmve/decoder8.c, libmve/decoders.h, libmve/mveplay.c, + texmap/ntmap.c, texmap/texmapl.h: header/extern declaration + housekeeping + * README: added some OS X info 2003-03-17 Bradley Bell diff --git a/arch/sdl/rbaudio.c b/arch/sdl/rbaudio.c index 2d27e37b..a53df1a8 100644 --- a/arch/sdl/rbaudio.c +++ b/arch/sdl/rbaudio.c @@ -1,4 +1,4 @@ -/* $Id: rbaudio.c,v 1.5 2003-03-15 13:12:07 btb Exp $ */ +/* $Id: rbaudio.c,v 1.6 2003-03-19 19:21:34 btb Exp $ */ /* * * SDL CD Audio functions @@ -26,7 +26,6 @@ #include "rbaudio.h" static SDL_CD *s_cd = NULL; -extern int Redbook_playing; static int initialised = 0; void RBAExit() diff --git a/include/texmap.h b/include/texmap.h index 26f518ee..ce74614c 100644 --- a/include/texmap.h +++ b/include/texmap.h @@ -12,13 +12,16 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* * $Source: /cvs/cvsroot/d2x/include/texmap.h,v $ - * $Revision: 1.1.1.1 $ - * $Author: bradleyb $ - * $Date: 2001-01-19 03:30:16 $ + * $Revision: 1.2 $ + * $Author: btb $ + * $Date: 2003-03-19 19:21:34 $ * * Include file for entities using texture mapper library. * * $Log: not supported by cvs2svn $ + * Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb + * Import of d2x-0.0.8 + * * Revision 1.2 1999/07/07 21:21:56 donut * increased recip table size to better accommodate 640 res * @@ -177,5 +180,7 @@ extern int Window_clip_left, Window_clip_bot, Window_clip_right, Window_clip_top #define FIX_XLIMIT (639 * F1_0) #define FIX_YLIMIT (479 * F1_0) +extern void init_interface_vars_to_assembler(void); + #endif diff --git a/libmve/decoder16.c b/libmve/decoder16.c index bd04fbd6..a7150c1f 100644 --- a/libmve/decoder16.c +++ b/libmve/decoder16.c @@ -1,11 +1,10 @@ +/* 16 bit decoding routines */ + #include #include #include -extern int g_width, g_height; -extern void *g_vBackBuf1, *g_vBackBuf2; - -/* 16 bit decoding routines */ +#include "decoders.h" static unsigned short *backBuf1, *backBuf2; static int lookup_initialized; diff --git a/libmve/decoder8.c b/libmve/decoder8.c index 6323d737..53cbb1e7 100644 --- a/libmve/decoder8.c +++ b/libmve/decoder8.c @@ -1,10 +1,9 @@ +/* 8 bit decoding routines */ + #include #include -extern int g_width, g_height; -extern void *g_vBackBuf1, *g_vBackBuf2; - -/* 8 bit decoding routines */ +#include "decoders.h" static void dispatchDecoder(unsigned char **pFrame, unsigned char codeType, unsigned char **pData, int *pDataRemain, int *curXb, int *curYb); diff --git a/libmve/decoders.h b/libmve/decoders.h new file mode 100644 index 00000000..492b8bd1 --- /dev/null +++ b/libmve/decoders.h @@ -0,0 +1,16 @@ +/* + * + * INTERNAL header - not to be included outside of libmve + * + */ + +#ifndef _MVEPLAY_H +#define _MVEPLAY_H + +extern int g_width, g_height; +extern void *g_vBackBuf1, *g_vBackBuf2; + +extern void decodeFrame8(unsigned char *pFrame, unsigned char *pMap, int mapRemain, unsigned char *pData, int dataRemain); +extern void decodeFrame16(unsigned char *pFrame, unsigned char *pMap, int mapRemain, unsigned char *pData, int dataRemain); + +#endif // _MVEPLAY_H diff --git a/libmve/mveplay.c b/libmve/mveplay.c index 4d95b0d6..75b51151 100644 --- a/libmve/mveplay.c +++ b/libmve/mveplay.c @@ -1,4 +1,4 @@ -/* $Id: mveplay.c,v 1.6 2003-02-28 11:27:05 btb Exp $ */ +/* $Id: mveplay.c,v 1.7 2003-03-19 19:21:34 btb Exp $ */ #ifdef HAVE_CONFIG_H #include #endif @@ -24,9 +24,10 @@ #include "mvelib.h" #include "mve_audio.h" +#include "decoders.h" + #ifndef STANDALONE #include "libmve.h" -#include "error.h" #include "u_mem.h" #include "gr.h" #include "palette.h" @@ -698,9 +699,6 @@ static int video_codemap_handler(unsigned char major, unsigned char minor, unsig return 1; } -void decodeFrame16(unsigned char *pFrame, unsigned char *pMap, int mapRemain, unsigned char *pData, int dataRemain); -void decodeFrame8(unsigned char *pFrame, unsigned char *pMap, int mapRemain, unsigned char *pData, int dataRemain); - static int video_data_handler(unsigned char major, unsigned char minor, unsigned char *data, int len, void *context) { short nFrameHot, nFrameCold; diff --git a/texmap/ntmap.c b/texmap/ntmap.c index 36df241b..54b217fd 100644 --- a/texmap/ntmap.c +++ b/texmap/ntmap.c @@ -1,4 +1,4 @@ -/* $Id: ntmap.c,v 1.7 2003-02-18 20:15:48 btb Exp $ */ +/* $Id: ntmap.c,v 1.8 2003-03-19 19:21:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -123,7 +123,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: ntmap.c,v 1.7 2003-02-18 20:15:48 btb Exp $"; +static char rcsid[] = "$Id: ntmap.c,v 1.8 2003-03-19 19:21:34 btb Exp $"; #endif #define VESA 0 @@ -146,8 +146,6 @@ static char rcsid[] = "$Id: ntmap.c,v 1.7 2003-02-18 20:15:48 btb Exp $"; #include "rle.h" #include "scanline.h" -//#include "../main/textures.h" - #ifdef EDITOR #define EDITOR_TMAP 1 //if in, include extra stuff #endif diff --git a/texmap/texmapl.h b/texmap/texmapl.h index 8228574b..9bc83cc5 100644 --- a/texmap/texmapl.h +++ b/texmap/texmapl.h @@ -1,4 +1,4 @@ -/* $Id: texmapl.h,v 1.3 2003-02-18 20:15:48 btb Exp $ */ +/* $Id: texmapl.h,v 1.4 2003-03-19 19:21:34 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -131,6 +131,5 @@ extern ubyte tmap_flat_shade_value; extern fix fix_recip[]; -extern void init_interface_vars_to_assembler(void); extern int prevmod(int val,int modulus); -- 2.39.2