diff options
author | Sven Hesse | 2011-01-20 10:20:57 +0000 |
---|---|---|
committer | Sven Hesse | 2011-01-20 10:20:57 +0000 |
commit | 6b85f809d9fcb2e7140944b5a8be14373b8fc081 (patch) | |
tree | 310755730b08359c0038b7a837091fa5df71b6c8 /engines | |
parent | dd3894a44248e2c5b2c646b4cc1d1353442b7fbb (diff) | |
download | scummvm-rg350-6b85f809d9fcb2e7140944b5a8be14373b8fc081.tar.gz scummvm-rg350-6b85f809d9fcb2e7140944b5a8be14373b8fc081.tar.bz2 scummvm-rg350-6b85f809d9fcb2e7140944b5a8be14373b8fc081.zip |
GOB: Urban: Fix missing visuals at Cemetary/Lab
Urban Runner decouples _frontSurface and
_spritesArray[kFrontSurface] at that screen... *sigh*
svn-id: r55346
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/draw.cpp | 13 | ||||
-rw-r--r-- | engines/gob/draw.h | 5 | ||||
-rw-r--r-- | engines/gob/inter_v6.cpp | 1 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 9 |
4 files changed, 23 insertions, 5 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 54ac86b23d..216dbb5b77 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -329,6 +329,17 @@ void Draw::initSpriteSurf(int16 index, int16 width, int16 height, _spritesArray[index]->clear(); } +void Draw::freeSprite(int16 index) { + assert(index < SPRITES_COUNT); + + _spritesArray[index].reset(); + + if (index == kFrontSurface) + _spritesArray[index] = _frontSurface; + if (index == kBackSurface) + _spritesArray[index] = _backSurface; +} + void Draw::adjustCoords(char adjust, int16 *coord1, int16 *coord2) { if (_needAdjust == 2) return; @@ -550,10 +561,12 @@ void Draw::forceBlit(bool backwards) { return; if (_frontSurface == _backSurface) return; + /* if (_spritesArray[kFrontSurface] != _frontSurface) return; if (_spritesArray[kBackSurface] != _backSurface) return; + */ if (!backwards) { _frontSurface->blit(*_backSurface); diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 8ef5671948..6a23994cf8 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -179,10 +179,7 @@ public: void dirtiedRect(SurfacePtr surface, int16 left, int16 top, int16 right, int16 bottom); void initSpriteSurf(int16 index, int16 width, int16 height, int16 flags); - void freeSprite(int16 index) { - assert(index < SPRITES_COUNT); - _spritesArray[index].reset(); - } + void freeSprite(int16 index); void adjustCoords(char adjust, int16 *coord1, int16 *coord2); void adjustCoords(char adjust, uint16 *coord1, uint16 *coord2) { adjustCoords(adjust, (int16 *)coord1, (int16 *)coord2); diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index 561996dcfc..c04f34d894 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -66,6 +66,7 @@ void Inter_v6::setupOpcodesFunc() { OPCODEFUNC(0x03, o6_loadCursor); OPCODEFUNC(0x09, o6_assign); OPCODEFUNC(0x19, o6_removeHotspot); + OPCODEFUNC(0x32, o1_copySprite); OPCODEFUNC(0x33, o6_fillRect); } diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index a7284feb66..6b6bc570da 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -158,13 +158,20 @@ int VideoPlayer::openVideo(bool primary, const Common::String &file, Properties screenSize ? _vm->_height : video->decoder->getHeight(), 0); } - if (!_vm->_draw->_spritesArray[properties.sprite]) { + if (!_vm->_draw->_spritesArray[properties.sprite] && + (properties.sprite != Draw::kFrontSurface) && + (properties.sprite != Draw::kBackSurface)) { properties.sprite = -1; video->surface.reset(); video->decoder->setSurfaceMemory(); properties.x = properties.y = 0; } else { video->surface = _vm->_draw->_spritesArray[properties.sprite]; + if (properties.sprite == Draw::kFrontSurface) + video->surface = _vm->_draw->_frontSurface; + if (properties.sprite == Draw::kBackSurface) + video->surface = _vm->_draw->_backSurface; + video->decoder->setSurfaceMemory(video->surface->getData(), video->surface->getWidth(), video->surface->getHeight(), video->surface->getBPP()); |