mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-12-19 17:37:42 -05:00
Modernize struct/enum/unions type declarations
This commit is contained in:
@@ -28,13 +28,13 @@
|
||||
|
||||
// structures
|
||||
|
||||
typedef struct mem_bitmap {
|
||||
struct mem_bitmap {
|
||||
char *data;
|
||||
int16_t bpp;
|
||||
int rowsize;
|
||||
uint16_t alloced : 2;
|
||||
uint16_t flag : 14;
|
||||
} mem_bitmap;
|
||||
};
|
||||
|
||||
#define MEMFLAG_TRANSBLT 1
|
||||
|
||||
|
||||
@@ -233,10 +233,10 @@ public:
|
||||
#define BOAF_TOO_SMALL_FOR_ROBOT 0x8000
|
||||
#define BOA_TOO_SMALL_FOR_ROBOT(a, b) ((BOA_Array[a][b] & BOAF_TOO_SMALL_FOR_ROBOT) != 0)
|
||||
|
||||
typedef struct connect_data {
|
||||
struct connect_data {
|
||||
int roomnum;
|
||||
int portal;
|
||||
} connect_data;
|
||||
};
|
||||
|
||||
extern int BOA_num_mines;
|
||||
extern int BOA_num_terrain_regions;
|
||||
|
||||
@@ -219,11 +219,11 @@
|
||||
#include "TelComEffects.h"
|
||||
#include "Mission.h"
|
||||
|
||||
typedef struct {
|
||||
struct tBriefingTag {
|
||||
const char *name;
|
||||
int id;
|
||||
int length;
|
||||
} tBriefingTag;
|
||||
};
|
||||
|
||||
#define TAG_LEVELNUM 0
|
||||
#define TAG_PLEVELNUM 1
|
||||
@@ -249,12 +249,12 @@ static bool IsMissionMaskOK(uint32_t set, uint32_t unset);
|
||||
static void ReplaceHotTag(char *string, int tag);
|
||||
static bool ParseForHotTags(char *src, char **dest);
|
||||
static bool PlayBriefing(tTelComInfo *tcs);
|
||||
static void PBAddTextEffect(LPTCTEXTDESC desc, char *text, char *description, int id);
|
||||
static void PBAddBmpEffect(LPTCBMPDESC desc, char *description);
|
||||
static void PBAddMovieEffect(LPTCMOVIEDESC desc, char *description);
|
||||
static void PBAddBkgEffect(LPTCBKGDESC desc, char *description);
|
||||
static void PBAddPolyEffect(LPTCPOLYDESC desc, char *description);
|
||||
static void PBAddButtonEffect(LPTCBUTTONDESC desc, char *description, int id);
|
||||
static void PBAddTextEffect(TCTEXTDESC* desc, char *text, char *description, int id);
|
||||
static void PBAddBmpEffect(TCBMPDESC* desc, char *description);
|
||||
static void PBAddMovieEffect(TCMOVIEDESC* desc, char *description);
|
||||
static void PBAddBkgEffect(TCBKGDESC* desc, char *description);
|
||||
static void PBAddPolyEffect(TCPOLYDESC* desc, char *description);
|
||||
static void PBAddButtonEffect(TCBUTTONDESC* desc, char *description, int id);
|
||||
static void PBStartScreen(int screen_num, char *description, char *layout, uint32_t mask_set, uint32_t mask_unset);
|
||||
static void PBEndScreen();
|
||||
static bool PBLoopCallback();
|
||||
@@ -456,7 +456,7 @@ bool PlayBriefing(tTelComInfo *tcs) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void PBAddTextEffect(LPTCTEXTDESC desc, const char *text, const char *description, int id) {
|
||||
void PBAddTextEffect(TCTEXTDESC* desc, const char *text, const char *description, int id) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen) {
|
||||
char *new_text = NULL;
|
||||
const bool new_stuff = ParseForHotTags(text, &new_text);
|
||||
@@ -469,33 +469,33 @@ void PBAddTextEffect(LPTCTEXTDESC desc, const char *text, const char *descriptio
|
||||
}
|
||||
}
|
||||
|
||||
void PBAddBmpEffect(LPTCBMPDESC desc, const char *description) {
|
||||
void PBAddBmpEffect(TCBMPDESC* desc, const char *description) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen)
|
||||
CreateBitmapEffect(desc, MONITOR_MAIN, current_screen);
|
||||
}
|
||||
|
||||
void PBAddMovieEffect(LPTCMOVIEDESC desc, const char *description) {
|
||||
void PBAddMovieEffect(TCMOVIEDESC* desc, const char *description) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen)
|
||||
CreateMovieEffect(desc, MONITOR_MAIN, current_screen);
|
||||
}
|
||||
|
||||
void PBAddBkgEffect(LPTCBKGDESC desc, const char *description) {
|
||||
void PBAddBkgEffect(TCBKGDESC* desc, const char *description) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen) {
|
||||
mprintf(0, "PB: Add Bkg\n");
|
||||
}
|
||||
}
|
||||
|
||||
void PBAddPolyEffect(LPTCPOLYDESC desc, const char *description) {
|
||||
void PBAddPolyEffect(TCPOLYDESC* desc, const char *description) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen)
|
||||
CreatePolyModelEffect(desc, MONITOR_MAIN, current_screen);
|
||||
}
|
||||
|
||||
void PBAddSoundEffect(LPTCSNDDESC desc, const char *description) {
|
||||
void PBAddSoundEffect(TCSNDDESC* desc, const char *description) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen)
|
||||
CreateSoundEffect(desc, MONITOR_MAIN, current_screen);
|
||||
}
|
||||
|
||||
void PBAddButtonEffect(LPTCBUTTONDESC desc, const char *description, int id) {
|
||||
void PBAddButtonEffect(TCBUTTONDESC* desc, const char *description, int id) {
|
||||
if (IsMissionMaskOK(desc->mission_mask_set, desc->mission_mask_unset) && ok_to_parse_screen) {
|
||||
desc->x += osb_xoff;
|
||||
desc->y += osb_yoff;
|
||||
|
||||
@@ -61,14 +61,14 @@
|
||||
#define PBERR_FILENOTEXIST -1
|
||||
#define PBERR_NOERR 0
|
||||
|
||||
typedef struct {
|
||||
void (*AddTextEffect)(LPTCTEXTDESC desc, const char *text, const char *description, int id);
|
||||
void (*AddBmpEffect)(LPTCBMPDESC desc, const char *description);
|
||||
void (*AddMovieEffect)(LPTCMOVIEDESC desc, const char *description);
|
||||
void (*AddBkgEffect)(LPTCBKGDESC desc, const char *description);
|
||||
void (*AddPolyEffect)(LPTCPOLYDESC desc, const char *description);
|
||||
void (*AddSoundEffect)(LPTCSNDDESC desc, const char *description);
|
||||
void (*AddButtonEffect)(LPTCBUTTONDESC desc, const char *description, int id);
|
||||
struct tBriefParseCallbacks {
|
||||
void (*AddTextEffect)(TCTEXTDESC* desc, const char *text, const char *description, int id);
|
||||
void (*AddBmpEffect)(TCBMPDESC* desc, const char *description);
|
||||
void (*AddMovieEffect)(TCMOVIEDESC* desc, const char *description);
|
||||
void (*AddBkgEffect)(TCBKGDESC* desc, const char *description);
|
||||
void (*AddPolyEffect)(TCPOLYDESC* desc, const char *description);
|
||||
void (*AddSoundEffect)(TCSNDDESC* desc, const char *description);
|
||||
void (*AddButtonEffect)(TCBUTTONDESC* desc, const char *description, int id);
|
||||
void (*StartScreen)(int screen_num, const char *description, const char *layout, uint32_t mask_set, uint32_t mask_unset);
|
||||
void (*EndScreen)();
|
||||
bool (*LoopCallback)();
|
||||
@@ -76,14 +76,14 @@ typedef struct {
|
||||
void (*SetStatic)(float amount);
|
||||
void (*SetGlitch)(float amount);
|
||||
void (*AddVoice)(const char *filename, int flags, const char *description);
|
||||
} tBriefParseCallbacks;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tTextBufferDesc {
|
||||
TCTEXTDESC textdesc;
|
||||
int text_id;
|
||||
int teffect;
|
||||
char description[128];
|
||||
} tTextBufferDesc;
|
||||
};
|
||||
|
||||
class CBriefParse {
|
||||
public:
|
||||
@@ -93,13 +93,13 @@ public:
|
||||
int ParseBriefing(const char *filename);
|
||||
|
||||
private:
|
||||
void (*AddTextEffect)(LPTCTEXTDESC desc, const char *text, const char *description, int id);
|
||||
void (*AddBmpEffect)(LPTCBMPDESC desc, const char *description);
|
||||
void (*AddMovieEffect)(LPTCMOVIEDESC desc, const char *description);
|
||||
void (*AddBkgEffect)(LPTCBKGDESC desc, const char *description);
|
||||
void (*AddPolyEffect)(LPTCPOLYDESC desc, const char *description);
|
||||
void (*AddSoundEffect)(LPTCSNDDESC desc, const char *description);
|
||||
void (*AddButtonEffect)(LPTCBUTTONDESC desc, const char *description, int id);
|
||||
void (*AddTextEffect)(TCTEXTDESC* desc, const char *text, const char *description, int id);
|
||||
void (*AddBmpEffect)(TCBMPDESC* desc, const char *description);
|
||||
void (*AddMovieEffect)(TCMOVIEDESC* desc, const char *description);
|
||||
void (*AddBkgEffect)(TCBKGDESC* desc, const char *description);
|
||||
void (*AddPolyEffect)(TCPOLYDESC* desc, const char *description);
|
||||
void (*AddSoundEffect)(TCSNDDESC* desc, const char *description);
|
||||
void (*AddButtonEffect)(TCBUTTONDESC* desc, const char *description, int id);
|
||||
void (*StartScreen)(int screen_num, const char *desc, const char *layout, uint32_t mask_set, uint32_t mask_unset);
|
||||
void (*EndScreen)();
|
||||
bool (*LoopCallback)();
|
||||
|
||||
@@ -445,10 +445,10 @@ float Key_ramp_speed = 0.5f;
|
||||
#define LIMIT_VERT 1.0f
|
||||
#define LIMIT_FORWARD 1.0f
|
||||
|
||||
typedef struct tSpace {
|
||||
struct tSensitivity {
|
||||
float p, b, h, x, y, z;
|
||||
float op, ob, oh, ox, oy, oz;
|
||||
} tSensitivity;
|
||||
};
|
||||
|
||||
// GLOBALS
|
||||
|
||||
@@ -463,7 +463,7 @@ static float Control_frametime;
|
||||
static float Key_pitch_ramp_time = 0.0f;
|
||||
static float Key_heading_ramp_time = 0.0f;
|
||||
|
||||
static tSpace Key_ramp;
|
||||
static tSensitivity Key_ramp;
|
||||
|
||||
// PROTOTYPES
|
||||
|
||||
|
||||
@@ -115,9 +115,9 @@ protected:
|
||||
virtual void OnFormat();
|
||||
};
|
||||
|
||||
typedef struct tCfgDataParts {
|
||||
struct tCfgDataParts {
|
||||
uint8_t bind_0, bind_1, ctrl_0, ctrl_1;
|
||||
} tCfgDataParts;
|
||||
};
|
||||
|
||||
static inline void parse_config_data(tCfgDataParts *parts, ct_type type0, ct_type type1, ct_config_data cfgdata) {
|
||||
switch (type0) {
|
||||
|
||||
@@ -75,7 +75,7 @@ extern int Camera_view_mode[NUM_CAMERA_VIEWS];
|
||||
extern void Osiris_CreateModuleInitStruct(tOSIRISModuleInit *mi);
|
||||
module GameDLLHandle = {NULL};
|
||||
extern ddgr_color Player_colors[];
|
||||
typedef struct {
|
||||
struct game_api {
|
||||
int *objs;
|
||||
int *rooms;
|
||||
int *terrain;
|
||||
@@ -90,7 +90,7 @@ typedef struct {
|
||||
int *fp[450]; // function pointers
|
||||
int *vp[50]; // variable pointers
|
||||
tOSIRISModuleInit *osiris_functions;
|
||||
} game_api;
|
||||
};
|
||||
// The exported DLL function call prototypes
|
||||
#if defined(__LINUX__)
|
||||
typedef void DLLFUNCCALL (*DLLGameCall_fp)(int eventnum, dllinfo *data);
|
||||
|
||||
@@ -202,13 +202,13 @@ struct object;
|
||||
#define INVRESET_LEVELCHANGE 1
|
||||
#define INVRESET_DEATHSPEW 2
|
||||
|
||||
typedef struct {
|
||||
struct tInvenList {
|
||||
bool selectable;
|
||||
char *hud_name;
|
||||
int amount;
|
||||
} tInvenList;
|
||||
};
|
||||
|
||||
typedef struct tInvenInfo {
|
||||
struct tInvenInfo {
|
||||
int count;
|
||||
char *description;
|
||||
char *icon_name;
|
||||
@@ -217,9 +217,9 @@ typedef struct tInvenInfo {
|
||||
uint16_t iflags; // Inventory item flags
|
||||
int type;
|
||||
int id;
|
||||
} tInvenInfo;
|
||||
};
|
||||
|
||||
typedef struct inven_item {
|
||||
struct inven_item {
|
||||
|
||||
int type; // what type of object this is... robot, weapon, hostage, powerup, fireball
|
||||
// if INVF_OBJECT, this is the object handle
|
||||
@@ -239,7 +239,7 @@ typedef struct inven_item {
|
||||
uint16_t iflags; // Inventory item flags
|
||||
|
||||
inven_item *next, *prev; // pointer to next inventory item
|
||||
} inven_item;
|
||||
};
|
||||
|
||||
class Inventory {
|
||||
public:
|
||||
|
||||
@@ -1410,11 +1410,11 @@ void WriteAllDoorways(CFILE *ofile);
|
||||
*/
|
||||
#define CONV_MULTI 0x01
|
||||
#define CONV_SINGLE 0x02
|
||||
typedef struct {
|
||||
struct tConvertObject {
|
||||
int type, id;
|
||||
const char *name;
|
||||
uint8_t flag;
|
||||
} tConvertObject;
|
||||
};
|
||||
|
||||
tConvertObject object_convert[] = {
|
||||
#ifdef DEMO
|
||||
|
||||
@@ -197,18 +197,18 @@ const int LVLOBJ_NUM = 4;
|
||||
const uint16_t LVLOBJF_SECONDARY1 = 1, LVLOBJF_SECONDARY2 = 2, LVLOBJF_SECONDARY3 = 4, LVLOBJF_SECONDARY4 = 8;
|
||||
|
||||
// Struct for info about the current level
|
||||
typedef struct level_info {
|
||||
struct level_info {
|
||||
char name[100];
|
||||
char designer[100];
|
||||
char copyright[100];
|
||||
char notes[1000];
|
||||
} level_info;
|
||||
};
|
||||
|
||||
// Info about the current level
|
||||
extern level_info Level_info;
|
||||
|
||||
// level information
|
||||
typedef struct tLevelNode {
|
||||
struct tLevelNode {
|
||||
// level flags
|
||||
unsigned flags; // level flags
|
||||
unsigned objective_flags; // level objective flags
|
||||
@@ -228,12 +228,12 @@ typedef struct tLevelNode {
|
||||
uint8_t lvlbranch0, lvlbranch1; // FORK or BRANCH command
|
||||
uint8_t secretlvl; // SECRET command
|
||||
uint8_t pad;
|
||||
} tLevelNode;
|
||||
};
|
||||
|
||||
// predefine mission state flags
|
||||
#define MSN_STATE_SECRET_LEVEL 0x80000000
|
||||
|
||||
typedef struct tMission {
|
||||
struct tMission {
|
||||
int mn3_handle; // if this mission was loaded from an MN3, this is the handle.
|
||||
|
||||
unsigned game_state_flags; // game state information stored here (manipulated by scripting)
|
||||
@@ -252,10 +252,10 @@ typedef struct tMission {
|
||||
int num_levels; // number of levels
|
||||
int cur_level; // current level playing.
|
||||
tLevelNode *levels; // array of levels
|
||||
} tMission;
|
||||
};
|
||||
|
||||
// structyre used to get information about a mission
|
||||
typedef struct tMissionInfo {
|
||||
struct tMissionInfo {
|
||||
char name[MSN_NAMELEN];
|
||||
char author[MSN_NAMELEN];
|
||||
char desc[MSN_NAMELEN * 4];
|
||||
@@ -264,7 +264,7 @@ typedef struct tMissionInfo {
|
||||
bool training;
|
||||
int n_levels;
|
||||
char keywords[MAX_KEYWORDLEN]; // Keywords for mods, so you can see if this mission supports a given mod
|
||||
} tMissionInfo;
|
||||
};
|
||||
|
||||
// Scripting information
|
||||
|
||||
|
||||
@@ -460,14 +460,14 @@ typedef int(DLLFUNCCALL *GetCOScriptList_fp)(int **list, int **id_list);
|
||||
typedef int(DLLFUNCCALL *SaveRestoreState_fp)(void *file_ptr, uint8_t saving_state);
|
||||
#endif
|
||||
|
||||
typedef struct tRefObj {
|
||||
struct tRefObj {
|
||||
int objnum;
|
||||
int type, id;
|
||||
bool dummy;
|
||||
tRefObj *next;
|
||||
} tRefObj;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tOSIRISModule {
|
||||
uint8_t flags;
|
||||
uint8_t extracted_id;
|
||||
uint16_t reference_count;
|
||||
@@ -488,10 +488,11 @@ typedef struct {
|
||||
#ifdef OSIRISDEBUG
|
||||
tRefObj *RefRoot;
|
||||
#endif
|
||||
} tOSIRISModule;
|
||||
};
|
||||
|
||||
static tOSIRISModule OSIRIS_loaded_modules[MAX_LOADED_MODULES];
|
||||
tOSIRISModuleInit Osiris_module_init;
|
||||
|
||||
struct {
|
||||
bool level_loaded;
|
||||
uint16_t num_customs;
|
||||
@@ -500,6 +501,7 @@ struct {
|
||||
int *custom_handles;
|
||||
void *instance;
|
||||
} tOSIRISCurrentLevel;
|
||||
|
||||
struct {
|
||||
bool mission_loaded;
|
||||
uint16_t dll_id;
|
||||
@@ -507,11 +509,11 @@ struct {
|
||||
|
||||
#define OESF_USED 0x0001
|
||||
#define OESF_MISSION 0x0002 // mission dlls
|
||||
typedef struct {
|
||||
struct tExtractedScriptInfo {
|
||||
uint8_t flags;
|
||||
char *temp_filename;
|
||||
char *real_filename;
|
||||
} tExtractedScriptInfo;
|
||||
};
|
||||
static tExtractedScriptInfo OSIRIS_Extracted_scripts[MAX_LOADED_MODULES];
|
||||
static char *OSIRIS_Extracted_script_dir = NULL;
|
||||
|
||||
@@ -2266,7 +2268,7 @@ bool Osiris_CallEvent(object *obj, int event, tOSIRISEventInfo *data) {
|
||||
#define OITF_TRIGGERTIMER 0x0004
|
||||
#define OITF_LEVELTIMER 0x0008
|
||||
#define OITF_CANCELONDEAD 0x0010
|
||||
typedef struct {
|
||||
struct tOSIRISINTERNALTIMER {
|
||||
uint16_t flags;
|
||||
union {
|
||||
int objhandle;
|
||||
@@ -2279,7 +2281,7 @@ typedef struct {
|
||||
float timer_interval;
|
||||
float timer_next_signal;
|
||||
float timer_end;
|
||||
} tOSIRISINTERNALTIMER;
|
||||
};
|
||||
tOSIRISINTERNALTIMER OsirisTimers[MAX_OSIRIS_TIMERS];
|
||||
|
||||
static inline int FORM_HANDLE(int counter, int slot) { return (((counter & 0xFFFFFF) << 8) | (slot & 0xFF)); }
|
||||
@@ -2820,11 +2822,11 @@ bool Osiris_RestoreSystemState(CFILE *file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef struct tOSIRISMEMNODE {
|
||||
struct tOSIRISMEMNODE {
|
||||
tOSIRISMEMCHUNK chunk_id;
|
||||
void *memory;
|
||||
tOSIRISMEMNODE *next;
|
||||
} tOSIRISMEMNODE;
|
||||
};
|
||||
|
||||
tOSIRISMEMNODE *Osiris_mem_root;
|
||||
|
||||
@@ -3333,7 +3335,7 @@ char OMMS_GetInfo(OMMSHANDLE handle,uint32_t *mem_size,uint32_t *uid,uint16_t *r
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
typedef struct tOMMSNode {
|
||||
struct tOMMSNode {
|
||||
uint16_t id;
|
||||
uint32_t size_of_memory;
|
||||
uint32_t unique_id;
|
||||
@@ -3341,14 +3343,14 @@ typedef struct tOMMSNode {
|
||||
uint8_t free_called;
|
||||
void *memory_ptr;
|
||||
tOMMSNode *next;
|
||||
} tOMMSNode;
|
||||
};
|
||||
|
||||
typedef struct tOMMSHashNode {
|
||||
struct tOMMSHashNode {
|
||||
char *script_name;
|
||||
uint16_t base_id;
|
||||
tOMMSNode *root;
|
||||
tOMMSHashNode *next;
|
||||
} tOMMSHashNode;
|
||||
};
|
||||
|
||||
tOMMSHashNode *OMMS_Hash_node_root = NULL;
|
||||
uint16_t OMMS_Current_base_id = 0;
|
||||
|
||||
@@ -470,10 +470,10 @@ int PPic_GetBitmapHandle(uint16_t pilot_id) {
|
||||
// ===============================================================================
|
||||
|
||||
// this maps a pilot_id to an index file offset
|
||||
typedef struct {
|
||||
struct tPilotPicIdOffset {
|
||||
int offset;
|
||||
uint16_t id;
|
||||
} tPilotPicIdOffset;
|
||||
};
|
||||
tPilotPicIdOffset *Pilot_id_to_offset = NULL;
|
||||
uint16_t *Sorted_Pilot_id_to_offset = NULL;
|
||||
int PilotPic_count = 0;
|
||||
|
||||
@@ -2016,7 +2016,7 @@ void DoPlayerFrame() {
|
||||
#define DEATH_EXPLODE_THRESHOLD 100.0f
|
||||
#define DEATH_BREAKUP_THRESHOLD 40.0f
|
||||
|
||||
typedef struct tDeathSeq {
|
||||
struct tDeathSeq {
|
||||
object *camera;
|
||||
object *oldviewer;
|
||||
|
||||
@@ -2045,7 +2045,7 @@ typedef struct tDeathSeq {
|
||||
|
||||
tDeathSeq() { camera = NULL; };
|
||||
|
||||
} tDeathSeq;
|
||||
};
|
||||
|
||||
static tDeathSeq Death[MAX_NET_PLAYERS];
|
||||
|
||||
@@ -3782,11 +3782,11 @@ void ResetWaypoint() {
|
||||
Players[i].current_auto_waypoint_room = -1;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
struct waypoint {
|
||||
vector pos;
|
||||
int roomnum;
|
||||
matrix orient;
|
||||
} waypoint;
|
||||
};
|
||||
|
||||
waypoint Waypoints[MAX_WAYPOINTS];
|
||||
int Num_waypoints;
|
||||
|
||||
@@ -168,14 +168,14 @@
|
||||
#define LABEL_LEN 19
|
||||
|
||||
// Struct to keep data for small views
|
||||
typedef struct {
|
||||
struct small_view {
|
||||
int objhandle; // the object we're viewing from, or OBJECT_HANDLE_NONE if view not active
|
||||
int flags; // various flags
|
||||
float timer; // how much longer time window stays alive, if SVF_TIMED flag is set
|
||||
float zoom; // the zoom for this window
|
||||
int gun_num; // which gun to view from, or -1 if none
|
||||
char label[LABEL_LEN + 1]; // the label for the window
|
||||
} small_view;
|
||||
};
|
||||
|
||||
// The array of small views
|
||||
static small_view Small_views[NUM_SMALL_VIEWS];
|
||||
|
||||
@@ -1112,12 +1112,12 @@ int TCMMButtonDesc[] = {TXI_TCMM_BRIEFINGS, TXI_TCMM_CARGO, TXI_TCMM_AUTOMAP, TX
|
||||
|
||||
int mainmenu_system;
|
||||
|
||||
typedef struct {
|
||||
struct tMenuButton {
|
||||
bool enabled;
|
||||
int efxid;
|
||||
int system;
|
||||
char text[128];
|
||||
} tMenuButton;
|
||||
};
|
||||
tMenuButton MMButtons[TCMAX_MMBUTTONS];
|
||||
|
||||
void TCMainMenuCallback(int efxnum) { mainmenu_system = efxnum; }
|
||||
@@ -3270,9 +3270,9 @@ get_num:
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
struct TCSound {
|
||||
int hlhandle, handle;
|
||||
} TCSound;
|
||||
};
|
||||
|
||||
TCSound TelcomSounds[TCSND_SOUNDCOUNT];
|
||||
|
||||
@@ -3427,7 +3427,7 @@ struct {
|
||||
float cam_dist;
|
||||
} TCShipSelect;
|
||||
|
||||
typedef struct {
|
||||
struct tShipInfo {
|
||||
int max_speed;
|
||||
int maneuverability;
|
||||
int shield;
|
||||
@@ -3436,7 +3436,7 @@ typedef struct {
|
||||
int length;
|
||||
int height;
|
||||
int weight;
|
||||
} tShipInfo;
|
||||
};
|
||||
|
||||
#define MAX_NUM_SHIPS 3
|
||||
|
||||
@@ -3452,11 +3452,11 @@ $$TABLE_SHIP "Pyro-GL"
|
||||
$$TABLE_SHIP "Phoenix"
|
||||
$$TABLE_SHIP "Magnum-AHT"
|
||||
*/
|
||||
typedef struct {
|
||||
struct tSSShipInfo {
|
||||
bool found;
|
||||
int ship_index;
|
||||
int efxnum;
|
||||
} tSSShipInfo;
|
||||
};
|
||||
tSSShipInfo SSShips[MAX_NUM_SHIPS];
|
||||
|
||||
// two buttons
|
||||
@@ -4022,12 +4022,12 @@ bool TelCom_PopSystemEvent(tTCEvent *evt) {
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef struct tCustomKeyEventID {
|
||||
struct tCustomKeyEventID {
|
||||
int downcount;
|
||||
int key_id;
|
||||
int event_id;
|
||||
tCustomKeyEventID *next;
|
||||
} tCustomKeyEventID;
|
||||
};
|
||||
tCustomKeyEventID *Telcom_custom_key_event_root = NULL;
|
||||
|
||||
/*
|
||||
|
||||
@@ -167,16 +167,16 @@ extern windowmap_t windowmap;
|
||||
extern bool TelCom_running; // Used within TelComMain(), when POWER button is pressed become false
|
||||
|
||||
// structure for a bounding box (used when getting a hotspot bounding box)
|
||||
typedef struct button_box {
|
||||
struct box {
|
||||
int top, bottom, left, right;
|
||||
} box;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tTCEvent {
|
||||
int id;
|
||||
int parms[2];
|
||||
} tTCEvent;
|
||||
};
|
||||
|
||||
typedef struct tTelComInfo {
|
||||
struct tTelComInfo {
|
||||
box Monitor_coords[MAX_MONITOR];
|
||||
uint8_t Screen_state[MAX_TELCOM_SCREENS];
|
||||
tTCEvent Telcom_event_queue[MAX_TELCOM_EVENTS]; // Event queue for TelCom System
|
||||
@@ -186,7 +186,7 @@ typedef struct tTelComInfo {
|
||||
float Telcom_mouse_downtime;
|
||||
uint8_t state;
|
||||
int TelComSysKeyEnable;
|
||||
} tTelComInfo;
|
||||
};
|
||||
extern tTelComInfo Telcom_system;
|
||||
|
||||
// This is the function called by TelCom to choose a ship
|
||||
|
||||
@@ -119,11 +119,11 @@
|
||||
#define LID_COUNTERMEASURES 4
|
||||
#define LID_INVENTORY 5
|
||||
|
||||
typedef struct {
|
||||
struct tLineInfo {
|
||||
uint8_t type;
|
||||
const char *name;
|
||||
int id;
|
||||
} tLineInfo;
|
||||
};
|
||||
|
||||
tLineInfo StatusLines[] = {
|
||||
{LIT_TITLE, "Ship Status", LID_NONE}, {LIT_VALUE, "Shields", LID_SHIELDS},
|
||||
|
||||
@@ -691,7 +691,7 @@ char *format(const char *fmt, ...) {
|
||||
return tempbuffer;
|
||||
}
|
||||
|
||||
bool CreateTextEffect(LPTCTEXTDESC desc, const char *text, int monitor, int screen, int id) {
|
||||
bool CreateTextEffect(TCTEXTDESC* desc, const char *text, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
ASSERT(text);
|
||||
|
||||
@@ -760,7 +760,7 @@ bool CreateTextEffect(LPTCTEXTDESC desc, const char *text, int monitor, int scre
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CreateBitmapEffect(LPTCBMPDESC desc, int monitor, int screen, int id) {
|
||||
bool CreateBitmapEffect(TCBMPDESC* desc, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
int efxtype = -1;
|
||||
switch (desc->type) {
|
||||
@@ -822,7 +822,7 @@ bool CreateBitmapEffect(LPTCBMPDESC desc, int monitor, int screen, int id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CreateMovieEffect(LPTCMOVIEDESC desc, int monitor, int screen, int id) {
|
||||
bool CreateMovieEffect(TCMOVIEDESC* desc, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
int efxtype = -1;
|
||||
switch (desc->type) {
|
||||
@@ -864,7 +864,7 @@ bool CreateMovieEffect(LPTCMOVIEDESC desc, int monitor, int screen, int id) {
|
||||
}
|
||||
|
||||
extern tTelComInfo Telcom_system;
|
||||
bool CreateBackgroundEffect(LPTCBKGDESC desc, int monitor, int screen, int id) {
|
||||
bool CreateBackgroundEffect(TCBKGDESC* desc, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
int efxtype = -1;
|
||||
switch (desc->type) {
|
||||
@@ -903,7 +903,7 @@ bool CreateBackgroundEffect(LPTCBKGDESC desc, int monitor, int screen, int id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CreatePolyModelEffect(LPTCPOLYDESC desc, int monitor, int screen, int id) {
|
||||
bool CreatePolyModelEffect(TCPOLYDESC* desc, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
int efxtype = -1;
|
||||
switch (desc->type) {
|
||||
@@ -917,7 +917,7 @@ bool CreatePolyModelEffect(LPTCPOLYDESC desc, int monitor, int screen, int id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CreateSoundEffect(LPTCSNDDESC desc, int monitor, int screen, int id) {
|
||||
bool CreateSoundEffect(TCSNDDESC* desc, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
int efxtype = -1;
|
||||
switch (desc->type) {
|
||||
@@ -946,7 +946,7 @@ bool CreateSoundEffect(LPTCSNDDESC desc, int monitor, int screen, int id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int CreateButtonEffect(LPTCBUTTONDESC desc, int monitor, int screen, int id) {
|
||||
int CreateButtonEffect(TCBUTTONDESC* desc, int monitor, int screen, int id) {
|
||||
ASSERT(desc);
|
||||
ASSERT(monitor == MONITOR_MAIN);
|
||||
|
||||
|
||||
@@ -188,44 +188,44 @@
|
||||
#define CLICKTYPE_CLICKUP 1
|
||||
#define CLICKTYPE_DOWN 2
|
||||
|
||||
typedef struct {
|
||||
struct tTextInfo {
|
||||
float last_letter; // Last letter printed
|
||||
int sound_index; // handle to sound for action
|
||||
int font_index; // Font index
|
||||
int line_index; // index of first text line (scrolling purposes)
|
||||
bool scroll_u, scroll_d; // if the scrollup down buttons are appearing
|
||||
bool scroll; // set to true if it should be allowed to scroll
|
||||
} tTextInfo;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tBitmapInfo {
|
||||
int temp_bmhandle; // handle of temporary bitmap
|
||||
float stage; // stage that bitmap effect is in
|
||||
int *bitmaps; // array of bitmaps (for scale effect)
|
||||
int bm_count; // how many bitmaps (for scale effect)
|
||||
int bm_handle; // handle to the bitmap
|
||||
chunked_bitmap chunk_bmp; // the chunk bitmap
|
||||
} tBitmapInfo;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tPolyInfo {
|
||||
vector m_Rot; // current rotation
|
||||
vector m_Pos; // current position
|
||||
vector m_Ori; // current orientation
|
||||
matrix m_mOrient; // orientation
|
||||
int handle; // handle to polymodel
|
||||
} tPolyInfo;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tMovieInfo {
|
||||
tCinematic *handle; // handle to the movie
|
||||
char *filename; // filename of the movie
|
||||
float fps; // fps
|
||||
} tMovieInfo;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tSoundInfo {
|
||||
bool started; // has the sound started?
|
||||
int handle; // handle of the sound
|
||||
} tSoundInfo;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tButtonInfo {
|
||||
bool flash_state; // Is the button glowing?
|
||||
uint8_t click_type; // CLICKTYPE_DOWN or CLICKTYPE_CLICK (what the button responds to)
|
||||
uint8_t button_type;
|
||||
@@ -243,9 +243,9 @@ typedef struct {
|
||||
chunked_bitmap chunkfocus_bmp;
|
||||
chunked_bitmap flash_chunk;
|
||||
chunked_bitmap flashfocus_chunk;
|
||||
} tButtonInfo;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tceffect {
|
||||
uint8_t type; // Type of effect
|
||||
uint8_t monitor; // Which monitor it belongs to
|
||||
uint8_t screen; // What screen the effect belongs to
|
||||
@@ -279,7 +279,7 @@ typedef struct {
|
||||
tTCEvent event_queue[MAX_EFFECT_EVENTS]; // event queue for an effect
|
||||
|
||||
int prev, next; // Links to previous and next effect
|
||||
} tceffect;
|
||||
};
|
||||
|
||||
extern int glitch_dx, glitch_dy;
|
||||
|
||||
@@ -341,13 +341,13 @@ void RenderPolyModel(tceffect *tce, float frametime, int xoff, int yoff, bool ok
|
||||
void RenderSound(tceffect *tce, float frametime, int xoff, int yoff, bool ok_to_render);
|
||||
void RenderButton(tceffect *tce, float frametime, int xoff, int yoff, bool ok_to_render);
|
||||
|
||||
bool CreateTextEffect(LPTCTEXTDESC desc, const char *text, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateBitmapEffect(LPTCBMPDESC desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateMovieEffect(LPTCMOVIEDESC desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateBackgroundEffect(LPTCBKGDESC desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreatePolyModelEffect(LPTCPOLYDESC desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateSoundEffect(LPTCSNDDESC desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
int CreateButtonEffect(LPTCBUTTONDESC desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateTextEffect(TCTEXTDESC* desc, const char *text, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateBitmapEffect(TCBMPDESC* desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateMovieEffect(TCMOVIEDESC* desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateBackgroundEffect(TCBKGDESC* desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreatePolyModelEffect(TCPOLYDESC* desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateSoundEffect(TCSNDDESC* desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
int CreateButtonEffect(TCBUTTONDESC* desc, int monitor, int screen, int id = INVALID_EFFECT_ID);
|
||||
bool CreateTextStatic(tceffect *tce, const char *text);
|
||||
bool CreateTextFade(tceffect *tce, const char *text);
|
||||
bool CreateTextType(tceffect *tce, const char *text);
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
// tc_text
|
||||
// - Contains information on the text coordinates of an effect
|
||||
//===================
|
||||
typedef struct {
|
||||
struct tc_text {
|
||||
int left, right, top, bottom;
|
||||
} tc_text;
|
||||
};
|
||||
|
||||
// TCTEXTDESC caps flags
|
||||
#define TCTD_FONT 0x0001
|
||||
@@ -166,7 +166,7 @@ typedef struct {
|
||||
// The following structure should be filled in, and passed to the Monitor::Text() function
|
||||
// caps must be set with the above flags. If a member isn't set to be defined by the caps, then
|
||||
// if it's needed default values will be used (defaults listed after each member in structure)
|
||||
typedef struct {
|
||||
struct TCTEXTDESC {
|
||||
// what values are set/defined
|
||||
int caps; //(MUST BE DEFINED!)
|
||||
// the text box of the effect
|
||||
@@ -187,8 +187,9 @@ typedef struct {
|
||||
int type;
|
||||
// mission flag mask
|
||||
uint32_t mission_mask_set, mission_mask_unset;
|
||||
} TCTEXTDESC, *LPTCTEXTDESC;
|
||||
typedef struct {
|
||||
};
|
||||
|
||||
struct TCBMPDESC {
|
||||
// type
|
||||
int type;
|
||||
// flags
|
||||
@@ -207,8 +208,9 @@ typedef struct {
|
||||
char filename[MAX_FILELEN]; // MUST BE FILLED IN
|
||||
// mission flag mask
|
||||
uint32_t mission_mask_set, mission_mask_unset;
|
||||
} TCBMPDESC, *LPTCBMPDESC;
|
||||
typedef struct {
|
||||
};
|
||||
|
||||
struct TCMOVIEDESC {
|
||||
// fill in with whats valid
|
||||
int caps; // MUST BE FILLED IN
|
||||
// type
|
||||
@@ -225,8 +227,9 @@ typedef struct {
|
||||
float waittime; //(Default: 0.0f)
|
||||
// mission flag mask
|
||||
uint32_t mission_mask_set, mission_mask_unset;
|
||||
} TCMOVIEDESC, *LPTCMOVIEDESC;
|
||||
typedef struct {
|
||||
};
|
||||
|
||||
struct TCBKGDESC {
|
||||
// whats defined for the struct
|
||||
int caps; // MUST BE SET!
|
||||
// what type of background effect
|
||||
@@ -239,8 +242,8 @@ typedef struct {
|
||||
float waittime; //(Default: 0.0f)
|
||||
// mission flag mask
|
||||
uint32_t mission_mask_set, mission_mask_unset;
|
||||
} TCBKGDESC, *LPTCBKGDESC;
|
||||
typedef struct {
|
||||
};
|
||||
struct TCPOLYDESC {
|
||||
// whats defined for the struct
|
||||
int caps; // MUST BE SET!
|
||||
// what type of poly effect
|
||||
@@ -259,8 +262,9 @@ typedef struct {
|
||||
char polyname[MAX_FILELEN];
|
||||
// mission flag mask
|
||||
uint32_t mission_mask_set, mission_mask_unset;
|
||||
} TCPOLYDESC, *LPTCPOLYDESC;
|
||||
typedef struct {
|
||||
};
|
||||
|
||||
struct TCSNDDESC {
|
||||
// whats defined for the struct
|
||||
int caps; // MUST BE SET
|
||||
// type of sound effect
|
||||
@@ -273,8 +277,9 @@ typedef struct {
|
||||
char filename[MAX_FILELEN];
|
||||
// mission flag mask
|
||||
uint32_t mission_mask_set, mission_mask_unset;
|
||||
} TCSNDDESC, *LPTCSNDDESC;
|
||||
typedef struct {
|
||||
};
|
||||
|
||||
struct TCBUTTONDESC {
|
||||
char filename[MAX_FILELEN];
|
||||
char filename_focus[MAX_FILELEN];
|
||||
char flash_filename[MAX_FILELEN];
|
||||
@@ -291,7 +296,7 @@ typedef struct {
|
||||
bool flasher;
|
||||
bool tab_stop;
|
||||
uint32_t mission_mask_set, mission_mask_unset; // mission flag mask
|
||||
} TCBUTTONDESC, *LPTCBUTTONDESC;
|
||||
};
|
||||
|
||||
//==================
|
||||
// tc_button
|
||||
|
||||
@@ -115,20 +115,22 @@ int TGminx, TGmaxx, TGminy, TGmaxy;
|
||||
|
||||
#define UI_RIGHT_ARROW_CHAR 26
|
||||
|
||||
typedef struct {
|
||||
struct tGoalLineInfo {
|
||||
bool primary;
|
||||
bool is_objective;
|
||||
bool is_active;
|
||||
int goal_index;
|
||||
int lx, rx, ty, by; // bounding box
|
||||
} tGoalLineInfo;
|
||||
};
|
||||
|
||||
static tGoalLineInfo *TG_Lines;
|
||||
static int TG_NumLines;
|
||||
static int *TG_SortedList;
|
||||
static int TG_CurrObjectiveArrow;
|
||||
typedef struct {
|
||||
|
||||
struct tToolTipData {
|
||||
int w, h;
|
||||
} tToolTipData;
|
||||
};
|
||||
|
||||
static tToolTipData TG_TT_dest;
|
||||
static tToolTipData TG_TT_curr;
|
||||
|
||||
@@ -460,17 +460,17 @@ extern float AI_last_time_room_noise_alert_time[MAX_ROOMS + 8];
|
||||
// Notification structures
|
||||
//-------------------------------------------------
|
||||
|
||||
typedef struct ain_see {
|
||||
struct ain_see {
|
||||
bool f_use_fov;
|
||||
float max_dist;
|
||||
} ain_see;
|
||||
};
|
||||
|
||||
typedef struct ain_hear {
|
||||
struct ain_hear {
|
||||
bool f_directly_player;
|
||||
float max_dist;
|
||||
float hostile_level; // 0 - 1
|
||||
float curiosity_level;
|
||||
} ain_hear;
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Path Structures
|
||||
@@ -484,7 +484,7 @@ typedef struct ain_hear {
|
||||
#define AIP_DYNAMIC 1
|
||||
#define AIP_MOVE_LIST 2
|
||||
|
||||
typedef struct ai_path_info {
|
||||
struct ai_path_info {
|
||||
uint16_t cur_path;
|
||||
uint16_t cur_node;
|
||||
|
||||
@@ -501,26 +501,26 @@ typedef struct ai_path_info {
|
||||
uint16_t path_start_node[MAX_JOINED_PATHS];
|
||||
uint16_t path_end_node[MAX_JOINED_PATHS];
|
||||
uint16_t path_flags[MAX_JOINED_PATHS];
|
||||
} ai_path_info;
|
||||
};
|
||||
|
||||
// Used for predefined move lists (off of normal static paths)
|
||||
typedef struct ai_move_path {
|
||||
struct ai_move_path {
|
||||
vector pos;
|
||||
matrix orient;
|
||||
|
||||
int16_t path_id;
|
||||
} ai_move_path;
|
||||
};
|
||||
|
||||
typedef struct path_information {
|
||||
struct path_information {
|
||||
int path_id;
|
||||
int start_node;
|
||||
int next_node;
|
||||
int end_node;
|
||||
} path_information;
|
||||
};
|
||||
|
||||
// Goal Ender Structure
|
||||
|
||||
typedef struct goal_enabler {
|
||||
struct goal_enabler {
|
||||
char enabler_type;
|
||||
|
||||
union {
|
||||
@@ -538,7 +538,7 @@ typedef struct goal_enabler {
|
||||
|
||||
char bool_next_enabler_op;
|
||||
|
||||
} goal_enabler;
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// Goal Structures
|
||||
@@ -549,31 +549,31 @@ typedef struct goal_enabler {
|
||||
// I wonder if goals can be classified. If so, we could reserve X goal for class a, and Y goal slots for class b
|
||||
// plus it would make sure the our slots do not fill up in bad or degenerate ways.
|
||||
|
||||
typedef struct gi_fire {
|
||||
struct gi_fire {
|
||||
int16_t cur_wb; // for ranged attack
|
||||
uint8_t cur_mask; // for ranged attack
|
||||
uint8_t melee_number; // this could be union'ed but it makes this struct word aligned
|
||||
} gi_fire;
|
||||
};
|
||||
|
||||
typedef struct g_steer {
|
||||
struct g_steer {
|
||||
float min_dist;
|
||||
float max_dist;
|
||||
float max_strength;
|
||||
} g_steer;
|
||||
};
|
||||
|
||||
typedef struct g_floats {
|
||||
struct g_floats {
|
||||
float fp1;
|
||||
float fp2;
|
||||
float fp3;
|
||||
} g_floats;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct g_wander_extra {
|
||||
int avoid_handle;
|
||||
char min_rooms;
|
||||
char max_rooms;
|
||||
char flags;
|
||||
char mine_index; // Used for if this object accidently goes on to the terrain
|
||||
} g_wander_extra;
|
||||
};
|
||||
|
||||
#define GAF_ALIGNED 0x01
|
||||
#define GAF_SPHERE 0x02
|
||||
@@ -581,20 +581,20 @@ typedef struct {
|
||||
#define GAF_TEMP_CLEAR_ROBOT_COLLISIONS 0x08
|
||||
#define GAF_TEMP_POINT_COLLIDE_WALLS 0x10
|
||||
|
||||
typedef struct {
|
||||
struct g_attach {
|
||||
float rad;
|
||||
int16_t flags;
|
||||
char parent_ap;
|
||||
char child_ap;
|
||||
} g_attach;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct g_static_path {
|
||||
int16_t start_node;
|
||||
int16_t end_node;
|
||||
int16_t cur_node;
|
||||
} g_static_path;
|
||||
};
|
||||
|
||||
typedef struct goal_info {
|
||||
struct goal_info {
|
||||
union {
|
||||
int handle;
|
||||
int roomnum;
|
||||
@@ -618,10 +618,10 @@ typedef struct goal_info {
|
||||
void *scripted_data_ptr;
|
||||
};
|
||||
|
||||
} goal_info;
|
||||
};
|
||||
|
||||
// Goal structure
|
||||
typedef struct goal {
|
||||
struct goal {
|
||||
uint32_t type;
|
||||
char subtype;
|
||||
uint8_t activation_level;
|
||||
@@ -663,7 +663,7 @@ typedef struct goal {
|
||||
vector set_uvec;
|
||||
|
||||
bool used;
|
||||
} goal;
|
||||
};
|
||||
|
||||
#define OBJGOAL(x) \
|
||||
(((goal *)x)->type & (AIG_GET_AWAY_FROM_OBJ | AIG_HIDE_FROM_OBJ | AIG_GET_TO_OBJ | AIG_ATTACH_TO_OBJ | \
|
||||
@@ -675,7 +675,7 @@ typedef struct goal {
|
||||
#define TARGETONLYGOAL(x) (((goal *)x)->type & (AIG_MELEE_TARGET))
|
||||
#define COMPLETEATPOS(x) (((goal *)x)->type & (AIG_WANDER_AROUND | AIG_GET_TO_POS))
|
||||
|
||||
typedef struct notify {
|
||||
struct notify {
|
||||
union {
|
||||
int obj_handle;
|
||||
int goal_num;
|
||||
@@ -690,16 +690,16 @@ typedef struct notify {
|
||||
};
|
||||
|
||||
float time;
|
||||
} notify;
|
||||
};
|
||||
|
||||
typedef struct ain_weapon_hit_info {
|
||||
struct ain_weapon_hit_info {
|
||||
int parent_handle;
|
||||
int weapon_handle;
|
||||
int hit_face;
|
||||
int hit_subobject;
|
||||
float hit_damage;
|
||||
vector hit_pnt;
|
||||
} weapon_hit_info;
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// AI awareness scale
|
||||
@@ -713,7 +713,7 @@ typedef struct ain_weapon_hit_info {
|
||||
|
||||
#define AI_MEM_DEPTH 5
|
||||
|
||||
typedef struct ai_mem {
|
||||
struct ai_mem {
|
||||
// Computed at end of memory frame
|
||||
float shields;
|
||||
int16_t num_enemies;
|
||||
@@ -724,7 +724,7 @@ typedef struct ai_mem {
|
||||
int16_t num_enemy_shots_fired;
|
||||
int16_t num_hit_enemy;
|
||||
int16_t num_enemy_shots_dodged;
|
||||
} ai_mem;
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// AI tracking information
|
||||
@@ -734,7 +734,7 @@ typedef struct ai_mem {
|
||||
// AI framework per robot
|
||||
//-------------------------------------------------
|
||||
|
||||
typedef struct ai_frame {
|
||||
struct ai_frame {
|
||||
char ai_class; // Static, DLL, Soar, Flock, and other will be here -- chrishack
|
||||
char ai_type; // Used for some coded types
|
||||
|
||||
@@ -848,7 +848,7 @@ typedef struct ai_frame {
|
||||
|
||||
matrix saved_orient;
|
||||
|
||||
} ai_frame;
|
||||
};
|
||||
|
||||
// Etern'ed functions that depend of aistruct stuff
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
#ifndef AITERRAIN_H_
|
||||
#define AITERRAIN_H_
|
||||
|
||||
typedef struct ground_information {
|
||||
struct ground_information {
|
||||
float highest_y;
|
||||
float lowest_y;
|
||||
} ground_information;
|
||||
};
|
||||
|
||||
bool ait_GetGroundInfo(ground_information *ground_info, vector *p0, vector *p1, float rad = 0.0f, angle fov = 0);
|
||||
void ait_Init(void);
|
||||
|
||||
@@ -46,20 +46,20 @@
|
||||
#include "manage.h"
|
||||
|
||||
// An Ambient Sound Element, one part of an Ambient Sound Pattern (ASP)
|
||||
typedef struct {
|
||||
struct ase {
|
||||
int handle; // the sample's handle
|
||||
float min_volume, max_volume; // minimum and maximum volume
|
||||
int probability; // between 0 and 100
|
||||
} ase;
|
||||
};
|
||||
|
||||
// An Ambient Sound Element, one part of an Ambient Sound Pattern (ASP)
|
||||
typedef struct {
|
||||
struct asp {
|
||||
char name[PAGENAME_LEN]; // the name of this pattern
|
||||
float min_delay, max_delay; // delay time between sounds
|
||||
int num_sounds; // how many sounds in this pattern
|
||||
ase *sounds; // array of sounds
|
||||
float delay; // how long until the next sound
|
||||
} asp;
|
||||
};
|
||||
|
||||
extern int Num_ambient_sound_patterns;
|
||||
extern asp Ambient_sound_patterns[];
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "game2dll.h"
|
||||
#include "player.h"
|
||||
|
||||
typedef struct {
|
||||
struct tWaveFile {
|
||||
int sample_length;
|
||||
int np_sample_length;
|
||||
int samples_per_second;
|
||||
@@ -45,7 +45,7 @@ typedef struct {
|
||||
int16_t number_channels;
|
||||
uint8_t *sample_8bit;
|
||||
int16_t *sample_16bit;
|
||||
} tWaveFile;
|
||||
};
|
||||
|
||||
// returns:
|
||||
// 0: no error
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
// Not bigger than 127 - char bnode - in portal struct
|
||||
#define MAX_BNODES_PER_ROOM 127
|
||||
|
||||
typedef struct bn_edge {
|
||||
struct bn_edge {
|
||||
int16_t end_room;
|
||||
char end_index;
|
||||
|
||||
@@ -87,18 +87,18 @@ typedef struct bn_edge {
|
||||
int16_t cost;
|
||||
|
||||
float max_rad;
|
||||
} bn_edge;
|
||||
};
|
||||
|
||||
typedef struct bn_node {
|
||||
struct bn_node {
|
||||
vector pos;
|
||||
int num_edges;
|
||||
bn_edge *edges;
|
||||
} bn_node;
|
||||
};
|
||||
|
||||
typedef struct bn_list {
|
||||
struct bn_list {
|
||||
int num_nodes;
|
||||
bn_node *nodes;
|
||||
} bn_list;
|
||||
};
|
||||
|
||||
struct room;
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@ uint8_t Plane_twirl = 0;
|
||||
uint8_t Node_twirl = 0;
|
||||
|
||||
// Selects the best plane to partition with, returning the pointer to polygon to split with
|
||||
bsppolygon *SelectPlane(list **polylist) {
|
||||
bsppolygon *SelectPlane(listnode **polylist) {
|
||||
listnode *outer, *inner;
|
||||
bsppolygon *outerpoly, *innerpoly, *bestpoly;
|
||||
int splits, front, back, planar, result, balance;
|
||||
@@ -528,12 +528,12 @@ bsppolygon *SelectPlane(list **polylist) {
|
||||
}
|
||||
|
||||
// This is the routine that recursively builds the bsptree
|
||||
int BuildBSPNode(bspnode *tree, list **polylist, int numpolys) {
|
||||
int BuildBSPNode(bspnode *tree, listnode **polylist, int numpolys) {
|
||||
bsppolygon *partition_poly;
|
||||
listnode *lnode = *polylist;
|
||||
listnode *next;
|
||||
bspnode *frontnode, *backnode;
|
||||
list *frontlist = NULL, *backlist = NULL;
|
||||
listnode *frontlist = NULL, *backlist = NULL;
|
||||
bspplane partition_plane;
|
||||
int numfront = 0, numback = 0, numsplits = 0;
|
||||
|
||||
|
||||
@@ -57,12 +57,12 @@
|
||||
#define BSP_EMPTY_LEAF 1
|
||||
#define BSP_SOLID_LEAF 2
|
||||
|
||||
typedef struct {
|
||||
struct bspplane {
|
||||
float a, b, c, d;
|
||||
uint8_t used;
|
||||
} bspplane;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct bsppolygon {
|
||||
vector *verts;
|
||||
int nv;
|
||||
bspplane plane;
|
||||
@@ -73,9 +73,9 @@ typedef struct {
|
||||
|
||||
int color;
|
||||
|
||||
} bsppolygon;
|
||||
};
|
||||
|
||||
typedef struct bspnode {
|
||||
struct bspnode {
|
||||
uint8_t type;
|
||||
bspplane plane;
|
||||
uint16_t node_facenum;
|
||||
@@ -85,15 +85,15 @@ typedef struct bspnode {
|
||||
bspnode *front;
|
||||
bspnode *back;
|
||||
|
||||
list *polylist;
|
||||
listnode *polylist;
|
||||
int num_polys;
|
||||
} bspnode;
|
||||
};
|
||||
|
||||
typedef struct bsptree {
|
||||
list *vertlist;
|
||||
list *polylist;
|
||||
struct bsptree {
|
||||
listnode *vertlist;
|
||||
listnode *polylist;
|
||||
bspnode *root;
|
||||
} bsptree;
|
||||
};
|
||||
|
||||
// Builds a bsp tree for the indoor rooms
|
||||
void BuildBSPTree();
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
#include <cstdint>
|
||||
|
||||
// Movie Cinematic
|
||||
typedef struct tCinematic {
|
||||
struct tCinematic {
|
||||
intptr_t mvehandle;
|
||||
int filehandle;
|
||||
chunked_bitmap frame_chunk; // used internally, don't access.
|
||||
} tCinematic;
|
||||
};
|
||||
|
||||
bool InitCinematics();
|
||||
void SetMovieProperties(int x, int y, int w, int h, renderer_type type);
|
||||
|
||||
@@ -213,15 +213,16 @@
|
||||
#define MAX_BUFFET_STRENGTH 0.75f
|
||||
#define BUFFET_PERIOD 0.25f
|
||||
#define COCKPIT_SHIFT_DELTA 0.02f
|
||||
typedef struct tCockpitCfgInfo {
|
||||
struct tCockpitCfgInfo {
|
||||
char modelname[PSFILENAME_LEN + 1];
|
||||
char shieldrings[NUM_SHIELD_GAUGE_FRAMES][PSFILENAME_LEN + 1];
|
||||
char shipimg[PSFILENAME_LEN + 1];
|
||||
char burnimg[PSFILENAME_LEN + 1];
|
||||
char energyimg[PSFILENAME_LEN + 1];
|
||||
char invpulseimg[PSFILENAME_LEN + 1];
|
||||
} tCockpitCfgInfo;
|
||||
typedef struct tCockpitInfo {
|
||||
};
|
||||
|
||||
struct tCockpitInfo {
|
||||
int state; // current state of cockpit on screen.
|
||||
int ship_index; // index into ships page.
|
||||
int model_num; // this should be retreived from the ship info.
|
||||
@@ -239,7 +240,8 @@ typedef struct tCockpitInfo {
|
||||
float buffet_time; // current position in buffet wave along time axis.
|
||||
|
||||
matrix orient; // orientation of cockpit
|
||||
} tCockpitInfo;
|
||||
};
|
||||
|
||||
static tCockpitInfo Cockpit_info;
|
||||
static float KeyframeAnimateCockpit();
|
||||
// loads cockpit. model_name = NULL, then will not load in model name.
|
||||
|
||||
@@ -126,11 +126,11 @@
|
||||
void ConfigForceFeedback(void);
|
||||
|
||||
// General option toggles
|
||||
typedef struct tGameToggles {
|
||||
struct tGameToggles {
|
||||
bool show_reticle;
|
||||
bool guided_mainview;
|
||||
bool ship_noises;
|
||||
} tGameToggles;
|
||||
};
|
||||
|
||||
extern tGameToggles Game_toggles;
|
||||
|
||||
@@ -145,10 +145,10 @@ extern tGameToggles Game_toggles;
|
||||
#define RES_1280X960 5
|
||||
#define RES_1600X1200 6
|
||||
// stored resolution list and desired game resolution
|
||||
typedef struct tVideoResolution {
|
||||
struct tVideoResolution {
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
} tVideoResolution;
|
||||
};
|
||||
|
||||
extern tVideoResolution Video_res_list[];
|
||||
extern int Game_video_resolution;
|
||||
@@ -157,7 +157,7 @@ extern int Game_video_resolution;
|
||||
// KEEP THESE MEMBERS IN THE SAME ORDER, IF YOU ADD,REMOVE, OR CHANGE ANYTHING IN THIS STRUCT, MAKE SURE YOU
|
||||
// UPDATE DetailPresetLow,DetailPresetMed,DetailPresetHigh AND DetailPresetVHi IN CONFIG.CPP
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
typedef struct tDetailSettings {
|
||||
struct tDetailSettings {
|
||||
float Terrain_render_distance; // VisibleTerrainDistance
|
||||
float Pixel_error; // PixelErrorTolerance
|
||||
bool Specular_lighting; // DoSpecularPass
|
||||
@@ -173,7 +173,7 @@ typedef struct tDetailSettings {
|
||||
bool Bumpmapping_enabled;
|
||||
uint8_t Specular_mapping_type;
|
||||
uint8_t Object_complexity; // 0 = low, 1 = medium, 2=high
|
||||
} tDetailSettings;
|
||||
};
|
||||
|
||||
// Call this with one of the above defines to set the detail level to a predefined set (custom level is ignored)
|
||||
void ConfigSetDetailLevel(int level);
|
||||
|
||||
@@ -210,7 +210,7 @@ const int ctfFORWARD_THRUSTAXIS = 0, ctfFORWARD_THRUSTKEY = 1, ctfREVERSE_THRUST
|
||||
ctfAUDIOTAUNT1_BTN = 66, ctfAUDIOTAUNT2_KEY = 67, ctfAUDIOTAUNT2_BTN = 68, ctfAUDIOTAUNT3_KEY = 69,
|
||||
ctfAUDIOTAUNT3_BTN = 70, ctfAUDIOTAUNT4_KEY = 71, ctfAUDIOTAUNT4_BTN = 72;
|
||||
|
||||
typedef struct game_controls {
|
||||
struct game_controls {
|
||||
// movement values
|
||||
// these values are from -1.0 to 1.0.-
|
||||
float pitch_thrust;
|
||||
@@ -237,7 +237,7 @@ typedef struct game_controls {
|
||||
int fire_flare_down_count;
|
||||
int rearview_down_count;
|
||||
bool rearview_down_state;
|
||||
} game_controls;
|
||||
};
|
||||
|
||||
// This value should be set at initialization time. Use for remote controlling.
|
||||
extern char *Controller_ip;
|
||||
|
||||
@@ -112,14 +112,14 @@ $$TABLE_GAMEFILE "credits.omf"
|
||||
#define CLTYPE_END 2
|
||||
#define CLTYPE_BLANK 3
|
||||
|
||||
typedef struct creditline {
|
||||
struct creditline {
|
||||
ddgr_color color;
|
||||
uint8_t type;
|
||||
char *text;
|
||||
creditline *next;
|
||||
uint16_t startx, starty, endx, endy;
|
||||
float displaytime;
|
||||
} creditline;
|
||||
};
|
||||
|
||||
static void Credits_Render(creditline *, float);
|
||||
static creditline Creditlines;
|
||||
|
||||
@@ -1294,12 +1294,13 @@ void key_settings_dialog() {
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// configure controller new way
|
||||
typedef struct t_ctlcfgswitchcb_data {
|
||||
struct t_ctlcfgswitchcb_data {
|
||||
joy_cfg_screen *joycfg;
|
||||
key_cfg_screen *keycfg;
|
||||
wpnsel_cfg_screen *wpncfg;
|
||||
cfg_screen *curcfg;
|
||||
} t_ctlcfgswitchcb_data;
|
||||
};
|
||||
|
||||
// called when we switch menus
|
||||
void CtlConfigSwitchCB(newuiMenu *menu, int16_t old_option_id, int16_t new_option_id, void *data) {
|
||||
t_ctlcfgswitchcb_data *cfgdata = (t_ctlcfgswitchcb_data *)data;
|
||||
|
||||
@@ -59,12 +59,12 @@
|
||||
#define CTLCONFIG_CONTROLLER 1
|
||||
#define CTLCONFIG_WPNSEL 2
|
||||
|
||||
typedef struct t_cfg_element {
|
||||
struct t_cfg_element {
|
||||
int16_t fn_id; // -1 = group start
|
||||
int16_t text; // text string id.
|
||||
int16_t x;
|
||||
int16_t y; // location (for groups only)
|
||||
} t_cfg_element;
|
||||
};
|
||||
|
||||
extern t_cfg_element Cfg_key_elements[];
|
||||
extern t_cfg_element Cfg_joy_elements[];
|
||||
|
||||
@@ -64,10 +64,10 @@ int graph_bmp = -1;
|
||||
int graph_mask = 0;
|
||||
int graph_num_nodes = 0;
|
||||
|
||||
typedef struct {
|
||||
struct tGraphColor {
|
||||
const char *color_name;
|
||||
ddgr_color color;
|
||||
} tGraphColor;
|
||||
};
|
||||
|
||||
tGraphColor GraphColors[MAX_GRAPH_NODES] = {
|
||||
{"Green", GR_RGB(40, 255, 40)}, {"Red", GR_RGB(255, 40, 40)}, {"Blue", GR_RGB(40, 40, 255)},
|
||||
@@ -77,7 +77,7 @@ tGraphColor GraphColors[MAX_GRAPH_NODES] = {
|
||||
{"Dk.Red", GR_RGB(100, 2, 2)}, {"Dk.Green", GR_RGB(2, 100, 9)}, {"Turquoise", GR_RGB(14, 229, 202)},
|
||||
{"Dk.Purple", GR_RGB(100, 4, 104)}};
|
||||
|
||||
typedef struct {
|
||||
struct tAddDebugGraph {
|
||||
uint8_t data_input;
|
||||
int flags;
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef struct {
|
||||
float f_max_value;
|
||||
};
|
||||
|
||||
} tAddDebugGraph;
|
||||
};
|
||||
|
||||
class tGraphNode {
|
||||
public:
|
||||
@@ -118,10 +118,11 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct tDebugGraphNode {
|
||||
struct tDebugGraphNode {
|
||||
tGraphNode *node;
|
||||
tDebugGraphNode *next;
|
||||
} tDebugGraphNode;
|
||||
};
|
||||
|
||||
tDebugGraphNode *DebugGraphNode_root = NULL;
|
||||
|
||||
tGraphNode *DebugGraph_AddNode(void) {
|
||||
|
||||
@@ -818,14 +818,14 @@ void PrintDedicatedMessage(const char *fmt, ...) {
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct dedicated_socket {
|
||||
struct dedicated_socket {
|
||||
SOCKET sock;
|
||||
SOCKADDR_IN addr;
|
||||
char input[255];
|
||||
bool validated;
|
||||
dedicated_socket *prev;
|
||||
dedicated_socket *next;
|
||||
} dedicated_socket;
|
||||
};
|
||||
|
||||
dedicated_socket *Head_sock = NULL;
|
||||
|
||||
|
||||
@@ -803,12 +803,12 @@ const char *GetCDVolume(int cd_num) {
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct file_vols {
|
||||
struct file_vols {
|
||||
char file[_MAX_PATH];
|
||||
char localpath[_MAX_PATH * 2];
|
||||
int volume;
|
||||
bool localized;
|
||||
} file_vols;
|
||||
};
|
||||
|
||||
extern int CD_inserted;
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class grViewport;
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constants and Types
|
||||
|
||||
typedef enum function_mode {
|
||||
enum function_mode {
|
||||
INIT_MODE,
|
||||
GAME_MODE,
|
||||
RESTORE_GAME_MODE,
|
||||
@@ -166,7 +166,7 @@ typedef enum function_mode {
|
||||
LOADDEMO_MODE,
|
||||
GAMEGAUGE_MODE, // Unused
|
||||
CREDITS_MODE
|
||||
} function_mode;
|
||||
};
|
||||
|
||||
extern bool Descent_overrided_intro;
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
// DOOR STRUCTURES
|
||||
|
||||
typedef struct {
|
||||
struct door {
|
||||
char name[PAGENAME_LEN]; // name of the door
|
||||
uint8_t used; // if this door is in use
|
||||
uint8_t flags; // flags for this door
|
||||
@@ -137,7 +137,7 @@ typedef struct {
|
||||
// OSIRIS information
|
||||
char module_name[MAX_MODULENAME_LEN];
|
||||
|
||||
} door;
|
||||
};
|
||||
|
||||
// The max number of predefined doors
|
||||
#define MAX_DOORS 60
|
||||
|
||||
@@ -123,7 +123,7 @@ extern int Num_active_doorways; // number of active doors in game
|
||||
extern int Active_doorways[MAX_ACTIVE_DOORWAYS];
|
||||
|
||||
// A doorway (room) in the mine
|
||||
typedef struct doorway {
|
||||
struct doorway {
|
||||
int doornum; // door type of this doorway
|
||||
uint8_t state; // current state of doorway
|
||||
uint8_t flags; // flags associated with a doorway
|
||||
@@ -132,7 +132,7 @@ typedef struct doorway {
|
||||
float position; // current position of door
|
||||
float dest_pos; // destination position
|
||||
int sound_handle; // handle of last sound played
|
||||
} doorway;
|
||||
};
|
||||
|
||||
// Macros
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
#define NUM_FIREBALLS 52
|
||||
|
||||
typedef struct {
|
||||
struct fireball {
|
||||
char name[PAGENAME_LEN]; // The filename of this animation
|
||||
|
||||
uint8_t type; // type of fireball, see above
|
||||
@@ -185,7 +185,7 @@ typedef struct {
|
||||
float total_life; // How long this animation should last (in seconds)
|
||||
float size; // How big this explosion is
|
||||
int16_t bm_handle; // The handle to the vlip
|
||||
} fireball;
|
||||
};
|
||||
|
||||
extern fireball Fireballs[];
|
||||
|
||||
|
||||
@@ -1119,12 +1119,12 @@ void SetScreenMode(int sm, bool force_res_change) {
|
||||
}
|
||||
|
||||
// These functions are called to start and end a rendering frame
|
||||
typedef struct tFrameStackFrame {
|
||||
struct tFrameStackFrame {
|
||||
int x1, x2, y1, y2;
|
||||
bool clear;
|
||||
tFrameStackFrame *next;
|
||||
tFrameStackFrame *prev;
|
||||
} tFrameStackFrame;
|
||||
};
|
||||
tFrameStackFrame *FrameStackRoot = NULL;
|
||||
tFrameStackFrame *FrameStackPtr = NULL;
|
||||
tFrameStackFrame FrameStack[8];
|
||||
|
||||
@@ -293,7 +293,7 @@ struct tD3XThread;
|
||||
struct tD3XProgram;
|
||||
*/
|
||||
|
||||
typedef struct gamemode {
|
||||
struct gamemode {
|
||||
char scriptname[64];
|
||||
int requested_num_teams;
|
||||
/*
|
||||
@@ -304,14 +304,14 @@ typedef struct gamemode {
|
||||
trigger *trigme;
|
||||
trigger *trigit;
|
||||
*/
|
||||
} gamemode;
|
||||
};
|
||||
|
||||
// Structure for a terrain sound "band"
|
||||
typedef struct {
|
||||
struct terrain_sound_band {
|
||||
int sound_index; // the sound to play
|
||||
uint8_t low_alt, high_alt; // top & bottom of range of sound
|
||||
float low_volume, high_volume; // volume at top & bottom of range
|
||||
} terrain_sound_band;
|
||||
};
|
||||
|
||||
// How many terrain sound bands we have
|
||||
#define NUM_TERRAIN_SOUND_BANDS 5
|
||||
|
||||
@@ -272,7 +272,7 @@ struct {
|
||||
#define CDI_NOT_CANNED 0
|
||||
#define CDI_CANNED 1
|
||||
|
||||
typedef struct {
|
||||
struct tCinematicDemoInfo {
|
||||
uint8_t cinematic_type; // canned/not canned
|
||||
int camera_objhandle; // object handle for camera to use
|
||||
|
||||
@@ -283,7 +283,7 @@ typedef struct {
|
||||
tGameCinematic *cinematic_data; // data to start a regular cinematic
|
||||
};
|
||||
|
||||
} tCinematicDemoInfo;
|
||||
};
|
||||
|
||||
static void Cinematic_WriteDemoFileData(tCinematicDemoInfo *info);
|
||||
static bool Cinematic_StartCine(tGameCinematic *info, const char *text_string, int camera_objhandle);
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
#define CANNED_MOVE_PLAYER_FADE 4 // fade the screen out and move the player to a new position
|
||||
#define CANNED_LEVEL_END_FADE_WHITE 5 // fade the screen to white and end level
|
||||
|
||||
typedef struct {
|
||||
struct tCannedCinematicInfo {
|
||||
int32_t type;
|
||||
/*
|
||||
CANNED_LEVEL_INTRO:
|
||||
@@ -147,7 +147,7 @@ typedef struct {
|
||||
vector pos;
|
||||
matrix orient;
|
||||
|
||||
} tCannedCinematicInfo;
|
||||
};
|
||||
|
||||
//========================================================
|
||||
|
||||
@@ -191,11 +191,11 @@ typedef struct {
|
||||
#define GCTT_FADEINOUT 3
|
||||
#define GCTT_FADEWHITE 4
|
||||
|
||||
typedef struct {
|
||||
struct PercentageRange {
|
||||
float min, max; // 0.0f->1.0f
|
||||
} PercentageRange;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tGameCinematic {
|
||||
uint32_t flags;
|
||||
|
||||
int32_t target_objhandle;
|
||||
@@ -222,6 +222,6 @@ typedef struct {
|
||||
PercentageRange in_camera_view; // range that the view is from the camera
|
||||
PercentageRange quick_exit; // range where a key-press will quick exit cinematic
|
||||
|
||||
} tGameCinematic;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#define D3X_TIMED_EVENT 256
|
||||
|
||||
typedef struct game_event {
|
||||
struct game_event {
|
||||
int type;
|
||||
int id;
|
||||
int objhandle_detonator; // watch this object, if it dies/gets killed than cancel this game event
|
||||
@@ -50,7 +50,7 @@ typedef struct game_event {
|
||||
void *data;
|
||||
|
||||
void (*subfunction)(int, void *);
|
||||
} game_event;
|
||||
};
|
||||
|
||||
// Adds and event to the list. The event will trigger at Gametime+length
|
||||
int CreateNewEvent(int type, int id, float length, void *data, int size, void (*subfunction)(int eventnum, void *data),
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
#define MAX_GAMEFILES 1500
|
||||
|
||||
typedef struct {
|
||||
struct gamefile {
|
||||
char name[PAGENAME_LEN];
|
||||
char dir_name[PAGENAME_LEN];
|
||||
uint8_t used;
|
||||
} gamefile;
|
||||
};
|
||||
|
||||
extern int Num_gamefiles;
|
||||
extern gamefile Gamefiles[MAX_GAMEFILES];
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
#define MAX_GAME_PATHS 300
|
||||
#define MAX_NODES_PER_PATH 100
|
||||
|
||||
typedef struct {
|
||||
struct node {
|
||||
vector pos; // where this node is in the world
|
||||
int roomnum; // what room?
|
||||
int flags; // if this point lives over the terrain, etc
|
||||
vector fvec;
|
||||
vector uvec;
|
||||
} node;
|
||||
};
|
||||
|
||||
class game_path {
|
||||
public:
|
||||
|
||||
@@ -502,10 +502,10 @@ void SaveGameDialog() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct tLoadGameDialogData {
|
||||
struct tLoadGameDialogData {
|
||||
int cur_slot;
|
||||
chunked_bitmap chunk;
|
||||
} tLoadGameDialogData;
|
||||
};
|
||||
|
||||
#if defined(LINUX)
|
||||
void LoadGameDialogCB(newuiTiledWindow *wnd, void *data)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
#define GAMESAVE_SLOTS 8 // maximum number of savegames
|
||||
#define GAMESAVE_DESCLEN 31 // gamesave description maximum length.
|
||||
|
||||
typedef struct gs_tables {
|
||||
struct gs_tables {
|
||||
int16_t model_handles[MAX_POLY_MODELS];
|
||||
int16_t obji_indices[MAX_OBJECT_IDS];
|
||||
int16_t bm_handles[MAX_BITMAPS];
|
||||
@@ -109,7 +109,7 @@ typedef struct gs_tables {
|
||||
int16_t door_handles[MAX_DOORS];
|
||||
int16_t ship_handles[MAX_SHIPS];
|
||||
int16_t wpn_handles[MAX_WEAPONS];
|
||||
} gs_tables;
|
||||
};
|
||||
|
||||
// savegame version info.
|
||||
// this should be handled like level file version, as to prevent invalidating old savegames
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
// gamesequencer states:
|
||||
// game states
|
||||
|
||||
typedef enum tGameState {
|
||||
enum tGameState {
|
||||
GAMESTATE_IDLE, // no state
|
||||
GAMESTATE_NEW, // starts a new game (with current mission.)
|
||||
GAMESTATE_LVLNEXT, // go to the next level
|
||||
@@ -123,7 +123,7 @@ typedef enum tGameState {
|
||||
GAMESTATE_LVLFAILED, // a level was unsuccessfully ended
|
||||
GAMESTATE_LVLWARP, // warp to a new level
|
||||
GAMESTATE_LOADDEMO, // Load whatever demo was chosen in the UI
|
||||
} tGameState;
|
||||
};
|
||||
|
||||
// top level interfaces for game.
|
||||
#define GAME_INTERFACE 0
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
#define PROC_MEMORY_TYPE_FIRE 1
|
||||
#define PROC_MEMORY_TYPE_WATER 2
|
||||
|
||||
typedef struct {
|
||||
struct static_proc_element {
|
||||
uint8_t type;
|
||||
|
||||
uint8_t frequency;
|
||||
@@ -257,9 +257,9 @@ typedef struct {
|
||||
|
||||
uint8_t x1, y1, x2, y2;
|
||||
|
||||
} static_proc_element;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct proc_struct {
|
||||
int16_t dynamic_proc_elements; // list of dynamic procedural texture elements
|
||||
void *proc1; // pointer for procedural page
|
||||
void *proc2; // back page of procedural
|
||||
@@ -281,9 +281,9 @@ typedef struct {
|
||||
uint8_t osc_value;
|
||||
|
||||
int last_procedural_frame; // last frame a procedural was calculated for this texture
|
||||
} proc_struct;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct texture {
|
||||
char name[PAGENAME_LEN]; // this textures name
|
||||
int flags; // values defined above
|
||||
int bm_handle; // handle which shows what this texture looks like
|
||||
@@ -306,7 +306,7 @@ typedef struct {
|
||||
uint8_t corona_type; // what type of corona this thing uses
|
||||
uint8_t used; // is this texture free to be allocated?
|
||||
|
||||
} texture;
|
||||
};
|
||||
|
||||
extern texture GameTextures[MAX_TEXTURES];
|
||||
extern int Num_textures;
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct tGauge {
|
||||
struct tGauge {
|
||||
poly_model *cockpit; // cockpit model of gauge
|
||||
bsp_info *monitor; // monitor in cockpit.
|
||||
int first_vert;
|
||||
@@ -217,7 +217,7 @@ typedef struct tGauge {
|
||||
float f;
|
||||
} data;
|
||||
g3Point pts[4]; // points of monitor in view coordinates. (may be cached from last frame)
|
||||
} tGauge;
|
||||
};
|
||||
|
||||
// which monitors correspond to what faces on the cockpit model.
|
||||
#define PRIMARY_MONITOR SOF_MONITOR1
|
||||
|
||||
@@ -62,25 +62,25 @@
|
||||
#define TELCOM_MAX_ALPHA 130
|
||||
|
||||
// structure for a hotspot scanline
|
||||
typedef struct scanline {
|
||||
struct scanline {
|
||||
int start, end;
|
||||
} scanline;
|
||||
};
|
||||
|
||||
// structure for 1 hotspot
|
||||
typedef struct hotspot {
|
||||
struct hotspot {
|
||||
int starting_y;
|
||||
int scanlines;
|
||||
scanline *x;
|
||||
} hotspot;
|
||||
};
|
||||
|
||||
// structure for all hotspots
|
||||
typedef struct hotspotmap_t {
|
||||
struct hotspotmap_t {
|
||||
char num_of_hotspots;
|
||||
hotspot *hs;
|
||||
} hotspotmap_t;
|
||||
};
|
||||
|
||||
// structure for 1 window
|
||||
typedef struct window_box {
|
||||
struct window_box {
|
||||
int x, y; // leftmost x, topmost y
|
||||
int width, height;
|
||||
|
||||
@@ -88,13 +88,13 @@ typedef struct window_box {
|
||||
bool on_left, on_top; // used for creating window
|
||||
char *lt, *rt, *lb, *rb; // used for holding the transparent information of the corners
|
||||
int lt_bmp, rt_bmp, lb_bmp, rb_bmp;
|
||||
} window_box;
|
||||
};
|
||||
|
||||
// structure for all the windows
|
||||
typedef struct windowmap_t {
|
||||
struct windowmap_t {
|
||||
int num_of_windows;
|
||||
window_box *wm;
|
||||
} windowmap_t;
|
||||
};
|
||||
|
||||
// Loads a tga or ogf file into a bitmap...returns handle to bm or -1 on error, and fills in the alphamap
|
||||
int menutga_alloc_file(const char *name, char *hsmap[], int *w, int *h);
|
||||
|
||||
@@ -295,13 +295,13 @@ struct CFILE;
|
||||
#define STAT_GRAPHICAL 0x8000
|
||||
|
||||
// hud modes
|
||||
typedef enum tHUDMode {
|
||||
enum tHUDMode {
|
||||
|
||||
HUD_FULLSCREEN,
|
||||
HUD_LETTERBOX,
|
||||
HUD_COCKPIT,
|
||||
HUD_OBSERVER
|
||||
} tHUDMode;
|
||||
};
|
||||
|
||||
#define MAX_HUD_ITEMS 32
|
||||
#define HUD_COLOR GR_RGB(0, 255, 0)
|
||||
@@ -452,7 +452,7 @@ const char *GetMessageDestination(const char *message, int *destination);
|
||||
|
||||
#define HUD_INVALID_ID 255 // hud invalid id constant.
|
||||
|
||||
typedef struct t_dirty_rect {
|
||||
struct t_dirty_rect {
|
||||
struct {
|
||||
int16_t l, t, r, b;
|
||||
} r[3]; // three rectangles for each frame buffer (3 max)
|
||||
@@ -465,9 +465,9 @@ typedef struct t_dirty_rect {
|
||||
};
|
||||
void reset();
|
||||
void fill(ddgr_color col);
|
||||
} tDirtyRect; // dirty rectangle for hud item (small hud version)
|
||||
}; // dirty rectangle for hud item (small hud version)
|
||||
|
||||
typedef struct tHUDItem {
|
||||
struct tHUDItem {
|
||||
int16_t x, y;
|
||||
int16_t xa, ya; // auxillary points
|
||||
int16_t xb, yb;
|
||||
@@ -498,8 +498,8 @@ typedef struct tHUDItem {
|
||||
char *text; // custom text.
|
||||
} data;
|
||||
|
||||
tDirtyRect dirty_rect; // used in small version of hud to clear only 'dirty' area
|
||||
} tHUDItem;
|
||||
t_dirty_rect dirty_rect; // used in small version of hud to clear only 'dirty' area
|
||||
};
|
||||
|
||||
// hud resources
|
||||
struct sHUDResources {
|
||||
|
||||
@@ -366,14 +366,14 @@
|
||||
char HudInputMessage[MAX_HUD_INPUT_LEN];
|
||||
int Doing_input_message = HUD_MESSAGE_NONE;
|
||||
int HudInputMessageLen = 0;
|
||||
static tDirtyRect HUD_inmsg_dirty_rect;
|
||||
static t_dirty_rect HUD_inmsg_dirty_rect;
|
||||
|
||||
static char HUD_messages[MAX_HUD_MESSAGES][HUD_MESSAGE_LENGTH];
|
||||
static int HUD_message_type[MAX_HUD_MESSAGES];
|
||||
static ddgr_color HUD_message_color[MAX_HUD_MESSAGES];
|
||||
int Num_hud_messages = 0;
|
||||
static int Hud_scroll_offset = 0;
|
||||
static tDirtyRect HUD_msg_dirty_rect;
|
||||
static t_dirty_rect HUD_msg_dirty_rect;
|
||||
|
||||
static float Hud_timer = 0.0f;
|
||||
|
||||
@@ -384,7 +384,7 @@ static int Hud_persistent_msg_current_len;
|
||||
static float Hud_persistent_msg_char_timer;
|
||||
static float Hud_persistent_msg_id2 = HUD_INVALID_ID;
|
||||
static int Hud_persistent_msg_sound_handle = SOUND_NONE_INDEX;
|
||||
static tDirtyRect HUD_persist_dirty_rect[2];
|
||||
static t_dirty_rect HUD_persist_dirty_rect[2];
|
||||
|
||||
tHUDItem *GetHUDItem(int id);
|
||||
|
||||
@@ -1291,14 +1291,14 @@ void ResetHUDMessages() {
|
||||
ResetHUDLevelItems();
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
struct phud_message {
|
||||
char message[HUD_MESSAGE_LENGTH * 2];
|
||||
ddgr_color color;
|
||||
int x, y;
|
||||
float time;
|
||||
int flags;
|
||||
int sound_index;
|
||||
} phud_message;
|
||||
};
|
||||
|
||||
#define PHUD_QUEUE_SIZE 3
|
||||
|
||||
|
||||
@@ -1407,9 +1407,9 @@ void LoadGameSettings() {
|
||||
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
struct tTempFileInfo {
|
||||
const char *wildcard;
|
||||
} tTempFileInfo;
|
||||
};
|
||||
static const tTempFileInfo temp_file_wildcards[] = {{"d3s*.tmp"}, {"d3m*.tmp"}, {"d3o*.tmp"},
|
||||
{"d3c*.tmp"}, {"d3t*.tmp"}, {"d3i*.tmp"}};
|
||||
static const int num_temp_file_wildcards = sizeof(temp_file_wildcards) / sizeof(tTempFileInfo);
|
||||
|
||||
@@ -57,10 +57,10 @@
|
||||
int DYNAMIC_LIGHTMAP_MEMORY = 1000000;
|
||||
#define MAX_DYNAMIC_LIGHTMAPS 2000
|
||||
|
||||
typedef struct {
|
||||
struct volume_object {
|
||||
int objnum;
|
||||
int handle;
|
||||
} volume_object;
|
||||
};
|
||||
|
||||
float Specular_tables[3][MAX_SPECULAR_INCREMENTS];
|
||||
|
||||
|
||||
@@ -39,19 +39,19 @@
|
||||
|
||||
extern float Specular_tables[3][MAX_SPECULAR_INCREMENTS];
|
||||
|
||||
typedef struct {
|
||||
struct dynamic_lightmap {
|
||||
uint16_t *mem_ptr;
|
||||
uint8_t used;
|
||||
} dynamic_lightmap;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct dynamic_face {
|
||||
uint16_t lmi_handle;
|
||||
} dynamic_face;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct dynamic_cell {
|
||||
uint16_t cellnum;
|
||||
uint8_t r, g, b;
|
||||
} dynamic_cell;
|
||||
};
|
||||
|
||||
// Sets up our dynamic lighting maps
|
||||
void InitDynamicLighting();
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#define LMI_EXTERNAL_ROOM 5
|
||||
#define LMI_EXTERNAL_ROOM_OBJECT 6
|
||||
|
||||
typedef struct {
|
||||
struct lightmap_info {
|
||||
uint8_t xspacing, yspacing;
|
||||
uint16_t lm_handle;
|
||||
vector upper_left, normal;
|
||||
@@ -65,7 +65,7 @@ typedef struct {
|
||||
int16_t spec_map;
|
||||
|
||||
uint8_t type; // see LMI_types above
|
||||
} lightmap_info;
|
||||
};
|
||||
|
||||
extern lightmap_info *LightmapInfo;
|
||||
extern int Num_of_lightmap_info;
|
||||
|
||||
@@ -40,7 +40,7 @@ listnode *NewListNode(void) {
|
||||
|
||||
// Adds an item to a list
|
||||
// Returns 1 if everything is ok, else 0
|
||||
int AddListItem(list **listp, void *item) {
|
||||
int AddListItem(listnode **listp, void *item) {
|
||||
listnode *newnode, *curr;
|
||||
|
||||
newnode = NewListNode();
|
||||
@@ -75,7 +75,7 @@ int AddListItem(list **listp, void *item) {
|
||||
}
|
||||
|
||||
// Removes an item from a list
|
||||
int RemoveListItem(list **listp, void *item) {
|
||||
int RemoveListItem(listnode **listp, void *item) {
|
||||
listnode *curr, *node;
|
||||
int inlist = 0;
|
||||
|
||||
@@ -111,7 +111,7 @@ int RemoveListItem(list **listp, void *item) {
|
||||
|
||||
// Destroys all the nodes in a list
|
||||
// The items must be freed in another routine
|
||||
void DestroyList(list **listp) {
|
||||
void DestroyList(listnode **listp) {
|
||||
listnode *node, *next;
|
||||
|
||||
for (node = *listp; node != NULL; node = next) {
|
||||
@@ -121,7 +121,7 @@ void DestroyList(list **listp) {
|
||||
}
|
||||
|
||||
// Returns the number of items in a list
|
||||
int CountListItems(list **listp) {
|
||||
int CountListItems(listnode **listp) {
|
||||
listnode *node;
|
||||
int count = 0;
|
||||
|
||||
@@ -133,7 +133,7 @@ int CountListItems(list **listp) {
|
||||
|
||||
// returns a pointer the given item index in a list
|
||||
// Returns NULL if point not found
|
||||
void *GetListItem(list **listp, int index) {
|
||||
void *GetListItem(listnode **listp, int index) {
|
||||
listnode *node;
|
||||
|
||||
for (node = *listp; node != NULL; node = node->next) {
|
||||
@@ -146,7 +146,7 @@ void *GetListItem(list **listp, int index) {
|
||||
|
||||
// Returns how far from the head of the list a given item is
|
||||
// Returns -1 if not found
|
||||
int GetListItemIndex(list **listp, void *item) {
|
||||
int GetListItemIndex(listnode **listp, void *item) {
|
||||
listnode *node;
|
||||
int index = 0;
|
||||
|
||||
|
||||
@@ -22,34 +22,34 @@
|
||||
#include "pstypes.h"
|
||||
#include "pserror.h"
|
||||
|
||||
typedef struct listnode {
|
||||
struct listnode {
|
||||
void *data;
|
||||
struct listnode *next;
|
||||
struct listnode *prev;
|
||||
} listnode, list;
|
||||
};// listnode, list;
|
||||
|
||||
// Allocates space for a new list node
|
||||
listnode *NewListNode(void);
|
||||
|
||||
// Adds an item to a list
|
||||
int AddListItem(list **listp, void *item);
|
||||
int AddListItem(listnode **listp, void *item);
|
||||
|
||||
// Removes an item from a list
|
||||
int RemoveListItem(list **listp, void *item);
|
||||
int RemoveListItem(listnode **listp, void *item);
|
||||
|
||||
// Destroys all the nodes in a list
|
||||
// The items must be freed in another routine
|
||||
void DestroyList(list **listp);
|
||||
void DestroyList(listnode **listp);
|
||||
|
||||
// Returns the number of items in a list
|
||||
int CountListItems(list **listp);
|
||||
int CountListItems(listnode **listp);
|
||||
|
||||
// returns a pointer the given item index in a list
|
||||
// Returns NULL if point not found
|
||||
void *GetListItem(list **listp, int index);
|
||||
void *GetListItem(listnode **listp, int index);
|
||||
|
||||
// Returns how far from the head of the list a given item is
|
||||
// Returns -1 if not found
|
||||
int GetListItemIndex(list **listp, void *item);
|
||||
int GetListItemIndex(listnode **listp, void *item);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,11 +52,11 @@ char *__orig_pwd = NULL;
|
||||
|
||||
bool linux_permit_gamma = false;
|
||||
|
||||
typedef struct {
|
||||
struct cmdLineArg {
|
||||
const char *lng;
|
||||
char sht;
|
||||
const char *comment;
|
||||
} cmdLineArg;
|
||||
};
|
||||
|
||||
static cmdLineArg d3ArgTable[] = {
|
||||
#ifdef __PERMIT_LINUX_GLIDE
|
||||
|
||||
@@ -660,15 +660,15 @@ int LGSTriggers(CFILE *fp) {
|
||||
return LGS_OK;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
struct old_vis_attach_info {
|
||||
int obj_handle, dest_objhandle;
|
||||
uint8_t subnum, subnum2;
|
||||
|
||||
uint16_t modelnum;
|
||||
uint16_t vertnum, end_vertnum;
|
||||
} old_vis_attach_info;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct old_vis_effect {
|
||||
uint8_t type;
|
||||
uint8_t id;
|
||||
|
||||
@@ -696,7 +696,7 @@ typedef struct {
|
||||
|
||||
int16_t next;
|
||||
int16_t prev;
|
||||
} old_vis_effect;
|
||||
};
|
||||
|
||||
void CopyVisStruct(vis_effect *vis, old_vis_effect *old_vis) {
|
||||
// Copy fields over
|
||||
|
||||
@@ -96,10 +96,10 @@
|
||||
#include "mem.h"
|
||||
#include "ddio.h"
|
||||
|
||||
typedef struct {
|
||||
struct tLangTag {
|
||||
const char *tag;
|
||||
int length;
|
||||
} tLangTag;
|
||||
};
|
||||
|
||||
tLangTag Language_tags[] = {
|
||||
{"!=!", -1}, // English
|
||||
|
||||
@@ -69,10 +69,10 @@ void DestroyStringTable(char **table, int size);
|
||||
|
||||
// GrowString class
|
||||
// handles a string of increasing size (using +,=,+=)
|
||||
typedef struct tbufferinfo {
|
||||
struct tbufferinfo {
|
||||
char *string_data;
|
||||
tbufferinfo *next;
|
||||
} tbufferinfo;
|
||||
};
|
||||
|
||||
class GrowString {
|
||||
public:
|
||||
|
||||
@@ -68,15 +68,15 @@
|
||||
|
||||
#define MAX_MENU_TYPES 5
|
||||
|
||||
typedef enum {
|
||||
enum menu_type {
|
||||
MENU_TYPE_BUTTON,
|
||||
MENU_TYPE_TEXT,
|
||||
MENU_TYPE_RADIOBUTTON,
|
||||
MENU_TYPE_CHECKBOX,
|
||||
MENU_TYPE_TEXTBOX
|
||||
} menu_type;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct menu_item {
|
||||
menu_type mtype;
|
||||
char name[MENU_STRING_LEN];
|
||||
|
||||
@@ -89,14 +89,14 @@ typedef struct {
|
||||
|
||||
ddgr_color normal_color, selected_color;
|
||||
|
||||
} menu_item;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct menu {
|
||||
int num_items;
|
||||
|
||||
menu_item items[MAX_MENU_ITEMS];
|
||||
uint8_t used;
|
||||
} menu;
|
||||
};
|
||||
|
||||
// returns whether we decided to quit the game or not
|
||||
// this displays the main menu options and runs the menu system
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
|
||||
extern int Got_url;
|
||||
|
||||
typedef struct {
|
||||
struct msn_urls {
|
||||
char msnname[_MAX_PATH];
|
||||
char URL[MAX_MISSION_URL_COUNT][MAX_MISSION_URL_LEN];
|
||||
// Possibly some quality of service flags
|
||||
} msn_urls;
|
||||
};
|
||||
|
||||
// Function prototypes
|
||||
void msn_DoAskForURL(uint8_t *indata, network_address *net_addr);
|
||||
|
||||
@@ -93,12 +93,12 @@
|
||||
#define OPTIONS_MUSIC_REGION 2
|
||||
#define MULTI_MUSIC_REGION 3
|
||||
// mmItem FX list.
|
||||
typedef enum tmmItemFX {
|
||||
enum tmmItemFX {
|
||||
mmItemFXNull,
|
||||
mmItemFXNormal, // displays item with normal alpha, color, saturation.
|
||||
mmItemFXFadeInToBright,
|
||||
mmItemFXFadeOutToNormal // fade in and out to and from brighten
|
||||
} tmmItemFX;
|
||||
};
|
||||
|
||||
void MenuScene(); // display menu scene
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -659,14 +659,14 @@ extern bool Multi_bail_ui_menu;
|
||||
#define PFP_NO_FIRED 0 // the player didn't fire at all this frame
|
||||
#define PFP_FIRED 1 // the player fired this frame and the info should be packed in a player pos flag
|
||||
#define PFP_FIRED_RELIABLE 2 // used for secondaries of a non-peer to peer game
|
||||
typedef struct {
|
||||
struct player_fire_packet {
|
||||
uint8_t fired_on_this_frame;
|
||||
uint8_t wb_index;
|
||||
uint8_t fire_mask;
|
||||
uint8_t damage_scalar;
|
||||
uint8_t reliable;
|
||||
int dest_roomnum;
|
||||
} player_fire_packet;
|
||||
};
|
||||
|
||||
extern netgame_info Netgame;
|
||||
|
||||
@@ -697,9 +697,9 @@ extern uint16_t Server_spew_list[];
|
||||
#define NETFILE_ID_LAST_FILE NETFILE_ID_VOICE_TAUNT4
|
||||
|
||||
// A semi-compressed orientation matrix for multiplayer games
|
||||
typedef struct {
|
||||
struct multi_orientation {
|
||||
int16_t multi_matrix[9];
|
||||
} multi_orientation;
|
||||
};
|
||||
|
||||
static inline void MultiMatrixMakeEndianFriendly(multi_orientation *mmat) {
|
||||
for (int i = 0; i < 9; i++) {
|
||||
@@ -720,18 +720,18 @@ extern player_fire_packet Player_fire_packet[MAX_NET_PLAYERS];
|
||||
#define MULTI_SEND_MESSAGE_GREEN_TEAM -4
|
||||
#define MULTI_SEND_MESSAGE_YELLOW_TEAM -5
|
||||
|
||||
typedef struct {
|
||||
struct powerup_respawn {
|
||||
vector pos;
|
||||
int objnum;
|
||||
int roomnum;
|
||||
uint8_t used;
|
||||
int16_t original_id;
|
||||
} powerup_respawn;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct powerup_timer {
|
||||
int id;
|
||||
float respawn_time;
|
||||
} powerup_timer;
|
||||
};
|
||||
|
||||
extern powerup_timer Powerup_timer[];
|
||||
extern powerup_respawn Powerup_respawn[];
|
||||
@@ -799,7 +799,7 @@ extern uint16_t Turrett_position_counter[MAX_OBJECTS];
|
||||
#pragma pack(push, pxo)
|
||||
#endif
|
||||
#pragma pack(1) // Single byte alignment!
|
||||
typedef struct vmt_descent3_struct {
|
||||
struct vmt_descent3_struct {
|
||||
char tracker_id[TRACKER_ID_LEN];
|
||||
char pilot_name[PILOT_NAME_LEN];
|
||||
int rank;
|
||||
@@ -816,7 +816,7 @@ typedef struct vmt_descent3_struct {
|
||||
uint32_t sliding_pct; // Percentage of the time you were sliding
|
||||
uint32_t checksum; // This value needs to be equal to whatever the checksum is once the packet is decoded
|
||||
uint32_t pad; // just to provide room for out 4 byte encryption boundry only needed on the client side for now
|
||||
} vmt_descent3_struct;
|
||||
};
|
||||
#define DESCENT3_BLOCK_SIZE (sizeof(vmt_descent3_struct) - 4)
|
||||
#if defined(WIN32)
|
||||
#pragma pack(pop, pxo)
|
||||
|
||||
@@ -26,11 +26,11 @@ void MultiStartClient(char *scriptname);
|
||||
|
||||
#define MAX_SAVED_MOVES 100
|
||||
|
||||
typedef struct {
|
||||
struct saved_move {
|
||||
float timestamp;
|
||||
vector thrust, rotthrust;
|
||||
|
||||
} saved_move;
|
||||
};
|
||||
|
||||
extern saved_move SavedMoves[];
|
||||
extern int Current_saved_move;
|
||||
|
||||
@@ -999,16 +999,16 @@ void GetUIItemPosition(UIObject *item, int *x, int *y, int *w, int *h) {
|
||||
#define CDT_EVT_SET_SCORE_IP 9
|
||||
#define CDT_EVT_SET_GAMEID 10
|
||||
#define CALLSIGN_LEN 19
|
||||
typedef struct player_killed {
|
||||
struct player_killed {
|
||||
char killer_name[CALLSIGN_LEN + 1];
|
||||
char killed_name[CALLSIGN_LEN + 1];
|
||||
} player_killed;
|
||||
typedef struct player_score_matrix {
|
||||
};
|
||||
struct player_score_matrix {
|
||||
int num_players;
|
||||
char name[MAX_NET_PLAYERS][CALLSIGN_LEN + 1];
|
||||
int16_t deaths[MAX_NET_PLAYERS];
|
||||
int16_t kills[MAX_NET_PLAYERS];
|
||||
} player_score_matrix;
|
||||
};
|
||||
// The chokepoint function to call the dll function
|
||||
void CallMultiScoreDLL(int eventnum, void *data) {
|
||||
if (MultiDLLHandle.handle && DLLMultiCall)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
#define MT_AUTO_LOGIN 6
|
||||
#define MT_AUTO_START 7 // A dedicated server is starting this DLL
|
||||
|
||||
typedef struct {
|
||||
struct multi_api {
|
||||
int *objs;
|
||||
int *rooms;
|
||||
int *terrain;
|
||||
@@ -103,7 +103,7 @@ typedef struct {
|
||||
int *ships;
|
||||
int *fp[200]; // function pointers
|
||||
int *vp[200]; // variable pointers
|
||||
} multi_api;
|
||||
};
|
||||
|
||||
#define MAX_AUTO_LOGIN_STUFF_LEN 50
|
||||
extern char Auto_login_name[MAX_AUTO_LOGIN_STUFF_LEN];
|
||||
|
||||
@@ -170,7 +170,7 @@ typedef int HANDLE;
|
||||
#define NPF_MT_HAS_PILOT_DATA 32 // We got data from the mastertracker
|
||||
#define NPF_WROTE_RANK 64 // We told the clients about this clients rank
|
||||
|
||||
typedef struct {
|
||||
struct netplayer {
|
||||
network_address addr;
|
||||
int flags;
|
||||
SOCKET reliable_socket;
|
||||
@@ -201,11 +201,11 @@ typedef struct {
|
||||
uint16_t pilot_pic_id;
|
||||
float percent_loss;
|
||||
uint8_t digest[16];
|
||||
} netplayer;
|
||||
};
|
||||
|
||||
#define MISSION_NAME_LEN 50
|
||||
|
||||
typedef struct {
|
||||
struct network_game {
|
||||
network_address addr;
|
||||
char name[NETGAME_NAME_LEN];
|
||||
char mission[MSN_NAMELEN];
|
||||
@@ -220,7 +220,7 @@ typedef struct {
|
||||
bool dedicated_server;
|
||||
uint8_t difficulty; // Game difficulty level
|
||||
uint32_t handle;
|
||||
} network_game;
|
||||
};
|
||||
|
||||
// netgame flags
|
||||
#define NF_TIMER 0x01 // This level will end when the timer runs out
|
||||
@@ -243,7 +243,7 @@ typedef struct {
|
||||
#define NF_TRACK_RANK 0x20000 // Track rankings for PXO
|
||||
#define NF_COOP 0x40000 // This game is a cooperative game
|
||||
|
||||
typedef struct {
|
||||
struct netgame_info {
|
||||
uint16_t server_version; // This is so client and server code matches
|
||||
char name[NETGAME_NAME_LEN];
|
||||
char mission[MSN_NAMELEN];
|
||||
@@ -264,7 +264,7 @@ typedef struct {
|
||||
int max_players;
|
||||
uint8_t difficulty; // Game difficulty level
|
||||
u_char digest[16];
|
||||
} netgame_info;
|
||||
};
|
||||
|
||||
// Inline functions for extracting/packing multiplayer data
|
||||
inline void MultiAddUbyte(uint8_t element, uint8_t *data, int *count) {
|
||||
|
||||
@@ -292,11 +292,11 @@ void GetCenteredTextPos(int width, int gap, int left_item_width, int middle_item
|
||||
#define NEWUIBMP_BTN_HILITE_R 35
|
||||
|
||||
// Large Bitmap system
|
||||
typedef struct tLargeBitmap {
|
||||
struct tLargeBitmap {
|
||||
int bmps_w;
|
||||
int bmps_h;
|
||||
int *bm_array;
|
||||
} tLargeBitmap;
|
||||
};
|
||||
|
||||
// alpha for all NewUIWindows.
|
||||
extern uint8_t NewUIWindow_alpha;
|
||||
|
||||
@@ -820,9 +820,9 @@ void ObjUnGhostObject(int objnum);
|
||||
/////////////////////////////////
|
||||
#define MAX_OBJECT_POS_HISTORY (MAX_OBJECTS / 2)
|
||||
#define MAX_POSITION_HISTORY 3
|
||||
typedef struct {
|
||||
struct tPosHistory {
|
||||
vector pos[MAX_POSITION_HISTORY];
|
||||
} tPosHistory;
|
||||
};
|
||||
extern tPosHistory Object_position_samples[MAX_OBJECT_POS_HISTORY];
|
||||
extern uint8_t Object_position_head;
|
||||
extern int16_t Object_map_position_history[MAX_OBJECTS];
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
*/
|
||||
|
||||
// lighting info
|
||||
typedef struct {
|
||||
struct light_info {
|
||||
int32_t flags; // see above
|
||||
float light_distance;
|
||||
float red_light1, green_light1, blue_light1;
|
||||
@@ -145,9 +145,9 @@ typedef struct {
|
||||
int32_t timebits;
|
||||
uint8_t angle;
|
||||
uint8_t lighting_render_type;
|
||||
} light_info;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct effect_info_s {
|
||||
int32_t type_flags; // see EF_FLAGS above
|
||||
|
||||
float alpha; // alpha value
|
||||
@@ -201,10 +201,10 @@ typedef struct {
|
||||
float spark_timer; // how long until next spark
|
||||
float spark_time_left; // how long until sparking stops
|
||||
|
||||
} effect_info_s;
|
||||
};
|
||||
|
||||
// Describes the next animation state for a robot
|
||||
typedef struct custom_anim {
|
||||
struct custom_anim {
|
||||
float server_time;
|
||||
uint16_t server_anim_frame;
|
||||
|
||||
@@ -216,19 +216,19 @@ typedef struct custom_anim {
|
||||
int16_t anim_sound_index;
|
||||
uint8_t flags;
|
||||
int8_t next_anim_type;
|
||||
} custom_anim;
|
||||
};
|
||||
|
||||
typedef struct multi_turret {
|
||||
struct multi_turret {
|
||||
float time;
|
||||
float last_time;
|
||||
uint8_t num_turrets;
|
||||
float *last_keyframes;
|
||||
float *keyframes;
|
||||
uint8_t flags;
|
||||
} multi_turret;
|
||||
};
|
||||
|
||||
// Information specific to objects that render as a polygon model
|
||||
typedef struct polyobj_info {
|
||||
struct polyobj_info {
|
||||
int16_t model_num; // Which polygon model this object is
|
||||
int16_t dying_model_num; // The dying model for this object
|
||||
|
||||
@@ -247,40 +247,40 @@ typedef struct polyobj_info {
|
||||
|
||||
uint32_t subobj_flags; // Mask of which subobjects to draw
|
||||
int32_t tmap_override; // If this is not -1, map all faces to this
|
||||
} polyobj_info;
|
||||
};
|
||||
|
||||
// A shard of, presumably, glass
|
||||
typedef struct shard_info_s {
|
||||
struct shard_info_s {
|
||||
vector points[3];
|
||||
float u[3], v[3];
|
||||
vector normal;
|
||||
int16_t tmap;
|
||||
} shard_info_s;
|
||||
};
|
||||
|
||||
typedef struct line_info_s {
|
||||
struct line_info_s {
|
||||
vector end_pos; // start pos is the object's .pos field
|
||||
} line_info_s;
|
||||
};
|
||||
|
||||
typedef struct blast_info_s {
|
||||
struct blast_info_s {
|
||||
float max_size;
|
||||
int32_t bm_handle;
|
||||
} blast_info_s;
|
||||
};
|
||||
|
||||
typedef struct dying_info_s {
|
||||
struct dying_info_s {
|
||||
int32_t death_flags; // Info about the death
|
||||
float delay_time; // How long until object dies
|
||||
int32_t killer_playernum; // The player who wille this object, or -1 if not a player
|
||||
float last_spark_time;
|
||||
float last_fireball_time;
|
||||
float last_smoke_time;
|
||||
} dying_info_s;
|
||||
};
|
||||
|
||||
typedef struct debris_info_s {
|
||||
struct debris_info_s {
|
||||
int32_t death_flags; // a copy of the parent's death flags
|
||||
float last_smoke_time;
|
||||
} debris_info_s;
|
||||
};
|
||||
|
||||
typedef struct laser_info_s {
|
||||
struct laser_info_s {
|
||||
int16_t parent_type; // The type of the parent of this object
|
||||
int16_t src_gun_num; // The src gunpoint that this object fired from
|
||||
|
||||
@@ -302,31 +302,31 @@ typedef struct laser_info_s {
|
||||
float last_drop_time; // Last time a particle was dropped from this weapon
|
||||
vector last_smoke_pos; // Last place smoke was dropped from this weapon
|
||||
bool casts_light; // Whether or not this weapon casts light
|
||||
} laser_info_s;
|
||||
};
|
||||
|
||||
typedef struct powerup_info_s {
|
||||
struct powerup_info_s {
|
||||
int32_t count; // how many/much we pick up (vulcan cannon only?)
|
||||
} powerup_info_s;
|
||||
};
|
||||
|
||||
typedef struct splinter_info_s {
|
||||
struct splinter_info_s {
|
||||
uint8_t subobj_num;
|
||||
int16_t facenum;
|
||||
vector verts[MAX_VERTS_PER_SPLINTER];
|
||||
vector center;
|
||||
} splinter_info_s;
|
||||
};
|
||||
|
||||
// Data for sourcesource objects
|
||||
typedef struct {
|
||||
struct soundsource_info_s {
|
||||
int32_t sound_index;
|
||||
float volume;
|
||||
} soundsource_info_s;
|
||||
};
|
||||
|
||||
// information for physics sim for an object
|
||||
// Some of this stuff is not object instance dependant -- so, it could be moved into
|
||||
// a different struct to save space. (But, then we cannot change it -- i.e we might want a powerup
|
||||
// to change the mass of an object...) Wait to move until we are optimizing -- see Chris if you move any fields
|
||||
// out of the physics_info struct. Thanx!
|
||||
typedef struct physics_info {
|
||||
struct physics_info {
|
||||
vector velocity; // Velocity vector of this object
|
||||
vector thrust; // Constant force applied to this object
|
||||
union {
|
||||
@@ -370,35 +370,35 @@ typedef struct physics_info {
|
||||
};
|
||||
|
||||
uint32_t flags; // Misc physics flags
|
||||
} physics_info;
|
||||
};
|
||||
|
||||
typedef struct shockwave_info {
|
||||
struct shockwave_info {
|
||||
uint32_t damaged_list[(MAX_OBJECTS / 32) + 1];
|
||||
} shockwave_info;
|
||||
};
|
||||
|
||||
typedef struct object_link_info {
|
||||
struct object_link_info {
|
||||
int32_t parent_handle;
|
||||
int32_t sobj_index;
|
||||
vector fvec;
|
||||
vector uvec;
|
||||
vector pos;
|
||||
} object_link_info;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tOSIRISScriptNode {
|
||||
uint16_t DLLID;
|
||||
uint16_t script_id;
|
||||
void *script_instance;
|
||||
} tOSIRISScriptNode;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tOSIRISScript {
|
||||
tOSIRISScriptNode custom_script;
|
||||
tOSIRISScriptNode mission_script;
|
||||
tOSIRISScriptNode level_script;
|
||||
tOSIRISScriptNode default_script;
|
||||
} tOSIRISScript;
|
||||
};
|
||||
|
||||
// The data for an object
|
||||
typedef struct object {
|
||||
struct object {
|
||||
uint8_t type; // what type of object this is... robot, weapon, hostage, powerup, fireball
|
||||
uint8_t dummy_type; // stored type of an OBJ_DUMMY
|
||||
uint16_t id; // which form of object...which powerup, robot, etc.
|
||||
@@ -516,6 +516,6 @@ typedef struct object {
|
||||
|
||||
char *custom_default_script_name;
|
||||
char *custom_default_module_name;
|
||||
} object;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -369,16 +369,16 @@ extern char *Anim_state_names[];
|
||||
#define NUM_ANIMS_PER_CLASS 24
|
||||
|
||||
// Info for an animation state
|
||||
typedef struct {
|
||||
struct anim_entry {
|
||||
int16_t from, to;
|
||||
float spc;
|
||||
int anim_sound_index;
|
||||
uint8_t used;
|
||||
} anim_entry;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct anim_elem {
|
||||
anim_entry elem[NUM_ANIMS_PER_CLASS];
|
||||
} anim_elem;
|
||||
};
|
||||
|
||||
#define MAX_DSPEW_TYPES 2
|
||||
#define DSF_ONLY_IF_PLAYER_HAS_OBJ_1 1
|
||||
@@ -388,15 +388,15 @@ typedef struct {
|
||||
#define MAX_DEATH_TYPES 4
|
||||
|
||||
// Death info for an object type
|
||||
typedef struct {
|
||||
struct death_info {
|
||||
uint32_t flags; // death flags
|
||||
float delay_min; // if delay, min amount
|
||||
float delay_max; // if delay, max amount
|
||||
} death_info;
|
||||
};
|
||||
|
||||
// AI info for this object
|
||||
// This is the subset of ai_frame data that the user can edit for an object type
|
||||
typedef struct {
|
||||
struct t_ai_info {
|
||||
char ai_class;
|
||||
char ai_type;
|
||||
|
||||
@@ -445,12 +445,12 @@ typedef struct {
|
||||
float biased_flight_importance;
|
||||
float biased_flight_min;
|
||||
float biased_flight_max;
|
||||
} t_ai_info;
|
||||
};
|
||||
|
||||
#ifndef NEWEDITOR
|
||||
|
||||
// Info for robots, powerups, debris, etc.
|
||||
typedef struct {
|
||||
struct object_info {
|
||||
char name[PAGENAME_LEN]; // the name on the page
|
||||
|
||||
int type; // what type of object this is
|
||||
@@ -513,7 +513,7 @@ typedef struct {
|
||||
anim_elem *anim; // which anim states are active
|
||||
// anim_elem anim[NUM_MOVEMENT_CLASSES]; // which anim states are active
|
||||
|
||||
} object_info;
|
||||
};
|
||||
|
||||
// The big array of object info
|
||||
extern object_info Object_info[];
|
||||
|
||||
@@ -690,9 +690,9 @@ struct tCustomListInfo {
|
||||
}
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct tAudioTauntComboBoxes {
|
||||
newuiComboBox *taunt_a, *taunt_b, *taunt_c, *taunt_d;
|
||||
} tAudioTauntComboBoxes;
|
||||
};
|
||||
|
||||
// Deletes the currently selected audio taunt #4
|
||||
void ShipSelectDeleteTaunt(pilot *Pilot, tCustomListInfo *cust_snds, newuiComboBox *lb,
|
||||
@@ -1821,10 +1821,10 @@ void PltReadFile(pilot *Pilot, bool keyconfig, bool missiondata) {
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// returns the filelist of pilots available
|
||||
typedef struct tPGetPilotStruct {
|
||||
struct tPGetPilotStruct {
|
||||
char *filename;
|
||||
tPGetPilotStruct *next;
|
||||
} tPGetPilotStruct;
|
||||
};
|
||||
static char **pltgetname_list = NULL;
|
||||
static int pltgetname_count = 0;
|
||||
|
||||
|
||||
@@ -205,21 +205,21 @@ PltWriteFile #define PLT_FILE_NOERR 0 //no errors, success
|
||||
#define MAX_PILOT_TAUNTS 8
|
||||
#define PILOT_TAUNT_SIZE 60
|
||||
|
||||
typedef struct
|
||||
struct cntrldata
|
||||
{
|
||||
int id;
|
||||
ct_type type[2];
|
||||
ct_config_data value;
|
||||
uint8_t flags[2];
|
||||
} cntrldata;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
struct
|
||||
{
|
||||
uint8_t highest_level;
|
||||
bool finished; // was mission finished?
|
||||
(different than highest level,btw) char mission_name[MSN_NAMELEN]; } tMissionData;
|
||||
|
||||
typedef struct
|
||||
struct
|
||||
{
|
||||
char filename[_MAX_FNAME]; //added because of some weird .plt renaming bugs that can happen
|
||||
//not saved out
|
||||
|
||||
@@ -149,21 +149,21 @@ IIIIIIIII N N P OOOO R R T A A NN NN T
|
||||
#define PLTR_UNKNOWN_FATAL 5 // an uknown exception occurred
|
||||
#define PLTR_TOO_NEW 6 // pilot file too new
|
||||
|
||||
typedef struct {
|
||||
struct tMissionData {
|
||||
uint8_t highest_level; // highlest level completed in the mission
|
||||
int ship_permissions; // Ship permissions at highest level achieved
|
||||
bool finished; // was mission finished? (different than highest level,btw)
|
||||
char mission_name[MSN_NAMELEN]; // name of the mission (from the mission file)
|
||||
int num_restores; // number of game loads for this mission
|
||||
int num_saves; // number of game saves for this mission
|
||||
} tMissionData;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct cntrldata {
|
||||
int id;
|
||||
ct_type type[2];
|
||||
ct_config_data value;
|
||||
uint8_t flags[2];
|
||||
} cntrldata;
|
||||
};
|
||||
|
||||
class pilot {
|
||||
|
||||
|
||||
@@ -400,21 +400,21 @@
|
||||
#define PSPF_GREEN 4
|
||||
#define PSPF_YELLOW 8
|
||||
|
||||
typedef struct {
|
||||
struct player_pos_suppress {
|
||||
int room;
|
||||
float expire_time;
|
||||
int ignored_pos;
|
||||
bool active;
|
||||
} player_pos_suppress;
|
||||
};
|
||||
|
||||
#define PLAYER_POS_HACK_TIME 10
|
||||
|
||||
extern player_pos_suppress Player_pos_fix[MAX_PLAYERS];
|
||||
|
||||
typedef struct {
|
||||
struct team {
|
||||
char name[CALLSIGN_LEN + 1];
|
||||
int score;
|
||||
} team;
|
||||
};
|
||||
|
||||
extern int Player_num;
|
||||
extern int Default_ship_permission;
|
||||
|
||||
@@ -94,14 +94,14 @@
|
||||
|
||||
// Info on player weapon firing.
|
||||
// There is one of these each for the primary & secondary weapons
|
||||
typedef struct {
|
||||
struct player_weapon {
|
||||
int32_t index; // the index of the current primary or secondary weapon
|
||||
float firing_time; // how long the current weapon has been firing
|
||||
int32_t sound_handle; // the handle for the sound the firing weapon is making
|
||||
} player_weapon;
|
||||
};
|
||||
|
||||
// The structure for a player. Most of this data will be for multiplayer
|
||||
typedef struct {
|
||||
struct player {
|
||||
|
||||
// positional data for player starts
|
||||
int32_t start_index;
|
||||
@@ -238,6 +238,6 @@ typedef struct {
|
||||
int16_t num_deaths_level; // Number of kills this level
|
||||
int16_t num_deaths_total; // Number of kills total
|
||||
|
||||
} player;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#define PRT_VISEFFECT 1
|
||||
#define PRT_WALL 2
|
||||
|
||||
typedef struct {
|
||||
struct postrender_struct {
|
||||
uint8_t type; // See types above
|
||||
union {
|
||||
int16_t objnum;
|
||||
@@ -35,7 +35,7 @@ typedef struct {
|
||||
|
||||
int16_t roomnum;
|
||||
float z;
|
||||
} postrender_struct;
|
||||
};
|
||||
|
||||
extern int Num_postrenders;
|
||||
extern postrender_struct Postrender_list[];
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
#define PSI_PICKUP 0
|
||||
|
||||
typedef struct {
|
||||
struct powerup {
|
||||
char name[PAGENAME_LEN];
|
||||
float size;
|
||||
int score;
|
||||
@@ -97,7 +97,7 @@ typedef struct {
|
||||
// Default physics information for this powerup type
|
||||
physics_info phys_info; // the physics data for this obj type.
|
||||
|
||||
} powerup;
|
||||
};
|
||||
|
||||
extern int Num_powerups;
|
||||
extern powerup Powerups[MAX_POWERUPS];
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define PROC_WATER_RAINDROPS 3
|
||||
#define PROC_WATER_BLOBDROPS 4
|
||||
|
||||
typedef struct {
|
||||
struct dynamic_proc_element {
|
||||
uint8_t type;
|
||||
fix dx, dy;
|
||||
uint8_t frames_left;
|
||||
@@ -57,7 +57,7 @@ typedef struct {
|
||||
fix x1, y1;
|
||||
|
||||
int16_t prev, next;
|
||||
} dynamic_proc_element;
|
||||
};
|
||||
|
||||
extern dynamic_proc_element DynamicProcElements[];
|
||||
extern const char *ProcNames[], *WaterProcNames[];
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
#define BETA_VERSION 0x1000 // beta modifier.
|
||||
#define DEMO_VERSION 0x2000 // same as release, but its the demo.
|
||||
|
||||
typedef struct t_program_version {
|
||||
struct program_version {
|
||||
int version_type;
|
||||
uint8_t major, minor, build;
|
||||
bool debug : 1; // are we in debug mode
|
||||
@@ -174,7 +174,7 @@ typedef struct t_program_version {
|
||||
bool editor : 1; // editor code?
|
||||
bool windowed : 1; // runs in a window?
|
||||
bool demo : 1; // demo?
|
||||
} program_version;
|
||||
};
|
||||
|
||||
// Program state available to everyone
|
||||
extern program_version Program_version;
|
||||
|
||||
@@ -156,10 +156,10 @@ int N_external_rooms;
|
||||
int16_t Specular_faces[MAX_SPECULAR_FACES];
|
||||
int Num_specular_faces_to_render = 0;
|
||||
int Num_real_specular_faces_to_render = 0; // Non-invisible specular faces
|
||||
typedef struct {
|
||||
struct smooth_spec_vert {
|
||||
float r, g, b;
|
||||
int used;
|
||||
} smooth_spec_vert;
|
||||
};
|
||||
smooth_spec_vert Smooth_verts[MAX_VERTS_PER_ROOM];
|
||||
// For scorch rendering
|
||||
uint16_t Scorches_to_render[MAX_FACES_PER_ROOM];
|
||||
@@ -184,14 +184,14 @@ uint8_t External_room_project_net[MAX_EXTERNAL_ROOMS];
|
||||
#define LGF_USED 1
|
||||
#define LGF_INCREASING 2
|
||||
#define LGF_FAST 4
|
||||
typedef struct {
|
||||
struct light_glow {
|
||||
int16_t roomnum;
|
||||
int16_t facenum;
|
||||
float size;
|
||||
vector center;
|
||||
float scalar;
|
||||
uint8_t flags;
|
||||
} light_glow;
|
||||
};
|
||||
light_glow LightGlows[MAX_LIGHT_GLOWS];
|
||||
light_glow LightGlowsThisFrame[MAX_LIGHT_GLOWS];
|
||||
int FastCoronas = 0;
|
||||
@@ -3008,11 +3008,11 @@ void RenderRoom(room *rp) {
|
||||
}
|
||||
|
||||
#define MAX_OBJECTS_PER_ROOM 2000
|
||||
typedef struct {
|
||||
struct obj_sort_item {
|
||||
int vis_effect;
|
||||
int objnum;
|
||||
float dist;
|
||||
} obj_sort_item;
|
||||
};
|
||||
obj_sort_item obj_sort_list[MAX_OBJECTS_PER_ROOM];
|
||||
// Compare function for room face sort
|
||||
static int obj_sort_func(const obj_sort_item *a, const obj_sort_item *b) {
|
||||
|
||||
@@ -217,11 +217,11 @@ extern vector Room_fog_plane, Room_fog_portal_vert;
|
||||
|
||||
struct face;
|
||||
|
||||
typedef struct {
|
||||
struct fog_portal_data {
|
||||
int16_t roomnum;
|
||||
float close_dist;
|
||||
face *close_face;
|
||||
} fog_portal_data;
|
||||
};
|
||||
|
||||
extern fog_portal_data Fog_portal_data[];
|
||||
|
||||
@@ -234,10 +234,10 @@ void SetFogZoneEnd(float z);
|
||||
struct room;
|
||||
|
||||
// For sorting our textures in state limited environments
|
||||
typedef struct {
|
||||
struct state_limited_element {
|
||||
int facenum;
|
||||
int sort_key;
|
||||
} state_limited_element;
|
||||
};
|
||||
|
||||
#define MAX_STATE_ELEMENTS 8000
|
||||
extern state_limited_element State_elements[MAX_STATE_ELEMENTS];
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MAX_WBS_PER_OBJ 21
|
||||
|
||||
// Attach to the polymodel
|
||||
typedef struct poly_wb_info {
|
||||
struct poly_wb_info {
|
||||
// Static Data (Add to robot generic page)
|
||||
uint16_t num_gps;
|
||||
uint8_t gp_index[MAX_WB_GUNPOINTS];
|
||||
@@ -40,12 +40,12 @@ typedef struct poly_wb_info {
|
||||
uint8_t num_turrets;
|
||||
uint16_t turret_index[MAX_WB_TURRETS];
|
||||
|
||||
} poly_wb_info;
|
||||
};
|
||||
|
||||
// Next free WBF is 32
|
||||
|
||||
// Attach to a object type
|
||||
typedef struct otype_wb_info {
|
||||
struct otype_wb_info {
|
||||
uint16_t gp_weapon_index[MAX_WB_GUNPOINTS];
|
||||
uint16_t fm_fire_sound_index[MAX_WB_FIRING_MASKS];
|
||||
uint16_t aiming_gp_index;
|
||||
@@ -73,14 +73,14 @@ typedef struct otype_wb_info {
|
||||
uint16_t flags;
|
||||
|
||||
float energy_usage, ammo_usage;
|
||||
} otype_wb_info;
|
||||
};
|
||||
|
||||
#define WB_MOVE_STILL 0
|
||||
#define WB_MOVE_RIGHT 1
|
||||
#define WB_MOVE_LEFT 2
|
||||
|
||||
// Goes with an individual robot's instance
|
||||
typedef struct dynamic_wb_info {
|
||||
struct dynamic_wb_info {
|
||||
// Dynamic Data
|
||||
float last_fire_time;
|
||||
uint8_t cur_firing_mask;
|
||||
@@ -97,7 +97,6 @@ typedef struct dynamic_wb_info {
|
||||
char upgrade_level; // For multi-level weapons ( 0 to MAX_WB_UPGRADES-1)
|
||||
|
||||
int flags;
|
||||
|
||||
} dynamic_wb_info;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
|
||||
// Room change stuff
|
||||
#define MAX_ROOM_CHANGES 100
|
||||
typedef struct {
|
||||
struct room_changes {
|
||||
int roomnum;
|
||||
bool fog;
|
||||
vector start_vector, end_vector;
|
||||
@@ -394,7 +394,7 @@ typedef struct {
|
||||
float start_time;
|
||||
float total_time;
|
||||
uint8_t used;
|
||||
} room_changes;
|
||||
};
|
||||
|
||||
//
|
||||
// Globals
|
||||
|
||||
@@ -128,14 +128,14 @@
|
||||
// NOTE: If you add a flag here, please check the function CopyFaceFlags()
|
||||
|
||||
// UVLs for room verts
|
||||
typedef struct roomUVL {
|
||||
struct roomUVL {
|
||||
float u, v; // texture coordinates
|
||||
float u2, v2;
|
||||
uint8_t alpha; // alpha for this vertex
|
||||
} roomUVL;
|
||||
};
|
||||
|
||||
// an n-sided polygon used as part of a room or portal
|
||||
typedef struct face {
|
||||
struct face {
|
||||
uint16_t flags; // flags for this face (see above)
|
||||
uint8_t num_verts; // how many vertices in this face
|
||||
int8_t portal_num; // which portal this face is part of, or -1 if none
|
||||
@@ -149,7 +149,7 @@ typedef struct face {
|
||||
uint8_t renderframe; // what frame this face was last rendered (for lighting)
|
||||
uint8_t light_multiple; // what multiple to times by
|
||||
vector min_xyz, max_xyz; // min & max extents of this face (for FVI)
|
||||
} face;
|
||||
};
|
||||
|
||||
// Portal flags
|
||||
#define PF_RENDER_FACES 1 // render the face(s) in the portal
|
||||
@@ -161,7 +161,7 @@ typedef struct face {
|
||||
#define PF_BLOCK_REMOVABLE 64
|
||||
|
||||
// a connection between two rooms
|
||||
typedef struct portal {
|
||||
struct portal {
|
||||
int flags; // flags for this portal
|
||||
int16_t portal_face; // the face for this portal
|
||||
int16_t croom; // the room this portal connects to
|
||||
@@ -169,7 +169,7 @@ typedef struct portal {
|
||||
int16_t bnode_index;
|
||||
int combine_master; // For rendering combined portals
|
||||
vector path_pnt; // Point used by the path system
|
||||
} portal;
|
||||
};
|
||||
|
||||
// Room flags
|
||||
#define RF_FUELCEN 1 // room is a refueling center
|
||||
@@ -208,7 +208,7 @@ typedef struct portal {
|
||||
struct doorway;
|
||||
|
||||
// the basic building-block of a Descent 3 level
|
||||
typedef struct room {
|
||||
struct room {
|
||||
int flags; // various room flags
|
||||
|
||||
int num_faces; // how many poygons in this room
|
||||
@@ -263,6 +263,6 @@ typedef struct room {
|
||||
uint8_t damage_type; // What type of damage this rooms does (for sound) if damage > 0
|
||||
uint8_t used; // is this room holding data?
|
||||
|
||||
} room;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -109,14 +109,14 @@
|
||||
#include <algorithm>
|
||||
|
||||
// Structure for storing scorch marks
|
||||
typedef struct {
|
||||
struct scorch {
|
||||
int roomface; // room number & face number combined into an int
|
||||
vector pos; // the position of the center of the scorch mark
|
||||
uint8_t handle_index; // which mark?
|
||||
int8_t rx, ry, rz; // right vector
|
||||
int8_t ux, uy, uz; // up vector
|
||||
uint8_t size; // floating-point size times 16
|
||||
} scorch;
|
||||
};
|
||||
|
||||
// How many scorch marks
|
||||
#define MAX_SCORCHES 500
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
// Ship flags
|
||||
#define SF_DEFAULT_ALLOW 1 // Allowed by default
|
||||
|
||||
typedef struct {
|
||||
struct ship {
|
||||
char name[PAGENAME_LEN];
|
||||
float size;
|
||||
physics_info phys_info; // the physics data for this obj type.
|
||||
@@ -171,7 +171,7 @@ typedef struct {
|
||||
|
||||
int flags;
|
||||
uint8_t used;
|
||||
} ship;
|
||||
};
|
||||
|
||||
extern int Num_ships;
|
||||
extern ship Ships[MAX_SHIPS];
|
||||
|
||||
@@ -29,15 +29,15 @@
|
||||
// What this special face is used for:
|
||||
#define SFT_SPECULAR 1
|
||||
|
||||
typedef struct {
|
||||
struct specular_instance {
|
||||
vector bright_center;
|
||||
uint16_t bright_color;
|
||||
} specular_instance;
|
||||
};
|
||||
|
||||
#define SFF_SPEC_OBJECT 1
|
||||
#define SFF_SPEC_SMOOTH 2
|
||||
|
||||
typedef struct {
|
||||
struct special_face {
|
||||
uint8_t type; // See types (above)
|
||||
uint8_t num; // Number of instances
|
||||
uint8_t used;
|
||||
@@ -47,7 +47,7 @@ typedef struct {
|
||||
|
||||
vector *vertnorms;
|
||||
|
||||
} special_face;
|
||||
};
|
||||
|
||||
extern special_face SpecialFaces[];
|
||||
extern int Num_of_special_faces;
|
||||
|
||||
@@ -82,18 +82,18 @@
|
||||
#define SF_UPDATEDFORFRAME 0x02 // thie spew has already updated it's position for this frame, no need to do it again
|
||||
#define SF_UPDATEEVERYFRAME 0x04
|
||||
|
||||
typedef struct gunpoint_info {
|
||||
struct guninfo {
|
||||
int obj_handle; // handle to object (needed if it's gunpoint based)
|
||||
int gunpoint; // gunpoint number (needed if it's gunpoint based)
|
||||
} guninfo;
|
||||
};
|
||||
|
||||
typedef struct point_info {
|
||||
struct pointinfo {
|
||||
vector origin; // origin of the viseffect (needed if it's NOT gunpoint based)
|
||||
vector normal; // normal of the point
|
||||
int room_num; // room number of point of origin
|
||||
} pointinfo;
|
||||
};
|
||||
|
||||
typedef struct spew_t {
|
||||
struct spewinfo {
|
||||
uint8_t flags; // flags
|
||||
bool inuse; // if this slot is in use
|
||||
bool use_gunpoint; // is this a gunpoint based object (yes=true)
|
||||
@@ -120,7 +120,7 @@ typedef struct spew_t {
|
||||
float start_time; // time viseffect started
|
||||
|
||||
vector gp_normal, gun_point; // vectors saved to keep from recalculating
|
||||
} spewinfo;
|
||||
};
|
||||
|
||||
#define SPEW_RAND_WIGGLE 1
|
||||
#define SPEW_RAND_SPEED 2
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
#include <ctype.h>
|
||||
|
||||
// Subtitle data
|
||||
typedef struct {
|
||||
struct subtitle {
|
||||
int first_frame, last_frame;
|
||||
char *msg;
|
||||
} subtitle;
|
||||
};
|
||||
|
||||
#define MAX_SUBTITLES 500
|
||||
#define MOVIE_SUBTITLE_EXTENSION ".msb"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
// Terrain cells are on a fixed grid so they have no x and z positions. If you want the x and z
|
||||
// positions you must calculate them yourself: gridx*TERRAIN_SIZE and gridz*TERRAIN_SIZE
|
||||
|
||||
typedef struct {
|
||||
struct terrain_segment {
|
||||
float y; // Y position of the lower left corner of the terrain cell
|
||||
float mody; // The modified y position of this cell - used for LOD
|
||||
|
||||
@@ -95,21 +95,21 @@ typedef struct {
|
||||
// floats to ints when traversing the terrain
|
||||
// it's the integer version of pos.y
|
||||
uint8_t pad; // for alignment
|
||||
} terrain_segment;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct terrain_tex_segment {
|
||||
uint8_t rotation;
|
||||
int16_t tex_index;
|
||||
} terrain_tex_segment;
|
||||
};
|
||||
|
||||
// Data for LOD shutoff code
|
||||
typedef struct {
|
||||
struct lodoff {
|
||||
int cellnum;
|
||||
float save_delta[MAX_TERRAIN_LOD];
|
||||
} lodoff;
|
||||
};
|
||||
|
||||
// Data for the sky spherical map
|
||||
typedef struct {
|
||||
struct terrain_sky {
|
||||
int textured; // 1=use textures, 0=use gouraud shaded polygon
|
||||
|
||||
// The two subscripts correspond to the top, middle, and bottom of the horizon piece
|
||||
@@ -148,35 +148,35 @@ typedef struct {
|
||||
|
||||
int star_color[MAX_STARS];
|
||||
int flags;
|
||||
} terrain_sky;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct link_tile {
|
||||
int mine_seg;
|
||||
int mine_side;
|
||||
int portal_num;
|
||||
int terrain_seg;
|
||||
|
||||
} link_tile;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct terrain_mine_list {
|
||||
int terrain_seg;
|
||||
uint8_t num_segs;
|
||||
int16_t mine_segs[50];
|
||||
} terrain_mine_list;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct terrain_render_info {
|
||||
float z;
|
||||
uint16_t right_edge, left_edge, top_edge, bottom_edge; // for fixing tjoint problems
|
||||
uint8_t right_count, left_count, top_count, bottom_count;
|
||||
uint16_t segment; // what segment to render
|
||||
uint8_t lod; // what level of detail: 0=16x16, 1=8x8, 2=4x4, 3=2x2, 4=just this segment (1x1)
|
||||
uint8_t pad;
|
||||
} terrain_render_info;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct terrain_normals {
|
||||
vector normal1; // Upper left triangle
|
||||
vector normal2; // Lower right triangle
|
||||
} terrain_normals;
|
||||
};
|
||||
|
||||
extern uint8_t Terrain_dynamic_table[];
|
||||
extern terrain_normals *TerrainNormals[MAX_TERRAIN_LOD];
|
||||
|
||||
@@ -943,11 +943,11 @@ float GetTerrainDynamicScalar(vector *pos, int seg) {
|
||||
}
|
||||
// Takes a min,max vector and makes a surrounding cube from it
|
||||
void MakePointsFromMinMax(vector *corners, vector *minp, vector *maxp);
|
||||
typedef struct {
|
||||
struct obj_sort_item {
|
||||
int objnum;
|
||||
float dist;
|
||||
int vis_effect;
|
||||
} obj_sort_item;
|
||||
};
|
||||
// Compare function for room face sort
|
||||
static int obj_sort_func(const obj_sort_item *a, const obj_sort_item *b) {
|
||||
if (a->dist < b->dist)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user