Fix main menu position

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

View File

@ -29,6 +29,9 @@
#include "word_wrap.h" #include "word_wrap.h"
#include "world_map.h" #include "world_map.h"
#define MAIN_MENU_WINDOW_WIDTH 640
#define MAIN_MENU_WINDOW_HEIGHT 480
// 0x5194C8 // 0x5194C8
char _mainMap[] = "artemple.map"; char _mainMap[] = "artemple.map";
@ -573,7 +576,14 @@ int mainMenuWindowInit()
colorPaletteLoad("color.pal"); colorPaletteLoad("color.pal");
gMainMenuWindow = windowCreate(0, 0, 640, 480, 0, 12); int mainMenuWindowX = (screenGetWidth() - MAIN_MENU_WINDOW_WIDTH) / 2;
int mainMenuWindowY = (screenGetHeight() - MAIN_MENU_WINDOW_HEIGHT) / 2;
gMainMenuWindow = windowCreate(mainMenuWindowX,
mainMenuWindowY,
MAIN_MENU_WINDOW_WIDTH,
MAIN_MENU_WINDOW_HEIGHT,
0,
WINDOW_HIDDEN | WINDOW_FLAG_0x04);
if (gMainMenuWindow == -1) { if (gMainMenuWindow == -1) {
mainMenuWindowFree(); mainMenuWindowFree();
return -1; return -1;