Fix death window position

See #3
This commit is contained in:
Alexander Batalov 2022-05-21 20:42:14 +03:00
parent e6808d30aa
commit e177b11d0d
1 changed files with 11 additions and 1 deletions

View File

@ -32,6 +32,9 @@
#define MAIN_MENU_WINDOW_WIDTH 640
#define MAIN_MENU_WINDOW_HEIGHT 480
#define DEATH_WINDOW_WIDTH 640
#define DEATH_WINDOW_HEIGHT 480
// 0x5194C8
char _mainMap[] = "artemple.map";
@ -356,7 +359,14 @@ void showDeath()
mouseShowCursor();
}
int win = windowCreate(0, 0, 640, 480, 0, WINDOW_FLAG_0x04);
int deathWindowX = (screenGetWidth() - DEATH_WINDOW_WIDTH) / 2;
int deathWindowY = (screenGetHeight() - DEATH_WINDOW_HEIGHT) / 2;
int win = windowCreate(deathWindowX,
deathWindowY,
DEATH_WINDOW_WIDTH,
DEATH_WINDOW_HEIGHT,
0,
WINDOW_FLAG_0x04);
if (win != -1) {
do {
unsigned char* windowBuffer = windowGetBuffer(win);