From a0c5e5511c0aae9a5a8374c98c6fbf5b4d65d99f Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Wed, 24 Jul 2024 19:41:36 -0700 Subject: [PATCH] Added gSignPostWindow_Gfx Added LoadSignBoxGfx Add LoadSignPostWindowFrameGfx --- graphics/text_window/signpost.bin | Bin 0 -> 1200 bytes graphics/text_window/signpost.png | Bin 219 -> 164 bytes include/graphics.h | 3 ++- include/text_window.h | 1 + src/field_message_box.c | 2 +- src/graphics.c | 1 + src/menu.c | 6 ++++++ src/text_window.c | 13 ++++++------- 8 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 graphics/text_window/signpost.bin diff --git a/graphics/text_window/signpost.bin b/graphics/text_window/signpost.bin new file mode 100644 index 0000000000000000000000000000000000000000..6358e199db9cfc27b69dbb01b2c4b385350aee9b GIT binary patch literal 1200 zcmeH@u?+wq48xK%pbq{2Ubvx5NVR7#28KB>2VM^lLNt_VV_`R3zI@m+mC;beI-pJj AfdBvi literal 0 HcmV?d00001 diff --git a/graphics/text_window/signpost.png b/graphics/text_window/signpost.png index a37c7d17c4a73d12d8b5394dea0950293ea801fd..89e667df9265b6bd81c68962a043a68db42b2997 100644 GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^7C_9w!VDziE-5wuDT4r?5ZC_<|AFA#xqI2g)j%#)z4*}Q$iB}UTi1x literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^8bGYT!VDxQHLDu~DT4r?5ZB_fOaA}=pOlnz_3GJY z9321m7Awr*nDT9kVbIwnN5283&YryoM9;o~7+J;DcCYzn0QIJMx;TbtOiWHtVEpjk zol*Wk)BlSMAs={z8aV$sirMfB+kDUa{w~yEL-qIF<{SsF?=Ej-34edj+=Nw->Hq%# zwIA~%9P4tLBIdHNM9A=o9O>a=W7C<~ru9Q!twU9D0cV}UjAIuV7%py!nV|a3jvZ(t NgQu&X%Q~loCIEb?Sgim6 diff --git a/include/graphics.h b/include/graphics.h index fc60c29ebf..2da00d9804 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2,8 +2,9 @@ #define GUARD_GRAPHICS_H // overworld -extern const u32 gMessageBox_Gfx[]; extern const u16 gMessageBox_Pal[]; +extern const u32 gMessageBox_Gfx[]; +extern const u32 gSignpostWindow_Gfx[]; // pokeballs extern const u32 gBallGfx_Poke[]; diff --git a/include/text_window.h b/include/text_window.h index 4e26c70a90..a292d1309e 100644 --- a/include/text_window.h +++ b/include/text_window.h @@ -14,6 +14,7 @@ extern const u16 gTextWindowFrame1_Pal[]; const struct TilesPal *GetWindowFrameTilesPal(u8 id); void LoadMessageBoxGfx(u8 windowId, u16 destOffset, u8 palOffset); +void LoadSignBoxGfx(u8 windowId, u16 destOffset, u8 palOffset); void LoadWindowGfx(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset); void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset); void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset); diff --git a/src/field_message_box.c b/src/field_message_box.c index 9d07ce24dc..4f50699a6a 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -41,7 +41,7 @@ static void Task_DrawFieldMessage(u8 taskId) task->tState++; break; case 1: - DrawDialogueFrame(0, TRUE); + DrawDialogueFrame(0, TRUE); task->tState++; break; case 2: diff --git a/src/graphics.c b/src/graphics.c index 58c629fbc9..4efd17db09 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1984,6 +1984,7 @@ const u16 gTradeMenuMonBox_Tilemap[] = INCBIN_U16("graphics/trade/menu_mon_box.b const u16 gMessageBox_Pal[] = INCBIN_U16("graphics/text_window/message_box.gbapal"); const u8 gMessageBox_Gfx[] = INCBIN_U8("graphics/text_window/message_box.4bpp"); +const u8 gSignpostWindow_Gfx[] = INCBIN_U8("graphics/text_window/signpost.4bpp"); const u32 gWallpaperIcon_Cross[] = INCBIN_U32("graphics/pokemon_storage/wallpapers/icons/cross.4bpp.lz"); const u32 gWallpaperIcon_Bolt[] = INCBIN_U32("graphics/pokemon_storage/wallpapers/icons/bolt.4bpp.lz"); diff --git a/src/menu.c b/src/menu.c index 1012a6b290..ecb8dd20d6 100644 --- a/src/menu.c +++ b/src/menu.c @@ -214,6 +214,12 @@ void LoadMessageBoxAndBorderGfx(void) LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(STD_WINDOW_PALETTE_NUM)); } +void LoadSignPostWindowFrameGfx(void) +{ + LoadSignBoxGfx(0, DLG_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(DLG_WINDOW_PALETTE_NUM)); + //LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(STD_WINDOW_PALETTE_NUM)); +} + void DrawDialogueFrame(u8 windowId, bool8 copyToVram) { CallWindowFunction(windowId, WindowFunc_DrawDialogueFrame); diff --git a/src/text_window.c b/src/text_window.c index 3cc3f7d47b..6423867205 100644 --- a/src/text_window.c +++ b/src/text_window.c @@ -82,8 +82,6 @@ static const struct TilesPal sWindowFrames[WINDOW_FRAMES_COUNT] = {sTextWindowFrame20_Gfx, sTextWindowFrame20_Pal} }; -const u16 gSignpostWindow_Gfx[] = INCBIN_U16("graphics/text_window/signpost.4bpp"); - // code const struct TilesPal *GetWindowFrameTilesPal(u8 id) { @@ -99,6 +97,12 @@ void LoadMessageBoxGfx(u8 windowId, u16 destOffset, u8 palOffset) LoadPalette(GetOverworldTextboxPalettePtr(), palOffset, PLTT_SIZE_4BPP); } +void LoadSignBoxGfx(u8 windowId, u16 destOffset, u8 palOffset) +{ + LoadBgTiles(GetWindowAttribute(windowId, WINDOW_BG), gSignpostWindow_Gfx, 0x1C0, destOffset); + LoadPalette(GetOverworldTextboxPalettePtr(), palOffset, PLTT_SIZE_4BPP); +} + void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset) { LoadUserWindowBorderGfx(windowId, destOffset, palOffset); @@ -199,8 +203,3 @@ void LoadUserWindowBorderGfxOnBg(u8 bg, u16 destOffset, u8 palOffset) LoadPalette(GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType)->pal, palOffset, PLTT_SIZE_4BPP); } -void LoadSignPostWindowFrameGfx(void) -{ - LoadBgTiles(GetWindowAttribute(0, WINDOW_BG), gSignpostWindow_Gfx, 0x260, DLG_WINDOW_BASE_TILE_NUM); - LoadPalette(GetTextWindowPalette(1), BG_PLTT_ID(DLG_WINDOW_PALETTE_NUM), PLTT_SIZE_4BPP); -}