git-svn-id: https://svn.eduke32.com/eduke32@614 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-02-07 04:38:28 +00:00
parent 30b1ce5f54
commit d7d11939a6
4 changed files with 29 additions and 15 deletions

View file

@ -65,7 +65,7 @@ extern const GLubyte* (APIENTRY * bglGetString)( GLenum name );
extern void (APIENTRY * bglHint)( GLenum target, GLenum mode ); extern void (APIENTRY * bglHint)( GLenum target, GLenum mode );
extern void (APIENTRY * bglDrawBuffer)(GLenum mode); extern void (APIENTRY * bglDrawBuffer)(GLenum mode);
extern void (APIENTRY * bglReadBuffer)(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 // Depth
extern void (APIENTRY * bglDepthFunc)( GLenum func ); 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 GLenum (APIENTRY * bglCheckFramebufferStatusEXT)(GLenum target);
extern void (APIENTRY * bglDeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers); extern void (APIENTRY * bglDeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers);
// Vertex Buffer Objects // Vertex Buffer Objects
extern void (APIENTRY * bglGenBuffersARB)(GLsizei n, GLuint * buffers); extern void (APIENTRY * bglGenBuffersARB)(GLsizei n, GLuint * buffers);
extern void (APIENTRY * bglBindBufferARB)(GLenum target, GLuint buffer); extern void (APIENTRY * bglBindBufferARB)(GLenum target, GLuint buffer);
extern void (APIENTRY * bglDeleteBuffersARB)(GLsizei n, const GLuint * buffers); 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 * bglBufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage);
extern void* (APIENTRY * bglMapBufferARB)(GLenum target, GLenum access); extern void* (APIENTRY * bglMapBufferARB)(GLenum target, GLenum access);
extern GLboolean (APIENTRY * bglUnmapBufferARB)(GLenum target); extern GLboolean (APIENTRY * bglUnmapBufferARB)(GLenum target);
// GLU // GLU
extern void (APIENTRY * bgluTessBeginContour) (GLUtesselator* tess); 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 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 #ifdef RENDERTYPEWIN
@ -214,5 +214,6 @@ extern char *gldriver;
int loadgldriver(const char *driver); int loadgldriver(const char *driver);
int loadglextensions(void); int loadglextensions(void);
int unloadgldriver(void); int unloadgldriver(void);
int loadglulibrary(const char *driver);
int loadglulibrary(const char *driver);
int unloadglulibrary(void); int unloadglulibrary(void);

View file

@ -518,7 +518,7 @@ void loadmhk()
{ {
char *p;char levname[BMAX_PATH]; char *p;char levname[BMAX_PATH];
if(!mhk)return; if (!mhk)return;
strcpy(levname, boardfilename); strcpy(levname, boardfilename);
p = Bstrrchr(levname,'.'); p = Bstrrchr(levname,'.');
if (!p) strcat(levname,".mhk"); if (!p) strcat(levname,".mhk");
@ -618,11 +618,11 @@ void editinput(void)
memset(spriteext, 0, sizeof(spriteexttype) * MAXSPRITES); memset(spriteext, 0, sizeof(spriteexttype) * MAXSPRITES);
memset(spritesmooth, 0, sizeof(spritesmooth)); memset(spritesmooth, 0, sizeof(spritesmooth));
mhk=0; mhk=0;
initprintf("Maphacks dissabled\n"); initprintf("Maphacks disabled\n");
keystatus[0x44] = 0; keystatus[0x44] = 0;
} }
begindrawing(); //{{{ 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(); //}}} enddrawing(); //}}}
if (angvel != 0) //ang += angvel * constant if (angvel != 0) //ang += angvel * constant

View file

@ -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, bglCompressedTexImage2DARB(GL_TEXTURE_2D,level,pict.format,pict.xdim,pict.ydim,pict.border,
pict.size,pic); pict.size,pic);
if (bglGetError() != GL_NO_ERROR) goto failure; 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); if (midbuf) free(midbuf);

View file

@ -513,7 +513,7 @@ void SetGameVarID(int id, int lValue, int iActor, int iPlayer)
return; return;
} }
if ((aGameVars[id].dwFlags & GAMEVAR_FLAG_PERACTOR)) if (aGameVars[id].dwFlags & GAMEVAR_FLAG_PERACTOR)
{ {
if (iActor < 0 || iActor > MAXSPRITES-1) 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) if (aGameVars[id].dwFlags & GAMEVAR_FLAG_INTPTR)
{ {
// set the value at pointer // set the value at pointer
*((int*)aGameVars[id].lValue)=lValue; *((int*)aGameVars[id].lValue)=(int)lValue;
return; return;
} }