diff --git a/polymer/eduke32/build/include/scriptfile.h b/polymer/eduke32/build/include/scriptfile.h index a19531a9a..c20266412 100644 --- a/polymer/eduke32/build/include/scriptfile.h +++ b/polymer/eduke32/build/include/scriptfile.h @@ -14,7 +14,7 @@ int32_t scriptfile_getnumber(scriptfile *sf, int32_t *num); int32_t scriptfile_getdouble(scriptfile *sf, double *num); int32_t scriptfile_getstring(scriptfile *sf, char **st); int32_t scriptfile_getsymbol(scriptfile *sf, int32_t *num); -int32_t scriptfile_getlinum(scriptfile *sf, char *ptr); +int32_t scriptfile_getlinum(const scriptfile *sf, const char *ptr); int32_t scriptfile_getbraces(scriptfile *sf, char **braceend); scriptfile *scriptfile_fromfile(const char *fn); diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index 228d4d4a7..559c8be26 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -73,7 +73,7 @@ static int32_t allocvbos = 0, curvbo = 0; static GLuint *vertvbos = NULL; static GLuint *indexvbos = NULL; -mdmodel_t *mdload(const char *); +static mdmodel_t *mdload(const char *); int32_t mddraw(spritetype *); static void mdfree(mdmodel_t *); int32_t globalnoeffect=0; @@ -725,7 +725,10 @@ static int32_t mdloadskin_cached(int32_t fil, texcacheheader *head, int32_t *doa } bglBindTexture(GL_TEXTURE_2D,*glpic); - bglGetError(); + while (bglGetError() != GL_NO_ERROR) + { + /* no-op*/ + } // load the mipmaps for (level = 0; level==0 || (pict.xdim > 1 || pict.ydim > 1); level++) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 3d0977320..c81cd2b36 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -1457,7 +1457,11 @@ void writexcache(char *fn, int32_t len, int32_t dameth, char effect, texcachehea if (Bwrite(cachefilehandle, head, sizeof(texcacheheader)) != sizeof(texcacheheader)) goto failure; - bglGetError(); + while (bglGetError() != GL_NO_ERROR) + { + /* no-op*/ + } + for (level = 0; level==0 || (padx > 1 || pady > 1); level++) { bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_ARB, (GLint *)&gi); diff --git a/polymer/eduke32/build/src/scriptfile.c b/polymer/eduke32/build/src/scriptfile.c index 446303a0e..9dd85dec7 100644 --- a/polymer/eduke32/build/src/scriptfile.c +++ b/polymer/eduke32/build/src/scriptfile.c @@ -183,7 +183,7 @@ int32_t scriptfile_getbraces(scriptfile *sf, char **braceend) } -int32_t scriptfile_getlinum(scriptfile *sf, char *ptr) +int32_t scriptfile_getlinum(const scriptfile *sf, const char *ptr) { int32_t i, stp; intptr_t ind; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 5a36e1205..b9d2ee171 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1008,7 +1008,7 @@ static inline void G_SetupBackdrop(int16_t sky) G_MultiPskyInit(); } - Bmemset(pskyoff, 0, sizeof(pskyoff[0]) * MAXPSKYTILES); + Bmemset(pskyoff, 0, sizeof(pskyoff)); if (parallaxyscale != 65536) parallaxyscale = 32768;