From 904493bb760570c10738bdb73f28a531ff70af30 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 18 Jul 2004 23:41:49 +0000 Subject: Hack to work around bug #775097 - probably wrong, probably will cause regressions, probably should be undone soon -- but it's an experiment ;-) svn-id: r14268 --- scumm/actor.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scumm') diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 1f2ba4fb93..890bef63d9 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -895,6 +895,17 @@ static int compareDrawOrder(const void* a, const void* b) if (diff > 0) return +1; + // FIXME: This hack works around bug #775097. It's probably wrong, though :-/ + // Would be interesting if somebody could check the disassembly (see also the + // comment on the above mentioned tracker item). + if (g_scumm->_gameId == GID_TENTACLE) { + diff = actor1->forceClip - actor2->forceClip; + if (diff < 0) + return -1; + if (diff > 0) + return +1; + } + // The qsort() function is not guaranteed to be stable (i.e. it may // re-order "equal" elements in an array it sorts). Hence we use the // actor number as tie-breaker. This is needed for the Sam & Max intro, -- cgit v1.2.3