From 8e7202ec3d289305190aedc66d02435571747a76 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Sun, 21 Oct 2018 02:24:57 -0500 Subject: Fix LZ compressed data alignment --- src/main_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main_menu.c') diff --git a/src/main_menu.c b/src/main_menu.c index bcc4f9af5..521b92b35 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -127,8 +127,8 @@ static const u16 sBirchSpeechBgPals[][16] = { INCBIN_U16("graphics/birch_speech/bg1.gbapal") }; -static const u8 sBirchSpeechShadowGfx[] = INCBIN_U8("graphics/birch_speech/shadow.4bpp.lz"); -static const u8 sBirchSpeechBgMap[] = INCBIN_U8("graphics/birch_speech/map.bin.lz"); +static const u32 sBirchSpeechShadowGfx[] = INCBIN_U32("graphics/birch_speech/shadow.4bpp.lz"); +static const u32 sBirchSpeechBgMap[] = INCBIN_U32("graphics/birch_speech/map.bin.lz"); static const u16 sBirchSpeechBgGradientPal[] = INCBIN_U16("graphics/birch_speech/bg2.gbapal"); static const u16 sBirchSpeechPlatformBlackPal[] = {RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK}; -- cgit v1.2.3 From b252bd029279b6f28518c59df1ba03caf44d756f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 27 Oct 2018 00:53:07 +0200 Subject: Window priority to window bg --- src/main_menu.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/main_menu.c') diff --git a/src/main_menu.c b/src/main_menu.c index 521b92b35..8539ab027 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -165,7 +165,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = // No saved game // NEW GAME { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN0, .width = MENU_WIDTH, @@ -175,7 +175,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = }, // OPTIONS { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN1, .width = MENU_WIDTH, @@ -186,7 +186,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = // Has saved game // CONTINUE { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN2, .width = MENU_WIDTH, @@ -196,7 +196,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = }, // NEW GAME { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN3, .width = MENU_WIDTH, @@ -206,7 +206,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = }, // OPTION / MYSTERY GIFT { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN4, .width = MENU_WIDTH, @@ -216,7 +216,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = }, // OPTION / MYSTERY EVENTS { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN5, .width = MENU_WIDTH, @@ -226,7 +226,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = }, // OPTION { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT, .tilemapTop = MENU_TOP_WIN6, .width = MENU_WIDTH, @@ -236,7 +236,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = }, // Error message window { - .priority = 0, + .bg = 0, .tilemapLeft = MENU_LEFT_ERROR, .tilemapTop = MENU_TOP_ERROR, .width = MENU_WIDTH_ERROR, @@ -250,7 +250,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] = static const struct WindowTemplate gUnknown_082FF080[] = { { - .priority = 0, + .bg = 0, .tilemapLeft = 2, .tilemapTop = 15, .width = 27, @@ -259,7 +259,7 @@ static const struct WindowTemplate gUnknown_082FF080[] = .baseBlock = 1 }, { - .priority = 0, + .bg = 0, .tilemapLeft = 3, .tilemapTop = 5, .width = 6, @@ -268,7 +268,7 @@ static const struct WindowTemplate gUnknown_082FF080[] = .baseBlock = 0x6D }, { - .priority = 0, + .bg = 0, .tilemapLeft = 3, .tilemapTop = 2, .width = 9, @@ -323,7 +323,7 @@ static const union AffineAnimCmd sSpriteAffineAnim_PlayerShrink[] = { AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const sSpriteAffineAnimTable_PlayerShrink[] = +static const union AffineAnimCmd *const sSpriteAffineAnimTable_PlayerShrink[] = { sSpriteAffineAnim_PlayerShrink }; @@ -2083,21 +2083,21 @@ static void DrawMainMenuWindowBorder(const struct WindowTemplate *template, u16 u16 sp14 = 7 + baseTileNum; u16 r6 = 8 + baseTileNum; - FillBgTilemapBufferRect(template->priority, baseTileNum, template->tilemapLeft - 1, template->tilemapTop - 1, 1, 1, 2); - FillBgTilemapBufferRect(template->priority, r9, template->tilemapLeft, template->tilemapTop - 1, template->width, 1, 2); - FillBgTilemapBufferRect(template->priority, r10, template->tilemapLeft + template->width, template->tilemapTop - 1, 1, 1, 2); - FillBgTilemapBufferRect(template->priority, sp18, template->tilemapLeft - 1, template->tilemapTop, 1, template->height, 2); - FillBgTilemapBufferRect(template->priority, spC, template->tilemapLeft + template->width, template->tilemapTop, 1, template->height, 2); - FillBgTilemapBufferRect(template->priority, sp10, template->tilemapLeft - 1, template->tilemapTop + template->height, 1, 1, 2); - FillBgTilemapBufferRect(template->priority, sp14, template->tilemapLeft, template->tilemapTop + template->height, template->width, 1, 2); - FillBgTilemapBufferRect(template->priority, r6, template->tilemapLeft + template->width, template->tilemapTop + template->height, 1, 1, 2); - CopyBgTilemapBufferToVram(template->priority); + FillBgTilemapBufferRect(template->bg, baseTileNum, template->tilemapLeft - 1, template->tilemapTop - 1, 1, 1, 2); + FillBgTilemapBufferRect(template->bg, r9, template->tilemapLeft, template->tilemapTop - 1, template->width, 1, 2); + FillBgTilemapBufferRect(template->bg, r10, template->tilemapLeft + template->width, template->tilemapTop - 1, 1, 1, 2); + FillBgTilemapBufferRect(template->bg, sp18, template->tilemapLeft - 1, template->tilemapTop, 1, template->height, 2); + FillBgTilemapBufferRect(template->bg, spC, template->tilemapLeft + template->width, template->tilemapTop, 1, template->height, 2); + FillBgTilemapBufferRect(template->bg, sp10, template->tilemapLeft - 1, template->tilemapTop + template->height, 1, 1, 2); + FillBgTilemapBufferRect(template->bg, sp14, template->tilemapLeft, template->tilemapTop + template->height, template->width, 1, 2); + FillBgTilemapBufferRect(template->bg, r6, template->tilemapLeft + template->width, template->tilemapTop + template->height, 1, 1, 2); + CopyBgTilemapBufferToVram(template->bg); } static void ClearMainMenuWindowTilemap(const struct WindowTemplate *template) { - FillBgTilemapBufferRect(template->priority, 0, template->tilemapLeft - 1, template->tilemapTop - 1, template->tilemapLeft + template->width + 1, template->tilemapTop + template->height + 1, 2); - CopyBgTilemapBufferToVram(template->priority); + FillBgTilemapBufferRect(template->bg, 0, template->tilemapLeft - 1, template->tilemapTop - 1, template->tilemapLeft + template->width + 1, template->tilemapTop + template->height + 1, 2); + CopyBgTilemapBufferToVram(template->bg); } static void NewGameBirchSpeech_ClearGenderWindowTilemap(u8 a, u8 b, u8 c, u8 d, u8 e, u8 unused) -- cgit v1.2.3 From 7dd4ed70601039d0c811752211b4aefa1d09b69b Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Mon, 5 Nov 2018 14:45:54 -0600 Subject: r5/r6 swap on sub_80E2578 --- src/main_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main_menu.c') diff --git a/src/main_menu.c b/src/main_menu.c index bcc4f9af5..69388e8f3 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -1501,7 +1501,7 @@ static void Task_NewGameBirchSpeech_CreateNameYesNo(u8 taskId) static void Task_NewGameBirchSpeech_ProcessNameYesNoMenu(u8 taskId) { - switch (Menu_ProcessInputNoWrap_()) + switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: PlaySE(SE_SELECT); @@ -1976,7 +1976,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void) static s8 NewGameBirchSpeech_ProcessGenderMenuInput(void) { - return Menu_ProcessInputNoWrapAround(); + return Menu_ProcessInputNoWrap(); } static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId) -- cgit v1.2.3 From 6d38431c330a79d97bfb72fdaaaa65901ce0fa64 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 6 Nov 2018 10:44:48 -0600 Subject: Begin cleaning text.c --- src/main_menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main_menu.c') diff --git a/src/main_menu.c b/src/main_menu.c index 8539ab027..224958bd9 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -74,7 +74,7 @@ static void NewGameBirchSpeech_ShowDialogueWindow(u8, u8); static void NewGameBirchSpeech_ClearWindow(u8); static void Task_NewGameBirchSpeech_ThisIsAPokemon(u8); static void Task_NewGameBirchSpeech_MainSpeech(u8); -static void NewGameBirchSpeech_ShowPokeBallPrinterCallback(struct TextSubPrinter *printer, u16 a); +static void NewGameBirchSpeech_ShowPokeBallPrinterCallback(struct TextPrinterTemplate *printer, u16 a); static void Task_NewGameBirchSpeech_AndYouAre(u8); static void Task_NewGameBirchSpeechSub_WaitForLotad(u8); static void Task_NewGameBirchSpeech_StartBirchLotadPlatformFade(u8); @@ -2126,9 +2126,9 @@ static void NewGameBirchSpeech_ClearWindow(u8 windowId) CopyWindowToVram(windowId, 2); } -static void NewGameBirchSpeech_ShowPokeBallPrinterCallback(struct TextSubPrinter *printer, u16 a) +static void NewGameBirchSpeech_ShowPokeBallPrinterCallback(struct TextPrinterTemplate *printer, u16 a) { - if (*(printer->current_text_offset - 2) == 8 && gUnknown_02022D04 == 0) + if (*(printer->currentChar - 2) == 8 && gUnknown_02022D04 == 0) { gUnknown_02022D04 = 1; CreateTask(Task_NewGameBirchSpeechSub_InitPokeBall, 0); -- cgit v1.2.3