add new next dungeon script command

This commit is contained in:
DizzyEggg
2025-06-19 12:00:11 +02:00
parent 0b56ca5480
commit beea0c5997
21 changed files with 68 additions and 69 deletions

View File

@@ -1,6 +1,7 @@
#include "constants/event_flag.h"
#include "constants/item.h"
#include "constants/ground_map.h"
#include "constants/dungeon.h"
#include "portrait_placement.h"
#include "structs/str_ground_script.h"
#define LPARRAY(x) (ARRAY_COUNT(x)), x
@@ -9,6 +10,8 @@
#define CPOS_CURRENT 0x4
// 01..07: complex map/dungeon selection/check commands
#define NEXT_DUNGEON(u, d) { 0x02, 0, u, d, 0, NULL } // Seems to be a general command for setting up which dungeon to enter next. First argument is unknown.
#define SELECT_MAP(m) { 0x08, 0, 0, m, 0, NULL }
#define SELECT_GROUND(m) { 0x09, 0, 0, m, 0, NULL }
#define SELECT_DUNGEON(m,d,f,b) { 0x0A, b, f, d, m, NULL }

View File

@@ -25,6 +25,6 @@ bool8 ScriptSetPortraitPosDelta(s32 portraitId_, PixelPos *newPosDelta);
bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const char *text);
bool8 ScriptPrintTextOnBg(const char *text);
bool8 ScriptPrintTextOnBg2(const char *text);
bool8 sub_809AF6C(s32 unused, const char *text);
bool8 ScriptPrintTextOnBgAuto(s32 unused, const char *text);
#endif // GUARD_WONDER_MAIL_H

View File

@@ -26,7 +26,7 @@
static const struct ScriptCommand s_gs178_g0_s0_station_sref_script[] = { /* 0x822c248 */
DEBUGINFO,
SELECT_MAP(178),
SELECT_MAP(MAP_TINY_WOODS_ENTRY),
BGM_STOP,
JUMP_SCRIPT(COMMON_ENTER),
};
@@ -39,7 +39,7 @@ static const struct ScriptCommand s_gs178_g1_s0_station_sref_script[] = { /* 0x8
BGM_STOP,
{ 0x23, 0x01, 0x0000, 0x00000000, 0x00000000, NULL },
{ 0x26, 0x01, 0x0000, 0x00000000, 0x00000000, NULL },
SELECT_MAP(178),
SELECT_MAP(MAP_TINY_WOODS_ENTRY),
WAIT(100),
MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}Where am I?")),
MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}Am I dreaming this?")),
@@ -64,7 +64,7 @@ static const struct ScriptCommand s_gs178_g1_s0_station_sref_script[] = { /* 0x8
{ 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
BGM_FADEOUT(30),
{ 0x02, 0x00, 0x001e, 0x00000000, 0x00000000, NULL },
NEXT_DUNGEON(30, DUNGEON_TINY_WOODS),
RET,
};
@@ -360,7 +360,7 @@ static const struct ScriptCommand s_gs178_g2_s0_station_sref_script[] = { /* 0x8
{ 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL },
BGM_STOP,
WAIT(60),
SELECT_MAP(178),
SELECT_MAP(MAP_TINY_WOODS_ENTRY),
{ 0x2d, 0x09, 0x0000, 0x00000035, 0x00000000, NULL },
{ 0x2e, 0x0b, 0x0000, -0x00000002, 0x00000000, NULL },
MSG_NPC(0, _(" ...Hello?{WAIT_PRESS}\nHello!")),
@@ -369,7 +369,7 @@ static const struct ScriptCommand s_gs178_g2_s0_station_sref_script[] = { /* 0x8
{ 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL },
{ 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000000, 0x00000000, NULL },
NEXT_DUNGEON(30, DUNGEON_TINY_WOODS),
RET,
};
@@ -517,7 +517,7 @@ static const struct ScriptCommand s_gs178_g2_s0_lives2_dlg0[] = { /* 0x822e89c -
static const struct ScriptCommand s_gs178_g3_s0_station_sref_script[] = { /* 0x822e95c - PART 1 0:17:17-0:18:51 - Post-Tiny Woods cutscene */
DEBUGINFO,
{ 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL },
SELECT_MAP(178),
SELECT_MAP(MAP_TINY_WOODS_ENTRY),
SELECT_ENTITIES(-1, 0),
BGM_SWITCH(103),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },

