Opened 22 years ago

Closed 22 years ago

#267 closed defect (fixed)

SAM: Objects layered wrong

Reported by: SF/jbergstrom Owned by: eriktorbjorn
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Sam and Max

Description

ScummVM 0.2.0 English CD-Rom talkie Win32

Sometimes, graphics appear incorrectly layered: subtitles may be behind characters or Sam and Max stand on the dialogue icon bar.

Ticket imported from: #556498. Ticket imported from: bugs/267.

Change History (11)

comment:1 by SF/ender, 22 years ago

This is a known problem that we are looking into. Thanks for the report.

comment:2 by fingolfin, 22 years ago

Summary: Objects layered wrongSAM: Objects layered wrong

comment:3 by fingolfin, 22 years ago

Ender, can you tell me where exactly the drawing of the inventory is performed? Or is that done in script code only?

I wonder if there is some "layer" parameter which we don't get/ignore. It would explain the hack needed to get the inventory to draw right (we disable actor drawing while the inventory is shown), and all these other issues. Also, when I am in the ball of twine, if Sam & Max both stand in front of the window they will start to "flicker", that is, first one is in front, then the other is etc. This seems to indicate that our rendering order algorithm isn't "stable", i.e. if two objects are "equal" (as far as the draw ordering is concerned), they might still be changed (a stable sorting algo will not exchange equal objects).

comment:4 by fingolfin, 22 years ago

Note: similiar problems also occur in The Dig.

comment:5 by eriktorbjorn, 22 years ago

I've submitted an experimental patch (#613597) for this. It won't do a thing for The Dig though, since the patch just makes sure that a line of code that was already being executed for The Dig is now also executed for Sam & Max.

However, the patch only fixes the problem where actors are being drawn over objects. There's still a much rarer (I think) problem where blast objects are being drawn over objects. Maybe that could be related to the problems in The Dig? (I haven't looked much at The Dig yet because of ScummVM crashes.)

comment:6 by eriktorbjorn, 22 years ago

I just checked. It turns out that the drawBomp()-related object-layering problem (outside the Mystery Vortex) is present with the original interpreter, so I'd say we can safely ignore it.

That should mean this bug can be closed now, right?

comment:7 by eriktorbjorn, 22 years ago

I just checked. It turns out that the drawBomp()-related object-layering problem (outside the Mystery Vortex) is present with the original interpreter, so I'd say we can safely ignore it.

That should mean this bug can be closed now, right?

comment:8 by eriktorbjorn, 22 years ago

Drat, the bug isn't completely fixed after all. In some rooms, some of the actors are drawn over the inventory. For instance, in Sam's and Max's office, the rat is.

I haven't had the time to look into this yet. I just hope we won't have to put back that stupid inventory hack after all...

comment:9 by eriktorbjorn, 22 years ago

The latest CVS snapshot should fix the remaining layering problems, except for the drawBomp()-related one which is present in the original interpreter anyway. Could someone please verify that this bug can be closed now?

The patch will also affect The Dig and Full Throttle, but I don't know if it does so for better or for worse.

comment:10 by fingolfin, 22 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:11 by fingolfin, 22 years ago

It seems so. If not we'll surely get complaints, and can reopen this easily :-)

Note: See TracTickets for help on using tickets.