X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=82364c1a3a4b162739e2ee0dc12963ef4ae90634;hb=250e2a61f24154d8eebff5b2b403f926ca24a543;hp=618ef4742d4218bfbb9ff5571775816b46fd8c7b;hpb=4155ca2c4aa4bac78ce35a38b5e2e69c0c77e585;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 618ef47..82364c1 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -196,10 +196,7 @@ static void GLAPIENTRY glDeleteTextures_doNothing(GLsizei n, const GLuint *textu void sdlGetCursorPos(POINT *pt) { - int x, y; - SDL_GetMouseState(&x, &y); - pt->x = x; - pt->y = y; + SDL_GetMouseState(&(pt->x), &(pt->y)); } #define GetCursorPos(x) sdlGetCursorPos(x) #define SetCursorPos(x, y) SDL_WarpMouse(x, y) @@ -796,9 +793,9 @@ void DoFrameRate (int update) deltaTime /= 1000.0; multiplier=deltaTime; - if(multiplier<.001)multiplier=.001; - if(multiplier>10)multiplier=10; - if(update)frametime = currTime; // reset for next time interval + if(multiplier<.001) multiplier=.001; + if(multiplier>10) multiplier=10; + if(update) frametime = currTime; // reset for next time interval deltaTime = (float) AbsoluteDeltaToDuration (currTime, time); @@ -1241,25 +1238,15 @@ int main(int argc, char **argv) bool LoadImage(const char * fname, TGAImageRec & tex) { - bool res = true; - if ( tex.data == NULL ) - { return false; - } - - - res = load_image(fname, tex); - - - return res; + else + return load_image(fname, tex); } void ScreenShot(const char * fname) { - save_image(fname); - }