Opened 16 years ago

Closed 16 years ago

Last modified 12 months ago

#8272 closed patch

SWORD2: Sprite drawing (incomplete)

Reported by: eriktorbjorn Owned by: SF/khalek
Priority: normal Component: Engine: Sword2
Keywords: Cc:
Game: Broken Sword 2


This patch adds preliminary support for sprite drawing
in Broken Sword 2. The major thing that's missing is
scaling, but it's still enough to look interesting in
the demo. (I have yet to get the full version to run.)

I don't think DrawSprite() is quite the monster
everyone has made it out to be. What makes the function
so big is probably that the original has a graphics
quality setting which. I think these are usually
handled automagically by DirectX, but at least in
DrawSprite() there are software fallbacks. (We should
be able to get our scaling code from one of them.)

You'll notice that even the RDBLTFX_ALLHARDWARE case
has two versions of the RDSPR_BLEND code. One to do
proper blending, and one that just dithers. For now,
I've simply ignored the latter.

Ticket imported from: #791032. Ticket imported from: patches/377.

Attachments (1)

bs2-sprites-wip.diff (7.1 KB ) - added by eriktorbjorn 16 years ago.
Patch against an August 18 CVS snapshot

Download all attachments as: .zip

Change History (5)

by eriktorbjorn, 16 years ago

Attachment: bs2-sprites-wip.diff added

Patch against an August 18 CVS snapshot

comment:1 by eriktorbjorn, 16 years ago

Owner: set to SF/khalek

comment:2 by SF/ender, 16 years ago

Any reason against applying this to CVS? Looks good for

As for the full version, why not just remove the 'cache'
code? It's only there because older CD drives were slow,
but that's hardly a problem these days.

comment:3 by SF/khalek, 16 years ago

Status: newclosed

comment:4 by digitall, 12 months ago

Component: Engine: Sword2
Game: Broken Sword 2
Note: See TracTickets for help on using tickets.