You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Mario Gaming branded crash screen
This commit is contained in:
@@ -57,11 +57,6 @@ struct SoundCharacteristics {
|
||||
// Also the number of frames a discrete sound can be in the WAITING state before being deleted
|
||||
#define SOUND_MAX_FRESHNESS 10
|
||||
|
||||
struct SequenceQueueItem {
|
||||
u8 seqId;
|
||||
u8 priority;
|
||||
}; // size = 0x2
|
||||
|
||||
// data
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
// moved to bss in data.c
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
#define SEQ_PLAYER_ENV 1 // Misc music like the puzzle jingle
|
||||
#define SEQ_PLAYER_SFX 2 // Sound effects
|
||||
|
||||
struct SequenceQueueItem {
|
||||
u8 seqId;
|
||||
u8 priority;
|
||||
}; // size = 0x2
|
||||
|
||||
extern s32 gAudioErrorFlags;
|
||||
extern f32 gGlobalSoundSource[3];
|
||||
|
||||
|
||||
@@ -1073,9 +1073,6 @@ void wait_for_audio_frames(s32 frames) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#define VERSION_EU
|
||||
|
||||
u8 sAudioFirstBoot = 0;
|
||||
//Separate the reverb settings into their own func. Bit unstable currently, so still only runs at boot.
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
|
||||
@@ -299,8 +299,6 @@ u8 audioString1[] = "pitch %x: delaybytes %d : olddelay %d\n";
|
||||
u8 audioString2[] = "cont %x: delaybytes %d : olddelay %d\n";
|
||||
#endif
|
||||
|
||||
#define VERSION_EU
|
||||
|
||||
#ifdef VERSION_EU
|
||||
// Equivalent functionality as the US/JP version,
|
||||
// just that the reverb structure is chosen from an array with index
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "buffers/framebuffers.h"
|
||||
#include "types.h"
|
||||
#include "puppyprint.h"
|
||||
#include "audio/external.h"
|
||||
|
||||
#include "sm64.h"
|
||||
|
||||
@@ -188,7 +189,7 @@ void draw_crash_screen(OSThread *thread) {
|
||||
}
|
||||
|
||||
osWritebackDCacheAll();
|
||||
crash_screen_sleep(2000);
|
||||
crash_screen_sleep(500);
|
||||
crash_screen_draw_rect(25, 20, 270, 25);
|
||||
crash_screen_print(30, 25, "THREAD:%d (%s)", thread->id, gCauseDesc[cause]);
|
||||
#if !PUPPYPRINT_DEBUG
|
||||
@@ -238,10 +239,12 @@ void draw_crash_screen(OSThread *thread) {
|
||||
crash_screen_print_float_reg(30, 220, 30, &tc->fp30.f.f_even);
|
||||
#else
|
||||
s32 i;
|
||||
#define LINE_HEIGHT 60 + ((LOG_BUFFER_SIZE-1)*10)
|
||||
for (i = 0; i < LOG_BUFFER_SIZE; i++)
|
||||
{
|
||||
crash_screen_print(30, 50+(10*i), consoleLogTable[i]);
|
||||
crash_screen_print(30, (LINE_HEIGHT)-(i*10), consoleLogTable[i]);
|
||||
}
|
||||
#undef LINE_HEIGHT
|
||||
#endif
|
||||
osWritebackDCacheAll();
|
||||
osViBlack(FALSE);
|
||||
@@ -263,6 +266,9 @@ OSThread *get_crashed_thread(void) {
|
||||
}
|
||||
|
||||
extern u16 sRenderedFramebuffer;
|
||||
extern void audio_signal_game_loop_tick(void);
|
||||
extern void stop_sounds_in_continuous_banks(void);
|
||||
extern struct SequenceQueueItem sBackgroundMusicQueue[6];
|
||||
|
||||
void thread2_crash_screen(UNUSED void *arg) {
|
||||
OSMesg mesg;
|
||||
@@ -275,7 +281,13 @@ void thread2_crash_screen(UNUSED void *arg) {
|
||||
thread = get_crashed_thread();
|
||||
gCrashScreen.framebuffer = (u16 *) gFrameBuffers[sRenderedFramebuffer];
|
||||
} while (thread == NULL);
|
||||
gCrashScreen.thread.priority = 15;
|
||||
stop_sounds_in_continuous_banks();
|
||||
stop_background_music(sBackgroundMusicQueue[0].seqId);
|
||||
audio_signal_game_loop_tick();
|
||||
draw_crash_screen(thread);
|
||||
play_sound(SOUND_MARIO_WAAAOOOW, gGlobalSoundSource);
|
||||
audio_signal_game_loop_tick();
|
||||
for (;;) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,7 +795,8 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
|
||||
if (gPlayer1Controller->buttonPressed & L_TRIG)
|
||||
{
|
||||
set_background_music(SEQ_LEVEL_SLIDE, SEQUENCE_ARGS(0xFF, SEQ_LEVEL_SLIDE), 30);
|
||||
*(volatile int*) 0 = 0;
|
||||
//set_background_music(SEQ_LEVEL_SLIDE, SEQUENCE_ARGS(0xFF, SEQ_LEVEL_SLIDE), 30);
|
||||
}
|
||||
if (gPlayer1Controller->buttonPressed & R_TRIG)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user