diff --git a/configure.ac b/configure.ac index b4d7c1e..5b2b296 100644 --- a/configure.ac +++ b/configure.ac @@ -22,9 +22,9 @@ STARFIGHTER_CFLAGS="-DVERSION=\\\"$PACKAGE_VERSION\\\"" # Checks for libraries. PKG_CHECK_EXISTS([SDL2_mixer], [ - PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_mixer]) + PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_gfx SDL2_mixer]) ], [ - PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image]) + PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_gfx]) STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DNOSOUND" echo "Note: SDL_mixer not found; audio will not be supported." ]) diff --git a/src/cutscene.cpp b/src/cutscene.cpp index 5ecd41c..10e2282 100644 --- a/src/cutscene.cpp +++ b/src/cutscene.cpp @@ -452,7 +452,7 @@ void cutscene_init(int scene) if ((showMessage) && (gfx_messageBox != NULL)) screen_blit(gfx_messageBox, (screen->w - gfx_messageBox->w) / 2, screen->h - 100); - screen_renderString("Press [Escape] to skip", -1, 580, FONT_WHITE); + screen_renderString("Press [Escape] to skip", -1, screen->h - 20, FONT_WHITE); game_delayFrame(); diff --git a/src/gfx.cpp b/src/gfx.cpp index 2a0fd80..1e09d5b 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -23,6 +23,7 @@ along with this program. If not, see . #include "SDL.h" #include "SDL_image.h" +#include "SDL2_rotozoom.h" #include "defs.h" #include "structs.h" @@ -488,13 +489,17 @@ void gfx_free() void gfx_loadBackground(const char *filename) { + SDL_Surface *new_bg; + if (gfx_background != NULL) { SDL_FreeSurface(gfx_background); gfx_background = NULL; } - gfx_background = gfx_loadImage(filename); - SDL_SetColorKey(gfx_background, 0, 0); + new_bg = gfx_loadImage(filename); + SDL_SetColorKey(new_bg, 0, 0); + gfx_background = zoomSurface(new_bg, (double)screen->w / new_bg->w, (double)screen->h / new_bg->h, 0); + SDL_FreeSurface(new_bg); } void gfx_loadSprites() diff --git a/src/title.cpp b/src/title.cpp index 1300955..63b0630 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -453,7 +453,7 @@ int title_show() 5, screen->h - 20, FONT_WHITE, 0, gfx_background); gfx_renderString(buildVersion, screen->w - 6 - strlen(buildVersion) * 9, screen->h - 20, FONT_WHITE, 0, gfx_background); - screen_addBuffer(0, 560, 800, 40); + screen_addBuffer(0, screen->h - 40, screen->w, 40); skip = 1; } else