mirror of
https://github.com/pret/pokefirered.git
synced 2026-04-25 07:19:36 -05:00
Document DrawHelpMessageWindowTiles
This commit is contained in:
parent
b9fd3ec29c
commit
9e59afca88
|
|
@ -7,6 +7,6 @@ void DestroyHelpMessageWindow(u8 a0);
|
|||
u8 CreateHelpMessageWindow(void);
|
||||
void PrintTextOnHelpMessageWindow(const u8 * text, u8 mode);
|
||||
void MapNamePopupWindowIdSetDummy(void);
|
||||
void sub_8112F18(u8 windowId);
|
||||
void DrawHelpMessageWindowTilesById(u8 windowId);
|
||||
|
||||
#endif //GUARD_HELP_MESSAGE_H
|
||||
|
|
|
|||
|
|
@ -47,13 +47,14 @@ void DestroyHelpMessageWindow(u8 a0)
|
|||
}
|
||||
}
|
||||
|
||||
void sub_8112F18(u8 windowId)
|
||||
// Creates the bottom bar window that displays help text for e.g. the options in the Start menu
|
||||
void DrawHelpMessageWindowTilesById(u8 windowId)
|
||||
{
|
||||
const u8 *ptr = gHelpMessageWindow_Gfx;
|
||||
u8 *buffer;
|
||||
u8 i, j;
|
||||
u8 width, height;
|
||||
u8 k;
|
||||
u8 tileId;
|
||||
|
||||
width = (u8)GetWindowAttribute(windowId, WINDOW_WIDTH);
|
||||
height = (u8)GetWindowAttribute(windowId, WINDOW_HEIGHT);
|
||||
|
|
@ -66,15 +67,15 @@ void sub_8112F18(u8 windowId)
|
|||
{
|
||||
for (j = 0; j < width; j++)
|
||||
{
|
||||
if (i == 0)
|
||||
k = 0;
|
||||
else if (i == height - 1)
|
||||
k = 14;
|
||||
else
|
||||
k = 5;
|
||||
if (i == 0) // Top row
|
||||
tileId = 0;
|
||||
else if (i == height - 1) // Bottom row
|
||||
tileId = 14;
|
||||
else // Middle row
|
||||
tileId = 5;
|
||||
CpuCopy32(
|
||||
&ptr[k * 0x20],
|
||||
&buffer[(i * width + j) * 0x20],
|
||||
&ptr[tileId * 32],
|
||||
&buffer[(i * width + j) * 32],
|
||||
32
|
||||
);
|
||||
}
|
||||
|
|
@ -84,9 +85,9 @@ void sub_8112F18(u8 windowId)
|
|||
}
|
||||
}
|
||||
|
||||
static void sub_8112FD0(void)
|
||||
static void DrawHelpMessageWindowTiles(void)
|
||||
{
|
||||
sub_8112F18(sHelpMessageWindowId);
|
||||
DrawHelpMessageWindowTilesById(sHelpMessageWindowId);
|
||||
}
|
||||
|
||||
static const u8 sHelpMessageTextColors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_DARK_GRAY};
|
||||
|
|
@ -98,7 +99,7 @@ static void PrintHelpMessageText(const u8 *text)
|
|||
|
||||
void PrintTextOnHelpMessageWindow(const u8 *text, u8 mode)
|
||||
{
|
||||
sub_8112FD0();
|
||||
DrawHelpMessageWindowTiles();
|
||||
PrintHelpMessageText(text);
|
||||
if (mode)
|
||||
CopyWindowToVram(sHelpMessageWindowId, mode);
|
||||
|
|
|
|||
|
|
@ -1646,7 +1646,7 @@ static const u8 *const sHelpSystemSubmenuItemLists[HELPCONTEXT_COUNT * (TOPIC_CO
|
|||
NULL, NULL, NULL, NULL, NULL // HELPCONTEXT_UNUSED
|
||||
};
|
||||
|
||||
static const u16 unref_845BCB0[] = INCBIN_U16("graphics/help_system/unused.bin");
|
||||
static const u16 sUnused[] = INCBIN_U16("graphics/help_system/unused.bin");
|
||||
|
||||
static const u8 sHelpSystemContextTopicOrder[TOPIC_COUNT] = {
|
||||
TOPIC_ABOUT_GAME,
|
||||
|
|
|
|||
|
|
@ -2636,7 +2636,7 @@ static void ToggleFieldMoveDescriptionWindow(u8 action)
|
|||
{
|
||||
if (ptr->windowId[2] == WINDOW_NONE)
|
||||
ptr->windowId[2] = AddWindow(&sFieldMoveDescriptionWindowTemplate);
|
||||
sub_8112F18(ptr->windowId[2]);
|
||||
DrawHelpMessageWindowTilesById(ptr->windowId[2]);
|
||||
letterSpacing = GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING);
|
||||
AddTextPrinterParameterized4(ptr->windowId[2], FONT_2, 3, 6, letterSpacing, 0, sFontColorTable[5], 0, sFieldMoveDescriptionTable[action - CURSOR_OPTION_FIELD_MOVES]);
|
||||
PutWindowTilemap(ptr->windowId[2]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user