aboutsummaryrefslogtreecommitdiff
path: root/engines/igor/parts
diff options
context:
space:
mode:
authorGregory Montoir2007-11-25 23:27:51 +0000
committerGregory Montoir2007-11-25 23:27:51 +0000
commit798ce43e19f1f4ee5b95f4de291217bf25a342f9 (patch)
treeb4641214f0b39923c249eaec3ce1a62982cebaf2 /engines/igor/parts
parent3d59f805202bd1d2161baa69902d377fa01ee7c6 (diff)
downloadscummvm-rg350-798ce43e19f1f4ee5b95f4de291217bf25a342f9.tar.gz
scummvm-rg350-798ce43e19f1f4ee5b95f4de291217bf25a342f9.tar.bz2
scummvm-rg350-798ce43e19f1f4ee5b95f4de291217bf25a342f9.zip
- enabled speech sounds
- added end of demo check for demo 1.10 - simplified parts loop - populated strings table in IGOR.TBL - updated and packed charset data svn-id: r29641
Diffstat (limited to 'engines/igor/parts')
-rw-r--r--engines/igor/parts/part_04.cpp21
-rw-r--r--engines/igor/parts/part_05.cpp24
-rw-r--r--engines/igor/parts/part_06.cpp5
-rw-r--r--engines/igor/parts/part_12.cpp22
-rw-r--r--engines/igor/parts/part_13.cpp20
-rw-r--r--engines/igor/parts/part_14.cpp20
-rw-r--r--engines/igor/parts/part_15.cpp38
-rw-r--r--engines/igor/parts/part_16.cpp23
-rw-r--r--engines/igor/parts/part_17.cpp27
-rw-r--r--engines/igor/parts/part_18.cpp19
-rw-r--r--engines/igor/parts/part_19.cpp19
-rw-r--r--engines/igor/parts/part_21.cpp28
-rw-r--r--engines/igor/parts/part_22.cpp19
-rw-r--r--engines/igor/parts/part_23.cpp21
-rw-r--r--engines/igor/parts/part_24.cpp21
-rw-r--r--engines/igor/parts/part_25.cpp19
-rw-r--r--engines/igor/parts/part_26.cpp21
-rw-r--r--engines/igor/parts/part_27.cpp25
-rw-r--r--engines/igor/parts/part_28.cpp24
-rw-r--r--engines/igor/parts/part_30.cpp21
-rw-r--r--engines/igor/parts/part_31.cpp21
-rw-r--r--engines/igor/parts/part_33.cpp23
-rw-r--r--engines/igor/parts/part_36.cpp22
-rw-r--r--engines/igor/parts/part_37.cpp22
-rw-r--r--engines/igor/parts/part_75.cpp10
-rw-r--r--engines/igor/parts/part_85.cpp34
-rw-r--r--engines/igor/parts/part_90.cpp6
-rw-r--r--engines/igor/parts/part_95.cpp118
-rw-r--r--engines/igor/parts/part_main.cpp18
29 files changed, 224 insertions, 487 deletions
diff --git a/engines/igor/parts/part_04.cpp b/engines/igor/parts/part_04.cpp
index bb198cee15..2c7190a8e4 100644
--- a/engines/igor/parts/part_04.cpp
+++ b/engines/igor/parts/part_04.cpp
@@ -29,16 +29,26 @@ namespace Igor {
void IgorEngine::PART_04_EXEC_ACTION(int action) {
debugC(9, kDebugGame, "PART_04_EXEC_ACTION %d", action);
+ if (_gameFlags & kFlagDemo) {
+ if (action == 102 || action == 103 || action == 104) {
+ ADD_DIALOGUE_TEXT(102, 2);
+ SET_DIALOGUE_TEXT(1, 1);
+ startIgorDialogue();
+ return;
+ }
+ }
switch (action) {
case 101:
_currentPart = 120;
break;
case 102:
+ _currentPart = 0;
+ break;
case 103:
+ _currentPart = 350;
+ break;
case 104:
- ADD_DIALOGUE_TEXT(102, 2);
- SET_DIALOGUE_TEXT(1, 1);
- startIgorDialogue();
+ _currentPart = 100;
break;
case 105:
if (_objectsState[111] == 0) {
@@ -90,8 +100,7 @@ void IgorEngine::PART_04() {
_walkData[0].scaleHeight = 49;
_walkDataLastIndex = 1;
_walkDataCurrentIndex = 1;
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 40) {
handleRoomInput();
if (compareGameTick(19, 32)) {
@@ -109,7 +118,7 @@ void IgorEngine::PART_04() {
setPaletteRange(184, 199);
waitForTimer();
}
- memcpy(_paletteBuffer, _currentPalette, 624);
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_05.cpp b/engines/igor/parts/part_05.cpp
index ae4ff11999..16258546b3 100644
--- a/engines/igor/parts/part_05.cpp
+++ b/engines/igor/parts/part_05.cpp
@@ -123,6 +123,9 @@ void IgorEngine::PART_05_ACTION_103() {
} while (i != 3);
addObjectToInventory(21, 56);
_objectsState[60] = 1;
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
PART_05_HELPER_4(255);
}
@@ -256,25 +259,11 @@ void IgorEngine::PART_05() {
if (_currentPart == 50) {
PART_05_HELPER_6();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 50 && _currentPart <= 52) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_05_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
stopSound();
if (_currentPart == 255) {
fadeOutPalette(768);
@@ -285,7 +274,6 @@ void IgorEngine::PART_05() {
memcpy(_currentPalette, _paletteBuffer, 624);
fadeOutPalette(624);
}
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_06.cpp b/engines/igor/parts/part_06.cpp
index e6fed6e68d..dc5e33be17 100644
--- a/engines/igor/parts/part_06.cpp
+++ b/engines/igor/parts/part_06.cpp
@@ -389,9 +389,8 @@ void IgorEngine::PART_06() {
_roomDataOffsets = PART_06_ROOM_DATA_OFFSETS;
_walkDataLastIndex = 1;
_walkDataCurrentIndex = 1;
- showCursor();
- _gameState.igorMoving = false;
_gameState.unkF = (_objectsState[61] == 1);
+ enterPartLoop();
while (_currentPart >= 60 && _currentPart <= 61) {
setRoomWalkBounds(0, 0, _objectsState[61] == 0 ? 234 : 142, 143);
handleRoomInput();
@@ -413,7 +412,7 @@ void IgorEngine::PART_06() {
}
waitForTimer();
}
- _updateRoomBackground = 0;
+ leavePartLoop();
}
} // namespace Igor
diff --git a/engines/igor/parts/part_12.cpp b/engines/igor/parts/part_12.cpp
index 3b12480b60..e421782902 100644
--- a/engines/igor/parts/part_12.cpp
+++ b/engines/igor/parts/part_12.cpp
@@ -522,6 +522,7 @@ void IgorEngine::PART_12() {
_roomDataOffsets = PART_12_ROOM_DATA_OFFSETS;
setRoomWalkBounds(89, 0, 275, 143);
SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_12_EXEC_ACTION);
+ _updateRoomBackground = &IgorEngine::PART_12_UPDATE_ROOM_BACKGROUND;
PART_12_HELPER_1(255);
memcpy(_screenVGA, _screenLayer1, 46080);
if (_objectsState[44] == 0) {
@@ -555,27 +556,12 @@ void IgorEngine::PART_12() {
}
}
PART_12_HELPER_2();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 120 && _currentPart <= 122) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_12_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
PART_12_EXIT:
- hideCursor();
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_13.cpp b/engines/igor/parts/part_13.cpp
index 24195a5a63..b004f7034c 100644
--- a/engines/igor/parts/part_13.cpp
+++ b/engines/igor/parts/part_13.cpp
@@ -223,25 +223,11 @@ void IgorEngine::PART_13() {
} else {
PART_13_HELPER_2();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 130 && _currentPart <= 131) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
- hideCursor();
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_14.cpp b/engines/igor/parts/part_14.cpp
index 22cbc7aed5..f3c7c092f3 100644
--- a/engines/igor/parts/part_14.cpp
+++ b/engines/igor/parts/part_14.cpp
@@ -578,25 +578,11 @@ void IgorEngine::PART_14() {
if (_currentPart == 142) {
PART_14_HELPER_4();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 140 && _currentPart <= 142) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
- hideCursor();
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_15.cpp b/engines/igor/parts/part_15.cpp
index 6ad73509d4..70f759f7e7 100644
--- a/engines/igor/parts/part_15.cpp
+++ b/engines/igor/parts/part_15.cpp
@@ -317,6 +317,16 @@ void IgorEngine::PART_15_ACTION_116() {
_currentPart = 780;
}
+void IgorEngine::PART_15_UPDATE_ROOM_BACKGROUND() {
+ PART_15_HELPER_5();
+ if (_gameTicks == 38 || _gameTicks == 60) {
+ if (_objectsState[48] != 1 && getRandomNumber(200) == 0 && _gameState.counter[3] == 0) {
+ _gameState.counter[3] = 1;
+ }
+ }
+ PART_15_HELPER_3();
+}
+
void IgorEngine::PART_15_UPDATE_DIALOGUE_TOBIAS(int action) {
switch (action) {
case kUpdateDialogueAnimEndOfSentence:
@@ -477,7 +487,7 @@ void IgorEngine::PART_15() {
_roomDataOffsets = PART_15_ROOM_DATA_OFFSETS;
setRoomWalkBounds(28, 0, 96, 143);
SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_15_EXEC_ACTION);
- _updateRoomBackground = 0;
+ _updateRoomBackground = &IgorEngine::PART_15_UPDATE_ROOM_BACKGROUND;
PART_15_HELPER_1(255);
memcpy(_screenVGA, _screenLayer1, 46080);
_currentAction.verb = kVerbWalk;
@@ -487,31 +497,11 @@ void IgorEngine::PART_15() {
_gameState.counter[3] = 0;
_gameState.counter[4] = 0;
PART_15_HELPER_2();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 150) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_15_HELPER_5();
- if (_gameTicks == 38 || _gameTicks == 60) {
- if (_objectsState[48] != 1 && getRandomNumber(200) == 0 && _gameState.counter[3] == 0) {
- _gameState.counter[3] = 1;
- }
- }
- PART_15_HELPER_3();
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
if (_objectsState[48] == 1) {
_objectsState[48] = 2;
}
diff --git a/engines/igor/parts/part_16.cpp b/engines/igor/parts/part_16.cpp
index aeff170bc5..01b1e7a32f 100644
--- a/engines/igor/parts/part_16.cpp
+++ b/engines/igor/parts/part_16.cpp
@@ -71,6 +71,9 @@ void IgorEngine::PART_16_ACTION_101() {
}
addObjectToInventory(20, 55);
_objectsState[52] = 1;
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
ADD_DIALOGUE_TEXT(204, 3);
SET_DIALOGUE_TEXT(1, 1);
startIgorDialogue();
@@ -271,25 +274,11 @@ void IgorEngine::PART_16() {
if (_objectsState[65] == 2 && _inventoryInfo[71] != 0 && _objectsState[76] == 1) {
PART_16_HELPER_3();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 160) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
- hideCursor();
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_17.cpp b/engines/igor/parts/part_17.cpp
index 6134c734c9..27af8b320b 100644
--- a/engines/igor/parts/part_17.cpp
+++ b/engines/igor/parts/part_17.cpp
@@ -205,6 +205,9 @@ void IgorEngine::PART_17_ACTION_106() {
_objectsState[3] = 1;
PART_17_HELPER_1(255);
UPDATE_OBJECT_STATE(4);
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
--_walkDataLastIndex;
buildWalkPath(104, 87, 143, 123);
_walkDataCurrentIndex = 1;
@@ -497,34 +500,18 @@ void IgorEngine::PART_17() {
} else if (_currentPart == 171) {
PART_17_HELPER_6();
}
- showCursor();
- _gameState.igorMoving = false;
- while (_currentPart == 170 || _currentPart == 171) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_17_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ enterPartLoop();
+ while (_currentPart >= 170 && _currentPart <= 171) {
+ runPartLoop();
}
+ leavePartLoop();
if (_objectsState[55] == 1) {
_objectsState[56] = 1;
}
if (_objectsState[54] == 0) {
_objectsState[54] = 1;
}
- hideCursor();
fadeOutPalette(624);
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_18.cpp b/engines/igor/parts/part_18.cpp
index 11abb3cf2e..560ee35ccd 100644
--- a/engines/igor/parts/part_18.cpp
+++ b/engines/igor/parts/part_18.cpp
@@ -182,24 +182,11 @@ void IgorEngine::PART_18() {
_currentAction.verb = kVerbWalk;
fadeInPalette(768);
PART_18_HELPER_2();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 180) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_19.cpp b/engines/igor/parts/part_19.cpp
index e7cf3b4327..26cbea9d83 100644
--- a/engines/igor/parts/part_19.cpp
+++ b/engines/igor/parts/part_19.cpp
@@ -311,24 +311,11 @@ void IgorEngine::PART_19() {
if (_objectsState[59] == 0) {
PART_19_HELPER_4();
} else {
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 190) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
}
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_21.cpp b/engines/igor/parts/part_21.cpp
index 81f21204af..3b41a73857 100644
--- a/engines/igor/parts/part_21.cpp
+++ b/engines/igor/parts/part_21.cpp
@@ -203,6 +203,9 @@ void IgorEngine::PART_21_ACTION_111() {
removeObjectFromInventory(56);
_objectsState[65] = 1;
PART_21_HELPER_1(255);
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
ADD_DIALOGUE_TEXT(210, 2);
SET_DIALOGUE_TEXT(1, 1);
startIgorDialogue();
@@ -465,28 +468,13 @@ void IgorEngine::PART_21() {
PART_21_HELPER_3();
} else if (_currentPart == 212) {
PART_21_HELPER_4();
+ }
+ enterPartLoop();
+ while (_currentPart >= 210 && _currentPart <= 212) {
+ runPartLoop();
}
- showCursor();
- _gameState.igorMoving = false;
- while (_currentPart == 210 || _currentPart == 211 || _currentPart == 212) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_21_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
- }
+ leavePartLoop();
fadeOutPalette(624);
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_22.cpp b/engines/igor/parts/part_22.cpp
index 5ed1ca3f7c..9727ae3e1a 100644
--- a/engines/igor/parts/part_22.cpp
+++ b/engines/igor/parts/part_22.cpp
@@ -162,24 +162,11 @@ void IgorEngine::PART_22() {
_currentAction.verb = kVerbWalk;
fadeInPalette(768);
PART_22_HELPER_2();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 220) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_23.cpp b/engines/igor/parts/part_23.cpp
index e165ad5b1d..b1451442ac 100644
--- a/engines/igor/parts/part_23.cpp
+++ b/engines/igor/parts/part_23.cpp
@@ -278,27 +278,12 @@ void IgorEngine::PART_23() {
} else if (_currentPart == 232) {
PART_23_HELPER_4();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 230 && _currentPart <= 232) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_23_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_24.cpp b/engines/igor/parts/part_24.cpp
index 5d3d485ae0..d6855bab21 100644
--- a/engines/igor/parts/part_24.cpp
+++ b/engines/igor/parts/part_24.cpp
@@ -314,27 +314,12 @@ void IgorEngine::PART_24() {
} else if (_currentPart == 242) {
PART_24_HELPER_9();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 240 && _currentPart <= 242) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_24_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_25.cpp b/engines/igor/parts/part_25.cpp
index 67acbae58a..c8f395ce9f 100644
--- a/engines/igor/parts/part_25.cpp
+++ b/engines/igor/parts/part_25.cpp
@@ -232,24 +232,11 @@ void IgorEngine::PART_25() {
} else if (_currentPart == 252) {
PART_25_HELPER_4();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 250 && _currentPart <= 252) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_26.cpp b/engines/igor/parts/part_26.cpp
index eea2cd4c3d..8791e12b63 100644
--- a/engines/igor/parts/part_26.cpp
+++ b/engines/igor/parts/part_26.cpp
@@ -271,27 +271,12 @@ void IgorEngine::PART_26() {
} else {
PART_26_HELPER_5();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 260 && _currentPart <= 261) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_26_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_27.cpp b/engines/igor/parts/part_27.cpp
index 5d06e946a8..59e0eb0411 100644
--- a/engines/igor/parts/part_27.cpp
+++ b/engines/igor/parts/part_27.cpp
@@ -173,6 +173,9 @@ void IgorEngine::PART_27_ACTION_108() {
}
addObjectToInventory(23, 58);
PART_27_HELPER_1(1);
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
}
void IgorEngine::PART_27_ACTION_110() {
@@ -193,6 +196,9 @@ void IgorEngine::PART_27_ACTION_110() {
removeObjectFromInventory(55);
PART_27_HELPER_1(255);
_objectsState[107] = 1;
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
}
void IgorEngine::PART_27_HELPER_1(int num) {
@@ -272,24 +278,11 @@ void IgorEngine::PART_27() {
} else {
PART_27_HELPER_5();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 270 || _currentPart == 271) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_28.cpp b/engines/igor/parts/part_28.cpp
index 4b952ad3bb..1f8a2c23fd 100644
--- a/engines/igor/parts/part_28.cpp
+++ b/engines/igor/parts/part_28.cpp
@@ -178,6 +178,9 @@ void IgorEngine::PART_28_ACTION_109() {
ADD_DIALOGUE_TEXT(230, 1);
SET_DIALOGUE_TEXT(1, 1);
startIgorDialogue();
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
}
void IgorEngine::PART_28_UPDATE_DIALOGUE_CAROLINE(int action) {
@@ -340,30 +343,15 @@ void IgorEngine::PART_28() {
} else if (_currentPart == 281) {
PART_28_HELPER_6();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 280 || _currentPart == 281) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_28_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
if (_objectsState[87] == 1) {
_objectsState[87] = 2;
}
+ leavePartLoop();
fadeOutPalette(624);
- _updateRoomBackground = 0;
}
} // namespace Igor
diff --git a/engines/igor/parts/part_30.cpp b/engines/igor/parts/part_30.cpp
index 8cd8ca8626..507d88f1c5 100644
--- a/engines/igor/parts/part_30.cpp
+++ b/engines/igor/parts/part_30.cpp
@@ -299,26 +299,11 @@ void IgorEngine::PART_30() {
PART_30_HELPER_5();
}
}
- if (!_gameState.dialogueTextRunning) {
- showCursor();
- }
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 300 && _currentPart <= 303) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_31.cpp b/engines/igor/parts/part_31.cpp
index a3822d7982..ca4f598daf 100644
--- a/engines/igor/parts/part_31.cpp
+++ b/engines/igor/parts/part_31.cpp
@@ -427,26 +427,11 @@ void IgorEngine::PART_31() {
} else if (_currentPart == 313) {
PART_31_HELPER_6();
}
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart >= 310 && _currentPart <= 313) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_31_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
- _updateRoomBackground = 0;
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_33.cpp b/engines/igor/parts/part_33.cpp
index 38ca6cce3b..2e49e60e95 100644
--- a/engines/igor/parts/part_33.cpp
+++ b/engines/igor/parts/part_33.cpp
@@ -265,6 +265,9 @@ void IgorEngine::PART_33_ACTION_115() {
}
removeObjectFromInventory(67);
PART_33_HELPER_1(255);
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
ADD_DIALOGUE_TEXT(217, 2);
SET_DIALOGUE_TEXT(1, 1);
_updateDialogue = &IgorEngine::PART_33_UPDATE_DIALOGUE_HARRISON_2;
@@ -481,25 +484,11 @@ void IgorEngine::PART_33() {
_currentAction.verb = kVerbWalk;
fadeInPalette(768);
PART_33_HELPER_7();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 330) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- PART_33_UPDATE_ROOM_BACKGROUND();
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
if (_objectsState[75] == 1) {
_objectsState[75] = 2;
}
diff --git a/engines/igor/parts/part_36.cpp b/engines/igor/parts/part_36.cpp
index 1973bf9101..261ddeb8f7 100644
--- a/engines/igor/parts/part_36.cpp
+++ b/engines/igor/parts/part_36.cpp
@@ -105,6 +105,9 @@ void IgorEngine::PART_36_ACTION_102() {
addObjectToInventory(30, 65);
_objectsState[88] = 1;
PART_36_HELPER_1(255);
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
}
void IgorEngine::PART_36_HELPER_1(int num) {
@@ -153,24 +156,11 @@ void IgorEngine::PART_36() {
_currentAction.verb = kVerbWalk;
fadeInPalette(768);
PART_36_HELPER_2();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 360) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_37.cpp b/engines/igor/parts/part_37.cpp
index ff2c2f74cf..5d2f7b03ac 100644
--- a/engines/igor/parts/part_37.cpp
+++ b/engines/igor/parts/part_37.cpp
@@ -82,6 +82,9 @@ void IgorEngine::PART_37_ACTION_102() {
addObjectToInventory(32, 67);
_objectsState[89] = 1;
PART_37_HELPER_1(255);
+ if (_gameVersion == kIdEngDemo110) {
+ ++_demoActionsCounter;
+ }
}
void IgorEngine::PART_37_HELPER_1(int num) {
@@ -115,24 +118,11 @@ void IgorEngine::PART_37() {
_currentAction.verb = kVerbWalk;
fadeInPalette(768);
PART_37_HELPER_2();
- showCursor();
- _gameState.igorMoving = false;
+ enterPartLoop();
while (_currentPart == 370) {
- handleRoomInput();
- if (compareGameTick(1, 16)) {
- handleRoomIgorWalk();
- }
- if (compareGameTick(19, 32)) {
- handleRoomDialogue();
- }
- if (compareGameTick(4, 8)) {
- handleRoomInventoryScroll();
- }
- if (compareGameTick(1)) {
- handleRoomLight();
- }
- waitForTimer();
+ runPartLoop();
}
+ leavePartLoop();
fadeOutPalette(624);
}
diff --git a/engines/igor/parts/part_75.cpp b/engines/igor/parts/part_75.cpp
index a1108149db..d263fc8d99 100644
--- a/engines/igor/parts/part_75.cpp
+++ b/engines/igor/parts/part_75.cpp
@@ -65,9 +65,9 @@ void IgorEngine::PART_75() {
memset(_currentPalette, 0, 768);
fadeInPalette(768);
_gameState.igorMoving = false;
- ADD_DIALOGUE_TEXT(201, 1);
- ADD_DIALOGUE_TEXT(202, 2);
- ADD_DIALOGUE_TEXT(204, 1);
+ ADD_DIALOGUE_TEXT(201, 1, 1156);
+ ADD_DIALOGUE_TEXT(202, 2, 1157);
+ ADD_DIALOGUE_TEXT(204, 1, 1158);
SET_DIALOGUE_TEXT(1, 3);
startCutsceneDialogue(187, 82, 63, 63, 0);
waitForEndOfCutsceneDialogue(187, 82, 63, 63, 0);
@@ -75,8 +75,8 @@ void IgorEngine::PART_75() {
PART_75_HELPER_1(PART_75_ANIM_DATA_1[i]);
waitForTimer(30);
}
- ADD_DIALOGUE_TEXT(205, 1);
- ADD_DIALOGUE_TEXT(206, 1);
+ ADD_DIALOGUE_TEXT(205, 1, 1159);
+ ADD_DIALOGUE_TEXT(206, 1, 1160);
SET_DIALOGUE_TEXT(1, 2);
startCutsceneDialogue(187, 82, 63, 63, 0);
waitForEndOfCutsceneDialogue(187, 82, 63, 63, 0);
diff --git a/engines/igor/parts/part_85.cpp b/engines/igor/parts/part_85.cpp
index dc0aab55fe..cf685b13a3 100644
--- a/engines/igor/parts/part_85.cpp
+++ b/engines/igor/parts/part_85.cpp
@@ -124,30 +124,30 @@ void IgorEngine::PART_85() {
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
PART_85_HELPER_1(0, 0x7481, 2, 7, 32);
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
- ADD_DIALOGUE_TEXT(201, 3);
- ADD_DIALOGUE_TEXT(204, 1);
+ ADD_DIALOGUE_TEXT(201, 3, 545);
+ ADD_DIALOGUE_TEXT(204, 1, 546);
SET_DIALOGUE_TEXT(1, 2);
startCutsceneDialogue(89, 56, 63, 63, 0);
VAR_CURRENT_TALKING_ACTOR = 0;
waitForEndOfCutsceneDialogue(89, 56, 63, 63, 0);
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
- ADD_DIALOGUE_TEXT(205, 3);
+ ADD_DIALOGUE_TEXT(205, 3, 547);
SET_DIALOGUE_TEXT(1, 1);
startCutsceneDialogue(113, 59, 63, 0, 38);
VAR_CURRENT_TALKING_ACTOR = 1;
waitForEndOfCutsceneDialogue(113, 59, 63, 0, 38);
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
- ADD_DIALOGUE_TEXT(208, 1);
+ ADD_DIALOGUE_TEXT(208, 1, 548);
SET_DIALOGUE_TEXT(1, 1);
startCutsceneDialogue(89, 56, 63, 63, 0);
VAR_CURRENT_TALKING_ACTOR = 0;
waitForEndOfCutsceneDialogue(89, 56, 63, 63, 0);
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
- ADD_DIALOGUE_TEXT(209, 2);
- ADD_DIALOGUE_TEXT(211, 1);
- ADD_DIALOGUE_TEXT(212, 1);
- ADD_DIALOGUE_TEXT(213, 1);
- ADD_DIALOGUE_TEXT(214, 1);
+ ADD_DIALOGUE_TEXT(209, 2, 549);
+ ADD_DIALOGUE_TEXT(211, 1, 550);
+ ADD_DIALOGUE_TEXT(212, 1, 551);
+ ADD_DIALOGUE_TEXT(213, 1, 552);
+ ADD_DIALOGUE_TEXT(214, 1, 553);
SET_DIALOGUE_TEXT(1, 5);
startCutsceneDialogue(113, 59, 63, 0, 38);
VAR_CURRENT_TALKING_ACTOR = 1;
@@ -155,16 +155,16 @@ void IgorEngine::PART_85() {
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
PART_85_HELPER_1(0, 0x7481, 2, 7, 32);
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
- ADD_DIALOGUE_TEXT(215, 1);
- ADD_DIALOGUE_TEXT(216, 2);
- ADD_DIALOGUE_TEXT(218, 1);
+ ADD_DIALOGUE_TEXT(215, 1, 554);
+ ADD_DIALOGUE_TEXT(216, 2, 555);
+ ADD_DIALOGUE_TEXT(218, 1, 556);
SET_DIALOGUE_TEXT(1, 3);
startCutsceneDialogue(89, 56, 63, 63, 0);
VAR_CURRENT_TALKING_ACTOR = 0;
waitForEndOfCutsceneDialogue(89, 56, 63, 63, 0);
if (_inputVars[kInputEscape]) goto PART_85_EXIT;
- ADD_DIALOGUE_TEXT(219, 2);
- ADD_DIALOGUE_TEXT(221, 2);
+ ADD_DIALOGUE_TEXT(219, 2, 557);
+ ADD_DIALOGUE_TEXT(221, 2, 558);
SET_DIALOGUE_TEXT(1, 2);
startCutsceneDialogue(113, 59, 63, 0, 38);
VAR_CURRENT_TALKING_ACTOR = 1;
@@ -191,7 +191,7 @@ void IgorEngine::PART_85() {
_walkData[0].scaleWidth = 50;
_walkDataLastIndex = 1;
_walkCurrentPos = 4;
- ADD_DIALOGUE_TEXT(223, 2);
+ ADD_DIALOGUE_TEXT(223, 2, 559);
SET_DIALOGUE_TEXT(1, 1);
startIgorDialogue();
waitForEndOfIgorDialogue();
@@ -201,8 +201,8 @@ void IgorEngine::PART_85() {
_walkData[0].x = 250;
_walkData[0].y = 119;
_walkCurrentPos = 3;
- ADD_DIALOGUE_TEXT(225, 2);
- ADD_DIALOGUE_TEXT(227, 3);
+ ADD_DIALOGUE_TEXT(225, 2, 560);
+ ADD_DIALOGUE_TEXT(227, 3, 561);
SET_DIALOGUE_TEXT(1, 2);
startIgorDialogue();
waitForEndOfIgorDialogue();
diff --git a/engines/igor/parts/part_90.cpp b/engines/igor/parts/part_90.cpp
index c503d155f2..5a94f00b1f 100644
--- a/engines/igor/parts/part_90.cpp
+++ b/engines/igor/parts/part_90.cpp
@@ -27,10 +27,6 @@
namespace Igor {
-static const char *STR_COPYRIGHT_1995 = "(C) 1995 Optik Software. All rights reserved.";
-
-static const char *STR_COPYRIGHT_1994 = "(C) 1994 PENDULO STUDIOS. All rights reserved.";
-
void IgorEngine::PART_90() {
memset(_currentPalette, 0, 768);
setPaletteRange(0, 255);
@@ -54,7 +50,7 @@ void IgorEngine::PART_90() {
case 904:
loadData(PAL_TitleScreen, _paletteBuffer);
loadData(IMG_TitleScreen, _screenVGA);
- drawString(_screenVGA, (_gameVersion == kIdEngDemo110) ? STR_COPYRIGHT_1994 : STR_COPYRIGHT_1995, 2, 187, 0xF5, 0, 0);
+ drawString(_screenVGA, (_gameVersion == kIdEngDemo110) ? getString(STR_COPYRIGHT_1994) : getString(STR_COPYRIGHT_1995), 2, 187, 0xF5, 0, 0);
break;
}
fadeInPalette(768);
diff --git a/engines/igor/parts/part_95.cpp b/engines/igor/parts/part_95.cpp
index b32751ec23..41f6b1c7f5 100644
--- a/engines/igor/parts/part_95.cpp
+++ b/engines/igor/parts/part_95.cpp
@@ -30,73 +30,74 @@ namespace Igor {
struct SharewareScreenString {
uint8 color;
int y;
- const char *str;
+ int strId;
};
static const SharewareScreenString STR_SHAREWARE[] = {
// 950
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 228, 70, "This is SHAREWARE!" },
- { 228, 81, "You can copy this version!" },
- { 228, 96, "Pass it around, give it to your friends, family," },
- { 228, 107, "colleagues and upload it to your favorite BBS." },
- { 228, 122, "Let everyone enjoy IGOR!" },
- { 228, 161, "To place an order: 1-800-OPTIK-99" },
+ { 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 },
// 951
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 228, 42, "Shareware version" },
- { 228, 85, "Order the full IGOR game for only $34.99 US." },
- { 228, 96, "$5.00 for shipping and handling (US & CANADA)." },
- { 228, 107, "Please add $3.00 for international shipping." },
- { 228, 161, "To place an order: 1-800-OPTIK-99" },
+ { 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 },
// 952
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 228, 42, "Shareware version" },
- { 228, 70, "90 day limited warranty." },
- { 228, 85, "Please allow 2-4 days for delivery (US only)." },
- { 228, 96, "Elsewhere, up to a week or two..." },
- { 228, 111, "Overnight/second day shipping available an" },
- { 228, 122, "aditional change. Please call for exact pricing." },
- { 228, 161, "To place an order: 1-800-OPTIK-99" },
+ { 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 },
// 953
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 228, 42, "Shareware version" },
- { 228, 70, "Three easy ways to order:" },
- { 228, 85, "- Call 1-800-678-4599 (orders only) and use" },
- { 228, 96, "Your Visa, Mastercard or Discover card." },
- { 228, 110, "- Fax your order (please include credit card" },
- { 228, 121, "information) to (412) 381-1031" },
- { 228, 161, "To place an order: 1-800-OPTIK-99" },
+ { 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 },
// 954
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 228, 42, "Shareware version" },
- { 228, 74, "- Mail a check or money order to:" },
- { 228, 85, "Optik Software Inc." },
- { 228, 96, "1000 Napor Boulevard" },
- { 228, 107, "Pittsburgh, PA. 15205" },
- { 228, 118, "USA" },
- { 228, 161, "To place an order: 1-800-OPTIK-99" },
+ { 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 },
// 955
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 240, 42, "Shareware version" },
- { 240, 79, "Optik Software Inc." },
- { 240, 90, "Orders only: 1-800-OPTIK-99 (67845-99)" },
- { 240, 101, "Fax: (412) 381-1031" },
- { 240, 112, "E-mail: optiksoft\xFA""aol.com" },
- { 240, 161, "To place an order: 1-800-OPTIK-99" },
+ { 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 },
// 956
- { 255, 30, "\"Igor. Objective Uikokahonia\"" },
- { 228, 42, "Shareware version" },
- { 228, 64, "A game by" },
- { 228, 80, "PENDULO STUDIOS" },
- { 228, 91, "P.O. Box 21091" },
- { 228, 102, "28009 Madrid" },
- { 228, 113, "Spain" },
- { 228, 128, "E-mail: 100641.1737\xFA""compuserve.com" },
- { 228, 161, "To place an order: 1-800-OPTIK-99" }
+ { 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 }
};
void IgorEngine::PART_95() {
+ hideCursor();
memset(_currentPalette, 0, 768);
setPaletteRange(0, 255);
memset(_screenVGA, 0, 64000);
@@ -159,9 +160,12 @@ void IgorEngine::PART_95() {
}
break;
}
- for (int i = startStr; i <= endStr; ++i) {
- const SharewareScreenString *s = &STR_SHAREWARE[i];
- drawString(_screenVGA, s->str, (320 - getStringWidth(s->str)) / 2, s->y, s->color, 0, 0);
+ if (startStr != -1) {
+ for (int i = startStr; i <= endStr; ++i) {
+ const SharewareScreenString *s = &STR_SHAREWARE[i];
+ const char *str = getString(s->strId);
+ drawString(_screenVGA, str, (320 - getStringWidth(str)) / 2, s->y, s->color, 0, 0);
+ }
}
fadeInPalette(768);
for (int i = 0; !_inputVars[kInputEscape] && i < 3000; ++i) {
diff --git a/engines/igor/parts/part_main.cpp b/engines/igor/parts/part_main.cpp
index f3c99b8de1..9d3abe429d 100644
--- a/engines/igor/parts/part_main.cpp
+++ b/engines/igor/parts/part_main.cpp
@@ -29,11 +29,12 @@
namespace Igor {
-void IgorEngine::ADD_DIALOGUE_TEXT(int num, int count) {
+void IgorEngine::ADD_DIALOGUE_TEXT(int num, int count, int sound) {
assert(_dialogueTextsCount < MAX_DIALOGUE_TEXTS);
DialogueText *dt = &_dialogueTextsTable[_dialogueTextsCount];
dt->num = num;
dt->count = count;
+ dt->sound = sound;
++_dialogueTextsCount;
}
@@ -461,7 +462,6 @@ void IgorEngine::EXEC_MAIN_ACTION_38() {
loadData(IMG_NewsPaper, _screenVGA);
loadData(PAL_NewsPaper, _paletteBuffer);
fadeInPalette(624);
-// mov _dialogueColor+3, 0
WalkData *wd = &_walkData[_walkDataLastIndex - 1];
int _walkDataCurrentPosX2 = wd->x;
int _walkDataCurrentPosY2 = wd->y;
@@ -494,7 +494,6 @@ void IgorEngine::EXEC_MAIN_ACTION_38() {
}
fadeInPalette(624);
_objectsState[2] = 1;
-// mov _dialogueColor+3, 63
}
void IgorEngine::EXEC_MAIN_ACTION_43() {
@@ -508,7 +507,6 @@ void IgorEngine::EXEC_MAIN_ACTION_43() {
loadData(IMG_PhotoHarrisonMargaret, _screenVGA);
loadData(PAL_PhotoHarrisonMargaret, _paletteBuffer);
fadeInPalette(624);
-// mov _dialogueColor+3, 0
WalkData *wd = &_walkData[_walkDataLastIndex - 1];
int _walkDataCurrentPosX2 = wd->x;
int _walkDataCurrentPosY2 = wd->y;
@@ -531,7 +529,6 @@ void IgorEngine::EXEC_MAIN_ACTION_43() {
free(tmp);
}
fadeInPalette(624);
-// mov _dialogueColor+3, 63
}
void IgorEngine::EXEC_MAIN_ACTION_54() {
@@ -573,6 +570,15 @@ void IgorEngine::EXEC_MAIN_ACTION_54() {
fadeInPalette(624);
}
+void IgorEngine::CHECK_FOR_END_OF_DEMO() {
+ if (_demoActionsCounter >= 10) {
+ ADD_DIALOGUE_TEXT(104, 2);
+ ADD_DIALOGUE_TEXT(106, 2);
+ SET_DIALOGUE_TEXT(1, 2);
+ startIgorDialogue();
+ }
+}
+
void IgorEngine::SET_PAL_208_96_1() {
memcpy(_paletteBuffer + 208 * 3, PAL_96_1, 96);
}
@@ -966,7 +972,7 @@ void IgorEngine::PART_MAIN() {
_gameState.nextMusicCounter = 0;
}
} while (_currentPart != kInvalidPart && !_eventQuitGame);
- if (_gameVersion == kIdEngDemo100 || _gameVersion == kIdEngDemo110) {
+ if (_gameFlags & kFlagDemo) {
for (_currentPart = kSharewarePart; !_eventQuitGame && _currentPart <= kSharewarePart + 6; ++_currentPart) {
PART_95();
}