pmd-red/src/data/ground/ground_data_h06p02_station.h
2025-12-01 23:43:07 -05:00

358 lines
12 KiB
C

static const struct ScriptCommand s_gs117_g0_s0_station_sref_script[] = { /* 0x81f4b18 */
DEBUGINFO_O(22),
SELECT_MAP(117),
CJUMP_SCENARIO_0(SCENARIO_MAIN),
COND(JUDGE_EQ, 3, /* to label */ 0),
JUMP_LABEL(1),
JUMP_LABEL(2),
LABEL(0), /* = 0x00 */
CJUMP_SCENARIO_1(SCENARIO_MAIN),
COND(JUDGE_LE, 2, /* to label */ 3),
JUMP_LABEL(2),
LABEL(3), /* = 0x03 */
JUMP_LABEL(2),
LABEL(1), /* = 0x01 */
SELECT_ENTITIES(1, 0),
JUMP_LABEL(2),
LABEL(2), /* = 0x02 */
JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4),
JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5),
JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6),
JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6),
JUMP_LABEL(4),
LABEL(6), /* = 0x06 */
CJUMP_VAR(GROUND_GETOUT),
COND_EQUAL(1, /* to label */ 7),
JUMP_LABEL(7),
LABEL(4), /* = 0x04 */
SELECT_LIVES(0, 3),
JUMP_LABEL(8),
LABEL(5), /* = 0x05 */
SELECT_LIVES(0, 4),
JUMP_LABEL(8),
LABEL(7), /* = 0x07 */
SELECT_LIVES(0, 1),
JUMP_LABEL(8),
LABEL(8), /* = 0x08 */
BGM_SWITCH(MUS_FRIEND_AREA_FIELD),
JUMP_SCRIPT(COMMON_ENTER),
};
static const ScriptRef s_gs117_g0_s0_station_sref = { ENTER_CONTROL, SCRIPT_TYPE_01, NULL, s_gs117_g0_s0_station_sref_script }; /* 0x81f4d94 */
static const struct ScriptCommand s_gs117_g0_s1_lives0_dlg0[] = { /* 0x81f4da0 */
DEBUGINFO_O(64),
SELECT_ANIMATION(2),
CALL_SCRIPT(WAIT_START_FUNC),
RET,
};
static const struct ScriptCommand s_gs117_g0_s1_lives1_dlg0[] = { /* 0x81f4de0 */
DEBUGINFO_O(71),
SELECT_ANIMATION(2),
CALL_SCRIPT(WAIT_START_FUNC),
RET,
};
static const struct ScriptCommand s_gs117_g0_s3_lives0_dlg0[] = { /* 0x81f4e20 */
DEBUGINFO_O(78),
SELECT_ANIMATION(2),
CALL_SCRIPT(WAIT_START_FUNC),
RET,
};
static const struct ScriptCommand s_gs117_g0_s3_lives1_dlg0[] = { /* 0x81f4e60 */
DEBUGINFO_O(85),
SELECT_ANIMATION(2),
CALL_SCRIPT(WAIT_START_FUNC),
RET,
};
static const struct ScriptCommand s_gs117_g0_s4_lives0_dlg0[] = { /* 0x81f4ea0 */
DEBUGINFO_O(92),
CALL_SCRIPT(LIVES_WARP_ARRIVE_FUNC),
RET,
};
static const struct ScriptCommand s_gs117_g0_s4_lives1_dlg0[] = { /* 0x81f4ed0 */
DEBUGINFO_O(98),
CALL_SCRIPT(LIVES_WARP_ARRIVE2_FUNC),
RET,
};
static const struct ScriptCommand s_gs117_g1_s0_lives0_dlg1[] = { /* 0x81f4f00 */
DEBUGINFO_O(104),
{ 0x51, 0x00, 0x000b, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives0_dlg2[] = { /* 0x81f4f30 */
DEBUGINFO_O(110),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives1_dlg1[] = { /* 0x81f4f50 */
DEBUGINFO_O(115),
{ 0x51, 0x00, 0x000a, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives1_dlg2[] = { /* 0x81f4f80 */
DEBUGINFO_O(121),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives2_dlg1[] = { /* 0x81f4fa0 */
DEBUGINFO_O(126),
{ 0x51, 0x00, 0x0009, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives2_dlg2[] = { /* 0x81f4fd0 */
DEBUGINFO_O(132),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives3_dlg1[] = { /* 0x81f4ff0 */
DEBUGINFO_O(137),
{ 0x51, 0x00, 0x0008, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives3_dlg2[] = { /* 0x81f5020 */
DEBUGINFO_O(143),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives4_dlg1[] = { /* 0x81f5040 */
DEBUGINFO_O(148),
{ 0x51, 0x00, 0x0007, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives4_dlg2[] = { /* 0x81f5070 */
DEBUGINFO_O(154),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives5_dlg1[] = { /* 0x81f5090 */
DEBUGINFO_O(159),
{ 0x51, 0x00, 0x0006, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives5_dlg2[] = { /* 0x81f50c0 */
DEBUGINFO_O(165),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives6_dlg1[] = { /* 0x81f50e0 */
DEBUGINFO_O(170),
{ 0x51, 0x00, 0x0005, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives6_dlg2[] = { /* 0x81f5110 */
DEBUGINFO_O(176),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives7_dlg1[] = { /* 0x81f5130 */
DEBUGINFO_O(181),
{ 0x51, 0x00, 0x0004, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives7_dlg2[] = { /* 0x81f5160 */
DEBUGINFO_O(187),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives8_dlg1[] = { /* 0x81f5180 */
DEBUGINFO_O(192),
{ 0x51, 0x00, 0x0003, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives8_dlg2[] = { /* 0x81f51b0 */
DEBUGINFO_O(198),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives9_dlg1[] = { /* 0x81f51d0 */
DEBUGINFO_O(203),
{ 0x51, 0x00, 0x0002, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives9_dlg2[] = { /* 0x81f5200 */
DEBUGINFO_O(209),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives10_dlg1[] = { /* 0x81f5220 */
DEBUGINFO_O(214),
{ 0x51, 0x00, 0x0001, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives10_dlg2[] = { /* 0x81f5250 */
DEBUGINFO_O(220),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct ScriptCommand s_gs117_g1_s0_lives11_dlg1[] = { /* 0x81f5270 */
DEBUGINFO_O(225),
{ 0x51, 0x00, 0x0000, 0x00000000, 0x00000000, NULL },
JUMP_SCRIPT(HABITAT_MOVE1),
};
static const struct ScriptCommand s_gs117_g1_s0_lives11_dlg2[] = { /* 0x81f52a0 */
DEBUGINFO_O(231),
JUMP_SCRIPT(HABITAT_TALK),
};
static const struct GroundLivesData s_gs117_g0_s1_lives[] = { /* 0x81f52c0 */
/* 0 */ { 0, 4, 0, 0, { 30, 35, CPOS_HALFTILE, CPOS_HALFTILE }, {
[0] = s_gs117_g0_s1_lives0_dlg0,
} },
/* 1 */ { 4, 4, 0, 0, { 30, 38, CPOS_HALFTILE, CPOS_HALFTILE }, {
[0] = s_gs117_g0_s1_lives1_dlg0,
} },
};
static const struct GroundLivesData s_gs117_g0_s3_lives[] = { /* 0x81f52f0 */
/* 0 */ { 0, 4, 0, 0, { 30, 35, CPOS_HALFTILE, CPOS_HALFTILE }, {
[0] = s_gs117_g0_s3_lives0_dlg0,
} },
/* 1 */ { 4, 4, 0, 0, { 30, 38, CPOS_HALFTILE, CPOS_HALFTILE }, {
[0] = s_gs117_g0_s3_lives1_dlg0,
} },
};
static const struct GroundLivesData s_gs117_g0_s4_lives[] = { /* 0x81f5320 */
/* 0 */ { 0, 0, 0, 0, { 30, 35, CPOS_HALFTILE, CPOS_HALFTILE }, {
[0] = s_gs117_g0_s4_lives0_dlg0,
} },
/* 1 */ { 4, 0, 0, 0, { 30, 38, CPOS_HALFTILE, CPOS_HALFTILE }, {
[0] = s_gs117_g0_s4_lives1_dlg0,
} },
};
static const struct GroundLivesData s_gs117_g1_s0_lives[] = { /* 0x81f5350 */
/* 0 */ { 14, 0, 0, 0, { 30, 30, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives0_dlg1,
[2] = s_gs117_g1_s0_lives0_dlg2,
} },
/* 1 */ { 15, 0, 0, 0, { 20, 29, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives1_dlg1,
[2] = s_gs117_g1_s0_lives1_dlg2,
} },
/* 2 */ { 16, 0, 0, 0, { 40, 29, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives2_dlg1,
[2] = s_gs117_g1_s0_lives2_dlg2,
} },
/* 3 */ { 17, 0, 0, 0, { 13, 34, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives3_dlg1,
[2] = s_gs117_g1_s0_lives3_dlg2,
} },
/* 4 */ { 18, 0, 0, 0, { 47, 34, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives4_dlg1,
[2] = s_gs117_g1_s0_lives4_dlg2,
} },
/* 5 */ { 19, 0, 0, 0, { 11, 27, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives5_dlg1,
[2] = s_gs117_g1_s0_lives5_dlg2,
} },
/* 6 */ { 20, 0, 0, 0, { 50, 27, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives6_dlg1,
[2] = s_gs117_g1_s0_lives6_dlg2,
} },
/* 7 */ { 21, 0, 0, 0, { 20, 24, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives7_dlg1,
[2] = s_gs117_g1_s0_lives7_dlg2,
} },
/* 8 */ { 22, 0, 0, 0, { 40, 24, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives8_dlg1,
[2] = s_gs117_g1_s0_lives8_dlg2,
} },
/* 9 */ { 23, 0, 0, 0, { 30, 24, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives9_dlg1,
[2] = s_gs117_g1_s0_lives9_dlg2,
} },
/* 10 */ { 24, 0, 0, 0, { 26, 18, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives10_dlg1,
[2] = s_gs117_g1_s0_lives10_dlg2,
} },
/* 11 */ { 25, 0, 0, 0, { 34, 19, 0, CPOS_HALFTILE }, {
[1] = s_gs117_g1_s0_lives11_dlg1,
[2] = s_gs117_g1_s0_lives11_dlg2,
} },
};
static const struct GroundEventData s_gs117_g0_s0_evts[] = { /* 0x81f5470 */
/* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] },
/* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] },
/* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] },
/* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] },
};
static const ScriptRef * const (sStationScripts[]) = { /* 0x81f54a0 */
&s_gs117_g0_s0_station_sref,
};
static const struct GroundScriptSector s_gs117_g0_sectors[] = { /* 0x81f54a4 */
{ 0,NULL, 0,NULL, 0,NULL, LPARRAY(s_gs117_g0_s0_evts), 1,&sStationScripts[0], },
{ LPARRAY(s_gs117_g0_s1_lives), 0,NULL, 0,NULL, 0,NULL, 0,NULL, },
{ 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, },
{ LPARRAY(s_gs117_g0_s3_lives), 0,NULL, 0,NULL, 0,NULL, 0,NULL, },
{ LPARRAY(s_gs117_g0_s4_lives), 0,NULL, 0,NULL, 0,NULL, 0,NULL, },
};
static const struct GroundScriptSector s_gs117_g1_sectors[] = { /* 0x81f556c */
{ LPARRAY(s_gs117_g1_s0_lives), 0,NULL, 0,NULL, 0,NULL, 0,NULL, },
};
static const struct GroundScriptGroup s_gs117_groups[] = { /* 0x81f5594 */
{ LPARRAY(s_gs117_g0_sectors) },
{ LPARRAY(s_gs117_g1_sectors) },
{},
};
static const struct GroundLink s_gs117_links[] = { /* 0x81f55ac */
/* link 0 */ { { /*x*/ 31, /*y*/ 16, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 1 */ { { /*x*/ 23, /*y*/ 16, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 2 */ { { /*x*/ 27, /*y*/ 22, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 3 */ { { /*x*/ 37, /*y*/ 22, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 4 */ { { /*x*/ 17, /*y*/ 22, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 5 */ { { /*x*/ 47, /*y*/ 24, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 6 */ { { /*x*/ 8, /*y*/ 24, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 7 */ { { /*x*/ 44, /*y*/ 32, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 8 */ { { /*x*/ 10, /*y*/ 32, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 9 */ { { /*x*/ 37, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 10 */ { { /*x*/ 17, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
/* link 11 */ { { /*x*/ 27, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 },
};
const GroundScriptHeader gGroundScript_gs117 = { LPARRAY(s_gs117_groups), s_gs117_links }; /* 0x81f560c */