aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-05-25 13:23:05 -0400
committerPaul Gilbert2014-05-25 13:23:05 -0400
commitea19581ae30bed434da8c9426c7b6defd702fc88 (patch)
treebe063cdce22a8011d6570ed10644aee25ee3fdb0 /engines
parentce5c2f3e28cf7f7be5d2aa477d9610df04a126eb (diff)
downloadscummvm-rg350-ea19581ae30bed434da8c9426c7b6defd702fc88.tar.gz
scummvm-rg350-ea19581ae30bed434da8c9426c7b6defd702fc88.tar.bz2
scummvm-rg350-ea19581ae30bed434da8c9426c7b6defd702fc88.zip
MADS: Standardised on passing depth surfaces as DepthSurface
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/animation.cpp4
-rw-r--r--engines/mads/animation.h4
-rw-r--r--engines/mads/msurface.cpp2
-rw-r--r--engines/mads/msurface.h3
-rw-r--r--engines/mads/scene.cpp4
-rw-r--r--engines/mads/scene_data.cpp2
-rw-r--r--engines/mads/scene_data.h2
-rw-r--r--engines/mads/sprites.cpp2
8 files changed, 12 insertions, 11 deletions
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index 25fa4a8e06..ac8c9969b7 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -172,7 +172,7 @@ Animation::~Animation() {
}
}
-void Animation::load(UserInterface &interfaceSurface, MSurface &depthSurface,
+void Animation::load(UserInterface &interfaceSurface, DepthSurface &depthSurface,
const Common::String &resName, int flags, Common::Array<PaletteCycle> *palCycles,
SceneInfo *sceneInfo) {
Common::String resourceName = resName;
@@ -366,7 +366,7 @@ bool Animation::drawFrame(SpriteAsset &spriteSet, const Common::Point &pt, int f
return 0;
}
-void Animation::loadInterface(UserInterface &interfaceSurface, MSurface &depthSurface,
+void Animation::loadInterface(UserInterface &interfaceSurface, DepthSurface &depthSurface,
AAHeader &header, int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo) {
_scene->_depthStyle = 0;
if (header._bgType <= ANIMBG_FULL_SIZE) {
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index 715f6e49a5..15086d3e41 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -168,7 +168,7 @@ private:
/**
* Load the user interface display for an animation
*/
- void loadInterface(UserInterface &interfaceSurface, MSurface &depthSurface,
+ void loadInterface(UserInterface &interfaceSurface, DepthSurface &depthSurface,
AAHeader &header, int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo);
/**
@@ -196,7 +196,7 @@ public:
/**
* Loads animation data
*/
- void load(UserInterface &interfaceSurface, MSurface &depthSurface, const Common::String &resName,
+ void load(UserInterface &interfaceSurface, DepthSurface &depthSurface, const Common::String &resName,
int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo);
/**
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index 3ebbc6b79d..a7249cd69c 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -258,7 +258,7 @@ void MSurface::copyFrom(MSurface *src, const Common::Rect &srcBounds,
}
void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth,
- MSurface *depthsSurface, int scale, int transparentColor) {
+ DepthSurface *depthsSurface, int scale, int transparentColor) {
int destX = destPos.x, destY = destPos.y;
if (scale == 100) {
diff --git a/engines/mads/msurface.h b/engines/mads/msurface.h
index fbd927084a..e3cf89d649 100644
--- a/engines/mads/msurface.h
+++ b/engines/mads/msurface.h
@@ -32,6 +32,7 @@ namespace MADS {
class MADSEngine;
class MSprite;
+class DepthSurface;
/**
* Basic sprite information
@@ -162,7 +163,7 @@ public:
* @param depthSurface Depth surface to use with sprite depth
* @param transparentColor Transparency palette index
*/
- void copyFrom(MSurface *src, const Common::Point &destPos, int depth, MSurface *depthSurface,
+ void copyFrom(MSurface *src, const Common::Point &destPos, int depth, DepthSurface *depthSurface,
int scale, int transparentColor = -1);
/**
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 944c082817..13913030df 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -176,7 +176,7 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) {
flags |= ANIMFLAG_LOAD_BACKGROUND_ONLY;
_animationData = Animation::init(_vm, this);
- MSurface depthSurface;
+ DepthSurface depthSurface(_vm);
_animationData->load(_userInterface, depthSurface, prefix, flags, nullptr, nullptr);
_vm->_palette->_paletteUsage.load(&_scenePaletteUsage);
@@ -592,7 +592,7 @@ void Scene::checkKeyboard() {
void Scene::loadAnimation(const Common::String &resName, int trigger) {
assert(_activeAnimation == nullptr);
- MSurface depthSurface;
+ DepthSurface depthSurface(_vm);
UserInterface interfaceSurface(_vm);
_activeAnimation = Animation::init(_vm, this);
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index 256a517540..5656ac4069 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -110,7 +110,7 @@ SceneInfo *SceneInfo::init(MADSEngine *vm) {
}
void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
- int flags, MSurface &depthSurface, MSurface &bgSurface) {
+ int flags, DepthSurface &depthSurface, MSurface &bgSurface) {
bool sceneFlag = sceneId >= 0;
// Figure out the resource to use
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h
index db25298e91..392383af2f 100644
--- a/engines/mads/scene_data.h
+++ b/engines/mads/scene_data.h
@@ -186,7 +186,7 @@ public:
* loads the data
*/
void load(int sceneId, int variant, const Common::String &resName, int flags,
- MSurface &depthSurface, MSurface &bgSurface);
+ DepthSurface &depthSurface, MSurface &bgSurface);
/**
* Loads the palette for a scene
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index b0506fc40a..e4e57bd07b 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -258,7 +258,7 @@ void SpriteSlots::drawBackground() {
if (spriteSlot._depth <= 1) {
frame->copyTo(&scene._backgroundSurface, frame->getTransparencyIndex());
} else if (scene._depthStyle == 0) {
- scene._backgroundSurface.copyFrom(frame, pt, spriteSlot._depth, &scene._backgroundSurface,
+ scene._backgroundSurface.copyFrom(frame, pt, spriteSlot._depth, &scene._depthSurface,
100, frame->getTransparencyIndex());
} else {
error("Unsupported depth style");