diff --git a/code/explosions.cpp b/code/explosions.cpp index 483c929..f748eff 100644 --- a/code/explosions.cpp +++ b/code/explosions.cpp @@ -58,6 +58,11 @@ void addEngine(object *craft) addExplosion(x, y, E_TINY_EXPLOSION); } +static bool isOnScreen(int x, int y, int w, int h) +{ + return (x + w > 0) && (x < 800) && (y + h > 0) && (y < 600); +} + /* Loops through active explosions and decrements their think time. If their thinktime is divisable by 5, then the frame is changed to diff --git a/code/graphics.cpp b/code/graphics.cpp index 38f7f18..450f977 100644 --- a/code/graphics.cpp +++ b/code/graphics.cpp @@ -737,11 +737,3 @@ void doStarfield() SDL_UnlockSurface(screen); } } - -int isOnScreen(int x, int y, int w, int h) -{ - if ((x + w > 0) && (x < 800) && (y + h > 0) && (y < 600)) - return 1; - - return 0; -} diff --git a/code/graphics.h b/code/graphics.h index 6473475..f3c20fa 100644 --- a/code/graphics.h +++ b/code/graphics.h @@ -79,4 +79,3 @@ extern void freeGraphics(); extern SDL_Surface *loadImage(const char *filename); extern void doStarfield(); -extern int isOnScreen(int x, int y, int w, int h);