aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-10-27 09:41:33 +0000
committerPaweł Kołodziejski2002-10-27 09:41:33 +0000
commit390ce3dada285462d361644c7e064952b8742820 (patch)
tree05e105b41f1e7d26f396e0f8735d43e708989f7b
parent9e0e2fa1d54bcf4ef9dab7a73c93b845fe1bbbaa (diff)
downloadscummvm-rg350-390ce3dada285462d361644c7e064952b8742820.tar.gz
scummvm-rg350-390ce3dada285462d361644c7e064952b8742820.tar.bz2
scummvm-rg350-390ce3dada285462d361644c7e064952b8742820.zip
removed hardcoded values
svn-id: r5330
-rw-r--r--scumm/gfx.cpp19
-rw-r--r--scumm/verbs.cpp2
2 files changed, 11 insertions, 10 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 23dde977ff..230afe38fb 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1333,7 +1333,7 @@ void Gdi::unkDecode1()
do {
if (!--_currentX) {
_currentX = 8;
- dst += 312;
+ dst += _vm->_realWidth - 8;
if (!--_tempNumLines)
return;
}
@@ -1351,7 +1351,7 @@ void Gdi::unkDecode1()
bits >>= _decomp_shr;
}
} while (--_currentX);
- dst += 312;
+ dst += _vm->_realWidth - 8;
} while (--_tempNumLines);
}
@@ -1386,7 +1386,7 @@ void Gdi::unkDecode2()
color += inc;
}
} while (--_currentX);
- dst += 312;
+ dst += _vm->_realWidth - 8;
} while (--_tempNumLines);
}
@@ -1424,7 +1424,7 @@ void Gdi::unkDecode3()
do {
if (!--_currentX) {
_currentX = 8;
- dst += 312;
+ dst += _vm->_realWidth - 8;
if (!--_tempNumLines)
return;
}
@@ -1434,7 +1434,7 @@ void Gdi::unkDecode3()
do {
if (!--_currentX) {
_currentX = 8;
- dst += 312;
+ dst += _vm->_realWidth - 8;
if (!--_tempNumLines)
return;
}
@@ -1451,7 +1451,7 @@ void Gdi::unkDecode3()
bits >>= _decomp_shr;
}
} while (--_currentX);
- dst += 312;
+ dst += _vm->_realWidth - 8;
} while (--_tempNumLines);
}
@@ -1518,7 +1518,7 @@ void Gdi::unkDecode5()
color += inc;
}
} while (--_currentX);
- dst += 312;
+ dst += _vm->_realWidth - 8;
} while (--_tempNumLines);
}
@@ -1800,6 +1800,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom)
bgbak = getResourceAddress(rtBuffer, vs->number + 5) + height;
mask = getResourceAddress(rtBuffer, 9) + top * gdi._numStrips + (left >> 3) + _screenStartStrip;
if (vs->number == 0) {
+ // FIXME: hardcoded value
mask += vs->topline * 216;
}
@@ -3246,7 +3247,7 @@ void Scumm::drawBomp(BompDrawData *bd, int param1, byte *dataPtr, int param2, in
for (i = 0; i < num; i++) {
if (bd->scale_x == 255 || scale_cols[src_x]) {
if (dst_x >= 0 && dst_x < bd->outwidth) {
- if (!(*(mask + dst_y * 40 + (dst_x >> 3)) & revBitMask[dst_x & 7]))
+ if (!(*(mask + dst_y * gdi._numStrips + (dst_x >> 3)) & revBitMask[dst_x & 7]))
*d = blend(_currentPalette, color, *d);
}
@@ -3259,7 +3260,7 @@ void Scumm::drawBomp(BompDrawData *bd, int param1, byte *dataPtr, int param2, in
for (i = 0; i < num; i++) {
if (bd->scale_x == 255 || scale_cols[src_x]) {
if (dst_x >= 0 && dst_x < bd->outwidth)
- if (!(*(mask + dst_y * 40 + (dst_x >> 3)) & revBitMask[dst_x & 7]))
+ if (!(*(mask + dst_y * gdi._numStrips + (dst_x >> 3)) & revBitMask[dst_x & 7]))
*d = blend(_currentPalette, src[i], *d);
d++;
dst_x++;
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 47c3595e25..0be0ac59dc 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -134,7 +134,7 @@ void Scumm::drawVerb(int vrb, int mode)
_string[4].charset = vs->charset_nr;
_string[4].xpos = vs->x;
_string[4].ypos = vs->y;
- _string[4].right = 319;
+ _string[4].right = _realWidth - 1;
_string[4].center = vs->center;
if (vs->curmode == 2)