View File

@@ -12,7 +12,7 @@
static const struct ScriptCommand s_gs180_g0_s0_station_sref_script[] = { /* 0x82302f8 */
DEBUGINFO,
SELECT_MAP(180),
SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY),
BGM_STOP,
JUMP_SCRIPT(COMMON_ENTER),
};
@@ -21,12 +21,12 @@ static const struct ScriptRef s_gs180_g0_s0_station_sref = { 404, 1, NULL /* ENT
static const struct ScriptCommand s_gs180_g1_s0_station_sref_script[] = { /* 0x8230370 */
DEBUGINFO,
SELECT_MAP(180),
SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY),
SELECT_ENTITIES(-1, 0),
BGM_SWITCH(14),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000001, 0x00000000, NULL },
NEXT_DUNGEON(0, DUNGEON_THUNDERWAVE_CAVE),
RET,
};
@@ -135,12 +135,12 @@ static const struct ScriptCommand s_gs180_g1_s0_lives3_dlg0[] = { /* 0x8230948 *
static const struct ScriptCommand s_gs180_g2_s0_station_sref_script[] = { /* 0x82309d8 */
DEBUGINFO,
SELECT_MAP(180),
SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY),
SELECT_ENTITIES(-1, 0),
BGM_SWITCH(14),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000001, 0x00000000, NULL },
NEXT_DUNGEON(0, DUNGEON_THUNDERWAVE_CAVE),
RET,
};
@@ -237,7 +237,7 @@ static const struct ScriptCommand s_gs180_g2_s0_lives3_dlg0[] = { /* 0x8230ef4 *
static const struct ScriptCommand s_gs180_g3_s0_station_sref_script[] = { /* 0x8230f74 */
DEBUGINFO,
SELECT_MAP(180),
SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY),
SELECT_ENTITIES(-1, 0),
BGM_SWITCH(103),
WAIT(30),

View File

@@ -24,7 +24,7 @@ static const struct ScriptCommand s_gs184_g1_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(15),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000004, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000004),
RET,
};
@@ -81,7 +81,7 @@ static const struct ScriptCommand s_gs184_g2_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(15),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000004, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000004),
RET,
};

View File

@@ -26,7 +26,7 @@ static const struct ScriptCommand s_gs186_g1_s0_station_sref_script[] = { /* 0x8
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x23, 0x01, 0x0001, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000006, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000006),
RET,
};

View File

@@ -26,7 +26,7 @@ static const struct ScriptCommand s_gs188_g1_s0_station_sref_script[] = { /* 0x8
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x23, 0x01, 0x0001, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000007, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000007),
RET,
};
@@ -120,7 +120,7 @@ static const struct ScriptCommand s_gs188_g2_s0_station_sref_script[] = { /* 0x8
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x23, 0x01, 0x0001, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000007, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000007),
RET,
};

View File

@@ -52,7 +52,7 @@ static const struct ScriptCommand s_gs189_g0_s0_evt0_sref_script[] = { /* 0x823a
LABEL(0), /* = 0x00 */
TEXTBOX_CLEAR,
BGM_FADEOUT(60),
{ 0x02, 0x00, 0x001e, 0x00000008, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000008),
COND_EQUAL(-1, /* to label */ 1),
HALT,
};

View File

@@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs191_g1_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(20),
{ 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000009, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000009),
RET,
};
@@ -94,7 +94,7 @@ static const struct ScriptCommand s_gs191_g2_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(20),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x00000009, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000009),
RET,
};

