diff options
| author | athrxx | 2019-11-20 23:56:41 +0100 |
|---|---|---|
| committer | athrxx | 2019-12-18 20:50:42 +0100 |
| commit | a0828a000b5ecff36e987db283436fc7b574232d (patch) | |
| tree | b0cfc4338e0acdf07a5af90a0767283821b24ea4 /engines/kyra/engine | |
| parent | 1db3ec1f712ba75e04911e0a936f873998f9d1c9 (diff) | |
| download | scummvm-rg350-a0828a000b5ecff36e987db283436fc7b574232d.tar.gz scummvm-rg350-a0828a000b5ecff36e987db283436fc7b574232d.tar.bz2 scummvm-rg350-a0828a000b5ecff36e987db283436fc7b574232d.zip | |
KYRA: (EOB/PC98) - fix intro and main menu screen
Diffstat (limited to 'engines/kyra/engine')
| -rw-r--r-- | engines/kyra/engine/chargen.cpp | 15 | ||||
| -rw-r--r-- | engines/kyra/engine/eob.cpp | 12 | ||||
| -rw-r--r-- | engines/kyra/engine/eob.h | 21 | ||||
| -rw-r--r-- | engines/kyra/engine/eobcommon.cpp | 2 |
4 files changed, 41 insertions, 9 deletions
diff --git a/engines/kyra/engine/chargen.cpp b/engines/kyra/engine/chargen.cpp index ef61bb987c..696f6efdf6 100644 --- a/engines/kyra/engine/chargen.cpp +++ b/engines/kyra/engine/chargen.cpp @@ -195,7 +195,7 @@ bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) { checkForCompleteParty(); initButtonsFromList(0, 5); - _vm->snd_playSong(_vm->game() == GI_EOB1 ? 20 : 13); + _vm->snd_playSong(_vm->game() == GI_EOB1 ? (_vm->gameFlags().platform == Common::kPlatformPC98 ? 1 : 20) : 13); _activeBox = 0; for (bool loop = true; loop && (!_vm->shouldQuit());) { @@ -266,7 +266,7 @@ bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) { } void CharacterGenerator::init() { - _screen->loadShapeSetBitmap("CHARGENA", 3, 3); + _screen->loadShapeSetBitmap("CHARGENA", 5, 3); if (_faceShapes) { for (int i = 0; i < 44; i++) delete[] _faceShapes[i]; @@ -278,15 +278,16 @@ void CharacterGenerator::init() { _faceShapes[i] = _screen->encodeShape((i % 10) << 2, (i / 10) << 5, 4, 32, true, _vm->_cgaMappingDefault); _screen->_curPage = 0; - if (_vm->gameFlags().platform == Common::kPlatformAmiga) + if (_vm->gameFlags().platform == Common::kPlatformAmiga || (_vm->game() == GI_EOB1 && _vm->gameFlags().platform == Common::kPlatformPC98)) _screen->fadeToBlack(32); - _screen->loadEoBBitmap("CHARGEN", _vm->_cgaMappingDefault, 3, 3, 0); + _screen->loadEoBBitmap("CHARGEN", _vm->_cgaMappingDefault, 5, 3, 0); + _screen->loadPC98Palette(4, _screen->getPalette(0)); - if (_vm->gameFlags().platform == Common::kPlatformAmiga) + if (_vm->gameFlags().platform == Common::kPlatformAmiga || (_vm->game() == GI_EOB1 && _vm->gameFlags().platform == Common::kPlatformPC98)) _screen->fadeFromBlack(32); - _screen->loadShapeSetBitmap("CHARGENB", 3, 3); + _screen->loadShapeSetBitmap("CHARGENB", 5, 3); if (_chargenMagicShapes) { for (int i = 0; i < 10; i++) delete[] _chargenMagicShapes[i]; @@ -301,7 +302,7 @@ void CharacterGenerator::init() { const CreatePartyModButton *c = &_chargenModButtons[i]; _chargenButtonLabels[i] = c->labelW ? _screen->encodeShape(c->encodeLabelX, c->encodeLabelY, c->labelW, c->labelH, true, _vm->_cgaMappingDefault) : 0; } - + _screen->convertPage(3, 2, _vm->_cgaMappingDefault); _screen->_curPage = 0; _screen->convertToHiColor(2); diff --git a/engines/kyra/engine/eob.cpp b/engines/kyra/engine/eob.cpp index f9c872dee3..00aeffbe8a 100644 --- a/engines/kyra/engine/eob.cpp +++ b/engines/kyra/engine/eob.cpp @@ -45,6 +45,7 @@ EoBEngine::EoBEngine(OSystem *system, const GameFlags &flags) _doorSwitchShapeEncodeDefs = _doorSwitchCoords = 0; _dscDoorCoordsExt = 0; _useMainMenuGUISettings = false; + _ttlCfg = 0; } EoBEngine::~EoBEngine() { @@ -58,6 +59,12 @@ Common::Error EoBEngine::init() { initStaticResource(); + for (int i = 0; i < ARRAYSIZE(_titleConfig); ++i) { + if (_flags.platform == _titleConfig[i].platform) + _ttlCfg = &_titleConfig[i]; + } + assert(_ttlCfg); + if (_configRenderMode != Common::kRenderCGA) _itemsOverlay = _res->fileData((_configRenderMode == Common::kRenderEGA) ? "ITEMRMP.EGA" : "ITEMRMP.VGA", 0); @@ -65,6 +72,9 @@ Common::Error EoBEngine::init() { _screen->modifyScreenDim(9, 0x01, 0x7D, 0x26, 0x3F); _screen->modifyScreenDim(12, 0x01, 0x04, 0x14, 0xA0); + if (_flags.platform == Common::kPlatformPC98) + _screen->modifyScreenDim(28, 0x0A, 0xA4, 0x15, 0x18); + _scriptTimersCount = 1; if (_configRenderMode == Common::kRenderEGA) { @@ -607,7 +617,7 @@ void EoBEngine::healParty() { const KyraRpgGUISettings *EoBEngine::guiSettings() const { if (_flags.platform == Common::kPlatformAmiga) return _useMainMenuGUISettings ? &_guiSettingsAmigaMainMenu : &_guiSettingsAmiga; - else if (_configRenderMode == Common::kRenderCGA || _configRenderMode == Common::kRenderEGA) + else if (_flags.platform == Common::kPlatformPC98 || _configRenderMode == Common::kRenderCGA || _configRenderMode == Common::kRenderEGA) return &_guiSettingsEGA; else return &_guiSettingsVGA; diff --git a/engines/kyra/engine/eob.h b/engines/kyra/engine/eob.h index 09e769bb72..9fbc22ab6e 100644 --- a/engines/kyra/engine/eob.h +++ b/engines/kyra/engine/eob.h @@ -48,6 +48,27 @@ private: int mainMenuLoop(); int _menuChoiceInit; + struct RenderModePalFile { + int renderMode; + char filename[12]; + }; + + struct TitleScreenConfig { + const Common::Platform platform; + const char bmpFile[12]; + const RenderModePalFile *palFiles; + const int pc98PaletteID; + const int page; + const bool fade; + const int menu1X, menu1Y, menu1W, menu1H, menu1col1, menu1col2, menu1col3; + const int menu2X, menu2Y, menu2W, menu2H, menu2col1, menu2col2, menu2col3; + const int versionStrYOffs; + }; + + static const RenderModePalFile _renderModePalFiles[3]; + static const TitleScreenConfig _titleConfig[3]; + const TitleScreenConfig *_ttlCfg; + // Main loop void startupNew(); void startupLoad(); diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index 826502d405..1767857f3b 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -564,7 +564,7 @@ Common::Error EoBCoreEngine::init() { Common::Error EoBCoreEngine::go() { _debugger->initialize(); _txt->removePageBreakFlag(); - _screen->setFont(Screen::FID_8_FNT); + _screen->setFont(_flags.platform == Common::kPlatformPC98 ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT); loadItemsAndDecorationsShapes(); _screen->setMouseCursor(0, 0, _itemIconShapes[0]); |
