#912 closed defect (fixed)
SAM: Intro glitch (regression since 0.4.1)
Reported by: | eriktorbjorn | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Sam and Max |
Description
There's a slight regression in the Sam & Max intro. In the part where Sam says "Sic 'im up, little buddy." Sam's head is being drawn behind his body.
I don't know when the regression was introduced. All I know is that it's happening with the latest CVS snapshot, and it didn't happen in 0.4.1.
Ticket imported from: #758167. Ticket imported from: bugs/912.
Attachments (2)
Change History (6)
by , 21 years ago
Attachment: | samnmax-0.4.1.png added |
---|
by , 21 years ago
Attachment: | samnmax-cvs.png added |
---|
Screenshot detail from the June 20 CVS snapshot
comment:1 by , 21 years ago
I think I may have found the reason.
In this scene, Sam is actually made up from two actors: Actor 2 (the body), and actor 10 (the head).
The problem is that they are both in the same layer (0), with the same Y coordinate (170), which gives them both the same drawOrder value.
We recently replaced the old sorting function with qsort(). With the old code, I think actors with the same drawOrder value retained their original order in the sorted list. Apparently qsort() behaves differently.
So one easy fix might be to change sortByDrawOrder() to return actor1->number - actor2->number in the case where drawOrder(actor1) == drawOrder(actor2).
(At least I think so. It's a bit too late at night for me to be certain. :-)
comment:2 by , 21 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 21 years ago
I can't think of any problems with my suggested fix, even by daylight, so I've applied it.
comment:4 by , 20 years ago
It turns out stable vs. unstable sort wasn't the real problem her. See bug #1093867 for details and how this was fixed 'properly' now.
Screenshot detail from 0.4.1