mirror of https://github.com/n64decomp/mk64.git
Document *.m64 sequence IDs (and also add support for custom track music) (#740)
* Document sequence IDs * Document sequence IDs * Document sequence IDs * Document sequence IDs * Document sequence IDs * Fix function comments * Properly identify the podium ceremony sequence; fix comments --------- Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
parent
bb8ac997a8
commit
f5caebc5de
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef SEQ_IDS_H
|
||||
#define SEQ_IDS_H
|
||||
|
||||
enum SeqId {
|
||||
SEQ_SOUND_PLAYER, // 0x00 (00)
|
||||
SEQ_MENU_TITLE_SCREEN, // 0x01 (01)
|
||||
SEQ_MENU_MAIN_MENU, // 0x02 (02)
|
||||
SEQ_TRACK_RACEWAY, // 0x03 (03)
|
||||
SEQ_TRACK_FARM, // 0x04 (04)
|
||||
SEQ_TRACK_MOUNTAIN, // 0x05 (05)
|
||||
SEQ_TRACK_BEACH, // 0x06 (06)
|
||||
SEQ_TRACK_SCARY, // 0x07 (07)
|
||||
SEQ_TRACK_SNOW, // 0x08 (08)
|
||||
SEQ_TRACK_CASTLE, // 0x09 (09)
|
||||
SEQ_TRACK_DESERT, // 0x0A (10)
|
||||
SEQ_EVENT_RACE_STARTING, // 0x0B (11)
|
||||
SEQ_EVENT_RACE_FINAL_LAP, // 0x0C (12)
|
||||
SEQ_EVENT_RACE_FINISH_FIRST, // 0x0D (13)
|
||||
SEQ_EVENT_RACE_FINISH_OTHER, // 0x0E (14)
|
||||
SEQ_EVENT_RACE_FINISH_LOSE, // 0x0F (15)
|
||||
SEQ_MENU_RESULTS_SCREEN_WIN, // 0x10 (16)
|
||||
SEQ_EVENT_RACE_POWERUP_STAR, // 0x11 (17)
|
||||
SEQ_TRACK_RAINBOW, // 0x12 (18)
|
||||
SEQ_TRACK_JUNGLE, // 0x13 (19)
|
||||
SEQ_EVENT_CEREMONY_TROPHY_LOSE, // 0x14 (20)
|
||||
SEQ_TRACK_TURNPIKE, // 0x15 (21)
|
||||
SEQ_EVENT_RACE_STARTING_VS, // 0x16 (22)
|
||||
SEQ_MENU_RESULTS_SCREEN_WIN_VS, // 0x17 (23)
|
||||
SEQ_MENU_RESULTS_SCREEN_LOSE, // 0x18 (24)
|
||||
SEQ_TRACK_BATTLE, // 0x19 (25)
|
||||
SEQ_EVENT_CEREMONY_PRESENTATION_PART1, // 0x1A (26)
|
||||
SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN, // 0x1B (27)
|
||||
SEQ_EVENT_CEREMONY_TROPHY_CREDITS, // 0x1C (28)
|
||||
SEQ_EVENT_CEREMONY_PRESENTATION_PART2_LOSE, // 0x1D (29)
|
||||
SEQ_COUNT
|
||||
};
|
||||
|
||||
#endif // SEQ_IDS_H
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
#include "code_800029B0.h"
|
||||
#include "cpu_vehicles_camera_path.h"
|
||||
#include "menu_items.h"
|
||||
#include "seq_ids.h"
|
||||
|
||||
s8 D_8018EF10;
|
||||
UnkStruct8018EF18 D_8018EF18[16];
|
||||
|
|
@ -2397,6 +2398,13 @@ void func_800C70A8(u8 playerId) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Routine to tell the game which "finish" music to play depending on which mode the player is in (Grand Prix, Time Trials, etc),
|
||||
whether the game is in multiplayer or not, and which position they ended up finishing in (1st, 2nd, 3rd, etc)
|
||||
|
||||
Contains a LOT of inlined funcs.
|
||||
Modify if you dare.
|
||||
*/
|
||||
void func_800C76C0(u8 playerId) {
|
||||
if (D_800E9EA4[playerId] != 0) {
|
||||
if (D_800E9EA4[playerId] < 0x2BC) {
|
||||
|
|
@ -2420,15 +2428,15 @@ void func_800C76C0(u8 playerId) {
|
|||
func_800C97C4(playerId);
|
||||
D_800EA0F0 = 2;
|
||||
func_800C9A88(playerId);
|
||||
func_800CA414(0x000DU, 0x0010U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_FIRST, SEQ_MENU_RESULTS_SCREEN_WIN);
|
||||
} else if (gPlayers[playerId].currentRank < 4) {
|
||||
func_800C97C4(playerId);
|
||||
D_800EA0F0 = 2;
|
||||
func_800C9A88(playerId);
|
||||
func_800CA414(0x000EU, 0x0010U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_OTHER, SEQ_MENU_RESULTS_SCREEN_WIN);
|
||||
} else {
|
||||
func_800C3448(-0x3E9F9C00);
|
||||
func_800CA414(0x000FU, 0x0018U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_LOSE, SEQ_MENU_RESULTS_SCREEN_LOSE);
|
||||
}
|
||||
} else {
|
||||
D_800EA0EC[playerId] = 2;
|
||||
|
|
@ -2439,7 +2447,7 @@ void func_800C76C0(u8 playerId) {
|
|||
func_800C97C4(playerId);
|
||||
D_800EA0F0 = 2;
|
||||
func_800C9A88(playerId);
|
||||
func_800CA414(0x000DU, 0x0010U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_FIRST, SEQ_MENU_RESULTS_SCREEN_WIN);
|
||||
} else if (gPlayers[playerId].currentRank < 4) {
|
||||
if (D_800EA104 == 0) {
|
||||
func_800C3448(0x100100FF);
|
||||
|
|
@ -2448,12 +2456,12 @@ void func_800C76C0(u8 playerId) {
|
|||
func_800C97C4(playerId);
|
||||
D_800EA0F0 = 2;
|
||||
func_800C9A88(playerId);
|
||||
func_800CA414(0x000EU, 0x0010U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_OTHER, SEQ_MENU_RESULTS_SCREEN_WIN);
|
||||
} else if (D_800EA104 == 0) {
|
||||
func_800C3448(0x100100FF);
|
||||
func_800C3448(0x110100FF);
|
||||
func_800C3448(-0x3E9F9C00);
|
||||
func_800CA414(0x000FU, 0x0018U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_LOSE, SEQ_MENU_RESULTS_SCREEN_LOSE);
|
||||
}
|
||||
if ((D_800EA104 != 0) || (D_800EA0EC[playerId] != 1)) {
|
||||
func_800C5278(5U);
|
||||
|
|
@ -2469,9 +2477,9 @@ void func_800C76C0(u8 playerId) {
|
|||
D_800EA0EC[playerId] = 2;
|
||||
func_800C9060(playerId, 0x1900F103U);
|
||||
if (D_801657E5 == 1) {
|
||||
func_800CA414(0x000DU, 0x0010U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_FIRST, SEQ_MENU_RESULTS_SCREEN_WIN);
|
||||
} else if (D_8018ED90 == 1) {
|
||||
func_800CA414(0x000EU, 0x0010U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_OTHER, SEQ_MENU_RESULTS_SCREEN_WIN);
|
||||
} else {
|
||||
func_800C3448(0x01640010);
|
||||
}
|
||||
|
|
@ -2486,16 +2494,16 @@ void func_800C76C0(u8 playerId) {
|
|||
func_800C97C4(playerId);
|
||||
D_800EA0F0 = 2;
|
||||
func_800C9A88(playerId);
|
||||
func_800CA414(0x000DU, 0x0017U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_FIRST, SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
break;
|
||||
case 2: /* switch 1 */
|
||||
if ((D_800EA104 == 0) && (D_800EA0EC[playerId] == 1)) {
|
||||
func_800C3448(0x100100FF);
|
||||
func_800C3448(0x110100FF);
|
||||
#ifdef VERSION_EU
|
||||
func_800C8EF8(0x000DU);
|
||||
play_sequence2(SEQ_EVENT_RACE_FINISH_FIRST);
|
||||
#else
|
||||
func_800CA414(0x000DU, 0x0017U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_FIRST, SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
#endif
|
||||
D_800EA104 = 1;
|
||||
} else if ((D_800EA104 == 1) && (D_800EA0EC[playerId] == 1)) {
|
||||
|
|
@ -2505,7 +2513,7 @@ void func_800C76C0(u8 playerId) {
|
|||
#endif
|
||||
{
|
||||
D_800EA104 = 0;
|
||||
func_800CA414(0x000EU, 0x0017U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_OTHER, SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
}
|
||||
D_800EA104 = 2;
|
||||
}
|
||||
|
|
@ -2514,12 +2522,12 @@ void func_800C76C0(u8 playerId) {
|
|||
if ((D_800EA104 == 0) && (D_800EA0EC[playerId] == 1)) {
|
||||
func_800C3448(0x100100FF);
|
||||
func_800C3448(0x110100FF);
|
||||
func_800C8EF8(0x000DU);
|
||||
play_sequence2(SEQ_EVENT_RACE_FINISH_FIRST);
|
||||
D_800EA104 = 1;
|
||||
} else if ((D_800EA104 == 1) && (D_800EA0EC[playerId] == 1)) {
|
||||
if (func_800C3508(1) != 0x000D) {
|
||||
D_800EA104 = 0;
|
||||
func_800C8EF8(0x000EU);
|
||||
play_sequence2(SEQ_EVENT_RACE_FINISH_OTHER);
|
||||
}
|
||||
D_800EA104 = 2;
|
||||
} else if ((D_800EA104 == 2) && (D_800EA0EC[playerId] == 1)) {
|
||||
|
|
@ -2529,7 +2537,7 @@ void func_800C76C0(u8 playerId) {
|
|||
#endif
|
||||
{
|
||||
D_800EA104 = 0;
|
||||
func_800CA414(0x000EU, 0x0017U);
|
||||
play_sequences(SEQ_EVENT_RACE_FINISH_OTHER, SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
}
|
||||
D_800EA104 = 3;
|
||||
}
|
||||
|
|
@ -2543,7 +2551,7 @@ void func_800C76C0(u8 playerId) {
|
|||
func_800C3448(0x110100FF);
|
||||
func_800C5278(5U);
|
||||
func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0xF9, 0x26));
|
||||
func_800C8EF8(0x0017U);
|
||||
play_sequence2(SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
D_800EA0EC[playerId] = 2;
|
||||
func_800C90F4(playerId, (gPlayers[gPlayerWinningIndex].characterId * 0x10) +
|
||||
SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0D));
|
||||
|
|
@ -2552,7 +2560,7 @@ void func_800C76C0(u8 playerId) {
|
|||
if ((D_800EA0EC[0] == 1) && (D_800EA0EC[1] == 1) && (D_800EA0EC[2] == 1)) {
|
||||
func_800C5278(5U);
|
||||
func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0x80, 0x26));
|
||||
func_800C8EF8(0x0017U);
|
||||
play_sequence2(SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
D_800EA0EC[playerId] = 2;
|
||||
func_800C90F4(playerId, (gPlayers[gPlayerWinningIndex].characterId * 0x10) +
|
||||
SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0D));
|
||||
|
|
@ -2563,7 +2571,7 @@ void func_800C76C0(u8 playerId) {
|
|||
(D_800EA0EC[3] == 1)) {
|
||||
func_800C5278(5U);
|
||||
func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0x80, 0x26));
|
||||
func_800C8EF8(0x0017U);
|
||||
play_sequence2(SEQ_MENU_RESULTS_SCREEN_WIN_VS);
|
||||
D_800EA0EC[playerId] = 2;
|
||||
func_800C90F4(playerId, (gPlayers[gPlayerWinningIndex].characterId * 0x10) +
|
||||
SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0D));
|
||||
|
|
@ -2880,14 +2888,14 @@ void play_sound2(s32 soundBits) {
|
|||
play_sound(soundBits, &D_800EA1C8, 4, &D_800EA1D4, &D_800EA1D4, &D_800EA1DC);
|
||||
}
|
||||
|
||||
void func_800C8EAC(u16 arg0) {
|
||||
func_800C3448(arg0 | 0x10000);
|
||||
D_800EA15C = arg0;
|
||||
void play_sequence(u16 index) {
|
||||
func_800C3448(index | 0x0010000);
|
||||
D_800EA15C = index;
|
||||
}
|
||||
|
||||
void func_800C8EF8(u16 arg0) {
|
||||
func_800C3448(arg0 | 0x1010000);
|
||||
D_800EA160 = arg0;
|
||||
void play_sequence2(u16 index) {
|
||||
func_800C3448(index | 0x1010000);
|
||||
D_800EA160 = index;
|
||||
}
|
||||
|
||||
void func_800C8F44(u8 arg0) {
|
||||
|
|
@ -3309,12 +3317,12 @@ void func_800CA388(u8 arg0) {
|
|||
fade_channel_volume_scale(5, 0, arg0);
|
||||
}
|
||||
|
||||
void func_800CA414(u16 arg0, u16 arg1) {
|
||||
void play_sequences(u16 first, u16 second) {
|
||||
if (D_800EA104 == 0) {
|
||||
func_800C3448(func_800C3508(0) | 0x30000000);
|
||||
func_800C35E8(0);
|
||||
func_800C3448(arg1 | 0xC1510000);
|
||||
func_800C3448(arg0 | 0x1000000);
|
||||
func_800C3448(second | 0xC1510000);
|
||||
func_800C3448(first | 0x01000000);
|
||||
}
|
||||
D_800EA104 = 1;
|
||||
}
|
||||
|
|
@ -3326,12 +3334,12 @@ void func_800CA49C(u8 playerIndex) {
|
|||
} else if (D_800EA164 != 0) {
|
||||
func_800C3448(0x100100FF); // 0x19000000
|
||||
func_800C3448(0x110100FF);
|
||||
func_800C8EF8(0xC);
|
||||
play_sequence2(SEQ_EVENT_RACE_FINAL_LAP);
|
||||
func_800C3448(0xC1510011);
|
||||
} else {
|
||||
func_800C3448(0x100100FF); // 0x19000000
|
||||
func_800C3448(0x110100FF);
|
||||
func_800C8EF8(0xC);
|
||||
play_sequence2(SEQ_EVENT_RACE_FINAL_LAP);
|
||||
func_800C3448(D_800EA15C | 0xC1500000);
|
||||
func_800C3448(0xC130017D);
|
||||
}
|
||||
|
|
@ -3355,11 +3363,11 @@ void func_800CA59C(u8 playerId) {
|
|||
func_800C3448(0xC1F00000);
|
||||
func_800C3448(0xC1510011);
|
||||
} else {
|
||||
func_800C8EF8(0x0011U);
|
||||
play_sequence2(SEQ_EVENT_RACE_POWERUP_STAR);
|
||||
}
|
||||
} else {
|
||||
if (1) {} // ?
|
||||
func_800C8EF8(0x0011U);
|
||||
play_sequence2(SEQ_EVENT_RACE_POWERUP_STAR);
|
||||
}
|
||||
}
|
||||
D_800EA10C[playerId] = 1;
|
||||
|
|
@ -3382,7 +3390,7 @@ void func_800CA730(u8 playerIndex) {
|
|||
if (D_8018FC08 != 0) {
|
||||
if (((u32) (gSequencePlayers[1].enabled)) == 0) {
|
||||
func_800C3608(1, 5);
|
||||
func_800C8EAC(D_800EA15C);
|
||||
play_sequence(D_800EA15C);
|
||||
func_800C3448(0xB001307DU);
|
||||
} else if ((func_800C3508(1) == 0xC) || (func_800C357C(0x0101000C) == 0)) {
|
||||
func_800C3448(0xC1F00000U);
|
||||
|
|
@ -3390,12 +3398,12 @@ void func_800CA730(u8 playerIndex) {
|
|||
func_800C3448(0xC130017DU);
|
||||
} else {
|
||||
func_800C3448(0x110100FFU);
|
||||
func_800C8EAC(D_800EA15C);
|
||||
play_sequence(D_800EA15C);
|
||||
func_800C3448(0xB001307DU);
|
||||
}
|
||||
} else {
|
||||
func_800C3448(0x110100FFU);
|
||||
func_800C8EAC(D_800EA15C);
|
||||
play_sequence(D_800EA15C);
|
||||
}
|
||||
}
|
||||
D_800EA164 = 0;
|
||||
|
|
@ -3556,41 +3564,54 @@ void func_800CB134() {
|
|||
D_800EA174 = 1;
|
||||
}
|
||||
|
||||
void func_800CB14C() {
|
||||
/*
|
||||
Play the entire "losing" sequence for the podium ceremony.
|
||||
|
||||
Increments a timer value by one per frame in order to tell which part of the sequence to play at which point.
|
||||
*/
|
||||
void begin_losing_ceremony_sequence() {
|
||||
if (D_800EA174 != 0) {
|
||||
D_800EA174++;
|
||||
|
||||
if (D_800EA174 == 3) {
|
||||
func_800C8EAC(0x001AU);
|
||||
play_sequence(SEQ_EVENT_CEREMONY_PRESENTATION_PART1); // Begin with Part 1 of the ceremony presentation music --- "Everything seems normal..."
|
||||
func_800C3448(0x4000007F);
|
||||
}
|
||||
if (D_800EA174 == 0x012C) {
|
||||
func_800C8EAC(0x001BU);
|
||||
|
||||
if (D_800EA174 == 300) {
|
||||
play_sequence(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN); // Follow up with Part 2 of the winning ceremony presentation music --- "Looks like I won...?"
|
||||
func_800C3448(0x4000007F);
|
||||
func_800C8EF8(0x001DU);
|
||||
play_sequence2(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_LOSE); // Once it ends, begin the LOSING ceremony presentation music, which has a few notes changed to be off-tune --- "Uh oh..."
|
||||
func_800C3448(0x41000000);
|
||||
}
|
||||
if (D_800EA174 == 0x0230) {
|
||||
|
||||
if (D_800EA174 == 560) { // (Somewhere in this code it slows down the music, changes the pitch of it and completely breaks the music)
|
||||
func_800C3448(0x40640000);
|
||||
func_800C3448(0xB0640073);
|
||||
func_800C3448(0x4150007F);
|
||||
func_800C3448(0xB1640073);
|
||||
}
|
||||
if (D_800EA174 == 0x02A8) {
|
||||
|
||||
if (D_800EA174 == 680) {
|
||||
func_800C3448(0x100100FF);
|
||||
}
|
||||
if (D_800EA174 == 0x041A) {
|
||||
|
||||
if (D_800EA174 == 1050) {
|
||||
func_800C3448(0xB1500001);
|
||||
func_800C3448(0x51500001);
|
||||
}
|
||||
if (D_800EA174 == 0x046A) {
|
||||
|
||||
if (D_800EA174 == 1130) {
|
||||
func_800C3448(0x41320000);
|
||||
}
|
||||
if (D_800EA174 == 0x04B0) {
|
||||
|
||||
if (D_800EA174 == 1200) { // (Player gets hit by the bomb-omb car; play the "explosion" sound effect and the "hurt" voice for the current character)
|
||||
func_800C3448(0x110100FF);
|
||||
}
|
||||
if (D_800EA174 == 0x04CE) {
|
||||
func_800C8EAC(0x0014U);
|
||||
func_800C3448(0x4000007F);
|
||||
|
||||
if (D_800EA174 == 1230) { // Once the music is completely broken by this point, play the "No Trophy For You!" sequence --- "Aw man, I lost... :("
|
||||
play_sequence(SEQ_EVENT_CEREMONY_TROPHY_LOSE);
|
||||
func_800C3448(0x4000007F); // (Play the "losing" voice for the current character, twice)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,8 +270,8 @@ void func_800C8AE4(void);
|
|||
void func_800C8C7C(u8);
|
||||
void func_800C8CCC(void);
|
||||
void play_sound2(s32);
|
||||
void func_800C8EAC(u16);
|
||||
void func_800C8EF8(u16);
|
||||
void play_sequence(u16);
|
||||
void play_sequence2(u16);
|
||||
void func_800C8F44(u8);
|
||||
void func_800C8F80(u8, u32);
|
||||
|
||||
|
|
@ -304,7 +304,7 @@ void func_800CA2E4(u8, s8);
|
|||
void func_800CA30C(u8);
|
||||
void func_800CA330(u8);
|
||||
void func_800CA388(u8);
|
||||
void func_800CA414(u16, u16);
|
||||
void play_sequences(u16, u16);
|
||||
void func_800CA49C(u8);
|
||||
void func_800CA59C(u8);
|
||||
void func_800CA984(u8);
|
||||
|
|
@ -317,7 +317,7 @@ void func_800CAEC4(u8, f32);
|
|||
void func_800CAFC0(u8);
|
||||
|
||||
void func_800CB134(void);
|
||||
void func_800CB14C(void);
|
||||
void begin_losing_ceremony_sequence(void);
|
||||
void func_800CB2C4(void);
|
||||
void func_800CBC24(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "menu_items.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "defines.h"
|
||||
#include "seq_ids.h"
|
||||
|
||||
f32 D_802856B0 = 98.0f;
|
||||
f32 D_802856B4 = 12.0f;
|
||||
|
|
@ -720,26 +721,25 @@ void func_80283BA4(UNUSED CinematicCamera* camera) {
|
|||
func_800CA0A0();
|
||||
}
|
||||
|
||||
void func_80283BF0(UNUSED CinematicCamera* camera) {
|
||||
func_800C8EF8(0x1A);
|
||||
void play_winning_ceremony_sequence_part1(UNUSED CinematicCamera* camera) {
|
||||
play_sequence2(SEQ_EVENT_CEREMONY_PRESENTATION_PART1);
|
||||
}
|
||||
|
||||
//
|
||||
void func_80283C14(UNUSED CinematicCamera* camera) {
|
||||
func_800C8EF8(0x1B);
|
||||
void play_winning_ceremony_sequence_part2(UNUSED CinematicCamera* camera) {
|
||||
play_sequence2(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN);
|
||||
}
|
||||
|
||||
void wrap_func_800CB134(UNUSED CinematicCamera* camera) {
|
||||
func_800CB134();
|
||||
}
|
||||
|
||||
void wrap_func_800CB14C(UNUSED CinematicCamera* camera) {
|
||||
func_800CB14C();
|
||||
void play_losing_ceremony_sequence(UNUSED CinematicCamera* camera) {
|
||||
begin_losing_ceremony_sequence();
|
||||
}
|
||||
|
||||
void func_80283C78(UNUSED CinematicCamera* arg0) {
|
||||
void play_winning_ceremony_credits_sequence(UNUSED CinematicCamera* arg0) {
|
||||
if (D_800DC5E4 == 0) {
|
||||
func_800C8EF8(0x1C);
|
||||
play_sequence2(SEQ_EVENT_CEREMONY_TROPHY_CREDITS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -920,7 +920,7 @@ void func_80283D2C(CinematicCamera* camera) {
|
|||
gOrderedSizeSlidingBorders = 120.0f;
|
||||
cutscene_event(func_80283CA8, camera, 0, 0);
|
||||
cutscene_event(wrap_func_800CA0CC, camera, 1, 1);
|
||||
cutscene_event(func_80283BF0, camera, 0, 0);
|
||||
cutscene_event(play_winning_ceremony_sequence_part1, camera, 0, 0);
|
||||
cutscene_event(play_sound_balloon_pop, camera, 45, 45);
|
||||
cutscene_event(play_sound_balloon_pop, camera, 65, 65);
|
||||
cutscene_event(play_sound_balloon_pop, camera, 70, 70);
|
||||
|
|
@ -972,7 +972,7 @@ void func_80284068(CinematicCamera* camera) {
|
|||
}
|
||||
|
||||
void func_802840C8(CinematicCamera* camera) {
|
||||
cutscene_event(func_80283C14, camera, 5, 5);
|
||||
cutscene_event(play_winning_ceremony_sequence_part2, camera, 5, 5);
|
||||
|
||||
switch (D_802876D8) {
|
||||
case 2:
|
||||
|
|
@ -1448,9 +1448,9 @@ void func_802847CC(CinematicCamera* camera) {
|
|||
cutscene_event(func_80283CD0, camera, 0, 0);
|
||||
cutscene_event(play_sound_welcome, camera, 8, 8);
|
||||
#ifdef VERSION_EU
|
||||
cutscene_event(func_80283C78, camera, 134, 134);
|
||||
cutscene_event(play_winning_ceremony_credits_sequence, camera, 134, 134);
|
||||
#else
|
||||
cutscene_event(func_80283C78, camera, 149, 149);
|
||||
cutscene_event(play_winning_ceremony_credits_sequence, camera, 149, 149);
|
||||
#endif
|
||||
cutscene_event(reset_spline_wrap, camera, 0, 0);
|
||||
switch (D_80286A04[D_800DC5E4].unk0) {
|
||||
|
|
@ -1520,7 +1520,7 @@ void play_cutscene(CinematicCamera* camera) {
|
|||
CUTSCENE(4, gCutScene)
|
||||
break;
|
||||
CUTSCENE(5, D_80285D58)
|
||||
wrap_func_800CB14C(camera);
|
||||
play_losing_ceremony_sequence(camera);
|
||||
break;
|
||||
CUTSCENE(6, D_80286B5C)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -164,11 +164,11 @@ void func_80283A54(CinematicCamera*);
|
|||
void func_80283A7C(CinematicCamera*);
|
||||
void func_80283B6C(CinematicCamera*);
|
||||
void func_80283BA4(CinematicCamera*);
|
||||
void func_80283BF0(CinematicCamera*);
|
||||
void func_80283C14(CinematicCamera*);
|
||||
void play_winning_ceremony_sequence_part1(CinematicCamera*);
|
||||
void play_winning_ceremony_sequence_part2(CinematicCamera*);
|
||||
void wrap_func_800CB134(CinematicCamera*);
|
||||
void wrap_func_800CB14C(CinematicCamera*);
|
||||
void func_80283C78(CinematicCamera*);
|
||||
void play_losing_ceremony_sequence(CinematicCamera*);
|
||||
void play_winning_ceremony_credits_sequence(CinematicCamera*);
|
||||
void func_80283CA8(CinematicCamera*);
|
||||
void func_80283CD0(CinematicCamera*);
|
||||
void play_sound_farewell(CinematicCamera*);
|
||||
|
|
|
|||
11
src/menus.c
11
src/menus.c
|
|
@ -19,6 +19,7 @@
|
|||
#include "save_data.h"
|
||||
#include <sounds.h>
|
||||
#include "spawn_players.h"
|
||||
#include "seq_ids.h"
|
||||
|
||||
#if ENABLE_DEBUG_MODE
|
||||
#define DEBUG_MODE_TOGGLE true
|
||||
|
|
@ -1840,7 +1841,7 @@ void load_menu_states(s32 menuSelection) {
|
|||
}
|
||||
gScreenModeListIndex = sScreenModeIdxFromPlayerMode[gPlayerCount - 1];
|
||||
func_800CA008(0, 0);
|
||||
func_800C8EAC(1);
|
||||
play_sequence(SEQ_MENU_TITLE_SCREEN);
|
||||
gCourseMapInit = 0;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1857,13 +1858,13 @@ void load_menu_states(s32 menuSelection) {
|
|||
func_800CB2C4();
|
||||
gGamestate = 0;
|
||||
gGamestateNext = 0;
|
||||
func_800C8EAC(2);
|
||||
play_sequence(SEQ_MENU_MAIN_MENU);
|
||||
}
|
||||
|
||||
switch (gMenuFadeType) {
|
||||
case MENU_FADE_TYPE_MAIN: {
|
||||
gMainMenuSelection = MAIN_MENU_PLAYER_SELECT;
|
||||
func_800C8EAC(2);
|
||||
play_sequence(SEQ_MENU_MAIN_MENU);
|
||||
gPlayerCount = 1;
|
||||
if (gScreenModeSelection >= NUM_SCREEN_MODES || gScreenModeSelection < 0) {
|
||||
gScreenModeSelection = SCREEN_MODE_1P;
|
||||
|
|
@ -1915,7 +1916,7 @@ void load_menu_states(s32 menuSelection) {
|
|||
func_800CB2C4();
|
||||
gGamestate = 0;
|
||||
gGamestateNext = 0;
|
||||
func_800C8EAC(2);
|
||||
play_sequence(SEQ_MENU_MAIN_MENU);
|
||||
for (i = 0; i < ARRAY_COUNT(gCharacterGridIsSelected); i++) {
|
||||
gCharacterGridIsSelected[i] = false;
|
||||
}
|
||||
|
|
@ -1953,7 +1954,7 @@ void load_menu_states(s32 menuSelection) {
|
|||
func_800CB2C4();
|
||||
gGamestate = 0;
|
||||
gGamestateNext = 0;
|
||||
func_800C8EAC(2);
|
||||
play_sequence(SEQ_MENU_MAIN_MENU);
|
||||
}
|
||||
play_sound2(SOUND_MENU_SELECT_MAP);
|
||||
sTempCupSelection = 0;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include "effects.h"
|
||||
#include "math.h"
|
||||
#include "menus.h"
|
||||
#include "seq_ids.h"
|
||||
|
||||
#pragma intrinsic(sqrtf)
|
||||
|
||||
|
|
@ -415,59 +416,76 @@ UNUSED void func_8028EC38(s32 arg0) {
|
|||
gDemoTimer = 5;
|
||||
}
|
||||
|
||||
void func_8028EC98(s32 arg0) {
|
||||
void play_music_for_current_track(s32 track) {
|
||||
|
||||
if (gScreenModeSelection == SCREEN_MODE_3P_4P_SPLITSCREEN) {
|
||||
return;
|
||||
return; // If 3P/4P splitscreen mode is currently on, don't play the music for the current track.
|
||||
}
|
||||
|
||||
func_800029B0();
|
||||
|
||||
switch (arg0) {
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
switch (track) {
|
||||
case COURSE_MARIO_RACEWAY: // Raceways, Wario Stadium
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
case COURSE_WARIO_STADIUM:
|
||||
func_800C8EAC(3);
|
||||
play_sequence(SEQ_TRACK_RACEWAY);
|
||||
break;
|
||||
case COURSE_TOADS_TURNPIKE:
|
||||
func_800C8EAC(21);
|
||||
|
||||
case COURSE_TOADS_TURNPIKE: // Toad's Turnpike
|
||||
play_sequence(SEQ_TRACK_TURNPIKE);
|
||||
break;
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
|
||||
case COURSE_YOSHI_VALLEY: // Yoshi Valley, Moo Moo Farm
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
func_800C8EAC(4);
|
||||
play_sequence(SEQ_TRACK_FARM);
|
||||
break;
|
||||
case COURSE_CHOCO_MOUNTAIN:
|
||||
|
||||
case COURSE_CHOCO_MOUNTAIN: // Choco Mountain, Various Battle Stages
|
||||
case COURSE_BLOCK_FORT:
|
||||
case COURSE_DOUBLE_DECK:
|
||||
func_800C8EAC(5);
|
||||
play_sequence(SEQ_TRACK_MOUNTAIN);
|
||||
break;
|
||||
case COURSE_KALAMARI_DESERT:
|
||||
func_800C8EAC(10);
|
||||
|
||||
case COURSE_KALAMARI_DESERT: // Kalimari Desert
|
||||
play_sequence(SEQ_TRACK_DESERT);
|
||||
break;
|
||||
case COURSE_KOOPA_BEACH:
|
||||
func_800C8EAC(6);
|
||||
|
||||
case COURSE_KOOPA_BEACH: // Koopa Troopa Beach
|
||||
play_sequence(SEQ_TRACK_BEACH);
|
||||
break;
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
func_800C8EAC(9);
|
||||
|
||||
case COURSE_BOWSER_CASTLE: // Bowser Castle
|
||||
play_sequence(SEQ_TRACK_CASTLE);
|
||||
break;
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
func_800C8EAC(7);
|
||||
|
||||
case COURSE_BANSHEE_BOARDWALK: // Banshee Boardwalk
|
||||
play_sequence(SEQ_TRACK_SCARY);
|
||||
break;
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
|
||||
case COURSE_FRAPPE_SNOWLAND: // Frappe Snowland, Sherbet Land
|
||||
case COURSE_SHERBET_LAND:
|
||||
func_800C8EAC(8);
|
||||
play_sequence(SEQ_TRACK_SNOW);
|
||||
break;
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
func_800C8EAC(18);
|
||||
|
||||
case COURSE_RAINBOW_ROAD: // Rainbow Road
|
||||
play_sequence(SEQ_TRACK_RAINBOW);
|
||||
break;
|
||||
case COURSE_DK_JUNGLE:
|
||||
func_800C8EAC(19);
|
||||
|
||||
case COURSE_DK_JUNGLE: // DK's Jungle Parkway
|
||||
play_sequence(SEQ_TRACK_JUNGLE);
|
||||
break;
|
||||
case COURSE_SKYSCRAPER:
|
||||
|
||||
case COURSE_SKYSCRAPER: // Other Battle Stages
|
||||
case COURSE_BIG_DONUT:
|
||||
func_800C8EAC(25);
|
||||
play_sequence(SEQ_TRACK_BATTLE);
|
||||
break;
|
||||
|
||||
#ifdef AVOID_UB
|
||||
default: //! @BUG: No default case. Enable AVOID_UB for custom tracks.
|
||||
play_sequence(SEQ_TRACK_RACEWAY);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -475,8 +493,8 @@ void start_race(void) {
|
|||
s32 i;
|
||||
|
||||
D_8015011E = -1;
|
||||
if (!gDemoMode) {
|
||||
func_8028EC98(gCurrentCourseId);
|
||||
if (!gDemoMode) { // If we're not in the title screen demo, play the music for the current track.
|
||||
play_music_for_current_track(gCurrentCourseId);
|
||||
}
|
||||
|
||||
if (D_800DC510 == 2) {
|
||||
|
|
@ -898,13 +916,13 @@ void func_8028FCBC(void) {
|
|||
}
|
||||
switch (D_800DC510) {
|
||||
case 0:
|
||||
if (!gDemoMode) {
|
||||
if (!gDemoMode) { // If we're not in the demo mode, play the starting fanfare for the current mode (Grand Prix / Time Trials / VS / Battle)
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
func_800C8EF8(11);
|
||||
play_sequence2(SEQ_EVENT_RACE_STARTING);
|
||||
play_sound2(SOUND_ACTION_REV_ENGINE);
|
||||
play_sound2(SOUND_ACTION_REV_ENGINE_2);
|
||||
} else {
|
||||
func_800C8EF8(22);
|
||||
play_sequence2(SEQ_EVENT_RACE_STARTING_VS);
|
||||
}
|
||||
}
|
||||
func_80002DAC();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ void func_8028E3A0(void);
|
|||
void func_8028E438(void);
|
||||
void func_8028E678(void);
|
||||
void func_8028EC38(s32);
|
||||
void func_8028EC98(s32);
|
||||
void play_music_for_current_track(s32);
|
||||
void start_race(void);
|
||||
f32 func_8028EE8C(s32);
|
||||
void func_8028EEF0(s32);
|
||||
|
|
|
|||
Loading…
Reference in New Issue