aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorArnaud Boutonné2009-09-16 21:13:12 +0000
committerArnaud Boutonné2009-09-16 21:13:12 +0000
commitee48b944f7d46464f8499eb7694c13b968889c44 (patch)
tree258244e22b75d45e0b7fc3499c4fb1071ea06e6e /engines/gob
parentf8f776364e044218898d66697033f7af3519f2d8 (diff)
downloadscummvm-rg350-ee48b944f7d46464f8499eb7694c13b968889c44.tar.gz
scummvm-rg350-ee48b944f7d46464f8499eb7694c13b968889c44.tar.bz2
scummvm-rg350-ee48b944f7d46464f8499eb7694c13b968889c44.zip
Playtoons - Add 3 DRAW_PIXEL patterns, fix some conditions.
svn-id: r44120
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/draw_playtoons.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/engines/gob/draw_playtoons.cpp b/engines/gob/draw_playtoons.cpp
index 9f2747d4e7..2dcdaba388 100644
--- a/engines/gob/draw_playtoons.cpp
+++ b/engines/gob/draw_playtoons.cpp
@@ -153,10 +153,22 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
case DRAW_PUTPIXEL:
switch(_pattern & 0xFF) {
case -1:
+ warning("oPlaytoons_spriteOperation: operation DRAW_PUTPIXEL, pattern -1");
+ break;
case 1:
+ _vm->_video->fillRect(*_spritesArray[_destSurface], destSpriteX,
+ _destSpriteY, _destSpriteX + 1,
+ _destSpriteY + 1, _frontColor);
+ break;
case 2:
+ _vm->_video->fillRect(*_spritesArray[_destSurface], destSpriteX - 1,
+ _destSpriteY - 1, _destSpriteX + 1,
+ _destSpriteY + 1, _frontColor);
+ break;
case 3:
- warning("oPlaytoons_spriteOperation: operation DRAW_PUTPIWEL, pattern %d", _pattern & 0xFF);
+ _vm->_video->fillRect(*_spritesArray[_destSurface], destSpriteX - 1,
+ _destSpriteY - 1, _destSpriteX + 2,
+ _destSpriteY + 2, _frontColor);
break;
default:
_vm->_video->putPixel(_destSpriteX, _destSpriteY, _frontColor, *_spritesArray[_destSurface]);
@@ -190,7 +202,7 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
break;
case DRAW_DRAWLINE:
- if ((_needAdjust != 2) || (_needAdjust < 10)) {
+ if ((_needAdjust != 2) && (_needAdjust < 10)) {
warning ("oPlaytoons_spriteOperation: operation DRAW_DRAWLINE, draw multiple lines");
_vm->_video->drawLine(*_spritesArray[_destSurface],
_destSpriteX, _destSpriteY,
@@ -266,7 +278,7 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
if ((_fontIndex >= 4) || (_fontToSprite[_fontIndex].sprite == -1)) {
Font *font = _fonts[_fontIndex];
if (!font) {
- warning("Trying to print \"%s\" with undefined font %d", _textToPrint, _fontIndex);
+ warning("oPlaytoons_spriteOperation: Trying to print \"%s\" with undefined font %d", _textToPrint, _fontIndex);
break;
}
@@ -319,7 +331,7 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
break;
case DRAW_DRAWBAR:
- if (_needAdjust != 2) {
+ if ((_needAdjust != 2) && (_needAdjust < 10)){
_vm->_video->fillRect(*_spritesArray[_destSurface],
_destSpriteX, _spriteBottom - 1,
_spriteRight, _spriteBottom, _frontColor);
@@ -357,7 +369,8 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
break;
case DRAW_CLEARRECT:
- if ((_backColor != 16) && (_backColor != 144)) {
+ warning ("oPlaytoons_spriteOperation: DRAW_CLEARRECT uses _backColor %d", _backColor);
+ if (_backColor != -1) {
_vm->_video->fillRect(*_spritesArray[_destSurface],
_destSpriteX, _destSpriteY,
_spriteRight, _spriteBottom,
@@ -374,6 +387,10 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
dirtiedRect(_destSurface, _destSpriteX, _destSpriteY, _spriteRight, _spriteBottom);
break;
+
+ default:
+ warning ("oPlaytoons_spriteOperation: Unhandled operation %d", operation);
+ break;
}
_spriteLeft = spriteLeft;