From f7032c126dd097e8083e0fc740c7c856e0f2dd58 Mon Sep 17 00:00:00 2001 From: athrxx Date: Wed, 17 Aug 2011 18:46:29 +0200 Subject: [PATCH] KYRA: (EOB) - fix some bugs - fix monster movement - fix character level gain - add some static res for party transfer --- devtools/create_kyradat/create_kyradat.cpp | 6 +++ devtools/create_kyradat/create_kyradat.h | 3 ++ devtools/create_kyradat/games.cpp | 2 + devtools/create_kyradat/tables.cpp | 13 ++++++ dists/engine-data/kyra.dat | Bin 465075 -> 465202 bytes engines/kyra/chargen.cpp | 13 ++++-- engines/kyra/eob1.cpp | 4 +- engines/kyra/eobcommon.cpp | 30 +++++++++---- engines/kyra/eobcommon.h | 8 +++- engines/kyra/gui_eob.cpp | 4 +- engines/kyra/lol.cpp | 1 + engines/kyra/loleobbase.cpp | 16 +++---- engines/kyra/resource.h | 3 ++ engines/kyra/scene_eob.cpp | 8 ++-- engines/kyra/screen_eob.cpp | 24 ++++++----- engines/kyra/sprites_eob.cpp | 48 ++++++++++++--------- engines/kyra/staticres_eob.cpp | 3 ++ engines/kyra/timer.cpp | 4 ++ engines/kyra/timer_eob.cpp | 3 ++ engines/kyra/timer_lol.cpp | 1 + 20 files changed, 130 insertions(+), 64 deletions(-) diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp index 069118bdabe..ad56fb44c24 100644 --- a/devtools/create_kyradat/create_kyradat.cpp +++ b/devtools/create_kyradat/create_kyradat.cpp @@ -463,6 +463,8 @@ const ExtractFilename extractFilenames[] = { // EYE OF THE BEHOLDER II { kEob2MainMenuStrings, kTypeStringList, true }, + { kEob2TransferConvertTable, kTypeRawData, false }, + { kEob2TransferExpTable, kLolTypeRaw32, false }, { kEob2IntroStrings, k2TypeSfxList, true }, { kEob2IntroCPSFiles, kTypeStringList, true }, @@ -1779,6 +1781,10 @@ const char *getIdString(const int id) { return "kEob1Npc7Strings"; case kEob2MainMenuStrings: return "kEob2MainMenuStrings"; + case kEob2TransferConvertTable: + return "kEob2TransferConvertTable"; + case kEob2TransferExpTable: + return "kEob2TransferExpTable"; case kEob2IntroStrings: return "kEob2IntroStrings"; case kEob2IntroCPSFiles: diff --git a/devtools/create_kyradat/create_kyradat.h b/devtools/create_kyradat/create_kyradat.h index c7a29fb99a3..d7bcc4d9865 100644 --- a/devtools/create_kyradat/create_kyradat.h +++ b/devtools/create_kyradat/create_kyradat.h @@ -463,6 +463,9 @@ enum kExtractID { kEob1Npc7Strings, kEob2MainMenuStrings, + kEob2TransferConvertTable, + kEob2TransferExpTable, + kEob2IntroStrings, kEob2IntroCPSFiles, kEob2IntroSeqData00, diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp index d5b5c29aa99..78baeb6b39e 100644 --- a/devtools/create_kyradat/games.cpp +++ b/devtools/create_kyradat/games.cpp @@ -1485,6 +1485,8 @@ const int eob2FloppyNeed[] = { kEobBaseFlightObjSclIndex, kEob2MainMenuStrings, + kEob2TransferConvertTable, + kEob2TransferExpTable, kEob2IntroStrings, kEob2IntroCPSFiles, diff --git a/devtools/create_kyradat/tables.cpp b/devtools/create_kyradat/tables.cpp index 0b249247d8e..239ee6e1bd6 100644 --- a/devtools/create_kyradat/tables.cpp +++ b/devtools/create_kyradat/tables.cpp @@ -2649,6 +2649,16 @@ const ExtractEntrySearchData kEob2MainMenuStringsProvider[] = { EXTRACT_END_ENTRY }; +const ExtractEntrySearchData kEob2TransferConvertTableProvider[] = { + { UNK_LANG, kPlatformUnknown, { 0x00000031, 0x000004BC, { { 0x96, 0x53, 0xA2, 0xF1, 0x26, 0xFE, 0x1B, 0x5E, 0xDF, 0x62, 0x2C, 0x8C, 0xBD, 0x62, 0x5A, 0xF9 } } } }, + EXTRACT_END_ENTRY +}; + +const ExtractEntrySearchData kEob2TransferExpTableProvider[] = { + { UNK_LANG, kPlatformUnknown, { 0x00000018, 0x0000076B, { { 0x91, 0x65, 0x5B, 0x8D, 0xE8, 0x5B, 0x28, 0x32, 0x4D, 0x7A, 0x57, 0x8E, 0x18, 0x5B, 0x1A, 0xE9 } } } }, + EXTRACT_END_ENTRY +}; + const ExtractEntrySearchData kEob2IntroStringsProvider[] = { { EN_ANY, kPlatformUnknown, { 0x00000321, 0x0000DBC3, { { 0x11, 0x9B, 0x54, 0xB3, 0x34, 0xF0, 0xB5, 0xE1, 0xFA, 0x6A, 0x31, 0x02, 0x59, 0x29, 0xCA, 0x94 } } } }, { DE_DEU, kPlatformUnknown, { 0x0000038E, 0x0001119C, { { 0x92, 0x63, 0x18, 0xDD, 0x9F, 0x62, 0xF5, 0xBC, 0x3D, 0x93, 0xDC, 0x6E, 0xE5, 0xBE, 0x8C, 0x0B } } } }, @@ -4078,6 +4088,9 @@ const ExtractEntry extractProviders[] = { { kEob1Npc7Strings, kEob1Npc7StringsProvider }, { kEob2MainMenuStrings, kEob2MainMenuStringsProvider }, + { kEob2TransferConvertTable, kEob2TransferConvertTableProvider }, + { kEob2TransferExpTable, kEob2TransferExpTableProvider }, + { kEob2IntroStrings, kEob2IntroStringsProvider }, { kEob2IntroCPSFiles, kEob2IntroCPSFilesProvider }, { kEob2IntroSeqData00, kEob2IntroSeqData00Provider }, diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index 35aff97dde9dd65659b6096be221df2bfd6eb7af..8d45a5f0d63ba9d2b449f52eaa49723c93134642 100644 GIT binary patch delta 27105 zcmeI4d6X1Ywy#eVMKKQwA|NycwhE{anOT`xpom2cfZ9qcc8l`>+8_#|v;$(4^VAJE zfvu<@4xoalD5$77Ac}J<;0(yD2nel$qTKIf#QyQ_d-sp~-g=P$4;i)IuJ^5t2C_TuzFbvaSmGlJrG^fYt7UrbmfA|&|P(tS%~{C0b#!>AnZTfoDB0}_nlyn zO1S|7f(vgm3&DLF-EBm4uS_<`rrbVL400)VfFPf8WrFgQ>m%rqa(@?8q}*IVpOo7! zs7$#IQ_Xc%M0BF+l)F+;lX4#$q*1h4fTAPrPdud4DR+|~lX8y;%2KX+nhitH7y*KA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g{g64W){-;uYPj32yc|cJ{fTC&vinsexbOr8^}S z|4YHu^_`qj>K1(+^)-+^=KMeENi1Fjx4hVK`R?oHQ9ZYIAs@u*brEMA4;?dyAfXg$%Q=Z-kCNsRn z!eENOtQxhYrevtUsa07ptJ$bKYfD-dGrHA)Q7_e&T-ths+uXRGYdY5bzAKlh!P~fK zbz|_3zl<0)vq8z82l&wog9Qw0wJLbu)B0c`m)0)$z+ajLANot#^v1iCG|nQV<&h@j z=2*zc|Dllav5;x8kXio=A<=P#z;BKN9~sQ^@sAJQ^_OYEd;T&jnD1l%pC}oHlIrPm z>q=U7iav71u5}nJ+L=pbu-H?#U`fEGcd*o71_aCeWpMDZzYGulM{v%hq6H*(pzS@26x59~c^m%B^S{eJfYr@A}*ZDZZ-{xUrH z)sG(#{N^u%gH8T2JlO0nV}mXJhMB=ue_0r8^Ose@c7Iu4h8OMPFJp@udc)MBMxJICHTIWw+i?FyV^F*F6mV~{oIiy)52qD zlwsT`!`5}abYa{mLmDN`FpQgF7&pT(ZiZpp48yn?hJ|K0>ZG?yN~0#lp>KbUxfHrz z7m-_$oirihH*Cx<8Bzn-7t*1VHkJA zu&pcFl^fbNn?#vv+Uyn-2W`vzMi#WL_4Ntj`UHiIY}Bre>bLCJfd8_vX9aPYg1AgU zT&5r{QxKQw$KC3eHg8fK#AOQNG6jV)jk>W>{nGOrV=HV+L0p(1E=&*?CWs3YP?+_M z+=qV`N`P^Fg1A0GT%RDWPY~B9h<7L6gV>$8q4%h#_NZUjoPxMKL0q07E>94bCy2`v z#N`R%@&s{tg19_ET%I5getMillis() + (rollDice(1, 10, 3) * 18 * _tickLength); _flashShapeTimer = 0; _drawSceneTimer = _system->getMillis(); - //__unkB__ = 1; + _screen->setFont(Screen::FID_6_FNT); _screen->setScreenDim(7); - //_runLoopUnk2 = _currentBlock; _runFlag = true; while (!shouldQuit() && _runFlag) { - //_runLoopUnk2 = _currentBlock; checkPartyStatus(true); checkInput(_activeButtons, true, 0); removeInputTop(); @@ -723,7 +735,7 @@ int EobCoreEngine::generateCharacterHitpointsByLevel(int charIndex, int levelInd int EobCoreEngine::getClassAndConstHitpointsModifier(int cclass, int constitution) { int res = _hpConstModifiers[constitution]; - + // This also applies to EOB1 despite being coded differently there if (res <= 2 || (_classModifierFlags[cclass] & 0x31)) return res; @@ -1176,7 +1188,7 @@ uint32 EobCoreEngine::getRequiredExperience(int cClass, int levelIndex, int leve void EobCoreEngine::increaseCharacterLevel(int charIndex, int levelIndex) { _characters[charIndex].level[levelIndex]++; - int hpInc = generateCharacterHitpointsByLevel(charIndex, levelIndex); + int hpInc = generateCharacterHitpointsByLevel(charIndex, 1 << levelIndex); _characters[charIndex].hitPointsCur += hpInc; _characters[charIndex].hitPointsMax += hpInc; diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h index ffc951e80da..5f1bf8b7099 100644 --- a/engines/kyra/eobcommon.h +++ b/engines/kyra/eobcommon.h @@ -317,8 +317,9 @@ protected: bool _runFlag; //int _runLoopUnk2; - // Create Party + // Character generation / party transfer bool startCharacterGeneration(); + bool transferParty(); uint8 **_faceShapes; @@ -329,6 +330,9 @@ protected: static const uint8 _charClassModUnk[]; const uint8 *_classModifierFlags; + + const uint8 *_transferConvertTable; + const uint32 *_transferExpTable; // timers void setupTimers(); @@ -509,7 +513,7 @@ protected: void updateMonsters(int unit); void updateMonsterDest(EobMonsterInPlay *m); - void updateMonsterDest2(EobMonsterInPlay *m); + void updateMonsterAttackMode(EobMonsterInPlay *m); void updateAllMonsterDests(); void turnFriendlyMonstersHostile(); int getNextMonsterDirection(int curBlock, int destBlock); diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp index 7778feba8e7..a5f06c551e7 100644 --- a/engines/kyra/gui_eob.cpp +++ b/engines/kyra/gui_eob.cpp @@ -1978,8 +1978,6 @@ int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8 if (!result) result = inputFlags; - //_vm->_processingButtons=false; - return result; } @@ -2773,7 +2771,6 @@ int GUI_Eob::selectSaveSlotDialogue(int x, int y, int id) { // Display highlighted slot index in the bottom left corner to avoid people getting lost with the 990 save slots _screen->setFont(Screen::FID_6_FNT); - _screen->fillRect(_saveSlotX + 5, _saveSlotY + 135, _saveSlotX + 46, _saveSlotY + 140, _vm->_bkgColor_1); int sli = (newHighlight == 6) ? _savegameOffset : (_savegameOffset + newHighlight); _screen->printText(Common::String::format("%03d/989", sli).c_str(), _saveSlotX + 5, _saveSlotY + 135, _vm->_color2_1, _vm->_bkgColor_1); _screen->setFont(Screen::FID_8_FNT); @@ -3980,6 +3977,7 @@ void GUI_Eob::releaseButtons(Button *list) { delete list; list = n; } + _vm->gui_notifyButtonListChanged(); } void GUI_Eob::setupSaveMenuSlots() { diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 4fc78c0b643..030b1dec7a5 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1163,6 +1163,7 @@ void LoLEngine::setCharacterUpdateEvent(int charNum, int updateType, int updateD l->characterUpdateEvents[i] = updateType; l->characterUpdateDelay[i] = updateDelay; _timer->setNextRun(3, _system->getMillis()); + _timer->resetNextRun(); _timer->enable(3); break; } diff --git a/engines/kyra/loleobbase.cpp b/engines/kyra/loleobbase.cpp index 2ffae915b17..c2ec8da706a 100644 --- a/engines/kyra/loleobbase.cpp +++ b/engines/kyra/loleobbase.cpp @@ -164,14 +164,14 @@ Common::Error LolEobBaseEngine::init() { _levelBlockProperties = new LevelBlockProperty[1025]; memset(_levelBlockProperties, 0, 1025 * sizeof(LevelBlockProperty)); - _wllVmpMap = new uint8[255]; - memset(_wllVmpMap, 0, 255); - _wllShapeMap = new int8[255]; - memset(_wllShapeMap, 0, 255); - _specialWallTypes = new uint8[255]; - memset(_specialWallTypes, 0, 255); - _wllWallFlags = new uint8[255]; - memset(_wllWallFlags, 0, 255); + _wllVmpMap = new uint8[256]; + memset(_wllVmpMap, 0, 256); + _wllShapeMap = new int8[256]; + memset(_wllShapeMap, 0, 256); + _specialWallTypes = new uint8[256]; + memset(_specialWallTypes, 0, 256); + _wllWallFlags = new uint8[256]; + memset(_wllWallFlags, 0, 256); _blockDrawingBuffer = new uint16[1320]; memset(_blockDrawingBuffer, 0, 1320 * sizeof(uint16)); diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index f330d42004a..cd3865736f5 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -537,6 +537,9 @@ enum KyraResources { kEob1Npc7Strings, kEob2MainMenuStrings, + kEob2TransferConvertTable, + kEob2TransferExpTable, + kEob2IntroStrings, kEob2IntroCPSFiles, kEob2IntroSeqData00, diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp index afce9efdfa0..1bd7fca04ab 100644 --- a/engines/kyra/scene_eob.cpp +++ b/engines/kyra/scene_eob.cpp @@ -1012,8 +1012,8 @@ void EobCoreEngine::drawScene(int refresh) { } if (_sceneDefaultUpdate) { - resetSkipFlag(); delayUntil(_drawSceneTimer); + removeInputTop(); } if (refresh && !_partyResting) @@ -1029,7 +1029,7 @@ void EobCoreEngine::drawScene(int refresh) { if (_sceneDefaultUpdate) { _sceneDefaultUpdate = false; - _drawSceneTimer = _system->getMillis() /*+ 4 * _tickLength*/; + _drawSceneTimer = _system->getMillis() + 4 * _tickLength; } _sceneUpdateRequired = false; @@ -1141,8 +1141,8 @@ int EobCoreEngine::calcNewBlockPositionAndTestPassability(uint16 curBlock, uint1 int w = _levelBlockProperties[b].walls[direction ^ 2]; int f = _wllWallFlags[w]; - if (!f) - assert((_flags.gameID == GI_EOB1 && w < 70) || (_flags.gameID == GI_EOB2 && w < 80)); + //if (!f) + assert((_flags.gameID == GI_EOB1 && w < 70) || (_flags.gameID == GI_EOB2 && w < 80)); if (_flags.gameID == GI_EOB2 && w == 74 && _currentBlock == curBlock) { for (int i = 0; i < 5; i++) { diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp index c9ee9119db7..d29af69f0a1 100644 --- a/engines/kyra/screen_eob.cpp +++ b/engines/kyra/screen_eob.cpp @@ -151,9 +151,6 @@ void Screen_Eob::loadShapeSetBitmap(const char *file, int tempPage, int destPage } void Screen_Eob::loadEobBitmap(const char *file, const uint8 *ditheringData, int tempPage, int destPage, int copyToPage) { - //Common::String tmp = file; - //if (_vm->game() == GI_EOB1 && tmp.equalsIgnoreCase("spider")) - // tmp += "1"; Common::String tmp = Common::String::format("%s.CPS", file); Common::SeekableReadStream *s = _vm->resource()->createReadStream(tmp); bool loadAlternative = false; @@ -170,15 +167,20 @@ void Screen_Eob::loadEobBitmap(const char *file, const uint8 *ditheringData, int } if (loadAlternative) { - tmp.setChar('X', 0); - s = _vm->resource()->createReadStream(tmp); - if (!s) - error("Screen_Eob::loadEobBitmap(): CPS file loading failed."); - s->seek(768); - loadFileDataToPage(s, destPage, 64000); - delete s; + if (_vm->game() == GI_EOB1) { + tmp.insertChar('1', tmp.size() - 4); + loadBitmap(tmp.c_str(), tempPage, destPage, 0); + } else { + tmp.setChar('X', 0); + s = _vm->resource()->createReadStream(tmp); + if (!s) + error("Screen_Eob::loadEobBitmap(): CPS file loading failed."); + s->seek(768); + loadFileDataToPage(s, destPage, 64000); + delete s; + } } - + if (copyToPage == -1) { return; } else if (copyToPage == 0) { diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp index caf4a748da4..bd5ab27eadf 100644 --- a/engines/kyra/sprites_eob.cpp +++ b/engines/kyra/sprites_eob.cpp @@ -53,12 +53,8 @@ int LolEobBaseEngine::getBlockDistance(uint16 block1, uint16 block2) { namespace Kyra { -void EobCoreEngine::loadMonsterShapes(const char *filename, int monsterIndex, bool hasDecorations, int encodeTableIndex) { - Common::String s = filename; - if ((_flags.gameID == GI_EOB1) && (!scumm_stricmp(filename, "rust") || !scumm_stricmp(filename, "drider") || !scumm_stricmp(filename, "spider") || !scumm_stricmp(filename, "mantis") || !scumm_stricmp(filename, "xorn") || !scumm_stricmp(filename, "xanath"))) - s += "1"; - - _screen->loadShapeSetBitmap(s.c_str(), 3, 3); +void EobCoreEngine::loadMonsterShapes(const char *filename, int monsterIndex, bool hasDecorations, int encodeTableIndex) { + _screen->loadShapeSetBitmap(filename, 3, 3); const uint16 *enc = &_encodeMonsterShpTable[encodeTableIndex << 2]; for (int i = 0; i < 6; i++, enc += 4) @@ -149,6 +145,7 @@ const uint8 *EobCoreEngine::loadActiveMonsterData(const uint8 *data, int level) int32 del = _timer->getDelay(i); _timer->setNextRun(i, (i & 1) ? ct + (del >> 1) * _tickLength : ct + del * _tickLength); } + _timer->resetNextRun(); if (_hasTempDataFlags & (1 << (level - 1))) return data + 420; @@ -470,6 +467,12 @@ void EobCoreEngine::drawBlockItems(int index) { void EobCoreEngine::drawDoor(int index) { int s = _visibleBlocks[index]->walls[_sceneDrawVarDown]; + + if (_flags.gameID == GI_EOB1 && s == 0x85) + s = 0; + + assert((_flags.gameID == GI_EOB1 && s < 32) || (_flags.gameID == GI_EOB2 && s < 53)); + int type = _dscDoorShpIndex[s]; int d = _dscDimMap[index]; int w = _dscShapeCoords[(index * 5 + 4) << 1]; @@ -722,7 +725,7 @@ void EobCoreEngine::updateMonsters(int unit) { updateMonsterDest(m); if (m->mode > 0) - updateMonsterDest2(m); + updateMonsterAttackMode(m); switch (m->mode) { case 0: @@ -780,7 +783,7 @@ void EobCoreEngine::updateMonsterDest(EobMonsterInPlay *m) { m->dest = _currentBlock; } -void EobCoreEngine::updateMonsterDest2(EobMonsterInPlay *m) { +void EobCoreEngine::updateMonsterAttackMode(EobMonsterInPlay *m) { if (!(m->flags & 1) || m->mode == 10) return; if (m->mode == 8) { @@ -902,7 +905,7 @@ void EobCoreEngine::updateMoveMonster(EobMonsterInPlay *m) { EobMonsterProperty *p = &_monsterProps[m->type]; int d = getNextMonsterDirection(m->block, _currentBlock); - if ((p->capsFlags & 0x800) && !(d & 1)) + if ((_flags.gameID == GI_EOB2) && (p->capsFlags & 0x800) && !(d & 1)) d >>= 1; else d = m->dir; @@ -1102,31 +1105,34 @@ void EobCoreEngine::walkMonster(EobMonsterInPlay *m, int destBlock) { return; if (m->flags & 8) { + // Interestingly, the fear spell in EOB 1 does not expire. + // I don't know whether this is intended or not. if (_flags.gameID == GI_EOB1 ) { d ^= 4; - } else if (--m->spellStatusLeft <= 0) { - m->spellStatusLeft = 0; - m->flags &= ~8; - } else { - d ^= 4; + } else if (m->spellStatusLeft > 0) { + if (--m->spellStatusLeft == 0) + m->flags &= ~8; + else + d ^= 4; } } int d2 = (d - s) & 7; - if (b + _monsterStepTable0[_flags.gameID == GI_EOB1 ? (d >> 1) : d] == destBlock) { - if (_flags.gameID == GI_EOB1 && !(d & 1)) { - if (d2 >= 5) { + if (_flags.gameID == GI_EOB1) { + if ((b + _monsterStepTable0[d >> 1] == _currentBlock) && !(d & 1)) { + if (d2 >= 5) s = m->dir - 1; - } else if (d2 != 0) { + else if (d2 != 0) s = m->dir + 1; - } walkMonsterNextStep(m, -1, s & 3); return; - } else if (_flags.gameID == GI_EOB2) { + } + } else if (_flags.gameID == GI_EOB2) { + if (b + _monsterStepTable0[d] == destBlock) { if (d & 1) { int e = _monsterStepTable1[((d - 1) << 1) + m->dir]; - if (e && !((_monsterProps[m->type].capsFlags & 0x200) && (rollDice(1, 4) == 4))) { + if (e && (!(_monsterProps[m->type].capsFlags & 0x200) || (rollDice(1, 4) < 4))) { if (walkMonsterNextStep(m, b + e, -1)) return; } diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp index 069bf1337d1..57ee737ba04 100644 --- a/engines/kyra/staticres_eob.cpp +++ b/engines/kyra/staticres_eob.cpp @@ -1241,6 +1241,9 @@ void EobEngine::initSpells() { void DarkMoonEngine::initStaticResource() { int temp; _mainMenuStrings = _staticres->loadStrings(kEob2MainMenuStrings, temp); + _transferConvertTable = _staticres->loadRawData(kEob2TransferConvertTable, temp); + _transferExpTable = _staticres->loadRawDataBe32(kEob2TransferExpTable, temp); + _introStrings = _staticres->loadStrings(kEob2IntroStrings, temp); _cpsFilesIntro = _staticres->loadStrings(kEob2IntroCPSFiles, temp); diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp index 2ab2b621f33..95c283f0639 100644 --- a/engines/kyra/timer.cpp +++ b/engines/kyra/timer.cpp @@ -149,6 +149,8 @@ void TimerManager::setCountdown(uint8 id, int32 countdown) { uint32 curTime = _system->getMillis(); timer->lastUpdate = curTime; timer->nextRun = curTime + countdown * _vm->tickLength(); + if (timer->enabled & 2) + timer->pauseStartTime = curTime; _nextRun = MIN(_nextRun, timer->nextRun); } @@ -177,6 +179,8 @@ int32 TimerManager::getDelay(uint8 id) const { void TimerManager::setNextRun(uint8 id, uint32 nextRun) { Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id)); if (timer != _timers.end()) { + if (timer->enabled & 2) + timer->pauseStartTime = _system->getMillis(); timer->nextRun = nextRun; return; } diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp index 61fa554193b..caeae8cb29a 100644 --- a/engines/kyra/timer_eob.cpp +++ b/engines/kyra/timer_eob.cpp @@ -115,6 +115,7 @@ void EobCoreEngine::setupTimers() { _timer->addTimer(5, TimerV2(timerUpdateTeleporters), 10, true); _timer->addTimer(6, TimerV2(timerUpdateFoodStatus), 1080, true); _timer->addTimer(7, TimerV2(timerUpdateMonsterIdleAnim), 25, true); + _timer->resetNextRun(); } void EobCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt, int updateExistingTimer) { @@ -132,6 +133,7 @@ void EobCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt, if (ntime < _timer->getNextRun(timerId)) _timer->setNextRun(timerId, ntime); + _timer->resetNextRun(); if (updateExistingTimer) { bool updated = false; @@ -194,6 +196,7 @@ void EobCoreEngine::setupCharacterTimers() { _timer->setCountdown(0x30 | i, (nextTimer - ctime) / _tickLength); } } + _timer->resetNextRun(); } void EobCoreEngine::advanceTimers(uint32 millis) { diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp index 5a6677a4f67..d0b4062a65e 100644 --- a/engines/kyra/timer_lol.cpp +++ b/engines/kyra/timer_lol.cpp @@ -45,6 +45,7 @@ void LoLEngine::setupTimers() { _timer->addTimer(9, TimerV2(timerUpdatePortraitAnimations), 10, true); _timer->addTimer(10, TimerV2(timerUpdateLampState), 360, true); _timer->addTimer(11, TimerV2(timerFadeMessageText), 360, false); + _timer->resetNextRun(); } void LoLEngine::timerProcessMonsters(int timerNum) {