From 3816a8c17b692ca12e2bba341aca981a20b32276 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 10 Aug 2015 15:29:49 +0200 Subject: [PATCH] Fix position of the Alien Device in the credits. --- src/title.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/title.cpp b/src/title.cpp index 7596ae2..6e0bfe5 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -477,7 +477,7 @@ void doCredits() int i = 0; int numberOfCredits = 0; int pos1 = 0, pos2 = 0, size = 0; - float *y; + float *y, deviceY; SDL_Surface *backdrop = graphics.quickSprite("CreditsBackGround", graphics.loadImage("gfx/main/creditsBack.png")); @@ -504,6 +504,9 @@ void doCredits() y[i] = pos1; + if (pos2 == 220) + deviceY = pos1 - 50; + graphics.setFontSize(size); credit[i] = graphics.quickSprite("credit", graphics.getString(string, true)); @@ -518,7 +521,9 @@ void doCredits() } SDL_Surface *device = graphics.quickSprite("credit", graphics.loadImage("gfx/main/creditsDevice.png")); - float deviceY = y[numberOfCredits - 7] - 50; + + if (!deviceY) + deviceY = y[numberOfCredits - 7] - 50; audio.loadMusic("music/credits"); audio.playMusic(); -- 2.39.5