diff --git a/polymer/build/include/glbuild.h b/polymer/build/include/glbuild.h index 8d4ad9118..3e0867bc3 100644 --- a/polymer/build/include/glbuild.h +++ b/polymer/build/include/glbuild.h @@ -65,7 +65,7 @@ extern const GLubyte* (APIENTRY * bglGetString)( GLenum name ); extern void (APIENTRY * bglHint)( GLenum target, GLenum mode ); extern void (APIENTRY * bglDrawBuffer)(GLenum mode); extern void (APIENTRY * bglReadBuffer)(GLenum mode); -extern void (APIENTRY * bglScissor)(GLint x, GLint y, GLsizei width, GLsizei height); +extern void (APIENTRY * bglScissor)(GLint x, GLint y, GLsizei width, GLsizei height); // Depth extern void (APIENTRY * bglDepthFunc)( GLenum func ); @@ -167,13 +167,13 @@ extern void (APIENTRY * bglFramebufferTexture2DEXT)(GLenum target, GLenum attach extern GLenum (APIENTRY * bglCheckFramebufferStatusEXT)(GLenum target); extern void (APIENTRY * bglDeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers); -// Vertex Buffer Objects -extern void (APIENTRY * bglGenBuffersARB)(GLsizei n, GLuint * buffers); -extern void (APIENTRY * bglBindBufferARB)(GLenum target, GLuint buffer); -extern void (APIENTRY * bglDeleteBuffersARB)(GLsizei n, const GLuint * buffers); -extern void (APIENTRY * bglBufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); -extern void* (APIENTRY * bglMapBufferARB)(GLenum target, GLenum access); -extern GLboolean (APIENTRY * bglUnmapBufferARB)(GLenum target); +// Vertex Buffer Objects +extern void (APIENTRY * bglGenBuffersARB)(GLsizei n, GLuint * buffers); +extern void (APIENTRY * bglBindBufferARB)(GLenum target, GLuint buffer); +extern void (APIENTRY * bglDeleteBuffersARB)(GLsizei n, const GLuint * buffers); +extern void (APIENTRY * bglBufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); +extern void* (APIENTRY * bglMapBufferARB)(GLenum target, GLenum access); +extern GLboolean (APIENTRY * bglUnmapBufferARB)(GLenum target); // GLU extern void (APIENTRY * bgluTessBeginContour) (GLUtesselator* tess); @@ -190,7 +190,7 @@ extern void (APIENTRY * bgluPerspective) (GLdouble fovy, GLdouble as extern const GLubyte * (APIENTRY * bgluErrorString) (GLenum error); -extern GLint (APIENTRY * bgluProject)(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); +extern GLint (APIENTRY * bgluProject)(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); #ifdef RENDERTYPEWIN @@ -214,5 +214,6 @@ extern char *gldriver; int loadgldriver(const char *driver); int loadglextensions(void); int unloadgldriver(void); - int loadglulibrary(const char *driver); + +int loadglulibrary(const char *driver); int unloadglulibrary(void); diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 66b8b9f2d..8b1f5f756 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -518,7 +518,7 @@ void loadmhk() { char *p;char levname[BMAX_PATH]; - if(!mhk)return; + if (!mhk)return; strcpy(levname, boardfilename); p = Bstrrchr(levname,'.'); if (!p) strcat(levname,".mhk"); @@ -618,11 +618,11 @@ void editinput(void) memset(spriteext, 0, sizeof(spriteexttype) * MAXSPRITES); memset(spritesmooth, 0, sizeof(spritesmooth)); mhk=0; - initprintf("Maphacks dissabled\n"); + initprintf("Maphacks disabled\n"); keystatus[0x44] = 0; } begindrawing(); //{{{ - if(mhk)printext256(0,16,whitecol,0,(mhk==1)?"Maphacks ON":"Maphacks ON (not found)",0); + if (mhk)printext256(0,16,whitecol,0,(mhk==1)?"Maphacks ON":"Maphacks ON (not found)",0); enddrawing(); //}}} if (angvel != 0) //ang += angvel * constant diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index cd2f86c37..3e89bbd30 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -1418,6 +1418,19 @@ int gloadtile_cached(int fil, texcacheheader *head, int *doalloc, pthtyp *pth,in bglCompressedTexImage2DARB(GL_TEXTURE_2D,level,pict.format,pict.xdim,pict.ydim,pict.border, pict.size,pic); if (bglGetError() != GL_NO_ERROR) goto failure; + + { + GLint format; + bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, &format); + if (bglGetError() != GL_NO_ERROR) goto failure; + format = B_LITTLE32(format); + if (pict.format != format) + { + initprintf("invalid texture cache file format %d %d\n",pict.format, format); + goto failure; + } + } + } if (midbuf) free(midbuf); diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index ba9e33194..675c7e1cb 100755 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -513,7 +513,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer) return; } - if ((aGameVars[id].dwFlags & GAMEVAR_FLAG_PERACTOR)) + if (aGameVars[id].dwFlags & GAMEVAR_FLAG_PERACTOR) { if (iActor < 0 || iActor > MAXSPRITES-1) { @@ -528,7 +528,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer) if (aGameVars[id].dwFlags & GAMEVAR_FLAG_INTPTR) { // set the value at pointer - *((int*)aGameVars[id].lValue)=lValue; + *((int*)aGameVars[id].lValue)=(int)lValue; return; }