- added PC-98 platform entry
- added Kyrandia 1 PC-98 detection entries svn-id: r28907
This commit is contained in:
parent
e065980581
commit
fd6ca3b7ac
15 changed files with 63 additions and 25 deletions
|
@ -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",
|
||||
|
|
|
@ -150,6 +150,7 @@ enum Platform {
|
|||
kPlatformPCEngine,
|
||||
|
||||
kPlatformApple2GS,
|
||||
kPlatformPC98,
|
||||
|
||||
kPlatformUnknown = -1
|
||||
};
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue