Index: src/clientextras.m ================================================================== --- src/clientextras.m +++ src/clientextras.m @@ -120,11 +120,11 @@ [scoreLines addObject:line]; menumanual(0, scoreLines.count - 1, line); } -static const int maxTeams = 4; +#define maxTeams 4 static OFString *teamName[maxTeams]; static int teamScore[maxTeams]; static size_t teamsUsed; void Index: src/editing.m ================================================================== --- src/editing.m +++ src/editing.m @@ -527,11 +527,11 @@ EDITSEL; setvdeltaxy(delta, &sel); addmsg(1, 6, SV_EDITD, sel.x, sel.y, sel.xs, sel.ys, delta); } -const int MAXARCHVERT = 50; +#define MAXARCHVERT 50 int archverts[MAXARCHVERT][MAXARCHVERT]; bool archvinit = false; void archvertex(int span, int vert, int delta) Index: src/renderextras.m ================================================================== --- src/renderextras.m +++ src/renderextras.m @@ -79,11 +79,11 @@ glEnable(GL_BLEND); glEnable(GL_TEXTURE_2D); glDepthMask(GL_TRUE); } -const int MAXSPHERES = 50; +#define MAXSPHERES 50 struct sphere { OFVector3D o; float size, max; int type; struct sphere *next; Index: src/rendergl.m ================================================================== --- src/rendergl.m +++ src/rendergl.m @@ -159,21 +159,22 @@ // management of texture slots // each texture slot can have multople texture frames, of which currently only // the first is used additional frames can be used for various shaders -static const int MAXTEX = 1000; +#define MAXTEX 1000 static int texx[MAXTEX]; // ( loaded texture ) -> ( name, size ) static int texy[MAXTEX]; static OFString *texname[MAXTEX]; static int curtex = 0; static const int FIRSTTEX = 1000; // opengl id = loaded id + FIRSTTEX // std 1+, sky 14+, mdls 20+ -static const int MAXFRAMES = 2; // increase to allow more complex shader defs -static int mapping[256] - [MAXFRAMES]; // ( cube texture, frame ) -> ( opengl id, name ) +// increase to allow more complex shader defs +#define MAXFRAMES 2 +// ( cube texture, frame ) -> ( opengl id, name ) +static int mapping[256][MAXFRAMES]; static OFString *mapname[256][MAXFRAMES]; void purgetextures() { Index: src/renderparticles.m ================================================================== --- src/renderparticles.m +++ src/renderparticles.m @@ -2,11 +2,11 @@ #include "cube.h" #import "DynamicEntity.h" -const int MAXPARTICLES = 10500; +#define MAXPARTICLES 10500 const int NUMPARTCUTOFF = 20; struct particle { OFVector3D o, d; int fade, type; int millis; Index: src/weapon.m ================================================================== --- src/weapon.m +++ src/weapon.m @@ -5,11 +5,11 @@ #import "DynamicEntity.h" #import "OFString+Cube.h" #import "Projectile.h" static const int MONSTERDAMAGEFACTOR = 4; -static const int SGRAYS = 20; +#define SGRAYS 20 static const float SGSPREAD = 2; static OFVector3D sg[SGRAYS]; static const struct { short sound, attackdelay, damage, projspeed, part, kickamount; @@ -130,11 +130,11 @@ } return nil; } -static const size_t MAXPROJ = 100; +#define MAXPROJ 100 static Projectile *projs[MAXPROJ]; void projreset() {