mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
MADS: Standardised on passing depth surfaces as DepthSurface
This commit is contained in:
parent
ce5c2f3e28
commit
ea19581ae3
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user