Added support for defining custom widths and heights with ./configure.

This commit is contained in:
onpon4 2017-01-28 00:43:17 -05:00
parent 70e8e9cb90
commit e8bbed1a8b
2 changed files with 10 additions and 1 deletions

View File

@ -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.

View File

@ -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++;
}