diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/igor/detection.cpp | 8 | ||||
-rw-r--r-- | engines/igor/igor.cpp | 118 | ||||
-rw-r--r-- | engines/igor/igor.h | 17 | ||||
-rw-r--r-- | engines/igor/menu.cpp | 2 | ||||
-rw-r--r-- | engines/igor/midi.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_04.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_05.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_14.cpp | 6 | ||||
-rw-r--r-- | engines/igor/parts/part_16.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_17.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_21.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_27.cpp | 4 | ||||
-rw-r--r-- | engines/igor/parts/part_28.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_33.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_36.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_37.cpp | 2 | ||||
-rw-r--r-- | engines/igor/parts/part_90.cpp | 7 | ||||
-rw-r--r-- | engines/igor/parts/part_95.cpp | 120 | ||||
-rw-r--r-- | engines/igor/parts/part_main.cpp | 268 | ||||
-rw-r--r-- | engines/igor/resource_ids.h | 167 | ||||
-rw-r--r-- | engines/igor/staticres.cpp | 7 |
21 files changed, 427 insertions, 317 deletions
diff --git a/engines/igor/detection.cpp b/engines/igor/detection.cpp index 998efb0e31..d34b352dea 100644 --- a/engines/igor/detection.cpp +++ b/engines/igor/detection.cpp @@ -108,7 +108,13 @@ static const Common::ADParams igorDetectionParams = { static bool Engine_IGOR_createInstance(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) { const IgorGameDescription *gd = (const IgorGameDescription *)(encapsulatedDesc.realDesc); if (gd) { - *engine = new Igor::IgorEngine(syst, gd->gameVersion, gd->gameFlags, gd->desc.language); + Igor::DetectedGameVersion dgv; + dgv.version = gd->gameVersion; + dgv.flags = gd->gameFlags; + dgv.language = gd->desc.language; + dgv.ovlFileName = gd->desc.filesDescriptions[0].fileName; + dgv.sfxFileName = gd->desc.filesDescriptions[1].fileName; + *engine = new Igor::IgorEngine(syst, &dgv); } return gd != 0; } diff --git a/engines/igor/igor.cpp b/engines/igor/igor.cpp index f4de78434a..2bd6f3b69a 100644 --- a/engines/igor/igor.cpp +++ b/engines/igor/igor.cpp @@ -36,8 +36,8 @@ namespace Igor { -IgorEngine::IgorEngine(OSystem *system, int gameVersion, int gameFlags, Common::Language language) - : Engine(system), _gameVersion(gameVersion), _gameFlags(gameFlags), _gameLanguage(language) { +IgorEngine::IgorEngine(OSystem *system, const DetectedGameVersion *dgv) + : Engine(system), _game(*dgv) { _screenVGA = (uint8 *)malloc(320 * 200); for (int i = 0; i < 4; ++i) { @@ -59,7 +59,7 @@ IgorEngine::IgorEngine(OSystem *system, int gameVersion, int gameFlags, Common:: Common::addSpecialDebugLevel(kDebugWalk, "Walk", "Walk debug level"); Common::addSpecialDebugLevel(kDebugGame, "Game", "Game debug level"); - if (gameFlags & kFlagFloppy) { + if (_game.flags & kFlagFloppy) { _midiPlayer = new MidiPlayer(this); } else { _midiPlayer = 0; @@ -176,17 +176,11 @@ int IgorEngine::go() { if (_currentPart == 0) { _currentPart = kStartupPart; } - const char *ovlFileName = "IGOR.DAT"; - const char *fsdFileName = "IGOR.FSD"; - if (_gameFlags & kFlagTalkie) { - ovlFileName = "IGOR.EXE"; - fsdFileName = "IGOR.DAT"; + if (!_ovlFile.open(_game.ovlFileName)) { + error("Unable to open '%s'", _game.ovlFileName); } - if (!_ovlFile.open(ovlFileName)) { - error("Unable to open '%s'", ovlFileName); - } - if (!_sndFile.open(fsdFileName)) { - error("Unable to open '%s'", fsdFileName); + if (!_sndFile.open(_game.sfxFileName)) { + error("Unable to open '%s'", _game.sfxFileName); } readTableFile(); loadMainTexts(); @@ -204,7 +198,7 @@ int IgorEngine::go() { void IgorEngine::readTableFile() { Common::File tblFile; uint32 stringsEntriesOffset = 0, resourcesEntriesOffset = 0, soundEntriesOffset = 0; - if (tblFile.open("IGOR.TBL") && tblFile.readUint32BE() == MKID_BE('ITBL') && tblFile.readUint32BE() == 3) { + if (tblFile.open("IGOR.TBL") && tblFile.readUint32BE() == MKID_BE('ITBL') && tblFile.readUint32BE() == 4) { stringsEntriesOffset = tblFile.readUint32BE(); uint32 borlandOverlaySize = _ovlFile.size(); int gameVersionsCount = tblFile.readByte(); @@ -239,7 +233,7 @@ void IgorEngine::readTableFile() { int id = tblFile.readUint16BE(); int lang = tblFile.readByte(); int len = tblFile.readByte(); - bool skipString = (lang == 1 && _gameLanguage != Common::EN_ANY) || (lang == 2 && _gameLanguage != Common::ES_ESP); + bool skipString = (lang == 1 && _game.language != Common::EN_ANY) || (lang == 2 && _game.language != Common::ES_ESP); if (skipString) { tblFile.skip(len); } else { @@ -254,7 +248,7 @@ void IgorEngine::readTableFile() { error("Unable to read 'IGOR.TBL'"); } -const char *IgorEngine::getString(int id) { +const char *IgorEngine::getString(int id) const { const char *str = 0; for (Common::Array<StringEntry>::const_iterator it = _stringEntries.begin(); it != _stringEntries.end(); ++it) { if ((*it).id == id) { @@ -322,7 +316,7 @@ void IgorEngine::waitForTimer(int ticks) { setCursor(_currentCursor); _currentCursor = (_currentCursor + 1) & 3; } - if (_gameFlags & kFlagFloppy) { + if (_game.flags & kFlagFloppy) { updateMusic(); } if (_gameTicks == 64) { @@ -362,7 +356,7 @@ void IgorEngine::startMusic(int cmf) { void IgorEngine::playMusic(int num) { debugC(9, kDebugEngine, "playMusic() %d", num); - if (_gameFlags & kFlagFloppy) { + if (_game.flags & kFlagFloppy) { static const int cmf[] = { 0, 0, CMF_2_1, CMF_3, CMF_4, 0, 0, CMF_7_1, CMF_8, CMF_9, CMF_10, CMF_11, CMF_12 }; assert(num < ARRAYSIZE(cmf) && cmf[num] != 0); _gameState.musicNum = num; @@ -420,7 +414,7 @@ void IgorEngine::playSound(int num, int type) { soundOffset = _soundOffsets[num]; soundType = Audio::Mixer::kSFXSoundType; soundHandle = &_sfxHandle; - } else if (type == 0 && (_gameFlags & kFlagTalkie) != 0 && num != kNoSpeechSound) { + } else if (type == 0 && (_game.flags & kFlagTalkie) != 0 && num != kNoSpeechSound) { if (_mixer->isSoundHandleActive(_speechHandle)) { _mixer->stopHandle(_speechHandle); } @@ -926,6 +920,25 @@ static void decodeMainString(const uint8 *src, char *dst) { void IgorEngine::loadMainTexts() { loadData(IMG_VerbsPanel, _verbsPanelBuffer); + if (_game.version == kIdSpaCD) { + const struct { + int strId; + int x; + } verbTexts[] = { + { STR_Talk, 21 }, + { STR_Take, 67 }, + { STR_Look, 113 }, + { STR_Use, 159 }, + { STR_Open, 205 }, + { STR_Close, 251 }, + { STR_Give, 297 } + }; + for (int i = 0; i < 7; ++i) { + const char *s = getString(verbTexts[i].strId); + int x = verbTexts[i].x - getStringWidth(s) / 2; + drawString(_verbsPanelBuffer, s, x, 0, 0xF2, -1, 0); + } + } int dataSize; uint8 *p = loadData(TXT_MainTable, 0, &dataSize); const uint8 *src = &p[0] + _language * 7; @@ -1044,47 +1057,60 @@ void IgorEngine::scrollPalette(int startColor, int endColor) { memcpy(&_currentPalette[endColor * 3], c, 3); } +void IgorEngine::drawChar(uint8 *dst, int chr, int x, int y, int color1, int color2, int color3) { + dst += y * 320 + x; + for (int j = 0; j < 11; ++j, dst += 320) { + uint32 chrLineMask = _fontData[chr * 11 + j]; + for (int i = 0; i < 9; ++i, chrLineMask >>= 2) { + switch (chrLineMask & 3) { + case 1: + dst[i] = color1; + break; + case 2: + if (color2 != -1) { + dst[i] = color2; + } + break; + case 3: + if (color3 != -1) { + dst[i] = color3; + } + break; + } + } + } +} + void IgorEngine::drawString(uint8 *dst, const char *s, int x, int y, int color1, int color2, int color3) { - int dx = 0; - while (*s) { + for (; *s; ++s) { if (*s == ' ') { - dx += 5; + x += 5; } else { - const int chr = _fontCharIndex[(uint8)*s]; - const int chrWidth = _fontCharWidth[chr]; - if (x + chrWidth > 320) { - break; + int chr = _fontCharIndex[(uint8)*s]; + if (chr == 99) { + continue; } - for (int j = 0; j < 11; ++j) { - uint8 *p = dst + (j + y) * 320 + x + dx; - uint32 chrMask = _fontData[chr * 11 + j]; - for (int i = 0; i < 9; ++i, chrMask >>= 2) { -// uint8 code = _fontData[(chr * 11 + j) * 9 + i]; - uint8 code = chrMask & 3; - if (code == 1) { - p[i] = color1; - } else if (code == 2 && color2 != -1) { - p[i] = color2; - } else if (code == 3 && color3 != -1) { - p[i] = color3; - } - } + if (x + _fontCharWidth[chr] > 320) { + break; } - dx += chrWidth; + drawChar(dst, chr, x, y, color1, color2, color3); + x += _fontCharWidth[chr]; } - ++s; } } int IgorEngine::getStringWidth(const char *s) const { int w = 0; - while (*s) { + for (; *s; ++s) { if (*s == ' ') { w += 5; } else { - w += _fontCharWidth[_fontCharIndex[(uint8)*s]]; + int chr = _fontCharIndex[(uint8)*s]; + if (chr == 99) { + continue; + } + w += _fontCharWidth[chr]; } - ++s; } return w; } @@ -1769,7 +1795,7 @@ void IgorEngine::enterPartLoop() { showCursor(); } _gameState.igorMoving = false; - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { CHECK_FOR_END_OF_DEMO(); } } diff --git a/engines/igor/igor.h b/engines/igor/igor.h index 1c5221eb0c..99155c5d43 100644 --- a/engines/igor/igor.h +++ b/engines/igor/igor.h @@ -127,6 +127,14 @@ enum InputVar { kInputVarCount }; +struct DetectedGameVersion { + int version; + int flags; + Common::Language language; + const char *ovlFileName; + const char *sfxFileName; +}; + struct DialogueText { int num; int count; @@ -301,7 +309,7 @@ public: typedef void (IgorEngine::*UpdateDialogueProc)(int action); typedef void (IgorEngine::*UpdateRoomBackgroundProc)(); - IgorEngine(OSystem *system, int gameVersion, int gameFlags, Common::Language language); + IgorEngine(OSystem *system, const DetectedGameVersion *dgv); virtual ~IgorEngine(); virtual int init(); @@ -322,7 +330,7 @@ protected: bool compareGameTick(int eq) const { return _gameTicks == (eq & ~7); } // { return _gameTicks == eq; } int getPart() const { return _currentPart / 10; } void readTableFile(); - const char *getString(int id); + const char *getString(int id) const; void restart(); void waitForTimer(int ticks = -1); void copyArea(uint8 *dst, int dstOffset, int dstPitch, const uint8 *src, int srcPitch, int w, int h, bool transparent = false); @@ -363,6 +371,7 @@ protected: void fadeInPalette(int count); void fadeOutPalette(int count); void scrollPalette(int startColor, int endColor); + void drawChar(uint8 *dst, int chr, int x, int y, int color1, int color2, int color3); void drawString(uint8 *dst, const char *s, int x, int y, int color1, int color2 = -1, int color3 = -1); int getStringWidth(const char *s) const; void drawActionSentence(const char *sentence, uint8 color); @@ -450,9 +459,7 @@ protected: uint32 _nextTimer; bool _fastMode; int _language; - int _gameVersion; - int _gameFlags; - Common::Language _gameLanguage; + DetectedGameVersion _game; WalkData _walkData[100]; uint8 _walkCurrentPos; diff --git a/engines/igor/menu.cpp b/engines/igor/menu.cpp index d991c47fa9..e947b9f198 100644 --- a/engines/igor/menu.cpp +++ b/engines/igor/menu.cpp @@ -337,7 +337,7 @@ void IgorEngine::handleOptionsMenu() { } void IgorEngine::handlePause() { - drawActionSentence("GAME PAUSED", 0xFB); + drawActionSentence(getString(STR_GamePaused), 0xFB); do { waitForTimer(); } while (!_inputVars[kInputPause]); diff --git a/engines/igor/midi.cpp b/engines/igor/midi.cpp index 28bf434293..f5e0d9ae74 100644 --- a/engines/igor/midi.cpp +++ b/engines/igor/midi.cpp @@ -128,7 +128,7 @@ int AdlibMidiDriver::open() { } memset(_adlibInstrumentsMappingTable, 0, sizeof(_adlibInstrumentsMappingTable)); adlibSetupCard(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true); + _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true); return 0; } diff --git a/engines/igor/parts/part_04.cpp b/engines/igor/parts/part_04.cpp index 2c7190a8e4..0c41843180 100644 --- a/engines/igor/parts/part_04.cpp +++ b/engines/igor/parts/part_04.cpp @@ -29,7 +29,7 @@ namespace Igor { void IgorEngine::PART_04_EXEC_ACTION(int action) { debugC(9, kDebugGame, "PART_04_EXEC_ACTION %d", action); - if (_gameFlags & kFlagDemo) { + if (_game.flags & kFlagDemo) { if (action == 102 || action == 103 || action == 104) { ADD_DIALOGUE_TEXT(102, 2); SET_DIALOGUE_TEXT(1, 1); diff --git a/engines/igor/parts/part_05.cpp b/engines/igor/parts/part_05.cpp index 16258546b3..08ebf31481 100644 --- a/engines/igor/parts/part_05.cpp +++ b/engines/igor/parts/part_05.cpp @@ -123,7 +123,7 @@ void IgorEngine::PART_05_ACTION_103() { } while (i != 3); addObjectToInventory(21, 56); _objectsState[60] = 1; - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } PART_05_HELPER_4(255); diff --git a/engines/igor/parts/part_14.cpp b/engines/igor/parts/part_14.cpp index f3c7c092f3..65361593b9 100644 --- a/engines/igor/parts/part_14.cpp +++ b/engines/igor/parts/part_14.cpp @@ -453,10 +453,10 @@ void IgorEngine::PART_14_HELPER_9() { drawActionSentence("", 253); break; case 2: - drawActionSentence("Push stone", 253); + drawActionSentence(getString(STR_PushStone), 253); break; case 3: - drawActionSentence("Exit", 253); + drawActionSentence(getString(STR_Exit), 253); break; } VAR_CURRENT_CHURCH_MOSAIC_STONE = VAR_NEW_CHURCH_MOSAIC_STONE; @@ -468,7 +468,7 @@ void IgorEngine::PART_14_HELPER_9() { _currentPart = 146; } if (area >= 1 && area <= 8) { - drawActionSentence("Push stone", 251); + drawActionSentence(getString(STR_PushStone), 251); hideCursor(); playSound(34, 1); switch (area) { diff --git a/engines/igor/parts/part_16.cpp b/engines/igor/parts/part_16.cpp index 01b1e7a32f..39856d321f 100644 --- a/engines/igor/parts/part_16.cpp +++ b/engines/igor/parts/part_16.cpp @@ -71,7 +71,7 @@ void IgorEngine::PART_16_ACTION_101() { } addObjectToInventory(20, 55); _objectsState[52] = 1; - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } ADD_DIALOGUE_TEXT(204, 3); diff --git a/engines/igor/parts/part_17.cpp b/engines/igor/parts/part_17.cpp index 27af8b320b..3e60e2f144 100644 --- a/engines/igor/parts/part_17.cpp +++ b/engines/igor/parts/part_17.cpp @@ -205,7 +205,7 @@ void IgorEngine::PART_17_ACTION_106() { _objectsState[3] = 1; PART_17_HELPER_1(255); UPDATE_OBJECT_STATE(4); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } --_walkDataLastIndex; diff --git a/engines/igor/parts/part_21.cpp b/engines/igor/parts/part_21.cpp index 3b41a73857..8e5ffb795a 100644 --- a/engines/igor/parts/part_21.cpp +++ b/engines/igor/parts/part_21.cpp @@ -203,7 +203,7 @@ void IgorEngine::PART_21_ACTION_111() { removeObjectFromInventory(56); _objectsState[65] = 1; PART_21_HELPER_1(255); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } ADD_DIALOGUE_TEXT(210, 2); diff --git a/engines/igor/parts/part_27.cpp b/engines/igor/parts/part_27.cpp index 59e0eb0411..fa228e2701 100644 --- a/engines/igor/parts/part_27.cpp +++ b/engines/igor/parts/part_27.cpp @@ -173,7 +173,7 @@ void IgorEngine::PART_27_ACTION_108() { } addObjectToInventory(23, 58); PART_27_HELPER_1(1); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } } @@ -196,7 +196,7 @@ void IgorEngine::PART_27_ACTION_110() { removeObjectFromInventory(55); PART_27_HELPER_1(255); _objectsState[107] = 1; - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } } diff --git a/engines/igor/parts/part_28.cpp b/engines/igor/parts/part_28.cpp index 1f8a2c23fd..397c8e9ddd 100644 --- a/engines/igor/parts/part_28.cpp +++ b/engines/igor/parts/part_28.cpp @@ -178,7 +178,7 @@ void IgorEngine::PART_28_ACTION_109() { ADD_DIALOGUE_TEXT(230, 1); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } } diff --git a/engines/igor/parts/part_33.cpp b/engines/igor/parts/part_33.cpp index 2e49e60e95..25137c1d9a 100644 --- a/engines/igor/parts/part_33.cpp +++ b/engines/igor/parts/part_33.cpp @@ -265,7 +265,7 @@ void IgorEngine::PART_33_ACTION_115() { } removeObjectFromInventory(67); PART_33_HELPER_1(255); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } ADD_DIALOGUE_TEXT(217, 2); diff --git a/engines/igor/parts/part_36.cpp b/engines/igor/parts/part_36.cpp index 261ddeb8f7..0f33b31bed 100644 --- a/engines/igor/parts/part_36.cpp +++ b/engines/igor/parts/part_36.cpp @@ -105,7 +105,7 @@ void IgorEngine::PART_36_ACTION_102() { addObjectToInventory(30, 65); _objectsState[88] = 1; PART_36_HELPER_1(255); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } } diff --git a/engines/igor/parts/part_37.cpp b/engines/igor/parts/part_37.cpp index 5d2f7b03ac..3c0bc3f9b6 100644 --- a/engines/igor/parts/part_37.cpp +++ b/engines/igor/parts/part_37.cpp @@ -82,7 +82,7 @@ void IgorEngine::PART_37_ACTION_102() { addObjectToInventory(32, 67); _objectsState[89] = 1; PART_37_HELPER_1(255); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { ++_demoActionsCounter; } } diff --git a/engines/igor/parts/part_90.cpp b/engines/igor/parts/part_90.cpp index 5a94f00b1f..70caf47f6c 100644 --- a/engines/igor/parts/part_90.cpp +++ b/engines/igor/parts/part_90.cpp @@ -28,6 +28,8 @@ namespace Igor { void IgorEngine::PART_90() { + const char *str; + memset(_currentPalette, 0, 768); setPaletteRange(0, 255); switch (_currentPart) { @@ -50,7 +52,8 @@ void IgorEngine::PART_90() { case 904: loadData(PAL_TitleScreen, _paletteBuffer); loadData(IMG_TitleScreen, _screenVGA); - drawString(_screenVGA, (_gameVersion == kIdEngDemo110) ? getString(STR_COPYRIGHT_1994) : getString(STR_COPYRIGHT_1995), 2, 187, 0xF5, 0, 0); + str = (_game.version == kIdEngDemo110) ? getString(STR_Copyright1994) : getString(STR_Copyright1995); + drawString(_screenVGA, str, 2, 187, 0xF5, 0, 0); break; } fadeInPalette(768); @@ -66,7 +69,7 @@ void IgorEngine::PART_90() { fadeOutPalette(768); if (_currentPart != kInvalidPart) { ++_currentPart; - if ((_gameVersion == kIdSpaCD && _currentPart == 904) || _currentPart == 905) { + if ((_game.version == kIdSpaCD && _currentPart == 904) || _currentPart == 905) { _currentPart = 850; } } diff --git a/engines/igor/parts/part_95.cpp b/engines/igor/parts/part_95.cpp index 41f6b1c7f5..2fbebf2cc0 100644 --- a/engines/igor/parts/part_95.cpp +++ b/engines/igor/parts/part_95.cpp @@ -35,65 +35,65 @@ struct SharewareScreenString { static const SharewareScreenString STR_SHAREWARE[] = { // 950 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 228, 70, STR_SHAREWARE_TEXT1 }, - { 228, 81, STR_SHAREWARE_TEXT2 }, - { 228, 96, STR_SHAREWARE_TEXT3 }, - { 228, 107, STR_SHAREWARE_TEXT4 }, - { 228, 122, STR_SHAREWARE_TEXT5 }, - { 228, 161, STR_SHAREWARE_PLACE_ORDER }, + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 228, 70, STR_SharewareText1 }, + { 228, 81, STR_SharewareText2 }, + { 228, 96, STR_SharewareText3 }, + { 228, 107, STR_SharewareText4 }, + { 228, 122, STR_SharewareText5 }, + { 228, 161, STR_SharewarePlaceOrder }, // 951 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 228, 42, STR_SHAREWARE_VERSION }, - { 228, 85, STR_SHAREWARE_ORDER_1 }, - { 228, 96, STR_SHAREWARE_ORDER_2 }, - { 228, 107, STR_SHAREWARE_ORDER_3 }, - { 228, 161, STR_SHAREWARE_ORDER_4 }, + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 228, 42, STR_SharewareVersion }, + { 228, 85, STR_SharewareOrder1 }, + { 228, 96, STR_SharewareOrder2 }, + { 228, 107, STR_SharewareOrder3 }, + { 228, 161, STR_SharewareOrder4 }, // 952 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 228, 42, STR_SHAREWARE_VERSION }, - { 228, 70, STR_SHAREWARE_SHIPPING_1 }, - { 228, 85, STR_SHAREWARE_SHIPPING_2 }, - { 228, 96, STR_SHAREWARE_SHIPPING_3 }, - { 228, 111, STR_SHAREWARE_SHIPPING_4 }, - { 228, 122, STR_SHAREWARE_SHIPPING_5 }, - { 228, 161, STR_SHAREWARE_PLACE_ORDER }, + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 228, 42, STR_SharewareVersion }, + { 228, 70, STR_SharewareShipping1 }, + { 228, 85, STR_SharewareShipping2 }, + { 228, 96, STR_SharewareShipping3 }, + { 228, 111, STR_SharewareShipping4 }, + { 228, 122, STR_SharewareShipping5 }, + { 228, 161, STR_SharewarePlaceOrder }, // 953 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 228, 42, STR_SHAREWARE_VERSION }, - { 228, 70, STR_SHAREWARE_SHIPPING_6 }, - { 228, 85, STR_SHAREWARE_SHIPPING_7 }, - { 228, 96, STR_SHAREWARE_SHIPPING_8 }, - { 228, 110, STR_SHAREWARE_SHIPPING_9 }, - { 228, 121, STR_SHAREWARE_SHIPPING_10 }, - { 228, 161, STR_SHAREWARE_PLACE_ORDER }, + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 228, 42, STR_SharewareVersion }, + { 228, 70, STR_SharewareShipping6 }, + { 228, 85, STR_SharewareShipping7 }, + { 228, 96, STR_SharewareShipping8 }, + { 228, 110, STR_SharewareShipping9 }, + { 228, 121, STR_SharewareShipping10 }, + { 228, 161, STR_SharewarePlaceOrder }, // 954 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 228, 42, STR_SHAREWARE_VERSION }, - { 228, 74, STR_SHAREWARE_OPTIK_ADDRESS_1 }, - { 228, 85, STR_SHAREWARE_OPTIK_ADDRESS_2 }, - { 228, 96, STR_SHAREWARE_OPTIK_ADDRESS_3 }, - { 228, 107, STR_SHAREWARE_OPTIK_ADDRESS_4 }, - { 228, 118, STR_SHAREWARE_OPTIK_ADDRESS_5 }, - { 228, 161, STR_SHAREWARE_PLACE_ORDER }, + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 228, 42, STR_SharewareVersion }, + { 228, 74, STR_SharewareOptikAddress1 }, + { 228, 85, STR_SharewareOptikAddress2 }, + { 228, 96, STR_SharewareOptikAddress3 }, + { 228, 107, STR_SharewareOptikAddress4 }, + { 228, 118, STR_SharewareOptikAddress5 }, + { 228, 161, STR_SharewarePlaceOrder }, // 955 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 240, 42, STR_SHAREWARE_VERSION }, - { 240, 79, STR_SHAREWARE_OPTIK_ADDRESS_6 }, - { 240, 90, STR_SHAREWARE_OPTIK_ADDRESS_7 }, - { 240, 101, STR_SHAREWARE_OPTIK_ADDRESS_8 }, - { 240, 112, STR_SHAREWARE_OPTIK_ADDRESS_9 }, - { 240, 161, STR_SHAREWARE_PLACE_ORDER }, + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 240, 42, STR_SharewareVersion }, + { 240, 79, STR_SharewareOptikAddress6 }, + { 240, 90, STR_SharewareOptikAddress7 }, + { 240, 101, STR_SharewareOptikAddress8 }, + { 240, 112, STR_SharewareOptikAddress9 }, + { 240, 161, STR_SharewarePlaceOrder }, // 956 - { 255, 30, STR_IGOR_OBJECTIVE_UIKOKAHONIA }, - { 228, 42, STR_SHAREWARE_VERSION }, - { 228, 64, STR_SHAREWARE_PENDULO_ADDRESS_1 }, - { 228, 80, STR_SHAREWARE_PENDULO_ADDRESS_2 }, - { 228, 91, STR_SHAREWARE_PENDULO_ADDRESS_3 }, - { 228, 102, STR_SHAREWARE_PENDULO_ADDRESS_4 }, - { 228, 113, STR_SHAREWARE_PENDULO_ADDRESS_5 }, - { 228, 128, STR_SHAREWARE_PENDULO_ADDRESS_6 }, - { 228, 161, STR_SHAREWARE_PLACE_ORDER } + { 255, 30, STR_IgorObjectiveUikokahonia }, + { 228, 42, STR_SharewareVersion }, + { 228, 64, STR_SharewarePenduloAddress1 }, + { 228, 80, STR_SharewarePenduloAddress2 }, + { 228, 91, STR_SharewarePenduloAddress3 }, + { 228, 102, STR_SharewarePenduloAddress4 }, + { 228, 113, STR_SharewarePenduloAddress5 }, + { 228, 128, STR_SharewarePenduloAddress6 }, + { 228, 161, STR_SharewarePlaceOrder }, }; void IgorEngine::PART_95() { @@ -106,7 +106,7 @@ void IgorEngine::PART_95() { case 950: loadData(PAL_Shareware1, _paletteBuffer); loadData(IMG_Shareware1, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 0; endStr = 6; } @@ -114,7 +114,7 @@ void IgorEngine::PART_95() { case 951: loadData(PAL_Shareware2, _paletteBuffer); loadData(IMG_Shareware2, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 7; endStr = 12; } @@ -122,7 +122,7 @@ void IgorEngine::PART_95() { case 952: loadData(PAL_Shareware3, _paletteBuffer); loadData(IMG_Shareware3, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 13; endStr = 19; } @@ -130,7 +130,7 @@ void IgorEngine::PART_95() { case 953: loadData(PAL_Shareware4, _paletteBuffer); loadData(IMG_Shareware4, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 20; endStr = 27; } @@ -138,7 +138,7 @@ void IgorEngine::PART_95() { case 954: loadData(PAL_Shareware5, _paletteBuffer); loadData(IMG_Shareware5, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 28; endStr = 35; } @@ -146,7 +146,7 @@ void IgorEngine::PART_95() { case 955: loadData(PAL_Shareware6, _paletteBuffer); loadData(IMG_Shareware6, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 36; endStr = 42; } @@ -154,7 +154,7 @@ void IgorEngine::PART_95() { case 956: loadData(PAL_Shareware7, _paletteBuffer); loadData(IMG_Shareware7, _screenVGA); - if (_gameVersion == kIdEngDemo110) { + if (_game.version == kIdEngDemo110) { startStr = 43; endStr = 51; } diff --git a/engines/igor/parts/part_main.cpp b/engines/igor/parts/part_main.cpp index 9d3abe429d..16f983e448 100644 --- a/engines/igor/parts/part_main.cpp +++ b/engines/igor/parts/part_main.cpp @@ -70,184 +70,192 @@ void IgorEngine::EXEC_MAIN_ACTION(int action) { } else { num = 14; } - ADD_DIALOGUE_TEXT(num, 1); + ADD_DIALOGUE_TEXT(num, 1, num); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); } break; case 3: - ADD_DIALOGUE_TEXT(15, 1); + ADD_DIALOGUE_TEXT(15, 1, 15); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 4: - ADD_DIALOGUE_TEXT(10, 1); + ADD_DIALOGUE_TEXT(10, 1, 10); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 5: - ADD_DIALOGUE_TEXT(9, 1); + ADD_DIALOGUE_TEXT(9, 1, 9); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 6: - ADD_DIALOGUE_TEXT(8, 1); + ADD_DIALOGUE_TEXT(8, 1, 8); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 7: - ADD_DIALOGUE_TEXT(6, 1); + ADD_DIALOGUE_TEXT(6, 1, 6); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 8: - ADD_DIALOGUE_TEXT(7, 1); + ADD_DIALOGUE_TEXT(7, 1, 7); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; - case 9: - ADD_DIALOGUE_TEXT(16 + getRandomNumber(2), 1); - SET_DIALOGUE_TEXT(1, 1); - startIgorDialogue(); + case 9: { + int num = 16 + getRandomNumber(2); + ADD_DIALOGUE_TEXT(num, 1, num); + SET_DIALOGUE_TEXT(1, 1); + startIgorDialogue(); + } break; case 10: - ADD_DIALOGUE_TEXT(18, 1); + ADD_DIALOGUE_TEXT(18, 1, 18); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 11: - ADD_DIALOGUE_TEXT(19, 1); + ADD_DIALOGUE_TEXT(19, 1, 19); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; - case 12: - ADD_DIALOGUE_TEXT(20 + getRandomNumber(2), 1); - SET_DIALOGUE_TEXT(1, 1); - startIgorDialogue(); + case 12: { + int num = 20 + getRandomNumber(2); + ADD_DIALOGUE_TEXT(num, 1, num); + SET_DIALOGUE_TEXT(1, 1); + startIgorDialogue(); + } break; case 13: - ADD_DIALOGUE_TEXT(22, 1); + ADD_DIALOGUE_TEXT(22, 1, 22); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 14: - ADD_DIALOGUE_TEXT(23, 1); + ADD_DIALOGUE_TEXT(23, 1, 23); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 15: - ADD_DIALOGUE_TEXT(24, 1); + ADD_DIALOGUE_TEXT(24, 1, 24); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 16: - ADD_DIALOGUE_TEXT(25, 1); + ADD_DIALOGUE_TEXT(25, 1, 25); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; - case 17: - ADD_DIALOGUE_TEXT(26 + getRandomNumber(2), 1); - SET_DIALOGUE_TEXT(1, 1); - startIgorDialogue(); + case 17: { + int num = 26 + getRandomNumber(2); + ADD_DIALOGUE_TEXT(num, 1, num); + SET_DIALOGUE_TEXT(1, 1); + startIgorDialogue(); + } break; case 18: - ADD_DIALOGUE_TEXT(28, 1); + ADD_DIALOGUE_TEXT(28, 1, 28); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 19: - ADD_DIALOGUE_TEXT(4, 1); + ADD_DIALOGUE_TEXT(4, 1, 4); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 20: - ADD_DIALOGUE_TEXT(5, 1); + ADD_DIALOGUE_TEXT(5, 1, 5); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; - case 21: - ADD_DIALOGUE_TEXT(1 + getRandomNumber(3), 1); - SET_DIALOGUE_TEXT(1, 1); - startIgorDialogue(); + case 21: { + int num = 1 + getRandomNumber(3); + ADD_DIALOGUE_TEXT(num, 1, num); + SET_DIALOGUE_TEXT(1, 1); + startIgorDialogue(); + } break; case 22: - ADD_DIALOGUE_TEXT(51, 1); - ADD_DIALOGUE_TEXT(52, 1); + ADD_DIALOGUE_TEXT(51, 1, 32); + ADD_DIALOGUE_TEXT(52, 1, 33); SET_DIALOGUE_TEXT(1, 2); startIgorDialogue(); break; case 23: - ADD_DIALOGUE_TEXT(53, 1); + ADD_DIALOGUE_TEXT(53, 1, 34); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 24: - ADD_DIALOGUE_TEXT(54, 1); + ADD_DIALOGUE_TEXT(54, 1, 35); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 25: - ADD_DIALOGUE_TEXT(55, 3); + ADD_DIALOGUE_TEXT(55, 3, 36); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 26: - ADD_DIALOGUE_TEXT(58, 1); + ADD_DIALOGUE_TEXT(58, 1, 37); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 27: - ADD_DIALOGUE_TEXT(59, 2); + ADD_DIALOGUE_TEXT(59, 2, 38); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 28: - ADD_DIALOGUE_TEXT(61, 1); + ADD_DIALOGUE_TEXT(61, 1, 39); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 29: - ADD_DIALOGUE_TEXT(62, 1); + ADD_DIALOGUE_TEXT(62, 1, 40); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 30: - ADD_DIALOGUE_TEXT(64, 1); + ADD_DIALOGUE_TEXT(64, 1, 42); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 31: - ADD_DIALOGUE_TEXT(63, 1); + ADD_DIALOGUE_TEXT(63, 1, 41); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 32: - ADD_DIALOGUE_TEXT(65, 1); + ADD_DIALOGUE_TEXT(65, 1, 43); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 33: - ADD_DIALOGUE_TEXT(66, 1); + ADD_DIALOGUE_TEXT(66, 1, 44); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 34: - ADD_DIALOGUE_TEXT(30, 1); + ADD_DIALOGUE_TEXT(30, 1, 30); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 35: - ADD_DIALOGUE_TEXT(29, 1); + ADD_DIALOGUE_TEXT(29, 1, 29); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 36: - ADD_DIALOGUE_TEXT(67, 2); + ADD_DIALOGUE_TEXT(67, 2, 45); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 37: - ADD_DIALOGUE_TEXT(69, 1); + ADD_DIALOGUE_TEXT(69, 1, 46); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; @@ -255,22 +263,22 @@ void IgorEngine::EXEC_MAIN_ACTION(int action) { EXEC_MAIN_ACTION_38(); break; case 39: - ADD_DIALOGUE_TEXT(70, 1); + ADD_DIALOGUE_TEXT(70, 1, 47); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 40: - ADD_DIALOGUE_TEXT(71, 1); + ADD_DIALOGUE_TEXT(71, 1, 48); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 41: - ADD_DIALOGUE_TEXT(72, 1); + ADD_DIALOGUE_TEXT(72, 1, 49); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 42: - ADD_DIALOGUE_TEXT(73, 1); + ADD_DIALOGUE_TEXT(73, 1, 50); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; @@ -278,57 +286,57 @@ void IgorEngine::EXEC_MAIN_ACTION(int action) { EXEC_MAIN_ACTION_43(); break; case 44: - ADD_DIALOGUE_TEXT(156, 1); + ADD_DIALOGUE_TEXT(156, 1, 80); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 45: - ADD_DIALOGUE_TEXT(92, 1); - ADD_DIALOGUE_TEXT(93, 3); + ADD_DIALOGUE_TEXT(92, 1, 64); + ADD_DIALOGUE_TEXT(93, 3, 65); SET_DIALOGUE_TEXT(1, 2); startIgorDialogue(); break; case 46: if (_objectsState[3] == 0) { - ADD_DIALOGUE_TEXT(85, 1); + ADD_DIALOGUE_TEXT(85, 1, 60); } else { - ADD_DIALOGUE_TEXT(86, 2); + ADD_DIALOGUE_TEXT(86, 2, 61); } SET_DIALOGUE_TEXT(1, 2); startIgorDialogue(); break; case 48: - ADD_DIALOGUE_TEXT(77 + _objectsState[0], 1); + ADD_DIALOGUE_TEXT(77 + _objectsState[0], 1, 53 + _objectsState[0]); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); case 50: if (_objectsState[1] == 0) { - ADD_DIALOGUE_TEXT(80, 1); - ADD_DIALOGUE_TEXT(81, 1); + ADD_DIALOGUE_TEXT(80, 1, 56); + ADD_DIALOGUE_TEXT(81, 1, 57); SET_DIALOGUE_TEXT(1, 2); startIgorDialogue(); } else { - ADD_DIALOGUE_TEXT(82, 1); + ADD_DIALOGUE_TEXT(82, 1, 58); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); } break; case 51: if (_objectsState[7] == 0) { - ADD_DIALOGUE_TEXT(157, 1); + ADD_DIALOGUE_TEXT(157, 1, 81); } else { - ADD_DIALOGUE_TEXT(158, 1); + ADD_DIALOGUE_TEXT(158, 1, 82); } SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 52: - ADD_DIALOGUE_TEXT(89, 2); + ADD_DIALOGUE_TEXT(89, 2, 63); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 53: - ADD_DIALOGUE_TEXT(88, 1); + ADD_DIALOGUE_TEXT(88, 1, 62); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; @@ -336,46 +344,46 @@ void IgorEngine::EXEC_MAIN_ACTION(int action) { EXEC_MAIN_ACTION_54(); break; case 55: - ADD_DIALOGUE_TEXT(159, 1); + ADD_DIALOGUE_TEXT(159, 1, 83); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 56: - ADD_DIALOGUE_TEXT(160, 1); + ADD_DIALOGUE_TEXT(160, 1, 84); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 57: - ADD_DIALOGUE_TEXT(31, 1); + ADD_DIALOGUE_TEXT(31, 1, 31); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 58: - ADD_DIALOGUE_TEXT(140, 1); - ADD_DIALOGUE_TEXT(141, 1); - ADD_DIALOGUE_TEXT(142, 1); - ADD_DIALOGUE_TEXT(143, 1); + ADD_DIALOGUE_TEXT(140, 1, 70); + ADD_DIALOGUE_TEXT(141, 1, 71); + ADD_DIALOGUE_TEXT(142, 1, 72); + ADD_DIALOGUE_TEXT(143, 1, 73); SET_DIALOGUE_TEXT(1, 4); startIgorDialogue(); _objectsState[4] = 2; break; case 59: - ADD_DIALOGUE_TEXT(97, 2); + ADD_DIALOGUE_TEXT(97, 2, 67); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 60: - ADD_DIALOGUE_TEXT(161, 1); + ADD_DIALOGUE_TEXT(161, 1, 85); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 61: if (_inventoryInfo[51] != 0) { - ADD_DIALOGUE_TEXT(76, 1); + ADD_DIALOGUE_TEXT(76, 1, 52); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); } else { - ADD_DIALOGUE_TEXT(74, 2); + ADD_DIALOGUE_TEXT(74, 2, 51); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); addObjectToInventory(16, 51); @@ -391,12 +399,12 @@ void IgorEngine::EXEC_MAIN_ACTION(int action) { _objectsState[1] = 1; UPDATE_OBJECT_STATE(2); addObjectToInventory(24, 59); - ADD_DIALOGUE_TEXT(169, 1); + ADD_DIALOGUE_TEXT(169, 1, 93); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 63: - ADD_DIALOGUE_TEXT(170, 1); + ADD_DIALOGUE_TEXT(170, 1, 94); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); _inventoryImages[_inventoryInfo[68] - 1] = 0; @@ -411,37 +419,37 @@ void IgorEngine::EXEC_MAIN_ACTION(int action) { break; case 64: if (_objectsState[6] == 0) { - ADD_DIALOGUE_TEXT(162, 1); + ADD_DIALOGUE_TEXT(162, 1, 86); } else if (_objectsState[6] == 1) { - ADD_DIALOGUE_TEXT(163, 1); + ADD_DIALOGUE_TEXT(163, 1, 87); } else if (_objectsState[6] == 2) { - ADD_DIALOGUE_TEXT(164, 1); + ADD_DIALOGUE_TEXT(164, 1, 88); } SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 65: - ADD_DIALOGUE_TEXT(165, 1); + ADD_DIALOGUE_TEXT(165, 1, 89); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 66: - ADD_DIALOGUE_TEXT(166, 1); + ADD_DIALOGUE_TEXT(166, 1, 90); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 67: - ADD_DIALOGUE_TEXT(167, 1); + ADD_DIALOGUE_TEXT(167, 1, 91); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 68: - ADD_DIALOGUE_TEXT(168, 1); + ADD_DIALOGUE_TEXT(168, 1, 92); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; case 69: - ADD_DIALOGUE_TEXT(96, 1); + ADD_DIALOGUE_TEXT(96, 1, 66); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); break; @@ -469,17 +477,17 @@ void IgorEngine::EXEC_MAIN_ACTION_38() { wd->x = 80; wd->y = 130; wd->scaleWidth = 50; - ADD_DIALOGUE_TEXT(144, 1); - ADD_DIALOGUE_TEXT(145, 3); - ADD_DIALOGUE_TEXT(148, 2); - ADD_DIALOGUE_TEXT(150, 2); + ADD_DIALOGUE_TEXT(144, 1, 74); + ADD_DIALOGUE_TEXT(145, 3, 75); + ADD_DIALOGUE_TEXT(148, 2, 76); + ADD_DIALOGUE_TEXT(150, 2, 77); SET_DIALOGUE_TEXT(1, 4); startIgorDialogue(); waitForEndOfIgorDialogue(); wd->x = 240; wd->y = 130; - ADD_DIALOGUE_TEXT(152, 1); - ADD_DIALOGUE_TEXT(153, 3); + ADD_DIALOGUE_TEXT(152, 1, 78); + ADD_DIALOGUE_TEXT(153, 3, 79); SET_DIALOGUE_TEXT(1, 2); startIgorDialogue(); waitForEndOfIgorDialogue(); @@ -514,7 +522,7 @@ void IgorEngine::EXEC_MAIN_ACTION_43() { wd->x = 160; wd->y = 130; wd->scaleWidth = 50; - ADD_DIALOGUE_TEXT(83, 2); + ADD_DIALOGUE_TEXT(83, 2, 59); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); waitForEndOfIgorDialogue(); @@ -551,9 +559,9 @@ void IgorEngine::EXEC_MAIN_ACTION_54() { wd->y = 130; wd->scaleWidth = 50; if (_objectsState[2] == 0) { - ADD_DIALOGUE_TEXT(99, 1); + ADD_DIALOGUE_TEXT(99, 1, 68); } else { - ADD_DIALOGUE_TEXT(100, 2); + ADD_DIALOGUE_TEXT(100, 2, 69); } SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); @@ -591,13 +599,13 @@ void IgorEngine::UPDATE_OBJECT_STATE(int num) { if (num == 1 || num == 255) { switch (_objectsState[0]) { case 0: - strcpy(_globalObjectNames[23], " bottle of whisky"); + strcpy(_globalObjectNames[23], getString(STR_BottleOfWhisky)); break; case 1: - strcpy(_globalObjectNames[23], " empty bottle"); + strcpy(_globalObjectNames[23], getString(STR_EmptyBottle)); break; case 2: - strcpy(_globalObjectNames[23], " bottle of water"); + strcpy(_globalObjectNames[23], getString(STR_BottleOfWater)); break; } } @@ -605,21 +613,21 @@ void IgorEngine::UPDATE_OBJECT_STATE(int num) { switch (_objectsState[1]) { case 0: _inventoryImages[23] = 27; - strcpy(_globalObjectNames[24], " lizard"); + strcpy(_globalObjectNames[24], getString(STR_Lizard)); break; default: _inventoryImages[23] = 35; - strcpy(_globalObjectNames[24], " fat lizard"); + strcpy(_globalObjectNames[24], getString(STR_FatLizard)); break; } } if (num == 4 || num == 255) { switch (_objectsState[3]) { case 0: - strcpy(_globalObjectNames[22], " Caroline%s folder"); + strcpy(_globalObjectNames[22], getString(STR_CarolineFolder)); break; case 1: - strcpy(_globalObjectNames[22], " Philip%s folder"); + strcpy(_globalObjectNames[22], getString(STR_PhilipFolder)); break; } } @@ -638,10 +646,10 @@ void IgorEngine::UPDATE_OBJECT_STATE(int num) { } if (num == 8 || num == 255) { if (_objectsState[7] == 0) { - strcpy(_globalObjectNames[25], " statuette"); + strcpy(_globalObjectNames[25], getString(STR_Statuette)); _inventoryImages[24] = 29; } else { - strcpy(_globalObjectNames[25], " reward"); + strcpy(_globalObjectNames[25], getString(STR_Reward)); _inventoryImages[24] = 39; } } @@ -707,44 +715,44 @@ void IgorEngine::PART_MARGARET_ROOM_CUTSCENE() { _gameState.igorMoving = false; switch (VAR_MARGARET_ROOM_ANIM_COUNTER) { case 1: - ADD_DIALOGUE_TEXT(223, 1); - ADD_DIALOGUE_TEXT(224, 1); - ADD_DIALOGUE_TEXT(225, 1); + ADD_DIALOGUE_TEXT(223, 1, 1118); + ADD_DIALOGUE_TEXT(224, 1, 1119); + ADD_DIALOGUE_TEXT(225, 1, 1120); break; case 2: - ADD_DIALOGUE_TEXT(201, 1); - ADD_DIALOGUE_TEXT(202, 1); - ADD_DIALOGUE_TEXT(203, 1); + ADD_DIALOGUE_TEXT(201, 1, 1097); + ADD_DIALOGUE_TEXT(202, 1, 1098); + ADD_DIALOGUE_TEXT(203, 1, 1099); break; case 3: - ADD_DIALOGUE_TEXT(204, 1); - ADD_DIALOGUE_TEXT(205, 1); - ADD_DIALOGUE_TEXT(206, 1); + ADD_DIALOGUE_TEXT(204, 1, 1100); + ADD_DIALOGUE_TEXT(205, 1, 1101); + ADD_DIALOGUE_TEXT(206, 1, 1102); break; case 4: - ADD_DIALOGUE_TEXT(207, 1); - ADD_DIALOGUE_TEXT(208, 1); - ADD_DIALOGUE_TEXT(209, 1); + ADD_DIALOGUE_TEXT(207, 1, 1103); + ADD_DIALOGUE_TEXT(208, 1, 1104); + ADD_DIALOGUE_TEXT(209, 1, 1105); break; case 5: - ADD_DIALOGUE_TEXT(210, 1); - ADD_DIALOGUE_TEXT(211, 1); - ADD_DIALOGUE_TEXT(212, 1); + ADD_DIALOGUE_TEXT(210, 1, 1106); + ADD_DIALOGUE_TEXT(211, 1, 1107); + ADD_DIALOGUE_TEXT(212, 1, 1108); break; case 6: - ADD_DIALOGUE_TEXT(213, 2); - ADD_DIALOGUE_TEXT(215, 1); - ADD_DIALOGUE_TEXT(216, 1); + ADD_DIALOGUE_TEXT(213, 2, 1109); + ADD_DIALOGUE_TEXT(215, 1, 1110); + ADD_DIALOGUE_TEXT(216, 1, 1111); break; case 7: - ADD_DIALOGUE_TEXT(217, 1); - ADD_DIALOGUE_TEXT(218, 1); - ADD_DIALOGUE_TEXT(219, 1); + ADD_DIALOGUE_TEXT(217, 1, 1112); + ADD_DIALOGUE_TEXT(218, 1, 1113); + ADD_DIALOGUE_TEXT(219, 1, 1114); break; case 8: - ADD_DIALOGUE_TEXT(220, 1); - ADD_DIALOGUE_TEXT(221, 1); - ADD_DIALOGUE_TEXT(222, 1); + ADD_DIALOGUE_TEXT(220, 1, 1115); + ADD_DIALOGUE_TEXT(221, 1, 1116); + ADD_DIALOGUE_TEXT(222, 1, 1117); break; } SET_DIALOGUE_TEXT(1, 3); @@ -972,7 +980,7 @@ void IgorEngine::PART_MAIN() { _gameState.nextMusicCounter = 0; } } while (_currentPart != kInvalidPart && !_eventQuitGame); - if (_gameFlags & kFlagDemo) { + if (_game.flags & kFlagDemo) { for (_currentPart = kSharewarePart; !_eventQuitGame && _currentPart <= kSharewarePart + 6; ++_currentPart) { PART_95(); } diff --git a/engines/igor/resource_ids.h b/engines/igor/resource_ids.h index 826e68dc6a..5920b2c521 100644 --- a/engines/igor/resource_ids.h +++ b/engines/igor/resource_ids.h @@ -332,56 +332,117 @@ #define IMG_InventoryPanel 332 #define IMG_Objects 333 #define DAT_Physicsclassroom 334 -#define FRM_IgorDirBack2 335 -#define FRM_IgorDirRight2 336 -#define FRM_IgorDirFront2 337 -#define FRM_IgorDirLeft2 338 -#define FRM_IgorHead2 339 -#define STR_COPYRIGHT_1995 340 -#define STR_COPYRIGHT_1994 341 -#define STR_BOTTLE_OF_WHISKY 342 -#define STR_EMPTY_BOTTLE 343 -#define STR_BOTTLE_OF_WATER 344 -#define STR_LIZARD 345 -#define STR_FAT_LIZARD 346 -#define STR_CAROLINE_FOLDER 347 -#define STR_PHILIP_FOLDER 348 -#define STR_STATUETTE 349 -#define STR_REWARD 350 -#define STR_IGOR_OBJECTIVE_UIKOKAHONIA 351 -#define STR_SHAREWARE_VERSION 352 -#define STR_SHAREWARE_PLACE_ORDER 353 -#define STR_SHAREWARE_TEXT1 354 -#define STR_SHAREWARE_TEXT2 355 -#define STR_SHAREWARE_TEXT3 356 -#define STR_SHAREWARE_TEXT4 357 -#define STR_SHAREWARE_TEXT5 358 -#define STR_SHAREWARE_ORDER_1 359 -#define STR_SHAREWARE_ORDER_2 360 -#define STR_SHAREWARE_ORDER_3 361 -#define STR_SHAREWARE_ORDER_4 362 -#define STR_SHAREWARE_SHIPPING_1 363 -#define STR_SHAREWARE_SHIPPING_2 364 -#define STR_SHAREWARE_SHIPPING_3 365 -#define STR_SHAREWARE_SHIPPING_4 366 -#define STR_SHAREWARE_SHIPPING_5 367 -#define STR_SHAREWARE_SHIPPING_6 368 -#define STR_SHAREWARE_SHIPPING_7 369 -#define STR_SHAREWARE_SHIPPING_8 370 -#define STR_SHAREWARE_SHIPPING_9 371 -#define STR_SHAREWARE_SHIPPING_10 372 -#define STR_SHAREWARE_OPTIK_ADDRESS_1 373 -#define STR_SHAREWARE_OPTIK_ADDRESS_2 374 -#define STR_SHAREWARE_OPTIK_ADDRESS_3 375 -#define STR_SHAREWARE_OPTIK_ADDRESS_4 376 -#define STR_SHAREWARE_OPTIK_ADDRESS_5 377 -#define STR_SHAREWARE_OPTIK_ADDRESS_6 378 -#define STR_SHAREWARE_OPTIK_ADDRESS_7 379 -#define STR_SHAREWARE_OPTIK_ADDRESS_8 380 -#define STR_SHAREWARE_OPTIK_ADDRESS_9 381 -#define STR_SHAREWARE_PENDULO_ADDRESS_1 382 -#define STR_SHAREWARE_PENDULO_ADDRESS_2 383 -#define STR_SHAREWARE_PENDULO_ADDRESS_3 384 -#define STR_SHAREWARE_PENDULO_ADDRESS_4 385 -#define STR_SHAREWARE_PENDULO_ADDRESS_5 386 -#define STR_SHAREWARE_PENDULO_ADDRESS_6 387 +#define DAT_ParkRight 335 +#define DAT_ParkLeft 336 +#define FRM_Park1 337 +#define FRM_Park2 338 +#define FRM_Park3 339 +#define FRM_Park4 340 +#define TXT_Park 341 +#define IMG_Park 342 +#define PAL_Park 343 +#define MSK_Park 344 +#define BOX_Park 345 +#define DAT_OutsideAdministrationBuilding 346 +#define FRM_OutsideAdministrationBuilding1 347 +#define FRM_OutsideAdministrationBuilding2 348 +#define FRM_OutsideAdministrationBuilding3 349 +#define FRM_OutsideAdministrationBuilding4 350 +#define FRM_OutsideAdministrationBuilding5 351 +#define DAT_DeanPepperOffice 352 +#define DAT_AdministrationSecretaryRoom 353 +#define TXT_AdministrationSecretaryRoom 354 +#define IMG_AdministrationSecretaryRoom 355 +#define PAL_AdministrationSecretaryRoom 356 +#define MSK_AdministrationSecretaryRoom 357 +#define BOX_AdministrationSecretaryRoom 358 +#define FRM_DeanPepperOffice1 359 +#define FRM_DeanPepperOffice2 360 +#define FRM_DeanPepperOffice3 361 +#define FRM_DeanPepperOffice4 362 +#define FRM_DeanPepperOffice5 363 +#define FRM_DeanPepperOffice6 364 +#define FRM_DeanPepperOffice7 365 +#define FRM_DeanPepperOffice8 366 +#define FRM_DeanPepperOffice9 367 +#define FRM_DeanPepperOffice10 368 +#define FRM_DeanPepperOffice11 369 +#define FRM_DeanPepperOffice12 370 +#define FRM_DeanPepperOffice13 371 +#define FRM_DeanPepperOffice14 372 +#define FRM_DeanPepperOffice15 373 +#define FRM_DeanPepperOffice16 374 +#define TXT_DeanPepperOffice 375 +#define IMG_DeanPepperOffice 376 +#define PAL_DeanPepperOffice 377 +#define MSK_DeanPepperOffice 378 +#define BOX_DeanPepperOffice 379 +#define DAT_StudentDormitoryRoom 380 +#define TXT_StudentDormitoryRoom 381 +#define IMG_StudentDormitoryRoom 382 +#define PAL_StudentDormitoryRoom 383 +#define MSK_StudentDormitoryRoom 384 +#define BOX_StudentDormitoryRoom 385 +#define FRM_IgorDirBack2 386 +#define FRM_IgorDirRight2 387 +#define FRM_IgorDirFront2 388 +#define FRM_IgorDirLeft2 389 +#define FRM_IgorHead2 390 +#define STR_Copyright1995 391 +#define STR_Copyright1994 392 +#define STR_BottleOfWhisky 393 +#define STR_EmptyBottle 394 +#define STR_BottleOfWater 395 +#define STR_Lizard 396 +#define STR_FatLizard 397 +#define STR_CarolineFolder 398 +#define STR_PhilipFolder 399 +#define STR_Statuette 400 +#define STR_Reward 401 +#define STR_Talk 402 +#define STR_Take 403 +#define STR_Look 404 +#define STR_Use 405 +#define STR_Open 406 +#define STR_Close 407 +#define STR_Give 408 +#define STR_PushStone 409 +#define STR_Exit 410 +#define STR_GamePaused 411 +#define STR_IgorObjectiveUikokahonia 412 +#define STR_SharewareVersion 413 +#define STR_SharewarePlaceOrder 414 +#define STR_SharewareText1 415 +#define STR_SharewareText2 416 +#define STR_SharewareText3 417 +#define STR_SharewareText4 418 +#define STR_SharewareText5 419 +#define STR_SharewareOrder1 420 +#define STR_SharewareOrder2 421 +#define STR_SharewareOrder3 422 +#define STR_SharewareOrder4 423 +#define STR_SharewareShipping1 424 +#define STR_SharewareShipping2 425 +#define STR_SharewareShipping3 426 +#define STR_SharewareShipping4 427 +#define STR_SharewareShipping5 428 +#define STR_SharewareShipping6 429 +#define STR_SharewareShipping7 430 +#define STR_SharewareShipping8 431 +#define STR_SharewareShipping9 432 +#define STR_SharewareShipping10 433 +#define STR_SharewareOptikAddress1 434 +#define STR_SharewareOptikAddress2 435 +#define STR_SharewareOptikAddress3 436 +#define STR_SharewareOptikAddress4 437 +#define STR_SharewareOptikAddress5 438 +#define STR_SharewareOptikAddress6 439 +#define STR_SharewareOptikAddress7 440 +#define STR_SharewareOptikAddress8 441 +#define STR_SharewareOptikAddress9 442 +#define STR_SharewarePenduloAddress1 443 +#define STR_SharewarePenduloAddress2 444 +#define STR_SharewarePenduloAddress3 445 +#define STR_SharewarePenduloAddress4 446 +#define STR_SharewarePenduloAddress5 447 +#define STR_SharewarePenduloAddress6 448 diff --git a/engines/igor/staticres.cpp b/engines/igor/staticres.cpp index 382c924136..e5df644c5e 100644 --- a/engines/igor/staticres.cpp +++ b/engines/igor/staticres.cpp @@ -34,7 +34,7 @@ const uint8 IgorEngine::_sentenceColorIndex[]= { 0xFD, 0xFB, 0xF1 }; const uint8 IgorEngine::_fontCharIndex[] = { 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, - 0x5E, 0x53, 0x51, 0x59, 0x5D, 0x5A, 0x5C, 0x63, 0x44, 0x45, 0x63, 0x47, 0x4D, 0x46, 0x4F, 0x4B, + 0x5F, 0x53, 0x51, 0x59, 0x5D, 0x5A, 0x5C, 0x63, 0x44, 0x45, 0x63, 0x47, 0x4D, 0x46, 0x4F, 0x4B, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x50, 0x4E, 0x49, 0x48, 0x4A, 0x55, 0x5B, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x57, 0x4C, 0x58, 0x63, 0x63, @@ -47,7 +47,7 @@ const uint8 IgorEngine::_fontCharIndex[] = { 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, - 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63 + 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x5E, 0x63, 0x63, 0x63, 0x63, 0x63 }; const uint8 IgorEngine::_fontCharWidth[] = { @@ -237,8 +237,7 @@ const float IgorEngine::_walkScaleSpeedTable[] = { 5.0000, 5.2500, 5.5000, 5.6250, 5.6250, 5.6250, 5.6250, 5.6250, 5.6250, 5.6250 }; -// XXX split into 3 arrays (scaleTable ...), sizeof == 0x934 -const uint8 IgorEngine::_walkScaleTable[] = { // 0x769, 0x901 +const uint8 IgorEngine::_walkScaleTable[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, |