[Scummvm-cvs-logs] SF.net SVN: scummvm: [28907] scummvm/trunk
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sat Sep 15 16:53:21 CEST 2007
Revision: 28907
http://scummvm.svn.sourceforge.net/scummvm/?rev=28907&view=rev
Author: lordhoto
Date: 2007-09-15 07:53:21 -0700 (Sat, 15 Sep 2007)
Log Message:
-----------
- added PC-98 platform entry
- added Kyrandia 1 PC-98 detection entries
Modified Paths:
--------------
scummvm/trunk/common/util.cpp
scummvm/trunk/common/util.h
scummvm/trunk/engines/kyra/detection.cpp
scummvm/trunk/engines/kyra/gui_v1.cpp
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/kyra/kyra_v1.cpp
scummvm/trunk/engines/kyra/resource.cpp
scummvm/trunk/engines/kyra/saveload_v1.cpp
scummvm/trunk/engines/kyra/scene_v1.cpp
scummvm/trunk/engines/kyra/script.cpp
scummvm/trunk/engines/kyra/script_v1.cpp
scummvm/trunk/engines/kyra/seqplayer.cpp
scummvm/trunk/engines/kyra/sequences_v1.cpp
scummvm/trunk/engines/kyra/sound_v1.cpp
scummvm/trunk/engines/kyra/staticres.cpp
Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/common/util.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -212,6 +212,7 @@
{"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",
Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/common/util.h 2007-09-15 14:53:21 UTC (rev 28907)
@@ -150,6 +150,7 @@
kPlatformPCEngine,
kPlatformApple2GS,
+ kPlatformPC98,
kPlatformUnknown = -1
};
Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/detection.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -172,7 +172,7 @@
KYRA1_FLOPPY_FLAGS
},
- {
+ { // FM-Towns version
{
"kyra1",
0,
@@ -195,9 +195,40 @@
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",
"CD",
AD_ENTRY1("GEMCUT.PAK", "fac399fe62f98671e56a005c5e94e39f"),
Common::EN_ANY,
Modified: scummvm/trunk/engines/kyra/gui_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/gui_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -41,7 +41,7 @@
// 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 @@
_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 @@
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 @@
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;
}
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -86,9 +86,14 @@
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);
assert(_sound);
Modified: scummvm/trunk/engines/kyra/kyra_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/kyra_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -180,7 +180,7 @@
initStaticResource();
- if (_flags.platform == Common::kPlatformFMTowns)
+ if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
_sound->setSoundFileList(_soundFilesTowns, _soundFilesTownsCount);
else
_sound->setSoundFileList(_soundFiles, _soundFilesCount);
Modified: scummvm/trunk/engines/kyra/resource.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/resource.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -109,7 +109,7 @@
}
}
- 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));
Modified: scummvm/trunk/engines/kyra/saveload_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/saveload_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -84,8 +84,8 @@
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 @@
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 @@
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);
Modified: scummvm/trunk/engines/kyra/scene_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/scene_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -48,7 +48,7 @@
_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;
Modified: scummvm/trunk/engines/kyra/script.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/script.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -167,7 +167,7 @@
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];
Modified: scummvm/trunk/engines/kyra/script_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/script_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -52,7 +52,7 @@
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,
Modified: scummvm/trunk/engines/kyra/seqplayer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/seqplayer.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/seqplayer.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -435,7 +435,7 @@
_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);
}
Modified: scummvm/trunk/engines/kyra/sequences_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/sequences_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -113,7 +113,7 @@
_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_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 @@
_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];
Modified: scummvm/trunk/engines/kyra/sound_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_v1.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/sound_v1.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -45,7 +45,7 @@
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 @@
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) {
Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp 2007-09-15 12:57:11 UTC (rev 28906)
+++ scummvm/trunk/engines/kyra/staticres.cpp 2007-09-15 14:53:21 UTC (rev 28907)
@@ -86,7 +86,7 @@
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 @@
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";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list