From 01fc526db3ccdacad0ca769bdc10cf85d1a425f8 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Thu, 29 Jan 2015 17:34:24 -0800 Subject: [PATCH] more header cleanup --- 2d/2dsline.c | 2 - 2d/bitblt.c | 3 +- 2d/bitmap.c | 4 +- 2d/box.c | 4 +- 2d/canvas.c | 4 +- 2d/circle.c | 3 +- 2d/disc.c | 3 +- 2d/font.c | 6 +- 2d/gpixel.c | 3 +- 2d/gr.c | 1 + 2d/ibitblt.c | 7 +- 2d/line.c | 3 - 2d/palette.c | 4 - 2d/pcx.c | 8 +- 2d/pixel.c | 2 - 2d/poly.c | 2 +- 2d/rect.c | 2 - 2d/rle.c | 6 +- 2d/scale.c | 8 +- 2d/scalec.c | 4 +- 3d/interp.c | 4 +- arch/dos/comm/commlib.c | 1 + arch/dos/digi.c | 9 +- arch/dos/digiallg.c | 10 +- arch/dos/digimm.c | 9 +- arch/dos/joydefs.c | 15 +-- arch/dos/vesa.c | 3 +- arch/dos/vid.c | 4 +- arch/linux/alsadigi.c | 11 +-- arch/linux/joydefs.c | 15 +-- arch/ogl/glx.c | 1 + arch/ogl/ogl.c | 14 +-- arch/ogl/vid.c | 9 +- arch/ogl/wgl.c | 3 +- arch/sdl/digi.c | 10 +- arch/svgalib/vid.c | 3 +- arch/win32/digi.c | 9 +- arch/win32/key.c | 2 + arch/win32/palw32.c | 2 - arch/win32/scene.cpp | 7 +- arch/win32/vid.c | 4 +- arch/win32/win32.c | 9 +- iff/archive/ifftest.c | 2 +- include/3d.h | 8 +- include/fix.h | 214 +++++++++++++++++++++++++++++++++++++++- include/gr.h | 6 +- include/interp.h | 2 +- include/maths.h | 196 +----------------------------------- include/ogl_init.h | 3 +- include/palette.h | 4 + include/texmap.h | 2 +- include/timer.h | 1 + include/vecmat.h | 3 +- main/ai.c | 6 -- main/ai2.c | 7 -- main/automap.c | 4 +- main/bm.c | 2 +- main/bmread.c | 4 +- main/cmd.c | 3 - main/cntrlcen.c | 1 - main/collide.c | 3 - main/config.c | 15 +-- main/console.c | 2 - main/controls.c | 3 +- main/credits.c | 1 - main/crypt.c | 1 + main/digiobj.c | 4 +- main/dumpmine.c | 19 ---- main/editor/autosave.c | 2 +- main/editor/centers.c | 21 +--- main/editor/curves.c | 4 +- main/editor/editor.h | 25 ++++- main/editor/eglobal.c | 3 +- main/editor/ehostage.c | 22 +---- main/editor/elight.c | 13 +-- main/editor/eobject.c | 21 +--- main/editor/eswitch.c | 15 +-- main/editor/eswitch.h | 3 +- main/editor/fixseg.c | 7 +- main/editor/group.c | 19 ++-- main/editor/info.c | 10 -- main/editor/kbuild.c | 5 +- main/editor/kcurve.c | 2 +- main/editor/kdefs.h | 4 +- main/editor/kfuncs.c | 9 +- main/editor/kgame.c | 4 +- main/editor/khelp.c | 2 +- main/editor/kmine.c | 9 -- main/editor/ksegmove.c | 1 + main/editor/ksegsel.c | 2 +- main/editor/ksegsize.c | 3 +- main/editor/ktmap.c | 2 +- main/editor/kview.c | 1 + main/editor/macro.c | 10 +- main/editor/med.c | 42 +------- main/editor/meddraw.c | 19 +--- main/editor/medmisc.c | 12 +-- main/editor/medrobot.c | 20 +--- main/editor/medsel.c | 4 +- main/editor/medwall.c | 18 +--- main/editor/medwall.h | 5 +- main/editor/mine.c | 14 --- main/editor/objpage.c | 13 +-- main/editor/segment.c | 17 ---- main/editor/seguvs.c | 13 +-- main/editor/texpage.c | 7 -- main/editor/texture.c | 7 +- main/effects.c | 2 +- main/endlevel.c | 10 +- main/escort.c | 5 +- main/fireball.c | 4 +- main/fvi.c | 4 +- main/game.c | 15 +-- main/gamecntl.c | 20 ++-- main/gamemine.c | 2 - main/gamepal.c | 5 +- main/gamerend.c | 4 +- main/gamesave.c | 1 - main/gameseg.c | 2 +- main/gameseq.c | 9 +- main/gauges.c | 1 - main/inferno.c | 15 +-- main/inferno.h | 6 ++ main/kconfig.c | 10 +- main/kmatrix.c | 2 - main/laser.c | 1 - main/lighting.c | 3 +- main/menu.c | 16 ++- main/mglobal.c | 3 +- main/morph.c | 5 +- main/movie.c | 1 - main/multibot.c | 2 +- main/network.c | 11 +-- main/newdemo.c | 4 +- main/newmenu.c | 9 +- main/object.c | 2 - main/paging.c | 6 +- main/physics.c | 1 - main/piggy.c | 20 ++-- main/player.c | 1 + main/polyobj.c | 5 +- main/powerup.c | 5 +- main/render.c | 6 +- main/robot.c | 1 + main/scores.c | 2 - main/slew.c | 2 +- main/state.c | 12 +-- main/switch.c | 4 +- main/texmerge.c | 2 +- main/titles.c | 4 +- main/wall.c | 1 - main/weapon.c | 1 - maths/vecmat.c | 1 - texmap/ntmap.c | 7 +- texmap/scanline.c | 2 +- texmap/tmapflat.c | 5 +- ui/barbox.c | 3 +- ui/button.c | 4 +- ui/checkbox.c | 2 +- ui/file.c | 4 +- ui/gadget.c | 3 +- ui/icon.c | 1 - ui/inputbox.c | 1 - ui/keypad.c | 6 +- ui/keypress.c | 1 - ui/keytrap.c | 1 - ui/ui.c | 4 +- ui/uidraw.c | 2 +- ui/userbox.c | 2 +- ui/window.c | 2 - 170 files changed, 490 insertions(+), 967 deletions(-) diff --git a/2d/2dsline.c b/2d/2dsline.c index 2685d61b..d4f1d495 100644 --- a/2d/2dsline.c +++ b/2d/2dsline.c @@ -24,9 +24,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "u_mem.h" - #include "gr.h" -#include "grdef.h" #include "error.h" #ifdef __MSDOS__ diff --git a/2d/bitblt.c b/2d/bitblt.c index a084bb9d..8f9b6bd7 100644 --- a/2d/bitblt.c +++ b/2d/bitblt.c @@ -23,8 +23,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "gr.h" -#include "grdef.h" -#include "rle.h" #include "mono.h" #include "byteswap.h" // because of rle code that has short for row offsets #include "error.h" @@ -33,6 +31,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ogl_init.h" #endif + int gr_bitblt_dest_step_shift = 0; int gr_bitblt_double = 0; ubyte *gr_bitblt_fade_table=NULL; diff --git a/2d/bitmap.c b/2d/bitmap.c index 55cc07e0..dc581dcc 100644 --- a/2d/bitmap.c +++ b/2d/bitmap.c @@ -25,10 +25,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "u_mem.h" - - #include "gr.h" -#include "grdef.h" #include "u_dpmi.h" #include "error.h" @@ -36,6 +33,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "ogl_init.h" #endif + void gr_set_bitmap_data (grs_bitmap *bm, unsigned char *data) { #ifdef OGL diff --git a/2d/box.c b/2d/box.c index a091c780..96ac9ffa 100644 --- a/2d/box.c +++ b/2d/box.c @@ -16,10 +16,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - - #include "gr.h" -#include "grdef.h" + void gr_ubox0(int left,int top,int right,int bot) { diff --git a/2d/canvas.c b/2d/canvas.c index 7a6aabf3..9962d0b0 100644 --- a/2d/canvas.c +++ b/2d/canvas.c @@ -19,15 +19,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "u_mem.h" - - #include "gr.h" -#include "grdef.h" #ifdef __DJGPP__ #include "modex.h" #include "vesa.h" #endif + grs_canvas * grd_curcanv; //active canvas grs_screen * grd_curscreen; //active screen diff --git a/2d/circle.c b/2d/circle.c index 80369870..fb0b66dc 100644 --- a/2d/circle.c +++ b/2d/circle.c @@ -16,9 +16,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - #include "gr.h" -#include "grdef.h" + #ifndef OGL diff --git a/2d/disc.c b/2d/disc.c index 8203d083..974ad7bc 100644 --- a/2d/disc.c +++ b/2d/disc.c @@ -16,9 +16,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - #include "gr.h" -#include "grdef.h" + int gr_disk(fix xc1,fix yc1,fix r1) { diff --git a/2d/font.c b/2d/font.c index ce1c3317..6d03a982 100644 --- a/2d/font.c +++ b/2d/font.c @@ -32,18 +32,14 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - #include "gr.h" -#include "grdef.h" #include "error.h" - #include "cfile.h" #include "mono.h" #include "byteswap.h" -#include "bitmap.h" - #include "makesig.h" + #define MAX_OPEN_FONTS 50 #define FILENAME_LEN 13 diff --git a/2d/gpixel.c b/2d/gpixel.c index c51ceb48..31cd5ba4 100644 --- a/2d/gpixel.c +++ b/2d/gpixel.c @@ -16,14 +16,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - #include "gr.h" -#include "grdef.h" #ifdef __DJGPP__ #include "modex.h" #include "vesa.h" #endif + unsigned char gr_ugpixel( grs_bitmap * bitmap, int x, int y ) { #ifdef __DJGPP__ diff --git a/2d/gr.c b/2d/gr.c index 81ae1028..89ef77bc 100644 --- a/2d/gr.c +++ b/2d/gr.c @@ -17,6 +17,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "u_mem.h" +#include "cmd.h" int gr_installed = 0; diff --git a/2d/ibitblt.c b/2d/ibitblt.c index 4a9e8663..39c0db45 100644 --- a/2d/ibitblt.c +++ b/2d/ibitblt.c @@ -41,8 +41,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "mem.h" #include "error.h" -#include "ibitblt.h" -#include "grdef.h" + #define MODE_NONE 0 #define MODE_SKIP 1 @@ -539,12 +538,10 @@ void gr_ibitblt_find_hole_size( grs_bitmap * mask_bmp, int *minx, int *miny, #else /* __MSDOS__ */ // was: /* !MACINTOSH */ -#include "pstypes.h" #include "gr.h" -#include "ibitblt.h" #include "error.h" #include "u_mem.h" -#include "grdef.h" + #define FIND_START 1 #define FIND_STOP 2 diff --git a/2d/line.c b/2d/line.c index 93fb45c8..c6ae4377 100644 --- a/2d/line.c +++ b/2d/line.c @@ -22,11 +22,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "u_mem.h" - #include "gr.h" -#include "grdef.h" #include "fix.h" - #include "clip.h" #ifdef __DJGPP__ diff --git a/2d/palette.c b/2d/palette.c index 742bcf45..26f6e3ca 100644 --- a/2d/palette.c +++ b/2d/palette.c @@ -24,10 +24,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pstypes.h" #include "u_mem.h" #include "gr.h" -#include "grdef.h" #include "cfile.h" #include "error.h" #include "mono.h" @@ -36,8 +34,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. //#include "key.h" //end remove -#include "palette.h" - #define SQUARE(x) ((x)*(x)) diff --git a/2d/pcx.c b/2d/pcx.c index cd70ef3e..9c075f3d 100644 --- a/2d/pcx.c +++ b/2d/pcx.c @@ -25,17 +25,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "gr.h" -#include "grdef.h" #include "u_mem.h" -#include "pcx.h" #include "cfile.h" - -#ifdef OGL -#include "palette.h" -#endif - #include "physfsx.h" + int pcx_encode_byte(ubyte byt, ubyte cnt, PHYSFS_file *fid); int pcx_encode_line(ubyte *inBuff, int inLen, PHYSFS_file *fp); diff --git a/2d/pixel.c b/2d/pixel.c index 389a860a..80f7ec92 100644 --- a/2d/pixel.c +++ b/2d/pixel.c @@ -21,9 +21,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - #include "gr.h" -#include "grdef.h" #ifdef __MSDOS__ #include "vesa.h" #include "modex.h" diff --git a/2d/poly.c b/2d/poly.c index b387ffc5..c7ac465f 100644 --- a/2d/poly.c +++ b/2d/poly.c @@ -22,7 +22,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "gr.h" -#include "grdef.h" + //#define USE_POLY_CODE 1 diff --git a/2d/rect.c b/2d/rect.c index 661f242a..c1b8aafc 100644 --- a/2d/rect.c +++ b/2d/rect.c @@ -21,9 +21,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "u_mem.h" - #include "gr.h" -#include "grdef.h" #ifdef OGL #include "ogl_init.h" diff --git a/2d/rle.c b/2d/rle.c index b4bbf017..809674e0 100644 --- a/2d/rle.c +++ b/2d/rle.c @@ -27,18 +27,14 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pstypes.h" #include "u_mem.h" #include "mono.h" - - #include "gr.h" -#include "grdef.h" #include "error.h" //#include "key.h" -#include "rle.h" #include "byteswap.h" + #define RLE_CODE 0xE0 #define NOT_RLE_CODE 31 diff --git a/2d/scale.c b/2d/scale.c index 05fede65..41dd124b 100644 --- a/2d/scale.c +++ b/2d/scale.c @@ -26,19 +26,19 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "mono.h" -#include "fix.h" +#include "maths.h" #include "gr.h" #include "error.h" -#include "rle.h" #if 0 #define TRANSPARENCY_COLOR 255; #endif -static int Transparency_color = TRANSPARENCY_COLOR; - #include "scalea.h" + +static int Transparency_color = TRANSPARENCY_COLOR; + void rls_stretch_scanline( char * source, char * dest, int XDelta, int YDelta ); void rls_stretch_scanline_setup( int XDelta, int YDelta ); void scale_bitmap_asm(grs_bitmap *source_bmp, grs_bitmap *dest_bmp, int x0, int y0, int x1, int y1, fix u0, fix v0, fix u1, fix v1 ); diff --git a/2d/scalec.c b/2d/scalec.c index 580eba46..9fa680e2 100644 --- a/2d/scalec.c +++ b/2d/scalec.c @@ -16,9 +16,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include + #include "gr.h" -#include "grdef.h" -#include "rle.h" + // John's new stuff below here.... diff --git a/3d/interp.c b/3d/interp.c index 8d0947ea..2d341428 100644 --- a/3d/interp.c +++ b/3d/interp.c @@ -23,13 +23,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "error.h" - -#include "interp.h" +#include "3d.h" #include "globvars.h" #include "gr.h" #include "byteswap.h" #include "u_mem.h" + #define OP_EOF 0 //eof #define OP_DEFPOINTS 1 //defpoints #define OP_FLATPOLY 2 //flat-shaded polygon diff --git a/arch/dos/comm/commlib.c b/arch/dos/comm/commlib.c index 0b7181b6..84c41175 100644 --- a/arch/dos/comm/commlib.c +++ b/arch/dos/comm/commlib.c @@ -1,6 +1,7 @@ #include #include #include + #include "fix.h" #include "timer.h" #include "mono.h" diff --git a/arch/dos/digi.c b/arch/dos/digi.c index 8d6fcfbb..7a0d932b 100644 --- a/arch/dos/digi.c +++ b/arch/dos/digi.c @@ -17,14 +17,9 @@ #include "error.h" #include "mono.h" #include "fix.h" -#include "vecmat.h" #include "gr.h" // needed for piggy.h -#include "piggy.h" -#include "digi.h" -#include "sounds.h" -#include "wall.h" -#include "newdemo.h" -#include "kconfig.h" +#include "inferno.h" + int digi_sample_rate = SAMPLE_RATE_11K; int digi_timer_rate = 9943; // rate for the timer to go off to handle the driver system (120 Hz) diff --git a/arch/dos/digiallg.c b/arch/dos/digiallg.c index 7edd5b1c..997e4f17 100644 --- a/arch/dos/digiallg.c +++ b/arch/dos/digiallg.c @@ -18,25 +18,17 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "fix.h" -#include "object.h" +#include "inferno.h" #include "mono.h" #include "timer.h" #include "joy.h" -#include "digi.h" -#include "sounds.h" #include "args.h" #include "key.h" -#include "newdemo.h" -#include "game.h" #include "u_dpmi.h" #include "error.h" -#include "wall.h" #include "cfile.h" -#include "piggy.h" -#include "text.h" #include "midiallg.h" -#include "kconfig.h" #define _DIGI_MAX_VOLUME 128 // set lower to have difference with > F1_0 sounds diff --git a/arch/dos/digimm.c b/arch/dos/digimm.c index ca579737..6d083817 100644 --- a/arch/dos/digimm.c +++ b/arch/dos/digimm.c @@ -13,16 +13,11 @@ #include "error.h" #include "mono.h" #include "fix.h" -#include "vecmat.h" #include "gr.h" // needed for piggy.h -#include "piggy.h" -#include "digi.h" -#include "sounds.h" -#include "wall.h" -#include "newdemo.h" -#include "kconfig.h" +#include "inferno.h" #include "midiallg.h" + int digi_driver_board = 0; int digi_driver_port = 0; int digi_driver_irq = 0; diff --git a/arch/dos/joydefs.c b/arch/dos/joydefs.c index 1b0e4524..3321054e 100644 --- a/arch/dos/joydefs.c +++ b/arch/dos/joydefs.c @@ -31,21 +31,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "joy.h" #include "timer.h" #include "error.h" - #include "inferno.h" -#include "game.h" -#include "object.h" -#include "player.h" - -#include "controls.h" -#include "joydefs.h" -#include "render.h" -#include "palette.h" -#include "newmenu.h" +#include "gr.h" #include "args.h" -#include "text.h" -#include "kconfig.h" -#include "digi.h" + int joydefs_calibrate_flag = 0; diff --git a/arch/dos/vesa.c b/arch/dos/vesa.c index 87c7baeb..bccc578a 100644 --- a/arch/dos/vesa.c +++ b/arch/dos/vesa.c @@ -10,11 +10,12 @@ #endif #include + #include "gr.h" -#include "grdef.h" #include "u_dpmi.h" #include "vesa.h" + #define SC_INDEX 0x3c4 #define CRTC_INDEX 0x3d4 #define CRTC_DATA 0x3d5 diff --git a/arch/dos/vid.c b/arch/dos/vid.c index c2b0057c..42a14166 100644 --- a/arch/dos/vid.c +++ b/arch/dos/vid.c @@ -14,9 +14,8 @@ #include #include #include + #include "gr.h" -#include "grdef.h" -#include "palette.h" #include "maths.h" #include "u_mem.h" #include "u_dpmi.h" @@ -28,6 +27,7 @@ #include #endif + static int last_r=0, last_g=0, last_b=0; /* old gr.c stuff */ diff --git a/arch/linux/alsadigi.c b/arch/linux/alsadigi.c index 4d98c099..7a2ffdfa 100644 --- a/arch/linux/alsadigi.c +++ b/arch/linux/alsadigi.c @@ -12,15 +12,10 @@ #include "error.h" #include "mono.h" -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" // needed for piggy.h -#include "piggy.h" -#include "digi.h" -#include "sounds.h" -#include "wall.h" -#include "newdemo.h" -#include "kconfig.h" +#include "inferno.h" + //edited 05/17/99 Matt Mueller - added ifndef NO_ASM //added on 980905 by adb to add inline fixmul for mixer on i386 diff --git a/arch/linux/joydefs.c b/arch/linux/joydefs.c index 06766674..5c8d51d0 100644 --- a/arch/linux/joydefs.c +++ b/arch/linux/joydefs.c @@ -31,24 +31,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "joy.h" #include "timer.h" #include "error.h" - #include "inferno.h" -#include "game.h" -#include "object.h" -#include "player.h" - -#include "controls.h" -#include "joydefs.h" //#include "victor.h" -#include "render.h" -#include "palette.h" -#include "newmenu.h" +#include "gr.h" #include "args.h" -#include "text.h" -#include "kconfig.h" -#include "digi.h" #include "joystick.h" + int joydefs_calibrate_flag = 0; //added 9/6/98 Matt Mueller - not needed at all in linux code but bunches diff --git a/arch/ogl/glx.c b/arch/ogl/glx.c index c4b5390e..4a065aba 100644 --- a/arch/ogl/glx.c +++ b/arch/ogl/glx.c @@ -12,6 +12,7 @@ #include #include #include + #include "internal.h" #include "vers_id.h" #include "error.h" diff --git a/arch/ogl/ogl.c b/arch/ogl/ogl.c index 26289a0a..fc6a6434 100644 --- a/arch/ogl/ogl.c +++ b/arch/ogl/ogl.c @@ -32,25 +32,15 @@ #include "../../3d/globvars.h" #include "error.h" #include "texmap.h" -#include "palette.h" -#include "rle.h" +#include "gr.h" #include "mono.h" #ifdef HAVE_LIBPNG #include "pngfile.h" #endif -#include "segment.h" -#include "textures.h" -#include "texmerge.h" -#include "effects.h" -#include "weapon.h" -#include "powerup.h" -#include "laser.h" -#include "player.h" -#include "polyobj.h" -#include "gamefont.h" #include "byteswap.h" + //change to 1 for lots of spew. #if 0 #define glmprintf(a) mprintf(a) diff --git a/arch/ogl/vid.c b/arch/ogl/vid.c index a0d4f2e5..b2c06dad 100644 --- a/arch/ogl/vid.c +++ b/arch/ogl/vid.c @@ -27,19 +27,11 @@ #include -#include "hudmsg.h" #include "inferno.h" -#include "text.h" #include "gr.h" #include "vid.h" -#include "gamefont.h" -#include "grdef.h" -#include "palette.h" #include "u_mem.h" #include "error.h" - -#include "inferno.h" -#include "screens.h" #include "timer.h" #include "strutil.h" #include "mono.h" @@ -56,6 +48,7 @@ #include #endif + int ogl_voodoohack=0; int vid_installed = 0; diff --git a/arch/ogl/wgl.c b/arch/ogl/wgl.c index 41b33787..0fa9c872 100644 --- a/arch/ogl/wgl.c +++ b/arch/ogl/wgl.c @@ -14,6 +14,7 @@ #include #include +#include #include "internal.h" #include "vers_id.h" @@ -25,7 +26,7 @@ #include "args.h" #include "resource.h" /*#include "event.h"*/ -#include + //not defined in cygwin, needed to keep windows from resizing everything to fit the fullscreen res. #ifndef CDS_FULLSCREEN diff --git a/arch/sdl/digi.c b/arch/sdl/digi.c index 81dc58ea..e7de9798 100644 --- a/arch/sdl/digi.c +++ b/arch/sdl/digi.c @@ -15,18 +15,12 @@ #include -#include "pstypes.h" #include "error.h" #include "mono.h" -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" // needed for piggy.h #include "inferno.h" -#include "digi.h" -#include "sounds.h" -#include "wall.h" -#include "newdemo.h" -#include "kconfig.h" + int digi_sample_rate = SAMPLE_RATE_11K; diff --git a/arch/svgalib/vid.c b/arch/svgalib/vid.c index 3c4c30b3..1a3d4992 100644 --- a/arch/svgalib/vid.c +++ b/arch/svgalib/vid.c @@ -14,9 +14,8 @@ #include #include #include + #include "gr.h" -#include "grdef.h" -#include "palette.h" #include "u_mem.h" #include "error.h" #ifdef SVGALIB_INPUT diff --git a/arch/win32/digi.c b/arch/win32/digi.c index 7155b605..bc5eff0f 100644 --- a/arch/win32/digi.c +++ b/arch/win32/digi.c @@ -14,18 +14,13 @@ #include "error.h" #include "mono.h" #include "fix.h" -#include "vecmat.h" #include "gr.h" // needed for piggy.h -#include "piggy.h" -#include "digi.h" -#include "sounds.h" -#include "wall.h" -#include "newdemo.h" -#include "kconfig.h" +#include "inferno.h" #include "hmpfile.h" #include "altsound.h" + hmp_file *hmp = NULL; #ifdef DIGI_SOUND diff --git a/arch/win32/key.c b/arch/win32/key.c index 448bcae7..4b8b25f0 100644 --- a/arch/win32/key.c +++ b/arch/win32/key.c @@ -2,11 +2,13 @@ #include #include #include + //#include "inferno.h" #include "fix.h" #include "timer.h" #include "key.h" + extern void PumpMessages(void); // These are to kludge up a bit my slightly broken GCC directx port. diff --git a/arch/win32/palw32.c b/arch/win32/palw32.c index 9bd02a06..0a066d66 100644 --- a/arch/win32/palw32.c +++ b/arch/win32/palw32.c @@ -1,6 +1,4 @@ #include "gr.h" -#include "grdef.h" -#include "palette.h" #include diff --git a/arch/win32/scene.cpp b/arch/win32/scene.cpp index 8070f2e4..539779b4 100644 --- a/arch/win32/scene.cpp +++ b/arch/win32/scene.cpp @@ -242,13 +242,10 @@ HRESULT App_ConfirmDevice( DDCAPS* pddDriverCaps, extern "C" { #include "types.h" -#include "grdef.h" -#include "..\main\segment.h" -#include "..\main\segpoint.h" -#include "..\main\object.h" +#include "gr.h" +#include "..\main\inferno.h" #include "..\3d\globvars.h" #include "3d.h" -#include "palette.h" } #undef __BOGUS1 diff --git a/arch/win32/vid.c b/arch/win32/vid.c index 5073cea6..607bc766 100644 --- a/arch/win32/vid.c +++ b/arch/win32/vid.c @@ -9,13 +9,11 @@ #ifdef __GCC__ #include #endif + #include "gr.h" -#include "grdef.h" -#include "palette.h" #include "u_mem.h" #include "error.h" #include "vers_id.h" - #include "gamefont.h" //added 10/05/98 by Matt Mueller - make fullscreen mode optional diff --git a/arch/win32/win32.c b/arch/win32/win32.c index 7b0e64f8..2f77fffc 100644 --- a/arch/win32/win32.c +++ b/arch/win32/win32.c @@ -1,21 +1,15 @@ #define WIN32_LEAN_AND_MEAN #include #include + #include "gr.h" -#include "grdef.h" #include "u_mem.h" #include "timer.h" #include "error.h" - -#include "gr.h" -#include "grdef.h" -#include "palette.h" -#include "rle.h" #include "d3dhelp.h" #include "game.h" #include "gauges.h" #include "args.h" - #include "gamefont.h" #ifndef NDEBUG @@ -24,6 +18,7 @@ #endif #endif + void gr_linear_rep_movsdm(ubyte *src, ubyte *dest, int num_pixels); void InitMain(); void show_dd_error(HRESULT hr, char *loc); diff --git a/iff/archive/ifftest.c b/iff/archive/ifftest.c index 73d37d46..c0a4291a 100644 --- a/iff/archive/ifftest.c +++ b/iff/archive/ifftest.c @@ -17,7 +17,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "iff.h" #include "vga.h" -#include "palette.h" +#include "gr.h" #include "mem.h" //#define ANIM_TEST 1 //if defined, read in anim brush diff --git a/include/3d.h b/include/3d.h index 8d197d84..882d8302 100644 --- a/include/3d.h +++ b/include/3d.h @@ -21,10 +21,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _3D_H #define _3D_H -#include "fix.h" -#include "vecmat.h" //the vector/matrix library +#include "maths.h" #include "gr.h" + extern int g3d_interp_outline; //if on, polygon models outlined in white extern vms_vector Matrix_scale; //how the matrix is currently scaled @@ -84,6 +84,10 @@ typedef struct g3s_object { } g3s_object; + +#include "interp.h" + + //Functions in library //3d system startup and shutdown: diff --git a/include/fix.h b/include/fix.h index 879f42cb..027778d2 100644 --- a/include/fix.h +++ b/include/fix.h @@ -1,2 +1,212 @@ -/* fix.h points to maths.h */ -#include "maths.h" +/* +THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX +SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO +END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A +ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS +IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS +SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE +FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE +CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS +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 _FIX_H +#define _FIX_H + +#define NO_FIX_INLINE 1 + +#include +#include "pstypes.h" + + +//=============================== FIXED POINT =============================== + +typedef int32_t fix; //16 bits int, 16 bits frac +typedef int16_t fixang; //angles + +typedef struct quadint // integer 64 bit, previously called "quad" + { + uint32_t low; + int32_t high; + } +quadint; + + +//Convert an int to a fix +#define i2f(i) ((fix)((i)<<16)) + +//Get the int part of a fix +#define f2i(f) ((f)>>16) + +//Get the int part of a fix, with rounding +#define f2ir(f) (((f)+f0_5)>>16) + +//Convert fix to float and float to fix +#define f2fl(f) (((float) (f)) / 65536.0) +#define f2db(f) (((double) (f)) / 65536.0) +#define fl2f(f) ((fix) ((f) * 65536)) + +//Some handy constants +#define f0_0 0 +#define f1_0 0x10000 +#define f2_0 0x20000 +#define f3_0 0x30000 +#define f10_0 0xa0000 + +#define f0_5 0x8000 +#define f0_1 0x199a + +#define F0_0 f0_0 +#define F1_0 f1_0 +#define F2_0 f2_0 +#define F3_0 f3_0 +#define F10_0 f10_0 + +#define F0_5 f0_5 +#define F0_1 f0_1 + +//#if defined(NO_FIX_INLINE) || (!defined(__GNUC__) && !defined(__WATCOMC__)) +//multiply two fixes, return a fix +fix fixmul (fix a, fix b); + +//divide two fixes, return a fix +fix fixdiv (fix a, fix b); + +//multiply two fixes, then divide by a third, return a fix +fix fixmuldiv (fix a, fix b, fix c); +#if 0 + +//#else + +//#ifdef __WATCOMC__ +fix fixmul (fix a, fix b); + +#pragma aux fixmul parm [eax] [edx] = \ +"imul edx" \ +"shrd eax,edx,16"; + + + +fix fixdiv (fix a, fix b); + +#pragma aux fixdiv parm [eax] [ebx] modify exact [eax edx] = \ +"mov edx,eax" \ +"sar edx,16" \ +"shl eax,16" \ +"idiv ebx"; + + +fix fixmuldiv (fix a, fix b, fix c); + +#pragma aux fixmuldiv parm [eax] [edx] [ebx] modify exact [eax edx] = \ +"imul edx" \ +"idiv ebx"; + +//#elif defined (__GNUC__) +/* +static inline fix +fixmul (fix a, fix b) +{ + + fix __retval; + + asm (" imul %2;" + " shrd $16,%%edx,%%eax" +: "=a" (__retval): "a" (a), "d" (b):"%edx"); + + return __retval; + +} */ + +//multiply two fixes, return a fix +fix fixmul (fix a, fix b); + + +//divide two fixes, return a fix +fix fixdiv (fix a, fix b); + +//multiply two fixes, then divide by a third, return a fix +fix fixmuldiv (fix a, fix b, fix c); + +//#if 0 +static inline fix +fixdiv (fix a, fix b) +{ + + register fix __retval; + + asm (" mov %%eax,%%edx;" + " sar $16,%%edx;" + " shl $16,%%eax;" + " idiv %%ecx" /* adb: how to make this %0 w/o chance of edx? */ +: "=a" (__retval): "a" (a), "c" (b):"%edx"); + + return __retval; + +} + +static inline fix +fixmuldiv (fix a, fix b, fix c) +{ + + register fix __retval; + + asm (" imul %0;" + " idiv %%ecx" /* adb: how to make this %0 w/o chance of edx? */ +: "=a" (__retval): "a" (a), "r" (b), "c" (c):"%edx"); + + return __retval; + +} +//#endif + +//#endif // __GNUC__ / __WATCOMC__ +//#endif /* defined NO_FIX_INLINE || (!defined __GNUC__ && !defined __WATCOMC__) */ + +#endif + +//multiply two fixes, and add 64-bit product to a quadint +void fixmulaccum (quadint * q, fix a, fix b); + +//extract a fix from a quadint product +fix fixquadadjust (quadint * q); + +//divide a quadint by a long +int32_t fixdivquadlong(uint32_t qlow, uint32_t qhigh, uint32_t d); + +//negate a quadint +void fixquadnegate (quadint * q); + +//computes the square root of a long, returning a short +ushort long_sqrt (int32_t a); + +//computes the square root of a quadint, returning a long +uint32_t quad_sqrt(uint32_t low, int32_t high); +//unsigned long quad_sqrt (long low, long high); + +//computes the square root of a fix, returning a fix +fix fix_sqrt (fix a); + +//compute sine and cosine of an angle, filling in the variables +//either of the pointers can be NULL +void fix_sincos (fix a, fix * s, fix * c); //with interpolation + +void fix_fastsincos (fix a, fix * s, fix * c); //no interpolation + +//compute inverse sine & cosine +fixang fix_asin (fix v); + +fixang fix_acos (fix v); + +//given cos & sin of an angle, return that angle. +//parms need not be normalized, that is, the ratio of the parms cos/sin must +//equal the ratio of the actual cos & sin for the result angle, but the parms +//need not be the actual cos & sin. +//NOTE: this is different from the standard C atan2, since it is left-handed. +fixang fix_atan2 (fix cos, fix sin); + +//for passed value a, returns 1/sqrt(a) +fix fix_isqrt (fix a); + +#endif diff --git a/include/gr.h b/include/gr.h index 65bb9b2a..48f76dad 100644 --- a/include/gr.h +++ b/include/gr.h @@ -170,8 +170,12 @@ typedef struct _grs_screen { // This is a video screen } grs_screen; -#include "console.h" +#include "../2d/bitmap.h" +#include "grdef.h" +#include "ibitblt.h" #include "palette.h" +#include "pcx.h" +#include "rle.h" //========================================================================= diff --git a/include/interp.h b/include/interp.h index c9676075..7bff6916 100644 --- a/include/interp.h +++ b/include/interp.h @@ -12,7 +12,7 @@ //#include "vecmat.h" //the vector/matrix library #include "gr.h" #include "cfile.h" -#include "3d.h" + //Object functions: diff --git a/include/maths.h b/include/maths.h index 58521e29..d1903b0d 100644 --- a/include/maths.h +++ b/include/maths.h @@ -3,11 +3,8 @@ #ifndef _MATHS_H #define _MATHS_H -#define NO_FIX_INLINE 1 - -#include -#include "pstypes.h" - +#include "fix.h" +#include "vecmat.h" #define D_RAND_MAX 32767 @@ -16,193 +13,4 @@ void d_srand (unsigned int seed); int d_rand (); // Random number function which returns in the range 0-0x7FFF -//=============================== FIXED POINT =============================== - -typedef int32_t fix; //16 bits int, 16 bits frac -typedef int16_t fixang; //angles - -typedef struct quadint // integer 64 bit, previously called "quad" - { - uint32_t low; - int32_t high; - } -quadint; - - -//Convert an int to a fix -#define i2f(i) ((fix)((i)<<16)) - -//Get the int part of a fix -#define f2i(f) ((f)>>16) - -//Get the int part of a fix, with rounding -#define f2ir(f) (((f)+f0_5)>>16) - -//Convert fix to float and float to fix -#define f2fl(f) (((float) (f)) / 65536.0) -#define f2db(f) (((double) (f)) / 65536.0) -#define fl2f(f) ((fix) ((f) * 65536)) - -//Some handy constants -#define f0_0 0 -#define f1_0 0x10000 -#define f2_0 0x20000 -#define f3_0 0x30000 -#define f10_0 0xa0000 - -#define f0_5 0x8000 -#define f0_1 0x199a - -#define F0_0 f0_0 -#define F1_0 f1_0 -#define F2_0 f2_0 -#define F3_0 f3_0 -#define F10_0 f10_0 - -#define F0_5 f0_5 -#define F0_1 f0_1 - -//#if defined(NO_FIX_INLINE) || (!defined(__GNUC__) && !defined(__WATCOMC__)) -//multiply two fixes, return a fix -fix fixmul (fix a, fix b); - -//divide two fixes, return a fix -fix fixdiv (fix a, fix b); - -//multiply two fixes, then divide by a third, return a fix -fix fixmuldiv (fix a, fix b, fix c); -#if 0 - -//#else - -//#ifdef __WATCOMC__ -fix fixmul (fix a, fix b); - -#pragma aux fixmul parm [eax] [edx] = \ -"imul edx" \ -"shrd eax,edx,16"; - - - -fix fixdiv (fix a, fix b); - -#pragma aux fixdiv parm [eax] [ebx] modify exact [eax edx] = \ -"mov edx,eax" \ -"sar edx,16" \ -"shl eax,16" \ -"idiv ebx"; - - -fix fixmuldiv (fix a, fix b, fix c); - -#pragma aux fixmuldiv parm [eax] [edx] [ebx] modify exact [eax edx] = \ -"imul edx" \ -"idiv ebx"; - -//#elif defined (__GNUC__) -/* -static inline fix -fixmul (fix a, fix b) -{ - - fix __retval; - - asm (" imul %2;" - " shrd $16,%%edx,%%eax" -: "=a" (__retval): "a" (a), "d" (b):"%edx"); - - return __retval; - -} */ - -//multiply two fixes, return a fix -fix fixmul (fix a, fix b); - - -//divide two fixes, return a fix -fix fixdiv (fix a, fix b); - -//multiply two fixes, then divide by a third, return a fix -fix fixmuldiv (fix a, fix b, fix c); - -//#if 0 -static inline fix -fixdiv (fix a, fix b) -{ - - register fix __retval; - - asm (" mov %%eax,%%edx;" - " sar $16,%%edx;" - " shl $16,%%eax;" - " idiv %%ecx" /* adb: how to make this %0 w/o chance of edx? */ -: "=a" (__retval): "a" (a), "c" (b):"%edx"); - - return __retval; - -} - -static inline fix -fixmuldiv (fix a, fix b, fix c) -{ - - register fix __retval; - - asm (" imul %0;" - " idiv %%ecx" /* adb: how to make this %0 w/o chance of edx? */ -: "=a" (__retval): "a" (a), "r" (b), "c" (c):"%edx"); - - return __retval; - -} -//#endif - -//#endif // __GNUC__ / __WATCOMC__ -//#endif /* defined NO_FIX_INLINE || (!defined __GNUC__ && !defined __WATCOMC__) */ - -#endif - -//multiply two fixes, and add 64-bit product to a quadint -void fixmulaccum (quadint * q, fix a, fix b); - -//extract a fix from a quadint product -fix fixquadadjust (quadint * q); - -//divide a quadint by a long -int32_t fixdivquadlong(uint32_t qlow, uint32_t qhigh, uint32_t d); - -//negate a quadint -void fixquadnegate (quadint * q); - -//computes the square root of a long, returning a short -ushort long_sqrt (int32_t a); - -//computes the square root of a quadint, returning a long -uint32_t quad_sqrt(uint32_t low, int32_t high); -//unsigned long quad_sqrt (long low, long high); - -//computes the square root of a fix, returning a fix -fix fix_sqrt (fix a); - -//compute sine and cosine of an angle, filling in the variables -//either of the pointers can be NULL -void fix_sincos (fix a, fix * s, fix * c); //with interpolation - -void fix_fastsincos (fix a, fix * s, fix * c); //no interpolation - -//compute inverse sine & cosine -fixang fix_asin (fix v); - -fixang fix_acos (fix v); - -//given cos & sin of an angle, return that angle. -//parms need not be normalized, that is, the ratio of the parms cos/sin must -//equal the ratio of the actual cos & sin for the result angle, but the parms -//need not be the actual cos & sin. -//NOTE: this is different from the standard C atan2, since it is left-handed. -fixang fix_atan2 (fix cos, fix sin); - -//for passed value a, returns 1/sqrt(a) -fix fix_isqrt (fix a); - #endif diff --git a/include/ogl_init.h b/include/ogl_init.h index 4b60b8f8..6ee28d99 100644 --- a/include/ogl_init.h +++ b/include/ogl_init.h @@ -41,8 +41,7 @@ int ogl_init_load_library(void); #endif #include "gr.h" -#include "palette.h" -#include "pstypes.h" + /* we need to export ogl_texture for 2d/font.c */ typedef struct _ogl_texture { diff --git a/include/palette.h b/include/palette.h index dfd74261..9bb9c035 100644 --- a/include/palette.h +++ b/include/palette.h @@ -20,6 +20,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _PALETTE_H #define _PALETTE_H + +#include "cvar.h" + + #define DEFAULT_LEVEL_PALETTE "groupa.256" //don't confuse with DEFAULT_PALETTE extern void gr_palette_set_gamma( int gamma ); diff --git a/include/texmap.h b/include/texmap.h index ddd545b9..617c27c6 100644 --- a/include/texmap.h +++ b/include/texmap.h @@ -19,7 +19,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _TEXMAP_H #define _TEXMAP_H -#include "fix.h" +#include "maths.h" #include "3d.h" #include "gr.h" diff --git a/include/timer.h b/include/timer.h index ca8c1ae6..abe9a6c0 100644 --- a/include/timer.h +++ b/include/timer.h @@ -24,6 +24,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "pstypes.h" #include "fix.h" + //========================================================================== // This installs the timer services and interrupts at the rate specified by // count_val. If 'function' isn't 0, the function pointed to by function will diff --git a/include/vecmat.h b/include/vecmat.h index 4f36217f..40d161c0 100644 --- a/include/vecmat.h +++ b/include/vecmat.h @@ -19,7 +19,8 @@ #ifndef _VECMAT_H #define _VECMAT_H -#include "maths.h" +#include "fix.h" + //#define INLINE 1 //are some of these functions inline? diff --git a/main/ai.c b/main/ai.c index 2e2dd2cc..c8530775 100644 --- a/main/ai.c +++ b/main/ai.c @@ -32,16 +32,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" #include "timer.h" #include "key.h" - #ifdef EDITOR #include "editor/editor.h" #endif -#include "string.h" - -#ifndef NDEBUG -#include -#endif // ---------- John: These variables must be saved as part of gamesave. -------- int Ai_initialized = 0; diff --git a/main/ai2.c b/main/ai2.c index 418f4311..d2a66b8a 100644 --- a/main/ai2.c +++ b/main/ai2.c @@ -32,15 +32,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" #include "timer.h" #include "key.h" - #ifdef EDITOR #include "editor/editor.h" -#include "editor/kdefs.h" -#endif - -#ifndef NDEBUG -#include "string.h" -#include #endif diff --git a/main/automap.c b/main/automap.c index 749d2d51..ed77a156 100644 --- a/main/automap.c +++ b/main/automap.c @@ -28,7 +28,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifdef OGL #include "ogl_init.h" #endif - #include "error.h" #include "3d.h" #include "inferno.h" @@ -39,8 +38,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "timer.h" #include "joy.h" #include "iff.h" -#include "pcx.h" -#include "palette.h" +#include "gr.h" #include "vid.h" diff --git a/main/bm.c b/main/bm.c index 4f8f823e..3a95012c 100644 --- a/main/bm.c +++ b/main/bm.c @@ -33,7 +33,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "iff.h" #include "cfile.h" #include "makesig.h" -#include "interp.h" + ubyte Sounds[MAX_SOUNDS]; ubyte AltSounds[MAX_SOUNDS]; diff --git a/main/bmread.c b/main/bmread.c index 2cb26f43..cfc18f47 100644 --- a/main/bmread.c +++ b/main/bmread.c @@ -37,11 +37,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "iff.h" #include "cfile.h" #include "args.h" -#include "interp.h" +#include "3d.h" #include "strutil.h" - #include "editor/texpage.h" + #define BM_NONE -1 #define BM_COCKPIT 0 #define BM_TEXTURES 2 diff --git a/main/cmd.c b/main/cmd.c index b228b47f..a2cf9bfa 100644 --- a/main/cmd.c +++ b/main/cmd.c @@ -7,9 +7,6 @@ #include #include -#include "pstypes.h" -#include "cmd.h" -#include "console.h" #include "error.h" #include "u_mem.h" #include "strutil.h" diff --git a/main/cntrlcen.c b/main/cntrlcen.c index ef03a566..c5b47b20 100644 --- a/main/cntrlcen.c +++ b/main/cntrlcen.c @@ -29,7 +29,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" #include "mono.h" - #include "inferno.h" diff --git a/main/collide.c b/main/collide.c index 017c67d6..eec8531b 100644 --- a/main/collide.c +++ b/main/collide.c @@ -24,7 +24,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "rle.h" #include "inferno.h" #include "gr.h" #include "stdlib.h" @@ -32,11 +31,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "3d.h" #include "key.h" #include "error.h" - #ifdef TACTILE #include "tactile.h" #endif - #ifdef EDITOR #include "editor/editor.h" #endif diff --git a/main/config.c b/main/config.c index aae44f1b..2e5d695d 100644 --- a/main/config.c +++ b/main/config.c @@ -22,22 +22,21 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif +#include +#include +#include +#include + #ifdef WINDOWS #define WIN32_LEAN_AND_MEAN #include #include "winapp.h" -#else #endif -#include -#include -#include -#include - #include #include "inferno.h" -#include "palette.h" +#include "gr.h" #include "joy.h" #include "args.h" #include "mono.h" @@ -240,6 +239,7 @@ static void config_init(void) } +#ifdef NETWORK static int get_lifetime_checksum (int a,int b) { int num; @@ -251,6 +251,7 @@ static int get_lifetime_checksum (int a,int b) num*=num>>2; return (num); } +#endif void LoadConfigDefaults(void) diff --git a/main/console.c b/main/console.c index 7b21fd35..9deb210c 100644 --- a/main/console.c +++ b/main/console.c @@ -31,8 +31,6 @@ #include "timer.h" #include "pstypes.h" #include "error.h" -#include "cvar.h" -#include "pcx.h" #include "cfile.h" diff --git a/main/controls.c b/main/controls.c index 0e36994b..9435103e 100644 --- a/main/controls.c +++ b/main/controls.c @@ -30,9 +30,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "timer.h" #include "error.h" #include "inferno.h" -#include "joydefs.h" #include "args.h" -#include "palette.h" +#include "gr.h" #include "mouse.h" diff --git a/main/credits.c b/main/credits.c index 2f75c099..49f761ca 100644 --- a/main/credits.c +++ b/main/credits.c @@ -35,7 +35,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "timer.h" #include "iff.h" -#include "pcx.h" #include "u_mem.h" #include "mouse.h" #include "joy.h" diff --git a/main/crypt.c b/main/crypt.c index 4ed5d147..804f89a5 100644 --- a/main/crypt.c +++ b/main/crypt.c @@ -27,6 +27,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. //#include "inferno.h" + char *jcrypt (char *plainstring) { int i, t, len; diff --git a/main/digiobj.c b/main/digiobj.c index 919d53a5..00684871 100644 --- a/main/digiobj.c +++ b/main/digiobj.c @@ -19,18 +19,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include #include - #ifdef __MSDOS__ # include # include # include # include #endif - #include #include -#include "fix.h" +#include "maths.h" #include "inferno.h" #include "mono.h" #include "timer.h" diff --git a/main/dumpmine.c b/main/dumpmine.c index c74fe92e..19cc6fe7 100644 --- a/main/dumpmine.c +++ b/main/dumpmine.c @@ -28,33 +28,14 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pstypes.h" #include "mono.h" #include "key.h" #include "gr.h" -#include "palette.h" - #include "inferno.h" #ifdef EDITOR #include "editor/editor.h" #endif #include "error.h" -#include "object.h" -#include "wall.h" -#include "gamemine.h" -#include "robot.h" -#include "player.h" -#include "newmenu.h" -#include "textures.h" - -#include "bm.h" -#include "menu.h" -#include "switch.h" -#include "fuelcen.h" -#include "powerup.h" -#include "gameseq.h" -#include "polyobj.h" -#include "gamesave.h" #ifdef EDITOR diff --git a/main/editor/autosave.c b/main/editor/autosave.c index e2c66994..3428aa05 100644 --- a/main/editor/autosave.c +++ b/main/editor/autosave.c @@ -33,13 +33,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "error.h" - #include "inferno.h" #include "editor.h" #include "mono.h" #include "u_mem.h" #include "ui.h" + #define AUTOSAVE_PERIOD 5 // Number of minutes for timed autosave int Autosave_count; diff --git a/main/editor/centers.c b/main/editor/centers.c index 70421369..45280b07 100644 --- a/main/editor/centers.c +++ b/main/editor/centers.c @@ -26,31 +26,14 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "screens.h" #include "inferno.h" -#include "segment.h" #include "editor.h" - #include "timer.h" -#include "objpage.h" -#include "fix.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "kdefs.h" -#include "object.h" -#include "polyobj.h" -#include "game.h" -#include "powerup.h" -#include "ai.h" -#include "hostage.h" -#include "eobject.h" -#include "medwall.h" -#include "eswitch.h" -#include "ehostage.h" #include "key.h" -#include "medrobot.h" -#include "bm.h" -#include "centers.h" + //------------------------------------------------------------------------- // Variables for this module... diff --git a/main/editor/curves.c b/main/editor/curves.c index 72d5999b..de7ccc48 100644 --- a/main/editor/curves.c +++ b/main/editor/curves.c @@ -34,11 +34,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "mono.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "key.h" #include "editor.h" -#include "gameseg.h" + #define ONE_OVER_SQRT2 F1_0 * 0.707106781 #define CURVE_RIGHT 1 diff --git a/main/editor/editor.h b/main/editor/editor.h index d10e2992..79bd5d94 100644 --- a/main/editor/editor.h +++ b/main/editor/editor.h @@ -20,8 +20,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _EDITOR_H #define _EDITOR_H -#include "vecmat.h" -#include "segment.h" +#include "maths.h" #include "inferno.h" #include "gr.h" #include "ui.h" @@ -147,6 +146,28 @@ typedef struct editor_view { fix ev_zoom; //zoom for this window } editor_view; + +#include "centers.h" +#include "ehostage.h" +#include "eobject.h" +#include "eswitch.h" +#include "info.h" +#include "kdefs.h" +#include "kfuncs.h" +#include "macro.h" +#include "meddraw.h" +#ifdef INCLUDE_XLISP +#include "medlisp.h" +#endif +#include "medmisc.h" +#include "medrobot.h" +#include "medsel.h" +#include "medwall.h" +#include "objpage.h" +#include "seguvs.h" +#include "texpage.h" + + /* * Global variables * diff --git a/main/editor/eglobal.c b/main/editor/eglobal.c index b74ada4b..96bfbdce 100644 --- a/main/editor/eglobal.c +++ b/main/editor/eglobal.c @@ -22,10 +22,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include + #include "inferno.h" -#include "segment.h" #include "editor.h" + // Global pointer to current vertices, right now always Vertices. Set in create_new_mine. // segment New_segment; // segment which can be added to the mine. // replaced by a macro segment *Cursegp; // Pointer to current segment in mine. diff --git a/main/editor/ehostage.c b/main/editor/ehostage.c index ecac67a3..bf74f037 100644 --- a/main/editor/ehostage.c +++ b/main/editor/ehostage.c @@ -33,32 +33,14 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "screens.h" #include "inferno.h" -#include "segment.h" #include "editor.h" - #include "timer.h" -#include "objpage.h" -#include "fix.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "kdefs.h" -#include "object.h" -#include "polyobj.h" -#include "game.h" -#include "powerup.h" -#include "ai.h" -#include "hostage.h" -#include "eobject.h" -#include "medwall.h" -#include "eswitch.h" -#include "medrobot.h" #include "key.h" -#include "bm.h" -#include "sounds.h" -#include "centers.h" -#include "piggy.h" + //------------------------------------------------------------------------- // Variables for this module... diff --git a/main/editor/elight.c b/main/editor/elight.c index b07da81b..aba53594 100644 --- a/main/editor/elight.c +++ b/main/editor/elight.c @@ -28,22 +28,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. //#include #include "inferno.h" -#include "segment.h" #include "editor.h" -#include "seguvs.h" - -#include "wall.h" - -#include "textures.h" - -#include "fix.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "kdefs.h" -#include "gameseg.h" - #include "texmap.h" + // ----------------------------------------------------------------------------- // Return light intensity at an instance of a vertex on a side in a segment. fix get_light_intensity(segment *segp, int sidenum, int vert) diff --git a/main/editor/eobject.c b/main/editor/eobject.c index 1cae5d14..2426e5e7 100644 --- a/main/editor/eobject.c +++ b/main/editor/eobject.c @@ -28,29 +28,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "segment.h" #include "editor.h" - -#include "objpage.h" -#include "fix.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "kdefs.h" -#include "object.h" -#include "polyobj.h" -#include "game.h" -#include "ai.h" -#include "bm.h" #include "3d.h" // For g3_point_to_vec -#include "fvi.h" - -#include "powerup.h" -#include "fuelcen.h" -#include "hostage.h" -#include "medrobot.h" -#include "player.h" -#include "gameseg.h" -#include "cntrlcen.h" + #define OBJ_SCALE (F1_0/2) #define OBJ_DEL_SIZE (F1_0/2) diff --git a/main/editor/eswitch.c b/main/editor/eswitch.c index 9da292a5..3dedc72c 100644 --- a/main/editor/eswitch.c +++ b/main/editor/eswitch.c @@ -28,24 +28,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" -#include "eswitch.h" -#include "segment.h" #include "error.h" -#include "gameseg.h" #include "mono.h" -#include "wall.h" -#include "medwall.h" - -#include "screens.h" - -#include "textures.h" -#include "texmerge.h" -#include "medrobot.h" #include "timer.h" #include "key.h" -#include "ehostage.h" -#include "centers.h" -#include "piggy.h" + //------------------------------------------------------------------------- // Variables for this module... diff --git a/main/editor/eswitch.h b/main/editor/eswitch.h index be579434..d737d4e5 100644 --- a/main/editor/eswitch.h +++ b/main/editor/eswitch.h @@ -21,8 +21,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define _ESWITCH_H #include "inferno.h" -#include "segment.h" -#include "switch.h" + extern int bind_wall_to_trigger(); diff --git a/main/editor/fixseg.c b/main/editor/fixseg.c index 414dd67d..c40e80b7 100644 --- a/main/editor/fixseg.c +++ b/main/editor/fixseg.c @@ -29,13 +29,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "key.h" #include "gr.h" - #include "inferno.h" -#include "segment.h" -//#include "segment2.h" -#include "editor.h" +#include "editor.h" #include "error.h" -#include "gameseg.h" + #define SWAP(a,b) {temp = (a); (a) = (b); (b) = temp;} diff --git a/main/editor/group.c b/main/editor/group.c index a4c79b72..86534bc7 100644 --- a/main/editor/group.c +++ b/main/editor/group.c @@ -28,20 +28,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "nocfile.h" #include "ui.h" - #include "inferno.h" -#include "segment.h" -#include "editor/editor.h" +#include "editor.h" #include "error.h" -#include "gamemine.h" -#include "gameseg.h" - -#include "bm.h" // For MAX_TEXTURES. -#include "textures.h" #include "hash.h" -#include "fuelcen.h" -#include "medwall.h" void validate_selected_segments(void); @@ -1647,7 +1638,7 @@ int Degroup( void ) return 1; } -void NextGroup( void ) +int NextGroup( void ) { if (num_groups > 0) @@ -1659,9 +1650,11 @@ void NextGroup( void ) mine_changed = 1; } else editor_status("No Next Group\n"); + + return 1; } -void PrevGroup( void ) +int PrevGroup( void ) { if (num_groups > 0) { @@ -1672,6 +1665,8 @@ void PrevGroup( void ) mine_changed = 1; } else editor_status("No Previous Group\n"); + + return 1; } // Returns: diff --git a/main/editor/info.c b/main/editor/info.c index 616d1f75..c1de37a4 100644 --- a/main/editor/info.c +++ b/main/editor/info.c @@ -31,22 +31,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "inferno.h" -#include "segment.h" #include "gr.h" #include "ui.h" #include "editor.h" - #include "mono.h" #include "error.h" -#include "textures.h" -#include "object.h" -#include "ai.h" - -#include "texpage.h" // Textue selection paging stuff -#include "objpage.h" // Object selection paging stuff -#include "wall.h" -#include "switch.h" int init_info; diff --git a/main/editor/kbuild.c b/main/editor/kbuild.c index 7c3ecd3c..e13e090a 100644 --- a/main/editor/kbuild.c +++ b/main/editor/kbuild.c @@ -24,11 +24,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "editor/editor.h" -#include "gameseg.h" -#include "gamesave.h" +#include "editor.h" #include "mono.h" + // ---------- Create a bridge segment between current segment/side and marked segment/side ---------- int CreateBridge() { diff --git a/main/editor/kcurve.c b/main/editor/kcurve.c index ede4de23..d712affa 100644 --- a/main/editor/kcurve.c +++ b/main/editor/kcurve.c @@ -25,7 +25,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" -#include "kdefs.h" + static fix r1scale, r4scale; static int curve; diff --git a/main/editor/kdefs.h b/main/editor/kdefs.h index d49f811a..61980343 100644 --- a/main/editor/kdefs.h +++ b/main/editor/kdefs.h @@ -44,8 +44,8 @@ void ResetFilename(); // In group.c int LoadGroup(); int SaveGroup(); -int PrevGroup(); -int NextGroup(); +int PrevGroup(void); +int NextGroup(void); int CreateGroup(); int SubtractFromGroup(); int DeleteGroup(); diff --git a/main/editor/kfuncs.c b/main/editor/kfuncs.c index 7eefb3dd..cb3d3721 100644 --- a/main/editor/kfuncs.c +++ b/main/editor/kfuncs.c @@ -25,15 +25,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "func.h" -#include "editor/kdefs.h" -#include "segment.h" -#include "editor/editor.h" +#include "editor.h" #include "error.h" -#include "slew.h" #include "mono.h" -#include "gamesave.h" -#include "editor/eobject.h" -#include "editor/medwall.h" + // Test function prototypes (replace Test1, 2 and 3 with whatever function // you wish to test.) diff --git a/main/editor/kgame.c b/main/editor/kgame.c index 1d779470..013b36ba 100644 --- a/main/editor/kgame.c +++ b/main/editor/kgame.c @@ -27,9 +27,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" #include "ui.h" -#include "game.h" -#include "gamesave.h" -#include "gameseq.h" + char game_filename[PATH_MAX] = "*.RL2"; diff --git a/main/editor/khelp.c b/main/editor/khelp.c index 3276acb2..7743ed8f 100644 --- a/main/editor/khelp.c +++ b/main/editor/khelp.c @@ -23,9 +23,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" - #include "ui.h" + static char MainHelpText[] = "\nMED General Functions\n\n" \ "SPACEBAR Full Redraw\n" \ "BACKSPACE Drop into debugger\n\n" \ diff --git a/main/editor/kmine.c b/main/editor/kmine.c index 7982f1c4..183359cd 100644 --- a/main/editor/kmine.c +++ b/main/editor/kmine.c @@ -27,21 +27,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" #include "strutil.h" - #include "nocfile.h" - #include "inferno.h" #include "editor.h" #include "ui.h" -#include "texpage.h" // For texpage_goto_first -#include "segment.h" #include "mono.h" -#include "kdefs.h" -#include "info.h" -#include "game.h" -#include "gameseq.h" -#include "object.h" #define MINESAVE_CRIPPLED 0 diff --git a/main/editor/ksegmove.c b/main/editor/ksegmove.c index d3d74d1f..bde8b877 100644 --- a/main/editor/ksegmove.c +++ b/main/editor/ksegmove.c @@ -29,6 +29,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" + // -- old -- int SegOrientCommon(fixang *ang, fix val) // -- old -- { // -- old -- *ang += val; diff --git a/main/editor/ksegsel.c b/main/editor/ksegsel.c index 314d5c69..5aa296d7 100644 --- a/main/editor/ksegsel.c +++ b/main/editor/ksegsel.c @@ -24,7 +24,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "editor/editor.h" +#include "editor.h" // --------------------------------------------------------------------------------------- diff --git a/main/editor/ksegsize.c b/main/editor/ksegsize.c index 592a300a..81eda24b 100644 --- a/main/editor/ksegsize.c +++ b/main/editor/ksegsize.c @@ -27,8 +27,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "editor.h" #include "mono.h" #include "error.h" -#include "segment.h" -#include "gameseg.h" + #define XDIM 0 #define YDIM 1 diff --git a/main/editor/ktmap.c b/main/editor/ktmap.c index 7f19299a..62aca340 100644 --- a/main/editor/ktmap.c +++ b/main/editor/ktmap.c @@ -26,7 +26,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" #include "mono.h" -#include "kdefs.h" + // Assign CurrentTexture to Curside in *Cursegp int AssignTexture(void) diff --git a/main/editor/kview.c b/main/editor/kview.c index ae6d352e..06200271 100644 --- a/main/editor/kview.c +++ b/main/editor/kview.c @@ -24,6 +24,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "editor.h" + // ---------- zoom control on current window ---------- int ZoomIn() { diff --git a/main/editor/macro.c b/main/editor/macro.c index 0ea5735e..314d928a 100644 --- a/main/editor/macro.c +++ b/main/editor/macro.c @@ -28,24 +28,18 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "segment.h" #include "editor.h" - #include "gr.h" #include "ui.h" #include "key.h" -#include "fix.h" +#include "maths.h" #include "mono.h" #include "3d.h" #include "mouse.h" -#include "bm.h" #include "error.h" -#include "medlisp.h" - -#include "kdefs.h" - #include "u_mem.h" + #define MAX_NUM_EVENTS 10000 UI_EVENT * RecordBuffer; diff --git a/main/editor/med.c b/main/editor/med.c index 68e6eda9..4eb24920 100644 --- a/main/editor/med.c +++ b/main/editor/med.c @@ -36,57 +36,19 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif - //#define INCLUDE_XLISP #include "inferno.h" -#include "segment.h" -#include "gr.h" +#include "vid.h" #include "ui.h" #include "editor.h" -//#include "gamemine.h" -#include "gamesave.h" -#include "gameseg.h" - #include "key.h" #include "mono.h" #include "error.h" -#include "kfuncs.h" -#include "macro.h" - -#ifdef INCLUDE_XLISP -#include "medlisp.h" -#endif #include "u_mem.h" -#include "render.h" -#include "game.h" -#include "slew.h" -#include "kdefs.h" #include "func.h" -#include "textures.h" -#include "screens.h" #include "texmap.h" -#include "object.h" -#include "effects.h" -#include "wall.h" -#include "info.h" -#include "ai.h" - -#include "texpage.h" // Textue selection paging stuff -#include "objpage.h" // Object selection paging stuff - -#include "medmisc.h" -#include "meddraw.h" -#include "medsel.h" -#include "medrobot.h" -#include "medwall.h" -#include "eswitch.h" -#include "ehostage.h" -#include "centers.h" - -#include "fuelcen.h" -#include "gameseq.h" -#include "newmenu.h" + //#define _MARK_ON 1 //#include //should come after inferno.h to get mark setting //Not included here. diff --git a/main/editor/meddraw.c b/main/editor/meddraw.c index 5bd8020a..b01dd43f 100644 --- a/main/editor/meddraw.c +++ b/main/editor/meddraw.c @@ -30,31 +30,16 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "inferno.h" -#include "segment.h" -#include "segpoint.h" -#include "gameseg.h" #include "gr.h" #include "ui.h" -#include "editor/editor.h" - -#include "wall.h" -#include "switch.h" - +#include "editor.h" #include "key.h" #include "mono.h" #include "error.h" -#include "medlisp.h" #include "u_mem.h" -#include "render.h" -#include "game.h" -//#include "slew.h" -#include "kdefs.h" #include "func.h" -#include "textures.h" -#include "screens.h" #include "texmap.h" -#include "object.h" -#include "fuelcen.h" + // Colors used in editor for indicating various kinds of segments. #define SELECT_COLOR BM_XRGB( 63/2 , 41/2 , 0/2) diff --git a/main/editor/medmisc.c b/main/editor/medmisc.c index 811e4712..ca8664f8 100644 --- a/main/editor/medmisc.c +++ b/main/editor/medmisc.c @@ -32,24 +32,14 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "ui.h" #include "3d.h" - #include "u_mem.h" #include "error.h" #include "mono.h" #include "key.h" #include "func.h" - #include "inferno.h" -#include "editor/editor.h" -#include "segment.h" - -#include "render.h" -#include "screens.h" -#include "object.h" +#include "editor.h" -#include "texpage.h" // For texpage_goto_first -#include "meddraw.h" // For draw_World -#include "game.h" //return 2d distance, i.e, sqrt(x*x + y*y) #ifdef __WATCOMC__ diff --git a/main/editor/medrobot.c b/main/editor/medrobot.c index 553e4f20..06b29a25 100644 --- a/main/editor/medrobot.c +++ b/main/editor/medrobot.c @@ -31,30 +31,14 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "screens.h" #include "inferno.h" -#include "segment.h" #include "editor.h" - #include "timer.h" -#include "objpage.h" -#include "fix.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "kdefs.h" -#include "object.h" -#include "polyobj.h" -#include "game.h" -#include "powerup.h" -#include "ai.h" -#include "hostage.h" -#include "eobject.h" -#include "medwall.h" -#include "eswitch.h" -#include "ehostage.h" #include "key.h" -#include "centers.h" -#include "bm.h" + #define NUM_BOXES 6 // Number of boxes, AI modes diff --git a/main/editor/medsel.c b/main/editor/medsel.c index 16a66b2b..32dd9b70 100644 --- a/main/editor/medsel.c +++ b/main/editor/medsel.c @@ -35,11 +35,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "error.h" #include "u_mem.h" - #include "inferno.h" #include "editor.h" -#include "segment.h" -#include "object.h" + typedef struct sort_element { short segnum; diff --git a/main/editor/medwall.c b/main/editor/medwall.c index da1d9996..7be9e6f1 100644 --- a/main/editor/medwall.c +++ b/main/editor/medwall.c @@ -26,27 +26,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "editor/medwall.h" #include "inferno.h" -#include "editor/editor.h" -#include "segment.h" +#include "editor.h" #include "error.h" -#include "gameseg.h" - -#include "textures.h" -#include "screens.h" -#include "switch.h" -#include "editor/eswitch.h" - -#include "texmerge.h" -#include "medrobot.h" #include "timer.h" #include "mono.h" -#include "cntrlcen.h" #include "key.h" -#include "ehostage.h" -#include "centers.h" -#include "piggy.h" + int wall_add_door_flag(sbyte flag); int wall_add_to_side(segment *segp, int side, sbyte type); diff --git a/main/editor/medwall.h b/main/editor/medwall.h index 740d7596..e8b93577 100644 --- a/main/editor/medwall.h +++ b/main/editor/medwall.h @@ -20,9 +20,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _MEDWALL_H #define _MEDWALL_H -#include "wall.h" #include "inferno.h" -#include "segment.h" + extern int wall_add_removable(); @@ -30,7 +29,7 @@ extern int wall_add_removable(); extern int wall_restore_all(); // Reset a wall. -extern void wall_reset(segment *seg, short side); +extern void wall_reset(segment *seg, int side); // Adds a removable wall (medwall.c) extern int wall_add_removable(); diff --git a/main/editor/mine.c b/main/editor/mine.c index 08ce7f15..3b414b4a 100644 --- a/main/editor/mine.c +++ b/main/editor/mine.c @@ -31,25 +31,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "key.h" #include "gr.h" - #include "inferno.h" -#include "segment.h" #include "editor.h" #include "error.h" -#include "textures.h" -#include "object.h" - -#include "gamemine.h" -#include "gamesave.h" -#include "gameseg.h" - #include "ui.h" // Because texpage.h need UI_WINDOW type -#include "texpage.h" // For texpage_goto_first - -#include "medwall.h" -#include "switch.h" -#include "fuelcen.h" #define REMOVE_EXT(s) (*(strchr( (s), '.' ))='\0') diff --git a/main/editor/objpage.c b/main/editor/objpage.c index a2b2d49e..10fe5907 100644 --- a/main/editor/objpage.c +++ b/main/editor/objpage.c @@ -30,19 +30,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" -#include "screens.h" // For GAME_SCREEN????? #include "editor.h" // For TMAP_CURBOX?????? #include "gr.h" // For canves, font stuff #include "ui.h" // For UI_GADGET stuff -#include "object.h" // For robot_bms #include "mono.h" // For debugging #include "error.h" -#include "objpage.h" -#include "bm.h" -#include "player.h" -#include "piggy.h" -#include "cntrlcen.h" #define OBJS_PER_PAGE 8 @@ -77,13 +70,11 @@ static int ObjectPage = 0; // //} -#include "vecmat.h" +#include "maths.h" #include "3d.h" -#include "polyobj.h" +#include "inferno.h" #include "texmap.h" -#include "hostage.h" -#include "powerup.h" vms_angvec objpage_view_orient; fix objpage_view_dist; diff --git a/main/editor/segment.c b/main/editor/segment.c index 7371c851..b865d271 100644 --- a/main/editor/segment.c +++ b/main/editor/segment.c @@ -29,27 +29,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "key.h" #include "gr.h" - #include "inferno.h" -#include "segment.h" -// #include "segment2.h" #include "editor.h" #include "error.h" -#include "object.h" - -#include "gameseg.h" -#include "render.h" -#include "game.h" - -#include "wall.h" -#include "switch.h" -#include "fuelcen.h" -#include "cntrlcen.h" -#include "seguvs.h" -#include "gameseq.h" -#include "medwall.h" -#include "hostage.h" int Do_duplicate_vertex_check = 0; // Gets set to 1 in med_create_duplicate_vertex, means to check for duplicate vertices in compress_mine diff --git a/main/editor/seguvs.c b/main/editor/seguvs.c index 06a9698a..1bfdcdf7 100644 --- a/main/editor/seguvs.c +++ b/main/editor/seguvs.c @@ -28,20 +28,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "segment.h" -#include "editor/editor.h" - -#include "gameseg.h" - -#include "fix.h" +#include "editor.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "wall.h" -#include "editor/kdefs.h" -#include "bm.h" // Needed for TmapInfo -#include "effects.h" // Needed for effects_bm_num -#include "fvi.h" void cast_all_light_in_mine(int quick_flag); //--rotate_uvs-- vms_vector Rightvec; diff --git a/main/editor/texpage.c b/main/editor/texpage.c index cbe72558..a1f4a3be 100644 --- a/main/editor/texpage.c +++ b/main/editor/texpage.c @@ -27,20 +27,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "gameseg.h" -#include "screens.h" // For GAME_SCREEN????? #include "editor.h" // For TMAP_CURBOX?????? #include "gr.h" // For canves, font stuff #include "ui.h" // For UI_GADGET stuff -#include "textures.h" // For NumTextures #include "error.h" #include "key.h" #include "mono.h" -#include "gamesave.h" -#include "mission.h" -#include "texpage.h" -#include "piggy.h" #define TMAPS_PER_PAGE 12 diff --git a/main/editor/texture.c b/main/editor/texture.c index d08e0244..91604b42 100644 --- a/main/editor/texture.c +++ b/main/editor/texture.c @@ -28,14 +28,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "segment.h" -#include "seguvs.h" #include "editor.h" - -#include "fix.h" +#include "maths.h" #include "mono.h" #include "error.h" -#include "kdefs.h" + void compute_uv_side_center(uvl *uvcenter, segment *segp, int sidenum); void rotate_uv_points_on_side(segment *segp, int sidenum, fix *rotmat, uvl *uvcenter); diff --git a/main/effects.c b/main/effects.c index 0d71ed5e..dd3b047a 100644 --- a/main/effects.c +++ b/main/effects.c @@ -29,11 +29,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "inferno.h" -#include "vclip.h" #include "mono.h" #include "u_mem.h" #include "error.h" + int Num_effects; eclip Effects[MAX_EFFECTS]; diff --git a/main/endlevel.c b/main/endlevel.c index 4797c6c5..6aaaa741 100644 --- a/main/endlevel.c +++ b/main/endlevel.c @@ -21,23 +21,17 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -//#define SLEW_ON 1 - //#define _MARK_ON #include - - #include #include #include // for isspace -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "3d.h" #include "error.h" -#include "palette.h" #include "iff.h" #include "mono.h" #include "texmap.h" @@ -46,6 +40,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "cfile.h" +//#define SLEW_ON 1 + typedef struct flythrough_data { object *obj; vms_angvec angles; //orientation in angles diff --git a/main/escort.c b/main/escort.c index 5fceedcc..0707eef5 100644 --- a/main/escort.c +++ b/main/escort.c @@ -27,18 +27,17 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "mono.h" -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "3d.h" #include "vid.h" #include "error.h" #include "key.h" - #ifdef EDITOR #include "editor/editor.h" #endif + extern void multi_send_stolen_items(); void say_escort_goal(int goal_num); void show_escort_menu(char *msg); diff --git a/main/fireball.c b/main/fireball.c index f5693c22..93bd73b1 100644 --- a/main/fireball.c +++ b/main/fireball.c @@ -26,11 +26,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "error.h" -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "3d.h" - #include "inferno.h" #include "mono.h" #include "timer.h" diff --git a/main/fvi.c b/main/fvi.c index c369851e..d8093648 100644 --- a/main/fvi.c +++ b/main/fvi.c @@ -27,7 +27,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include #include - #ifdef MACINTOSH #include #endif @@ -36,9 +35,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "error.h" #include "mono.h" - #include "inferno.h" -#include "rle.h" +#include "gr.h" extern int Physics_cheat_flag; diff --git a/main/game.c b/main/game.c index e6f1dff1..947dc746 100644 --- a/main/game.c +++ b/main/game.c @@ -28,7 +28,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include #include - #ifdef MACINTOSH #include #include @@ -40,7 +39,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifdef OGL #include "ogl_init.h" #endif - #include "gr.h" #include "inferno.h" #include "key.h" @@ -48,18 +46,17 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "joy.h" #include "mono.h" #include "iff.h" -#include "pcx.h" #include "timer.h" #include "texmap.h" #include "3d.h" -#include "ibitblt.h" #include "u_mem.h" -#include "palette.h" #include "args.h" #include "mouse.h" -#include "pcx.h" -#include "fix.h" +#include "maths.h" #include "vid.h" +#ifdef EDITOR +#include "editor/editor.h" +#endif #ifdef MWPROFILER #include @@ -69,10 +66,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define SHOW_EXIT_PATH 1 -#ifdef EDITOR -#include "editor/editor.h" -#endif - //#define _MARK_ON 1 #ifdef __WATCOMC__ #if __WATCOMC__ < 1000 diff --git a/main/gamecntl.c b/main/gamecntl.c index 45ced1e0..d4ad0fa0 100644 --- a/main/gamecntl.c +++ b/main/gamecntl.c @@ -28,13 +28,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include +#ifdef SDL_INPUT +#include +#endif + #include "inferno.h" #include "key.h" #include "error.h" #include "joy.h" #include "mono.h" #include "iff.h" -#include "pcx.h" #include "timer.h" #include "texmap.h" #include "ibitblt.h" @@ -43,14 +46,13 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mouse.h" #include "gr.h" #include "vid.h" - #if defined (TACTILE) #include "tactile.h" #endif - -#include "pcx.h" #include "rbaudio.h" - +#ifdef EDITOR +#include "editor/editor.h" +#endif //#define TEST_TIMER 1 //if this is set, do checking on timer @@ -58,11 +60,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define Arcade_mode 0 - -#ifdef EDITOR -#include "editor/editor.h" -#endif - //#define _MARK_ON 1 #ifdef __WATCOMC__ #if __WATCOMC__ < 1000 @@ -70,9 +67,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #endif -#ifdef SDL_INPUT -#include -#endif extern void full_palette_save(void); extern void object_goto_prev_viewer(void); diff --git a/main/gamemine.c b/main/gamemine.c index 827e3d3d..a6a430a0 100644 --- a/main/gamemine.c +++ b/main/gamemine.c @@ -29,11 +29,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "inferno.h" #include "error.h" - #ifdef EDITOR #include "editor/editor.h" #endif - #include "cfile.h" #include "hash.h" #include "key.h" diff --git a/main/gamepal.c b/main/gamepal.c index 3a807942..8c8dbd4e 100644 --- a/main/gamepal.c +++ b/main/gamepal.c @@ -25,12 +25,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "3d.h" -#include "palette.h" -#include "rle.h" #include "inferno.h" #include "strutil.h" diff --git a/main/gamerend.c b/main/gamerend.c index 0f95e2b2..4d20ada2 100644 --- a/main/gamerend.c +++ b/main/gamerend.c @@ -30,9 +30,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "gr.h" #include "vid.h" -#include "ibitblt.h" -#include "fix.h" - +#include "maths.h" #ifdef OGL #include "ogl_init.h" #endif diff --git a/main/gamesave.c b/main/gamesave.c index 776ad9cc..ac9f92d0 100644 --- a/main/gamesave.c +++ b/main/gamesave.c @@ -28,7 +28,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "key.h" #include "gr.h" -#include "palette.h" #include "inferno.h" #ifdef EDITOR #include "editor/editor.h" diff --git a/main/gameseg.c b/main/gameseg.c index bbaeb3e4..619d4395 100644 --- a/main/gameseg.c +++ b/main/gameseg.c @@ -29,7 +29,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "error.h" #include "mono.h" -#include "vecmat.h" +#include "maths.h" #include "byteswap.h" diff --git a/main/gameseq.c b/main/gameseq.c index 7a42cc71..5c85b4c9 100644 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -33,7 +33,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifdef OGL #include "ogl_init.h" #endif - #include "inferno.h" #include "vid.h" #include "key.h" @@ -41,27 +40,21 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "joy.h" #include "mono.h" #include "iff.h" -#include "pcx.h" #include "timer.h" #include "texmap.h" #include "3d.h" -#include "ibitblt.h" +#include "gr.h" #include "u_mem.h" -#include "palette.h" #include "args.h" #include "ctype.h" #include "cfile.h" - #if defined (TACTILE) #include "tactile.h" #endif - #ifdef EDITOR #include "editor/editor.h" #endif - #include "strutil.h" -#include "rle.h" void StartNewLevelSecret(int level_num, int page_in_textures); diff --git a/main/gauges.c b/main/gauges.c index 439d306f..c975d8f5 100644 --- a/main/gauges.c +++ b/main/gauges.c @@ -29,7 +29,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "error.h" #include "mono.h" - #ifdef OGL #include "ogl_init.h" #endif diff --git a/main/inferno.c b/main/inferno.c index ae4e2297..bad35205 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -40,13 +40,15 @@ char copyright[] = "DESCENT II COPYRIGHT (C) 1994-1996 PARALLAX SOFTWARE CORPOR #include #endif +#ifndef __MSDOS__ +#include +#endif #include #include "strutil.h" #include "gr.h" #include "vid.h" -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "mono.h" #include "key.h" #include "timer.h" @@ -55,26 +57,17 @@ char copyright[] = "DESCENT II COPYRIGHT (C) 1994-1996 PARALLAX SOFTWARE CORPOR #include "error.h" #include "u_mem.h" #include "texmap.h" -#include "palette.h" #include "args.h" #include "mouse.h" #include "joy.h" #include "cfile.h" // # include "3dfx_des.h" #include "../texmap/scanline.h" //for select_tmap -MM - #ifdef EDITOR #include "editor/editor.h" -#include "editor/kdefs.h" #include "ui.h" #endif -#ifndef __MSDOS__ -#include -#endif - -#include "vers_id.h" - void mem_init(void); void arch_init(void); diff --git a/main/inferno.h b/main/inferno.h index 25ae0981..316c8437 100644 --- a/main/inferno.h +++ b/main/inferno.h @@ -65,6 +65,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "aistruct.h" #include "automap.h" #include "bm.h" +#ifdef EDITOR +#include "bmread.h" +#endif #include "cntrlcen.h" #include "collide.h" #include "config.h" @@ -81,6 +84,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gamemine.h" #include "gamepal.h" #include "gamesave.h" +#include "gameseq.h" #include "gauges.h" #include "hostage.h" #include "hudmsg.h" @@ -101,6 +105,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "network.h" #endif #include "newdemo.h" +#include "newmenu.h" #include "object.h" #include "paging.h" #include "physics.h" @@ -122,6 +127,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "texmerge.h" #include "textures.h" #include "titles.h" +#include "vers_id.h" #include "wall.h" diff --git a/main/kconfig.c b/main/kconfig.c index bbe2d76d..a04544cd 100644 --- a/main/kconfig.c +++ b/main/kconfig.c @@ -21,22 +21,20 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#ifdef WINDOWS -#include "desw.h" -#endif - #include #include #include #include #include +#ifdef WINDOWS +#include "desw.h" +#endif #include "error.h" #include "gr.h" #include "vid.h" #include "mono.h" #include "key.h" -#include "palette.h" #include "inferno.h" #include "iff.h" #include "u_mem.h" @@ -44,11 +42,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mouse.h" #include "timer.h" #include "args.h" - #if defined (TACTILE) #include "tactile.h" #endif - #ifdef USE_LINUX_JOY #include "joystick.h" #endif diff --git a/main/kmatrix.c b/main/kmatrix.c index ab729c07..5c78a29a 100644 --- a/main/kmatrix.c +++ b/main/kmatrix.c @@ -31,13 +31,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "mono.h" #include "key.h" -#include "palette.h" #include "inferno.h" #include "u_mem.h" #include "mouse.h" #include "joy.h" #include "timer.h" -#include "pcx.h" #define CENTERING_OFFSET(x) ((300 - (70 + (x)*25 ))/2) diff --git a/main/laser.c b/main/laser.c index 1f02a7d1..5e7305bc 100644 --- a/main/laser.c +++ b/main/laser.c @@ -32,7 +32,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "key.h" #include "texmap.h" #include "timer.h" - #ifdef TACTILE #include "tactile.h" #endif diff --git a/main/lighting.c b/main/lighting.c index 4491b2c7..061db98f 100644 --- a/main/lighting.c +++ b/main/lighting.c @@ -24,8 +24,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include // for memset() -#include "fix.h" -#include "vecmat.h" +#include "math.h" #include "gr.h" #include "inferno.h" #include "error.h" diff --git a/main/menu.c b/main/menu.c index e736cb97..29f5f48a 100644 --- a/main/menu.c +++ b/main/menu.c @@ -24,6 +24,12 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include +#ifdef MACINTOSH +#include "resource.h" +#include "isp.h" +#include +#endif + #include "inferno.h" #include "gr.h" #include "vid.h" @@ -33,8 +39,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" #include "mono.h" #include "joy.h" -#include "vecmat.h" -#include "palette.h" +#include "maths.h" #include "args.h" #include "timer.h" #ifdef NETWORK @@ -42,13 +47,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "texmap.h" #include "strutil.h" - -#ifdef MACINTOSH - #include "resource.h" - #include "isp.h" - #include -#endif - #ifdef EDITOR #include "editor/editor.h" #endif diff --git a/main/mglobal.c b/main/mglobal.c index 33d91876..02be23ef 100644 --- a/main/mglobal.c +++ b/main/mglobal.c @@ -21,8 +21,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "inferno.h" #include "3d.h" diff --git a/main/morph.c b/main/morph.c index 2251a574..65bce0c7 100644 --- a/main/morph.c +++ b/main/morph.c @@ -25,14 +25,13 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "texmap.h" #include "error.h" #include "inferno.h" #include "mono.h" -#include "interp.h" +#include "3d.h" morph_data morph_objects[MAX_MORPH_OBJECTS]; diff --git a/main/movie.c b/main/movie.c index ae14ffe6..82e35456 100644 --- a/main/movie.c +++ b/main/movie.c @@ -37,7 +37,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "args.h" #include "key.h" #include "inferno.h" -#include "palette.h" #include "strutil.h" #include "error.h" #include "u_mem.h" diff --git a/main/multibot.c b/main/multibot.c index 65fa75dd..ba9fea8f 100644 --- a/main/multibot.c +++ b/main/multibot.c @@ -25,7 +25,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "vecmat.h" +#include "maths.h" #include "inferno.h" #include "error.h" #include "mono.h" diff --git a/main/network.c b/main/network.c index 8059cc50..eb61962f 100644 --- a/main/network.c +++ b/main/network.c @@ -26,6 +26,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include #include +#ifdef MACINTOSH +#include +#include // for appletalk networking errors +#include "appltalk.h" +#endif #include "strutil.h" #include "args.h" @@ -38,12 +43,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "byteswap.h" #include "cfile.h" -#ifdef MACINTOSH -#include -#include // for appletalk networking errors -#include "appltalk.h" -#endif - #define LHX(x) ((x)*(MenuHires?2:1)) #define LHY(y) ((y)*(MenuHires?2.4:1)) diff --git a/main/newdemo.c b/main/newdemo.c index f14d9109..04f84fe1 100644 --- a/main/newdemo.c +++ b/main/newdemo.c @@ -42,15 +42,13 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "gr.h" #include "stdlib.h" -//#include "error.h" #include "mono.h" #include "3d.h" #include "texmap.h" #include "key.h" #include "error.h" -#include "vecmat.h" +#include "maths.h" #include "args.h" -#include "palette.h" #include "timer.h" #include "physfsx.h" #ifdef EDITOR diff --git a/main/newmenu.c b/main/newmenu.c index 1f383168..eaeece5c 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -30,6 +30,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif #include +#ifdef MACINTOSH +#include +#endif #include @@ -38,17 +41,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "vid.h" #include "mono.h" #include "key.h" -#include "palette.h" #include "inferno.h" #include "iff.h" -#include "pcx.h" #include "u_mem.h" #include "mouse.h" #include "joy.h" -#ifdef MACINTOSH -#include -#endif - #if defined (TACTILE) #include "tactile.h" #endif diff --git a/main/object.c b/main/object.c index 072beb33..0d8e1c88 100644 --- a/main/object.c +++ b/main/object.c @@ -33,11 +33,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "key.h" #include "error.h" #include "args.h" - #ifdef TACTILE #include "tactile.h" #endif - #ifdef EDITOR #include "editor/editor.h" #endif diff --git a/main/paging.c b/main/paging.c index 6ccaa9b9..5b3db1bd 100644 --- a/main/paging.c +++ b/main/paging.c @@ -21,8 +21,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -//#define PSX_BUILD_TOOLS - #include #include #include @@ -31,10 +29,12 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "inferno.h" #include "error.h" -#include "palette.h" +#include "gr.h" #include "timer.h" +//#define PSX_BUILD_TOOLS + void paging_touch_vclip( vclip * vc ) { int i; diff --git a/main/physics.c b/main/physics.c index 511ae85b..8f502688 100644 --- a/main/physics.c +++ b/main/physics.c @@ -31,7 +31,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "key.h" #include "timer.h" - #ifdef TACTILE #include "tactile.h" #endif diff --git a/main/piggy.c b/main/piggy.c index 33907b0b..40b0370c 100644 --- a/main/piggy.c +++ b/main/piggy.c @@ -22,34 +22,30 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif - #include #include +#ifndef MACINTOSH +// #include "unarj.h" +#else +#include // MacOS Toolbox header +#include +#include +#endif + #include "strutil.h" #include "inferno.h" #include "gr.h" -#include "grdef.h" #include "u_mem.h" #include "iff.h" #include "mono.h" #include "error.h" #include "hash.h" #include "args.h" -#include "palette.h" -#include "rle.h" #include "cfile.h" #include "byteswap.h" #include "makesig.h" -#ifndef MACINTOSH -// #include "unarj.h" -#else - #include // MacOS Toolbox header - #include - #include -#endif - //#define NO_DUMP_SOUNDS 1 //if set, dump bitmaps but not sounds diff --git a/main/player.c b/main/player.c index 7f1848cc..f07682eb 100644 --- a/main/player.c +++ b/main/player.c @@ -12,6 +12,7 @@ #include "inferno.h" #include "cfile.h" + /* * reads a player_ship structure from a CFILE */ diff --git a/main/polyobj.c b/main/polyobj.c index b5835415..64518503 100644 --- a/main/polyobj.c +++ b/main/polyobj.c @@ -27,14 +27,13 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "vecmat.h" -#include "interp.h" +#include "maths.h" +#include "3d.h" #include "error.h" #include "mono.h" #include "u_mem.h" #include "args.h" #include "byteswap.h" - #ifdef OGL #include "ogl_init.h" #endif diff --git a/main/powerup.c b/main/powerup.c index 068813b3..f8da9c2a 100644 --- a/main/powerup.c +++ b/main/powerup.c @@ -26,17 +26,14 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "3d.h" #include "mono.h" #include "error.h" #include "inferno.h" #include "key.h" - #ifdef EDITOR -#include "gr.h" // for powerup outline drawing #include "editor/editor.h" #endif diff --git a/main/render.c b/main/render.c index 5bd5cf78..f626824a 100644 --- a/main/render.c +++ b/main/render.c @@ -32,18 +32,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "3d.h" #include "key.h" #include "u_mem.h" - #ifdef OGL #include "ogl_init.h" #endif - -#define INITIAL_LOCAL_LIGHT (F1_0/4) // local light value in segment of occurence (of light emission) - #ifdef EDITOR #include "editor/editor.h" #endif +#define INITIAL_LOCAL_LIGHT (F1_0/4) // local light value in segment of occurence (of light emission) + //used for checking if points have been rotated int Clear_window_color=-1; int Clear_window=2; // 1 = Clear whole background window, 2 = clear view portals into rest of world, 0 = no clear diff --git a/main/robot.c b/main/robot.c index a678edac..018b1ca5 100644 --- a/main/robot.c +++ b/main/robot.c @@ -28,6 +28,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "mono.h" + int N_robot_types = 0; int N_robot_joints = 0; diff --git a/main/scores.c b/main/scores.c index a9fca1a0..719a7da8 100644 --- a/main/scores.c +++ b/main/scores.c @@ -32,13 +32,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "vid.h" #include "mono.h" #include "key.h" -#include "palette.h" #include "inferno.h" #include "u_mem.h" #include "mouse.h" #include "joy.h" #include "timer.h" -#include "text.h" #include "strutil.h" diff --git a/main/slew.c b/main/slew.c index 21cfa3df..c92a669d 100644 --- a/main/slew.c +++ b/main/slew.c @@ -25,7 +25,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "inferno.h" -#include "vecmat.h" +#include "maths.h" #include "key.h" #include "joy.h" #include "error.h" diff --git a/main/state.c b/main/state.c index 059fe15b..cf1c152b 100644 --- a/main/state.c +++ b/main/state.c @@ -21,10 +21,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#ifdef WINDOWS -#include "desw.h" -#endif - #include #include #include @@ -39,13 +35,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif +#ifdef WINDOWS +#include "desw.h" +#endif #include "mono.h" #include "inferno.h" #include "error.h" #include "cfile.h" #include "hash.h" #include "key.h" -#include "pcx.h" +#include "gr.h" #include "u_mem.h" #include "args.h" #include "physfsx.h" @@ -105,6 +104,7 @@ int state_default_item = 0; uint state_game_id; +#ifdef NETWORK extern int robot_controlled[MAX_ROBOTS_CONTROLLED]; extern int robot_agitation[MAX_ROBOTS_CONTROLLED]; extern fix robot_controlled_time[MAX_ROBOTS_CONTROLLED]; @@ -113,7 +113,7 @@ extern fix robot_last_message_time[MAX_ROBOTS_CONTROLLED]; extern int robot_send_pending[MAX_ROBOTS_CONTROLLED]; extern int robot_fired[MAX_ROBOTS_CONTROLLED]; extern sbyte robot_fire_buf[MAX_ROBOTS_CONTROLLED][18+3]; - +#endif #ifdef NEWMENU_MOUSE extern ubyte Hack_DblClick_MenuMode; diff --git a/main/switch.c b/main/switch.c index 7a1ca35c..8d8bd8d0 100644 --- a/main/switch.c +++ b/main/switch.c @@ -29,10 +29,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "inferno.h" #include "error.h" #include "mono.h" -#include "wall.h" #include "texmap.h" -#include "palette.h" - +#include "gr.h" #ifdef EDITOR #include "editor/editor.h" #endif diff --git a/main/texmerge.c b/main/texmerge.c index e09dc83f..5b6bf89f 100644 --- a/main/texmerge.c +++ b/main/texmerge.c @@ -27,7 +27,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "error.h" #include "inferno.h" #include "mono.h" -#include "rle.h" #ifdef OGL #include "ogl_init.h" @@ -36,6 +35,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define MAX_NUM_CACHE_BITMAPS 50 #endif + //static grs_bitmap * cache_bitmaps[MAX_NUM_CACHE_BITMAPS]; typedef struct { diff --git a/main/titles.c b/main/titles.c index 8c57bcdd..996d923b 100644 --- a/main/titles.c +++ b/main/titles.c @@ -28,7 +28,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include #include - #ifdef MACINTOSH #include #endif @@ -38,7 +37,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "vid.h" #include "iff.h" -#include "pcx.h" #include "u_mem.h" #include "joy.h" #include "mono.h" @@ -67,8 +65,10 @@ char RobotPlaying=0; #define SHAREWARE_ENDING_FILENAME "ending.tex" +#ifndef RELEASE // Can be set by -noscreens command line option. Causes bypassing of all briefing screens. int Skip_briefing_screens=0; +#endif int Briefing_foreground_colors[MAX_BRIEFING_COLORS], Briefing_background_colors[MAX_BRIEFING_COLORS]; int Current_color = 0; int Erase_color; diff --git a/main/wall.c b/main/wall.c index d120988f..df40360f 100644 --- a/main/wall.c +++ b/main/wall.c @@ -30,7 +30,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gr.h" #include "inferno.h" #include "error.h" - #ifdef EDITOR #include "editor/editor.h" #endif diff --git a/main/weapon.c b/main/weapon.c index 8275cf85..86bf2760 100644 --- a/main/weapon.c +++ b/main/weapon.c @@ -29,7 +29,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mono.h" #include "error.h" #include "args.h" - #if defined (TACTILE) #include "tactile.h" #endif diff --git a/maths/vecmat.c b/maths/vecmat.c index f48f40ff..0a251b02 100644 --- a/maths/vecmat.c +++ b/maths/vecmat.c @@ -25,7 +25,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include // for sqrt #include "maths.h" -#include "vecmat.h" #include "error.h" //#define USE_ISQRT 1 diff --git a/texmap/ntmap.c b/texmap/ntmap.c index 48926ac6..1183bab3 100644 --- a/texmap/ntmap.c +++ b/texmap/ntmap.c @@ -29,18 +29,15 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define WIREFRAME 0 #define PERSPECTIVE 1 -#include "pstypes.h" -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" #include "3d.h" #include "error.h" - #include "texmap.h" #include "texmapl.h" -#include "rle.h" #include "scanline.h" + #ifdef EDITOR #define EDITOR_TMAP 1 //if in, include extra stuff #endif diff --git a/texmap/scanline.c b/texmap/scanline.c index a2490a12..219a9702 100644 --- a/texmap/scanline.c +++ b/texmap/scanline.c @@ -30,12 +30,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "maths.h" #include "mono.h" #include "gr.h" -#include "grdef.h" #include "texmap.h" #include "texmapl.h" #include "scanline.h" #include "strutil.h" + void c_tmap_scanline_flat() { ubyte *dest; diff --git a/texmap/tmapflat.c b/texmap/tmapflat.c index cb5c8479..0728715b 100644 --- a/texmap/tmapflat.c +++ b/texmap/tmapflat.c @@ -21,16 +21,15 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #endif -#include "fix.h" -#include "vecmat.h" +#include "maths.h" #include "gr.h" -#include "grdef.h" #include "texmap.h" #include "texmapl.h" #include "scanline.h" //#include "tmapext.h" + #ifndef OGL void (*scanline_func)(int,fix,fix); diff --git a/ui/barbox.c b/ui/barbox.c index 271cf471..ead8df82 100644 --- a/ui/barbox.c +++ b/ui/barbox.c @@ -18,8 +18,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "fix.h" -#include "pstypes.h" +#include "maths.h" #include "gr.h" #include "ui.h" #include "key.h" diff --git a/ui/button.c b/ui/button.c index c328c914..d45e5fcb 100644 --- a/ui/button.c +++ b/ui/button.c @@ -19,13 +19,13 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "u_mem.h" -#include "fix.h" -#include "pstypes.h" +#include "maths.h" #include "gr.h" #include "ui.h" #include "key.h" #include "mono.h" + #define Middle(x) ((2*(x)+1)/4) #define BUTTON_EXTRA_WIDTH 15 diff --git a/ui/checkbox.c b/ui/checkbox.c index afcca8ab..340ef42a 100644 --- a/ui/checkbox.c +++ b/ui/checkbox.c @@ -20,11 +20,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" + #define Middle(x) ((2*(x)+1)/4) void ui_draw_checkbox( UI_GADGET_CHECKBOX * checkbox ) diff --git a/ui/file.c b/ui/file.c index 0ceeece5..e3707606 100644 --- a/ui/file.c +++ b/ui/file.c @@ -16,17 +16,15 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "key.h" #include "vid.h" #include "strutil.h" - #include "ui.h" #include "mono.h" - #include "u_mem.h" + int file_sort_func(char **e0, char **e1) { return stricmp(*e0, *e1); diff --git a/ui/gadget.c b/ui/gadget.c index 8f1a85ab..0190d455 100644 --- a/ui/gadget.c +++ b/ui/gadget.c @@ -20,12 +20,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" - #include "key.h" + UI_GADGET * selected_gadget; UI_GADGET * ui_gadget_add( UI_WINDOW * wnd, short kind, short x1, short y1, short x2, short y2 ) diff --git a/ui/icon.c b/ui/icon.c index d1e00a2f..e16274d7 100644 --- a/ui/icon.c +++ b/ui/icon.c @@ -20,7 +20,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" diff --git a/ui/inputbox.c b/ui/inputbox.c index a82fd60d..53a659bc 100644 --- a/ui/inputbox.c +++ b/ui/inputbox.c @@ -20,7 +20,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" diff --git a/ui/keypad.c b/ui/keypad.c index 99d7c3f3..4100b465 100644 --- a/ui/keypad.c +++ b/ui/keypad.c @@ -19,22 +19,18 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include - #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "key.h" #include "cfile.h" - #include "mono.h" - #include "ui.h" - #include "u_mem.h" //#include "cflib.h" #include "func.h" #include "error.h" + #define MAX_NUM_PADS 20 static UI_GADGET_BUTTON * Pad[17]; diff --git a/ui/keypress.c b/ui/keypress.c index bd3ee5c3..a9c9aa28 100644 --- a/ui/keypress.c +++ b/ui/keypress.c @@ -20,7 +20,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" diff --git a/ui/keytrap.c b/ui/keytrap.c index 1e6dddd4..90ea09d2 100644 --- a/ui/keytrap.c +++ b/ui/keytrap.c @@ -7,7 +7,6 @@ #include #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" diff --git a/ui/ui.c b/ui/ui.c index 6e82dbd4..673ed82f 100644 --- a/ui/ui.c +++ b/ui/ui.c @@ -21,15 +21,13 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "key.h" #include "ui.h" - #include "mouse.h" - #include "mono.h" + static int Initialized = 0; unsigned char CBLACK,CGREY,CWHITE,CBRIGHT,CRED; diff --git a/ui/uidraw.c b/ui/uidraw.c index e37a0b59..ef6d3fa7 100644 --- a/ui/uidraw.c +++ b/ui/uidraw.c @@ -16,10 +16,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" + void Hline(short x1, short x2, short y ) { gr_uscanline( x1, x2, y ); diff --git a/ui/userbox.c b/ui/userbox.c index 9275260a..d18a786c 100644 --- a/ui/userbox.c +++ b/ui/userbox.c @@ -19,11 +19,11 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" + void ui_draw_userbox( UI_GADGET_USERBOX * userbox ) { diff --git a/ui/window.c b/ui/window.c index 1856af78..0dbaacd5 100644 --- a/ui/window.c +++ b/ui/window.c @@ -27,12 +27,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "u_mem.h" #include "fix.h" -#include "pstypes.h" #include "gr.h" #include "ui.h" #include "key.h" #include "timer.h" - #include "mono.h" #include "mouse.h" -- 2.39.2