diff --git a/common/3d/clipper.h b/common/3d/clipper.h index 2031a3659..7fe01c28a 100644 --- a/common/3d/clipper.h +++ b/common/3d/clipper.h @@ -19,10 +19,15 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _CLIPPER_H #define _CLIPPER_H +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif +struct g3s_codes; +struct g3s_point; + extern void free_temp_point(g3s_point *p); extern g3s_point **clip_polygon(g3s_point **src,g3s_point **dest,int *nv,g3s_codes *cc); extern void init_free_points(void); diff --git a/common/3d/globvars.h b/common/3d/globvars.h index 89e45a970..406c91579 100644 --- a/common/3d/globvars.h +++ b/common/3d/globvars.h @@ -21,6 +21,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define MAX_POINTS_IN_POLY 100 +#include "maths.h" + +struct vms_vector; +struct vms_matrix; +struct g3s_point; + extern int Canvas_width,Canvas_height; //the actual width & height extern fix Canv_w2,Canv_h2; //fixed-point width,height/2 diff --git a/common/include/editor/esegment.h b/common/include/editor/esegment.h index 8fd8440da..74a5bbdc1 100644 --- a/common/include/editor/esegment.h +++ b/common/include/editor/esegment.h @@ -1,5 +1,6 @@ #pragma once #include "segment.h" +#include "editor/editor.h" extern segment *Cursegp; // Pointer to current segment in the mine, the one to which things happen. #ifdef DXX_BUILD_DESCENT_II diff --git a/common/include/editor/meddraw.h b/common/include/editor/meddraw.h index e4f2d2fb1..47fa20ab8 100644 --- a/common/include/editor/meddraw.h +++ b/common/include/editor/meddraw.h @@ -24,6 +24,10 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct grs_canvas; +struct editor_view; +struct segment; + void meddraw_init_views( grs_canvas * canvas); void draw_world(grs_canvas *screen_canvas,editor_view *v,segment *mine_ptr,int depth); void find_segments(short x,short y,grs_canvas *screen_canvas,editor_view *v,segment *mine_ptr,int depth); diff --git a/common/include/editor/medmisc.h b/common/include/editor/medmisc.h index 6009f2671..4fcbcf661 100644 --- a/common/include/editor/medmisc.h +++ b/common/include/editor/medmisc.h @@ -24,6 +24,9 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct segment; +struct vms_matrix; + void GetMouseRotation( int idx, int idy, vms_matrix * RotMat ); extern int Gameview_lockstep; //In medmisc.c int ToggleLockstep(); diff --git a/common/include/editor/medsel.h b/common/include/editor/medsel.h index 5748ff5e6..d09b7c37b 100644 --- a/common/include/editor/medsel.h +++ b/common/include/editor/medsel.h @@ -24,6 +24,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct vms_vector; + extern void sort_seg_list(int n_segs,short *segnumlist,vms_vector *pos); #ifdef __cplusplus diff --git a/common/include/editor/objpage.h b/common/include/editor/objpage.h index 0041ae5cb..321563b9f 100644 --- a/common/include/editor/objpage.h +++ b/common/include/editor/objpage.h @@ -27,6 +27,7 @@ extern "C" { #endif struct d_event; +struct vms_angvec; int objpage_grab_current(int n); int objpage_goto_first(); diff --git a/common/include/editor/seguvs.h b/common/include/editor/seguvs.h index c70f54513..e6e6ce879 100644 --- a/common/include/editor/seguvs.h +++ b/common/include/editor/seguvs.h @@ -24,6 +24,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct segment; + extern void assign_light_to_side(segment *sp, int sidenum); extern void assign_default_lighting_all(void); extern void stretch_uvs_from_curedge(segment *segp, int side); diff --git a/common/include/palette.h b/common/include/palette.h index 218e605f9..9313d37c5 100644 --- a/common/include/palette.h +++ b/common/include/palette.h @@ -21,6 +21,8 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _PALETTE_H #define _PALETTE_H +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/include/pcx.h b/common/include/pcx.h index 740d29b13..3e4c4dbfc 100644 --- a/common/include/pcx.h +++ b/common/include/pcx.h @@ -20,10 +20,14 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _PCX_H #define _PCX_H +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif +struct grs_bitmap; + #define PCX_ERROR_NONE 0 #define PCX_ERROR_OPENING 1 #define PCX_ERROR_NO_HEADER 2 diff --git a/common/include/strio.h b/common/include/strio.h index 7a0a24791..a3ee006cb 100644 --- a/common/include/strio.h +++ b/common/include/strio.h @@ -2,6 +2,8 @@ #ifndef _STRIO_H #define _STRIO_H +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/common/include/ui.h b/common/include/ui.h index d6cf7aabe..6051d59f9 100644 --- a/common/include/ui.h +++ b/common/include/ui.h @@ -27,6 +27,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct grs_bitmap; +struct grs_canvas; +struct grs_font; struct window; typedef struct { diff --git a/common/main/automap.h b/common/main/automap.h index 8a771ec7f..3921d4fcc 100644 --- a/common/main/automap.h +++ b/common/main/automap.h @@ -20,6 +20,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _AUTOMAP_H #define _AUTOMAP_H +#include "pstypes.h" +#include "segment.h" + #ifdef __cplusplus extern "C" { #endif @@ -32,7 +35,9 @@ extern void automap_clear_visited(); extern ubyte Automap_visited[MAX_SEGMENTS]; #if defined(DXX_BUILD_DESCENT_II) -#include "object.h" +struct object; +struct vms_vector; + void DropBuddyMarker(object *objp); void InitMarkerInput(); int MarkerInputMessage(int key); diff --git a/common/main/controls.h b/common/main/controls.h index 64fc4b62d..10da711d9 100644 --- a/common/main/controls.h +++ b/common/main/controls.h @@ -21,10 +21,14 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _CONTROLS_H #define _CONTROLS_H +#include "maths.h" + #ifdef __cplusplus extern "C" { #endif +struct object; + void read_flying_controls( object * obj ); #if defined(DXX_BUILD_DESCENT_II) diff --git a/common/main/escort.h b/common/main/escort.h index 3f3540617..0ca971252 100644 --- a/common/main/escort.h +++ b/common/main/escort.h @@ -7,6 +7,8 @@ #ifndef _ESCORT_H #define _ESCORT_H +#include "maths.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/main/fireball.h b/common/main/fireball.h index fac9e1785..4e9564280 100644 --- a/common/main/fireball.h +++ b/common/main/fireball.h @@ -21,10 +21,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _FIREBALL_H #define _FIREBALL_H +#include +#include "maths.h" + #ifdef __cplusplus extern "C" { #endif +struct object; +struct vms_vector; + // explosion types #define ET_SPARKS 0 //little sparks, like when laser hits wall #define ET_MULTI_START 1 //first part of multi-part explosion diff --git a/common/main/gamemine.h b/common/main/gamemine.h index cf79ca480..869036cd8 100644 --- a/common/main/gamemine.h +++ b/common/main/gamemine.h @@ -21,6 +21,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _GAMEMINE_H #define _GAMEMINE_H +#include +#include "maths.h" +#include "vecmat.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/main/gamepal.h b/common/main/gamepal.h index 6863ad755..3eceead31 100644 --- a/common/main/gamepal.h +++ b/common/main/gamepal.h @@ -20,6 +20,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _GAMEPAL_H #define _GAMEPAL_H +#include "inferno.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/main/gamesave.h b/common/main/gamesave.h index de75fa9d6..a53a0c02c 100644 --- a/common/main/gamesave.h +++ b/common/main/gamesave.h @@ -21,6 +21,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _GAMESAVE_H #define _GAMESAVE_H +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/main/hostage.h b/common/main/hostage.h index 99dc55524..bd2f9fddb 100644 --- a/common/main/hostage.h +++ b/common/main/hostage.h @@ -25,6 +25,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct object; + #define HOSTAGE_SIZE i2f(5) // 3d size of a hostage #define MAX_HOSTAGE_TYPES 1 //only one hostage bitmap diff --git a/common/main/kmatrix.h b/common/main/kmatrix.h index c7ae2600a..0a02653c6 100644 --- a/common/main/kmatrix.h +++ b/common/main/kmatrix.h @@ -21,6 +21,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _KMATRIX_H #define _KMATRIX_H +#include "maths.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/main/laser.h b/common/main/laser.h index d30449d36..75f6a7cf3 100644 --- a/common/main/laser.h +++ b/common/main/laser.h @@ -20,6 +20,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _LASER_H #define _LASER_H +#include "maths.h" +#include "vecmat.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/main/lighting.h b/common/main/lighting.h index ab0879d47..b5b78b808 100644 --- a/common/main/lighting.h +++ b/common/main/lighting.h @@ -21,10 +21,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _LIGHTING_H #define _LIGHTING_H +#include "maths.h" +#include "segment.h" + #ifdef __cplusplus extern "C" { #endif +struct g3s_lrgb; +struct object; + #define MAX_LIGHT 0x10000 // max value #define MIN_LIGHT_DIST (F1_0*4) diff --git a/common/main/multibot.h b/common/main/multibot.h index a27e1f657..2a41101fd 100644 --- a/common/main/multibot.h +++ b/common/main/multibot.h @@ -21,10 +21,15 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _MULTIBOT_H #define _MULTIBOT_H +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif +struct object; +struct vms_vector; + #if defined(DXX_BUILD_DESCENT_I) #define MAX_ROBOTS_CONTROLLED 3 #elif defined(DXX_BUILD_DESCENT_II) diff --git a/common/main/piggy.h b/common/main/piggy.h index 65ef51d24..ecb2f3aa6 100644 --- a/common/main/piggy.h +++ b/common/main/piggy.h @@ -25,6 +25,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "sounds.h" #include "hash.h" #include "inferno.h" +#include "gr.h" #ifdef __cplusplus extern "C" { diff --git a/common/main/segpoint.h b/common/main/segpoint.h index 46ca5e2cc..5edb1f0f6 100644 --- a/common/main/segpoint.h +++ b/common/main/segpoint.h @@ -21,7 +21,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _SEGPOINTS_H #define _SEGPOINTS_H -#include "3d.h" +#include "segment.h" + +struct g3s_point; extern g3s_point Segment_points[MAX_VERTICES]; diff --git a/common/main/terrain.h b/common/main/terrain.h index bf4fc18be..f7807de01 100644 --- a/common/main/terrain.h +++ b/common/main/terrain.h @@ -25,6 +25,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct vms_vector; + void free_light_table(); void free_height_array(); void load_terrain(const char *filename); diff --git a/common/main/texmerge.h b/common/main/texmerge.h index d37c2390e..dd5c2059a 100644 --- a/common/main/texmerge.h +++ b/common/main/texmerge.h @@ -25,6 +25,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. extern "C" { #endif +struct grs_bitmap; + int texmerge_init(int num_cached_textures); grs_bitmap *texmerge_get_cached_bitmap(int tmap_bottom, int tmap_top); void texmerge_close(); diff --git a/common/main/titles.h b/common/main/titles.h index a2e4ddbc8..70eb8fb94 100644 --- a/common/main/titles.h +++ b/common/main/titles.h @@ -20,6 +20,8 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _TITLES_H #define _TITLES_H +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/common/texmap/texmapl.h b/common/texmap/texmapl.h index 13d1187ad..64ac47b99 100644 --- a/common/texmap/texmapl.h +++ b/common/texmap/texmapl.h @@ -20,10 +20,15 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. // Local include file for texture map library. +#include "maths.h" +#include "pstypes.h" + #ifdef __cplusplus extern "C" { #endif +struct g3ds_tmap; + extern int prevmod(int val,int modulus); extern int succmod(int val,int modulus); extern void texture_map_flat(g3ds_tmap *t,int color); diff --git a/d1x-rebirth/main/custom.h b/d1x-rebirth/main/custom.h index 165f30911..1fa487bf6 100644 --- a/d1x-rebirth/main/custom.h +++ b/d1x-rebirth/main/custom.h @@ -1,6 +1,9 @@ #ifndef _CUSTOM_H #define _CUSTOM_H +#include "pstypes.h" +#include "piggy.h" + /* from piggy.c */ #define DBM_FLAG_LARGE 128 // Flags added onto the flags struct in b #define DBM_FLAG_ABM 64