Address review comments; struct pointer style fix in scrcmd.c
This commit is contained in:
@@ -47,7 +47,7 @@ void RemoveStartMenuWindow(void);
|
|||||||
u16 GetStdWindowBaseTileNum(void);
|
u16 GetStdWindowBaseTileNum(void);
|
||||||
void DrawHelpMessageWindowWithText(const u8 * text);
|
void DrawHelpMessageWindowWithText(const u8 * text);
|
||||||
void DestroyHelpMessageWindow_(void);
|
void DestroyHelpMessageWindow_(void);
|
||||||
void sub_80F79A4(void);
|
void LoadSignPostWindowFrameGfx(void);
|
||||||
void SetDefaultFontsPointer(void);
|
void SetDefaultFontsPointer(void);
|
||||||
|
|
||||||
#endif // GUARD_NEW_MENU_HELPERS_H
|
#endif // GUARD_NEW_MENU_HELPERS_H
|
||||||
|
|||||||
+25
-25
@@ -5,26 +5,26 @@
|
|||||||
#include "script.h"
|
#include "script.h"
|
||||||
#include "text_window.h"
|
#include "text_window.h"
|
||||||
|
|
||||||
EWRAM_DATA u8 gUnknown_203709C = 0;
|
static EWRAM_DATA u8 sMessageBoxType = 0;
|
||||||
|
|
||||||
void textbox_fdecode_auto_and_task_add(const u8 *str);
|
static void textbox_fdecode_auto_and_task_add(const u8 *str);
|
||||||
void textbox_auto_and_task_add(void);
|
static void textbox_auto_and_task_add(void);
|
||||||
|
|
||||||
void sub_8069348(void)
|
void sub_8069348(void)
|
||||||
{
|
{
|
||||||
gUnknown_203709C = 0;
|
sMessageBoxType = 0;
|
||||||
gTextFlags.canABSpeedUpPrint = FALSE;
|
gTextFlags.canABSpeedUpPrint = FALSE;
|
||||||
gTextFlags.useAlternateDownArrow = FALSE;
|
gTextFlags.useAlternateDownArrow = FALSE;
|
||||||
gTextFlags.autoScroll = FALSE;
|
gTextFlags.autoScroll = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8069370(u8 taskId)
|
static void Task_RunFieldMessageBoxPrinter(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task * task = &gTasks[taskId];
|
struct Task * task = &gTasks[taskId];
|
||||||
switch (task->data[0])
|
switch (task->data[0])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (gQuestLogState == 2)
|
if (gQuestLogState == QL_STATE_2)
|
||||||
{
|
{
|
||||||
gTextFlags.autoScroll = TRUE;
|
gTextFlags.autoScroll = TRUE;
|
||||||
TextWindow_LoadTilesStdFrame1(0, 0x200);
|
TextWindow_LoadTilesStdFrame1(0, 0x200);
|
||||||
@@ -35,7 +35,7 @@ void sub_8069370(u8 taskId)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_80F79A4();
|
LoadSignPostWindowFrameGfx();
|
||||||
}
|
}
|
||||||
task->data[0]++;
|
task->data[0]++;
|
||||||
break;
|
break;
|
||||||
@@ -46,67 +46,67 @@ void sub_8069370(u8 taskId)
|
|||||||
case 2:
|
case 2:
|
||||||
if (RunTextPrinters_CheckPrinter0Active() != TRUE)
|
if (RunTextPrinters_CheckPrinter0Active() != TRUE)
|
||||||
{
|
{
|
||||||
gUnknown_203709C = 0;
|
sMessageBoxType = 0;
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void task_add_textbox(void)
|
static void task_add_textbox(void)
|
||||||
{
|
{
|
||||||
CreateTask(sub_8069370, 80);
|
CreateTask(Task_RunFieldMessageBoxPrinter, 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
void task_del_textbox(void)
|
static void task_del_textbox(void)
|
||||||
{
|
{
|
||||||
u8 taskId = FindTaskIdByFunc(sub_8069370);
|
u8 taskId = FindTaskIdByFunc(Task_RunFieldMessageBoxPrinter);
|
||||||
if (taskId != 0xFF)
|
if (taskId != 0xFF)
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ShowFieldMessage(const u8 *str)
|
bool8 ShowFieldMessage(const u8 *str)
|
||||||
{
|
{
|
||||||
if (gUnknown_203709C != 0)
|
if (sMessageBoxType != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
textbox_fdecode_auto_and_task_add(str);
|
textbox_fdecode_auto_and_task_add(str);
|
||||||
gUnknown_203709C = 2;
|
sMessageBoxType = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ShowFieldAutoScrollMessage(const u8 *str)
|
bool8 ShowFieldAutoScrollMessage(const u8 *str)
|
||||||
{
|
{
|
||||||
if (gUnknown_203709C != 0)
|
if (sMessageBoxType != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
gUnknown_203709C = 3;
|
sMessageBoxType = 3;
|
||||||
textbox_fdecode_auto_and_task_add(str);
|
textbox_fdecode_auto_and_task_add(str);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_806948C(const u8 *str)
|
bool8 sub_806948C(const u8 *str)
|
||||||
{
|
{
|
||||||
gUnknown_203709C = 3;
|
sMessageBoxType = 3;
|
||||||
textbox_fdecode_auto_and_task_add(str);
|
textbox_fdecode_auto_and_task_add(str);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_80694A4(const u8 *str)
|
bool8 sub_80694A4(const u8 *str)
|
||||||
{
|
{
|
||||||
if (gUnknown_203709C != 0)
|
if (sMessageBoxType != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
gUnknown_203709C = 2;
|
sMessageBoxType = 2;
|
||||||
textbox_auto_and_task_add();
|
textbox_auto_and_task_add();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textbox_fdecode_auto_and_task_add(const u8 *str)
|
static void textbox_fdecode_auto_and_task_add(const u8 *str)
|
||||||
{
|
{
|
||||||
StringExpandPlaceholders(gStringVar4, str);
|
StringExpandPlaceholders(gStringVar4, str);
|
||||||
AddTextPrinterDiffStyle(TRUE);
|
AddTextPrinterDiffStyle(TRUE);
|
||||||
task_add_textbox();
|
task_add_textbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
void textbox_auto_and_task_add(void)
|
static void textbox_auto_and_task_add(void)
|
||||||
{
|
{
|
||||||
AddTextPrinterDiffStyle(TRUE);
|
AddTextPrinterDiffStyle(TRUE);
|
||||||
task_add_textbox();
|
task_add_textbox();
|
||||||
@@ -116,17 +116,17 @@ void HideFieldMessageBox(void)
|
|||||||
{
|
{
|
||||||
task_del_textbox();
|
task_del_textbox();
|
||||||
ClearDialogWindowAndFrame(0, TRUE);
|
ClearDialogWindowAndFrame(0, TRUE);
|
||||||
gUnknown_203709C = 0;
|
sMessageBoxType = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 textbox_any_visible(void)
|
u8 textbox_any_visible(void)
|
||||||
{
|
{
|
||||||
return gUnknown_203709C;
|
return sMessageBoxType;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 IsFieldMessageBoxHidden(void)
|
bool8 IsFieldMessageBoxHidden(void)
|
||||||
{
|
{
|
||||||
if (gUnknown_203709C == 0)
|
if (sMessageBoxType == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -136,5 +136,5 @@ void sub_8069538(void)
|
|||||||
{
|
{
|
||||||
task_del_textbox();
|
task_del_textbox();
|
||||||
DrawStdWindowFrame(0, TRUE);
|
DrawStdWindowFrame(0, TRUE);
|
||||||
gUnknown_203709C = 0;
|
sMessageBoxType = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -716,7 +716,7 @@ void DestroyHelpMessageWindow_(void)
|
|||||||
DestroyHelpMessageWindow(2);
|
DestroyHelpMessageWindow(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80F79A4(void)
|
void LoadSignPostWindowFrameGfx(void)
|
||||||
{
|
{
|
||||||
Menu_LoadStdPal();
|
Menu_LoadStdPal();
|
||||||
sub_814FEEC(0, DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
|
sub_814FEEC(0, DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
|
||||||
|
|||||||
+216
-216
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user