From 03b05a4a318d044070f03c5f901387b771007fd2 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 18 Jun 2025 23:20:19 +0200 Subject: [PATCH] textbox related clean-up --- include/string_format.h | 1 + include/structs/str_text.h | 2 +- include/text_3.h | 4 +- src/credits1.c | 2 +- src/data/ground/ground_data_a01p01_station.h | 6 +- src/data/ground/ground_data_a02p03_station.h | 14 +- src/data/ground/ground_data_a03p01_station.h | 2 +- src/data/ground/ground_data_a03p03_station.h | 8 +- src/data/ground/ground_data_a04p01_station.h | 10 +- src/data/ground/ground_data_b01p01a_station.h | 30 +-- src/data/ground/ground_data_b01p02a_station.h | 16 +- src/data/ground/ground_data_d01p01_station.h | 8 +- src/data/ground/ground_data_d03p01_station.h | 4 +- src/data/ground/ground_data_d03p02_station.h | 2 +- src/data/ground/ground_data_d04p02_station.h | 2 +- src/data/ground/ground_data_d05p02_station.h | 8 +- src/data/ground/ground_data_d07p02_station.h | 28 +-- src/data/ground/ground_data_d08p01_station.h | 6 +- src/data/ground/ground_data_d08p02_station.h | 6 +- src/data/ground/ground_data_d09p01_station.h | 16 +- src/data/ground/ground_data_d10p03_station.h | 2 +- src/data/ground/ground_data_d11p03_station.h | 6 +- src/data/ground/ground_data_d20p01_station.h | 8 +- src/data/ground/ground_data_d22p01_station.h | 6 +- src/data/ground/ground_data_t00p01_station.h | 4 +- src/data/ground/ground_data_t01p01_station.h | 124 ++++++------ src/data/ground/ground_data_t01p03_station.h | 2 +- src/ground_script.c | 14 +- src/string_format.c | 128 ++++++------ src/text_1.c | 10 +- src/text_3.c | 4 +- src/textbox.c | 184 +++++++++--------- 32 files changed, 336 insertions(+), 331 deletions(-) diff --git a/include/string_format.h b/include/string_format.h index bd595a5d7..583eade84 100644 --- a/include/string_format.h +++ b/include/string_format.h @@ -34,6 +34,7 @@ void PrintFormattedStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u3 #define STR_FORMAT_FLAG_TIMED_AUTO_MSG_CLOSE 0x2 // Textbox closes automatically after waiting a couple of frames. #define STR_FORMAT_FLAG_DIALOGUE_SOUND 0x4 #define STR_FORMAT_FLAG_SPEAKER_NAME 0x8 +#define STR_FORMAT_FLAG_ONLY_TEXT 0x10 // No window, prints only text #define STR_FORMAT_FLAG_INSTANT_TEXT 0x20 #define STR_FORMAT_FLAG_INSTANT_TEXT_ON_AB_PRESS 0x40 #define STR_FORMAT_FLAG_NEW_LINE_TERMINATES 0x80 diff --git a/include/structs/str_text.h b/include/structs/str_text.h index ea1f5e1b0..319ec052c 100644 --- a/include/structs/str_text.h +++ b/include/structs/str_text.h @@ -66,7 +66,7 @@ typedef struct WindowTemplate #define WINDOW_TYPE_0 0 #define WINDOW_TYPE_WITHOUT_BORDER 1 -#define WINDOW_TYPE_2 2 +#define WINDOW_TYPE_ONLY_TEXT 2 // No border, no fill, prints pure text on bg #define WINDOW_TYPE_NORMAL 3 #define WINDOW_TYPE_4 4 #define WINDOW_TYPE_FILL_TRANSPARENT 5 diff --git a/include/text_3.h b/include/text_3.h index 5c313cf3d..b823bda36 100644 --- a/include/text_3.h +++ b/include/text_3.h @@ -8,8 +8,8 @@ typedef struct UnkDrawStringStruct s16 y; s16 unk4; s16 unk6; - s16 unk8; - s16 unkA; + s16 arrowSpritePosX; + s16 arrowSpritePosY; s32 unkC; u32 unk10; u32 unk14; diff --git a/src/credits1.c b/src/credits1.c index 0ec208992..adbf6c75c 100644 --- a/src/credits1.c +++ b/src/credits1.c @@ -13,7 +13,7 @@ EWRAM_INIT static Credits1Work *sCredits1Work = {NULL}; static const WindowTemplate sDummyWinTemplate = WIN_TEMPLATE_DUMMY; static const WindowTemplate gUnknown_80E4A28 = { .unk0 = 0, - .type = WINDOW_TYPE_2, + .type = WINDOW_TYPE_ONLY_TEXT, .pos = {2, 2}, .width = 26, .height = 16, diff --git a/src/data/ground/ground_data_a01p01_station.h b/src/data/ground/ground_data_a01p01_station.h index 38823024b..d192ee525 100644 --- a/src/data/ground/ground_data_a01p01_station.h +++ b/src/data/ground/ground_data_a01p01_station.h @@ -267,8 +267,8 @@ static const struct ScriptCommand s_gs162_g4_s0_lives0_dlg0[] = { /* 0x8210c68 * { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("You...{WAIT_PRESS}\nWho are you?") }, TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...{WAIT_PRESS}I am...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I am {NAME_2}.") }, + MSG_NPC(-1, _(" ...{WAIT_PRESS}I am...")), + MSG_NPC(-1, _(" I am {NAME_2}.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), @@ -396,7 +396,7 @@ static const struct ScriptCommand s_gs162_g5_s0_lives0_dlg0[] = { /* 0x82116b8 * WAIT(60), { 0x91, 0x0a, 0x0001, 0x00000000, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I've been waiting for you.") }, + MSG_NPC(-1, _(" I've been waiting for you.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), diff --git a/src/data/ground/ground_data_a02p03_station.h b/src/data/ground/ground_data_a02p03_station.h index e01f2af25..2aa5306ba 100644 --- a/src/data/ground/ground_data_a02p03_station.h +++ b/src/data/ground/ground_data_a02p03_station.h @@ -79,15 +79,15 @@ static const struct ScriptCommand s_gs166_g2_s0_station_sref_script[] = { /* 0x8 { 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Look at them go!\nThey're running for Mt. Blaze!") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Are they insane?\nMt. Blaze is doomed desolation!") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" No one's ever come this far\nbefore!") }, + MSG_NPC(-1, _(" Look at them go!\nThey're running for Mt. Blaze!")), + MSG_NPC(-1, _(" Are they insane?\nMt. Blaze is doomed desolation!")), + MSG_NPC(-1, _(" No one's ever come this far\nbefore!")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I don't wanna go anywhere like that.") }, + MSG_NPC(-1, _(" I don't wanna go anywhere like that.")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" It can't be helped.\nOnly those brave enough will give chase!") }, + MSG_NPC(-1, _(" It can't be helped.\nOnly those brave enough will give chase!")), TEXTBOX_CLEAR, BGM_FADEOUT(90), WAIT(120), @@ -123,13 +123,13 @@ static const struct ScriptCommand s_gs166_g2_s0_lives0_dlg0[] = { /* 0x821915c * MSG_NPC(1, _(" What'll we do,\n{NAME_0}?")), TEXTBOX_CLEAR, WAIT(45), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Look! There they are!") }, + MSG_NPC(-1, _(" Look! There they are!")), TEXTBOX_CLEAR, FANFARE_PLAY2(465), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(NOTICE_FUNC), { 0x91, 0x04, 0x000b, 0x00000006, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Get them!") }, + MSG_NPC(-1, _(" Get them!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_a03p01_station.h b/src/data/ground/ground_data_a03p01_station.h index 177b28c9c..bfff92bd5 100644 --- a/src/data/ground/ground_data_a03p01_station.h +++ b/src/data/ground/ground_data_a03p01_station.h @@ -104,7 +104,7 @@ static const struct ScriptCommand s_gs168_g1_s0_lives0_dlg0[] = { /* 0x821bbf8 * TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ........................") }, + MSG_NPC(-1, _(" ........................")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_a03p03_station.h b/src/data/ground/ground_data_a03p03_station.h index 61e95ae35..6d3e8ae36 100644 --- a/src/data/ground/ground_data_a03p03_station.h +++ b/src/data/ground/ground_data_a03p03_station.h @@ -201,8 +201,8 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * { 0x28, 0x01, 0x0005, 0x00000008, 0x00000000, NULL }, { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, { 0x54, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Finally.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Finally, you have arrived...") }, + MSG_NPC(-1, _(" ...Finally.")), + MSG_NPC(-1, _(" ...Finally, you have arrived...")), TEXTBOX_CLEAR, WAIT(10), { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Someone...{WAIT_PRESS}\nSomeone is talking to me...)") }, @@ -215,8 +215,8 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * { 0x27, 0x01, 0x0005, 0x00000030, 0x00000000, NULL }, { 0x91, 0x04, 0x0002, 0x00000002, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Finally...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" You have arrived...") }, + MSG_NPC(-1, _(" Finally...")), + MSG_NPC(-1, _(" You have arrived...")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, HALT, diff --git a/src/data/ground/ground_data_a04p01_station.h b/src/data/ground/ground_data_a04p01_station.h index 51fd96dd7..9a21ef430 100644 --- a/src/data/ground/ground_data_a04p01_station.h +++ b/src/data/ground/ground_data_a04p01_station.h @@ -602,8 +602,8 @@ static const struct ScriptCommand s_gs171_g5_s0_lives0_dlg0[] = { /* 0x8221f00 * { 0x2d, 0x09, 0x0001, 0x00000007, 0x00000000, NULL }, { 0x2d, 0x09, 0x0002, 0x00000058, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" .........Hey.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Hey, can you hear...") }, + MSG_NPC(-1, _(" .........Hey.")), + MSG_NPC(-1, _(" ...Hey, can you hear...")), MSG_NPC(2, _(" Snap out of it!")), TEXTBOX_CLEAR, { 0x27, 0x01, 0x0005, 0x0000003c, 0x00ffffff, NULL }, @@ -625,7 +625,7 @@ static const struct ScriptCommand s_gs171_g5_s0_lives0_dlg0[] = { /* 0x8221f00 * PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _("...Regained consciousness!")), TEXTBOX_CLEAR, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Oooooooohhhhh!") }, + MSG_NPC(-1, _(" Oooooooohhhhh!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(WAKEUP_FUNC), @@ -1164,10 +1164,10 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * WAIT(10), CALL_LABEL(2), { 0xe4, 0x00, 0x000d, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Ahahahahaha!") }, + MSG_NPC(-1, _(" Ahahahahaha!")), TEXTBOX_CLEAR, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" {NAME_0}...") }, + MSG_NPC(-1, _(" {NAME_0}...")), TEXTBOX_CLEAR, BGM_FADEOUT(180), { 0xe4, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_b01p01a_station.h b/src/data/ground/ground_data_b01p01a_station.h index e4d138188..c3f3ae51c 100644 --- a/src/data/ground/ground_data_b01p01a_station.h +++ b/src/data/ground/ground_data_b01p01a_station.h @@ -2855,7 +2855,7 @@ static const struct ScriptCommand s_gs9_g26_s0_lives0_dlg0[] = { /* 0x81a7140 */ VARIANT_DEFAULT(_(" You were just asked to go\non a rescue mission?")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Yes!") }, + MSG_NPC(-1, _(" Yes!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), WAIT(15), @@ -3048,7 +3048,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ MSG_NPC(2, _(" Yes.\nThank you very much.")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Oh! You've been rescued!\nGreat! Great!") }, + MSG_NPC(-1, _(" Oh! You've been rescued!\nGreat! Great!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, @@ -3069,7 +3069,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ VARIANT_DEFAULT(_(" Huh? What was that?{WAIT_PRESS}\nAm I hearing voices?")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Whoops! You can't see us?{WAIT_PRESS}\nThat's terribly rude of us!") }, + MSG_NPC(-1, _(" ...Whoops! You can't see us?{WAIT_PRESS}\nThat's terribly rude of us!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, @@ -3079,7 +3079,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ CALL_SCRIPT(SHOCK_FUNC), { 0x91, 0x04, 0x000a, 0x00000003, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hello. {NAME_4} here.") }, + MSG_NPC(-1, _(" Hello. {NAME_4} here.")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, MSG_NPC(2, _(" Oh! Papa!")), @@ -3884,7 +3884,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives0_dlg0[] = { /* 0x81acd04 */ VARIANT_DEFAULT(_(" Good morning!\nLet's do good again today!")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Is this the place?\nWhere that team named {COLOR CYAN}{TEAM_NAME}{RESET}\nis based?") }, + MSG_NPC(-1, _(" Is this the place?\nWhere that team named {COLOR CYAN}{TEAM_NAME}{RESET}\nis based?")), TEXTBOX_CLEAR, BGM_FADEOUT(60), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -4339,7 +4339,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives0_dlg0[] = { /* 0x81aee18 */ VARIANT_DEFAULT(_(" Good morning, {NAME_0}!\nLet's do good again today!")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" {NAME_0}!\n{NAME_1}!") }, + MSG_NPC(-1, _(" {NAME_0}!\n{NAME_1}!")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -4383,7 +4383,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives0_dlg0[] = { /* 0x81aee18 */ MSG_NPC(5, _(" But Metapod got lost in the\nwoods...\nHe's still lost out there...")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Oh, I see, I see!\nThat does sound bad!\nKekeke!") }, + MSG_NPC(-1, _(" Oh, I see, I see!\nThat does sound bad!\nKekeke!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, @@ -5077,7 +5077,7 @@ static const struct ScriptCommand s_gs9_g35_s0_lives0_dlg0[] = { /* 0x81b2540 */ VARIANT_DEFAULT(_(" {NAME_0}, good morning!\nLet's do good again today!")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Umm... Hello?") }, + MSG_NPC(-1, _(" Umm... Hello?")), TEXTBOX_CLEAR, FANFARE_PLAY2(469), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -5442,7 +5442,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives0_dlg0[] = { /* 0x81b3de0 */ TEXTBOX_CLEAR, WAIT(10), BGM_FADEOUT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Did you say Zapdos?") }, + MSG_NPC(-1, _(" Did you say Zapdos?")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -7723,7 +7723,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ VARIANT_DEFAULT(_(" OK!\nLet's get going!")), TEXTBOX_CLEAR, WAIT(20), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" {NAME_0}!") }, + MSG_NPC(-1, _(" {NAME_0}!")), TEXTBOX_CLEAR, FANFARE_PLAY2(465), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -7764,7 +7764,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ MSG_NPC(6, _(" We wanted to see you off,\n{NAME_0}.")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" M-me too!") }, + MSG_NPC(-1, _(" M-me too!")), TEXTBOX_CLEAR, FANFARE_PLAY2(469), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -8449,7 +8449,7 @@ static const struct ScriptCommand s_gs9_g58_s0_lives0_dlg0[] = { /* 0x81c37c8 */ SELECT_ENTITIES(-1, 1), { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, BGM_FADEOUT(90), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hey!") }, + MSG_NPC(-1, _(" Hey!")), TEXTBOX_CLEAR, FANFARE_PLAY2(463), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -9941,7 +9941,7 @@ static const struct ScriptCommand s_gs9_g74_s0_lives0_dlg0[] = { /* 0x81ca698 */ PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x00000000), PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000000), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0003, 0x00000000), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Uh...{WAIT_PRESS} Um...") }, + MSG_NPC(-1, _(" Uh...{WAIT_PRESS} Um...")), TEXTBOX_CLEAR, FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), @@ -10265,7 +10265,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ WAIT(30), { 0x91, 0x04, 0x0001, 0x00000002, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hey, you!") }, + MSG_NPC(-1, _(" Hey, you!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, @@ -13144,7 +13144,7 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ MSG_NPC(1, _(" Oh...\nIs that all...")), TEXTBOX_CLEAR, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hey, {NAME_2}!") }, + MSG_NPC(-1, _(" Hey, {NAME_2}!")), FANFARE_PLAY2(465), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_b01p02a_station.h b/src/data/ground/ground_data_b01p02a_station.h index 5e2eb75f4..4b482280b 100644 --- a/src/data/ground/ground_data_b01p02a_station.h +++ b/src/data/ground/ground_data_b01p02a_station.h @@ -460,7 +460,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ WAIT(30), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wh-where...?") }, + MSG_NPC(-1, _(" Wh-where...?")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, @@ -479,14 +479,14 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ WAIT(10), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Oh!\n...Did you maybe rescue me?") }, + MSG_NPC(-1, _(" Oh!\n...Did you maybe rescue me?")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0x91, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Th-thank you...") }, + MSG_NPC(-1, _(" Th-thank you...")), TEXTBOX_CLEAR, WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000009), @@ -498,7 +498,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Y-yes...") }, + MSG_NPC(-1, _(" Y-yes...")), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0002, 0x00000000), PORTRAIT_POS(2, -1, 0), { 0x2d, 0x03, 0x0002, 0x00000073, 0x00000000, NULL }, @@ -1554,7 +1554,7 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Uhh... Hello?") }, + MSG_NPC(-1, _(" Uhh... Hello?")), TEXTBOX_CLEAR, CALL_SCRIPT(WAKEUP_FUNC), WAIT(60), @@ -1570,7 +1570,7 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hello? Uhh...\nYou are {NAME_0}...{WAIT_PRESS} Aren't you?") }, + MSG_NPC(-1, _(" Hello? Uhh...\nYou are {NAME_0}...{WAIT_PRESS} Aren't you?")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(468), @@ -1584,7 +1584,7 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * WAIT(15), { 0x92, 0x04, 0x0001, 0x00000003, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Oh! You can't see us, of course!{WAIT_PRESS}\nHow very rude of us!") }, + MSG_NPC(-1, _(" ...Oh! You can't see us, of course!{WAIT_PRESS}\nHow very rude of us!")), TEXTBOX_CLEAR, WAIT(30), SELECT_ENTITIES(-1, 1), @@ -1593,7 +1593,7 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, WAIT(30), BGM_FADEIN(60, 1), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" We're pleased to meet you.\nWe are {NAME_2}.") }, + MSG_NPC(-1, _(" We're pleased to meet you.\nWe are {NAME_2}.")), MSG_NPC(2, _(" Last night, during the\nearthquake...")), MSG_NPC(2, _(" Our child {NAME_3} was\nattacked...")), MSG_NPC(2, _(" He was whisked away to\nthe peak of a tall mountain.")), diff --git a/src/data/ground/ground_data_d01p01_station.h b/src/data/ground/ground_data_d01p01_station.h index 357abbf8d..b4360ac34 100644 --- a/src/data/ground/ground_data_d01p01_station.h +++ b/src/data/ground/ground_data_d01p01_station.h @@ -49,9 +49,9 @@ static const struct ScriptCommand s_gs178_g1_s0_station_sref_script[] = { /* 0x8 TEXTBOX_CLEAR, WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ......") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ............") }, + MSG_NPC(-1, _(" ...")), + MSG_NPC(-1, _(" ......")), + MSG_NPC(-1, _(" ............")), MSG_VAR(2, PARTNER_TALK_KIND, -1), VARIANT(/* == */ 1, _(" ...Hey.")), VARIANT(/* == */ 1, _(" ...Hey, wake up.{WAIT_PRESS}\nWake up already.")), @@ -192,7 +192,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - { 0x91, 0x06, 0x000a, 0x00000002, 0x00000000, NULL }, BGM_FADEOUT(60), WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Somebody!\nPlease! Help me!") }, + MSG_NPC(-1, _(" Somebody!\nPlease! Help me!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, FANFARE_PLAY2(466), diff --git a/src/data/ground/ground_data_d03p01_station.h b/src/data/ground/ground_data_d03p01_station.h index a7365adfa..0bfcc6926 100644 --- a/src/data/ground/ground_data_d03p01_station.h +++ b/src/data/ground/ground_data_d03p01_station.h @@ -49,7 +49,7 @@ static const struct ScriptCommand s_gs182_g1_s0_lives0_dlg0[] = { /* 0x8232228 * VARIANT_DEFAULT(_(" So, {NAME_3} was\nwhisked to its peak...")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" That's right!") }, + MSG_NPC(-1, _(" That's right!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), WAIT(15), @@ -168,7 +168,7 @@ static const struct ScriptCommand s_gs182_g2_s0_lives0_dlg0[] = { /* 0x8232988 * VARIANT_DEFAULT(_(" Whatever it takes,\nlet's rescue {NAME_3}!")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" That's the spirit!") }, + MSG_NPC(-1, _(" That's the spirit!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), WAIT(15), diff --git a/src/data/ground/ground_data_d03p02_station.h b/src/data/ground/ground_data_d03p02_station.h index 2fe20d414..d69bf6949 100644 --- a/src/data/ground/ground_data_d03p02_station.h +++ b/src/data/ground/ground_data_d03p02_station.h @@ -98,7 +98,7 @@ static const struct ScriptCommand s_gs183_g1_s0_lives0_dlg0[] = { /* 0x82333ec * SELECT_ENTITIES(-1, 1), { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_TOP_LEFT, 0x0004, 0x00000000), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" BZBZBZZ!") }, + MSG_NPC(-1, _(" BZBZBZZ!")), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_d04p02_station.h b/src/data/ground/ground_data_d04p02_station.h index 55b5bef16..f5c15747e 100644 --- a/src/data/ground/ground_data_d04p02_station.h +++ b/src/data/ground/ground_data_d04p02_station.h @@ -64,7 +64,7 @@ static const struct ScriptCommand s_gs185_g1_s0_lives0_dlg0[] = { /* 0x8234d94 * VARIANT_DEFAULT(_(" No one should hold us back\nnow. Let's find {NAME_2}.")), TEXTBOX_CLEAR, WAIT(16), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Um, excuse me...") }, + MSG_NPC(-1, _(" Um, excuse me...")), TEXTBOX_CLEAR, WAIT(16), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_d05p02_station.h b/src/data/ground/ground_data_d05p02_station.h index aaca9860b..a46e6543a 100644 --- a/src/data/ground/ground_data_d05p02_station.h +++ b/src/data/ground/ground_data_d05p02_station.h @@ -139,8 +139,8 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * { 0x27, 0x01, 0x0005, 0x00000002, 0x00777700, NULL }, { 0x28, 0x00, 0x0005, 0x00000002, 0x00777700, NULL }, { 0x28, 0x01, 0x0005, 0x00000002, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Move aside, you!") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" He dared to disturb my sleep!") }, + MSG_NPC(-1, _(" Move aside, you!")), + MSG_NPC(-1, _(" He dared to disturb my sleep!")), TEXTBOX_CLEAR, FANFARE_PLAY2(502), { 0x27, 0x01, 0x0005, 0x00000002, 0x00000000, NULL }, @@ -148,7 +148,7 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * { 0x27, 0x01, 0x0005, 0x00000002, 0x00777700, NULL }, { 0x28, 0x00, 0x0005, 0x00000002, 0x00777700, NULL }, { 0x28, 0x01, 0x0005, 0x00000002, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I have no mercy for meddlers!\nAnd that includes you!") }, + MSG_NPC(-1, _(" I have no mercy for meddlers!\nAnd that includes you!")), TEXTBOX_CLEAR, { 0x27, 0x00, 0x0005, 0x00000020, 0x00000000, NULL }, WAIT(32), @@ -173,7 +173,7 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * { 0xe4, 0x00, 0x000c, 0x00000000, 0x00000000, NULL }, WAIT(15), BGM_SWITCH(9), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I am {NAME_6}!\nThe embodiment of lightning!") }, + MSG_NPC(-1, _(" I am {NAME_6}!\nThe embodiment of lightning!")), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0006, 0x00000000), MSG_NPC(6, _(" If you wish to save\n{NAME_3}, then scale {COLOR YELLOW_D}Mt. Thunder{RESET}!")), TEXTBOX_CLEAR, diff --git a/src/data/ground/ground_data_d07p02_station.h b/src/data/ground/ground_data_d07p02_station.h index 4d741b112..90eadba3d 100644 --- a/src/data/ground/ground_data_d07p02_station.h +++ b/src/data/ground/ground_data_d07p02_station.h @@ -229,7 +229,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * MSG_NPC(1, _(" Excuse me?{WAIT_PRESS}\nAre you maybe {NAME_2}?")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ......") }, + MSG_NPC(-1, _(" ......")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -238,14 +238,14 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * MSG_NPC(1, _(" Hello?")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ............") }, + MSG_NPC(-1, _(" ............")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, MSG_NPC(1, _(" Maybe he doesn't hear me?\nHello?!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ..................") }, + MSG_NPC(-1, _(" ..................")), TEXTBOX_CLEAR, WAIT(40), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -254,7 +254,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * MSG_NPC(1, _(" Hellooooooooooooooo?!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ........................") }, + MSG_NPC(-1, _(" ........................")), TEXTBOX_CLEAR, WAIT(60), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -290,7 +290,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, TEXTBOX_AUTO_PRESS(-1, -1), WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ............") }, + MSG_NPC(-1, _(" ............")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -300,7 +300,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, TEXTBOX_AUTO_PRESS(-1, -1), WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ....................................") }, + MSG_NPC(-1, _(" ....................................")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -310,7 +310,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, TEXTBOX_AUTO_PRESS(-1, -1), WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ................................................\n............................................................\n............................................................") }, + MSG_NPC(-1, _(" ................................................\n............................................................\n............................................................")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -334,7 +334,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, WAIT(90), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Snort...") }, + MSG_NPC(-1, _(" Snort...")), TEXTBOX_CLEAR, WAIT(30), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -344,11 +344,11 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Snort...{WAIT_PRESS} Giggle...") }, + MSG_NPC(-1, _(" Snort...{WAIT_PRESS} Giggle...")), TEXTBOX_CLEAR, WAIT(30), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Bufufufufufufufufu...") }, + MSG_NPC(-1, _(" Bufufufufufufufufu...")), TEXTBOX_CLEAR, WAIT(30), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, @@ -441,15 +441,15 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * WAIT(10), JUMP_LABEL(4), LABEL(4), /* = 0x04 */ - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Witness it...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" The sinking of the sun...") }, + MSG_NPC(-1, _(" Witness it...")), + MSG_NPC(-1, _(" The sinking of the sun...")), TEXTBOX_CLEAR, WAIT(10), BGM_FADEIN(60, 6), { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Indeed.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I am {NAME_2}.") }, + MSG_NPC(-1, _(" Indeed.")), + MSG_NPC(-1, _(" I am {NAME_2}.")), MSG_NPC(2, _(" You discerned my true\nidentity...{WAIT_PRESS}\nYou are not an ordinary sort...")), TEXTBOX_CLEAR, WAIT(10), diff --git a/src/data/ground/ground_data_d08p01_station.h b/src/data/ground/ground_data_d08p01_station.h index 30cb31e59..77e955931 100644 --- a/src/data/ground/ground_data_d08p01_station.h +++ b/src/data/ground/ground_data_d08p01_station.h @@ -179,9 +179,9 @@ static const struct ScriptCommand s_gs193_g1_s0_lives0_dlg0[] = { /* 0x824313c * TEXTBOX_CLEAR, { 0x91, 0x04, 0x0001, 0x00000006, 0x00000000, NULL }, WAIT(20), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I think they went this way.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" They can't get away.\nNot from all of us.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" We have to get rid of {NAME_0}\nquickly...") }, + MSG_NPC(-1, _(" I think they went this way.")), + MSG_NPC(-1, _(" They can't get away.\nNot from all of us.")), + MSG_NPC(-1, _(" We have to get rid of {NAME_0}\nquickly...")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(455), diff --git a/src/data/ground/ground_data_d08p02_station.h b/src/data/ground/ground_data_d08p02_station.h index 92a05fa06..52d9e7ed2 100644 --- a/src/data/ground/ground_data_d08p02_station.h +++ b/src/data/ground/ground_data_d08p02_station.h @@ -25,7 +25,7 @@ static const struct ScriptCommand s_gs194_g1_s0_station_sref_script[] = { /* 0x8 { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Stop right there!\nDon't let them get away!") }, + MSG_NPC(-1, _(" Stop right there!\nDon't let them get away!")), TEXTBOX_CLEAR, WAIT(4), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -64,11 +64,11 @@ static const struct ScriptCommand s_gs194_g1_s0_lives0_dlg0[] = { /* 0x8245734 * { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hey, look! There they are!\nOver there!") }, + MSG_NPC(-1, _(" Hey, look! There they are!\nOver there!")), FANFARE_PLAY2(465), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(NOTICE_FUNC), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Catch {NAME_0}!") }, + MSG_NPC(-1, _(" Catch {NAME_0}!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0x91, 0x04, 0x000b, 0x00000005, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_d09p01_station.h b/src/data/ground/ground_data_d09p01_station.h index 6648bbf76..d94052d0d 100644 --- a/src/data/ground/ground_data_d09p01_station.h +++ b/src/data/ground/ground_data_d09p01_station.h @@ -141,13 +141,13 @@ static const struct ScriptCommand s_gs195_g1_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(-1, 0), WAIT(4), WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Darn it!\nWhere'd they go?") }, + MSG_NPC(-1, _(" Darn it!\nWhere'd they go?")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" They had to go this way!\nKeep your eyes open!") }, + MSG_NPC(-1, _(" They had to go this way!\nKeep your eyes open!")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Rooooooaaaar!") }, + MSG_NPC(-1, _(" Rooooooaaaar!")), TEXTBOX_CLEAR, WAIT(15), FANFARE_PLAY2(503), @@ -440,17 +440,17 @@ static const struct ScriptCommand s_gs195_g3_s0_lives0_dlg0[] = { /* 0x82474ec * { 0x86, 0x00, 0x0200, 0x00000007, 0x00000000, NULL }, { 0x6b, 0x00, 0x0200, 0x00000008, 0x00000000, NULL }, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Where are they?\n{NAME_0} and that sidekick.") }, + MSG_NPC(-1, _(" Where are they?\n{NAME_0} and that sidekick.")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Do you think they tried getting over\nMt. Blaze?") }, + MSG_NPC(-1, _(" Do you think they tried getting over\nMt. Blaze?")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" No, that's impossible.{WAIT_PRESS}\nNobody could ever get past it.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" They should be around here still.\nKeep looking!") }, + MSG_NPC(-1, _(" No, that's impossible.{WAIT_PRESS}\nNobody could ever get past it.")), + MSG_NPC(-1, _(" They should be around here still.\nKeep looking!")), TEXTBOX_CLEAR, WAIT(15), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Rooooooaaaar!") }, + MSG_NPC(-1, _(" Rooooooaaaar!")), TEXTBOX_CLEAR, WAIT(15), FANFARE_PLAY2(503), diff --git a/src/data/ground/ground_data_d10p03_station.h b/src/data/ground/ground_data_d10p03_station.h index 8ef2687bc..57085b06b 100644 --- a/src/data/ground/ground_data_d10p03_station.h +++ b/src/data/ground/ground_data_d10p03_station.h @@ -160,7 +160,7 @@ static const struct ScriptCommand s_gs200_g1_s0_lives0_dlg0[] = { /* 0x824fcb4 * { 0x28, 0x01, 0x0005, 0x00000002, 0x00ffffff, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, BGM_FADEOUT(120), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Stop it!") }, + MSG_NPC(-1, _(" Stop it!")), TEXTBOX_CLEAR, BGM_FADEOUT(120), { 0x27, 0x00, 0x0005, 0x00000028, 0x00ffffff, NULL }, diff --git a/src/data/ground/ground_data_d11p03_station.h b/src/data/ground/ground_data_d11p03_station.h index d72b7a5f8..286e494d0 100644 --- a/src/data/ground/ground_data_d11p03_station.h +++ b/src/data/ground/ground_data_d11p03_station.h @@ -346,10 +346,10 @@ static const struct ScriptCommand s_gs203_g2_s0_lives0_dlg0[] = { /* 0x8257ee8 * TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" There they are!{WAIT_PRESS}\nI've spotted {NAME_0}!") }, + MSG_NPC(-1, _(" There they are!{WAIT_PRESS}\nI've spotted {NAME_0}!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" All right!\nI see them!") }, + MSG_NPC(-1, _(" All right!\nI see them!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -675,7 +675,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * WAIT(30), BGM_FADEOUT(30), FANFARE_PLAY2(466), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Cease this at once!") }, + MSG_NPC(-1, _(" Cease this at once!")), TEXTBOX_CLEAR, { 0x27, 0x00, 0x0001, 0x0000001e, 0x00ffffff, NULL }, SELECT_ENTITIES(-1, 1), diff --git a/src/data/ground/ground_data_d20p01_station.h b/src/data/ground/ground_data_d20p01_station.h index c94470c75..ef2d5793b 100644 --- a/src/data/ground/ground_data_d20p01_station.h +++ b/src/data/ground/ground_data_d20p01_station.h @@ -141,8 +141,8 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * WAIT(10), BGM_SWITCH(35), TEXTBOX_AUTO_PRESS(60, 60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ............{WAIT_PRESS}Is it{WAIT_PRESS} \nyou...?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ......Who...disturbs...my sleep...{WAIT_PRESS}\nIs it{WAIT_PRESS} you?!\n") }, + MSG_NPC(-1, _(" ............{WAIT_PRESS}Is it{WAIT_PRESS} \nyou...?")), + MSG_NPC(-1, _(" ......Who...disturbs...my sleep...{WAIT_PRESS}\nIs it{WAIT_PRESS} you?!\n")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -163,8 +163,8 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * { 0x97, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, WAIT(60), TEXTBOX_AUTO_PRESS(90, 90), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Me...?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I was...{WAIT_PRESS}\nEngineered...") }, + MSG_NPC(-1, _(" Me...?")), + MSG_NPC(-1, _(" I was...{WAIT_PRESS}\nEngineered...")), TEXTBOX_CLEAR, WAIT(10), WAIT(60), diff --git a/src/data/ground/ground_data_d22p01_station.h b/src/data/ground/ground_data_d22p01_station.h index ce2a79243..abb4d1ebe 100644 --- a/src/data/ground/ground_data_d22p01_station.h +++ b/src/data/ground/ground_data_d22p01_station.h @@ -86,9 +86,9 @@ static const struct ScriptCommand s_gs218_g1_s0_lives0_dlg0[] = { /* 0x826a108 * { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ............") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Y-you are...?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Did you maybe...{WAIT_PRESS}\ncome to save me?") }, + MSG_NPC(-1, _(" ............")), + MSG_NPC(-1, _(" ...Y-you are...?")), + MSG_NPC(-1, _(" ...Did you maybe...{WAIT_PRESS}\ncome to save me?")), TEXTBOX_CLEAR, BGM_FADEIN(20, 114), WAIT(10), diff --git a/src/data/ground/ground_data_t00p01_station.h b/src/data/ground/ground_data_t00p01_station.h index 8f6467c1b..0fcabad43 100644 --- a/src/data/ground/ground_data_t00p01_station.h +++ b/src/data/ground/ground_data_t00p01_station.h @@ -251,7 +251,7 @@ static const struct ScriptCommand s_gs0_g1_s0_lives10_dlg2[] = { /* 0x8133068 */ CHOICE(/* label */ 1, _("Main 0A〜4B Demo")), CHOICE(/* label */ 2, _("Main 5A〜7B")), CHOICE(/* label */ 3, _("Main 8A〜10A Ending")), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Farewell") }, + MSG_NPC(-1, _(" Farewell")), { 0x22, 0x01, 0x0004, 0x00000000, 0x00000000, NULL }, JUMP_SCRIPT(END_TALK), LABEL(1), /* = 0x01 */ @@ -917,7 +917,7 @@ static const struct ScriptCommand s_gs0_g1_s0_lives11_dlg2[] = { /* 0x8136060 */ ASK3(FALSE, /*default*/ 0, /* speaker */ -1, _(" I'm the event test Pokémon!\nMotions will differ from the real thing!")), CHOICE(/* label */ 1, _("Sub 0〜4")), CHOICE(/* label */ 2, _("Sub 5〜9")), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Farewell.") }, + MSG_NPC(-1, _(" Farewell.")), { 0x22, 0x01, 0x0004, 0x00000000, 0x00000000, NULL }, JUMP_SCRIPT(END_TALK), LABEL(1), /* = 0x01 */ diff --git a/src/data/ground/ground_data_t01p01_station.h b/src/data/ground/ground_data_t01p01_station.h index d5470e5e1..83f33e08a 100644 --- a/src/data/ground/ground_data_t01p01_station.h +++ b/src/data/ground/ground_data_t01p01_station.h @@ -2523,7 +2523,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ WAIT(30), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wait!") }, + MSG_NPC(-1, _(" Wait!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, WAIT(4), @@ -2547,8 +2547,8 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ MSG_NPC(3, _(" Oh! Wh-what do you want?")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Oh! It's {NAME_5}!") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" That's {NAME_5}?!") }, + MSG_NPC(-1, _(" Oh! It's {NAME_5}!")), + MSG_NPC(-1, _(" That's {NAME_5}?!")), TEXTBOX_CLEAR, WAIT(30), { 0xe4, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, @@ -2576,8 +2576,8 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ WAIT(60), { 0xe4, 0x00, 0x000d, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x000e, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wow...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" That {NAME_3} agreed without\nany argument...") }, + MSG_NPC(-1, _(" Wow...")), + MSG_NPC(-1, _(" That {NAME_3} agreed without\nany argument...")), TEXTBOX_CLEAR, WAIT(20), BGM_FADEIN(80, 7), @@ -2721,7 +2721,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ { 0x2d, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_LEFT, 0x0005, 0x00000000), WAIT(32), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Not if I can help it!\nKekeh!") }, + MSG_NPC(-1, _(" Not if I can help it!\nKekeh!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, @@ -5708,7 +5708,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ MSG_NPC(4, _(" Tch!\nJust appointed yourself that...")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Oh, my gosh! Oh, my goodness!") }, + MSG_NPC(-1, _(" Oh, my gosh! Oh, my goodness!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, @@ -7219,10 +7219,10 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ FANFARE_PLAY2(473), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, WAIT(90), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wh-what?!") }, + MSG_NPC(-1, _(" Wh-what?!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Is that true?") }, + MSG_NPC(-1, _(" Is that true?")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0003, 0x00000000), @@ -7234,28 +7234,28 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, WAIT(90), { 0x91, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" No idea?{WAIT_PRESS}\nHow is that possible?!{WAIT_PRESS}\nThis is {NAME_8} you're talking about?") }, + MSG_NPC(-1, _(" No idea?{WAIT_PRESS}\nHow is that possible?!{WAIT_PRESS}\nThis is {NAME_8} you're talking about?")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" But they haven't come back.\nThat's for real!") }, + MSG_NPC(-1, _(" But they haven't come back.\nThat's for real!")), TEXTBOX_CLEAR, WAIT(10), { 0x91, 0x04, 0x000a, 0x00000003, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" That's right...\nAnd it sounds as if {NAME_9} is out of\nour league...") }, + MSG_NPC(-1, _(" That's right...\nAnd it sounds as if {NAME_9} is out of\nour league...")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" What? It's that tough?\nThis Pokémon named {NAME_9}?") }, + MSG_NPC(-1, _(" What? It's that tough?\nThis Pokémon named {NAME_9}?")), TEXTBOX_CLEAR, WAIT(10), { 0x91, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Why don't you go underground and\nsee for yourself?") }, + MSG_NPC(-1, _(" Why don't you go underground and\nsee for yourself?")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hunh?!\nYou've gotta be kidding me!") }, + MSG_NPC(-1, _(" Hunh?!\nYou've gotta be kidding me!")), TEXTBOX_CLEAR, WAIT(10), { 0x91, 0x04, 0x000a, 0x00000003, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" There's magma flowing everywhere\nunderground.{WAIT_PRESS}\nI'd burn up if I went anywhere like that!") }, + MSG_NPC(-1, _(" There's magma flowing everywhere\nunderground.{WAIT_PRESS}\nI'd burn up if I went anywhere like that!")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(3, _(" Quiet, please! Be quiet!")), @@ -7323,7 +7323,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), WAIT(120), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I'll go.") }, + MSG_NPC(-1, _(" I'll go.")), TEXTBOX_CLEAR, WAIT(15), { 0xe4, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, @@ -7333,17 +7333,17 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, WAIT(60), BGM_SWITCH(7), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Whoa!") }, + MSG_NPC(-1, _(" Whoa!")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" It's B-{NAME_4}!") }, + MSG_NPC(-1, _(" It's B-{NAME_4}!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" You mean...\n{COLOR CYAN}Team Hydro{RESET}'s roughneck {NAME_4}?!") }, + MSG_NPC(-1, _(" You mean...\n{COLOR CYAN}Team Hydro{RESET}'s roughneck {NAME_4}?!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Those waterspouts on his back can\nrocket water so fast that it punches\nthrough thick iron plates!") }, + MSG_NPC(-1, _(" Those waterspouts on his back can\nrocket water so fast that it punches\nthrough thick iron plates!")), TEXTBOX_CLEAR, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), @@ -7357,7 +7357,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ MSG_NPC(4, _(" My Hydro Pump will put\n{NAME_9} down in one shot.")), TEXTBOX_CLEAR, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I'll join the party too.") }, + MSG_NPC(-1, _(" I'll join the party too.")), TEXTBOX_CLEAR, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, @@ -7365,16 +7365,16 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Woohoo! It's {NAME_5}!") }, + MSG_NPC(-1, _(" Woohoo! It's {NAME_5}!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" She's {COLOR CYAN}Team Constrictor{RESET}'s leader.") }, + MSG_NPC(-1, _(" She's {COLOR CYAN}Team Constrictor{RESET}'s leader.")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" She's known for persistent and\nclingy attacks.{WAIT_PRESS} She ensnares foes with\nher tentacles, then head-butts them!") }, + MSG_NPC(-1, _(" She's known for persistent and\nclingy attacks.{WAIT_PRESS} She ensnares foes with\nher tentacles, then head-butts them!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" She'd be nasty to face in any battle\nof endurance.") }, + MSG_NPC(-1, _(" She'd be nasty to face in any battle\nof endurance.")), TEXTBOX_CLEAR, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), @@ -7386,7 +7386,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ MSG_NPC(5, _(" Darlings, when I see a tough\nPokémon, I want to tangle with them.")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Say, how about not forgetting about\nme?") }, + MSG_NPC(-1, _(" Say, how about not forgetting about\nme?")), TEXTBOX_CLEAR, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, @@ -7394,14 +7394,14 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wow! {NAME_6}!") }, + MSG_NPC(-1, _(" Wow! {NAME_6}!")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" He's the most brutal out of {COLOR CYAN}Team\nRumblerock{RESET}!") }, + MSG_NPC(-1, _(" He's the most brutal out of {COLOR CYAN}Team\nRumblerock{RESET}!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" His body is rock hard.\nHe's supposed to be able to withstand\nhuge explosions without taking damage.") }, + MSG_NPC(-1, _(" His body is rock hard.\nHe's supposed to be able to withstand\nhuge explosions without taking damage.")), TEXTBOX_CLEAR, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, @@ -7435,10 +7435,10 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ MSG_NPC(3, _(" We will have these three\nrescuers head underground!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Yeah! Good choice!") }, + MSG_NPC(-1, _(" Yeah! Good choice!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" You're representing us!\nMake us proud!") }, + MSG_NPC(-1, _(" You're representing us!\nMake us proud!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, @@ -7459,10 +7459,10 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ { 0x91, 0x04, 0x000a, 0x00000002, 0x00000000, NULL }, { 0x91, 0x1e, 0x0002, 0x00000006, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Win it for us!") }, + MSG_NPC(-1, _(" Win it for us!")), TEXTBOX_CLEAR, WAIT(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Save {NAME_8}'s team!") }, + MSG_NPC(-1, _(" Save {NAME_8}'s team!")), TEXTBOX_CLEAR, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), { 0xe4, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, @@ -8741,7 +8741,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ BGM_FADEOUT(60), WAIT(60), BGM_SWITCH(10), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Kekekekekeh!") }, + MSG_NPC(-1, _(" Kekekekekeh!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, @@ -8788,12 +8788,12 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ { 0xe4, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" It's too much...\nEven {NAME_5} went down...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" It's gotta be awful tough.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Who'd want to go into a dungeon that\ndangerous?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" There's no way. I can't go.{WAIT_PRESS}\nI burn too easily.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I can't take earthquakes.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" It'd be like going and knowing full\nwell we'd get wiped...") }, + MSG_NPC(-1, _(" It's too much...\nEven {NAME_5} went down...")), + MSG_NPC(-1, _(" It's gotta be awful tough.")), + MSG_NPC(-1, _(" Who'd want to go into a dungeon that\ndangerous?")), + MSG_NPC(-1, _(" There's no way. I can't go.{WAIT_PRESS}\nI burn too easily.")), + MSG_NPC(-1, _(" I can't take earthquakes.")), + MSG_NPC(-1, _(" It'd be like going and knowing full\nwell we'd get wiped...")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -8906,8 +8906,8 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, FANFARE_PLAY2(465), WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wha-what?!") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" What did they say?!") }, + MSG_NPC(-1, _(" Wha-what?!")), + MSG_NPC(-1, _(" What did they say?!")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0004, 0x00000006), @@ -8917,12 +8917,12 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Hey, who are they?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Can't say I know them...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" It's {COLOR CYAN}Team {TEAM_NAME}{RESET}.{WAIT_PRESS}\nThey're well known around these parts.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" {COLOR CYAN}Team {TEAM_NAME}{RESET}...?{WAIT_PRESS}\nYou mean the lot that were suspected of\ninvolvement in the Ninetales legend?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I heard about that!{WAIT_PRESS}\nWeren't they living like fugitives until\nrecently?") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Can they handle it?{WAIT_PRESS}\nThey don't look very tough.") }, + MSG_NPC(-1, _(" Hey, who are they?")), + MSG_NPC(-1, _(" Can't say I know them...")), + MSG_NPC(-1, _(" It's {COLOR CYAN}Team {TEAM_NAME}{RESET}.{WAIT_PRESS}\nThey're well known around these parts.")), + MSG_NPC(-1, _(" {COLOR CYAN}Team {TEAM_NAME}{RESET}...?{WAIT_PRESS}\nYou mean the lot that were suspected of\ninvolvement in the Ninetales legend?")), + MSG_NPC(-1, _(" I heard about that!{WAIT_PRESS}\nWeren't they living like fugitives until\nrecently?")), + MSG_NPC(-1, _(" Can they handle it?{WAIT_PRESS}\nThey don't look very tough.")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, @@ -8982,7 +8982,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ WAIT(10), { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...That's right.\nI wasn't thinking straight...out of fear.") }, + MSG_NPC(-1, _(" ...That's right.\nI wasn't thinking straight...out of fear.")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, @@ -8994,9 +8994,9 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ MSG_NPC(4, _(" ...Ugegegeh?")), TEXTBOX_CLEAR, WAIT(60), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" We all forgot the most important\nthing. We are rescue teams.") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Pride...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" We have it too!\nPride as rescuers!") }, + MSG_NPC(-1, _(" We all forgot the most important\nthing. We are rescue teams.")), + MSG_NPC(-1, _(" ...Pride...")), + MSG_NPC(-1, _(" We have it too!\nPride as rescuers!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, @@ -9077,30 +9077,30 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ MSG_NPC(4, _(" Ugegegeh!\nYou lot, that wasn't the tune you\nwere whistling just a little...")), TEXTBOX_CLEAR, WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Aye, that's right!") }, + MSG_NPC(-1, _(" Aye, that's right!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0x91, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" There've got to be ways we can\nget through!") }, + MSG_NPC(-1, _(" There've got to be ways we can\nget through!")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0x91, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" If we all pull together, we'll be sure\nto find a way!") }, + MSG_NPC(-1, _(" If we all pull together, we'll be sure\nto find a way!")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0x91, 0x04, 0x000a, 0x00000007, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" We'll conquer the dungeon by\nhaving all the rescue teams cooperate!") }, + MSG_NPC(-1, _(" We'll conquer the dungeon by\nhaving all the rescue teams cooperate!")), WAIT(30), { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wrooooooooaaaar!") }, + MSG_NPC(-1, _(" Wrooooooooaaaar!")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, { 0xe3, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, @@ -9144,7 +9144,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ TEXTBOX_CLEAR, WAIT(30), { 0xe4, 0x00, 0x0014, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Wrooooooaaaaar!") }, + MSG_NPC(-1, _(" Wrooooooaaaaar!")), TEXTBOX_CLEAR, WAIT(60), { 0xe4, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, @@ -13000,8 +13000,8 @@ static const struct ScriptCommand s_gs1_g43_s0_lives0_dlg0[] = { /* 0x816cf4c */ { 0xe4, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" No more...{WAIT_PRESS}\nI can't walk anymore...") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" I'm falling down...") }, + MSG_NPC(-1, _(" No more...{WAIT_PRESS}\nI can't walk anymore...")), + MSG_NPC(-1, _(" I'm falling down...")), TEXTBOX_CLEAR, WAIT(10), { 0xe4, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, @@ -13551,7 +13551,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ TEXTBOX_CLEAR, BGM_FADEOUT(60), WAIT(30), - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" That rumor...{WAIT_PRESS}\nIt's true...") }, + MSG_NPC(-1, _(" That rumor...{WAIT_PRESS}\nIt's true...")), TEXTBOX_CLEAR, { 0xe4, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, { 0xe4, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, diff --git a/src/data/ground/ground_data_t01p03_station.h b/src/data/ground/ground_data_t01p03_station.h index b96eee470..caf51beb5 100644 --- a/src/data/ground/ground_data_t01p03_station.h +++ b/src/data/ground/ground_data_t01p03_station.h @@ -478,7 +478,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives0_dlg0[] = { /* 0x818b710 */ { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), { 0x34, 0x00, 0x0003, 0x00000000, 0x00000000, _(" (Papa still hasn't come\nhome...)") }, - { 0x34, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Our son!{WAIT_PRESS}\nSorry to make you wait!") }, + MSG_NPC(-1, _(" Our son!{WAIT_PRESS}\nSorry to make you wait!")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(465), diff --git a/src/ground_script.c b/src/ground_script.c index 4a22b01ea..59c76ab5e 100644 --- a/src/ground_script.c +++ b/src/ground_script.c @@ -1909,7 +1909,7 @@ s32 ExecuteScriptCommand(Action *action) break; } case 9: { - struct {s16 unk0; s16 unk2;} unk; + ActionUnkIds unk; s16 res = sub_80A7AE8((s16)curCmd.arg1); unk.unk2 = res; if (unk.unk2 >= 0) { @@ -2007,15 +2007,15 @@ s32 ExecuteScriptCommand(Action *action) } case 0x3e: { sub_80920B8(sPokeNameBuffer); - sPokeNameBuffer[10] = 0; + sPokeNameBuffer[10] = '\0'; sub_809B1C0(5, 0, sPokeNameBuffer); sub_80A87AC(0, 11); return 2; } case 0x3f: { int i; - for (i = 0; i < 12; i++) { - sPokeNameBuffer[i] = 0; + for (i = 0; i < ARRAY_COUNT_INT(sPokeNameBuffer); i++) { + sPokeNameBuffer[i] = '\0'; } sub_809B1C0(6, (u8)curCmd.argByte, sPokeNameBuffer); sub_80A87AC(0, 11); @@ -2026,13 +2026,13 @@ s32 ExecuteScriptCommand(Action *action) break; } case 0x43: { - FadeOutAllMusic(curCmd.argShort < 0 ? 30 : (u16)curCmd.argShort); + FadeOutAllMusic(curCmd.argShort < 0 ? 30 : curCmd.argShort); break; } case 0x44: { u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1; if (id != 999) { - StartNewBGM_((u16)id); + StartNewBGM_(id); } else { StopBGMusic(); } @@ -2041,7 +2041,7 @@ s32 ExecuteScriptCommand(Action *action) case 0x45: { u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1; if (id != 999) { - FadeInNewBGM_((u16)id, (u16)curCmd.argShort); //sub_8011900 + FadeInNewBGM_(id, curCmd.argShort); } else { StopBGMusic(); } diff --git a/src/string_format.c b/src/string_format.c index bc9bf48cf..481094664 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -31,30 +31,28 @@ static const MenuItem sYesNoMenuItems_DefaultNo[] = }; static const u32 gUnknown_80D48A0[] = {0x7, 0x2, 0x2}; -static const WindowTemplate gUnknown_80D48AC = { - 0x00, - 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, 0x00 +static const WindowTemplate sWinTemplateDummy = WIN_TEMPLATE_DUMMY; + +static const WindowTemplate sDialogueBoxWindowTemplate = { + .unk0 = 0, + .type = WINDOW_TYPE_0, + .pos = {2, 15}, + .width = 26, + .height = 5, + .unk10 = 7, + .unk12 = 0, + .header = NULL, }; -static const WindowTemplate gUnknown_80D48C4 = { - 0x00, - 0x00, - 0x02, 0x0F, - 0x1A, 0x05, - 0x07, 0x00, - NULL -}; - -static const WindowTemplate gUnknown_80D48DC = { - 0x00, - 0x02, - 0x02, 0x08, - 0x1A, 0x05, - 0x07, 0x00, - NULL +static const WindowTemplate sOnlyTextDialogueBoxWindowTemplate = { + .unk0 = 0, + .type = WINDOW_TYPE_ONLY_TEXT, + .pos = {2, 8}, + .width = 26, + .height = 5, + .unk10 = 7, + .unk12 = 0, + .header = NULL, }; extern void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2); @@ -117,7 +115,7 @@ static UNUSED EWRAM_DATA u8 sUnusedEwram1[4] = {0}; static EWRAM_DATA TouchScreenMenuInput sDialogueMenuTouchScreenInput = {0}; -static EWRAM_INIT WindowTemplates sUnknown_203B198 = { +static EWRAM_INIT WindowTemplates sDialogueBoxWinTemplates = { .id = { [0] = { .unk0 = 0, @@ -212,50 +210,50 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me gUnknown_202EC18 = arg_0; gUnknown_202EC1C = r9; ResetTouchScreenMenuInput(&sDialogueMenuTouchScreenInput); - if (flags & 0x10) { - sUnknown_203B198.id[0] = gUnknown_80D48DC; + if (flags & STR_FORMAT_FLAG_ONLY_TEXT) { + sDialogueBoxWinTemplates.id[0] = sOnlyTextDialogueBoxWindowTemplate; } else { - sUnknown_203B198.id[0] = gUnknown_80D48C4; + sDialogueBoxWinTemplates.id[0] = sDialogueBoxWindowTemplate; } - sUnknown_203B198.id[1].width = 0; - sUnknown_203B198.id[1].height = 0; - sUnknown_203B198.id[1].unk10 = 0; - sUnknown_203B198.id[1].unk0 = 0x40; + sDialogueBoxWinTemplates.id[1].width = 0; + sDialogueBoxWinTemplates.id[1].height = 0; + sDialogueBoxWinTemplates.id[1].unk10 = 0; + sDialogueBoxWinTemplates.id[1].unk0 = 0x40; if (monPortraitPtr != NULL && monPortraitPtr->faceData != NULL && monPortraitPtr->faceData->sprites[monPortraitPtr->spriteId].gfx != 0) { s32 i; - sUnknown_203B198.id[1].pos.x = monPortraitPtr->pos.x; - sUnknown_203B198.id[1].pos.y = monPortraitPtr->pos.y; - sUnknown_203B198.id[1].width = 5; - sUnknown_203B198.id[1].height = 5; - sUnknown_203B198.id[1].unk10 = 5; + sDialogueBoxWinTemplates.id[1].pos.x = monPortraitPtr->pos.x; + sDialogueBoxWinTemplates.id[1].pos.y = monPortraitPtr->pos.y; + sDialogueBoxWinTemplates.id[1].width = 5; + sDialogueBoxWinTemplates.id[1].height = 5; + sDialogueBoxWinTemplates.id[1].unk10 = 5; for (i = 0; i < 16; i++) { SetBGPaletteBufferColorArray(224 + i, &monPortraitPtr->faceData->sprites[monPortraitPtr->spriteId].pal[i]); } portraitOn = TRUE; if (monPortraitPtr->unkE) { - sUnknown_203B198.id[1].type = WINDOW_TYPE_7; + sDialogueBoxWinTemplates.id[1].type = WINDOW_TYPE_7; } else { - sUnknown_203B198.id[1].type = WINDOW_TYPE_FILL_TRANSPARENT; + sDialogueBoxWinTemplates.id[1].type = WINDOW_TYPE_FILL_TRANSPARENT; } } - sUnknown_203B198.id[2] = gUnknown_80D48AC; - sUnknown_203B198.id[3] = gUnknown_80D48AC; + sDialogueBoxWinTemplates.id[2] = sWinTemplateDummy; + sDialogueBoxWinTemplates.id[3] = sWinTemplateDummy; ResetUnusedInputStruct(); - ShowWindows(&sUnknown_203B198, TRUE, TRUE); + ShowWindows(&sDialogueBoxWinTemplates, TRUE, TRUE); sTextPrintStruct.x = 4; sTextPrintStruct.y = 4; - sTextPrintStruct.unk8 = 0x70; - sTextPrintStruct.unkA = (gWindows[0].y * 8) + TEXTBOX_HEIGHT; + sTextPrintStruct.arrowSpritePosX = 0x70; + sTextPrintStruct.arrowSpritePosY = (gWindows[0].y * 8) + TEXTBOX_HEIGHT; sTextPrintStruct.unk10 = 7; sTextPrintStruct.unk1C = 0; sTextPrintStruct.waitButtonPress = 0; - SetCharacterMask((flags & 0x10) ? 8 : 3); + SetCharacterMask((flags & STR_FORMAT_FLAG_ONLY_TEXT) ? 8 : 3); sPrintStringState = 1; sStringFormatFlags = flags; if (flags & STR_FORMAT_FLAG_INSTANT_TEXT) { @@ -360,7 +358,7 @@ void DrawDialogueBoxString(void) } if (TEXTBOX_OUT_OF_SPACE(sTextPrintStruct.y)) { - if (!(sStringFormatFlags & 0x10)) { + if (!(sStringFormatFlags & STR_FORMAT_FLAG_ONLY_TEXT)) { sTextPrintStruct.unk1C = 0; sTextPrintStruct.waitButtonPress = TRUE; sPrintStringState = STATE_WAIT_FOR_BUTTON_NEW_TEXTBOX; @@ -486,13 +484,13 @@ void DrawDialogueBoxString(void) SpriteSetPriority(&sDialogueBoxArrowSprite, 0); SpriteSetPalNum(&sDialogueBoxArrowSprite, 15); - if (sStringFormatFlags & 0x10) { + if (sStringFormatFlags & STR_FORMAT_FLAG_ONLY_TEXT) { SpriteSetY(&sDialogueBoxArrowSprite, 120); SpriteSetX(&sDialogueBoxArrowSprite, 112); } else { - SpriteSetY(&sDialogueBoxArrowSprite, sTextPrintStruct.unkA + 1); - SpriteSetX(&sDialogueBoxArrowSprite, sTextPrintStruct.unk8); + SpriteSetY(&sDialogueBoxArrowSprite, sTextPrintStruct.arrowSpritePosY + 1); + SpriteSetX(&sDialogueBoxArrowSprite, sTextPrintStruct.arrowSpritePosX); } AddSprite(&sDialogueBoxArrowSprite, 256, NULL, NULL); @@ -509,13 +507,13 @@ void DrawDialogueBoxString(void) sTextPrintStruct.x = 4; if (TEXTBOX_OUT_OF_SPACE(sTextPrintStruct.y)) { sTextPrintStruct.y = 4; - if (sStringFormatFlags & 0x10) { + if (sStringFormatFlags & STR_FORMAT_FLAG_ONLY_TEXT) { CallPrepareTextbox_8008C54(0); - sPrintStringState = 1; + sPrintStringState = STATE_PRINT_CHAR; } else if (sTextPrintStruct.unk1C != 0) { CallPrepareTextbox_8008C54(0); - sPrintStringState = 1; + sPrintStringState = STATE_PRINT_CHAR; } else { sPrintStringState = 10; @@ -523,15 +521,15 @@ void DrawDialogueBoxString(void) } } else { - sPrintStringState = 1; + sPrintStringState = STATE_PRINT_CHAR; } } else { - sPrintStringState = 1; + sPrintStringState = STATE_PRINT_CHAR; } - sTextPrintStruct.unk8 = 0x70; - sTextPrintStruct.unkA = (gWindows[0].y * 8) + TEXTBOX_HEIGHT; + sTextPrintStruct.arrowSpritePosX = 0x70; + sTextPrintStruct.arrowSpritePosY = (gWindows[0].y * 8) + TEXTBOX_HEIGHT; } keepLooping = FALSE; } @@ -540,7 +538,7 @@ void DrawDialogueBoxString(void) sTextPrintStruct.unk28++; gIwramTextFunc3(0); if (sTextPrintStruct.unk28 > 17) { - sPrintStringState = 1; + sPrintStringState = STATE_PRINT_CHAR; } keepLooping = FALSE; } @@ -606,21 +604,21 @@ static void sub_8014A88(void) if (r5 % 8) r2++; - sUnknown_203B198.id[2].type = gUnknown_202EC10; + sDialogueBoxWinTemplates.id[2].type = gUnknown_202EC10; r1 = r7 / 8; r1 += 2; - sUnknown_203B198.id[2].width = r1; - sUnknown_203B198.id[2].unk10 = r2; - sUnknown_203B198.id[2].height = r2; - sUnknown_203B198.id[2].pos.x = 28 - r1; - sUnknown_203B198.id[2].pos.y = 14 - r2; - sUnknown_203B198.id[0].unk0 = 0x80; - sUnknown_203B198.id[1].unk0 = 0xC0; + sDialogueBoxWinTemplates.id[2].width = r1; + sDialogueBoxWinTemplates.id[2].unk10 = r2; + sDialogueBoxWinTemplates.id[2].height = r2; + sDialogueBoxWinTemplates.id[2].pos.x = 28 - r1; + sDialogueBoxWinTemplates.id[2].pos.y = 14 - r2; + sDialogueBoxWinTemplates.id[0].unk0 = 0x80; + sDialogueBoxWinTemplates.id[1].unk0 = 0xC0; if (sNeverWrittenToUnknownStructPtr != NULL) { - sUnknown_203B198.id[3] = sNeverWrittenToUnknownStructPtr->unk0; + sDialogueBoxWinTemplates.id[3] = sNeverWrittenToUnknownStructPtr->unk0; } ResetUnusedInputStruct(); - ShowWindows(&sUnknown_203B198, TRUE, FALSE); + ShowWindows(&sDialogueBoxWinTemplates, TRUE, FALSE); sub_8012D60(&gUnknown_202EBC0, sDialogueMenuItems, gUnknown_80D48A0, gUnknown_202EC18, gUnknown_202EC1C, 2); if (sNeverWrittenToUnknownStructPtr != NULL) { sub_80073B8(3); diff --git a/src/text_1.c b/src/text_1.c index 97af61a5b..9f0a2d3ee 100644 --- a/src/text_1.c +++ b/src/text_1.c @@ -410,7 +410,7 @@ static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32] switch (window->type) { case WINDOW_TYPE_0: case WINDOW_TYPE_WITHOUT_BORDER: - case WINDOW_TYPE_2: + case WINDOW_TYPE_ONLY_TEXT: case WINDOW_TYPE_WITH_HEADER: break; case WINDOW_TYPE_NORMAL: @@ -478,7 +478,7 @@ static void PutWindowLeftBorderTilemap(Window *window, s32 x, s32 y, s32 a3, u16 switch (window->type) { case WINDOW_TYPE_WITHOUT_BORDER: - case WINDOW_TYPE_2: + case WINDOW_TYPE_ONLY_TEXT: break; case WINDOW_TYPE_0: if (a3 == 0) { @@ -519,7 +519,7 @@ static void PutWindowFillTilemap(Window *window, s32 x, s32 y, s32 a3, u16 tilem return; switch (window->type) { - case WINDOW_TYPE_2: + case WINDOW_TYPE_ONLY_TEXT: tilemaps[0][y][x] = a3 | TILEMAP_PAL(15); tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x278) | TILEMAP_PAL(15); break; @@ -548,7 +548,7 @@ static void PutWindowRightBorderTilemap(Window *window, s32 x, s32 y, s32 a3, u1 switch (window->type) { case WINDOW_TYPE_WITHOUT_BORDER: - case WINDOW_TYPE_2: + case WINDOW_TYPE_ONLY_TEXT: break; case WINDOW_TYPE_0: if (a3 == 0) { @@ -596,7 +596,7 @@ static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][ switch (window->type) { case WINDOW_TYPE_0: case WINDOW_TYPE_WITHOUT_BORDER: - case WINDOW_TYPE_2: + case WINDOW_TYPE_ONLY_TEXT: break; case WINDOW_TYPE_NORMAL: case WINDOW_TYPE_WITH_HEADER: diff --git a/src/text_3.c b/src/text_3.c index 3ae2bd48c..dc4d10d1e 100644 --- a/src/text_3.c +++ b/src/text_3.c @@ -350,8 +350,8 @@ static const u8 *HandleCharFormatInternal(Window *windows, const u8 *str, UnkDra } else if (str[1] == 'W') { str += 2; - sp->unk8 = ((windows[0].x * 8) + sp->x) - 2; - sp->unkA = ((windows[0].y * 8) + sp->y) + 3; + sp->arrowSpritePosX = ((windows[0].x * 8) + sp->x) - 2; + sp->arrowSpritePosY = ((windows[0].y * 8) + sp->y) + 3; sp->waitButtonPress = TRUE; break; } diff --git a/src/textbox.c b/src/textbox.c index 806af5d84..cb033ff98 100644 --- a/src/textbox.c +++ b/src/textbox.c @@ -2,6 +2,7 @@ #include "globaldata.h" #include "textbox.h" #include "constants/dungeon.h" +#include "constants/monster.h" #include "code_800558C.h" #include "code_800D090.h" #include "music_util.h" @@ -70,13 +71,17 @@ struct unkStruct_3001B64_unk418 #define MAX_TEXTBOX_PORTRAITS 10 +enum { + TEXTBOX_TYPE_NORMAL = 1, +}; + struct Textbox { // size: 0x5A8 - u32 unk0; + u32 type; s32 endMsgFrames; s32 midMsgFrames; - struct TextboxText unkC; + struct TextboxText text; u32 unk414; const struct unkStruct_3001B64_unk418 *unk418; const MenuItem *unk41C; @@ -267,11 +272,11 @@ static const MenuItem sEmptyMenuItems[] = static const u32 sScriptTextboxTypes[] = { - [SCRIPT_TEXT_TYPE_INSTANT] = 1, - [SCRIPT_TEXT_TYPE_PLAYER] = 1, - [SCRIPT_TEXT_TYPE_NPC] = 1, - [SCRIPT_TEXT_TYPE_LETTER] = 1, - [SCRIPT_TEXT_TYPE_4] = 1, + [SCRIPT_TEXT_TYPE_INSTANT] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_PLAYER] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_NPC] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_LETTER] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_4] = TEXTBOX_TYPE_NORMAL, }; static const u16 sScriptFlagSets[] = @@ -296,14 +301,14 @@ EWRAM_DATA u16 gUnknown_20399DE = 0; static void ResetAllTextboxPortraits(void); static bool8 ScriptPrintTextInternal(struct TextboxText *ptr, u32 flags_, s32 a2_, const char *text); -static u32 ResetTextboxType(u32 param_1, u32 param_2); +static u32 ResetTextboxType(u32 textboxType, bool8 unused); static void ResetTextbox(void); void TextboxInit(void) { ResetDialogueBox(); sTextbox = MemoryAlloc(sizeof(struct Textbox), 6); - sTextbox->unk0 = 0; + sTextbox->type = 0; sTextbox->endMsgFrames = -1; sTextbox->midMsgFrames = -1; gUnknown_20399DC = 0; @@ -335,7 +340,7 @@ void TextboxResetAll(void) { s32 index; - sTextbox->unk0 = 0; + sTextbox->type = 0; sTextbox->endMsgFrames = -1; sTextbox->midMsgFrames = -1; gUnknown_20399DC = 0; @@ -344,17 +349,17 @@ void TextboxResetAll(void) ResetTextboxPortrait(index); } sTextbox->unk414 = 0; - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); } -static u32 ResetTextboxType(u32 param_1, u32 unused) +static u32 ResetTextboxType(u32 textboxType, bool8 unused) { - switch (param_1) { + switch (textboxType) { case 0: ResetTextbox(); ShowWindows(0,1,1); break; - case 1: + case TEXTBOX_TYPE_NORMAL: ResetTextbox(); break; case 2: @@ -371,7 +376,7 @@ static u32 ResetTextboxType(u32 param_1, u32 unused) ShowWindows(0,1,1); break; } - sTextbox->unk0 = param_1; + sTextbox->type = textboxType; return 1; } @@ -410,7 +415,7 @@ void SetAutoPressTextboxMidEndMsgFrames(s32 endMsgFrames, s32 midMsgFrames) u8 IsTextboxOpen_809A750(void) { - return IsTextboxOpen_809B40C(&sTextbox->unkC); + return IsTextboxOpen_809B40C(&sTextbox->text); } u32 sub_809A768(void) @@ -421,27 +426,27 @@ u32 sub_809A768(void) // I think these two functions are functionally equivalent. bool8 ScriptClearTextbox(void) { - switch (sTextbox->unk0) { + switch (sTextbox->type) { case 3: - return ScriptPrintTextInternal(&sTextbox->unkC,4,-1,0); + return ScriptPrintTextInternal(&sTextbox->text,4,-1,0); case 1: case 2: - return ScriptPrintTextInternal(&sTextbox->unkC,0x84,-1,0); + return ScriptPrintTextInternal(&sTextbox->text,0x84,-1,0); default: - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); return FALSE; } } bool8 ScriptClearTextbox2(void) { - switch (sTextbox->unk0) { + switch (sTextbox->type) { case 3: case 1: case 2: - return ScriptPrintTextInternal(&sTextbox->unkC,4,-1,0); + return ScriptPrintTextInternal(&sTextbox->text,4,-1,0); default: - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); return FALSE; } } @@ -494,11 +499,11 @@ static bool8 sub_809A8B8(s32 param_1, s32 param_2) s16 speciesId; s32 portraitId = (s16) param_1; s16 local_28 = (s16) param_2; - struct TextboxPortrait *unkPtr = &sTextbox->portraits[portraitId]; + struct TextboxPortrait *portraitPtr = &sTextbox->portraits[portraitId]; bool8 showPortrait = TRUE; bool8 byte1 = FALSE; - TRY_CLOSE_FILE_AND_SET_NULL(unkPtr->faceFile); + TRY_CLOSE_FILE_AND_SET_NULL(portraitPtr->faceFile); sub_80A7DDC(&local_28,&speciesId); if (local_28 >= 10 && local_28 <= 29) { @@ -518,11 +523,11 @@ static bool8 sub_809A8B8(s32 param_1, s32 param_2) || pPVar6->dungeonLocation.id == DUNGEON_POKEMON_SQUARE_2) { switch (speciesId) { - case 0x104: - case 0x133: - case 0x183: - case 0x198: - case 0x199: + case MONSTER_SMEARGLE: + case MONSTER_GARDEVOIR: + case MONSTER_ABSOL: + case MONSTER_LATIAS: + case MONSTER_LATIOS: break; default: showPortrait = FALSE; @@ -531,21 +536,21 @@ static bool8 sub_809A8B8(s32 param_1, s32 param_2) } else { switch (speciesId) { - case 0x90: - case 0x91: - case 0x92: - case 0x96: - case 0x10C: - case 0x10D: - case 0x10E: - case 0x112: - case 0x113: - case 0x19A: - case 0x19B: - case 0x19C: - case 0x19D: - case 0x19E: - case 0x1A7: + case MONSTER_ARTICUNO: + case MONSTER_ZAPDOS: + case MONSTER_MOLTRES: + case MONSTER_MEWTWO: + case MONSTER_RAIKOU: + case MONSTER_ENTEI: + case MONSTER_SUICUNE: + case MONSTER_LUGIA: + case MONSTER_HO_OH: + case MONSTER_KYOGRE: + case MONSTER_GROUDON: + case MONSTER_RAYQUAZA: + case MONSTER_JIRACHI: + case MONSTER_DEOXYS_NORMAL: + case MONSTER_RAYQUAZA_CUTSCENE: break; default: showPortrait = FALSE; @@ -573,35 +578,35 @@ static bool8 sub_809A8B8(s32 param_1, s32 param_2) if (local_28 != -1) { s32 sVar3 = (s16) sub_80A7AE8(local_28); if (sVar3 >= 0) { - unkPtr->unk0 = local_28; - unkPtr->speciesID = sub_80A8BFC(sVar3); + portraitPtr->unk0 = local_28; + portraitPtr->speciesID = sub_80A8BFC(sVar3); strcpy(gFormatBuffer_Monsters[portraitId], sUndefineText); strcpy(gFormatBuffer_Names[portraitId], sUndefineText); - unkPtr->showPortrait = showPortrait; - unkPtr->unk5 = byte1; - unkPtr->spriteId = -1; - unkPtr->placementId = 0; - unkPtr->posDelta.x = 0; - unkPtr->posDelta.y = 0; - unkPtr->monPortrait.faceFile = NULL; - unkPtr->monPortrait.faceData = NULL; - unkPtr->monPortrait.spriteId = 0; + portraitPtr->showPortrait = showPortrait; + portraitPtr->unk5 = byte1; + portraitPtr->spriteId = -1; + portraitPtr->placementId = 0; + portraitPtr->posDelta.x = 0; + portraitPtr->posDelta.y = 0; + portraitPtr->monPortrait.faceFile = NULL; + portraitPtr->monPortrait.faceData = NULL; + portraitPtr->monPortrait.spriteId = 0; ret = TRUE; } else if (speciesId != 0) { - unkPtr->unk0 = local_28; - unkPtr->speciesID = speciesId; + portraitPtr->unk0 = local_28; + portraitPtr->speciesID = speciesId; strcpy(gFormatBuffer_Monsters[portraitId], sUndefineText); strcpy(gFormatBuffer_Names[portraitId], sUndefineText); - unkPtr->showPortrait = showPortrait; - unkPtr->unk5 = byte1; - unkPtr->spriteId = -1; - unkPtr->placementId = 0; - unkPtr->posDelta.x = 0; - unkPtr->posDelta.y = 0; - unkPtr->monPortrait.faceFile = NULL; - unkPtr->monPortrait.faceData = NULL; - unkPtr->monPortrait.spriteId = 0; + portraitPtr->showPortrait = showPortrait; + portraitPtr->unk5 = byte1; + portraitPtr->spriteId = -1; + portraitPtr->placementId = 0; + portraitPtr->posDelta.x = 0; + portraitPtr->posDelta.y = 0; + portraitPtr->monPortrait.faceFile = NULL; + portraitPtr->monPortrait.faceData = NULL; + portraitPtr->monPortrait.spriteId = 0; ret = TRUE; } else { @@ -796,11 +801,12 @@ bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const char *text) return ScriptClearTextbox2(); } else { - ResetTextboxType(sScriptTextboxTypes[scriptMsgType], 0); - return ScriptPrintTextInternal(&sTextbox->unkC, sScriptFlagSets[scriptMsgType], speakerId, text); + ResetTextboxType(sScriptTextboxTypes[scriptMsgType], FALSE); + return ScriptPrintTextInternal(&sTextbox->text, sScriptFlagSets[scriptMsgType], speakerId, text); } } +// These 2 functions are identical. bool8 sub_809AEEC(const char *text) { if (text == NULL) { @@ -810,8 +816,8 @@ bool8 sub_809AEEC(const char *text) return ScriptClearTextbox(); } else { - ResetTextboxType(2, 1); - return ScriptPrintTextInternal(&sTextbox->unkC, 0xC2, -1, text); + ResetTextboxType(2, TRUE); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_UNUSED_x2, -1, text); } } @@ -824,8 +830,8 @@ bool8 sub_809AF2C(const char *text) return ScriptClearTextbox(); } else { - ResetTextboxType(2, 1); - return ScriptPrintTextInternal(&sTextbox->unkC, 0xC2, -1, text); + ResetTextboxType(2, TRUE); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_UNUSED_x2, -1, text); } } @@ -838,14 +844,14 @@ bool8 sub_809AF6C(s32 unused, const char *text) return ScriptClearTextbox(); } else { - ResetTextboxType(3, 1); - return ScriptPrintTextInternal(&sTextbox->unkC, 0x65, -1, text); + ResetTextboxType(3, TRUE); + return ScriptPrintTextInternal(&sTextbox->text, 0x65, -1, text); } } bool8 sub_809AFAC(void) { - return (sTextbox->unk0 == 4); + return (sTextbox->type == 4); } void sub_809AFC8(s32 a0_, s32 a1, s32 a2_, const char *text) @@ -872,7 +878,7 @@ void sub_809B028(const MenuItem * menuItems, s32 a1_, s32 a2, s32 a3, s32 a4_, c s32 a1 = (u8) a1_; s32 a4 = (s16) a4_; - ResetTextboxType(sScriptTextboxTypes[a3], 0); + ResetTextboxType(sScriptTextboxTypes[a3], FALSE); sTextbox->unk414 = 1; sTextbox->unk418 = NULL; sTextbox->unk41C = menuItems; @@ -929,7 +935,7 @@ bool8 sub_809B1D4(s32 a0, u32 kind, s32 a2, u8 *a3) break; } - ResetTextboxType(4, 0); + ResetTextboxType(4, FALSE); sTextbox->unk414 = a0; sTextbox->unk418 = NULL; sTextbox->unk41C = NULL; @@ -955,7 +961,7 @@ static void ResetTextbox(void) { SetCharacterMask(3); // All this function call does is basically setting textboxText->unk4 = 0; - ScriptPrintTextInternal(&sTextbox->unkC, 0, -1, NULL); + ScriptPrintTextInternal(&sTextbox->text, 0, -1, NULL); } static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_, s32 speakerId_, const char *text) @@ -972,7 +978,7 @@ static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_ if (flags & 4) { sub_8014490(); - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); } return TRUE; } @@ -987,7 +993,7 @@ static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_ } } - if (sTextbox->unk0 == 3) { + if (sTextbox->type == 3) { sprintfStatic(textboxText->buffer, _("%s#[I]{WAIT_FRAMES 0x20}{0x81}{0x40}{WAIT_PRESS}\n#[O]{WAIT_FRAMES 0x20}{0x81}{0x40}"), text); // #[I] and #[O] are text macros to be documented text = textboxText->buffer; } @@ -995,8 +1001,8 @@ static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_ CreateMenuDialogueBoxAndPortrait(text, sub_809B428, -1, NULL, 0, 3, 0, GetSpeakerPortrait(speakerId), ((flags & TEXTBOX_FLAG_SPEAKER) ? STR_FORMAT_FLAG_SPEAKER_NAME | STR_FORMAT_FLAG_DIALOGUE_SOUND : 0) | ((flags & TEXTBOX_FLAG_DIALOGUE_SOUND) ? STR_FORMAT_FLAG_DIALOGUE_SOUND : 0) - | ((sTextbox->unk0 == 3) ? 0x10 : 0) - | ((sTextbox->unk0 == 2) ? 0x10 : 0) + | ((sTextbox->type == 3) ? STR_FORMAT_FLAG_ONLY_TEXT : 0) + | ((sTextbox->type == 2) ? STR_FORMAT_FLAG_ONLY_TEXT : 0) | ((flags & TEXTBOX_FLAG_INSTANT_TEXT) ? STR_FORMAT_FLAG_INSTANT_TEXT : 0) | ((flags & TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2) ? STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS_2 : 0) | ((flags & TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS) ? STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS : 0) @@ -1045,7 +1051,7 @@ void sub_809B474(void) { const struct unkStruct_3001B64_unk418 *unkStructPtr; - switch (sTextbox->unk0) { + switch (sTextbox->type) { case 0: case 1: case 2: @@ -1057,7 +1063,7 @@ void sub_809B474(void) case 1: if (!sub_809B648()) { sTextbox->unk420 = 3; - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); break; } @@ -1068,7 +1074,7 @@ void sub_809B474(void) if (!unkStructPtr->unk4()) { sTextbox->unk430 = -1; sTextbox->unk420 = 3; - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); break; } } @@ -1092,7 +1098,7 @@ void sub_809B474(void) break; } sTextbox->unk420 = 3; - ResetTextboxType(0, 1); + ResetTextboxType(0, TRUE); break; } break; @@ -1103,7 +1109,7 @@ void sub_809B474(void) void sub_809B57C(void) { DrawDialogueBoxString(); - switch (sTextbox->unk0) { + switch (sTextbox->type) { case 1: case 2: case 3: @@ -1122,7 +1128,7 @@ void sub_809B57C(void) s32 sp; if (sub_80144A4(&sp) == 0) { GroundScriptLockJumpZero(0); - sTextbox->unk0 = 0; + sTextbox->type = 0; } break; }