summaryrefslogtreecommitdiff
path: root/src/engine/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/engine.h')
-rw-r--r--src/engine/engine.h29
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);
}