- KYRA: FM-Towns/PC-98 Audio: fixed several bugs and got rid of some floating point arithmetic (or at least replaced some doubles with floats)

- Improved support for PC-98 music: HOF tracks seem to be fine, KYRA should be okay, too (I can't compare with an emulator since I am missing the floppy boot disk with the executable)
- There are still tempo issues. Some tracks play way too slow, others way too fast
- PC-98 sound effects in Kyra 1 don't work (I would need the floppy disk with the executable for that)

svn-id: r33938
This commit is contained in:
Florian Kagerer
2008-08-16 12:38:37 +00:00
parent 49aff727e2
commit 807bfe5079
4 changed files with 1072 additions and 370 deletions
+9 -3
View File
@@ -306,8 +306,10 @@ int KyraEngine_HoF::go() {
_res->loadFileList(_ingamePakList, _ingamePakListSize);
}
if (_flags.platform == Common::kPlatformPC98)
if (_flags.platform == Common::kPlatformPC98) {
_res->loadPakFile("AUDIO.PAK");
_sound->loadSoundFile("sound.dat");
}
}
_menuDirectlyToLoad = (_menuChoice == 3) ? true : false;
@@ -1578,10 +1580,14 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
if (vocIndex != -1)
_sound->voicePlay(_ingameSoundList[vocIndex], true);
else if (_flags.platform != Common::kPlatformFMTowns)
else if (_flags.platform == Common::kPlatformPC)
KyraEngine_v1::snd_playSoundEffect(track);
// TODO ?? Maybe there is a way to let users select whether they want
// voc, midi or adl sfx (even though it makes no sense to choose anything but voc).
KyraEngine_v1::snd_playSoundEffect(track);
// The PC-98 version has support for non-pcm sound effects, but only for tracks
// which also have voc files. The syntax would be:
// KyraEngine_v1::snd_playSoundEffect(vocIndex);
}
#pragma mark -
+3
View File
@@ -2830,6 +2830,9 @@ void KyraEngine_HoF::seq_init() {
_res->unloadAllPakFiles();
_res->loadPakFile(StaticResource::staticDataFilename());
_res->loadFileList(_sequencePakList, _sequencePakListSize);
if (_flags.platform == Common::kPlatformPC98)
_sound->loadSoundFile("sound.dat");
int numShp = -1;
+3 -2
View File
@@ -429,7 +429,7 @@ public:
MidiChannel *allocateChannel() { return 0; }
MidiChannel *getPercussionChannel() { return 0; }
static float semitoneAndSampleRate_to_sampleStep(int8 semiTone, int8 semiToneRootkey,
static float calculatePhaseStep(int8 semiTone, int8 semiToneRootkey,
uint32 sampleRate, uint32 outputRate, int32 pitchWheel);
private:
@@ -492,7 +492,7 @@ public:
void process();
void loadSoundFile(uint file) {}
void loadSoundFile(Common::String) {}
void loadSoundFile(Common::String file);
void playTrack(uint8 track);
void haltTrack();
@@ -507,6 +507,7 @@ protected:
bool _useFmSfx;
uint8 *_musicTrackData;
uint8 *_sfxTrackData;
TownsPC98_OpnDriver *_driver;
};
+1057 -365
View File
File diff suppressed because it is too large Load Diff