Opened 18 years ago

Closed 18 years ago

Last modified 22 months ago

#8049 closed patch

drawBomp() rewrite

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

Description

This is an attempt at rewriting drawBomp() so that it handles scaling (needed for the highway surfing in Sam & Max) and blending (needed for the inventory and command menus in The Dig).

The scaling algorithm is pretty stupid, but as long as it's only used for things that go by pretty quickly, it should be good enough. The blending will need some tuning since all I have to compare it to is the stamp-sized screenshot in the Dig manual.

Unlike the current version of drawBomp(), this version assumes it always has to take scaling, clipping, etc. into consideration, so it's slower. Maybe noticeably so. But I don't want to add optimizations of questionable worth until I'm pretty sure the basics are working correctly.

A more noticeable optimization would probably be if it could be taught to only redraw the dirty areas of the screen. For instance, when looking at the inventory in The Dig it appears the entire inventory window is redrawn every scummLoop iteration. Without a blend cache this would be painfully slow.

(Speaking of which, with this patch drawBlastObject() probably dirties too much of the screen in the scaled case. How come drawBomp() isn't the one responsible for calling updateDirtyRect()?)

Ticket imported from: #609563. Ticket imported from: patches/154.

Attachments (1)

drawbomp.diff (6.1 KB ) - added by eriktorbjorn 18 years ago.
Patch against a September 14 CVS snapshot

Download all attachments as: .zip

Change History (5)

by eriktorbjorn, 18 years ago

Attachment: drawbomp.diff added

Patch against a September 14 CVS snapshot

comment:1 by SF/ender, 18 years ago

Owner: set to SF/ender

comment:2 by SF/ender, 18 years ago

Applied, thanks :)

comment:3 by SF/ender, 18 years ago

Status: newclosed

comment:4 by digitall, 22 months ago

Component: Engine: SCUMM
Game: Sam and Max
Note: See TracTickets for help on using tickets.