Skip to content

Commit 66c07f9

Browse files
authored
Merge pull request #2123 from estellarc/birch-dialog-box
Missing constant in Birch speech dialogue
2 parents f11bddf + dd70446 commit 66c07f9

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/main_menu.c

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ enum
527527
};
528528

529529
#define MAIN_MENU_BORDER_TILE 0x1D5
530+
#define BIRCH_DLG_BASE_TILE_NUM 0xFC
530531

531532
static void CB2_MainMenu(void)
532533
{
@@ -1329,7 +1330,7 @@ static void Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome(u8 taskId)
13291330
{
13301331
InitWindows(sNewGameBirchSpeechTextWindows);
13311332
LoadMainMenuWindowFrameTiles(0, 0xF3);
1332-
LoadMessageBoxGfx(0, 0xFC, BG_PLTT_ID(15));
1333+
LoadMessageBoxGfx(0, BIRCH_DLG_BASE_TILE_NUM, BG_PLTT_ID(15));
13331334
NewGameBirchSpeech_ShowDialogueWindow(0, 1);
13341335
PutWindowTilemap(0);
13351336
CopyWindowToVram(0, COPYWIN_GFX);
@@ -1855,7 +1856,7 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void)
18551856
SetMainCallback2(CB2_MainMenu);
18561857
InitWindows(sNewGameBirchSpeechTextWindows);
18571858
LoadMainMenuWindowFrameTiles(0, 0xF3);
1858-
LoadMessageBoxGfx(0, 0xFC, BG_PLTT_ID(15));
1859+
LoadMessageBoxGfx(0, BIRCH_DLG_BASE_TILE_NUM, BG_PLTT_ID(15));
18591860
PutWindowTilemap(0);
18601861
CopyWindowToVram(0, COPYWIN_FULL);
18611862
}
@@ -2277,20 +2278,20 @@ static void NewGameBirchSpeech_ShowDialogueWindow(u8 windowId, u8 copyToVram)
22772278

22782279
static void NewGameBirchSpeech_CreateDialogueWindowBorder(u8 bg, u8 x, u8 y, u8 width, u8 height, u8 palNum)
22792280
{
2280-
FillBgTilemapBufferRect(bg, 0xFD, x-2, y-1, 1, 1, palNum);
2281-
FillBgTilemapBufferRect(bg, 0xFF, x-1, y-1, 1, 1, palNum);
2282-
FillBgTilemapBufferRect(bg, 0x100, x, y-1, width, 1, palNum);
2283-
FillBgTilemapBufferRect(bg, 0x101, x+width-1, y-1, 1, 1, palNum);
2284-
FillBgTilemapBufferRect(bg, 0x102, x+width, y-1, 1, 1, palNum);
2285-
FillBgTilemapBufferRect(bg, 0x103, x-2, y, 1, 5, palNum);
2286-
FillBgTilemapBufferRect(bg, 0x105, x-1, y, width+1, 5, palNum);
2287-
FillBgTilemapBufferRect(bg, 0x106, x+width, y, 1, 5, palNum);
2288-
2289-
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(0xFD), x-2, y+height, 1, 1, palNum);
2290-
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(0xFF), x-1, y+height, 1, 1, palNum);
2291-
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(0x100), x, y+height, width-1, 1, palNum);
2292-
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(0x101), x+width-1, y+height, 1, 1, palNum);
2293-
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(0x102), x+width, y+height, 1, 1, palNum);
2281+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 1, x-2, y-1, 1, 1, palNum);
2282+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 3, x-1, y-1, 1, 1, palNum);
2283+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 4, x, y-1, width, 1, palNum);
2284+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 5, x+width-1, y-1, 1, 1, palNum);
2285+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 6, x+width, y-1, 1, 1, palNum);
2286+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 7, x-2, y, 1, 5, palNum);
2287+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 9, x-1, y, width+1, 5, palNum);
2288+
FillBgTilemapBufferRect(bg, BIRCH_DLG_BASE_TILE_NUM + 10, x+width, y, 1, 5, palNum);
2289+
2290+
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(BIRCH_DLG_BASE_TILE_NUM + 1), x-2, y+height, 1, 1, palNum);
2291+
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(BIRCH_DLG_BASE_TILE_NUM + 3), x-1, y+height, 1, 1, palNum);
2292+
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(BIRCH_DLG_BASE_TILE_NUM + 4), x, y+height, width-1, 1, palNum);
2293+
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(BIRCH_DLG_BASE_TILE_NUM + 5), x+width-1, y+height, 1, 1, palNum);
2294+
FillBgTilemapBufferRect(bg, BG_TILE_V_FLIP(BIRCH_DLG_BASE_TILE_NUM + 6), x+width, y+height, 1, 1, palNum);
22942295
}
22952296

22962297
static void Task_NewGameBirchSpeech_ReturnFromNamingScreenShowTextbox(u8 taskId)

0 commit comments

Comments
 (0)