astyle project; not using yet

This commit is contained in:
Jonathan 2021-09-13 13:11:53 -04:00
parent facf3490c7
commit 05e20a3360
2 changed files with 46 additions and 11 deletions

35
.astylerc Normal file
View File

@ -0,0 +1,35 @@
# source tree
recursive
ignore-exclude-errors
exclude=.git
exclude=.vs
exclude=3rdparty
exclude=qbsp3
exclude=out
# braces and indent
style=kr
indent=spaces
# indentation
min-conditional-indent=0
max-continuation-indent=120
indent-switches
indent-col1-comments
# padding
pad-oper
pad-comma
pad-header
unpad-paren
align-pointer=name
align-reference=name
# formatting
remove-braces
attach-return-type
break-one-line-headers
convert-tabs
close-templates
max-code-length=200
break-after-logical

View File

@ -117,17 +117,17 @@ struct bspx_lump_t {
uint32_t filelen;
};
typedef struct {
struct lumpspec_t {
const char *name;
size_t size;
} lumpspec_t;
};
extern const lumpspec_t lumpspec_bsp29[BSP_LUMPS];
extern const lumpspec_t lumpspec_bsp2rmq[BSP_LUMPS];
extern const lumpspec_t lumpspec_bsp2[BSP_LUMPS];
extern const lumpspec_t lumpspec_q2bsp[Q2_HEADER_LUMPS];
typedef struct {
struct dmodelq1_t {
float mins[3];
float maxs[3];
float origin[3];
@ -135,9 +135,9 @@ typedef struct {
int32_t visleafs; /* not including the solid leaf 0 */
int32_t firstface;
int32_t numfaces;
} dmodelq1_t;
};
typedef struct {
struct dmodelh2_t {
float mins[3];
float maxs[3];
float origin[3];
@ -145,9 +145,9 @@ typedef struct {
int32_t visleafs; /* not including the solid leaf 0 */
int32_t firstface;
int32_t numfaces;
} dmodelh2_t;
};
typedef struct {
struct q2_dmodel_t {
float mins[3];
float maxs[3];
float origin[3]; // for sounds or lights
@ -155,15 +155,15 @@ typedef struct {
int32_t firstface;
int32_t numfaces; // submodels just draw faces
// without walking the bsp tree
} q2_dmodel_t;
};
// FIXME: remove
typedef dmodelh2_t dmodel_t;
using dmodel_t = dmodelh2_t;
typedef struct {
struct dmiptexlump_t {
int32_t nummiptex;
int32_t dataofs[4]; /* [nummiptex] */
} dmiptexlump_t;
};
#define MIPLEVELS 4
typedef struct miptex_s {