diff --git a/configure.ac b/configure.ac index c7bf432..8ca82cc 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,15 @@ PKG_CHECK_EXISTS([SDL2_mixer], [ echo "Note: SDL_mixer not found; audio will not be supported." ]) +AC_ARG_VAR([SF_SCREEN_WIDTH], [The width of the game window in pixels]) +AC_ARG_VAR([SF_SCREEN_HEIGHT], [The height of the game window in pixels]) +AS_IF([test -n "$SF_SCREEN_WIDTH"], [ + STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DSCREEN_WIDTH=$SF_SCREEN_WIDTH" +]) +AS_IF([test -n "$SF_SCREEN_HEIGHT"], [ + STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DSCREEN_HEIGHT=$SF_SCREEN_HEIGHT" +]) + AC_SUBST([STARFIGHTER_CFLAGS]) # Checks for header files. diff --git a/src/gfx.cpp b/src/gfx.cpp index ac96445..9b54ba2 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -257,7 +257,7 @@ void gfx_drawLine(SDL_Surface *dest, int x1, int y1, int x2, int y2, int col) if ((x1 == x2) && (y1 == y2)) {break;} - if (counter == 1000) + if (counter >= 1000000) {printf("Loop Error!\n"); break;} counter++; }