diff options
author | Johannes Schickel | 2007-09-15 14:53:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-09-15 14:53:21 +0000 |
commit | fd6ca3b7acc0c3b73479d4ef139fe6954250800a (patch) | |
tree | 4c61f47eee12b36c00b9e91bcff74d3bf24bff2b | |
parent | e0659805811ff86fb1c795c44418d62a7892c6de (diff) | |
download | scummvm-rg350-fd6ca3b7acc0c3b73479d4ef139fe6954250800a.tar.gz scummvm-rg350-fd6ca3b7acc0c3b73479d4ef139fe6954250800a.tar.bz2 scummvm-rg350-fd6ca3b7acc0c3b73479d4ef139fe6954250800a.zip |
- added PC-98 platform entry
- added Kyrandia 1 PC-98 detection entries
svn-id: r28907
-rw-r--r-- | common/util.cpp | 1 | ||||
-rw-r--r-- | common/util.h | 1 | ||||
-rw-r--r-- | engines/kyra/detection.cpp | 33 | ||||
-rw-r--r-- | engines/kyra/gui_v1.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 9 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/resource.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/saveload_v1.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/scene_v1.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/script.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/script_v1.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/seqplayer.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sequences_v1.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/sound_v1.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 4 |
15 files changed, 63 insertions, 25 deletions
diff --git a/common/util.cpp b/common/util.cpp index ff6f02609b..389e229a78 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -212,6 +212,7 @@ const PlatformDescription g_platforms[] = { {"atari", "atari-st", "st", "Atari ST", kPlatformAtariST}, {"c64", "c64", "c64", "Commodore 64", kPlatformC64}, {"pc", "dos", "ibm", "DOS", kPlatformPC}, + {"pc98", "pc98", "pc98", "PC-98", kPlatformPC98}, // The 'official' spelling seems to be "FM-TOWNS" (e.g. in the Indy4 demo). // However, on the net many variations can be seen, like "FMTOWNS", diff --git a/common/util.h b/common/util.h index 0d63af0878..6d1814280b 100644 --- a/common/util.h +++ b/common/util.h @@ -150,6 +150,7 @@ enum Platform { kPlatformPCEngine, kPlatformApple2GS, + kPlatformPC98, kPlatformUnknown = -1 }; diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 53f0852a6a..58622b3514 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -172,7 +172,7 @@ const KYRAGameDescription adGameDescs[] = { KYRA1_FLOPPY_FLAGS }, - { + { // FM-Towns version { "kyra1", 0, @@ -195,6 +195,37 @@ const KYRAGameDescription adGameDescs[] = { KYRA1_TOWNS_SJIS_FLAGS }, + { // PC-9821 version + { + "kyra1", + 0, + { + { "EMC.PAK", 0, "a046bb0b422061aab8e4c4689400343a", -1 }, + { "MUSIC98.PAK", 0, "02fc212f799331b769b274e33d87b37f", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC98, + Common::ADGF_NO_FLAGS + }, + KYRA1_TOWNS_FLAGS + }, + { + { + "kyra1", + 0, + { + { "JMC.PAK", 0, "9c5707a2a478e8167e44283246612d2c", -1 }, + { "MUSIC98.PAK", 0, "02fc212f799331b769b274e33d87b37f", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::JA_JPN, + Common::kPlatformPC98, + Common::ADGF_NO_FLAGS + }, + KYRA1_TOWNS_SJIS_FLAGS + }, + { { "kyra1", diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index b7692cc97d..0d9d8224cd 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -41,7 +41,7 @@ void KyraEngine_v1::registerDefaultSettings() { // Most settings already have sensible defaults. This one, however, is // specific to the Kyra engine. ConfMan.registerDefault("walkspeed", 2); - ConfMan.registerDefault("cdaudio", _flags.platform == Common::kPlatformFMTowns); + ConfMan.registerDefault("cdaudio", (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)); } void KyraEngine_v1::readSettings() { @@ -59,7 +59,7 @@ void KyraEngine_v1::readSettings() { _configTextspeed = 2; // Fast _configWalkspeed = ConfMan.getInt("walkspeed"); - _configMusic = ConfMan.getBool("music_mute") ? 0 : ((ConfMan.getBool("cdaudio") && _flags.platform == Common::kPlatformFMTowns) ? 2 : 1); + _configMusic = ConfMan.getBool("music_mute") ? 0 : ((ConfMan.getBool("cdaudio") && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) ? 2 : 1); _configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1; _sound->enableMusic(_configMusic); @@ -494,7 +494,7 @@ void KyraEngine_v1::setGUILabels() { menuLabelGarbageOffset = 72; } else if (_flags.lang == Common::DE_DEU) { offset = offsetMainMenu = offsetOn = offsetOptions = 24; - } else if (_flags.platform == Common::kPlatformFMTowns) { + } else if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { offset = 1; offsetOptions = 10; offsetOn = 0; @@ -1303,7 +1303,7 @@ int KyraEngine_v1::gui_controlsChangeMusic(Button *button) { debugC(9, kDebugLevelGUI, "KyraEngine_v1::gui_controlsChangeMusic()"); processMenuButton(button); - _configMusic = ++_configMusic % (_flags.platform == Common::kPlatformFMTowns ? 3 : 2); + _configMusic = ++_configMusic % ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) ? 3 : 2); gui_setupControls(_menu[5]); return 0; } diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index 1d8d7440f0..0c2524327e 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -86,8 +86,13 @@ int KyraEngine::init() { int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB/* | MDT_PREFER_MIDI*/); if (_flags.platform == Common::kPlatformFMTowns) { - // no sfx enabled for CD audio music atm - // later on here should be a usage of MixedSoundDriver + // TODO: later on here should be a usage of MixedSoundDriver + _sound = new SoundTowns(this, _mixer); + } else if (_flags.platform == Common::kPlatformPC98) { + // TODO: currently we don't support the PC98 sound data, + // but since it has the FM-Towns data files, we just use the + // FM-Towns driver + // TODO: later on here should be a usage of MixedSoundDriver _sound = new SoundTowns(this, _mixer); } else if (midiDriver == MD_ADLIB) { _sound = new SoundAdlibPC(this, _mixer); diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 45ee42b0d3..c994325ca9 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -180,7 +180,7 @@ int KyraEngine_v1::init() { initStaticResource(); - if (_flags.platform == Common::kPlatformFMTowns) + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) _sound->setSoundFileList(_soundFilesTowns, _soundFilesTownsCount); else _sound->setSoundFileList(_soundFiles, _soundFilesCount); diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index b8d7eb3f64..3f01463dc6 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -109,7 +109,7 @@ Resource::Resource(KyraEngine *vm) { } } - if (_vm->gameFlags().platform == Common::kPlatformFMTowns) { + if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) { uint unloadHash = (_vm->gameFlags().lang == Common::EN_ANY) ? Common::hashit_lower("JMC.PAK") : Common::hashit_lower("EMC.PAK"); ResIterator file = Common::find_if(_pakfiles.begin(), _pakfiles.end(), ResFilenameEqual(unloadHash)); diff --git a/engines/kyra/saveload_v1.cpp b/engines/kyra/saveload_v1.cpp index c2ceee1d3b..e9001968e9 100644 --- a/engines/kyra/saveload_v1.cpp +++ b/engines/kyra/saveload_v1.cpp @@ -84,8 +84,8 @@ void KyraEngine_v1::loadGame(const char *fileName) { warning("Can not load cdrom savefile for this (non cdrom) gameversion"); delete in; return; - } else if ((flags & GF_FMTOWNS) && !(_flags.platform == Common::kPlatformFMTowns)) { - warning("can not load FM-Towns savefile for this (non FM-Towns) gameversion"); + } else if ((flags & GF_FMTOWNS) && !(_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) { + warning("can not load FM-Towns/PC98 savefile for this (non FM-Towns/PC98) gameversion"); delete in; return; } @@ -206,7 +206,7 @@ void KyraEngine_v1::loadGame(const char *fileName) { if (_curSfxFile >= _soundFilesTownsCount || _curSfxFile < 0) _curSfxFile = 0; - if (_flags.platform == Common::kPlatformFMTowns) + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) _sound->loadSoundFile(_curSfxFile); } @@ -276,7 +276,7 @@ void KyraEngine_v1::saveGame(const char *fileName, const char *saveName) { out->write(saveName, 31); if (_flags.isTalkie) out->writeUint32BE(GF_TALKIE); - else if (_flags.platform == Common::kPlatformFMTowns) + else if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) out->writeUint32BE(GF_FMTOWNS); else out->writeUint32BE(GF_FLOPPY); diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp index 9940063d24..af7ee89fec 100644 --- a/engines/kyra/scene_v1.cpp +++ b/engines/kyra/scene_v1.cpp @@ -48,7 +48,7 @@ void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, i _abortWalkFlag = false; _abortWalkFlag2 = false; - if (_flags.platform == Common::kPlatformFMTowns) { + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { int newSfxFile = -1; if (_currentCharacter->sceneId == 7 && sceneId == 24) newSfxFile = 2; diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp index 5966fa2c25..0778e1abd6 100644 --- a/engines/kyra/script.cpp +++ b/engines/kyra/script.cpp @@ -167,7 +167,7 @@ bool ScriptHelper::startScript(ScriptState *script, int function) { return false; if (_vm->game() == GI_KYRA1) { - if (_vm->gameFlags().platform == Common::kPlatformFMTowns) + if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) script->ip = &script->dataPtr->data[functionOffset+1]; else script->ip = &script->dataPtr->data[functionOffset]; diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index bd776e2046..7a4f844400 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -52,7 +52,7 @@ int KyraEngine_v1::o1_characterSays(ScriptState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1characterSays(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2)); const char *string = stackPosString(0); - if (_flags.platform == Common::kPlatformFMTowns && _flags.lang == Common::JA_JPN) { + if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && _flags.lang == Common::JA_JPN) { static const uint8 townsString1[] = { 0x83, 0x75, 0x83, 0x89, 0x83, 0x93, 0x83, 0x83, 0x93, 0x81, 0x41, 0x82, 0xDC, 0x82, 0xBD, 0x97, 0x88, 0x82, 0xBD, 0x82, diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp index 20a98c66c1..2136c2830d 100644 --- a/engines/kyra/seqplayer.cpp +++ b/engines/kyra/seqplayer.cpp @@ -435,7 +435,7 @@ void SeqPlayer::s1_playTrack() { _sound->beginFadeOut(); } else { _sound->haltTrack(); - if (_vm->gameFlags().platform == Common::kPlatformFMTowns) + if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) msg += 2; _sound->playTrack(msg); } diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index 21436a7308..00aac6cfb4 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -113,7 +113,7 @@ void KyraEngine_v1::seq_intro() { _seq->setCopyViewOffs(true); _screen->setFont(Screen::FID_8_FNT); - if (_flags.platform != Common::kPlatformFMTowns) + if (_flags.platform != Common::kPlatformFMTowns && _flags.platform != Common::kPlatformPC98) snd_playTheme(0, 2); _text->setTalkCoords(144); @@ -133,7 +133,7 @@ void KyraEngine_v1::seq_intro() { void KyraEngine_v1::seq_introLogos() { debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_introLogos()"); - if (_flags.platform == Common::kPlatformFMTowns) { + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { _screen->loadBitmap("LOGO.CPS", 3, 3, _screen->_currentPalette); _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0); _screen->updateScreen(); @@ -1083,13 +1083,13 @@ void KyraEngine_v1::seq_playCredits() { _screen->_charWidth = -1; // we only need this for the fm-towns version - if (_flags.platform == Common::kPlatformFMTowns) + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) snd_playWanderScoreViaMap(53, 1); uint8 *buffer = 0; uint32 size = 0; - if (_flags.platform == Common::kPlatformFMTowns) { + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { int sizeTmp = 0; const uint8 *bufferTmp = _staticres->loadRawData(kCreditsStrings, sizeTmp); buffer = new uint8[sizeTmp]; diff --git a/engines/kyra/sound_v1.cpp b/engines/kyra/sound_v1.cpp index 3ea86189b2..032e3eda44 100644 --- a/engines/kyra/sound_v1.cpp +++ b/engines/kyra/sound_v1.cpp @@ -45,7 +45,7 @@ void KyraEngine_v1::snd_playTheme(int file, int track) { void KyraEngine_v1::snd_playSoundEffect(int track) { debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playSoundEffect(%d)", track); - if (_flags.platform == Common::kPlatformFMTowns && track == 49) { + if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && track == 49) { snd_playWanderScoreViaMap(56, 1); return; } @@ -57,7 +57,7 @@ void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) { if (restart) _lastMusicCommand = -1; - if (_flags.platform == Common::kPlatformFMTowns) { + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { if (command == 1) { _sound->beginFadeOut(); } else if (command >= 35 && command <= 38) { diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 3cf8648aa8..2ffa7aee09 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -86,7 +86,7 @@ uint32 createFeatures(const GameFlags &flags) { return GF_TALKIE; if (flags.isDemo) return GF_DEMO; - if (flags.platform == Common::kPlatformFMTowns) + if (flags.platform == Common::kPlatformFMTowns || flags.platform == Common::kPlatformPC98) return GF_FMTOWNS; if (flags.platform == Common::kPlatformAmiga) return GF_AMIGA; @@ -605,7 +605,7 @@ uint8 *StaticResource::getFile(const char *name, int &size) { ext = ".CD"; else if (_vm->gameFlags().isDemo) ext = ".DEM"; - else if (_vm->gameFlags().platform == Common::kPlatformFMTowns) + else if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) ext = ".TNS"; else if (_vm->gameFlags().platform == Common::kPlatformAmiga) ext = ".AMG"; |