aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene_data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/scene_data.cpp')
-rw-r--r--engines/mads/scene_data.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index 813e9062cf..c15a3876a8 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -383,9 +383,8 @@ void SceneInfo::SpriteInfo::load(Common::SeekableReadStream *f) {
SceneInfo *SceneInfo::init(MADSEngine *vm) {
if (vm->getGameID() == GType_RexNebular) {
- return new SceneInfoNebular(vm);
- }
- else {
+ return new Nebular::SceneInfoNebular(vm);
+ } else {
return new SceneInfo(vm);
}
}
@@ -587,34 +586,6 @@ void SceneInfo::loadCodes(MSurface &depthSurface) {
/*------------------------------------------------------------------------*/
-void SceneInfoNebular::loadCodes(MSurface &depthSurface) {
- File f(Resources::formatName(RESPREFIX_RM, _sceneId, ".DAT"));
- MadsPack codesPack(&f);
- Common::SeekableReadStream *stream = codesPack.getItemStream(0);
-
- byte *destP = depthSurface.getData();
- byte *endP = depthSurface.getBasePtr(0, depthSurface.h);
-
- byte runLength = stream->readByte();
- while (destP < endP && runLength > 0) {
- byte runValue = stream->readByte();
-
- // Write out the run length
- Common::fill(destP, destP + runLength, runValue);
- destP += runLength;
-
- // Get the next run length
- runLength = stream->readByte();
- }
-
- if (destP < endP)
- Common::fill(destP, endP, 0);
- delete stream;
- f.close();
-}
-
-/*------------------------------------------------------------------------*/
-
SceneLogic::SceneLogic(MADSEngine *vm) : _vm(vm) {
_scene = &_vm->_game->_scene;
}