typedef changes

This commit is contained in:
Jonathan 2021-09-13 13:04:18 -04:00
parent f89d5534b6
commit facf3490c7
5 changed files with 27 additions and 25 deletions

View File

@ -38,13 +38,13 @@
#include <light/light.hh>
/* FIXME - share header with qbsp, etc. */
typedef struct {
struct wadinfo_t {
char identification[4]; // should be WAD2
int32_t numlumps;
int32_t infotableofs;
} wadinfo_t;
};
typedef struct {
struct lumpinfo_t {
int32_t filepos;
int32_t disksize;
int32_t size; // uncompressed
@ -52,7 +52,7 @@ typedef struct {
char compression;
char pad1, pad2;
char name[16]; // must be null terminated
} lumpinfo_t;
};
static void
ExportWad(FILE *wadfile, mbsp_t *bsp)

View File

@ -501,7 +501,7 @@ BSPVersionSupported(int32_t ident, int32_t version, const bspversion_t **out_ver
* =========================================================================
*/
typedef enum { TO_DISK, TO_CPU } swaptype_t;
enum swaptype_t : bool { TO_DISK, TO_CPU };
static void
SwapBSPVertexes(int numvertexes, dvertex_t *verticies)
@ -3906,7 +3906,7 @@ LoadBSPFile(char *filename, bspdata_t *bspdata)
/* ========================================================================= */
typedef struct {
struct bspfile_t {
const bspversion_t *version;
// which one is used depends on version
@ -3916,7 +3916,7 @@ typedef struct {
};
FILE *file;
} bspfile_t;
};
static void
AddLump(bspfile_t *bspfile, int lumpnum, const void *data, int count)

View File

@ -588,16 +588,17 @@ SafeWrite(FILE *f, const void *buffer, int count)
Error("File write failure");
}
typedef struct {
char magic[4];
unsigned int tableofs;
unsigned int numfiles;
} pakheader_t;
typedef struct {
char name[56];
unsigned int offset;
unsigned int length;
} pakfile_t;
struct pakheader_t {
char magic[4];
unsigned int tableofs;
unsigned int numfiles;
};
struct pakfile_t {
char name[56];
unsigned int offset;
unsigned int length;
};
/*
* ==============

View File

@ -62,10 +62,10 @@
#define Q2_BSPVERSION 38
#define Q2_QBISMIDENT (('P'<<24)+('S'<<16)+('B'<<8)+'Q')
typedef struct {
struct lump_t {
int32_t fileofs;
int32_t filelen;
} lump_t;
};
#define LUMP_ENTITIES 0
#define LUMP_PLANES 1
@ -106,15 +106,16 @@ typedef struct {
#define Q2_LUMP_AREAPORTALS 18
#define Q2_HEADER_LUMPS 19
typedef struct {
struct bspx_header_t {
char id[4]; //'BSPX'
uint32_t numlumps;
} bspx_header_t;
typedef struct {
};
struct bspx_lump_t {
char lumpname[24];
uint32_t fileofs;
uint32_t filelen;
} bspx_lump_t;
};
typedef struct {
const char *name;

View File

@ -24,13 +24,13 @@
#include <qbsp/winding.hh>
typedef struct brush_s {
struct brush_t {
struct brush_s *next;
vec3_t mins, maxs;
face_t *faces;
contentflags_t contents; /* BSP contents */
short lmshift; /* lightmap scaling (qu/lightmap pixel), passed to the light util */
} brush_t;
};
class mapbrush_t;