mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Removed legacy audio mode and fixed ganon sound bug (#657)
This commit is contained in:
parent
eab3b5bd7f
commit
3aa93b9855
10 changed files with 141 additions and 2140 deletions
|
@ -3,7 +3,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
extern bool gUseLegacySD;
|
||||
extern char* sequenceMap[256];
|
||||
|
||||
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)
|
||||
|
@ -1062,18 +1061,14 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
|||
result = (u8)parameters[0];
|
||||
command = (u8)parameters[0];
|
||||
|
||||
if (seqPlayer->defaultFont != 0xFF) {
|
||||
if (gUseLegacySD) {
|
||||
offset = ((u16*)gAudioContext.sequenceFontTable)[seqPlayer->seqId];
|
||||
lowBits = gAudioContext.sequenceFontTable[offset];
|
||||
command = gAudioContext.sequenceFontTable[offset + lowBits - result];
|
||||
} else {
|
||||
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqPlayer->seqId]);
|
||||
command = sDat.fonts[sDat.numFonts - result - 1];
|
||||
}
|
||||
if (seqPlayer->defaultFont != 0xFF)
|
||||
{
|
||||
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqPlayer->seqId]);
|
||||
command = sDat.fonts[sDat.numFonts - result - 1];
|
||||
}
|
||||
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) {
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command))
|
||||
{
|
||||
channel->fontId = command;
|
||||
}
|
||||
|
||||
|
@ -1178,18 +1173,16 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
|||
result = (u8)parameters[0];
|
||||
command = (u8)parameters[0];
|
||||
|
||||
if (seqPlayer->defaultFont != 0xFF) {
|
||||
if (gUseLegacySD) {
|
||||
offset = ((u16*)gAudioContext.sequenceFontTable)[seqPlayer->seqId];
|
||||
lowBits = gAudioContext.sequenceFontTable[offset];
|
||||
command = gAudioContext.sequenceFontTable[offset + lowBits - result];
|
||||
} else {
|
||||
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqPlayer->seqId]);
|
||||
command = sDat.fonts[sDat.numFonts - result - 1];
|
||||
}
|
||||
if (seqPlayer->defaultFont != 0xFF)
|
||||
{
|
||||
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqPlayer->seqId]);
|
||||
int8_t idx = (sDat.numFonts - result - 1);
|
||||
|
||||
command = sDat.fonts[abs(idx)];
|
||||
}
|
||||
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) {
|
||||
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command))
|
||||
{
|
||||
channel->fontId = command;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue