Opened 16 years ago

Closed 15 years ago

#1055 closed defect (fixed)

DOTT: Actor layering glitch (hack-in-cvs)

Reported by: eriktorbjorn Owned by: cyxx
Priority: low Component: Engine: SCUMM
Keywords: Cc:
Game: Day of the Tentacle

Description

I played through Day of the Tentacle with a July 20 CVS
snapshot. It works almost perfectly as far as I can
tell, but there are a few minor issues I noticed:

1. At the end, when the kids are running away from
purple tentacle, there's a brief sequence on the second
floor where they are gliding instead of walking. I
think this used to work, but I can't say for sure when
that was.

I think it may have something to do with
startWalkAnim() not being called from actorWalkStep(),
but I don't know how to fix it.

2. Shortly after issue 1, the music changes. When it
does, some notes are usually (always?) left hanging.
The same thing sometimes happen when I push nurse Edna
out of her room, but that's harder for me to reproduce.

3. If you try to replace the taped-up Dr. Fred with an
unpainted mummy, one of the IRS agents will get
suspicious and enter the room. When he does, he is
drawn behind the mummy, even though he's standing in
front of the bed.

This does not happen with the original interpreter when
I run it with DOSbox.

Ticket imported from: #775097. Ticket imported from: bugs/1055.

Attachments (7)

tentacle.s22 (80.7 KB ) - added by eriktorbjorn 16 years ago.
Save game in nurse Edna's room
tentacle.s32 (75.8 KB ) - added by eriktorbjorn 16 years ago.
Savegame near the end of the game
tentacle.s50 (59.8 KB ) - added by eriktorbjorn 16 years ago.
Savegame even closer to issues 1 and 2
tentacle.s51 (82.0 KB ) - added by eriktorbjorn 16 years ago.
Savegame with Dr. Fred in the attic
tentacle.s15 (21.8 KB ) - added by eriktorbjorn 16 years ago.
Savegame (compressed) with Dr. Fred in the attic
actor-draw-order.patch (969 bytes ) - added by fingolfin 15 years ago.
processActors.txt (4.1 KB ) - added by Kirben 15 years ago.
DOTT disasm.

Download all attachments as: .zip

Change History (28)

by eriktorbjorn, 16 years ago

Attachment: tentacle.s22 added

Save game in nurse Edna's room

comment:1 by eriktorbjorn, 16 years ago

I forgot to mention: This is the English "talkie" version.

by eriktorbjorn, 16 years ago

Attachment: tentacle.s32 added

Savegame near the end of the game

comment:2 by eriktorbjorn, 16 years ago

I also forgot to mention that the music issues happen to me
regardless of which music backend I use. (I used the ALSA
backend at the time, but I also tried with the AdLib one.)

by eriktorbjorn, 16 years ago

Attachment: tentacle.s50 added

Savegame even closer to issues 1 and 2

by eriktorbjorn, 16 years ago

Attachment: tentacle.s51 added

Savegame with Dr. Fred in the attic

comment:3 by fingolfin, 16 years ago

Gnaw, gnaw, erik. You should know better than to report three
bugs in a single tracker item.

Also, can you reproduce any of those with 0.4.1 (read: are they
regressions?)

comment:4 by eriktorbjorn, 16 years ago

> Gnaw, gnaw, erik. You should know better than to report
> three bugs in a single tracker item.

Yeah, yeah, that was lazy of me. But some savegames applied
to more than one bug.

> Also, can you reproduce any of those with 0.4.1 (read: are
> they regressions?)

The mummy layering bug happens in 0.4.1 as well, so if it's
a regression it's old.

I haven't been able to reproduce the hanging notes in Edna's
room in 0.4.1, so that one may be a regression. I haven't
played the game to the end with 0.4.1 so I don't know about
the other hanging notes.

I'm pretty sure the walk animation bug is a regression. I
don't remember it happening the first time I got this far in
the game, but that was probably between 0.2.0 and 0.3.0. I
don't know how it looks in 0.4.1.

comment:5 by eriktorbjorn, 16 years ago

Component: Engine: SCUMM
Game: Day of the Tentacle
Summary: DOTT: Issues with July 20 CVS snapshotDOTT: Actor layering glitch

comment:6 by eriktorbjorn, 16 years ago

I've filed separate bug reports for 1 and 2, so this bug
report now only concerns the third issue.

comment:7 by fingolfin, 16 years ago

There are various things which could have caused this. E.g. the
changes made to the draw order / sorting. Or possibly a walkbox
issue.

comment:8 by eriktorbjorn, 16 years ago

Or our draw order rules could be wrong, but surely that
would have been noticed in other cases already...?

As far as I can see, Ted (the mummy) is actor 8 and the IRS
agent is actor 7. The both have the same layer value (0) and
Y coordinate (95), which means that the IRS agent is drawn
first since he has the lower actor number.

It wasn't until today I realized that forceClip doesn't seem
to affect the draw order at all. That does surprise me a bit...

comment:9 by eriktorbjorn, 16 years ago

I compared to DOSbox again, and as far as I can see ScummVM
draws Ted and the IRS agent in the exact same positions as
the original interpreter did. It's just the layering that's
wrong.

comment:10 by fingolfin, 16 years ago

forceClip has nothing to do at all with the actor draw order.

comment:11 by eriktorbjorn, 16 years ago

I've played through DOTT with a January 23 CVS snapshot, and
I can confirm that the glitch is still there. I'm attaching
an up-to-date savegame, in case the older ones have problems.

by eriktorbjorn, 16 years ago

Attachment: tentacle.s15 added

Savegame (compressed) with Dr. Fred in the attic

comment:12 by eriktorbjorn, 16 years ago

Oops, wrong savegame. I meant this one. :-)

comment:13 by fingolfin, 15 years ago

Maybe it would be a good idea to have a look at the corresponding
disasm. Maybe in DOTT, forceClip is used for actor ordering after all? Or
maybe the actor layer should be set in more places than we currnetly
do?

comment:14 by Kirben, 15 years ago

actor.layer isn't used until Scumm7 onwards.
There is no sign of actor.forceClip in the actor comparsion of
DOTT disasm. either.

comment:15 by fingolfin, 15 years ago

Summary: DOTT: Actor layering glitchDOTT: Actor layering glitch (hack-in-cvs)

comment:16 by fingolfin, 15 years ago

Priority: normallow

comment:17 by fingolfin, 15 years ago

Since this is cosmetical and we have a workaround in CVS: Lowering
priority.

comment:18 by fingolfin, 15 years ago

Back to some old theory... to quote erik:
>Or our draw order rules could be wrong, but surely that
>would have been noticed in other cases already...?

Maybe, maybe not -- the sceneario isn't *that* common, I think.
But now we do have a second report, and that report, too, seems
to indicate that there's a problem: bug #1093867.

In particular, I now suspect that maybe for some (all?) of the
newer SCUMM games, we should draw high numbered actors first (not
the other way around). The attached patch does just that and
fixes both issues.

A brief look at FT disasm doesn't seem to confirm this, though :-/

by fingolfin, 15 years ago

Attachment: actor-draw-order.patch added

by Kirben, 15 years ago

Attachment: processActors.txt added

DOTT disasm.

comment:19 by Kirben, 15 years ago

Attached disasm. of processActors function from Day of the
Tentacle if you want to check it too.

comment:20 by fingolfin, 15 years ago

Owner: set to cyxx
Resolution: fixed
Status: newclosed

comment:21 by fingolfin, 15 years ago

Fixed in CVS. See bug #1093867 for details.

Note: See TracTickets for help on using tickets.