diff options
-rw-r--r-- | kyra/kyra.cpp | 215 | ||||
-rw-r--r-- | kyra/kyra.h | 16 | ||||
-rw-r--r-- | kyra/resource.cpp | 8 | ||||
-rw-r--r-- | kyra/screen.cpp | 2 | ||||
-rwxr-xr-x | kyra/seqplayer.cpp | 53 | ||||
-rwxr-xr-x | kyra/seqplayer.h | 6 | ||||
-rw-r--r-- | kyra/wsamovie.cpp | 2 |
7 files changed, 205 insertions, 97 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp index 1fe3036ebe..e66c4badc8 100644 --- a/kyra/kyra.cpp +++ b/kyra/kyra.cpp @@ -29,6 +29,7 @@ #include "common/config-manager.h" #include "common/file.h" #include "common/system.h" +#include "common/md5.h" #include "sound/mixer.h" #include "sound/mididrv.h" @@ -48,30 +49,63 @@ using namespace Kyra; +enum { + // We only compute MD5 of the first megabyte of our data files. + kMD5FileSizeLimit = 1024 * 1024 +}; + +// Kyra MD5 detection brutally ripped from the Gobliins engine. struct KyraGameSettings { const char *name; const char *description; + byte id; uint32 features; - const char *detectName; + const char *md5sum; + const char *checkFile; GameSettings toGameSettings() const { GameSettings dummy = { name, description, features }; return dummy; } }; -static const KyraGameSettings kyra_settings[] = { - { "kyra1", "Legend of Kyrandia (Floppy)", GF_FLOPPY | GF_KYRA1, "INTRO.SND" }, - { "kyra1cd", "Legend of Kyrandia (CD)", GF_TALKIE | GF_KYRA1, "CHAPTER1.VRM" }, - { "kyra1demo", "Legend of Kyrandia (Demo)", GF_DEMO | GF_FLOPPY | GF_KYRA1, "DEMO1.WSA" }, -// { "kyra2", "Hand of Fate (Floppy)", GF_FLOPPY | GF_KYRA2, 0 }, -// { "kyra2cd", "Hand of Fate (CD)", GF_TALKIE | GF_KYRA2, "AUDIO.PAK" }, -// { "kyra3", "Malcolm's Revenge", GF_TALKIE | GF_KYRA3, "K3INTRO0.VQA" }, - { 0, 0, 0, 0 } +static const KyraGameSettings kyra_games[] = { + { "kyra1", "Legend of Kyrandia (Floppy, English)", GI_KYRA1, GF_ENGLISH | GF_FLOPPY | GF_KYRA1, + "796e44863dd22fa635b042df1bf16673", "GEMCUT.EMC" }, + { "kyra1", "Legend of Kyrandia (Floppy, French)", GI_KYRA1, GF_FRENCH | GF_FLOPPY | GF_KYRA1, + "abf8eb360e79a6c2a837751fbd4d3d24", "GEMCUT.EMC" }, + { "kyra1", "Legend of Kyrandia (Floppy, German)", GI_KYRA1, GF_GERMAN | GF_FLOPPY | GF_KYRA1, + "6018e1dfeaca7fe83f8d0b00eb0dd049", "GEMCUT.EMC"}, + { "kyra1", "Legend of Kyrandia (CD, English)", GI_KYRA1, GF_ENGLISH | GF_TALKIE | GF_KYRA1, + "fac399fe62f98671e56a005c5e94e39f", "GEMCUT.PAK" }, + { "kyra1", "Legend of Kyrandia (CD, German)", GI_KYRA1, GF_GERMAN | GF_TALKIE | GF_KYRA1, + "230f54e6afc007ab4117159181a1c722", "GEMCUT.PAK" }, + { "kyra1", "Legend of Kyrandia (CD, French)", GI_KYRA1, GF_FRENCH | GF_TALKIE | GF_KYRA1, + "b037c41768b652a040360ffa3556fd2a", "GEMCUT.PAK" }, + { "kyra1", "Legend of Kyrandia (Demo)", GI_KYRA1, GF_DEMO | GF_KYRA1, + "fb722947d94897512b13b50cc84fd648", "DEMO1.WSA" }, + { 0, 0, 0, 0, 0, 0 } +}; + +// Keep list of different supported games +struct KyraGameList { + const char *name; + const char *description; + uint32 features; + GameSettings toGameSettings() const { + GameSettings dummy = { name, description, features }; + return dummy; + } +}; + +static const KyraGameList kyra_list[] = { + { "kyra1", "Legend of Kyrandia", GF_KYRA1 }, + { 0, 0, 0 } }; GameList Engine_KYRA_gameList() { GameList games; - const KyraGameSettings *g = kyra_settings; + const KyraGameList *g = kyra_list; + while (g->name) { games.push_back(g->toGameSettings()); g++; @@ -80,24 +114,49 @@ GameList Engine_KYRA_gameList() { } DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) { - const KyraGameSettings *game; DetectedGameList detectedGames; + const KyraGameSettings *g; + FSList::const_iterator file; - for (game = kyra_settings; game->name; ++game) { - if (game->detectName == NULL) + // Iterate over all files in the given directory + bool isFound = false; + for (file = fslist.begin(); file != fslist.end(); file++) { + if (file->isDirectory()) continue; - for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { - if (!file->isDirectory()) { - const char *name = file->displayName().c_str(); - if ((!scumm_stricmp(game->detectName, name))) { - detectedGames.push_back(game->toGameSettings()); - break; - } - } + for (g = kyra_games; g->name; g++) { + if (scumm_stricmp(file->displayName().c_str(), g->checkFile) == 0) + isFound = true; } + if (isFound) + break; } + if (file == fslist.end()) + return detectedGames; + + uint8 md5sum[16]; + char md5str[32 + 1]; + + if (Common::md5_file(file->path().c_str(), md5sum, NULL, kMD5FileSizeLimit)) { + for (int i = 0; i < 16; i++) { + sprintf(md5str + i * 2, "%02x", (int)md5sum[i]); + } + for (g = kyra_games; g->name; g++) { + if (strcmp(g->md5sum, (char *)md5str) == 0) { + detectedGames.push_back(g->toGameSettings()); + } + } + if (detectedGames.isEmpty()) { + printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); + + const KyraGameList *g1 = kyra_list; + while (g1->name) { + detectedGames.push_back(g1->toGameSettings()); + g1++; + } + } + } return detectedGames; } @@ -121,25 +180,43 @@ KyraEngine::KyraEngine(GameDetector *detector, OSystem *system) _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); - // gets the game - if (detector->_game.features & GF_KYRA1) { - if (detector->_game.features & GF_DEMO) { - _game = KYRA1DEMO; - } else if (detector->_game.features & GF_FLOPPY) { - _game = KYRA1; - } else { - _game = KYRA1CD; - } - } else if (detector->_game.features & GF_KYRA2) { - if (detector->_game.features & GF_FLOPPY) { - _game = KYRA2; - } else { - _game = KYRA2CD; + // Detect game features based on MD5. Again brutally ripped from Gobliins. + uint8 md5sum[16]; + char md5str[32 + 1]; + + const KyraGameSettings *g; + bool found = false; + + // TODO + // Fallback. Maybe we will be able to determine game type from game + // data contents + _features = GF_KYRA1; + + for (g = kyra_games; g->name; g++) { + if (!Common::File::exists(g->checkFile)) + continue; + + if (Common::md5_file(g->checkFile, md5sum, ConfMan.get("path").c_str(), kMD5FileSizeLimit)) { + for (int j = 0; j < 16; j++) { + sprintf(md5str + j*2, "%02x", (int)md5sum[j]); + } + } else + continue; + + if (strcmp(g->md5sum, (char *)md5str) == 0) { + _features = g->features; + _game = g->id; + + if (g->description) + g_system->setWindowCaption(g->description); + + found = true; + break; } - } else if (detector->_game.features & GF_KYRA3) { - _game = KYRA3; - } else { - error("unknown game"); + } + + if (!found) { + debug("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team", md5str); } } @@ -204,7 +281,7 @@ int KyraEngine::go() { _quitFlag = false; uint32 sz; - if (_game == KYRA1) { + if (_features & GF_FLOPPY) { _screen->loadFont(Screen::FID_6_FNT, _res->fileData("6.FNT", &sz)); } _screen->loadFont(Screen::FID_8_FNT, _res->fileData("8FAT.FNT", &sz)); @@ -212,7 +289,7 @@ int KyraEngine::go() { _abortIntroFlag = false; - if (_game == KYRA1DEMO) { + if (_features & GF_DEMO) { seq_demo(); } else { seq_intro(); @@ -321,11 +398,14 @@ void KyraEngine::loadRoom(uint16 roomID) { _screen->clearPage(10); // Loading GUI bitmap - if (_game == KYRA1CD) { + if (_features & GF_ENGLISH && _features & GF_TALKIE) loadBitmap("MAIN_ENG.CPS", 10, 10, 0); - } else { + else if(_features & GF_FRENCH) + loadBitmap("MAIN_FRE.CPS", 10, 10, 0); + else if(_features & GF_GERMAN) + loadBitmap("MAIN_GER.CPS", 10, 10, 0); + else loadBitmap("MAIN15.CPS", 10, 10, 0); - } // Loading main room background strncpy(buf, _rooms[roomID].filename, 8); @@ -368,7 +448,7 @@ void KyraEngine::loadPalette(const char *filename, uint8 *palData) { uint8 *srcData = _res->fileData(filename, &fileSize); if (palData && fileSize) { - debug(9, "Loading a palette of size %i from %s", fileSize, filename); + debug(9, "Loading a palette of size %i from '%s'", fileSize, filename); memcpy(palData, srcData, fileSize); } } @@ -663,12 +743,12 @@ void KyraEngine::seq_demo() { void KyraEngine::seq_intro() { debug(9, "KyraEngine::seq_intro()"); - if (_game == KYRA1CD) { + if (_features & GF_TALKIE) { _res->loadPakFile("INTRO.VRM"); } static const IntroProc introProcTable[] = { &KyraEngine::seq_introLogos, -// &KyraEngine::seq_introStory, + &KyraEngine::seq_introStory, &KyraEngine::seq_introMalcomTree, &KyraEngine::seq_introKallakWriting, &KyraEngine::seq_introKallakMalcom @@ -686,7 +766,7 @@ void KyraEngine::seq_intro() { waitTicks(30); _seq->setCopyViewOffs(false); _midi->stopMusic(); - if (_game == KYRA1CD) { + if (_features & GF_TALKIE) { _res->unloadPakFile("INTRO.VRM"); } } @@ -702,7 +782,7 @@ void KyraEngine::seq_introLogos() { _system->copyRectToScreen(_screen->getPagePtr(0), 320, 0, 0, 320, 200); _screen->fadeFromBlack(); - if (_game == KYRA1) { + if (_features & GF_FLOPPY) { if (_seq->playSequence(_seq_floppyData_WestwoodLogo, _skipIntroFlag)) { _screen->fadeToBlack(); _screen->clearPage(0); @@ -714,7 +794,7 @@ void KyraEngine::seq_introLogos() { _screen->clearPage(0); return; } - } else if (_game == KYRA1CD) { + } else if (_features & GF_TALKIE) { if (_seq->playSequence(_seq_cdromData_WestwoodLogo, _skipIntroFlag)) { _screen->fadeToBlack(); _screen->clearPage(0); @@ -750,27 +830,40 @@ void KyraEngine::seq_introLogos() { waitTicks(1); } while (y2 >= 64); - if (_game == KYRA1) { + if (_features & GF_FLOPPY) { _seq->playSequence(_seq_floppyData_Forest, true); - } else if (_game == KYRA1CD) { + } else if (_features & GF_TALKIE) { _seq->playSequence(_seq_cdromData_Forest, true); } } void KyraEngine::seq_introStory() { debug(9, "KyraEngine::seq_introStory()"); - loadBitmap("MAIN_ENG.CPS", 3, 3, 0); - _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0); - // XXX wait 360 ticks + // this is only needed for floppy versions + // since CD version has its own opcode for that + if (_features & GF_FLOPPY) { + _screen->clearPage(3); + _screen->clearPage(0); + if (_features & GF_ENGLISH) { + loadBitmap("TEXT_ENG.CPS", 3, 3, 0); + } else if (_features & GF_GERMAN) { + loadBitmap("TEXT_GER.CPS", 3, 3, 0); + } else if (_features & GF_FRENCH) { + loadBitmap("TEXT_FRE.CPS", 3, 3, 0); + } + _screen->copyRegion(0, 0, 0, 0, 320, 200, 3, 0); + _screen->updateScreen(); + waitTicks(360); + } } void KyraEngine::seq_introMalcomTree() { debug(9, "KyraEngine::seq_introMalcomTree()"); _screen->_curPage = 0; _screen->clearPage(3); - if (_game == KYRA1) { + if (_features & GF_FLOPPY) { _seq->playSequence(_seq_floppyData_MalcomTree, true); - } else if (_game == KYRA1CD) { + } else if (_features & GF_TALKIE) { _seq->playSequence(_seq_cdromData_MalcomTree, true); } } @@ -781,9 +874,9 @@ void KyraEngine::seq_introKallakWriting() { _screen->setAnimBlockPtr(5060); _screen->_charWidth = -2; _screen->clearPage(3); - if (_game == KYRA1) { + if (_features & GF_FLOPPY) { _seq->playSequence(_seq_floppyData_KallakWriting, true); - } else if (_game == KYRA1CD) { + } else if (_features & GF_TALKIE) { _seq->playSequence(_seq_cdromData_KallakWriting, true); } _seq->freeHandShapes(); @@ -792,9 +885,9 @@ void KyraEngine::seq_introKallakWriting() { void KyraEngine::seq_introKallakMalcom() { debug(9, "KyraEngine::seq_introKallakMalcom()"); _screen->clearPage(3); - if (_game == KYRA1) { + if (_features & GF_FLOPPY) { _seq->playSequence(_seq_floppyData_KallakMalcom, true); - } else if (_game == KYRA1CD) { + } else if (_features & GF_TALKIE) { _seq->playSequence(_seq_cdromData_KallakMalcom, true); } } diff --git a/kyra/kyra.h b/kyra/kyra.h index 41e6330b2b..870ec07081 100644 --- a/kyra/kyra.h +++ b/kyra/kyra.h @@ -25,6 +25,7 @@ #include "base/engine.h" #include "common/rect.h" #include "sound/mixer.h" +#include "common/file.h" class AudioStream; @@ -39,16 +40,15 @@ enum { GF_KYRA2 = 1 << 3, GF_KYRA3 = 1 << 4, GF_AUDIOCD = 1 << 5, // FM-Towns versions seems to use audio CD - GF_DEMO = 1 << 6 + GF_DEMO = 1 << 6, + GF_ENGLISH = 1 << 7, + GF_FRENCH = 1 << 8, + GF_GERMAN = 1 << 9 + }; enum { - KYRA1 = 0, - KYRA1CD = 1, - KYRA1DEMO = 2, - KYRA2 = 3, - KYRA2CD = 4, - KYRA3 = 5 + GI_KYRA1 = 0 }; struct Character { @@ -123,6 +123,7 @@ public: MusicPlayer *midi() { return _midi; } uint8 game() const { return _game; } + uint32 features() const { return _features; } Common::RandomSource _rnd; @@ -209,6 +210,7 @@ protected: bool _talkMessagePrinted; uint8 _flagsTable[51]; uint16 _gameSpeed; + uint32 _features; uint16 _currentRoom; AudioStream *_currentVocFile; diff --git a/kyra/resource.cpp b/kyra/resource.cpp index ce066dd842..e138c82b4f 100644 --- a/kyra/resource.cpp +++ b/kyra/resource.cpp @@ -30,7 +30,7 @@ Resource::Resource(KyraEngine* engine) { _engine = engine; // No PAK files in the demo version - if (_engine->game() == KYRA1DEMO) + if (_engine->features() & GF_DEMO) return; // prefetches all PAK Files @@ -63,9 +63,9 @@ Resource::Resource(KyraEngine* engine) { const char** usedFilelist = 0; - if (_engine->game() == KYRA1) + if (_engine->features() & GF_FLOPPY) usedFilelist = kyra1Filelist; - else if (_engine->game() == KYRA1CD) + else if (_engine->features() & GF_TALKIE) usedFilelist = kyra1CDFilelist; else error("no filelist found for this game"); @@ -155,7 +155,7 @@ uint8* Resource::fileData(const char* file, uint32* size) { if (!(*size)) continue; - + buffer = new uint8[*size]; assert(buffer); diff --git a/kyra/screen.cpp b/kyra/screen.cpp index 2bb2759663..6c4c617a65 100644 --- a/kyra/screen.cpp +++ b/kyra/screen.cpp @@ -549,7 +549,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int DrawShapePlotPixelCallback plotPixel = _drawShapePlotPixelTable[ppc]; const uint8 *src = shapeData; - if (_vm->game() == KYRA1CD) { + if (_vm->features() & GF_TALKIE) { src += 2; } uint16 shapeFlags = READ_LE_UINT16(src); src += 2; diff --git a/kyra/seqplayer.cpp b/kyra/seqplayer.cpp index d92ea5f9a1..fe5a312239 100755 --- a/kyra/seqplayer.cpp +++ b/kyra/seqplayer.cpp @@ -60,7 +60,7 @@ uint8 *SeqPlayer::setPanPages(int pageNum, int shape) { uint16 numShapes = READ_LE_UINT16(data); if (shape < numShapes) { uint32 offs = 0; - if (_vm->game() == KYRA1CD) { + if (_vm->features() & GF_TALKIE) { offs = READ_LE_UINT32(data + 2 + shape * 4); } else { offs = READ_LE_UINT16(data + 2 + shape * 2); @@ -98,7 +98,7 @@ void SeqPlayer::s1_wsaOpen() { assert(wsaObj < ARRAYSIZE(_seqMovies)); uint8 offscreenDecode = *_seqData++; _seqWsaCurDecodePage = _seqMovies[wsaObj].page = (offscreenDecode == 0) ? 0 : 3; - if (_vm->game() == KYRA1DEMO) { + if (_vm->features() & GF_DEMO) { _seqMovies[wsaObj].wsa = _vm->wsa_open(KyraEngine::_seq_demo_WSATable[wsaObj], offscreenDecode, 0); } else { _seqMovies[wsaObj].wsa = _vm->wsa_open(KyraEngine::_seq_WSATable[wsaObj], offscreenDecode, 0); @@ -212,7 +212,7 @@ void SeqPlayer::s1_loadPalette() { uint8 colNum = *_seqData++; uint32 fileSize; uint8 *srcData; - if (_vm->game() == KYRA1DEMO) { + if (_vm->features() & GF_DEMO) { srcData = _res->fileData(KyraEngine::_seq_demo_COLTable[colNum], &fileSize); } else { srcData = _res->fileData(KyraEngine::_seq_COLTable[colNum], &fileSize); @@ -306,9 +306,9 @@ void SeqPlayer::s1_copyRegion() { void SeqPlayer::s1_copyRegionSpecial() { static const uint8 colorMap[] = { 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0 }; const char *copyStr = 0; - if (_vm->game() == KYRA1 || _vm->game() == KYRA1DEMO) { + if (_vm->features() & GF_FLOPPY || _vm->features() & GF_DEMO) { copyStr = "Copyright (c) 1992 Westwood Studios"; - } else if (_vm->game() == KYRA1CD) { + } else if (_vm->features() & GF_TALKIE) { copyStr = "Copyright (c) 1992,1993 Westwood Studios"; } @@ -356,15 +356,15 @@ void SeqPlayer::s1_fillRect() { _screen->fillRect(x1, y1, x2, y2, color, page); } -void SeqPlayer::s1_soundUnk1() { +void SeqPlayer::s1_playEffect() { uint8 track = *_seqData++; _vm->waitTicks(3); _midi->playSoundEffect(track); } -void SeqPlayer::s1_soundUnk2() { +void SeqPlayer::s1_playTrack() { uint8 msg = *_seqData++; - if (_vm->game() == KYRA1 || _vm->game() == KYRA1DEMO) { + if (_vm->features() & GF_FLOPPY || _vm->features() & GF_DEMO) { switch (msg) { case 0: // nothing to do here... @@ -385,8 +385,10 @@ void SeqPlayer::s1_soundUnk2() { warning("Unknown seq. message: %.02d", msg); break; } - } else if (_vm->game() == KYRA1CD) { - if (msg == 1) { + } else if (_vm->features() & GF_TALKIE) { + if (msg == 0) { + // nothing to do here... + } else if (msg == 1) { _midi->beginFadeOut(); } else { _vm->snd_playTrack(msg); @@ -395,7 +397,7 @@ void SeqPlayer::s1_soundUnk2() { } void SeqPlayer::s1_allocTempBuffer() { - if (_vm->game() == KYRA1DEMO) { + if (_vm->features() & GF_DEMO) { _seqQuitFlag = true; } else { // allocate offscreen buffer, not needed @@ -426,8 +428,19 @@ void SeqPlayer::s1_playVocFile() { _vm->snd_playVoiceFile(a); } -void SeqPlayer::s1_miscUnk3() { - warning("STUB: s1_miscUnk3"); +void SeqPlayer::s1_displayStory() { + _screen->clearPage(3); + _screen->clearPage(0); + if (_vm->features() & GF_ENGLISH) { + _vm->loadBitmap("TEXT_ENG.CPS", 3, 3, 0); + } else if (_vm->features() & GF_GERMAN) { + _vm->loadBitmap("TEXT_GER.CPS", 3, 3, 0); + } else if (_vm->features() & GF_FRENCH) { + _vm->loadBitmap("TEXT_FRE.CPS", 3, 3, 0); + } + _screen->copyRegion(0, 0, 0, 0, 320, 200, 3, 0); + _screen->updateScreen(); + _vm->waitTicks(360); } void SeqPlayer::s1_prefetchVocFile() { @@ -468,8 +481,8 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { SEQOP(2, s1_copyRegionSpecial), SEQOP(9, s1_fillRect), // 0x18 - SEQOP(2, s1_soundUnk1), - SEQOP(2, s1_soundUnk2), + SEQOP(2, s1_playEffect), + SEQOP(2, s1_playTrack), SEQOP(1, s1_allocTempBuffer), SEQOP(1, s1_textDisplayEnable), // 0x1C @@ -512,9 +525,9 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { SEQOP(3, s1_copyRegion), SEQOP(2, s1_copyRegionSpecial), SEQOP(9, s1_fillRect), - SEQOP(2, s1_soundUnk1), + SEQOP(2, s1_playEffect), // 0x1C - SEQOP(2, s1_soundUnk2), + SEQOP(2, s1_playTrack), SEQOP(1, s1_allocTempBuffer), SEQOP(1, s1_textDisplayEnable), SEQOP(1, s1_textDisplayDisable), @@ -522,7 +535,7 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { SEQOP(1, s1_endOfScript), SEQOP(1, s1_miscUnk1), SEQOP(2, s1_playVocFile), - SEQOP(1, s1_miscUnk3), + SEQOP(1, s1_displayStory), // 0x24 SEQOP(2, s1_prefetchVocFile) }; @@ -532,10 +545,10 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { debug(9, "SeqPlayer::seq_playSequence(0x%X, %d)", seqData, skipSeq); - if (_vm->game() == KYRA1 || _vm->game() == KYRA1DEMO) { + if (_vm->features() & GF_FLOPPY || _vm->features() & GF_DEMO) { commands = floppySeqProcs; numCommands = ARRAYSIZE(floppySeqProcs); - } else if (_vm->game() == KYRA1CD) { + } else if (_vm->features() & GF_TALKIE) { commands = cdromSeqProcs; numCommands = ARRAYSIZE(cdromSeqProcs); } else { diff --git a/kyra/seqplayer.h b/kyra/seqplayer.h index 19e9eaefdb..bf0da521f6 100755 --- a/kyra/seqplayer.h +++ b/kyra/seqplayer.h @@ -83,15 +83,15 @@ protected: void s1_copyRegion(); void s1_copyRegionSpecial(); void s1_fillRect(); - void s1_soundUnk1(); - void s1_soundUnk2(); + void s1_playEffect(); + void s1_playTrack(); void s1_allocTempBuffer(); void s1_textDisplayEnable(); void s1_textDisplayDisable(); void s1_endOfScript(); void s1_miscUnk1(); void s1_playVocFile(); - void s1_miscUnk3(); + void s1_displayStory(); void s1_prefetchVocFile(); struct SeqMovie { diff --git a/kyra/wsamovie.cpp b/kyra/wsamovie.cpp index 47d96bc247..2b6b6eec6c 100644 --- a/kyra/wsamovie.cpp +++ b/kyra/wsamovie.cpp @@ -41,7 +41,7 @@ WSAMovieV1 *KyraEngine::wsa_open(const char *filename, int offscreenDecode, uint wsa->deltaBufferSize = READ_LE_UINT16(wsaData); wsaData += 2; wsa->offscreenBuffer = NULL; wsa->flags = 0; - if (_game == KYRA1CD) { + if (_features & GF_TALKIE) { flags = READ_LE_UINT16(wsaData); wsaData += 2; } |