aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene_data.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-10 21:51:23 -0500
committerPaul Gilbert2016-03-14 20:56:26 -0400
commitb4e3d4abc16d9996651874c8952b1ce846dcb6a1 (patch)
tree73fa735117b04d3643693f156d635bced2c32053 /engines/mads/scene_data.cpp
parent9c7569b74bf3493f7970a912ae54b87d73e6633e (diff)
downloadscummvm-rg350-b4e3d4abc16d9996651874c8952b1ce846dcb6a1.tar.gz
scummvm-rg350-b4e3d4abc16d9996651874c8952b1ce846dcb6a1.tar.bz2
scummvm-rg350-b4e3d4abc16d9996651874c8952b1ce846dcb6a1.zip
MADS: Changed engine to use Graphics::ManagedSurface
Diffstat (limited to 'engines/mads/scene_data.cpp')
-rw-r--r--engines/mads/scene_data.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index 7b0e64c1fe..5323178ec7 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -242,13 +242,13 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
int height = _height;
if (!bgSurface.getPixels() || (bgSurface.w != width) || (bgSurface.h != height)) {
- bgSurface.setSize(width, height);
+ bgSurface.create(width, height);
}
if (_depthStyle == 2)
width >>= 2;
if (!depthSurface.getPixels()) {
- depthSurface.setSize(width, height);
+ depthSurface.create(width, height);
}
loadCodes(depthSurface, variant);
@@ -288,7 +288,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
assert(asset && _depthStyle != 2);
MSprite *spr = asset->getFrame(si._frameNumber);
- bgSurface.copyFrom(spr, si._position, si._depth, &depthSurface,
+ bgSurface.copyFrom(*spr, si._position, si._depth, &depthSurface,
si._scale, false, spr->getTransparencyIndex());
}
@@ -455,7 +455,7 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName,
newHeight = tileCount * tileHeight;
if (bgSurface.w != newWidth || bgSurface.h != newHeight)
- bgSurface.setSize(newWidth, newHeight);
+ bgSurface.create(newWidth, newHeight);
// --------------------------------------------------------------------------------
@@ -477,7 +477,7 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName,
//debugCN(kDebugGraphics, "Tile: %i, compressed size: %i\n", i, compressedTileDataSize);
- newTile->empty();
+ newTile->clear();
byte *compressedTileData = new byte[compressedTileDataSize];
@@ -503,7 +503,8 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName,
TileSetIterator tile = tileSet.begin();
for (int i = 0; i < tileIndex; i++)
++tile;
- ((*tile).get())->copyTo(&bgSurface, Common::Point(x * tileWidth, y * tileHeight));
+
+ bgSurface.blitFrom(*(*tile).get(), Common::Point(x * tileWidth, y * tileHeight));
((*tile).get())->free();
}
}