[Scummvm-cvs-logs] SF.net SVN: scummvm:[49189] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Mon May 24 17:39:31 CEST 2010
Revision: 49189
http://scummvm.svn.sourceforge.net/scummvm/?rev=49189&view=rev
Author: m_kiewitz
Date: 2010-05-24 15:39:30 +0000 (Mon, 24 May 2010)
Log Message:
-----------
SCI: sort according to original order in kAnimate, when y and z are the same - fixes iceman half-open compartment in room 35
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/animate.cpp
scummvm/trunk/engines/sci/graphics/animate.h
Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp 2010-05-24 14:54:50 UTC (rev 49188)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp 2010-05-24 15:39:30 UTC (rev 49189)
@@ -109,7 +109,15 @@
}
bool sortHelper(const AnimateEntry* entry1, const AnimateEntry* entry2) {
- return (entry1->y == entry2->y) ? (entry1->z < entry2->z) : (entry1->y < entry2->y);
+ if (entry1->y == entry2->y) {
+ // if both y and z are the same, use the order we were given originally
+ // this is needed for special cases like iceman room 35
+ if (entry1->z == entry2->z)
+ return entry1->givenOrderNo < entry2->givenOrderNo;
+ else
+ return entry1->z < entry2->z;
+ }
+ return entry1->y < entry2->y;
}
void GfxAnimate::makeSortedList(List *list) {
@@ -156,6 +164,7 @@
listEntry->object = curObject;
// Get data from current object
+ listEntry->givenOrderNo = listNr;
listEntry->viewId = GET_SEL32V(_s->_segMan, curObject, SELECTOR(view));
listEntry->loopNo = GET_SEL32V(_s->_segMan, curObject, SELECTOR(loop));
listEntry->celNo = GET_SEL32V(_s->_segMan, curObject, SELECTOR(cel));
Modified: scummvm/trunk/engines/sci/graphics/animate.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.h 2010-05-24 14:54:50 UTC (rev 49188)
+++ scummvm/trunk/engines/sci/graphics/animate.h 2010-05-24 15:39:30 UTC (rev 49189)
@@ -40,7 +40,7 @@
kSignalAlwaysUpdate = 0x0020,
kSignalForceUpdate = 0x0040,
kSignalRemoveView = 0x0080,
- kSignalFrozen = 0x0100,
+ kSignalFrozen = 0x0100, // I got frozen today!!
kSignalExtraActor = 0x0200, // unused by us, defines all actors that may be included into the background if speed is too slow
kSignalHitObstacle = 0x0400, // used in the actor movement code by kDoBresen()
kSignalDoesntTurn = 0x0800, // used by _k_dirloop() to determine if an actor can turn or not
@@ -57,6 +57,7 @@
};
struct AnimateEntry {
+ int16 givenOrderNo;
reg_t object;
GuiResourceId viewId;
int16 loopNo;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list