diff --git a/config/GALE01/symbols.txt b/config/GALE01/symbols.txt index 98c48d2ae0..fb1322435a 100644 --- a/config/GALE01/symbols.txt +++ b/config/GALE01/symbols.txt @@ -23232,7 +23232,7 @@ grTGn_803E98DC = .data:0x803E98DC; // type:object size:0x34 scope:global @89 = .data:0x803E9910; // type:object size:0x21 scope:local data:string @90 = .data:0x803E9934; // type:object size:0xB scope:local data:string @138 = .data:0x803E9940; // type:object size:0x1F scope:local data:string -unk_arr_803E9960 = .data:0x803E9960; // type:object size:0xD68 scope:global +stage_id_map = .data:0x803E9960; // type:object size:0xD68 scope:global db_build_timestamp = .data:0x803EA6C8; // type:object size:0x20 data:string @41 = .data:0x803EA6E8; // type:object size:0x9 scope:local data:string @42 = .data:0x803EA6F4; // type:object size:0x11 scope:local data:string @@ -27218,8 +27218,8 @@ grHr_804D49CC = .sdata:0x804D49CC; // type:object size:0x3 scope:global data:str grHr_804D49D0 = .sdata:0x804D49D0; // type:object size:0x3 scope:global data:string grHeal_804D49D8 = .sdata:0x804D49D8; // type:object size:0x8 scope:global data:2byte grHeal_804D49E0 = .sdata:0x804D49E0; // type:object size:0x5 scope:global data:string -unk_struct_804D49E8 = .sdata:0x804D49E8; // type:object size:0x8 scope:global data:4byte -unk_struct_804D49F0 = .sdata:0x804D49F0; // type:object size:0x8 scope:global data:4byte +selected_stage = .sdata:0x804D49E8; // type:object size:0x8 scope:global data:4byte +default_stage_pair = .sdata:0x804D49F0; // type:object size:0x8 scope:global data:4byte @137 = .sdata:0x804D49F8; // type:object size:0x8 scope:local data:string @186 = .sdata:0x804D4A00; // type:object size:0x2 scope:local data:string DbLevel = .sdata:0x804D4A08; // type:object size:0x4 scope:global data:4byte diff --git a/src/melee/gm/gm_16AE.c b/src/melee/gm/gm_16AE.c index 18c067b345..b1e2d8c8d8 100644 --- a/src/melee/gm/gm_16AE.c +++ b/src/melee/gm/gm_16AE.c @@ -486,7 +486,7 @@ void fn_8016B7F8(void) PAD_STACK(4); ftLib_800868A4(); - Stage_802252E4((InternalStageId) tmp->x24C8.xE, NULL); + Stage_802252E4(tmp->x24C8.xE, NULL); grStadium_801D4040(); if (!tmp->x24C8.x1_3) { ifStatus_802F6EA4(4, -1, -1, 0, NULL, fn_8016B784); @@ -2000,7 +2000,7 @@ void fn_8016E730(StartMeleeData* arg0) ftCo_800C06C0(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8((enum InternalStageId) arg0->rules.xE, NULL); + Stage_802251E8(arg0->rules.xE, NULL); r30 = &lbl_8046B6A0; @@ -2140,7 +2140,7 @@ void gm_8016EC28_OnEnter(void* arg0) un_802FD404(); tmp2 = &lbl_8046B6A0; ftLib_800868A4(); - Stage_802252E4((InternalStageId) tmp2->x24C8.xE, NULL); + Stage_802252E4(tmp2->x24C8.xE, NULL); grStadium_801D4040(); if (!lbl_8046B6A0.x24C8.x1_3) { ifStatus_802F6EA4(4, -1, -1, 0, 0, fn_8016B784); diff --git a/src/melee/gm/gm_1832.c b/src/melee/gm/gm_1832.c index 62935c51d7..d1e1f445e7 100644 --- a/src/melee/gm/gm_1832.c +++ b/src/melee/gm/gm_1832.c @@ -1086,7 +1086,7 @@ void fn_80186634(void* arg0) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(InternalStageID_Unk00, NULL); + Stage_802251E8(ExternalStageID_Unk00, NULL); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); @@ -1446,7 +1446,7 @@ void fn_80187714(void) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(64); - Stage_802251E8(0, NULL); + Stage_802251E8(ExternalStageID_Unk00, NULL); Stage_8022524C(); Item_80266FA8(); Item_80266FCC(); @@ -1771,7 +1771,7 @@ typedef struct gm_80187F48_EnterData { u16 stage_id; } gm_80187F48_EnterData; -static inline InternalStageId +static inline ExternalStageId gm_80187F48_GetStageId(gm_80187F48_EnterData* data) { return data->stage_id; diff --git a/src/melee/gm/gm_1B14.c b/src/melee/gm/gm_1B14.c index 459e353626..a8a15a9e9a 100644 --- a/src/melee/gm/gm_1B14.c +++ b/src/melee/gm/gm_1B14.c @@ -639,8 +639,7 @@ void gm_801B1EEC(GameScene* arg0) gm_80473814.x6 = stage_id; vs_data->data.rules.xE = stage_id; lbAudioAx_80026F2C(0x18); - lbAudioAx_8002702C(8, lbAudioAx_80026EBC((enum InternalStageId)( - u16) vs_data->data.rules.xE)); + lbAudioAx_8002702C(8, lbAudioAx_80026EBC(vs_data->data.rules.xE)); lbAudioAx_80027168(); } diff --git a/src/melee/gm/gm_1BA8.c b/src/melee/gm/gm_1BA8.c index dc2bb6aeaa..62dc482698 100644 --- a/src/melee/gm/gm_1BA8.c +++ b/src/melee/gm/gm_1BA8.c @@ -417,7 +417,7 @@ void gm_801BAD70(GameScene* arg0) stage_list = ((struct gm_evlevel*) *lvlpp)->x10; stage = stage_list->stage[ev->x20]; md->rules.xE = stage; - ev->x48 = (InternalStageId) stage; + ev->x48 = stage; if (ev->x20 > 0) { md->rules.x1_2 = 1; md->rules.x1_3 = 1; @@ -843,7 +843,7 @@ s32 gm_801BBB64(void) ev->x44 = 1; } pp = &tbl[idx]; - ev->x48 = (InternalStageId) * (u16*) ((u8*) (*pp)->x8 + 6); + ev->x48 = *(u16*) ((u8*) (*pp)->x8 + 6); for (i = 0; i < 4; i++) { player_init = (&(*pp)->x14)[i]; if (player_init != NULL) { diff --git a/src/melee/gm/gmallstar.c b/src/melee/gm/gmallstar.c index f57c85d140..b91ddae586 100644 --- a/src/melee/gm/gmallstar.c +++ b/src/melee/gm/gmallstar.c @@ -451,7 +451,7 @@ void gm_801B5324(UnkAllstarData* arg0, u8 arg1) } } - gc->stage_id = (InternalStageId) opp_data->x2; + gc->stage_id = opp_data->x2; lbDvd_80018254(); audio = lbAudioAx_80026E84((CharacterKind) (s8) arg0->x0.ckind); @@ -462,7 +462,7 @@ void gm_801B5324(UnkAllstarData* arg0, u8 arg1) } } - audio |= lbAudioAx_80026EBC((InternalStageId) opp_data->x2); + audio |= lbAudioAx_80026EBC(opp_data->x2); lbAudioAx_80026F2C(0x1C); lbAudioAx_8002702C(0xC, audio); lbAudioAx_80027168(); diff --git a/src/melee/gm/gmclassic.c b/src/melee/gm/gmclassic.c index 4f00c731c3..bb48933e2f 100644 --- a/src/melee/gm/gmclassic.c +++ b/src/melee/gm/gmclassic.c @@ -453,9 +453,8 @@ static gmClassicMatchup* gmClassic_801B2BA4(gmClassicMatchup* arg0, u8* arg1, for (temp = arg2; temp->x0 != 0xD; temp++) { if (temp->xC != NULL) { - stage1 = Stage_8022519C((InternalStageId) entry->x00); - if (Stage_8022519C((InternalStageId) temp->xC->x00) == stage1) - { + stage1 = Stage_8022519C(entry->x00); + if (Stage_8022519C(temp->xC->x00) == stage1) { result = entry; goto next; } @@ -800,7 +799,7 @@ void gmClassic_801B3500(GameScene* arg0) } { - InternalStageId stage_id; + ExternalStageId stage_id; if (entry->x1 == 0x80 && entry->x2 == 1) { stage_id = (u16) gm_801647F8(ad->x0.ckind); } else { diff --git a/src/melee/gm/gmregclear.c b/src/melee/gm/gmregclear.c index c262fe7569..bb85f0184d 100644 --- a/src/melee/gm/gmregclear.c +++ b/src/melee/gm/gmregclear.c @@ -742,7 +742,7 @@ static inline void gm_8017CE34_SetupColors(UnkAdventureData* arg1, s32 count, } s32 gm_8017CE34(StartMeleeData* arg0, UnkAdventureData* arg1, s8* arg2, - u8 arg3, u8 arg4, u8 arg5, s32 arg6, InternalStageId arg7, + u8 arg3, u8 arg4, u8 arg5, s32 arg6, ExternalStageId arg7, s32 count, s32 arg9) { u8 colors[16]; diff --git a/src/melee/gm/gmregclear.h b/src/melee/gm/gmregclear.h index 8b70dd6d3b..ab1a14a0fd 100644 --- a/src/melee/gm/gmregclear.h +++ b/src/melee/gm/gmregclear.h @@ -23,7 +23,7 @@ /* 17CBAC */ UNK_RET gm_8017CBAC(UnkAdventureData*, struct gmm_x0_528_t*, u8); /* 17CD94 */ u8 gm_8017CD94(UnkAdventureData*, int, int, int); /* 17CE34 */ s32 gm_8017CE34(StartMeleeData*, UnkAdventureData*, s8*, u8, u8, - u8, s32, InternalStageId, s32 count, s32); + u8, s32, ExternalStageId, s32 count, s32); /* 17D7AC */ bool gm_8017D7AC(MatchExitInfo*, Unk1PData*, u8); /* 17D9C0 */ s32 fn_8017D9C0(u8* arg0, u8* arg1); /* 17DB58 */ void gm_8017DB58(struct Unk1PData_x24* arg0); diff --git a/src/melee/gm/gmstamina.c b/src/melee/gm/gmstamina.c index 4202f2b9f2..c68a8e0a90 100644 --- a/src/melee/gm/gmstamina.c +++ b/src/melee/gm/gmstamina.c @@ -116,8 +116,7 @@ void gm_801B927C(GameScene* arg0) *vs = sss->data; lbAudioAx_80026F2C(0x18); - lbAudioAx_8002702C( - 8, lbAudioAx_80026EBC((enum InternalStageId) sss->force_stage_id)); + lbAudioAx_8002702C(8, lbAudioAx_80026EBC(sss->force_stage_id)); lbAudioAx_80027168(); return; } diff --git a/src/melee/gm/types.h b/src/melee/gm/types.h index 986ff93f15..40e5e2af17 100644 --- a/src/melee/gm/types.h +++ b/src/melee/gm/types.h @@ -370,7 +370,7 @@ struct gmm_x0 { /* 0x0570 */ int x40; /* 0x0574 */ s8 x44; /* 0x0575 */ u8 x45; - /* 0x0578 */ InternalStageId x48; + /* 0x0578 */ ExternalStageId x48; /* 0x057C */ s8 x4C[4]; ///< CharacterKind /* 0x0580 */ u8 x50[4]; ///< character color struct gmm_x0_584_t { diff --git a/src/melee/gr/forward.h b/src/melee/gr/forward.h index d1a0a7f859..efeeb7f155 100644 --- a/src/melee/gr/forward.h +++ b/src/melee/gr/forward.h @@ -175,6 +175,49 @@ typedef enum InternalStageId { FIGURE3 } InternalStageId; +/// External stage IDs, the public stage numbering used by +/// #StartMeleeRules::xE and the Stage_802251E8 argument. #stage_id_map +/// converts them to #InternalStageId values; entries 0x21+ are +/// single-player, event, and other mode variants. +typedef enum ExternalStageId { + ExternalStageID_Unk00, + ExternalStageID_TEST, + ExternalStageID_IZUMI, + ExternalStageID_PSTADIUM, + ExternalStageID_CASTLE, + ExternalStageID_KONGO, + ExternalStageID_ZEBES, + ExternalStageID_CORNERIA, + ExternalStageID_STORY, + ExternalStageID_ONETT, + ExternalStageID_MUTECITY, + ExternalStageID_RCRUISE, + ExternalStageID_GARDEN, + ExternalStageID_GREATBAY, + ExternalStageID_SHRINE, + ExternalStageID_KRAID, + ExternalStageID_YORSTER, + ExternalStageID_GREENS, + ExternalStageID_FOURSIDE, + ExternalStageID_INISHIE1, + ExternalStageID_INISHIE2, + ExternalStageID_Unk21, // maps to InternalStageID_Unk26 + ExternalStageID_VENOM, + ExternalStageID_PURA, + ExternalStageID_BIGBLUE, + ExternalStageID_ICEMTN, + ExternalStageID_Unk26, // second Icicle Mountain entry + ExternalStageID_FLATZONE, + ExternalStageID_OLDPUPUPU, + ExternalStageID_OLDYOSHI, + ExternalStageID_OLDKONGO, + ExternalStageID_BATTLE, + ExternalStageID_LAST, + + ExternalStageID_BIGBLUEROUTE = 0x49, + ExternalStageID_HEAL = 0x55, +} ExternalStageId; + typedef struct unkCastle unkCastle; typedef void (*unkCastleCallback)(void*, struct unkCastle*); diff --git a/src/melee/gr/ground.c b/src/melee/gr/ground.c index 7a4b234501..552088c979 100644 --- a/src/melee/gr/ground.c +++ b/src/melee/gr/ground.c @@ -428,24 +428,24 @@ void Ground_801C06B8(InternalStageId arg0) } } -void Ground_801C0754(StructPairWithStageID* pair) +void Ground_801C0754(StageIdPair* pair) { StageData* stage; s32 arg3; Ground_801BFFB0(); - stage_info.internal_stage_id = pair->stage_id; - stage = Ground_803DFEDC[pair->stage_id]; - arg3 = (pair->list_idx == 0x55) ? 0 : 1; + stage_info.internal_stage_id = pair->internal_id; + stage = Ground_803DFEDC[pair->internal_id]; + arg3 = (pair->external_id == ExternalStageID_HEAL) ? 0 : 1; grDatFiles_801C6038(stage->data1, 0, arg3); - Ground_801C28CC(&stage_info.xA0, pair->list_idx); + Ground_801C28CC(&stage_info.xA0, pair->external_id); stage_info.x178 = stage->callback5; stage_info.x17C = stage->callback6; Ground_801C5878(); } -void Ground_801C0800(StructPairWithStageID* pair) +void Ground_801C0800(StageIdPair* pair) { - StageData* stage_data = Ground_803DFEDC[pair->stage_id]; + StageData* stage_data = Ground_803DFEDC[pair->internal_id]; Ground_801C38D0(stage_info.param->x8, stage_info.param->x14, stage_info.param->x1C, stage_info.param->x18); Ground_801C38EC(stage_info.param->x10, stage_info.param->xC); @@ -663,12 +663,12 @@ void Ground_801C0C2C(HSD_GObj* arg0) } } -void Ground_801C0F78(StructPairWithStageID* pair) +void Ground_801C0F78(StageIdPair* pair) { - Ground_803DFEDC[pair->stage_id]->OnLoad(); + Ground_803DFEDC[pair->internal_id]->OnLoad(); } -void Ground_801C0FB8(StructPairWithStageID* pair) +void Ground_801C0FB8(StageIdPair* pair) { struct { void* unk0; @@ -676,7 +676,7 @@ void Ground_801C0FB8(StructPairWithStageID* pair) void (*unk8)(s32); }* cur; void* next; - Ground_803DFEDC[pair->stage_id]->OnStart(); + Ground_803DFEDC[pair->internal_id]->OnStart(); for (cur = stage_info.x6A4; cur != NULL; cur = next) { next = cur->unk0; cur->unk8(cur->unk4); @@ -687,9 +687,9 @@ void Ground_801C0FB8(StructPairWithStageID* pair) Ground_801C0C2C, 10); } -void Ground_DemoInit(StructPairWithStageID* pair, s32 arg1) +void Ground_DemoInit(StageIdPair* pair, s32 arg1) { - Ground_803DFEDC[pair->stage_id]->OnDemoInit(arg1); + Ground_803DFEDC[pair->internal_id]->OnDemoInit(arg1); } void Ground_801C10B8(HSD_GObj* arg0, HSD_GObjEvent arg1) diff --git a/src/melee/gr/ground.h b/src/melee/gr/ground.h index a6b501e90c..a3b2ba4174 100644 --- a/src/melee/gr/ground.h +++ b/src/melee/gr/ground.h @@ -36,11 +36,11 @@ /* 1C0690 */ GXColor* Ground_801C0690(void); /* 1C06A4 */ GXColor* Ground_801C06A4(void); /* 1C06B8 */ void Ground_801C06B8(InternalStageId); -/* 1C0754 */ void Ground_801C0754(StructPairWithStageID* pair); -/* 1C0800 */ void Ground_801C0800(StructPairWithStageID* pair); -/* 1C0F78 */ void Ground_801C0F78(StructPairWithStageID* pair); -/* 1C0FB8 */ void Ground_801C0FB8(StructPairWithStageID* pair); -/* 1C1074 */ void Ground_DemoInit(StructPairWithStageID* pair, s32); +/* 1C0754 */ void Ground_801C0754(StageIdPair* pair); +/* 1C0800 */ void Ground_801C0800(StageIdPair* pair); +/* 1C0F78 */ void Ground_801C0F78(StageIdPair* pair); +/* 1C0FB8 */ void Ground_801C0FB8(StageIdPair* pair); +/* 1C1074 */ void Ground_DemoInit(StageIdPair* pair, s32); /* 1C10B8 */ void Ground_801C10B8(HSD_GObj*, HSD_GObjEvent); /* 1C1154 */ void Ground_801C1154(void); /* 1C1158 */ void Ground_801C1158(void); diff --git a/src/melee/gr/grvenom.c b/src/melee/gr/grvenom.c index 8b5986dae3..397017912f 100644 --- a/src/melee/gr/grvenom.c +++ b/src/melee/gr/grvenom.c @@ -643,7 +643,7 @@ void grVenom_802040AC(Ground_GObj* arg) {} void grVenom_802040B0(Ground_GObj* arg) {} -enum_t Stage_80225194(void); +ExternalStageId Stage_80225194(void); void fn_802040B4(Ground_GObj* gobj) { diff --git a/src/melee/gr/stage.c b/src/melee/gr/stage.c index b183a6da56..25b90fa7ad 100644 --- a/src/melee/gr/stage.c +++ b/src/melee/gr/stage.c @@ -12,18 +12,19 @@ extern struct StageInfo stage_info; -struct StructStageIDWithUnks { - s32 stage_id; +/// One #stage_id_map entry: the #InternalStageId for an #ExternalStageId. +struct StageIdMapEntry { + InternalStageId internal_id; s32 unk1; s32 unk2; }; -struct StructNumberAndStage { - s32 list_idx; - struct StructStageIDWithUnks* unk_struct; +struct StageSelection { + ExternalStageId external_id; + struct StageIdMapEntry* entry; }; -struct StructNumberAndStage unk_struct_804D49E8 = { 2, NULL }; -StructPairWithStageID unk_struct_804D49F0 = { 12, 2 }; +struct StageSelection selected_stage = { ExternalStageID_IZUMI, NULL }; +StageIdPair default_stage_pair = { IZUMI, ExternalStageID_IZUMI }; f32 Stage_GetCamBoundsLeftOffset(void) { @@ -326,148 +327,377 @@ s32 Stage_80225074(s32 arg0) HSD_ASSERT(526, 0); } - tmp = Ground_801C28AC(unk_struct_804D49E8.list_idx, r31, &spC); + tmp = Ground_801C28AC(selected_stage.external_id, r31, &spC); lbAudioAx_80023F28(spC); Ground_801C5A84(spC); Ground_801C5AA4(tmp); return arg0; } -enum_t Stage_80225194(void) -{ - return unk_struct_804D49E8.list_idx; -} - -struct StructStageIDWithUnks unk_arr_803E9960[] = { - { 0, 0, 0 }, { 1, 0, 0 }, { 12, 0, 0 }, { 16, 0, 0 }, { 2, 0, 0 }, - { 4, 0, 0 }, { 8, 0, 0 }, { 14, 0, 0 }, { 10, 0, 0 }, { 20, 0, 0 }, - { 18, 0, 0 }, { 3, 0, 0 }, { 5, 0, 0 }, { 6, 0, 0 }, { 7, 0, 0 }, - { 9, 0, 0 }, { 11, 0, 0 }, { 13, 0, 0 }, { 21, 0, 0 }, { 24, 0, 0 }, - { 25, 0, 0 }, { 26, 0, 0 }, { 15, 0, 0 }, { 17, 0, 0 }, { 19, 0, 0 }, - { 22, 0, 0 }, { 22, 0, 0 }, { 27, 0, 0 }, { 28, 0, 0 }, { 29, 0, 0 }, - { 30, 0, 0 }, { 36, 0, 0 }, { 37, 0, 0 }, { 40, 0, 0 }, { 41, 0, 0 }, - { 42, 0, 0 }, { 43, 0, 0 }, { 44, 0, 0 }, { 45, 0, 0 }, { 46, 0, 0 }, - { 47, 0, 0 }, { 48, 0, 0 }, { 49, 0, 0 }, { 50, 0, 0 }, { 51, 0, 0 }, - { 52, 0, 0 }, { 53, 0, 0 }, { 54, 0, 0 }, { 55, 0, 0 }, { 56, 0, 0 }, - { 57, 0, 0 }, { 58, 0, 0 }, { 59, 0, 0 }, { 60, 0, 0 }, { 61, 0, 0 }, - { 62, 0, 0 }, { 63, 0, 0 }, { 64, 0, 0 }, { 65, 0, 0 }, { 31, 0, 0 }, - { 2, 0, 0 }, { 4, 0, 0 }, { 5, 0, 0 }, { 32, 0, 0 }, { 7, 0, 0 }, - { 8, 0, 0 }, { 33, 0, 0 }, { 13, 0, 0 }, { 13, 0, 0 }, { 13, 0, 0 }, - { 14, 0, 0 }, { 14, 0, 0 }, { 16, 0, 0 }, { 34, 0, 0 }, { 18, 0, 0 }, - { 20, 0, 0 }, { 22, 0, 0 }, { 22, 0, 0 }, { 36, 0, 0 }, { 36, 0, 0 }, - { 37, 0, 0 }, { 37, 0, 0 }, { 39, 0, 0 }, { 38, 0, 0 }, { 67, 0, 0 }, - { 66, 0, 0 }, { 2, 0, 0 }, { 3, 0, 0 }, { 4, 0, 0 }, { 5, 0, 0 }, - { 6, 0, 0 }, { 7, 0, 0 }, { 8, 0, 0 }, { 9, 0, 0 }, { 10, 0, 0 }, - { 11, 0, 0 }, { 12, 0, 0 }, { 13, 0, 0 }, { 14, 0, 0 }, { 15, 0, 0 }, - { 16, 0, 0 }, { 24, 0, 0 }, { 25, 0, 0 }, { 18, 0, 0 }, { 19, 0, 0 }, - { 20, 0, 0 }, { 21, 0, 0 }, { 16, 0, 0 }, { 2, 0, 0 }, { 36, 0, 0 }, - { 2, 0, 0 }, { 25, 0, 0 }, { 7, 0, 0 }, { 6, 0, 0 }, { 37, 0, 0 }, - { 16, 0, 0 }, { 22, 0, 0 }, { 22, 0, 0 }, { 24, 0, 0 }, { 6, 0, 0 }, - { 7, 0, 0 }, { 14, 0, 0 }, { 15, 0, 0 }, { 6, 0, 0 }, { 16, 0, 0 }, - { 36, 0, 0 }, { 25, 0, 0 }, { 4, 0, 0 }, { 7, 0, 0 }, { 6, 0, 0 }, - { 24, 0, 0 }, { 6, 0, 0 }, { 19, 0, 0 }, { 8, 0, 0 }, { 10, 0, 0 }, - { 11, 0, 0 }, { 13, 0, 0 }, { 12, 0, 0 }, { 13, 0, 0 }, { 22, 0, 0 }, - { 14, 0, 0 }, { 18, 0, 0 }, { 16, 0, 0 }, { 16, 0, 0 }, { 24, 0, 0 }, - { 20, 0, 0 }, { 21, 0, 0 }, { 19, 0, 0 }, { 36, 0, 0 }, { 36, 0, 0 }, - { 36, 0, 0 }, { 7, 0, 0 }, { 6, 0, 0 }, { 7, 0, 0 }, { 6, 0, 0 }, - { 2, 0, 0 }, { 4, 0, 0 }, { 6, 0, 0 }, { 10, 0, 0 }, { 25, 0, 0 }, - { 18, 0, 0 }, { 16, 0, 0 }, { 12, 0, 0 }, { 24, 0, 0 }, { 7, 0, 0 }, - { 3, 0, 0 }, { 5, 0, 0 }, { 12, 0, 0 }, { 25, 0, 0 }, { 20, 0, 0 }, - { 16, 0, 0 }, { 22, 0, 0 }, { 16, 0, 0 }, { 27, 0, 0 }, { 18, 0, 0 }, - { 36, 0, 0 }, { 37, 0, 0 }, { 3, 0, 0 }, { 4, 0, 0 }, { 6, 0, 0 }, - { 8, 0, 0 }, { 10, 0, 0 }, { 13, 0, 0 }, { 14, 0, 0 }, { 16, 0, 0 }, - { 24, 0, 0 }, { 18, 0, 0 }, { 20, 0, 0 }, { 17, 0, 0 }, { 22, 0, 0 }, - { 2, 0, 0 }, { 7, 0, 0 }, { 12, 0, 0 }, { 36, 0, 0 }, { 11, 0, 0 }, - { 25, 0, 0 }, { 5, 0, 0 }, { 15, 0, 0 }, { 21, 0, 0 }, { 37, 0, 0 }, - { 27, 0, 0 }, { 9, 0, 0 }, { 36, 0, 0 }, { 7, 0, 0 }, { 2, 0, 0 }, - { 10, 0, 0 }, { 20, 0, 0 }, { 12, 0, 0 }, { 16, 0, 0 }, { 8, 0, 0 }, - { 6, 0, 0 }, { 11, 0, 0 }, { 22, 0, 0 }, { 18, 0, 0 }, { 3, 0, 0 }, - { 68, 0, 0 }, { 36, 0, 0 }, { 14, 0, 0 }, { 5, 0, 0 }, { 4, 0, 0 }, - { 37, 0, 0 }, { 8, 0, 0 }, { 2, 0, 0 }, { 25, 0, 0 }, { 9, 0, 0 }, - { 11, 0, 0 }, { 21, 0, 0 }, { 69, 0, 0 }, { 15, 0, 0 }, { 13, 0, 0 }, - { 7, 0, 0 }, { 12, 0, 0 }, { 24, 0, 0 }, { 14, 0, 0 }, { 34, 0, 0 }, - { 6, 0, 0 }, { 28, 0, 0 }, { 21, 0, 0 }, { 12, 0, 0 }, { 25, 0, 0 }, - { 16, 0, 0 }, { 7, 0, 0 }, { 7, 0, 0 }, { 17, 0, 0 }, { 19, 0, 0 }, - { 36, 0, 0 }, { 27, 0, 0 }, { 7, 0, 0 }, { 70, 0, 0 }, { 10, 0, 0 }, - { 24, 0, 0 }, { 37, 0, 0 }, { 37, 0, 0 }, { 5, 0, 0 }, { 10, 0, 0 }, - { 2, 0, 0 }, { 3, 0, 0 }, { 6, 0, 0 }, { 7, 0, 0 }, { 18, 0, 0 }, - { 14, 0, 0 }, { 16, 0, 0 }, { 20, 0, 0 }, { 22, 0, 0 }, { 25, 0, 0 }, - { 17, 0, 0 }, { 37, 0, 0 }, { 27, 0, 0 }, { 15, 0, 0 }, { 16, 0, 0 }, - { 6, 0, 0 }, { 7, 0, 0 }, { 37, 0, 0 }, { 36, 0, 0 }, { 16, 0, 0 }, - { 37, 0, 0 }, { 25, 0, 0 }, { 12, 0, 0 }, { 27, 0, 0 }, { 2, 0, 0 }, - { 37, 0, 0 }, { 6, 0, 0 }, { 36, 0, 0 }, { 16, 0, 0 }, { 7, 0, 0 }, - { 36, 0, 0 }, +ExternalStageId Stage_80225194(void) +{ + return selected_stage.external_id; +} + +/// Indexed by #ExternalStageId. +struct StageIdMapEntry stage_id_map[] = { + { InternalStageID_Unk00, 0, 0 }, + { TEST, 0, 0 }, + { IZUMI, 0, 0 }, + { PSTADIUM, 0, 0 }, + { CASTLE, 0, 0 }, + { KONGO, 0, 0 }, + { ZEBES, 0, 0 }, + { CORNERIA, 0, 0 }, + { STORY, 0, 0 }, + { ONETT, 0, 0 }, + { MUTECITY, 0, 0 }, + { RCRUISE, 0, 0 }, + { GARDEN, 0, 0 }, + { GREATBAY, 0, 0 }, + { SHRINE, 0, 0 }, + { KRAID, 0, 0 }, + { YORSTER, 0, 0 }, + { GREENS, 0, 0 }, + { FOURSIDE, 0, 0 }, + { INISHIE1, 0, 0 }, + { INISHIE2, 0, 0 }, + { InternalStageID_Unk26, 0, 0 }, + { VENOM, 0, 0 }, + { PURA, 0, 0 }, + { BIGBLUE, 0, 0 }, + { ICEMTN, 0, 0 }, + { ICEMTN, 0, 0 }, + { FLATZONE, 0, 0 }, + { OLDPUPUPU, 0, 0 }, + { OLDYOSHI, 0, 0 }, + { OLDKONGO, 0, 0 }, + { BATTLE, 0, 0 }, + { LAST, 0, 0 }, + { TMARIO, 0, 0 }, + { TCAPTAIN, 0, 0 }, + { TCLINK, 0, 0 }, + { TDONKEY, 0, 0 }, + { TDRMARIO, 0, 0 }, + { TFALCO, 0, 0 }, + { TFOX, 0, 0 }, + { TICECLIMBER, 0, 0 }, + { TKIRBY, 0, 0 }, + { TKOOPA, 0, 0 }, + { TLINK, 0, 0 }, + { TLUIGI, 0, 0 }, + { TMARS, 0, 0 }, + { TMEWTWO, 0, 0 }, + { TNESS, 0, 0 }, + { TPEACH, 0, 0 }, + { TPICHU, 0, 0 }, + { TPIKACHU, 0, 0 }, + { TPURIN, 0, 0 }, + { TSAMUS, 0, 0 }, + { TSEAK, 0, 0 }, + { TYOSHI, 0, 0 }, + { TZELDA, 0, 0 }, + { TGAMEWATCH, 0, 0 }, + { TEMBLEM, 0, 0 }, + { TGANON, 0, 0 }, + { KINOKOROUTE, 0, 0 }, + { CASTLE, 0, 0 }, + { KONGO, 0, 0 }, + { GARDEN, 0, 0 }, + { SHRINEROUTE, 0, 0 }, + { SHRINE, 0, 0 }, + { ZEBES, 0, 0 }, + { ZEBESROUTE, 0, 0 }, + { GREENS, 0, 0 }, + { GREENS, 0, 0 }, + { GREENS, 0, 0 }, + { CORNERIA, 0, 0 }, + { CORNERIA, 0, 0 }, + { PSTADIUM, 0, 0 }, + { BIGBLUEROUTE, 0, 0 }, + { MUTECITY, 0, 0 }, + { ONETT, 0, 0 }, + { ICEMTN, 0, 0 }, + { ICEMTN, 0, 0 }, + { BATTLE, 0, 0 }, + { BATTLE, 0, 0 }, + { LAST, 0, 0 }, + { LAST, 0, 0 }, + { PUSHON, 0, 0 }, + { FIGUREGET, 0, 0 }, + { HOMERUN, 0, 0 }, + { HEAL, 0, 0 }, + { CASTLE, 0, 0 }, + { RCRUISE, 0, 0 }, + { KONGO, 0, 0 }, + { GARDEN, 0, 0 }, + { GREATBAY, 0, 0 }, + { SHRINE, 0, 0 }, + { ZEBES, 0, 0 }, + { KRAID, 0, 0 }, + { STORY, 0, 0 }, + { YORSTER, 0, 0 }, + { IZUMI, 0, 0 }, + { GREENS, 0, 0 }, + { CORNERIA, 0, 0 }, + { VENOM, 0, 0 }, + { PSTADIUM, 0, 0 }, + { INISHIE1, 0, 0 }, + { INISHIE2, 0, 0 }, + { MUTECITY, 0, 0 }, + { BIGBLUE, 0, 0 }, + { ONETT, 0, 0 }, + { FOURSIDE, 0, 0 }, + { PSTADIUM, 0, 0 }, + { CASTLE, 0, 0 }, + { BATTLE, 0, 0 }, + { CASTLE, 0, 0 }, + { INISHIE2, 0, 0 }, + { SHRINE, 0, 0 }, + { GREATBAY, 0, 0 }, + { LAST, 0, 0 }, + { PSTADIUM, 0, 0 }, + { ICEMTN, 0, 0 }, + { ICEMTN, 0, 0 }, + { INISHIE1, 0, 0 }, + { GREATBAY, 0, 0 }, + { SHRINE, 0, 0 }, + { CORNERIA, 0, 0 }, + { VENOM, 0, 0 }, + { GREATBAY, 0, 0 }, + { PSTADIUM, 0, 0 }, + { BATTLE, 0, 0 }, + { INISHIE2, 0, 0 }, + { KONGO, 0, 0 }, + { SHRINE, 0, 0 }, + { GREATBAY, 0, 0 }, + { INISHIE1, 0, 0 }, + { GREATBAY, 0, 0 }, + { BIGBLUE, 0, 0 }, + { ZEBES, 0, 0 }, + { STORY, 0, 0 }, + { YORSTER, 0, 0 }, + { GREENS, 0, 0 }, + { IZUMI, 0, 0 }, + { GREENS, 0, 0 }, + { ICEMTN, 0, 0 }, + { CORNERIA, 0, 0 }, + { MUTECITY, 0, 0 }, + { PSTADIUM, 0, 0 }, + { PSTADIUM, 0, 0 }, + { INISHIE1, 0, 0 }, + { ONETT, 0, 0 }, + { FOURSIDE, 0, 0 }, + { BIGBLUE, 0, 0 }, + { BATTLE, 0, 0 }, + { BATTLE, 0, 0 }, + { BATTLE, 0, 0 }, + { SHRINE, 0, 0 }, + { GREATBAY, 0, 0 }, + { SHRINE, 0, 0 }, + { GREATBAY, 0, 0 }, + { CASTLE, 0, 0 }, + { KONGO, 0, 0 }, + { GREATBAY, 0, 0 }, + { STORY, 0, 0 }, + { INISHIE2, 0, 0 }, + { MUTECITY, 0, 0 }, + { PSTADIUM, 0, 0 }, + { IZUMI, 0, 0 }, + { INISHIE1, 0, 0 }, + { SHRINE, 0, 0 }, + { RCRUISE, 0, 0 }, + { GARDEN, 0, 0 }, + { IZUMI, 0, 0 }, + { INISHIE2, 0, 0 }, + { ONETT, 0, 0 }, + { PSTADIUM, 0, 0 }, + { ICEMTN, 0, 0 }, + { PSTADIUM, 0, 0 }, + { FLATZONE, 0, 0 }, + { MUTECITY, 0, 0 }, + { BATTLE, 0, 0 }, + { LAST, 0, 0 }, + { RCRUISE, 0, 0 }, + { KONGO, 0, 0 }, + { GREATBAY, 0, 0 }, + { ZEBES, 0, 0 }, + { STORY, 0, 0 }, + { GREENS, 0, 0 }, + { CORNERIA, 0, 0 }, + { PSTADIUM, 0, 0 }, + { INISHIE1, 0, 0 }, + { MUTECITY, 0, 0 }, + { ONETT, 0, 0 }, + { PURA, 0, 0 }, + { ICEMTN, 0, 0 }, + { CASTLE, 0, 0 }, + { SHRINE, 0, 0 }, + { IZUMI, 0, 0 }, + { BATTLE, 0, 0 }, + { YORSTER, 0, 0 }, + { INISHIE2, 0, 0 }, + { GARDEN, 0, 0 }, + { VENOM, 0, 0 }, + { FOURSIDE, 0, 0 }, + { LAST, 0, 0 }, + { FLATZONE, 0, 0 }, + { KRAID, 0, 0 }, + { BATTLE, 0, 0 }, + { SHRINE, 0, 0 }, + { CASTLE, 0, 0 }, + { STORY, 0, 0 }, + { ONETT, 0, 0 }, + { IZUMI, 0, 0 }, + { PSTADIUM, 0, 0 }, + { ZEBES, 0, 0 }, + { GREATBAY, 0, 0 }, + { YORSTER, 0, 0 }, + { ICEMTN, 0, 0 }, + { MUTECITY, 0, 0 }, + { RCRUISE, 0, 0 }, + { FIGURE1, 0, 0 }, + { BATTLE, 0, 0 }, + { CORNERIA, 0, 0 }, + { GARDEN, 0, 0 }, + { KONGO, 0, 0 }, + { LAST, 0, 0 }, + { ZEBES, 0, 0 }, + { CASTLE, 0, 0 }, + { INISHIE2, 0, 0 }, + { KRAID, 0, 0 }, + { YORSTER, 0, 0 }, + { FOURSIDE, 0, 0 }, + { FIGURE2, 0, 0 }, + { VENOM, 0, 0 }, + { GREENS, 0, 0 }, + { SHRINE, 0, 0 }, + { IZUMI, 0, 0 }, + { INISHIE1, 0, 0 }, + { CORNERIA, 0, 0 }, + { BIGBLUEROUTE, 0, 0 }, + { GREATBAY, 0, 0 }, + { OLDPUPUPU, 0, 0 }, + { FOURSIDE, 0, 0 }, + { IZUMI, 0, 0 }, + { INISHIE2, 0, 0 }, + { PSTADIUM, 0, 0 }, + { SHRINE, 0, 0 }, + { SHRINE, 0, 0 }, + { PURA, 0, 0 }, + { BIGBLUE, 0, 0 }, + { BATTLE, 0, 0 }, + { FLATZONE, 0, 0 }, + { SHRINE, 0, 0 }, + { FIGURE3, 0, 0 }, + { STORY, 0, 0 }, + { INISHIE1, 0, 0 }, + { LAST, 0, 0 }, + { LAST, 0, 0 }, + { GARDEN, 0, 0 }, + { STORY, 0, 0 }, + { CASTLE, 0, 0 }, + { RCRUISE, 0, 0 }, + { GREATBAY, 0, 0 }, + { SHRINE, 0, 0 }, + { MUTECITY, 0, 0 }, + { CORNERIA, 0, 0 }, + { PSTADIUM, 0, 0 }, + { ONETT, 0, 0 }, + { ICEMTN, 0, 0 }, + { INISHIE2, 0, 0 }, + { PURA, 0, 0 }, + { LAST, 0, 0 }, + { FLATZONE, 0, 0 }, + { VENOM, 0, 0 }, + { PSTADIUM, 0, 0 }, + { GREATBAY, 0, 0 }, + { SHRINE, 0, 0 }, + { LAST, 0, 0 }, + { BATTLE, 0, 0 }, + { PSTADIUM, 0, 0 }, + { LAST, 0, 0 }, + { INISHIE2, 0, 0 }, + { IZUMI, 0, 0 }, + { FLATZONE, 0, 0 }, + { CASTLE, 0, 0 }, + { LAST, 0, 0 }, + { GREATBAY, 0, 0 }, + { BATTLE, 0, 0 }, + { PSTADIUM, 0, 0 }, + { SHRINE, 0, 0 }, + { BATTLE, 0, 0 }, }; -s32 Stage_8022519C(InternalStageId idx) +InternalStageId Stage_8022519C(ExternalStageId external_id) { - return unk_arr_803E9960[idx].stage_id; + return stage_id_map[external_id].internal_id; } -void Stage_802251B4(InternalStageId idx) +void Stage_802251B4(ExternalStageId external_id) { - Ground_801C06B8(unk_arr_803E9960[idx].stage_id); + Ground_801C06B8(stage_id_map[external_id].internal_id); } -void Stage_802251E8(InternalStageId idx, s32* _) +void Stage_802251E8(ExternalStageId external_id, s32* _) { - StructPairWithStageID local_data; + StageIdPair local_data; - unk_struct_804D49E8.list_idx = idx; - unk_struct_804D49E8.unk_struct = &unk_arr_803E9960[idx]; + selected_stage.external_id = external_id; + selected_stage.entry = &stage_id_map[external_id]; - local_data = unk_struct_804D49F0; + local_data = default_stage_pair; - local_data.stage_id = unk_struct_804D49E8.unk_struct->stage_id; - local_data.list_idx = unk_struct_804D49E8.list_idx; + local_data.internal_id = selected_stage.entry->internal_id; + local_data.external_id = selected_stage.external_id; Ground_801C0754(&local_data); } void Stage_8022524C(void) { - StructPairWithStageID local_data; + StageIdPair local_data; - local_data = unk_struct_804D49F0; + local_data = default_stage_pair; - local_data.stage_id = unk_struct_804D49E8.unk_struct->stage_id; - local_data.list_idx = unk_struct_804D49E8.list_idx; + local_data.internal_id = selected_stage.entry->internal_id; + local_data.external_id = selected_stage.external_id; Ground_801C0800(&local_data); } void Stage_80225298(void) { - StructPairWithStageID local_data; + StageIdPair local_data; - local_data = unk_struct_804D49F0; + local_data = default_stage_pair; - local_data.stage_id = unk_struct_804D49E8.unk_struct->stage_id; - local_data.list_idx = unk_struct_804D49E8.list_idx; + local_data.internal_id = selected_stage.entry->internal_id; + local_data.external_id = selected_stage.external_id; Ground_801C0F78(&local_data); } -void Stage_802252E4(InternalStageId idx, HSD_GObj* _) +void Stage_802252E4(ExternalStageId external_id, HSD_GObj* _) { - StructPairWithStageID local_data; + StageIdPair local_data; - local_data = unk_struct_804D49F0; + local_data = default_stage_pair; - local_data.stage_id = unk_struct_804D49E8.unk_struct->stage_id; - local_data.list_idx = idx; + local_data.internal_id = selected_stage.entry->internal_id; + local_data.external_id = external_id; Ground_801C0FB8(&local_data); } -void Stage_8022532C(InternalStageId idx, s32 arg1) +void Stage_8022532C(ExternalStageId external_id, s32 arg1) { - StructPairWithStageID local_data; + StageIdPair local_data; - local_data = unk_struct_804D49F0; + local_data = default_stage_pair; - local_data.stage_id = unk_struct_804D49E8.unk_struct->stage_id; - local_data.list_idx = idx; + local_data.internal_id = selected_stage.entry->internal_id; + local_data.external_id = external_id; Ground_DemoInit(&local_data, arg1); } diff --git a/src/melee/gr/stage.h b/src/melee/gr/stage.h index d2c8247278..208d7df179 100644 --- a/src/melee/gr/stage.h +++ b/src/melee/gr/stage.h @@ -77,13 +77,13 @@ static inline bool Stage_IsOutsideBlastZoneWithMargin(Vec3* pos, f32 margin) /* 224E64 */ void Stage_80224E64(enum_t, Vec3*); /* 224FDC */ bool Stage_80224FDC(Vec3*); /* 225074 */ s32 Stage_80225074(s32); -/* 225194 */ enum_t Stage_80225194(void); -/* 22519C */ s32 Stage_8022519C(InternalStageId idx); -/* 2251B4 */ void Stage_802251B4(InternalStageId idx); -/* 2251E8 */ void Stage_802251E8(InternalStageId idx, s32*); +/* 225194 */ ExternalStageId Stage_80225194(void); +/* 22519C */ InternalStageId Stage_8022519C(ExternalStageId external_id); +/* 2251B4 */ void Stage_802251B4(ExternalStageId external_id); +/* 2251E8 */ void Stage_802251E8(ExternalStageId external_id, s32*); /* 22524C */ void Stage_8022524C(void); /* 225298 */ void Stage_80225298(void); -/* 2252E4 */ void Stage_802252E4(InternalStageId idx, HSD_GObj*); -/* 22532C */ void Stage_8022532C(InternalStageId idx, s32); +/* 2252E4 */ void Stage_802252E4(ExternalStageId external_id, HSD_GObj*); +/* 22532C */ void Stage_8022532C(ExternalStageId external_id, s32); #endif diff --git a/src/melee/gr/types.h b/src/melee/gr/types.h index 5030ac7581..c39f85be26 100644 --- a/src/melee/gr/types.h +++ b/src/melee/gr/types.h @@ -163,10 +163,10 @@ typedef struct StageData { size_t x30; // size of x2C array } StageData; -typedef struct StructPairWithStageID { - s32 stage_id; - s32 list_idx; -} StructPairWithStageID; +typedef struct StageIdPair { + InternalStageId internal_id; + ExternalStageId external_id; +} StageIdPair; struct GroundVars_unk { int xC4; diff --git a/src/melee/lb/lbaudio_ax.c b/src/melee/lb/lbaudio_ax.c index 41eba7eeb4..8c034a0c9a 100644 --- a/src/melee/lb/lbaudio_ax.c +++ b/src/melee/lb/lbaudio_ax.c @@ -2160,7 +2160,7 @@ u64 lbAudioAx_80026E84(CharacterKind c_kind) return lbl_803BB3C0[c_kind].x8; } -u64 lbAudioAx_80026EBC(InternalStageId arg0) +u64 lbAudioAx_80026EBC(ExternalStageId arg0) { const int imax = ARRAY_SIZE(s32_arr_803BB6B0); int id = Stage_8022519C(arg0); @@ -2322,7 +2322,7 @@ void lbAudioAx_8002785C(void) { u64 result = 0; int i; - InternalStageId stage; + ExternalStageId stage; if (gm_8016B184()) { result = lbAudioAx_80026E84(Player_GetPlayerCharacter(0)); diff --git a/src/melee/lb/lbaudio_ax.h b/src/melee/lb/lbaudio_ax.h index 12f8070569..aeb3f94bda 100644 --- a/src/melee/lb/lbaudio_ax.h +++ b/src/melee/lb/lbaudio_ax.h @@ -90,7 +90,7 @@ /* 026C04 */ int fn_80026C04(int arg0, int); /* 026E58 */ bool fn_80026E58(int); /* 026E84 */ u64 lbAudioAx_80026E84(CharacterKind); -/* 026EBC */ u64 lbAudioAx_80026EBC(InternalStageId); +/* 026EBC */ u64 lbAudioAx_80026EBC(ExternalStageId); /* 026F2C */ void lbAudioAx_80026F2C(s32); /* 02702C */ void lbAudioAx_8002702C(s32, u64); /* 027168 */ void lbAudioAx_80027168(void); diff --git a/src/melee/lb/types.h b/src/melee/lb/types.h index 0b39c3be6c..9cc1c4cf8f 100644 --- a/src/melee/lb/types.h +++ b/src/melee/lb/types.h @@ -275,7 +275,7 @@ struct PreloadCacheScene { u8 field2_0x9; u8 field3_0xa; u8 field4_0xb; - InternalStageId stage_id; + ExternalStageId stage_id; PreloadCacheSceneEntry entries[8]; } game_cache; s32 mode_scene_changes; diff --git a/src/melee/mn/types.h b/src/melee/mn/types.h index 8b39c1d2ee..37ad43928e 100644 --- a/src/melee/mn/types.h +++ b/src/melee/mn/types.h @@ -213,7 +213,7 @@ struct StartMeleeRules { s8 xB; // item frequency s8 xC; // SD penalty u8 xD; - u16 xE; // InternalStageId + u16 xE; // ExternalStageId u32 x10; // time limit u8 x14; diff --git a/src/melee/vi/vi0102.c b/src/melee/vi/vi0102.c index bf86a7621d..e308b0b010 100644 --- a/src/melee/vi/vi0102.c +++ b/src/melee/vi/vi0102.c @@ -47,11 +47,11 @@ void vi0102_8031CB00(int mario_costume, int luigi_costume) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(4, 0); + Stage_802251E8(ExternalStageID_CASTLE, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(4, 0); + Stage_8022532C(ExternalStageID_CASTLE, 0); ftDemo_ObjAllocInit(); Player_InitAllPlayers(); diff --git a/src/melee/vi/vi0401.c b/src/melee/vi/vi0401.c index 2ff17351f1..f21c10f866 100644 --- a/src/melee/vi/vi0401.c +++ b/src/melee/vi/vi0401.c @@ -56,11 +56,11 @@ void un_8031D030(CharacterKind char_kind, int costume) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(6, 0); + Stage_802251E8(ExternalStageID_ZEBES, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(6, 0); + Stage_8022532C(ExternalStageID_ZEBES, 0); ftDemo_ObjAllocInit(); Player_InitAllPlayers(); diff --git a/src/melee/vi/vi0501.c b/src/melee/vi/vi0501.c index 5c450028e5..782dc605b8 100644 --- a/src/melee/vi/vi0501.c +++ b/src/melee/vi/vi0501.c @@ -83,13 +83,13 @@ void un_8031D9F8(CharacterKind char_kind, int costume, int spawn_mode, lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(PURA, NULL); + Stage_802251E8(ExternalStageID_GREENS, NULL); Item_80266FA8(); Item_80266FCC(); un_804D6F80 = Ground_801C0498(); Ground_801C04BC(0.7f); Stage_8022524C(); - Stage_8022532C(PURA, 0); + Stage_8022532C(ExternalStageID_GREENS, 0); ftDemo_ObjAllocInit(); Player_InitAllPlayers(); Player_80036E20(char_kind, un_804D6F78, 3); diff --git a/src/melee/vi/vi0502.c b/src/melee/vi/vi0502.c index 138663d492..862b3185ca 100644 --- a/src/melee/vi/vi0502.c +++ b/src/melee/vi/vi0502.c @@ -75,12 +75,12 @@ void vi0502_8031E124(CharacterKind player_kind, int player_costume, lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(17, 0); + Stage_802251E8(ExternalStageID_GREENS, 0); Item_80266FA8(); Item_80266FCC(); Ground_801C04BC(0.7f); Stage_8022524C(); - Stage_8022532C(17, 0); + Stage_8022532C(ExternalStageID_GREENS, 0); ftDemo_ObjAllocInit(); Player_InitAllPlayers(); diff --git a/src/melee/vi/vi0601.c b/src/melee/vi/vi0601.c index fba627d371..54fc0be096 100644 --- a/src/melee/vi/vi0601.c +++ b/src/melee/vi/vi0601.c @@ -168,11 +168,11 @@ void un_8031EBBC_OnEnter(void* unused) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(7, 0); + Stage_802251E8(ExternalStageID_CORNERIA, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(7, 0); + Stage_8022532C(ExternalStageID_CORNERIA, 0); erase_colors_vi0601 = Camera_80030758(); un_8031E9B8(); diff --git a/src/melee/vi/vi0801.c b/src/melee/vi/vi0801.c index 533d4905be..6d4aab34da 100644 --- a/src/melee/vi/vi0801.c +++ b/src/melee/vi/vi0801.c @@ -148,11 +148,11 @@ void vi0801_OnEnter(void* unused) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(0x49, 0); + Stage_802251E8(ExternalStageID_BIGBLUEROUTE, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(0x49, 0); + Stage_8022532C(ExternalStageID_BIGBLUEROUTE, 0); gobj = GObj_Create(0xB, 3, 0); fog = HSD_FogLoadDesc(un_804D6FB8->fogs->desc); diff --git a/src/melee/vi/vi1101.c b/src/melee/vi/vi1101.c index a2faeb0bfa..075ad312aa 100644 --- a/src/melee/vi/vi1101.c +++ b/src/melee/vi/vi1101.c @@ -66,11 +66,11 @@ void un_8031F294(s32 arg0, s32 arg1) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(KINOKOROUTE, 0); + Stage_802251E8(ExternalStageID_BATTLE, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(KINOKOROUTE, 0); + Stage_8022532C(ExternalStageID_BATTLE, 0); ftDemo_ObjAllocInit(); Player_InitAllPlayers(); Player_80036E20(arg0, un_804D6FC8, 3); diff --git a/src/melee/vi/vi1201v1.c b/src/melee/vi/vi1201v1.c index 1985827a9c..10c8e43b30 100644 --- a/src/melee/vi/vi1201v1.c +++ b/src/melee/vi/vi1201v1.c @@ -230,11 +230,11 @@ void un_8031FD18_OnEnter(void* arg) HSD_GObj_SetupProc(gobj, fn_8031FC30, 0); un_8031FD18_SetupScene(); - Stage_802251E8(0x20, 0); + Stage_802251E8(ExternalStageID_LAST, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(0x20, 0x19); + Stage_8022532C(ExternalStageID_LAST, 0x19); gobj = GObj_Create(0xE, 0xF, 0); jobj = HSD_JObjLoadJoint(un_804D6FEC); diff --git a/src/melee/vi/vi1201v2.c b/src/melee/vi/vi1201v2.c index aed62a6f55..7f4d6c7570 100644 --- a/src/melee/vi/vi1201v2.c +++ b/src/melee/vi/vi1201v2.c @@ -99,11 +99,11 @@ void un_80320508(CharacterKind char_kind, int costume) lb_8000FCDC(); mpColl_80041C78(); Ground_801C0378(0x40); - Stage_802251E8(0x20, 0); + Stage_802251E8(ExternalStageID_LAST, 0); Item_80266FA8(); Item_80266FCC(); Stage_8022524C(); - Stage_8022532C(0x20, 0x1A); + Stage_8022532C(ExternalStageID_LAST, 0x1A); ftDemo_ObjAllocInit(); Player_InitAllPlayers(); Player_80036E20(char_kind, un_804D7018, 3);