Allow common headers with private dependencies to be used in common
This commit is contained in:
parent
6ddc31fc33
commit
8a153d1f63
|
@ -24,9 +24,12 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "vecmat.h"
|
||||
#include "segment.h"
|
||||
#include "gameseg.h"
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
#include "aistruct.h"
|
||||
#endif
|
||||
#include "gr.h"
|
||||
#include "piggy.h"
|
||||
#include "polyobj.h"
|
||||
|
||||
/*
|
||||
* CONSTANTS
|
||||
|
@ -139,8 +142,6 @@ enum object_type_t
|
|||
|
||||
#define IMMORTAL_TIME 0x3fffffff // Time assigned to immortal objects, about 32768 seconds, or about 9 hours.
|
||||
|
||||
extern char Object_type_names[MAX_OBJECT_TYPES][9];
|
||||
|
||||
// List of objects rendered last frame in order. Created at render
|
||||
// time, used by homing missiles in laser.c
|
||||
#define MAX_RENDERED_OBJECTS 50
|
||||
|
@ -149,6 +150,8 @@ extern char Object_type_names[MAX_OBJECT_TYPES][9];
|
|||
* STRUCTURES
|
||||
*/
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
extern char Object_type_names[MAX_OBJECT_TYPES][9];
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
#define MAX_CONTROLCEN_GUNS 4
|
||||
#define MAX_RENDERED_WINDOWS 1
|
||||
|
@ -163,6 +166,7 @@ struct reactor_static {
|
|||
/* Orientation of the gun on the reactor object */
|
||||
vms_vector gun_dir[MAX_CONTROLCEN_GUNS];
|
||||
};
|
||||
#endif
|
||||
|
||||
// A compressed form for sending crucial data
|
||||
typedef struct shortpos {
|
||||
|
@ -272,7 +276,12 @@ typedef struct polyobj_info {
|
|||
int alt_textures; // if not -1, use these textures instead
|
||||
} __pack__ polyobj_info;
|
||||
|
||||
typedef struct object {
|
||||
struct object;
|
||||
struct object_rw;
|
||||
typedef struct object object;
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
struct object {
|
||||
int signature; // Every object ever has a unique signature...
|
||||
ubyte type; // what type of object this is... robot, weapon, hostage, powerup, fireball
|
||||
ubyte id; // which form of object...which powerup, robot, etc.
|
||||
|
@ -308,9 +317,9 @@ typedef struct object {
|
|||
union {
|
||||
struct laser_info laser_info;
|
||||
struct explosion_info expl_info; // NOTE: debris uses this also
|
||||
struct ai_static ai_info;
|
||||
struct light_info light_info; // why put this here? Didn't know what else to do with it.
|
||||
struct powerup_info powerup_info;
|
||||
struct ai_static ai_info;
|
||||
struct reactor_static reactor_info;
|
||||
} __pack__ ctype ;
|
||||
|
||||
|
@ -323,7 +332,7 @@ typedef struct object {
|
|||
#ifdef WORDS_NEED_ALIGNMENT
|
||||
short pad2;
|
||||
#endif
|
||||
} __pack__ object;
|
||||
};
|
||||
|
||||
// Same as above but structure Savegames/Multiplayer objects expect
|
||||
typedef struct object_rw {
|
||||
|
@ -377,6 +386,7 @@ typedef struct object_rw {
|
|||
short pad2;
|
||||
#endif
|
||||
} __pack__ object_rw;
|
||||
#endif
|
||||
|
||||
typedef struct obj_position {
|
||||
vms_vector pos; // absolute x,y,z coordinate of center of object
|
||||
|
@ -394,20 +404,20 @@ typedef struct {
|
|||
int num_objects;
|
||||
short rendered_objects[MAX_RENDERED_OBJECTS];
|
||||
} window_rendered_data;
|
||||
#endif
|
||||
|
||||
extern window_rendered_data Window_rendered_data[MAX_RENDERED_WINDOWS];
|
||||
|
||||
extern ubyte CollisionResult[MAX_OBJECT_TYPES][MAX_OBJECT_TYPES];
|
||||
// ie CollisionResult[a][b]== what happens to a when it collides with b
|
||||
extern object Objects[];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* VARIABLES
|
||||
*/
|
||||
|
||||
extern int Object_next_signature; // The next signature for the next newly created object
|
||||
|
||||
extern ubyte CollisionResult[MAX_OBJECT_TYPES][MAX_OBJECT_TYPES];
|
||||
// ie CollisionResult[a][b]== what happens to a when it collides with b
|
||||
|
||||
extern object Objects[];
|
||||
extern int Highest_object_index; // highest objnum
|
||||
extern int num_objects;
|
||||
|
||||
|
@ -582,6 +592,6 @@ extern void wake_up_rendered_objects(object *gmissp, int window_num);
|
|||
void reset_player_object(void);
|
||||
#endif
|
||||
|
||||
extern void object_rw_swap(object_rw *obj_rw, int swap);
|
||||
extern void object_rw_swap(struct object_rw *obj_rw, int swap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "inferno.h"
|
||||
#include "fix.h"
|
||||
#include "vecmat.h"
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
#include "weapon.h"
|
||||
#endif
|
||||
|
||||
#define MAX_PLAYERS 8
|
||||
#define MAX_MULTI_PLAYERS MAX_PLAYERS+3
|
||||
|
@ -75,6 +77,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#define TEAM_RED 1
|
||||
#endif
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
// When this structure changes, increment the constant
|
||||
// SAVE_FILE_VERSION in playsave.c
|
||||
typedef struct player {
|
||||
|
@ -199,6 +202,7 @@ typedef struct player_rw {
|
|||
sbyte hours_level; // Hours played (since time_total can only go up to 9 hours)
|
||||
sbyte hours_total; // Hours played (since time_total can only go up to 9 hours)
|
||||
} __pack__ player_rw;
|
||||
#endif
|
||||
|
||||
#define N_PLAYER_GUNS 8
|
||||
#define N_PLAYER_SHIP_TEXTURES 32
|
||||
|
@ -227,6 +231,7 @@ extern int Player_num; // The player number who is on the console.
|
|||
#endif
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
extern player Players[MAX_PLAYERS + DXX_PLAYER_HEADER_ADD_EXTRA_PLAYERS]; // Misc player info
|
||||
void player_rw_swap(player_rw *p, int swap);
|
||||
#endif
|
||||
extern player_ship *Player_ship;
|
||||
|
||||
|
@ -235,6 +240,4 @@ extern player_ship *Player_ship;
|
|||
*/
|
||||
void player_ship_read(player_ship *ps, PHYSFS_file *fp);
|
||||
|
||||
void player_rw_swap(player_rw *p, int swap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,16 +25,19 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "gr.h"
|
||||
#include "3d.h"
|
||||
|
||||
#ifndef DRIVE
|
||||
#include "robot.h"
|
||||
#endif
|
||||
#include "piggy.h"
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
#define MAX_POLYGON_MODELS 85
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
#define MAX_POLYGON_MODELS 200
|
||||
#endif
|
||||
|
||||
// array of names of currently-loaded models
|
||||
extern char Pof_names[MAX_POLYGON_MODELS][13];
|
||||
#endif
|
||||
#define MAX_SUBMODELS 10
|
||||
|
||||
//used to describe a polygon model
|
||||
|
@ -64,9 +67,6 @@ extern polymodel Polygon_models[];
|
|||
// how many polygon objects there are
|
||||
extern int N_polygon_models;
|
||||
|
||||
// array of names of currently-loaded models
|
||||
extern char Pof_names[MAX_POLYGON_MODELS][13];
|
||||
|
||||
void free_polygon_models();
|
||||
void init_polygon_models();
|
||||
|
||||
|
@ -88,6 +88,7 @@ int read_model_guns(char *filename,vms_vector *gun_points, vms_vector *gun_dirs,
|
|||
// canvas.
|
||||
void draw_model_picture(int mn,vms_angvec *orient_angles);
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
#define MAX_POLYOBJ_TEXTURES 50
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
|
@ -98,6 +99,7 @@ void free_model(polymodel *po);
|
|||
#endif
|
||||
extern grs_bitmap *texture_list[MAX_POLYOBJ_TEXTURES];
|
||||
extern bitmap_index texture_list_index[MAX_POLYOBJ_TEXTURES];
|
||||
#endif
|
||||
extern g3s_point robot_points[];
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
|
|
|
@ -162,12 +162,14 @@ extern robot_info Robot_info[]; // Robot info for AI system, loaded from bit
|
|||
extern int N_robot_types; // Number of robot types. We used to assume this was the same as N_polygon_models.
|
||||
|
||||
//test data for one robot
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
#define MAX_ROBOT_JOINTS 600
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
#define MAX_ROBOT_JOINTS 1600
|
||||
#endif
|
||||
extern jointpos Robot_joints[MAX_ROBOT_JOINTS];
|
||||
#endif
|
||||
extern int N_robot_joints;
|
||||
|
||||
//given an object and a gun number, return position in 3-space of gun
|
||||
|
|
|
@ -56,7 +56,9 @@ typedef struct {
|
|||
} __pack__ vclip;
|
||||
|
||||
extern int Num_vclips;
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
extern vclip Vclip[VCLIP_MAXNUM];
|
||||
#endif
|
||||
|
||||
// draw an object which renders as a vclip.
|
||||
void draw_vclip_object(object *obj, fix timeleft, int lighted, int vclip_num);
|
||||
|
|
Loading…
Reference in a new issue