mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Fix crash when playing LoL demo.
svn-id: r40780
This commit is contained in:
parent
230277739c
commit
f7b1aa2a8e
@ -1761,6 +1761,35 @@ void KyraEngine_MR::initStaticResource() {
|
||||
#ifdef ENABLE_LOL
|
||||
// TODO: move this to lol.cpp maybe?
|
||||
void LoLEngine::initStaticResource() {
|
||||
// assign music data
|
||||
static const char *pcMusicFileListIntro[] = { "LOREINTR" };
|
||||
static const char *pcMusicFileListFinale[] = { "LOREFINL" };
|
||||
static const char *pcMusicFileListIngame[] = { "LORE%02d%c" };
|
||||
|
||||
static const char *pc98MusicFileListIntro[] = { 0, "lore84.86", "lore82.86", 0, 0, 0, "lore83.86", "lore81.86" };
|
||||
static const char *pc98MusicFileListFinale[] = { "lore%02d.86" };
|
||||
static const char *pc98MusicFileListIngame[] = { "lore%02d.86" };
|
||||
|
||||
memset(_soundData, 0, sizeof(_soundData));
|
||||
if (_flags.platform == Common::kPlatformPC) {
|
||||
_soundData[0].fileList = pcMusicFileListIntro;
|
||||
_soundData[0].fileListLen = ARRAYSIZE(pcMusicFileListIntro);
|
||||
_soundData[1].fileList = pcMusicFileListIngame;
|
||||
_soundData[1].fileListLen = ARRAYSIZE(pcMusicFileListIngame);
|
||||
_soundData[2].fileList = pcMusicFileListFinale;
|
||||
_soundData[2].fileListLen = ARRAYSIZE(pcMusicFileListFinale);
|
||||
} else if (_flags.platform == Common::kPlatformPC98) {
|
||||
_soundData[0].fileList = pc98MusicFileListIntro;
|
||||
_soundData[0].fileListLen = ARRAYSIZE(pc98MusicFileListIntro);
|
||||
_soundData[1].fileList = pc98MusicFileListIngame;
|
||||
_soundData[1].fileListLen = ARRAYSIZE(pc98MusicFileListIngame);
|
||||
_soundData[2].fileList = pc98MusicFileListFinale;
|
||||
_soundData[2].fileListLen = ARRAYSIZE(pc98MusicFileListFinale);
|
||||
}
|
||||
|
||||
if (_flags.isDemo)
|
||||
return;
|
||||
|
||||
_charDefaults = _staticres->loadCharData(kLolCharacterDefs, _charDefaultsSize);
|
||||
_ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLolIngameSfxIndex, _ingameSoundIndexSize);
|
||||
_musicTrackMap = _staticres->loadRawData(kLolMusicTrackMap, _musicTrackMapSize);
|
||||
@ -1869,32 +1898,6 @@ void LoLEngine::initStaticResource() {
|
||||
}
|
||||
_staticres->unloadId(lolLightningDefs);
|
||||
|
||||
// assign music data
|
||||
static const char *pcMusicFileListIntro[] = { "LOREINTR" };
|
||||
static const char *pcMusicFileListFinale[] = { "LOREFINL" };
|
||||
static const char *pcMusicFileListIngame[] = { "LORE%02d%c" };
|
||||
|
||||
static const char *pc98MusicFileListIntro[] = { 0, "lore84.86", "lore82.86", 0, 0, 0, "lore83.86", "lore81.86" };
|
||||
static const char *pc98MusicFileListFinale[] = { "lore%02d.86" };
|
||||
static const char *pc98MusicFileListIngame[] = { "lore%02d.86" };
|
||||
|
||||
memset(_soundData, 0, sizeof(_soundData));
|
||||
if (_flags.platform == Common::kPlatformPC) {
|
||||
_soundData[0].fileList = pcMusicFileListIntro;
|
||||
_soundData[0].fileListLen = ARRAYSIZE(pcMusicFileListIntro);
|
||||
_soundData[1].fileList = pcMusicFileListIngame;
|
||||
_soundData[1].fileListLen = ARRAYSIZE(pcMusicFileListIngame);
|
||||
_soundData[2].fileList = pcMusicFileListFinale;
|
||||
_soundData[2].fileListLen = ARRAYSIZE(pcMusicFileListFinale);
|
||||
} else if (_flags.platform == Common::kPlatformPC98) {
|
||||
_soundData[0].fileList = pc98MusicFileListIntro;
|
||||
_soundData[0].fileListLen = ARRAYSIZE(pc98MusicFileListIntro);
|
||||
_soundData[1].fileList = pc98MusicFileListIngame;
|
||||
_soundData[1].fileListLen = ARRAYSIZE(pc98MusicFileListIngame);
|
||||
_soundData[2].fileList = pc98MusicFileListFinale;
|
||||
_soundData[2].fileListLen = ARRAYSIZE(pc98MusicFileListFinale);
|
||||
}
|
||||
|
||||
_buttonCallbacks.clear();
|
||||
#define cb(x) _buttonCallbacks.push_back(BUTTON_FUNCTOR(LoLEngine, this, &LoLEngine::x))
|
||||
// 0x00
|
||||
|
Loading…
x
Reference in New Issue
Block a user