aboutsummaryrefslogtreecommitdiff
path: root/engines/igor/parts/part_36.cpp
diff options
context:
space:
mode:
authorGregory Montoir2007-10-31 20:02:38 +0000
committerGregory Montoir2007-10-31 20:02:38 +0000
commit47a2c28b6ed314a8099f1b9eabf63fd4c3fcafea (patch)
tree6d71022a4f43e38cc301c5305e7804e2ab32e3dd /engines/igor/parts/part_36.cpp
parentf96f934215bb16c0352cce199c8b6cce690fdc7b (diff)
downloadscummvm-rg350-47a2c28b6ed314a8099f1b9eabf63fd4c3fcafea.tar.gz
scummvm-rg350-47a2c28b6ed314a8099f1b9eabf63fd4c3fcafea.tar.bz2
scummvm-rg350-47a2c28b6ed314a8099f1b9eabf63fd4c3fcafea.zip
- minor changes to detection code
- reverted gameState.counter type to int16 - cleanup/removed deadcode svn-id: r29344
Diffstat (limited to 'engines/igor/parts/part_36.cpp')
-rw-r--r--engines/igor/parts/part_36.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/igor/parts/part_36.cpp b/engines/igor/parts/part_36.cpp
index 9510ac6ae5..1973bf9101 100644
--- a/engines/igor/parts/part_36.cpp
+++ b/engines/igor/parts/part_36.cpp
@@ -77,28 +77,28 @@ void IgorEngine::PART_36_EXEC_ACTION(int action) {
}
void IgorEngine::PART_36_ACTION_102() {
- for (_gameState.counter[0] = 1; _gameState.counter[0] >= 0; --_gameState.counter[0]) {
- for (_gameState.counter[1] = 0; _gameState.counter[1] <= 48; ++_gameState.counter[1]) {
- for (_gameState.counter[2] = 0; _gameState.counter[2] <= 33; ++_gameState.counter[2]) {
- uint8 color = _animFramesBuffer[14 + _gameState.counter[0] * 1666 + _gameState.counter[1] * 34 + _gameState.counter[2]];
- int offset = (_gameState.counter[1] + 74) * 320 + _gameState.counter[2] + 70;
+ for (int i = 1; i >= 0; --i) {
+ for (int j = 0; j <= 48; ++j) {
+ for (int k = 0; k <= 33; ++k) {
+ uint8 color = _animFramesBuffer[14 + i * 1666 + j * 34 + k];
+ int offset = (j + 74) * 320 + k + 70;
if (color < 192 || color > 207) {
- _screenTempLayer[100 * _gameState.counter[1] + _gameState.counter[2]] = color;
+ _screenTempLayer[100 * j + k] = color;
continue;
}
RoomObjectArea *roa = &_roomObjectAreasTable[_screenLayer2[offset]];
if (roa->y1Lum > 0) {
- _screenTempLayer[100 * _gameState.counter[1] + _gameState.counter[2]] = _screenLayer1[offset];
+ _screenTempLayer[100 * j + k] = _screenLayer1[offset];
} else {
if (roa->y2Lum > 0) {
color -= roa->deltaLum;
}
- _screenTempLayer[100 * _gameState.counter[1] + _gameState.counter[2]] = color;
+ _screenTempLayer[100 * j + k] = color;
}
}
}
- for (_gameState.counter[1] = 0; _gameState.counter[1] <= 48; ++_gameState.counter[1]) {
- memcpy(_screenVGA + _gameState.counter[1] * 320 + 23750, _screenTempLayer + _gameState.counter[1] * 100, 34);
+ for (int j = 0; j <= 48; ++j) {
+ memcpy(_screenVGA + j * 320 + 23750, _screenTempLayer + j * 100, 34);
}
waitForTimer(45);
}