]> git.xolatile.top Git - xolatile-badassbug.git/commitdiff
Cleared all warnings on GCC...
authorxolatile <xolatile@proton.me>
Sun, 10 Aug 2025 12:30:56 +0000 (14:30 +0200)
committerxolatile <xolatile@proton.me>
Sun, 10 Aug 2025 12:30:56 +0000 (14:30 +0200)
19 files changed:
data/glsl.cfg
data/stdedit.cfg
src/engine/animmodel.h
src/engine/engine.h
src/engine/lightmap.cpp
src/engine/menus.cpp
src/engine/normal.cpp
src/engine/octa.cpp
src/engine/octaedit.cpp
src/engine/octarender.cpp
src/engine/physics.cpp
src/engine/rendermodel.cpp
src/engine/renderparticles.cpp
src/engine/renderva.cpp
src/engine/skelmodel.h
src/engine/texture.cpp
src/engine/world.cpp
src/fpsgame/fps.cpp
src/fpsgame/game.h

index 3004d05d379ca8c415572b9a6ddaf76264395c55..91e6e8e3e3c9149508a1ba32b072358f0c794e52 100644 (file)
@@ -2556,42 +2556,6 @@ lazyshader 0 "glassfast" [
 fastshader glass glassfast 2
 altshader glass glassfast
 
-lazyshader 0 "grass" [
-    attribute vec4 vvertex, vcolor;
-    attribute vec2 vtexcoord0, vtexcoord1;
-    attribute vec4 vtangent;
-    uniform mat4 camprojmatrix;
-    uniform vec3 camera;
-    uniform vec3 grassmargin;
-    varying vec4 color;
-    varying vec2 texcoord0, texcoord1;
-    varying vec2 bounds;
-    void main(void)
-   {
-        gl_Position = camprojmatrix * vvertex;
-        color = vcolor;
-        texcoord0 = vtexcoord0;
-        texcoord1 = vtexcoord1 * @lmcoordscale;
-        vec2 camdir = (camera.xy - vvertex.xy) * grassmargin.y;
-        bounds = vec2(dot(camdir, vtangent.xy), dot(camdir, vtangent.zw)) + grassmargin.z;
-    }
-] [
-    //:fogrgba vec4(0.0)
-    varying vec4 color;
-    varying vec2 texcoord0, texcoord1;
-    varying vec2 bounds;
-    uniform sampler2D tex0, tex1;
-    void main(void)
-   {
-        vec4 diffuse = texture2D(tex0, texcoord0);
-        diffuse.rgb *= 2.0;
-        vec4 lm = texture2D(tex1, texcoord1) * color;
-        lm.rgb *= lm.a;
-        float margin = clamp(min(bounds.x, bounds.y), 0.0, 1.0);
-        gl_FragColor = diffuse * lm * margin;
-    }
-]
-
 shader 0 "overbrightdecal" [
     attribute vec4 vvertex, vcolor;
     attribute vec2 vtexcoord0;
index 6a13f5fad2395d11999858495072f8da3b525a82..55863e14cfb5157fd01d47a5d1f8c8a02032315b 100644 (file)
@@ -136,22 +136,6 @@ entfindinsel = [
   ]
 ]
 
-lse = [
-  line = ""
-  count = 0
-  entloop [
-    line  = ( concatword $line (entget) "              " )
-    count = ( + $count 1 )
-    if (> $count 4) [
-      echo $line
-      line = ""
-      count = 0
-    ]
-  ]
-  if (> $count 0 ) [ echo $line ]
-  echo (enthavesel) entities selected
-]
-
 drag       = [ dragging 1; onrelease [ dragging 0 ] ]
 corners    = [ selectcorners 1; dragging 1; onrelease [ selectcorners 0; dragging 0 ] ]
 editmove   = [ moving 1; onrelease [ moving 0 ]; result $moving ]
index 07143a253b2441bbbc7e34aa07378ec8bafe9185..e94aea5fd674a37eaa26571ab25aa00559888e96 100644 (file)
@@ -195,8 +195,8 @@ struct animmodel : model {
                virtual ~mesh() {
                        DELETEA(name);
                }
-               virtual void calcbb(vec &bbmin, vec &bbmax, const matrix4x3 &m) {}
-               virtual void genBIH(BIH::mesh &m) {}
+               virtual void calcbb(vec &bbmin, vec &bbmax, const matrix4x3 &m) = 0;
+               virtual void genBIH(BIH::mesh &m) = 0;
                void genBIH(skin &s, vector<BIH::mesh> &bih, const matrix4x3 &t) {
                        BIH::mesh &m = bih.add();
                        m.xform = t;
@@ -352,8 +352,8 @@ struct animmodel : model {
                        meshes.deletecontents();
                        DELETEP(next);
                }
-               virtual int findtag(const char *name) { return -1; }
-               virtual void concattagtransform(part *p, int i, const matrix4x3 &m, matrix4x3 &n) {}
+               virtual int findtag(const char *) { return -1; }
+               virtual void concattagtransform(part *, int, const matrix4x3 &, matrix4x3 &) {}
                void calcbb(vec &bbmin, vec &bbmax, const matrix4x3 &m) {
                        loopv(meshes) meshes[i]->calcbb(bbmin, bbmax, m);
                }
index 29bfaff7ef019ba1ea72645d78ab596e549c0bcb..1b1d82f82073f8678bb1d2e24403d18d570eb699 100644 (file)
@@ -65,7 +65,7 @@ extern void cleanuptexture(Texture *t);
 extern uchar *loadalphamask(Texture *t);
 extern void loadlayermasks();
 extern void loadshaders();
-extern void setuptexparameters(int tnum, int clamp, int filter, GLenum format = GL_RGB, GLenum target = GL_TEXTURE_2D);
+extern void setuptexparameters(int tnum, int clamp, int filter, GLenum target = GL_TEXTURE_2D);
 extern void createtexture(int tnum, int w, int h, void *pixels, int clamp, int filter, GLenum component = GL_RGB, GLenum target = GL_TEXTURE_2D, int pw = 0, int ph = 0, int pitch = 0, bool resize = true, GLenum format = GL_FALSE);
 extern void blurtexture(int n, int bpp, int w, int h, uchar *dst, const uchar *src, int margin = 0);
 extern void blurnormals(int n, int w, int h, bvec *dst, const bvec *src, int margin = 0);
@@ -182,11 +182,11 @@ extern int classifyface(const cube &c, int orient, const ivec &co, int size);
 extern int visibletris(const cube &c, int orient, const ivec &co, int size, ushort nmat = MAT_ALPHA, ushort matmask = MAT_ALPHA);
 extern int visibleorient(const cube &c, int orient);
 extern void genfaceverts(const cube &c, int orient, ivec v[4]);
-extern int calcmergedsize(int orient, const ivec &co, int size, const vertinfo *verts, int numverts);
-extern void invalidatemerges(cube &c, const ivec &co, int size, bool msg);
+extern int calcmergedsize(const ivec &co, int size, const vertinfo *verts, int numverts);
+extern void invalidatemerges(cube &c, bool msg);
 extern void calcmerges();
 
-extern int mergefaces(int orient, facebounds *m, int sz);
+extern int mergefaces(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) {
@@ -237,7 +237,7 @@ extern int isvisiblesphere(float rad, const vec &cv);
 extern bool bboccluded(const ivec &bo, const ivec &br);
 extern occludequery *newquery(void *owner);
 extern void startquery(occludequery *query);
-extern void endquery(occludequery *query);
+extern void endquery(void);
 extern bool checkquery(occludequery *query, bool nowait = false);
 extern void resetqueries();
 extern int getnumqueries();
index c15e4b67acc1030fcfd481a6b5df42e37e5c924b..3840d58876cdc4ae5afa56f9cb308c2294b6d892 100644 (file)
@@ -662,7 +662,7 @@ static int finishlightmap(lightmapworker *w) {
        else return SURFACE_LIGHTMAP_BLEND;
 }
 
-static int previewlightmapalpha(lightmapworker *w, float lpu, const vec &origin1, const vec &xstep1, const vec &ystep1, const vec &origin2, const vec &xstep2, const vec &ystep2, float side0, float sidestep) {
+static int previewlightmapalpha(lightmapworker *w, const vec &origin1, const vec &xstep1, const vec &ystep1, const vec &origin2, const vec &xstep2, const vec &ystep2, float side0, float sidestep) {
        extern int fullbrightlevel;
        uchar *dst = w->colorbuf;
        uchar minalpha = 255, maxalpha = 0;
@@ -1014,7 +1014,7 @@ static int setupsurface(lightmapworker *w, plane planes[2], int numplanes, const
        }
        int surftype = NO_SURFACE;
        if(preview) {
-               surftype = previewlightmapalpha(w, lpu, origin1, xstep1, ystep1, origin2, xstep2, ystep2, side0, sidestep);
+               surftype = previewlightmapalpha(w, origin1, xstep1, ystep1, origin2, xstep2, ystep2, side0, sidestep);
        }
        else {
                lerpvert lv[MAXFACEVERTS];
@@ -1088,7 +1088,7 @@ static lightmapinfo *setupsurfaces(lightmapworker *w, lightmaptask &task) {
                        vertinfo *verts = c.ext->verts() + c.ext->surfaces[i].verts;
                        loopj(numverts) curlitverts[j].set(verts[j].getxyz());
                        if(c.merged&(1<<i)) {
-                               msz = 1<<calcmergedsize(i, mo, size, verts, numverts);
+                               msz = 1<<calcmergedsize(mo, size, verts, numverts);
                                mo.mask(~(msz-1));
                                if(!(surf.numverts&MAXFACEVERTS)) {
                                        surf.verts = numlitverts;
index da9e5ecca51433ad4f0f166a38295929feca9721..6a5cb6012fe81e5ab729a15fd18f33932dcb72d4 100644 (file)
@@ -19,6 +19,7 @@ struct menu : g3d_callback {
        int menutab;
        menu() : name(NULL), header(NULL), contents(NULL), init(NULL), onclear(NULL), showtab(true), keeptab(false), menutab(1) {}
        void gui(g3d_gui &g, bool firstpass) {
+               (void) firstpass;
                cgui = &g;
                guitabnum = menutab;
                cgui->start(menustart, 0.03f, showtab ? &menutab : NULL);
@@ -564,6 +565,7 @@ static vector<change> needsapply;
 
 static struct applymenu : menu {
        void gui(g3d_gui &g, bool firstpass) {
+               (void) firstpass;
                if(guistack.empty()) return;
                g.start(menustart, 0.03f);
                g.text("the following settings have changed:", GUI_TEXT_COLOR, "info");
index 64c21c68b62835208855d27083601488bec1ba11..05c0cf4ed57d9c6eeaa89d9d041ebab54eeb96c2 100644 (file)
@@ -246,6 +246,7 @@ void setlerpstep(float v, lerpbounds &bounds) {
 }
 
 void initlerpbounds(float u, float v, const lerpvert *lv, int numv, lerpbounds &start, lerpbounds &end) {
+       (void) u;
        const lerpvert *first = &lv[0], *second = NULL;
        loopi(numv-1) {
                if(lv[i+1].tc.y < first->tc.y) { second = first; first = &lv[i+1]; }
index 21a3938bd09d89b08a69a4ba0cd9b0f79140398f..521a3b469d626c16e9a1806646c658b075f5f556 100644 (file)
@@ -1064,7 +1064,7 @@ static inline bool mergefacecmp(const facebounds &x, const facebounds &y) {
        return false;
 }
 
-static int mergefacev(int orient, facebounds *m, int sz, facebounds &n) {
+static int mergefacev(facebounds *m, int sz, facebounds &n) {
        for(int i = sz-1; i >= 0; --i) {
                if(m[i].v2 < n.v1) break;
                if(m[i].v2 == n.v1 && m[i].u1 == n.u1 && m[i].u2 == n.u2) {
@@ -1076,7 +1076,7 @@ static int mergefacev(int orient, facebounds *m, int sz, facebounds &n) {
        return 0;
 }
 
-static int mergefaceu(int orient, facebounds &m, facebounds &n) {
+static int mergefaceu(facebounds &m, facebounds &n) {
        if(m.v1 == n.v1 && m.v2 == n.v2 && m.u2 == n.u1) {
                n.u1 = m.u1;
                return 1;
@@ -1084,13 +1084,13 @@ static int mergefaceu(int orient, facebounds &m, facebounds &n) {
        return 0;
 }
 
-static int mergeface(int orient, facebounds *m, int sz, facebounds &n) {
+static int mergeface(facebounds *m, int sz, facebounds &n) {
        for(bool merged = false; sz; merged = true) {
-               int vmerged = mergefacev(orient, m, sz, n);
+               int vmerged = mergefacev(m, sz, n);
                sz -= vmerged;
                if(!vmerged && merged) break;
                if(!sz) break;
-               int umerged = mergefaceu(orient, m[sz-1], n);
+               int umerged = mergefaceu(m[sz-1], n);
                sz -= umerged;
                if(!umerged) break;
        }
@@ -1098,10 +1098,10 @@ static int mergeface(int orient, facebounds *m, int sz, facebounds &n) {
        return sz;
 }
 
-int mergefaces(int orient, facebounds *m, int sz) {
+int mergefaces(facebounds *m, int sz) {
        quicksort(m, sz, mergefacecmp);
        int nsz = 0;
-       loopi(sz) nsz = mergeface(orient, m, nsz, m[i]);
+       loopi(sz) nsz = mergeface(m, nsz, m[i]);
        return nsz;
 }
 
@@ -1342,6 +1342,7 @@ struct plink : pedge {
 };
 
 bool mergepolys(int orient, hashset<plink> &links, vector<plink *> &queue, int owner, poly &p, poly &q, const pedge &e) {
+       (void) orient;
        int pe = -1, qe = -1;
        loopi(p.numverts) if(p.verts[i] == e.from) { pe = i; break; }
        loopi(q.numverts) if(q.verts[i] == e.to) { qe = i; break; }
@@ -1398,6 +1399,7 @@ bool mergepolys(int orient, hashset<plink> &links, vector<plink *> &queue, int o
 }
 
 void addmerge(cube &cu, int orient, const ivec &co, const ivec &n, int offset, poly &p) {
+       (void)co;
        cu.merged |= 1<<orient;
        if(!p.numverts) {
                if(cu.ext) cu.ext->surfaces[orient] = ambientsurface;
@@ -1443,6 +1445,7 @@ static inline void clearmerge(cube &c, int orient) {
 }
 
 void addmerges(int orient, const ivec &co, const ivec &n, int offset, vector<poly> &polys) {
+       (void)co;
        loopv(polys) {
                poly &p = polys[i];
                if(p.merged) addmerge(*p.c, orient, co, n, offset, p);
@@ -1451,6 +1454,7 @@ void addmerges(int orient, const ivec &co, const ivec &n, int offset, vector<pol
 }
 
 void mergepolys(int orient, const ivec &co, const ivec &n, int offset, vector<poly> &polys) {
+       (void) orient;
        if(polys.length() <= 1) { addmerges(orient, co, n, offset, polys); return; }
        hashset<plink> links(polys.length() <= 32 ? 128 : 1024);
        vector<plink *> queue;
@@ -1488,13 +1492,13 @@ struct cfpolys {
 
 static hashtable<cfkey, cfpolys> cpolys;
 
-void genmerges(cube *c = worldroot, const ivec &o = ivec(0, 0, 0), int size = worldsize>>1) {
+void genmerges(int orient = 0, cube *c = worldroot, const ivec &o = ivec(0, 0, 0), int size = worldsize>>1) {
        if((genmergeprogress++&0xFFF)==0) renderprogress(float(genmergeprogress)/allocnodes, "merging faces...");
        neighbourstack[++neighbourdepth] = c;
        loopi(8) {
                ivec co(i, o, size);
                int vis;
-               if(c[i].children) genmerges(c[i].children, co, size>>1);
+               if(c[i].children) genmerges(orient, c[i].children, co, size>>1);
                else if(!isempty(c[i])) loopj(6) if((vis = visibletris(c[i], j, co, size))) {
                        cfkey k;
                        poly p;
@@ -1517,7 +1521,7 @@ void genmerges(cube *c = worldroot, const ivec &o = ivec(0, 0, 0), int size = wo
                }
                if((size == 1<<maxmerge || c == worldroot) && cpolys.numelems) {
                        enumeratekt(cpolys, cfkey, key, cfpolys, val, {
-                               mergepolys(key.orient, co, key.n, key.offset, val.polys);
+                               mergepolys(orient, co, key.n, key.offset, val.polys);
                        });
                        cpolys.clear();
                }
@@ -1525,7 +1529,7 @@ void genmerges(cube *c = worldroot, const ivec &o = ivec(0, 0, 0), int size = wo
        --neighbourdepth;
 }
 
-int calcmergedsize(int orient, const ivec &co, int size, const vertinfo *verts, int numverts) {
+int calcmergedsize(const ivec &co, int size, const vertinfo *verts, int numverts) {
        ushort x1 = verts[0].x, y1 = verts[0].y, z1 = verts[0].z,
                   x2 = x1, y2 = y1, z2 = z1;
        for(int i = 1; i < numverts; i++) {
@@ -1572,7 +1576,7 @@ static void invalidatemerges(cube &c) {
 
 static int invalidatedmerges = 0;
 
-void invalidatemerges(cube &c, const ivec &co, int size, bool msg) {
+void invalidatemerges(cube &c, bool msg) {
        if(msg && invalidatedmerges!=totalmillis) {
                renderprogress(0, "invalidating merged surfaces...");
                invalidatedmerges = totalmillis;
index 61d891742855d86d2108a1d2ae7a7b72e56e2917..4ba5e17e19570c3021873a77f338ab59fe9abb50 100644 (file)
@@ -458,7 +458,7 @@ void readychanges(const ivec &bbmin, const ivec &bbmax, cube *c, const ivec &cor
                                int hasmerges = c[i].ext->va->hasmerges;
                                destroyva(c[i].ext->va);
                                c[i].ext->va = NULL;
-                               if(hasmerges) invalidatemerges(c[i], o, size, true);
+                               if(hasmerges) invalidatemerges(c[i], true);
                        }
                        freeoctaentities(c[i]);
                        c[i].ext->tjoints = -1;
@@ -726,7 +726,7 @@ void freeeditinfo(editinfo *&e) {
        e = NULL;
 }
 
-void pasteblock(block3 &b, selinfo &sel, bool local) {
+void pasteblock(block3 &b, selinfo &sel) {
        sel.s = b.s;
        int o = sel.orient;
        sel.orient = b.orient;
@@ -748,7 +748,7 @@ void mpcopy(editinfo *&e, selinfo &sel, bool local) {
 void mppaste(editinfo *&e, selinfo &sel, bool local) {
        if(e==NULL) return;
        if(local) game::edittrigger(sel, EDIT_PASTE);
-       if(e->copy) pasteblock(*e->copy, sel, local);
+       if(e->copy) pasteblock(*e->copy, sel);
 }
 
 void copy() {
@@ -1603,6 +1603,7 @@ bool cleartexgui() {
 ICOMMAND(cleartexgui, "", (), intret(cleartexgui() ? 1 : 0));
 
 void rendertexturepanel(int w, int h) {
+       (void) w;
        if((texpaneltimer -= curtime)>0 && editmode) {
                glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
                pushhudmatrix();
index afbc7b204481a979ed7d2c0e0444b6be33400d23..aa1da767b258b0156db6e98e3c9f24444dba1216 100644 (file)
@@ -452,7 +452,7 @@ extern const vec orientation_bitangent[8][3] = {
         vec(0, -1,  0), vec(-1, 0,  0), vec(-1,  0, 0) },
 };
 
-void addtris(const sortkey &key, int orient, vertex *verts, int *index, int numverts, int convex, int shadowmask, int tj) {
+void addtris(const sortkey &key, int orient, vertex *verts, int *index, int numverts, int shadowmask, int tj) {
        int &total = vc.worldtris;
        int edge = orient*(MAXFACEVERTS+1);
        loopi(numverts-2) if(index[0]!=index[i+1] && index[i+1]!=index[i+2] && index[i+2]!=index[0]) {
@@ -591,8 +591,8 @@ void guessnormals(const vec *pos, int numverts, vec *normals) {
        normals[3] = n2;
 }
 
-void addcubeverts(VSlot &vslot, int orient, int size, vec *pos, int convex, ushort texture, ushort lmid, vertinfo *vinfo, int numverts, int tj = -1, int grassy = 0, bool alpha = false, int layer = LAYER_TOP) {
-       (void) grassy;
+void addcubeverts(VSlot &vslot, int orient, int size, vec *pos, ushort texture, ushort lmid, vertinfo *vinfo, int numverts, int tj = -1, bool alpha = false, int layer = LAYER_TOP) {
+       (void) size;
        int dim = dimension(orient);
        int shadowmask = alpha ? 0 : calcshadowmask(pos, numverts);
        LightMap *lm = NULL;
@@ -634,7 +634,7 @@ void addcubeverts(VSlot &vslot, int orient, int size, vec *pos, int convex, usho
        }
        if(lmid >= LMID_RESERVED) lmid = lm ? lm->tex : LMID_AMBIENT;
        sortkey key(texture, lmid, !vslot.scroll.iszero() ? dim : 3, layer == LAYER_BLEND ? LAYER_BLEND : LAYER_TOP, alpha ? (vslot.alphaback ? ALPHA_BACK : (vslot.alphafront ? ALPHA_FRONT : NO_ALPHA)) : NO_ALPHA);
-       addtris(key, orient, verts, index, numverts, convex, shadowmask, tj);
+       addtris(key, orient, verts, index, numverts, shadowmask, tj);
 }
 
 struct edgegroup {
@@ -764,7 +764,7 @@ void gencubeedges(cube *c = worldroot, const ivec &co = ivec(0, 0, 0), int size
        --neighbourdepth;
 }
 
-void gencubeverts(cube &c, const ivec &co, int size, int csi) {
+void gencubeverts(cube &c, const ivec &co, int size) {
        if(!(c.visible&0xC0)) return;
        int vismask = ~c.merged & 0x3F;
        if(!(c.visible&0x80)) vismask &= c.visible;
@@ -796,13 +796,13 @@ void gencubeverts(cube &c, const ivec &co, int size, int csi) {
                while(tj >= 0 && tjoints[tj].edge < i*(MAXFACEVERTS+1)) tj = tjoints[tj].next;
                int hastj = tj >= 0 && tjoints[tj].edge < (i+1)*(MAXFACEVERTS+1) ? tj : -1;
                if(!c.ext)
-                       addcubeverts(vslot, i, size, pos, convex, c.texture[i], LMID_AMBIENT, NULL, numverts, hastj, 0, (c.material&MAT_ALPHA)!=0);
+                       addcubeverts(vslot, i, size, pos, c.texture[i], LMID_AMBIENT, NULL, numverts, hastj, (c.material&MAT_ALPHA)!=0);
                else {
                        const surfaceinfo &surf = c.ext->surfaces[i];
                        if(!surf.numverts || surf.numverts&LAYER_TOP)
-                               addcubeverts(vslot, i, size, pos, convex, c.texture[i], surf.lmid[0], verts, numverts, hastj, 0, (c.material&MAT_ALPHA)!=0, LAYER_TOP|(surf.numverts&LAYER_BLEND));
+                               addcubeverts(vslot, i, size, pos, c.texture[i], surf.lmid[0], verts, numverts, hastj, (c.material&MAT_ALPHA)!=0, LAYER_TOP|(surf.numverts&LAYER_BLEND));
                        if(surf.numverts&LAYER_BOTTOM)
-                               addcubeverts(layer ? *layer : vslot, i, size, pos, convex, vslot.layer, surf.lmid[1], surf.numverts&LAYER_DUP ? verts + numverts : verts, numverts, hastj);
+                               addcubeverts(layer ? *layer : vslot, i, size, pos, vslot.layer, surf.lmid[1], surf.numverts&LAYER_DUP ? verts + numverts : verts, numverts, hastj);
                }
        }
 }
@@ -920,7 +920,7 @@ int genmergedfaces(cube &c, const ivec &co, int size, int minlevel = -1) {
                mf.numverts = surf.numverts;
                mf.verts = c.ext->verts() + surf.verts;
                mf.tjoints = -1;
-               int level = calcmergedsize(i, co, size, mf.verts, mf.numverts&MAXFACEVERTS);
+               int level = calcmergedsize(co, size, mf.verts, mf.numverts&MAXFACEVERTS);
                if(level > minlevel) {
                        maxlevel = max(maxlevel, level);
                        while(tj >= 0 && tjoints[tj].edge < i*(MAXFACEVERTS+1)) tj = tjoints[tj].next;
@@ -971,7 +971,7 @@ void addmergedverts(int level, const ivec &o) {
                        pos[i] = vec(v.x, v.y, v.z).mul(1.0f/8).add(vo);
                }
                VSlot &vslot = lookupvslot(mf.tex, true);
-               addcubeverts(vslot, mf.orient, 1<<level, pos, 0, mf.tex, mf.lmid, mf.verts, numverts, mf.tjoints, 0, (mf.mat&MAT_ALPHA)!=0, mf.numverts&LAYER_BLEND);
+               addcubeverts(vslot, mf.orient, 1<<level, pos, mf.tex, mf.lmid, mf.verts, numverts, mf.tjoints, (mf.mat&MAT_ALPHA)!=0, mf.numverts&LAYER_BLEND);
                vahasmerges |= MERGE_USE;
        }
        mfl.setsize(0);
@@ -1002,7 +1002,7 @@ void rendercube(cube &c, const ivec &co, int size, int csi, int &maxlevel) {  //
                return;
        }
        if(!isempty(c)) {
-               gencubeverts(c, co, size, csi);
+               gencubeverts(c, co, size);
                if(c.merged) maxlevel = max(maxlevel, genmergedfaces(c, co, size));
        }
        if(c.material != MAT_AIR) genmatsurfs(c, co, size, vc.matsurfs);
index 17dfb37a691e1e762c7f298d9f3270da3297cd6d..f7e534267f2ddc9b64b5149bac66ffdc15b2da84 100644 (file)
@@ -80,7 +80,7 @@ void resetclipplanes() {
 
 vec hitsurface;
 
-static inline bool raycubeintersect(const clipplanes &p, const cube &c, const vec &v, const vec &ray, const vec &invray, float &dist) {
+static inline bool raycubeintersect(const clipplanes &p, const vec &v, const vec &ray, const vec &invray, float &dist) {
        int entry = -1, bbentry = -1;
        INTERSECTPLANES(entry = i, return false);
        INTERSECTBOX(bbentry = i, return false);
@@ -128,7 +128,7 @@ static float disttoent(octaentities *oc, const vec &o, const vec &ray, float rad
        return dist;
 }
 
-static float disttooutsideent(const vec &o, const vec &ray, float radius, int mode, extentity *t) {
+static float disttooutsideent(const vec &o, const vec &ray, float radius, extentity *t) {
        vec eo, es;
        int orient;
        float dist = radius, f = 0.0f;
@@ -257,7 +257,7 @@ float raycube(const vec &o, const vec &ray, float radius, int mode, int size, ex
                if(!isempty(c)) {
                        const clipplanes &p = getclipplanes(c, lo, lsize, false, 1);
                        float f = 0;
-                       if(raycubeintersect(p, c, v, ray, invray, f) && (dist+f>0 || !(mode&RAY_SKIPFIRST)))
+                       if(raycubeintersect(p, v, ray, invray, f) && (dist+f>0 || !(mode&RAY_SKIPFIRST)))
                                return min(dent, dist+f);
                }
                FINDCLOSEST(closest = 0, closest = 1, closest = 2);
@@ -350,7 +350,7 @@ float rayent(const vec &o, const vec &ray, float radius, int mode, int size, int
        hitorient = -1;
        float dist = raycube(o, ray, radius, mode, size);
        if((mode&RAY_ENTS) == RAY_ENTS) {
-               float dent = disttooutsideent(o, ray, dist < 0 ? 1e16f : dist, mode, NULL);
+               float dent = disttooutsideent(o, ray, dist < 0 ? 1e16f : dist, NULL);
                if(dent < 1e15f && (dist < 0 || dent < dist)) dist = dent;
        }
        orient = hitorient;
index cfdf32661cd955482f1ceb2dd3120d68995acc39..8174e22dc34d3bac6a77addf8681c29abcbd9e41 100644 (file)
@@ -515,7 +515,7 @@ void endmodelbatches() {
                        batchedmodel &bm = b.batched[j];
                        if(bm.flags&(MDL_CULL_VFC|MDL_GHOST)) continue;
                        if(bm.query!=query) {
-                               if(query) endquery(query);
+                               if(query) endquery();
                                query = bm.query;
                                if(query) startquery(query);
                        }
@@ -529,7 +529,7 @@ void endmodelbatches() {
                        if(!rendered) { b.m->startrender(); rendered = true; }
                        renderbatchedmodel(b.m, bm);
                }
-               if(query) endquery(query);
+               if(query) endquery();
                if(rendered) b.m->endrender();
        }
        if(transparent.length()) {
@@ -543,13 +543,13 @@ void endmodelbatches() {
                                (lastmodel = tm.m)->startrender();
                        }
                        if(query!=tm.batched->query) {
-                               if(query) endquery(query);
+                               if(query) endquery();
                                query = tm.batched->query;
                                if(query) startquery(query);
                        }
                        renderbatchedmodel(tm.m, *tm.batched);
                }
-               if(query) endquery(query);
+               if(query) endquery();
                if(lastmodel) lastmodel->endrender();
        }
        numbatches = -1;
@@ -585,7 +585,7 @@ void endmodelquery() {
                while(b.batched.length() && b.batched.last().query==modelquery);
                b.m->endrender();
        }
-       endquery(modelquery);
+       endquery();
        modelquery = NULL;
        modelattached.setsize(minattached);
 }
@@ -596,7 +596,7 @@ static inline void enablecullmodelquery() {
        startbb();
 }
 
-static inline void rendercullmodelquery(model *m, dynent *d, const vec &center, float radius) {
+static inline void rendercullmodelquery(dynent *d, const vec &center, float radius) {
        if(fabs(camera1->o.x-center.x) < radius+1 &&
           fabs(camera1->o.y-center.y) < radius+1 &&
           fabs(camera1->o.z-center.z) < radius+1) {
@@ -608,7 +608,7 @@ static inline void rendercullmodelquery(model *m, dynent *d, const vec &center,
        startquery(d->query);
        int br = int(radius*2)+1;
        drawbb(ivec(int(center.x-radius), int(center.y-radius), int(center.z-radius)), ivec(br, br, br));
-       endquery(d->query);
+       endquery();
 }
 
 static inline void disablecullmodelquery() {
@@ -663,7 +663,7 @@ void rendermodel(entitylight *light, const char *mdl, int anim, const vec &o, fl
                if(culled) {
                        if(culled&(MDL_CULL_OCCLUDED|MDL_CULL_QUERY) && flags&MDL_CULL_QUERY) {
                                enablecullmodelquery();
-                               rendercullmodelquery(m, d, center, radius);
+                               rendercullmodelquery(d, center, radius);
                                disablecullmodelquery();
                        }
                        return;
@@ -756,7 +756,7 @@ void rendermodel(entitylight *light, const char *mdl, int anim, const vec &o, fl
                if(d->query) startquery(d->query);
        }
        m->render(anim, basetime, basetime2, o, yaw, pitch, d, a, lightcolor, lightdir, trans);
-       if(flags&MDL_CULL_QUERY && d->query) endquery(d->query);
+       if(flags&MDL_CULL_QUERY && d->query) endquery();
        m->endrender();
 }
 
index 637dcb22fcc2be3accfaa405c63edcfefed20dad..a3cc91f6029d146bbb8765b93ebe7d9e7ed9076f 100644 (file)
@@ -138,9 +138,9 @@ struct partrenderer {
        }
        virtual ~partrenderer() {
        }
-       virtual void init(int n) { }
+       virtual void init(int) { }
        virtual void reset() = 0;
-       virtual void resettracked(physent *owner) { }
+       virtual void resettracked(physent *) { }
        virtual particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity = 0) = 0;
        virtual void update() { }
        virtual void render() = 0;
@@ -201,8 +201,7 @@ struct listrenderer : partrenderer {
        }
        virtual ~listrenderer() {
        }
-       virtual void killpart(listparticle *p) {
-       }
+       virtual void killpart(listparticle *) {}
        void reset() {
                if(!list) return;
                listparticle *p = list;
@@ -301,6 +300,7 @@ struct meterrenderer : listrenderer {
                glEnable(GL_BLEND);
        }
        void renderpart(listparticle *p, const vec &o, const vec &d, int blend, int ts) {
+               (void) ts; (void) d; (void) blend;
                int basetype = type&0xFF;
                float scale = FONTH*p->size/80.0f, right = 8, left = p->progress/100.0f*right;
                matrix4x3 m(camright, vec(camup).neg(), vec(camdir).neg(), o);
@@ -362,6 +362,7 @@ struct textrenderer : listrenderer {
                if(p->text && p->flags&1) delete[] p->text;
        }
        void renderpart(listparticle *p, const vec &o, const vec &d, int blend, int ts) {
+               (void) ts; (void) d;
                float scale = p->size/80.0f, xoff = -(text_width(p->text) + ((p->flags>>1)&7)*FONTH)/2, yoff = 0;
                matrix4x3 m(camright, vec(camup).neg(), vec(camdir).neg(), o);
                m.scale(scale);
@@ -387,6 +388,7 @@ struct texticonrenderer : listrenderer {
                gle::end();
        }
        void renderpart(listparticle *p, const vec &o, const vec &d, int blend, int ts) {
+               (void) ts; (void) d;
                float scale = p->size/80.0f, xoff = p->val, yoff = 0;
                matrix4x3 m(camright, vec(camup).neg(), vec(camdir).neg(), o);
                m.scale(scale);
@@ -485,6 +487,7 @@ static inline void seedpos(particleemitter &pe, const vec &o, const vec &d, int
 
 template<>
 inline void seedpos<PT_TAPE>(particleemitter &pe, const vec &o, const vec &d, int fade, float size, int grav) {
+       (void) pe; (void) o; (void) fade; (void) grav;
        pe.extendbb(d, size);
 }
 
index a98614a7d482c88702eac0048390ed977dfb239c..be57ab376ee636ba3d785694be5fda583905b24c 100644 (file)
@@ -217,7 +217,7 @@ void startquery(occludequery *query) {
        glBeginQuery_(GL_SAMPLES_PASSED, query->id);
 }
 
-void endquery(occludequery *query) {
+void endquery(void) {
        glEndQuery_(GL_SAMPLES_PASSED);
 }
 
@@ -390,7 +390,7 @@ void rendermapmodels() {
                }
                startquery(oe->query);
                drawbb(oe->bbmin, ivec(oe->bbmax).sub(oe->bbmin));
-               endquery(oe->query);
+               endquery();
        }
        if(!queried) {
                endbb();
@@ -556,7 +556,7 @@ static void renderquery(renderstate &cur, occludequery *query, vtxarray *va, boo
        startquery(query);
        if(full) drawbb(ivec(va->bbmin).sub(1), ivec(va->bbmax).sub(va->bbmin).add(2));
        else drawbb(va->geommin, ivec(va->geommax).sub(va->geommin));
-       endquery(query);
+       endquery();
 }
 
 enum {
@@ -694,7 +694,7 @@ static void changevbuf(renderstate &cur, int pass, vtxarray *va) {
        }
 }
 
-static void changebatchtmus(renderstate &cur, int pass, geombatch &b) {
+static void changebatchtmus(renderstate &cur, geombatch &b) {
        bool changed = false;
        extern bool brightengeom;
        extern int fullbright;
@@ -778,7 +778,7 @@ static void changetexgen(renderstate &cur, int dim, Slot &slot, VSlot &vslot) {
        cur.texgendim = dim;
 }
 
-static void renderbatch(renderstate &cur, int pass, geombatch &b) {
+static void renderbatch(geombatch &b) {
        geombatch *shadowed = NULL;
        int rendered = -1;
        for(geombatch *curbatch = &b;; curbatch = &geombatches[curbatch->batch]) {
@@ -840,8 +840,8 @@ static void renderbatches(renderstate &cur, int pass) {
                        if(cur.texgendim != b.es.dim || (cur.texgendim <= 2 && cur.texgenvslot != &b.vslot)) changetexgen(cur, b.es.dim, *b.vslot.slot, b.vslot);
                }
                else if(cur.texgendim != b.es.dim) changetexgen(cur, b.es.dim, *b.vslot.slot, b.vslot);
-               if(pass == RENDERPASS_LIGHTMAP) changebatchtmus(cur, pass, b);
-               renderbatch(cur, pass, b);
+               if(pass == RENDERPASS_LIGHTMAP) changebatchtmus(cur, b);
+               renderbatch(b);
        }
        resetbatches();
 }
@@ -881,7 +881,7 @@ void renderzpass(renderstate &cur, vtxarray *va) {
                if(va->query) { \
                 \
                        flush; \
-                       endquery(va->query); \
+                       endquery(); \
                } \
        } while(0)
 
index ad5d34eaf0997567f0e1b880da23dbb7eacce5c4..140acf8181a52d9c94772af8b2ca67a43a178007 100644 (file)
@@ -169,16 +169,19 @@ struct skelmodel : animmodel {
                        m.tcstride = sizeof(vert);
                }
                static inline void assignvert(vvertn &vv, int j, vert &v, blendcombo &c) {
+                       (void)j;(void)c;
                        vv.pos = v.pos;
                        vv.norm = v.norm;
                        vv.tc = v.tc;
                }
                inline void assignvert(vvertbump &vv, int j, vert &v, blendcombo &c) {
+                       (void)c;
                        vv.pos = v.pos;
                        vv.tc = v.tc;
                        vv.tangent = bumpverts[j].tangent;
                }
                static inline void assignvert(vvertnw &vv, int j, vert &v, blendcombo &c) {
+                       (void)j;
                        vv.pos = v.pos;
                        vv.norm = v.norm;
                        vv.tc = v.tc;
@@ -251,7 +254,7 @@ struct skelmodel : animmodel {
                        vdata += voffset;
                        loopi(numverts) fillvert(vdata[i], verts[i]);
                }
-               void interpverts(const dualquat * RESTRICT bdata1, const dualquat * RESTRICT bdata2, bool tangents, void * RESTRICT vdata, skin &s) {
+               void interpverts(const dualquat * RESTRICT bdata1, const dualquat * RESTRICT bdata2, bool tangents, void * RESTRICT vdata) {
                        const int blendoffset = ((skelmeshgroup *)group)->skel->numgpubones;
                        bdata2 -= blendoffset;
                        #define IPLOOP(type, dosetup, dotransform) \
@@ -284,6 +287,7 @@ struct skelmodel : animmodel {
                        else s->setvariant(min(maxweights, g->vweights)-1, 0);
                }
                void render(const animstate *as, skin &s, vbocacheentry &vc) {
+                       (void) as;(void) s;(void) vc;
                        if(!Shader::lastshader) return;
                        glDrawRangeElements_(GL_TRIANGLES, minvert, maxvert, elen, GL_UNSIGNED_SHORT, &((skelmeshgroup *)group)->edata[eoffset]);
                        glde++;
@@ -741,6 +745,7 @@ struct skelmodel : animmodel {
                        loopv(antipodes) sc.bdata[antipodes[i].child].fixantipodal(sc.bdata[antipodes[i].parent]);
                }
                void concattagtransform(part *p, int i, const matrix4x3 &m, matrix4x3 &n) {
+                       (void)i;(void)m;(void)n;(void)p;
                        matrix4x3 t;
                        t.mul(bones[tags[i].bone].base, tags[i].matrix);
                        t.posttranslate(p->translate, p->model->scale);
@@ -960,6 +965,7 @@ struct skelmodel : animmodel {
                        gle::clearebo();
                }
                void bindvbo(const animstate *as, vbocacheentry &vc, skelcacheentry *sc = NULL, blendcacheentry *bc = NULL) {
+                       (void) bc;
                        vvert *vverts = 0;
                        bindpos(ebuf, vc.vbuf, &vverts->pos, vertsize);
                        if(as->cur.anim&ANIM_NOSKIN) {
@@ -995,6 +1001,7 @@ struct skelmodel : animmodel {
                        }
                }
                void concattagtransform(part *p, int i, const matrix4x3 &m, matrix4x3 &n) {
+                       (void)i;(void)m;(void)n;(void)p;
                        skel->concattagtransform(p, i, m, n);
                }
                int addblendcombo(const blendcombo &c) {
@@ -1131,7 +1138,7 @@ struct skelmodel : animmodel {
                                        (animcacheentry &)vc = sc;
                                        loopv(meshes) {
                                                skelmesh &m = *(skelmesh *)meshes[i];
-                                               m.interpverts(sc.bdata, bc ? bc->bdata : NULL, tangents, vdata + m.voffset*vertsize, p->skins[i]);
+                                               m.interpverts(sc.bdata, bc ? bc->bdata : NULL, tangents, vdata + m.voffset*vertsize);
                                        }
                                        gle::bindvbo(vc.vbuf);
                                        glBufferData_(GL_ARRAY_BUFFER, vlen*vertsize, vdata, GL_STREAM_DRAW);
index 744996ecc0571344c6f7cec2545fe120101e052a..e372815a376db02f5b23456c83fa525ee6fd1c81 100644 (file)
@@ -700,7 +700,7 @@ GLenum textarget(GLenum subtarget) {
        return subtarget;
 }
 
-void setuptexparameters(int tnum, int clamp, int filter, GLenum format, GLenum target) {
+void setuptexparameters(int tnum, int clamp, int filter, GLenum target) {
        glBindTexture(target, tnum);
        glTexParameteri(target, GL_TEXTURE_WRAP_S, clamp&1 ? GL_CLAMP_TO_EDGE : (clamp&0x100 ? GL_MIRRORED_REPEAT : GL_REPEAT));
        glTexParameteri(target, GL_TEXTURE_WRAP_T, clamp&2 ? GL_CLAMP_TO_EDGE : (clamp&0x200 ? GL_MIRRORED_REPEAT : GL_REPEAT));
@@ -801,7 +801,7 @@ static GLenum textype(GLenum &component, GLenum &format) {
 
 void createtexture(int tnum, int w, int h, void *pixels, int clamp, int filter, GLenum component, GLenum subtarget, int pw, int ph, int pitch, bool resize, GLenum format) {
        GLenum target = textarget(subtarget), type = textype(component, format);
-       if(filter >= 0 && clamp >= 0) setuptexparameters(tnum, clamp, filter, format, target);
+       if(filter >= 0 && clamp >= 0) setuptexparameters(tnum, clamp, filter, target);
        if(!pw) pw = w;
        if(!ph) ph = h;
        int tw = w, th = h;
@@ -815,7 +815,7 @@ void createtexture(int tnum, int w, int h, void *pixels, int clamp, int filter,
 
 void createcompressedtexture(int tnum, int w, int h, uchar *data, int align, int blocksize, int levels, int clamp, int filter, GLenum format, GLenum subtarget) {
        GLenum target = textarget(subtarget);
-       if(filter >= 0 && clamp >= 0) setuptexparameters(tnum, clamp, filter, format, target);
+       if(filter >= 0 && clamp >= 0) setuptexparameters(tnum, clamp, filter, target);
        uploadcompressedtexture(target, subtarget, format, w, h, data, align, blocksize, levels, filter > 1);
 }
 
index 69a78d0e6a3cc0027e7ba3b39c900e1baa08cf17..d2941d08c38777d1fcd868aa670683ead8c9f180 100644 (file)
@@ -288,6 +288,7 @@ void entrotate(int *cw) {
        if(noentedit()) return;
        int d = dimension(sel.orient);
        int dd = (*cw<0) == dimcoord(sel.orient) ? R[d] : C[d];
+       (void) dd;
        vec s(sel.o.v);
        groupeditpure(
                e.o[dd] -= (e.o[dd]-(sel.s[dd]*sel.grid/2+sel.o[dd]))*2;
@@ -756,7 +757,6 @@ void nearestent() {
 
 ICOMMAND(enthavesel,"",  (), addimplicit(intret(entgroup.length())));
 ICOMMAND(entselect, "e", (uint *body), if(!noentedit()) addgroup(e.type != ET_EMPTY && entgroup.find(n)<0 && executebool(body)));
-ICOMMAND(entloop,   "e", (uint *body), if(!noentedit()) addimplicit(groupeditloop(((void)e, execute(body)))));
 ICOMMAND(insel,         "",  (), entfocus(efocus, intret(pointinsel(sel, e.o))));
 ICOMMAND(entindex,  "",  (), intret(efocus));
 COMMAND(entset, "siiiii");
index d167582294784b65270a5804f1f057d816ee616d..d5501c4e1209c06f2c83ded909e166fc3045c0da 100644 (file)
@@ -524,13 +524,6 @@ namespace game {
        const char *teamcolor(const char *name, const char *team, const char *alt) {
                return teamcolor(name, team && isteam(team, player1->team), alt);
        }
-       VARP(teamsounds, 0, 1, 1);
-       void teamsound(bool sameteam, int n, const vec *loc) {
-               playsound(n, loc, NULL);
-       }
-       void teamsound(fpsent *d, int n, const vec *loc) {
-               teamsound(isteam(d->team, player1->team), n, loc);
-       }
        void suicide(physent *d) {
                if(d==player1 || (d->type==ENT_PLAYER && ((fpsent *)d)->ai)) {
                        if(d->state!=CS_ALIVE) return;
index c76498a9d4813316ceb4f0fab1790bfdc2f30b9e..92d4fd1038c6cab228cd727732b143aecaf6b8de 100644 (file)
@@ -515,8 +515,6 @@ namespace game {
        extern const char *teamcolorname(fpsent *d, const char *alt = "you");
        extern const char *teamcolor(const char *name, bool sameteam, const char *alt = NULL);
        extern const char *teamcolor(const char *name, const char *team, const char *alt = NULL);
-       extern void teamsound(bool sameteam, int n, const vec *loc = NULL);
-       extern void teamsound(fpsent *d, int n, const vec *loc = NULL);
        extern fpsent *pointatplayer();
        extern fpsent *hudplayer();
        extern fpsent *followingplayer(fpsent *fallback = NULL);