Skip to content

Commit

Permalink
Fix splash position
Browse files Browse the repository at this point in the history
See #3
  • Loading branch information
alexbatalov committed May 21, 2022
1 parent 2148d52 commit cffd032
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cffd032

Please sign in to comment.