Added gSignPostWindow_Gfx

Added LoadSignBoxGfx
Add LoadSignPostWindowFrameGfx
This commit is contained in:
pkmnsnfrn 2024-07-24 19:41:36 -07:00
parent 61eff23d89
commit a0c5e5511c
8 changed files with 17 additions and 9 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 164 B

View file

@ -2,8 +2,9 @@
#define GUARD_GRAPHICS_H #define GUARD_GRAPHICS_H
// overworld // overworld
extern const u32 gMessageBox_Gfx[];
extern const u16 gMessageBox_Pal[]; extern const u16 gMessageBox_Pal[];
extern const u32 gMessageBox_Gfx[];
extern const u32 gSignpostWindow_Gfx[];
// pokeballs // pokeballs
extern const u32 gBallGfx_Poke[]; extern const u32 gBallGfx_Poke[];

View file

@ -14,6 +14,7 @@ extern const u16 gTextWindowFrame1_Pal[];
const struct TilesPal *GetWindowFrameTilesPal(u8 id); const struct TilesPal *GetWindowFrameTilesPal(u8 id);
void LoadMessageBoxGfx(u8 windowId, u16 destOffset, u8 palOffset); 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 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);
void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset); void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset);

View file

@ -41,7 +41,7 @@ static void Task_DrawFieldMessage(u8 taskId)
task->tState++; task->tState++;
break; break;
case 1: case 1:
DrawDialogueFrame(0, TRUE); DrawDialogueFrame(0, TRUE);
task->tState++; task->tState++;
break; break;
case 2: case 2:

View file

@ -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 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 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_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"); const u32 gWallpaperIcon_Bolt[] = INCBIN_U32("graphics/pokemon_storage/wallpapers/icons/bolt.4bpp.lz");

View file

@ -214,6 +214,12 @@ void LoadMessageBoxAndBorderGfx(void)
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(STD_WINDOW_PALETTE_NUM)); 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) void DrawDialogueFrame(u8 windowId, bool8 copyToVram)
{ {
CallWindowFunction(windowId, WindowFunc_DrawDialogueFrame); CallWindowFunction(windowId, WindowFunc_DrawDialogueFrame);

View file

@ -82,8 +82,6 @@ static const struct TilesPal sWindowFrames[WINDOW_FRAMES_COUNT] =
{sTextWindowFrame20_Gfx, sTextWindowFrame20_Pal} {sTextWindowFrame20_Gfx, sTextWindowFrame20_Pal}
}; };
const u16 gSignpostWindow_Gfx[] = INCBIN_U16("graphics/text_window/signpost.4bpp");
// code // code
const struct TilesPal *GetWindowFrameTilesPal(u8 id) const struct TilesPal *GetWindowFrameTilesPal(u8 id)
{ {
@ -99,6 +97,12 @@ void LoadMessageBoxGfx(u8 windowId, u16 destOffset, u8 palOffset)
LoadPalette(GetOverworldTextboxPalettePtr(), palOffset, PLTT_SIZE_4BPP); 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) void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset)
{ {
LoadUserWindowBorderGfx(windowId, destOffset, 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); 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);
}