aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/mads_views.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2010-07-24 08:08:19 +0000
committerPaul Gilbert2010-07-24 08:08:19 +0000
commit0191f8fd7157e29e92f89f82cb15e44949c11357 (patch)
tree3ab936c1c27b86679fc04dcf989831de1ea5f54c /engines/m4/mads_views.cpp
parentc8cde0735fdc1ccbcdeb9075433d9f31bf03f86f (diff)
downloadscummvm-rg350-0191f8fd7157e29e92f89f82cb15e44949c11357.tar.gz
scummvm-rg350-0191f8fd7157e29e92f89f82cb15e44949c11357.tar.bz2
scummvm-rg350-0191f8fd7157e29e92f89f82cb15e44949c11357.zip
M4: Bugfixes for depth ordering to fix the Z order of on-screen objects
svn-id: r51239
Diffstat (limited to 'engines/m4/mads_views.cpp')
-rw-r--r--engines/m4/mads_views.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index a8a8e09105..20d469fedf 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -1262,7 +1262,7 @@ bool MadsSequenceList::addSubEntry(int index, SequenceSubEntryMode mode, int fra
return false;
}
-int MadsSequenceList::add(int spriteListIndex, int v0, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
+int MadsSequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites,
int frameStart) {
@@ -1283,7 +1283,7 @@ int MadsSequenceList::add(int spriteListIndex, int v0, int frameIndex, int trigg
// Set the list entry fields
_entries[seqIndex].active = true;
_entries[seqIndex].spriteListIndex = spriteListIndex;
- _entries[seqIndex].field_2 = v0;
+ _entries[seqIndex].flipped = flipped;
_entries[seqIndex].frameIndex = frameIndex;
_entries[seqIndex].frameStart = frameStart;
_entries[seqIndex].numSprites = numSprites;
@@ -1329,7 +1329,7 @@ void MadsSequenceList::setSpriteSlot(int seqIndex, MadsSpriteSlot &spriteSlot) {
spriteSlot.spriteType = spriteSet.isBackground() ? BACKGROUND_SPRITE : FOREGROUND_SPRITE;
spriteSlot.seqIndex = seqIndex;
spriteSlot.spriteListIndex = timerEntry.spriteListIndex;
- spriteSlot.frameNumber = ((timerEntry.field_2 == 1) ? 0x8000 : 0) | timerEntry.frameIndex;
+ spriteSlot.frameNumber = (timerEntry.flipped ? 0x8000 : 0) | timerEntry.frameIndex;
spriteSlot.depth = timerEntry.depth;
spriteSlot.scale = timerEntry.scale;
@@ -1530,6 +1530,13 @@ void MadsSequenceList::scan() {
}
}
+/**
+ * Sets the depth of the specified entry in the sequence list
+ */
+void MadsSequenceList::setDepth(int seqIndex, int depth) {
+ _entries[seqIndex].depth = depth;
+}
+
//--------------------------------------------------------------------------
Animation::Animation(MadsM4Engine *vm): _vm(vm) {