Opened 8 years ago

Closed 8 years ago

#9709 closed defect (fixed)

Graphics::ManagedSurface::transBlit() assumes source rectangle starts at (0, 0) when blitting. Should it?

Reported by: eriktorbjorn Owned by: dreammaster
Priority: normal Component: --Other--
Version: Keywords:
Cc: Game:

Description

I'm using Starship Titanic as an example: If you pick up and drag the CD at the start of the game, and try to drag it to the left or top edge of the screen, the object is cut off and the right and bottom respectively, rather than clipped to the screen.

This appears to be because transBlit() in ManagedSurface assumes that the source rectangle always starts at (0, 0) so all it has to do is check its width and height. Is this the desired behavior?

I'm attaching a proof-of-concept patch that Works For Me(tm) in this particular case.

Attachments (1)

managed-surface.diff (755 bytes ) - added by eriktorbjorn 8 years ago.

Download all attachments as: .zip

Change History (3)

by eriktorbjorn, 8 years ago

Attachment: managed-surface.diff added

comment:1 by eriktorbjorn, 8 years ago

Owner: set to dreammaster

comment:2 by dreammaster, 8 years ago

Resolution: fixed
Status: newclosed

You're correct, it was incorrectly hardcoded for 0,0. I've committed in your diff. Thanks for discovering that.

Note: See TracTickets for help on using tickets.