diff options
| author | xolatile | 2025-08-06 22:54:55 +0200 |
|---|---|---|
| committer | xolatile | 2025-08-06 22:54:55 +0200 |
| commit | 0a1172b75f571685c264a8b9d8ee224bbf11381f (patch) | |
| tree | d041fdc68a60f0ebb48a3852bbcce6d9432f83d5 /src/engine/engine.h | |
| parent | affde05dc07a94643f1fd2751b2b441f57f73d7d (diff) | |
| download | xolatile-badassbug-0a1172b75f571685c264a8b9d8ee224bbf11381f.tar.xz xolatile-badassbug-0a1172b75f571685c264a8b9d8ee224bbf11381f.tar.zst | |
Please do not hate me, it makes sense...
Diffstat (limited to 'src/engine/engine.h')
| -rw-r--r-- | src/engine/engine.h | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/engine/engine.h b/src/engine/engine.h index e37ac4f..7bc0ef1 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -34,18 +34,14 @@ extern int zpass; extern vector<int> entgroup; // rendertext -struct font -{ - struct charinfo - { +struct font { + struct charinfo { short x, y, w, h, offsetx, offsety, advance, tex; }; - char *name; vector<Texture *> texs; vector<charinfo> chars; int charoffset, defaultw, defaulth, scale; - font() : name(NULL) {} ~font() { DELETEA(name); } }; @@ -97,7 +93,6 @@ extern bool addshadowmapcaster(const vec &o, float xyrad, float zrad); extern bool isshadowmapreceiver(vtxarray *va); extern void rendershadowmap(); extern void pushshadowmap(); -extern void popshadowmap(); extern void rendershadowmapreceivers(); extern void guessshadowdir(); @@ -137,8 +132,7 @@ extern void screenquadoffset(float x, float y, float w, float h, float x2, float extern void hudquad(float x, float y, float w, float h, float tx = 0, float ty = 0, float tw = 1, float th = 1); extern void writecrosshairs(stream *f); -namespace modelpreview -{ +namespace modelpreview { extern void start(int x, int y, int w, int h, bool background = true); extern void end(); } @@ -195,8 +189,7 @@ extern void calcmerges(); extern int mergefaces(int orient, facebounds *m, int sz); extern void mincubeface(const cube &cu, int orient, const ivec &o, int size, const facebounds &orig, facebounds &cf, ushort nmat = MAT_AIR, ushort matmask = 0); -static inline cubeext &ext(cube &c) -{ +static inline cubeext &ext(cube &c) { return *(c.ext ? c.ext : newcubeext(c)); } @@ -336,8 +329,7 @@ extern void writebinds(stream *f); extern void writecompletions(stream *f); // main -enum -{ +enum { NOT_INITING = 0, INIT_GAME, INIT_LOAD, @@ -345,8 +337,7 @@ enum }; extern int initing, numcpus; -enum -{ +enum { CHANGE_GFX = 1<<0, CHANGE_SOUND = 1<<1 }; @@ -410,14 +401,12 @@ extern void loadskin(const char *dir, const char *altdir, Texture *&skin, Textur extern mapmodelinfo *getmminfo(int i); extern void startmodelquery(occludequery *query); extern void endmodelquery(); -extern void preloadmodelshaders(bool force = false); +extern void preloadmodelshaders(); extern void preloadusedmapmodels(bool msg = false, bool bih = false); -static inline model *loadmapmodel(int n) -{ +static inline model *loadmapmodel(int n) { extern vector<mapmodelinfo> mapmodels; - if(mapmodels.inrange(n)) - { + if(mapmodels.inrange(n)) { model *m = mapmodels[n].m; return m ? m : loadmodel(NULL, n); } |
