diff options
author | Paul Gilbert | 2014-03-12 23:45:57 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-12 23:45:57 -0400 |
commit | 0df4d0aed1678f81cb75bb56cb2a1fc19603312c (patch) | |
tree | 69bf2b7826de6a962a91ab5c719c926af12f7198 /engines/mads/nebular | |
parent | 408f5e79df5e8a33367fdf2a9c17b424953edace (diff) | |
download | scummvm-rg350-0df4d0aed1678f81cb75bb56cb2a1fc19603312c.tar.gz scummvm-rg350-0df4d0aed1678f81cb75bb56cb2a1fc19603312c.tar.bz2 scummvm-rg350-0df4d0aed1678f81cb75bb56cb2a1fc19603312c.zip |
MADS: Fixed loading of scene depth surface for Rex Nebular
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 9 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index baee40cc47..3587822f19 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -68,6 +68,13 @@ void SceneInfoNebular::loadCodes(MSurface &depthSurface) { MadsPack codesPack(&f); Common::SeekableReadStream *stream = codesPack.getItemStream(0); + loadCodes(depthSurface, stream); + + delete stream; + f.close(); +} + +void SceneInfoNebular::loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) { byte *destP = depthSurface.getData(); byte *endP = depthSurface.getBasePtr(0, depthSurface.h); @@ -85,8 +92,6 @@ void SceneInfoNebular::loadCodes(MSurface &depthSurface) { if (destP < endP) Common::fill(destP, endP, 0); - delete stream; - f.close(); } } // End of namespace Nebular diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h index da36c71905..5ac708d398 100644 --- a/engines/mads/nebular/nebular_scenes.h +++ b/engines/mads/nebular/nebular_scenes.h @@ -115,6 +115,8 @@ class SceneInfoNebular : public SceneInfo { protected: virtual void loadCodes(MSurface &depthSurface); + virtual void loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream); + /** * Constructor */ |