View File

@@ -130,7 +130,7 @@ static const struct ScriptCommand s_gs193_g1_s0_station_sref_script[] = { /* 0x8
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x0000, 0x0000000a, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x0000000a),
RET,
};

View File

@@ -57,7 +57,7 @@ static const struct ScriptCommand s_gs196_g0_s0_evt0_sref_script[] = { /* 0x8248
LABEL(0), /* = 0x00 */
TEXTBOX_CLEAR,
BGM_FADEOUT(60),
{ 0x02, 0x00, 0x001e, 0x0000000c, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x0000000c),
COND_EQUAL(-1, /* to label */ 1),
HALT,
};

View File

@@ -57,7 +57,7 @@ static const struct ScriptCommand s_gs199_g0_s0_evt0_sref_script[] = { /* 0x824e
LABEL(0), /* = 0x00 */
TEXTBOX_CLEAR,
BGM_FADEOUT(60),
{ 0x02, 0x00, 0x001e, 0x0000000e, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x0000000e),
COND_EQUAL(-1, /* to label */ 1),
HALT,
};

View File

@@ -60,11 +60,11 @@ static const struct ScriptCommand s_gs202_g0_s0_evt0_sref_script[] = { /* 0x8255
TEXTBOX_CLEAR,
BGM_FADEOUT(60),
JUMPIF_ARRAY(RESCUE_SCENARIO_JOB_LIST, 29, /* to label */ 2),
{ 0x02, 0x00, 0x001e, 0x00000010, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000010),
COND_EQUAL(-1, /* to label */ 1),
HALT,
LABEL(2), /* = 0x02 */
{ 0x02, 0x00, 0x001e, 0x00000026, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000026),
COND_EQUAL(-1, /* to label */ 1),
HALT,
};

View File

@@ -91,7 +91,7 @@ static const struct ScriptCommand s_gs204_g1_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(108),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000011, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000011),
RET,
};
@@ -159,7 +159,7 @@ static const struct ScriptCommand s_gs204_g2_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(108),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000011, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000011),
RET,
};

View File

@@ -52,7 +52,7 @@ static const struct ScriptCommand s_gs205_g0_s0_evt0_sref_script[] = { /* 0x825d
LABEL(0), /* = 0x00 */
TEXTBOX_CLEAR,
BGM_FADEOUT(60),
{ 0x02, 0x00, 0x001e, 0x00000012, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000012),
COND_EQUAL(-1, /* to label */ 1),
HALT,
};

View File

@@ -169,7 +169,7 @@ static const struct ScriptCommand s_gs207_g2_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(22),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000013, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000013),
RET,
};
@@ -235,7 +235,7 @@ static const struct ScriptCommand s_gs207_g3_s0_station_sref_script[] = { /* 0x8
BGM_SWITCH(22),
{ 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL },
{ 0xe3, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
{ 0x02, 0x00, 0x001e, 0x00000013, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000013),
RET,
};

View File

@@ -52,7 +52,7 @@ static const struct ScriptCommand s_gs208_g0_s0_evt0_sref_script[] = { /* 0x8261
LABEL(0), /* = 0x00 */
TEXTBOX_CLEAR,
BGM_FADEOUT(60),
{ 0x02, 0x00, 0x001e, 0x00000014, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000014),
COND_EQUAL(-1, /* to label */ 1),
HALT,
};

View File

