Opened 21 years ago

Closed 21 years ago

Last modified 19 years ago

#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)

samnmax-0.4.1.png (7.2 KB ) - added by eriktorbjorn 21 years ago.
Screenshot detail from 0.4.1
samnmax-cvs.png (7.4 KB ) - added by eriktorbjorn 21 years ago.
Screenshot detail from the June 20 CVS snapshot

Download all attachments as: .zip

Change History (6)

by eriktorbjorn, 21 years ago

Attachment: samnmax-0.4.1.png added

Screenshot detail from 0.4.1

by eriktorbjorn, 21 years ago

Attachment: samnmax-cvs.png added

Screenshot detail from the June 20 CVS snapshot

comment:1 by eriktorbjorn, 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 eriktorbjorn, 21 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:3 by eriktorbjorn, 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 fingolfin, 19 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.

Note: See TracTickets for help on using tickets.