From cffd0321f6758f5dfd52e7f5b06c8f911bf12494 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 21 May 2022 20:29:02 +0300 Subject: [PATCH] Fix splash position See #3 --- src/game.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game.cc b/src/game.cc index d6e5ff9..72754ad 100644 --- a/src/game.cc +++ b/src/game.cc @@ -1258,7 +1258,9 @@ void showSplash() fileRead(data, 1, SPLASH_WIDTH * SPLASH_HEIGHT, stream); fileClose(stream); - _scr_blit(data, SPLASH_WIDTH, SPLASH_HEIGHT, 0, 0, SPLASH_WIDTH, SPLASH_HEIGHT, 0, 0); + int splashWindowX = (screenGetWidth() - SPLASH_WIDTH) / 2; + int splashWindowY = (screenGetHeight() - SPLASH_HEIGHT) / 2; + _scr_blit(data, SPLASH_WIDTH, SPLASH_HEIGHT, 0, 0, SPLASH_WIDTH, SPLASH_HEIGHT, splashWindowX, splashWindowY); paletteFadeTo(palette); internal_free(data);