mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
KYRA: fixed pc98 intro sfx (regression)
svn-id: r46185
This commit is contained in:
parent
67a96069a4
commit
8b0f3ee4b5
@ -198,7 +198,7 @@ Common::Error KyraEngine_LoK::init() {
|
||||
error("Couldn't init sound");
|
||||
|
||||
if (_flags.platform == Common::kPlatformPC98)
|
||||
_sound->loadSoundFile("introsfx.98");
|
||||
_sound->loadSoundFile(k1PC98IntroSfx);
|
||||
else
|
||||
_sound->loadSoundFile(0);
|
||||
|
||||
|
@ -170,7 +170,7 @@ public:
|
||||
bool init();
|
||||
|
||||
void process() {}
|
||||
void loadSoundFile(uint file) {}
|
||||
void loadSoundFile(uint file);
|
||||
void loadSoundFile(Common::String file);
|
||||
|
||||
void playTrack(uint8 track);
|
||||
|
@ -4049,6 +4049,22 @@ bool SoundPC98::init() {
|
||||
return _driver->init();
|
||||
}
|
||||
|
||||
void SoundPC98::loadSoundFile(uint file) {
|
||||
delete[] _sfxTrackData;
|
||||
|
||||
int tmpSize;
|
||||
const uint8 *tmp = _vm->staticres()->loadRawData((int) file, tmpSize);
|
||||
|
||||
if (!tmp) {
|
||||
warning("Failed to load static sound data with id %d.", file);
|
||||
_sfxTrackData = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
_sfxTrackData = new uint8[tmpSize];
|
||||
memcpy(_sfxTrackData, tmp, tmpSize);
|
||||
}
|
||||
|
||||
void SoundPC98::loadSoundFile(Common::String file) {
|
||||
delete[] _sfxTrackData;
|
||||
_sfxTrackData = _vm->resource()->fileData(file.c_str(), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user