[Fix] *Mutters something about macro hell.*
This commit is contained in:
parent
6552fc2cf2
commit
2034a02f74
14
src/opengl.c
14
src/opengl.c
@ -365,8 +365,8 @@ void gl_blitSprite(const glTexture* sprite, const double bx, const double by,
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
x = bx - (double)SCREEN_W/2.;
|
||||
y = by - (double)SCREEN_H/2.;
|
||||
x = bx - VX(*gl_camera) - sprite->sw/2. + gui_xoff;
|
||||
y = by - VY(*gl_camera) - sprite->sh/2. + gui_yoff;
|
||||
|
||||
tx = sprite->sw * (double)(sx)/sprite->rw;
|
||||
ty = sprite->sh * (sprite->sy-(double)sy-1)/sprite->rh;
|
||||
@ -402,8 +402,8 @@ void gl_blitStatic(const glTexture* texture, const double bx, const double by,
|
||||
double x, y;
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
x = bx - (double)gl_screen.w/2.;
|
||||
y = by - (double)gl_screen.h/2.;
|
||||
x = bx - (double)SCREEN_W/2.;
|
||||
y = by - (double)SCREEN_H/2.;
|
||||
|
||||
// Actual blitting..
|
||||
glBindTexture(GL_TEXTURE_2D, texture->texture);
|
||||
@ -579,8 +579,9 @@ static GLboolean gl_hasExt(char* name) {
|
||||
}
|
||||
|
||||
// Check and report if there's been an error.
|
||||
#ifndef gl_checkErr // I know, I know, it's a little hackish.
|
||||
//#ifndef gl_checkErr // I know, I know, it's a little hackish.
|
||||
void gl_checkErr(void) {
|
||||
#ifdef DEBUG
|
||||
GLenum err;
|
||||
char* errstr;
|
||||
|
||||
@ -615,8 +616,9 @@ void gl_checkErr(void) {
|
||||
break;
|
||||
}
|
||||
WARN("OpenGL error: %s", errstr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//#endif
|
||||
|
||||
// Initialize SDL/OpenGL etc.
|
||||
int gl_init(void) {
|
||||
|
@ -80,9 +80,9 @@ void gl_exit(void);
|
||||
int gl_isTrans(const glTexture* t, const int x, const int y);
|
||||
void gl_getSpriteFromDir(int* x, int* y, const glTexture* t, const double dir);
|
||||
void gl_screenshot(const char* filename);
|
||||
#if DEBUG == 1
|
||||
//#if DEBUG == 1
|
||||
void gl_checkErr(void);
|
||||
#else
|
||||
#define gl_checkErr()
|
||||
#endif
|
||||
//#else
|
||||
//#define gl_checkErr()
|
||||
//#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user