aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2013-01-05 00:54:28 +0100
committerathrxx2013-01-09 20:27:37 +0100
commitda3c385ee397ea9592a9b5f900487a7bdfb6e5c9 (patch)
treeb3f309c34f9b3eb0375d9fdf8768477230977e6c /engines
parentcc465076eef6194eb32320704a0855a21438bd95 (diff)
downloadscummvm-rg350-da3c385ee397ea9592a9b5f900487a7bdfb6e5c9.tar.gz
scummvm-rg350-da3c385ee397ea9592a9b5f900487a7bdfb6e5c9.tar.bz2
scummvm-rg350-da3c385ee397ea9592a9b5f900487a7bdfb6e5c9.zip
KYRA: (LOL/FM-TOWNS) some startup code
(let the FM-Towns version load up and run without errors/crashes)
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/lol.cpp2
-rw-r--r--engines/kyra/lol.h4
-rw-r--r--engines/kyra/sequences_lol.cpp4
-rw-r--r--engines/kyra/sound_lol.cpp8
-rw-r--r--engines/kyra/sound_towns.cpp4
-rw-r--r--engines/kyra/staticres_lol.cpp19
6 files changed, 26 insertions, 15 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index d1da375ed0..1906591d8c 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -933,7 +933,7 @@ void LoLEngine::writeSettings() {
case 0:
default:
- if (_flags.platform == Common::kPlatformPC98)
+ if (_flags.platform == Common::kPlatformPC98 || _flags.platform == Common::kPlatformFMTowns)
_flags.lang = Common::JA_JPN;
else
_flags.lang = Common::EN_ANY;
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 9a251f0652..4002346d31 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -336,9 +336,9 @@ private:
static const char *const _charPreviewNamesDefault[];
static const char *const _charPreviewNamesRussianFloppy[];
- // PC98 specific data
+ // PC98/FM-TOWNS specific data
static const uint16 _charPosXPC98[];
- static const uint8 _charNamesPC98[][11];
+ static const char *const _charNamesJapanese[];
WSAMovie_v2 *_chargenWSA;
static const uint8 _chargenFrameTableTalkie[];
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 7cdcc987eb..b319bfa53f 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -315,7 +315,7 @@ int LoLEngine::chooseCharacter() {
_screen->_curPage = 2;
for (int i = 0; i < 4; ++i) {
- _screen->printText((const char *)_charNamesPC98[i], _charPosXPC98[i], 168, 0xC1, 0x00);
+ _screen->printText(_charNamesJapanese[i], _charPosXPC98[i], 168, 0xC1, 0x00);
Screen::FontId old = _screen->setFont(Screen::FID_SJIS_FNT);
for (int j = 0; j < 3; ++j) {
@@ -329,7 +329,7 @@ int LoLEngine::chooseCharacter() {
_screen->printText(_tim->getCTableEntry(53), 72, 184, 0x81, 0x00);
_screen->printText(_tim->getCTableEntry(55), 72, 192, 0x81, 0x00);
} else {
- const char *const *previewNames = (_flags.lang == Common::RU_RUS && !_flags.isTalkie) ? _charPreviewNamesRussianFloppy : _charPreviewNamesDefault;
+ const char *const *previewNames = (_flags.lang == Common::RU_RUS && !_flags.isTalkie) ? _charPreviewNamesRussianFloppy : (_flags.lang == Common::JA_JPN ? _charNamesJapanese : _charPreviewNamesDefault);
for (int i = 0; i < 4; ++i) {
_screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, previewNames[i]);
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 48, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[0]);
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 02ea3f44a8..41f59be985 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -247,7 +247,7 @@ void LoLEngine::snd_playQueuedEffects() {
void LoLEngine::snd_loadSoundFile(int track) {
if (_sound->musicEnabled()) {
- if (_flags.platform != Common::kPlatformPC98) {
+ if (_flags.platform == Common::kPlatformPC) {
int t = (track - 250) * 3;
if (_curMusicFileIndex != _musicTrackMap[t] || _curMusicFileExt != (char)_musicTrackMap[t + 1]) {
snd_stopMusic();
@@ -269,12 +269,12 @@ int LoLEngine::snd_playTrack(int track) {
_lastMusicTrack = track;
if (_sound->musicEnabled()) {
- if (_flags.platform == Common::kPlatformPC98) {
- _sound->playTrack(track - 249);
- } else {
+ if (_flags.platform == Common::kPlatformPC) {
snd_loadSoundFile(track);
int t = (track - 250) * 3;
_sound->playTrack(_musicTrackMap[t + 2]);
+ } else {
+ _sound->playTrack(track - 249);
}
}
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index aff3e0f791..af741a1ebe 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -525,7 +525,9 @@ bool SoundTownsPC98_v2::init() {
TownsPC98_AudioDriver::kType86 : TownsPC98_AudioDriver::kTypeTowns);
if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
- _vm->checkCD();
+ if (_resInfo[_currentResourceSet])
+ if (_resInfo[_currentResourceSet]->cdaTableSize)
+ _vm->checkCD();
// FIXME: While checking for 'track1.XXX(X)' looks like
// a good idea, we should definitely not be doing this
// here. Basically our filenaming scheme could change
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index ff104bf66b..a1c5ff340c 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -238,6 +238,15 @@ void LoLEngine::initStaticResource() {
_sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
_sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
_sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
+ } else if (_flags.platform == Common::kPlatformFMTowns) {
+ static const char *const fileListIntro[] = { 0, "lore84.twn", "lore82.twn", 0, 0, 0, "lore83.twn", "lore81.twn" };
+ static const char *const fileListFinale[] = { 0, 0, "lore85.twn", "lore86.twn", "lore87.twn" };
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(fileListIntro, ARRAYSIZE(fileListIntro), 0, 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "lore%02d.twn", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(fileListFinale, ARRAYSIZE(fileListFinale), 0, 0, 0);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
}
if (_flags.isDemo)
@@ -662,11 +671,11 @@ const uint16 LoLEngine::_charPosXPC98[] = {
92, 152, 212, 268
};
-const uint8 LoLEngine::_charNamesPC98[][11] = {
- { 0x83, 0x41, 0x83, 0x4E, 0x83, 0x56, 0x83, 0x46, 0x83, 0x8B, 0x00 },
- { 0x83, 0x7D, 0x83, 0x43, 0x83, 0x50, 0x83, 0x8B, 0x00, 0x00, 0x00 },
- { 0x83, 0x4C, 0x81, 0x5B, 0x83, 0x89, 0x83, 0x93, 0x00, 0x00, 0x00 },
- { 0x83, 0x52, 0x83, 0x93, 0x83, 0x89, 0x83, 0x62, 0x83, 0x68, 0x00 }
+const char *const LoLEngine::_charNamesJapanese[] = {
+ "\x83\x41\x83\x4E\x83\x56\x83\x46\x83\x8B\0",
+ "\x83\x7D\x83\x43\x83\x50\x83\x8B\x00\x00\0",
+ "\x83\x4C\x81\x5B\x83\x89\x83\x93\x00\x00\0",
+ "\x83\x52\x83\x93\x83\x89\x83\x62\x83\x68\0"
};
const uint8 LoLEngine::_chargenFrameTableTalkie[] = {