]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
Minor code simplifications
[lugaru.git] / Source / OpenGL_Windows.cpp
index 84e9812018289bbbc2242c1af9bade57cc9ce179..82364c1a3a4b162739e2ee0dc12963ef4ae90634 100644 (file)
@@ -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)
@@ -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);
-  
        }