Skip to content

Commit

Permalink
Fix death window position
Browse files Browse the repository at this point in the history
See #3
  • Loading branch information
alexbatalov committed May 21, 2022
1 parent e6808d3 commit e177b11
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e177b11

Please sign in to comment.