@@ -1995,7 +1995,7 @@ static const struct ScriptCommand s_script_EVENT_M01E02B_L004B[] = { /* 0x81256f
static const struct ScriptCommand s_script_EVENT_M01E02B_L005[] = { /* 0x8125730 */
DEBUGINFO,
EXECUTE_SUBSTATION(182, 1, 0),
{ 0x02, 0x00, 0x0000, 0x00000002, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000002),
RET,
};
@@ -2008,7 +2008,7 @@ static const struct ScriptCommand s_script_EVENT_M01E02B_L006[] = { /* 0x8125770
static const struct ScriptCommand s_script_EVENT_M01E02B_L007[] = { /* 0x81257a0 */
DEBUGINFO,
EXECUTE_SUBSTATION(182, 2, 0),
{ 0x02, 0x00, 0x0000, 0x00000002, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000002),
RET,
};
@@ -2168,7 +2168,7 @@ static const struct ScriptCommand s_script_EVENT_M01E04A_L004[] = { /* 0x8125de0
static const struct ScriptCommand s_script_EVENT_M01E04A_L005[] = { /* 0x8125e20 */
DEBUGINFO,
{ 0x02, 0x00, 0x001e, 0x00000006, 0x00000000, NULL },
NEXT_DUNGEON(30, 0x00000006),
RET,
};
@@ -3842,7 +3842,7 @@ static const struct ScriptCommand s_script_EVENT_S09E01A_L004[] = { /* 0x812a2f4
static const struct ScriptCommand s_script_EVENT_S09E01A_L004B[] = { /* 0x812a344 */
DEBUGINFO,
EXECUTE_SUBSTATION(201, 6, 0),
{ 0x02, 0x00, 0x0000, 0x00000025, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000025),
RET,
};
@@ -3876,7 +3876,7 @@ static const struct ScriptCommand s_script_EVENT_S09E01B_L001[] = { /* 0x812a454
static const struct ScriptCommand s_script_EVENT_S09E01B_L001B[] = { /* 0x812a4a4 */
DEBUGINFO,
EXECUTE_SUBSTATION(221, 1, 0),
{ 0x02, 0x00, 0x0000, 0x00000027, 0x00000000, NULL },
NEXT_DUNGEON(0, 0x00000027),
RET,
};
@@ -4026,7 +4026,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E02B[] = { /* 0x812ab34 */
JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3),
JUMP_SCRIPT(EVENT_M01E02B_L006),
LABEL(6), /* = 0x06 */
{ 0x02, 0x00, -0x0001, 0x00000003, 0x00000000, NULL },
NEXT_DUNGEON(-1, 3),
HALT,
LABEL(1), /* = 0x01 */
JUMPIF_EQUAL(SCENARIO_MAIN, 4, /* to label */ 7),
@@ -4050,7 +4050,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E02B[] = { /* 0x812ab34 */
LABEL(11), /* = 0x0b */
JUMP_SCRIPT(GETOUT_R00E01A),
LABEL(12), /* = 0x0c */
{ 0x02, 0x00, -0x0001, 0x00000003, 0x00000000, NULL },
NEXT_DUNGEON(-1, 3),
HALT,
LABEL(3), /* = 0x03 */
JUMP_SCRIPT(EVENT_DIVIDE),
@@ -4074,7 +4074,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E03A[] = { /* 0x812ae04 */
JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3),
JUMP_SCRIPT(EVENT_M01E03A_L009),
LABEL(6), /* = 0x06 */
{ 0x02, 0x00, -0x0001, 0x00000005, 0x00000000, NULL },
NEXT_DUNGEON(-1, 5),
HALT,
LABEL(1), /* = 0x01 */
JUMPIF_EQUAL(SCENARIO_MAIN, 5, /* to label */ 7),
@@ -4098,7 +4098,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E03A[] = { /* 0x812ae04 */
LABEL(11), /* = 0x0b */
JUMP_SCRIPT(GETOUT_R00E01A),
LABEL(12), /* = 0x0c */
{ 0x02, 0x00, -0x0001, 0x00000005, 0x00000000, NULL },
NEXT_DUNGEON(-1, 5),
HALT,
LABEL(3), /* = 0x03 */
JUMP_SCRIPT(EVENT_DIVIDE),

View File

@@ -592,25 +592,21 @@ bool8 sub_8098DCC(u32 speed)
return FALSE;
}
bool8 GroundMainRescueRequest(s32 r0, s32 r1)
bool8 GroundMainRescueRequest(s32 dungeonId_, s32 r1)
{
s32 r2 = (s16) r0;
s32 r5 = r2;
if(gUnknown_20398A8 == 0)
{
Log(0, "GroundMain recue request %3d %3d", r2, r1);
if(gUnknown_203B49D != 0)
{
// Needed to match
s32 dungeonId = (s16) dungeonId_;
s32 _dungeonId = dungeonId;
if (gUnknown_20398A8 == 0) {
Log(0, "GroundMain recue request %3d %3d", dungeonId, r1);
if (gUnknown_203B49D != 0) {
gUnknown_20398A8 = 7;
}
else
{
if(!gUnknown_203B49C)
{
gUnknown_20398C4 = r5;
else {
if (!gUnknown_203B49C) {
gUnknown_20398C4 = _dungeonId;
}
switch(sub_80A2750(gUnknown_20398C4))
{
switch (sub_80A2750(gUnknown_20398C4)) {
case 4: gUnknown_20398A8 = 8; break;
case 1: gUnknown_20398A8 = 5; break;
case 2: gUnknown_20398A8 = 6; break;

View File

@@ -1422,13 +1422,13 @@ s32 ExecuteScriptCommand(Action *action)
break;
}
case 0x02: {
s32 arg = (s16)curCmd.arg1;
if (arg == -1) arg = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER);
s32 dungeonId = (s16)curCmd.arg1;
if (dungeonId == -1) dungeonId = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER);
if (ScriptLoggingEnabled(TRUE)) {
Log(1, " dungeon select %3d", arg);
Log(1, " dungeon select %3d", dungeonId);
}
if (arg != -1) {
GroundMainRescueRequest(arg, curCmd.argShort);
if (dungeonId != -1) {
GroundMainRescueRequest(dungeonId, curCmd.argShort);
action->scriptData.script.ptr = ResolveJump(action, 1);
} else {
action->scriptData.script.ptr = ResolveJump(action, 0);
@@ -1959,7 +1959,7 @@ s32 ExecuteScriptCommand(Action *action)
break;
}
case 0x39: {
if ((s8)sub_809AF6C(curCmd.argShort, curCmd.argPtr) && curCmd.argShort >= 0) {
if ((s8)ScriptPrintTextOnBgAuto(curCmd.argShort, curCmd.argPtr) && curCmd.argShort >= 0) {
sub_80A87AC(0, 10);
if (GroundScriptCheckLockCondition(action, 0)) return 2;
}

View File

@@ -640,15 +640,15 @@ bool8 sub_809AB4C(s32 a0_, s32 a1_)
}
}
bool8 sub_809ABB4(s32 a0_, s32 a1_)
bool8 sub_809ABB4(s32 id_, s32 a1_)
{
s32 a0 = (s16) a0_;
s32 id = (s16) id_;
s32 a1 = (s16) a1_;
struct TextboxPortrait *portrait = &sTextbox->portraits[a0];
struct TextboxPortrait *portrait = &sTextbox->portraits[id];
if (sub_809A8B8(a0, a1)) {
CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[a0], portrait->speciesID);
strcpy(gFormatBuffer_Names[a0], gFormatBuffer_Monsters[a0]);
if (sub_809A8B8(id, a1)) {
CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[id], portrait->speciesID);
strcpy(gFormatBuffer_Names[id], gFormatBuffer_Monsters[id]);
return TRUE;
}
else {
@@ -837,7 +837,7 @@ bool8 ScriptPrintTextOnBg2(const char *text)
}
}
bool8 sub_809AF6C(s32 unused, const char *text)
bool8 ScriptPrintTextOnBgAuto(s32 unused, const char *text)
{
if (text == NULL) {
return ScriptClearTextbox();