mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-03-12 02:10:11 +03:00
Probably fixed interpolation on linux, and EU crashes
This commit is contained in:
parent
d824ec401b
commit
228bbdc99e
@ -816,21 +816,9 @@ void AudioLoad_Init(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
s32 numFonts;
|
s32 numFonts;
|
||||||
s32 dwordsLeft;
|
|
||||||
u64* clearContext;
|
|
||||||
void* ramAddr;
|
void* ramAddr;
|
||||||
|
|
||||||
gAudioResetTimer = 0;
|
gAudioResetTimer = 0;
|
||||||
|
|
||||||
for (i = 0; i < gAudioHeapSize / 8; i++) {
|
|
||||||
*((u64*) gAudioHeap + i) = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
clearContext = gAudioContextStart;
|
|
||||||
dwordsLeft = ((uintptr_t) gAudioContextEnd - (uintptr_t) gAudioContextStart) / 8;
|
|
||||||
for (; dwordsLeft >= 0; dwordsLeft--) {
|
|
||||||
*clearContext++ = 0;
|
|
||||||
}
|
|
||||||
// TODO: osTVType should be unnecessary
|
// TODO: osTVType should be unnecessary
|
||||||
gMaxTempoTvTypeFactors = 16.713f;
|
gMaxTempoTvTypeFactors = 16.713f;
|
||||||
gRefreshRate = 60;
|
gRefreshRate = 60;
|
||||||
@ -874,11 +862,6 @@ void AudioLoad_Init(void) {
|
|||||||
gSampleBankTable = SEGMENTED_TO_VIRTUAL(gSampleBankTableInit);
|
gSampleBankTable = SEGMENTED_TO_VIRTUAL(gSampleBankTableInit);
|
||||||
gSeqFontTable = SEGMENTED_TO_VIRTUAL(gSeqFontTableInit);
|
gSeqFontTable = SEGMENTED_TO_VIRTUAL(gSeqFontTableInit);
|
||||||
gNumSequences = gSequenceTable->base.numEntries;
|
gNumSequences = gSequenceTable->base.numEntries;
|
||||||
|
|
||||||
// AudioLoad_InitTable(gSequenceTable, LOAD_ASSET(gAudioSeq), gSequenceMedium);
|
|
||||||
// AudioLoad_InitTable(gSoundFontTable, LOAD_ASSET(gAudioBank), gSoundFontMedium);
|
|
||||||
// AudioLoad_InitTable(gSampleBankTable, LOAD_ASSET(gAudioTable), gSampleBankMedium);
|
|
||||||
|
|
||||||
numFonts = gSoundFontTable->base.numEntries;
|
numFonts = gSoundFontTable->base.numEntries;
|
||||||
|
|
||||||
gSoundFontList = AudioHeap_Alloc(&gInitPool, numFonts * sizeof(SoundFont));
|
gSoundFontList = AudioHeap_Alloc(&gInitPool, numFonts * sizeof(SoundFont));
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
#include "sf64audio_provisional.h"
|
#include "sf64audio_provisional.h"
|
||||||
#include "endianness.h"
|
#include "endianness.h"
|
||||||
|
#include "port/Engine.h"
|
||||||
|
|
||||||
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)
|
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)
|
||||||
#define PORTAMENTO_MODE(x) ((x).mode & ~0x80)
|
#define PORTAMENTO_MODE(x) ((x).mode & ~0x80)
|
||||||
@ -1280,6 +1281,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
seqPlayer->tempoAcc = (seqPlayer->tempoAcc - gMaxTempo) & 0xFFFF; // fake?
|
seqPlayer->tempoAcc = (seqPlayer->tempoAcc - gMaxTempo) & 0xFFFF; // fake?
|
||||||
|
bool euRunning = GameEngine_HasVersion(SF64_VER_EU);
|
||||||
|
|
||||||
if (seqPlayer->delay > 1) {
|
if (seqPlayer->delay > 1) {
|
||||||
seqPlayer->delay--;
|
seqPlayer->delay--;
|
||||||
@ -1287,6 +1289,9 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
|
|||||||
temp_s0 = &seqPlayer->scriptState;
|
temp_s0 = &seqPlayer->scriptState;
|
||||||
seqPlayer->recalculateVolume = true;
|
seqPlayer->recalculateVolume = true;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if(euRunning && temp_s0->pc == NULL){
|
||||||
|
break;
|
||||||
|
}
|
||||||
temp_s2 = AudioSeq_ScriptReadU8(temp_s0);
|
temp_s2 = AudioSeq_ScriptReadU8(temp_s0);
|
||||||
if (temp_s2 == 0xFF) {
|
if (temp_s2 == 0xFF) {
|
||||||
if (temp_s0->depth == 0) {
|
if (temp_s0->depth == 0) {
|
||||||
|
@ -62,7 +62,6 @@ GameEngine::GameEngine() {
|
|||||||
std::vector<std::string> archiveFiles;
|
std::vector<std::string> archiveFiles;
|
||||||
const std::string main_path = Ship::Context::GetPathRelativeToAppDirectory("sf64.o2r");
|
const std::string main_path = Ship::Context::GetPathRelativeToAppDirectory("sf64.o2r");
|
||||||
const std::string assets_path = Ship::Context::GetPathRelativeToAppDirectory("starship.o2r");
|
const std::string assets_path = Ship::Context::GetPathRelativeToAppDirectory("starship.o2r");
|
||||||
const std::string mod_path = Ship::Context::GetPathRelativeToAppDirectory("mods/sf64jp.o2r");
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
AllocConsole();
|
AllocConsole();
|
||||||
@ -86,8 +85,6 @@ GameEngine::GameEngine() {
|
|||||||
if (ShowYesNoBox("Extraction Complete", "ROM Extracted. Extract another?") == IDYES) {
|
if (ShowYesNoBox("Extraction Complete", "ROM Extracted. Extract another?") == IDYES) {
|
||||||
if(!GenAssetFile()){
|
if(!GenAssetFile()){
|
||||||
ShowMessage("Error", "An error occured, no O2R file was generated.");
|
ShowMessage("Error", "An error occured, no O2R file was generated.");
|
||||||
} else {
|
|
||||||
archiveFiles.push_back(mod_path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user