mirror of
https://github.com/HarbourMasters/Starship
synced 2026-07-07 06:14:52 -04:00
fix scene change code
This commit is contained in:
@@ -2824,7 +2824,8 @@ void Audio_StartReset(u8 oldSpecId) {
|
||||
} else {
|
||||
sAudioResetStatus = AUDIORESET_WAIT;
|
||||
}
|
||||
// LTODO: Workaround for the crash after quitting the Practice mode
|
||||
|
||||
// @port: Workaround for the hang after quitting Training mode
|
||||
sAudioResetStatus = AUDIORESET_WAIT;
|
||||
|
||||
AUDIOCMD_GLOBAL_UNMUTE(true);
|
||||
|
||||
@@ -471,7 +471,7 @@ u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts) {
|
||||
|
||||
bool AudioThread_ResetComplete(void) {
|
||||
s32 pad;
|
||||
OSMesg sp18;
|
||||
OSMesg sp18 = { 0 };
|
||||
|
||||
if (!MQ_GET_MESG(gAudioResetQueue, &sp18)) {
|
||||
return false;
|
||||
|
||||
+18
-3
@@ -34,11 +34,26 @@ void Load_RomFile(void* vRomAddress, void* dest, ptrdiff_t size) {
|
||||
|
||||
u8 Load_SceneFiles(Scene* scene) {
|
||||
#if 1
|
||||
// TODO: BUG! sCurrentScene and scene never change so this will never be true.
|
||||
bool hasSceneChanged = memcmp(&sCurrentScene, scene, sizeof(Scene)) != 0;
|
||||
sCurrentScene = *scene;
|
||||
// @port:
|
||||
static void* sCurrentScenePtr = NULL;
|
||||
|
||||
bool hasSceneChanged = (uintptr_t) sCurrentScenePtr != (uintptr_t) scene;
|
||||
sCurrentScenePtr = scene;
|
||||
|
||||
if (sFillTimer != 0) {
|
||||
sFillTimer--;
|
||||
} else if (gStartNMI == 0) {
|
||||
Lib_FillScreen(false);
|
||||
}
|
||||
|
||||
if (hasSceneChanged) {
|
||||
printf("Scene Changed!\n");
|
||||
}
|
||||
|
||||
return hasSceneChanged;
|
||||
#else
|
||||
// Original code:
|
||||
|
||||
u8* ramPtr = SEGMENT_VRAM_START(ovl_i1);
|
||||
u8 segment;
|
||||
u8 changeScene = false;
|
||||
|
||||
@@ -1261,9 +1261,6 @@ s32 func_versus_800C1138(s32 max, s32 arg1) {
|
||||
void Versus_InitMatch(void) {
|
||||
s32 i;
|
||||
|
||||
// Until Load_SceneFiles gets fixed, this fixes most of the audio issues in versus
|
||||
AUDIO_SET_SPEC_ALT(SFXCHAN_3, AUDIOSPEC_16);
|
||||
|
||||
for (i = 0, sVsPlayerCount = 0; i < 4; i++) {
|
||||
if (!gPlayerInactive[i]) {
|
||||
sVsPlayerCount++;
|
||||
|
||||
Reference in New Issue
Block a user