Document DrawHelpMessageWindowTiles
This commit is contained in:
@@ -7,6 +7,6 @@ void DestroyHelpMessageWindow(u8 a0);
|
|||||||
u8 CreateHelpMessageWindow(void);
|
u8 CreateHelpMessageWindow(void);
|
||||||
void PrintTextOnHelpMessageWindow(const u8 * text, u8 mode);
|
void PrintTextOnHelpMessageWindow(const u8 * text, u8 mode);
|
||||||
void MapNamePopupWindowIdSetDummy(void);
|
void MapNamePopupWindowIdSetDummy(void);
|
||||||
void sub_8112F18(u8 windowId);
|
void DrawHelpMessageWindowTilesById(u8 windowId);
|
||||||
|
|
||||||
#endif //GUARD_HELP_MESSAGE_H
|
#endif //GUARD_HELP_MESSAGE_H
|
||||||
|
|||||||
+14
-13
@@ -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;
|
const u8 *ptr = gHelpMessageWindow_Gfx;
|
||||||
u8 *buffer;
|
u8 *buffer;
|
||||||
u8 i, j;
|
u8 i, j;
|
||||||
u8 width, height;
|
u8 width, height;
|
||||||
u8 k;
|
u8 tileId;
|
||||||
|
|
||||||
width = (u8)GetWindowAttribute(windowId, WINDOW_WIDTH);
|
width = (u8)GetWindowAttribute(windowId, WINDOW_WIDTH);
|
||||||
height = (u8)GetWindowAttribute(windowId, WINDOW_HEIGHT);
|
height = (u8)GetWindowAttribute(windowId, WINDOW_HEIGHT);
|
||||||
@@ -66,15 +67,15 @@ void sub_8112F18(u8 windowId)
|
|||||||
{
|
{
|
||||||
for (j = 0; j < width; j++)
|
for (j = 0; j < width; j++)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0) // Top row
|
||||||
k = 0;
|
tileId = 0;
|
||||||
else if (i == height - 1)
|
else if (i == height - 1) // Bottom row
|
||||||
k = 14;
|
tileId = 14;
|
||||||
else
|
else // Middle row
|
||||||
k = 5;
|
tileId = 5;
|
||||||
CpuCopy32(
|
CpuCopy32(
|
||||||
&ptr[k * 0x20],
|
&ptr[tileId * 32],
|
||||||
&buffer[(i * width + j) * 0x20],
|
&buffer[(i * width + j) * 32],
|
||||||
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};
|
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)
|
void PrintTextOnHelpMessageWindow(const u8 *text, u8 mode)
|
||||||
{
|
{
|
||||||
sub_8112FD0();
|
DrawHelpMessageWindowTiles();
|
||||||
PrintHelpMessageText(text);
|
PrintHelpMessageText(text);
|
||||||
if (mode)
|
if (mode)
|
||||||
CopyWindowToVram(sHelpMessageWindowId, mode);
|
CopyWindowToVram(sHelpMessageWindowId, mode);
|
||||||
|
|||||||
+1
-1
@@ -1646,7 +1646,7 @@ static const u8 *const sHelpSystemSubmenuItemLists[HELPCONTEXT_COUNT * (TOPIC_CO
|
|||||||
NULL, NULL, NULL, NULL, NULL // HELPCONTEXT_UNUSED
|
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] = {
|
static const u8 sHelpSystemContextTopicOrder[TOPIC_COUNT] = {
|
||||||
TOPIC_ABOUT_GAME,
|
TOPIC_ABOUT_GAME,
|
||||||
|
|||||||
+1
-1
@@ -2636,7 +2636,7 @@ static void ToggleFieldMoveDescriptionWindow(u8 action)
|
|||||||
{
|
{
|
||||||
if (ptr->windowId[2] == WINDOW_NONE)
|
if (ptr->windowId[2] == WINDOW_NONE)
|
||||||
ptr->windowId[2] = AddWindow(&sFieldMoveDescriptionWindowTemplate);
|
ptr->windowId[2] = AddWindow(&sFieldMoveDescriptionWindowTemplate);
|
||||||
sub_8112F18(ptr->windowId[2]);
|
DrawHelpMessageWindowTilesById(ptr->windowId[2]);
|
||||||
letterSpacing = GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING);
|
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]);
|
AddTextPrinterParameterized4(ptr->windowId[2], FONT_2, 3, 6, letterSpacing, 0, sFontColorTable[5], 0, sFieldMoveDescriptionTable[action - CURSOR_OPTION_FIELD_MOVES]);
|
||||||
PutWindowTilemap(ptr->windowId[2]);
|
PutWindowTilemap(ptr->windowId[2]);
|
||||||
|
|||||||
Reference in New Issue
Block a user