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)
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);
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);
-
}