mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
SCI: sort according to original order in kAnimate, when y and z are the same - fixes iceman half-open compartment in room 35
svn-id: r49189
This commit is contained in:
parent
b49efb67f6
commit
e9db62b272
@ -109,7 +109,15 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) {
|
||||
}
|
||||
|
||||
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 @@ void GfxAnimate::makeSortedList(List *list) {
|
||||
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));
|
||||
|
@ -40,7 +40,7 @@ enum ViewSignals {
|
||||
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 @@ enum ViewScaleSignals {
|
||||
};
|
||||
|
||||
struct AnimateEntry {
|
||||
int16 givenOrderNo;
|
||||
reg_t object;
|
||||
GuiResourceId viewId;
|
||||
int16 loopNo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user