diff options
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 */ |