Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#8079 closed patch

AKOS codec5 rewrite (experimental)

Reported by: eriktorbjorn Owned by: SF/ender
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Full Throttle

Description

This patch replaces AkosRenderer::codec5(). It used to call drawBomp(), which cared nothing for masking or the shadow table. As can be seen from the screenshots, this makes quite a difference for the cars in Full Throttle's junkyard.

Of course, this could be the wrong approach. Maybe the right thing to do would be to change drawBomp()? Time will tell, I guess...

Unfortunately, it's not quite working yet. I don't understand why the upper right car is masked the way it is. There are other things that look strange as well, but I believe those are because of different bugs.

One thing that I'm particularly uncertain about is the setting of draw_top and draw_bottom. They used to be set to 0 and vs->height respectively, with a comment from Yazoo that "this is not correct, but fix a lot of bugs for the moment". I don't know which bugs he was talking about, but until I changed it I was never able to walk out of that part of the junkyard. I had to let the dog chase me. I don't know why this is.

I could really use some help at this point...

By the way, I found a number of places where we increase a mask pointer by 40. (Heck, I had to add one of those myself.) Doesn't that mean we're still making assumptions about the screen width, except this time in bits rather than pixels?

Ticket imported from: #618888. Ticket imported from: patches/184.

Attachments (6)

akos-codec5.diff (4.3 KB ) - added by eriktorbjorn 22 years ago.
Patch against an October 3 CVS snapshot
snapshot1.png (63.9 KB ) - added by eriktorbjorn 22 years ago.
Full Throttle junkyard, unpatched version
snapshot2.png (65.0 KB ) - added by eriktorbjorn 22 years ago.
Full Throttle junkyard, patched version
ft.s01 (49.8 KB ) - added by SF/ender 22 years ago.
akos-codec5v2.diff (4.8 KB ) - added by eriktorbjorn 22 years ago.
Updated patch against an October 6 CVS snapshot
codec5-cleanup.diff (3.1 KB ) - added by eriktorbjorn 22 years ago.
Patch against an October 7 CVS snapshot

Download all attachments as: .zip

Change History (14)

by eriktorbjorn, 22 years ago

Attachment: akos-codec5.diff added

Patch against an October 3 CVS snapshot

by eriktorbjorn, 22 years ago

Attachment: snapshot1.png added

Full Throttle junkyard, unpatched version

by eriktorbjorn, 22 years ago

Attachment: snapshot2.png added

Full Throttle junkyard, patched version

comment:1 by SF/ender, 22 years ago

Owner: set to SF/ender

comment:2 by SF/ender, 22 years ago

I've noticed a fatal problem with this patch, so it has not been applied yet.

Touching the fuel-tower ladder in Full Throttle causes memory corruption
and eventual crash, but only with this rewrite. Note that this is similar
behavior as the remapActorPalette function caused, until I added a nasty
FIXME there.

Save game outside of the fuel-tower has been attached (English version). Just walk in and touch the ladder.

by SF/ender, 22 years ago

Attachment: ft.s01 added

by eriktorbjorn, 22 years ago

Attachment: akos-codec5v2.diff added

Updated patch against an October 6 CVS snapshot

comment:3 by eriktorbjorn, 22 years ago

Look at the *size* of that thing!

That really is one heck of a test case because whatever that flying thing is, it's as big as the screen, which makes it extra sensitive to off-by-one errors. This version fixes some errors, is a lot more paranoid about where it draws, and generally tries to be a bit more explicit (i.e. less clever) about where it reads.

As a result, the masking also seems to be working now.

Which is not to say that it's necessarily bug free, of course. I did see one graphics glitch in the Full Throttle junk yard, where a car's shadow on another car had the wrong colour in some places. For now I'm going to assume that it's either unavoidable, or that my earlier experiments had corrupted the shadow palette.

Anyway it should work a whole lot better now.

comment:4 by SF/ender, 22 years ago

Status: newclosed

comment:5 by SF/ender, 22 years ago

Looks very nice :)

Applied!

by eriktorbjorn, 22 years ago

Attachment: codec5-cleanup.diff added

Patch against an October 7 CVS snapshot

comment:6 by eriktorbjorn, 22 years ago

I never know if I should post a new patch or comment on the old, but here's a slight cleanup to codec5() that hopefully doesn't break anything.

By the way, I was never able to reproduce the Dig text masking problems Ender mentioned. Maybe those were codec5-related, too.

comment:7 by eriktorbjorn, 22 years ago

Hmm... I just noticed that there seems to be some problems with the cleaned up version, so please ignore it for now.

comment:8 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Full Throttle
Note: See TracTickets for help on using tickets.