aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorKari Salminen2008-10-22 19:56:38 +0000
committerKari Salminen2008-10-22 19:56:38 +0000
commitb9709b579357ad876cb63481f28634390808f579 (patch)
tree12fdfd553c3805745ddd0299a06a2b26772be1f7 /engines/cine
parent7d331b734186b6d3116debf34eb28bd6c3d807ed (diff)
downloadscummvm-rg350-b9709b579357ad876cb63481f28634390808f579.tar.gz
scummvm-rg350-b9709b579357ad876cb63481f28634390808f579.tar.bz2
scummvm-rg350-b9709b579357ad876cb63481f28634390808f579.zip
Make incrustMask and incrustSprite only draw to the current background in Operation Stealth.
svn-id: r34838
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/gfx.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index e24b23f7f0..b874e7d414 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -980,19 +980,15 @@ void OSRenderer::clear() {
*/
void OSRenderer::incrustMask(const objectStruct &obj, uint8 color) {
const byte *data = animDataTable[obj.frame].data();
- int x, y, width, height, i;
+ int x, y, width, height;
x = obj.x;
y = obj.y;
width = animDataTable[obj.frame]._realWidth;
height = animDataTable[obj.frame]._height;
- for (i = 0; i < 8; i++) {
- if (!_bgTable[i].bg) {
- continue;
- }
-
- gfxFillSprite(data, width, height, _bgTable[i].bg, x, y, color);
+ if (_bgTable[_currentBg].bg) {
+ gfxFillSprite(data, width, height, _bgTable[_currentBg].bg, x, y, color);
}
}
@@ -1017,7 +1013,7 @@ void OSRenderer::drawSprite(const objectStruct &obj) {
*/
void OSRenderer::incrustSprite(const objectStruct &obj) {
const byte *data = animDataTable[obj.frame].data();
- int x, y, width, height, transColor, i;
+ int x, y, width, height, transColor;
x = obj.x;
y = obj.y;
@@ -1025,12 +1021,8 @@ void OSRenderer::incrustSprite(const objectStruct &obj) {
width = animDataTable[obj.frame]._realWidth;
height = animDataTable[obj.frame]._height;
- for (i = 0; i < 8; i++) {
- if (!_bgTable[i].bg) {
- continue;
- }
-
- drawSpriteRaw2(data, transColor, width, height, _bgTable[i].bg, x, y);
+ if (_bgTable[_currentBg].bg) {
+ drawSpriteRaw2(data, transColor, width, height, _bgTable[_currentBg].bg, x, y);
}
}