diff options
author | Travis Howell | 2007-05-16 12:58:47 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-16 12:58:47 +0000 |
commit | bf3b58e7cf1d896ffc3ce957d9ed826789558a22 (patch) | |
tree | 04605f2607cbe82006a0095e35911a82103fc3c6 /engines/agos/draw.cpp | |
parent | 2783526b714e28be62bf335de6c5b66e9835f121 (diff) | |
download | scummvm-rg350-bf3b58e7cf1d896ffc3ce957d9ed826789558a22.tar.gz scummvm-rg350-bf3b58e7cf1d896ffc3ce957d9ed826789558a22.tar.bz2 scummvm-rg350-bf3b58e7cf1d896ffc3ce957d9ed826789558a22.zip |
Add code for handling special walls in Elvira 1/2.
svn-id: r26853
Diffstat (limited to 'engines/agos/draw.cpp')
-rw-r--r-- | engines/agos/draw.cpp | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp index d5345c9071..5b5b42cbbb 100644 --- a/engines/agos/draw.cpp +++ b/engines/agos/draw.cpp @@ -164,6 +164,29 @@ void AGOSEngine::animateSprites() { _vgaSpriteChanged++; } + if ((getGameType() == GType_ELVIRA1 && !_variableArray[293] || + getGameType() == GType_ELVIRA2 && !_variableArray[71]) && + _wallOn) { + + VC10_state state; + state.srcPtr = getBackGround() + 504; + state.height = 127; + state.width = 14; + state.y = 0; + state.x = 0; + state.palette = 0; + state.paletteMod = 0; + state.flags = kDFNonTrans; + + _windowNum = 4; + + _backFlag = 1; + drawImage(&state); + _backFlag = 0; + + _vgaSpriteChanged++; + } + if (!_scrollFlag && !_vgaSpriteChanged) { return; } @@ -201,6 +224,74 @@ void AGOSEngine::animateSprites() { vsp++; } + if (getGameType() == GType_ELVIRA1 && _variableArray[293]) { + debug(0, "Using special wall"); + + uint8 color, h, len; + byte *dst = _window4BackScn; + + color = (_variableArray[293] & 1) ? 13 : 15; + _wallOn = 2; + + h = 127; + while (h) { + len = 112; + while (len--) { + *dst++ = color; + dst++; + } + + h--; + if (h == 0) + break; + + len = 112; + while (len--) { + dst++; + *dst++ = color; + } + h--; + } + + _window4Flag = 1; + setMoveRect(0, 224, 0, 127); + } else if (getGameType() == GType_ELVIRA2 && _variableArray[71] & 2) { + debug(0, "Using special wall"); + + uint8 color, h, len; + byte *dst = _window4BackScn; + + color = 1; + _wallOn = 2; + + h = 43; + while (h) { + len = 56; + while (len--) { + *dst++ = color; + dst += 3; + } + + h--; + if (h == 0) + break; + + dst += 448; + + len = 56; + while (len--) { + dst += 2; + *dst++ = color; + dst++; + } + dst += 448; + h--; + } + + _window4Flag = 1; + setMoveRect(0, 224, 0, 127); + } + if (_window6Flag == 1) _window6Flag++; |