diff options
| author | briaguya <briaguya@alice> | 2022-06-17 00:39:07 -0400 |
|---|---|---|
| committer | briaguya <briaguya@alice> | 2022-06-17 00:39:07 -0400 |
| commit | dd42cca2cf69f495b082c1efae05cb11aab3cbcd (patch) | |
| tree | a55684a0d899b440c8f196f5c9ed139bba6c84ae /soh/src/code | |
| parent | bb90be6748a3ab41dc111b734b904b1e69bd60f7 (diff) | |
| parent | 3e6307bf96ea9167057c484b79a4b738f11c3154 (diff) | |
Merge branch 'develop' into z64-devmerge
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/audio_load.c | 14 | ||||
| -rw-r--r-- | soh/src/code/audio_playback.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_player_lib.c | 3 |
3 files changed, 8 insertions, 11 deletions
diff --git a/soh/src/code/audio_load.c b/soh/src/code/audio_load.c index 59749dff5..e2633b883 100644 --- a/soh/src/code/audio_load.c +++ b/soh/src/code/audio_load.c @@ -585,6 +585,8 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) { AudioSeq_SequencePlayerDisable(seqPlayer); fontId = 0xFF; + index = ((u16*)gAudioContext.sequenceFontTable)[seqId]; + numFonts = gAudioContext.sequenceFontTable[index++]; if (gUseLegacySD) { index = ((u16*)gAudioContext.sequenceFontTable)[seqId]; @@ -917,7 +919,6 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo void** ptrs = (void**)mem; - #define BASE_OFFSET(x) (void*)((u32)(x) + (u32)(mem)) reloc2 = ptrs[0]; @@ -1495,6 +1496,7 @@ void AudioLoad_InitSlowLoads(void) { s32 AudioLoad_SlowLoadSample(s32 fontId, s32 instId, s8* isDone) { SoundFontSample* sample; AudioSlowLoad* slowLoad; + sample = AudioLoad_GetFontSample(fontId, instId); if (sample == NULL) { *isDone = 0; @@ -1654,15 +1656,12 @@ s32 AudioLoad_SlowLoadSeq(s32 seqId, u8* ramAddr, s8* isDone) { } seqId = AudioLoad_GetRealTableIndex(SEQUENCE_TABLE, seqId); - seqTable = AudioLoad_GetLoadTable(SEQUENCE_TABLE); - slowLoad = &gAudioContext.slowLoads[gAudioContext.slowLoadPos]; if (slowLoad->status == LOAD_STATUS_DONE) { slowLoad->status = LOAD_STATUS_WAITING; } - slowLoad->sample.sampleAddr = NULL; slowLoad->isDone = isDone; @@ -2075,7 +2074,7 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) { if (preload->isFree == false) { sample = preload->sample; - key = sample->sampleAddr + sample->size + sample->medium; + key = (u32)sample->sampleAddr + sample->size + sample->medium; if (key == preload->endAndMediumKey) { // Change storage for sample to the preloaded version. sample->sampleAddr = preload->ramAddr; @@ -2098,12 +2097,12 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) { sample = preload->sample; nChunks = (sample->size >> 12) + 1; - key = sample->sampleAddr + sample->size + sample->medium; + key = (u32)sample->sampleAddr + sample->size + sample->medium; if (key != preload->endAndMediumKey) { preload->isFree = true; gAudioContext.preloadSampleStackTop--; } else { - AudioLoad_StartAsyncLoad(sample->sampleAddr, preload->ramAddr, sample->size, sample->medium, + AudioLoad_StartAsyncLoad((u32)sample->sampleAddr, preload->ramAddr, sample->size, sample->medium, nChunks, &gAudioContext.preloadSampleQueue, preload->encodedInfo); break; } @@ -2251,7 +2250,6 @@ void AudioLoad_PreloadSamplesForFont(s32 fontId, s32 async, RelocInfo* relocInfo } sample = gAudioContext.usedSamples[i]; - if (sample->medium == MEDIUM_RAM) { continue; } diff --git a/soh/src/code/audio_playback.c b/soh/src/code/audio_playback.c index a0773a642..b9f868bd3 100644 --- a/soh/src/code/audio_playback.c +++ b/soh/src/code/audio_playback.c @@ -355,8 +355,6 @@ Instrument* Audio_GetInstrumentInner(s32 fontId, s32 instId) { return inst; } - - return inst; } diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index a729bebe9..d40aeab99 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -360,7 +360,8 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) { void Player_SetModelsForHoldingShield(Player* this) { if ((this->stateFlags1 & 0x400000) && ((this->itemActionParam < 0) || (this->itemActionParam == this->heldItemActionParam))) { - if (!Player_HoldsTwoHandedWeapon(this) && !Player_IsChildWithHylianShield(this)) { + if ((CVar_GetS32("gShieldTwoHanded", 0) && (this->heldItemActionParam != PLAYER_AP_STICK) || + !Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) { this->rightHandType = 10; this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge]; if (this->sheathType == 18) { |
