diff options
author | athrxx | 2019-11-15 22:01:53 +0100 |
---|---|---|
committer | athrxx | 2019-12-18 20:50:41 +0100 |
commit | f74f4929a043e278ea5bd989eeac17c18c756e22 (patch) | |
tree | a3253cead7396551cf206dce7848361f0e7822ec /engines/kyra | |
parent | 5cea16658594355c35a0f83a65d4341be95e8da3 (diff) | |
download | scummvm-rg350-f74f4929a043e278ea5bd989eeac17c18c756e22.tar.gz scummvm-rg350-f74f4929a043e278ea5bd989eeac17c18c756e22.tar.bz2 scummvm-rg350-f74f4929a043e278ea5bd989eeac17c18c756e22.zip |
KYRA: (EOB/PC98) - add static resources
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/engine/eob.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/engine/eobcommon.cpp | 3 | ||||
-rw-r--r-- | engines/kyra/engine/eobcommon.h | 5 | ||||
-rw-r--r-- | engines/kyra/engine/items_eob.cpp | 14 | ||||
-rw-r--r-- | engines/kyra/resource/resource.h | 25 | ||||
-rw-r--r-- | engines/kyra/resource/staticres.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/resource/staticres_eob.cpp | 7 |
7 files changed, 53 insertions, 5 deletions
diff --git a/engines/kyra/engine/eob.cpp b/engines/kyra/engine/eob.cpp index dc653fa38e..f9c872dee3 100644 --- a/engines/kyra/engine/eob.cpp +++ b/engines/kyra/engine/eob.cpp @@ -34,6 +34,8 @@ EoBEngine::EoBEngine(OSystem *system, const GameFlags &flags) _menuChoiceInit = 4; _turnUndeadString = 0; + _itemNamesPC98 = 0; + _numItemNamesPC98 = 0; _finBonusStrings = _npcStrings[1] = _npcStrings[2] = 0; _npcStrings[3] = _npcStrings[4] = _npcStrings[5] = _npcStrings[6] = 0; _npcStrings[7] = _npcStrings[8] = _npcStrings[9] = _npcStrings[10] = 0; diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index 4b6e88437f..3389d4fed0 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -82,8 +82,9 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags) : KyraRpgE _items = 0; _itemTypes = 0; _itemNames = 0; + _itemNamesPC98 = 0; _itemInHand = -1; - _numItems = _numItemNames = 0; + _numItems = _numItemNames = _numItemNamesPC98 = 0; _castScrollSlot = 0; _currentSub = 0; diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h index e476f8a852..91d0a6e089 100644 --- a/engines/kyra/engine/eobcommon.h +++ b/engines/kyra/engine/eobcommon.h @@ -459,6 +459,8 @@ protected: EoBItemType *_itemTypes; char **_itemNames; uint16 _numItemNames; + int _numItemNamesPC98; + const char * const *_itemNamesPC98; uint32 _partyEffectFlags; Item _lastUsedItem; @@ -865,6 +867,9 @@ protected: const uint8 *_cgaMappingLevel[5]; const uint8 *_cgaLevelMappingIndex; + // hard coded 16 color palettes for PC98 version of EOB1 + const uint8 *_palette16c[10]; + bool _enableHiResDithering; // Default parameters will import all present original save files and push them to the top of the save dialog. diff --git a/engines/kyra/engine/items_eob.cpp b/engines/kyra/engine/items_eob.cpp index 3121f567f8..e784e2d3f9 100644 --- a/engines/kyra/engine/items_eob.cpp +++ b/engines/kyra/engine/items_eob.cpp @@ -50,9 +50,17 @@ void EoBCoreEngine::loadItemDefs() { _items[i].value = s->readSByte(); } - _numItemNames = s->readUint16(); - for (int i = 0; i < _numItemNames; i++) - s->read(_itemNames[i], 35); + if (_itemNamesPC98) { + _numItemNames = _numItemNamesPC98; + for (int i = 0; i < _numItemNames; i++) { + assert(strlen(_itemNamesPC98[i]) < 35); + Common::strlcpy(_itemNames[i], _itemNamesPC98[i], 34); + } + } else { + _numItemNames = s->readUint16(); + for (int i = 0; i < _numItemNames; i++) + s->read(_itemNames[i], 35); + } delete s; diff --git a/engines/kyra/resource/resource.h b/engines/kyra/resource/resource.h index cbd442fcc1..64247d14e8 100644 --- a/engines/kyra/resource/resource.h +++ b/engines/kyra/resource/resource.h @@ -506,6 +506,17 @@ enum KyraResources { kEoB1IntroFilesHands, kEoB1IntroFilesWdExit, kEoB1IntroFilesTunnel, + + kEoB1IntroStringsTower, + kEoB1IntroStringsOrb, + kEoB1IntroStringsWdEntry, + kEoB1IntroStringsKing, + kEoB1IntroStringsHands, + kEoB1IntroStringsWdExit, + kEoB1IntroStringsTunnel, + + kEoB1FinaleStrings, + kEoB1IntroOpeningFrmDelay, kEoB1IntroWdEncodeX, kEoB1IntroWdEncodeY, @@ -526,7 +537,11 @@ enum KyraResources { kEoB1FinaleCouncilAnim4, kEoB1FinaleEyesAnim, kEoB1FinaleHandsAnim, + kEoB1FinaleHandsAnim2, + kEoB1FinaleHandsAnim3, kEoB1FinaleTextDuration, + kEoB1CreditsStrings, + kEoB1CreditsCharWdth, kEoB1DoorShapeDefs, kEoB1DoorSwitchShapeDefs, @@ -554,6 +569,11 @@ enum KyraResources { kEoB1CgaMappingLevel3, kEoB1CgaMappingLevel4, + kEoB1Palettes16c, + kEoB1PalCycleData, + kEoB1PalCycleStyle1, + kEoB1PalCycleStyle2, + kEoB1NpcShpData, kEoB1NpcSubShpIndex1, kEoB1NpcSubShpIndex2, @@ -570,6 +590,11 @@ enum KyraResources { kEoB1Npc6Strings, kEoB1Npc7Strings, + kEoB1ItemNames, + kEoB1Ascii2SjisTable1, + kEoB1Ascii2SjisTable2, + kEoB1FontLookupTable, + kEoB2MainMenuStrings, kEoB2MainMenuUtilStrings, diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp index fcf3158f5e..29b899a9b2 100644 --- a/engines/kyra/resource/staticres.cpp +++ b/engines/kyra/resource/staticres.cpp @@ -39,7 +39,7 @@ namespace Kyra { -#define RESFILE_VERSION 94 +#define RESFILE_VERSION 95 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp index 2082fc6ac4..2e299670e1 100644 --- a/engines/kyra/resource/staticres_eob.cpp +++ b/engines/kyra/resource/staticres_eob.cpp @@ -1162,6 +1162,13 @@ void EoBEngine::initStaticResource() { _cgaLevelMappingIndex = _staticres->loadRawData(kEoB1CgaLevelMappingIndex, temp); for (int i = 0; i < 5; i++) _cgaMappingLevel[i] = _staticres->loadRawData(kEoB1CgaMappingLevel0 + i, temp); + const uint8 *pal16c = _staticres->loadRawData(kEoB1Palettes16c, temp); + if (pal16c) { + for (int i = 0; i < 10; i++) + _palette16c[i] = pal16c + i * 48; + } + + _itemNamesPC98 = _staticres->loadStrings(kEoB1ItemNames, _numItemNamesPC98); _turnUndeadString = _staticres->loadStrings(kEoB1TurnUndeadString, temp); |