Bitmap#blt: Clamp source rect to source bitmap bounds

RGSS allows the source rectangle in both `blt` and
`stretch_blt` to lie outside the source bitmap bounds
(treating the missing data as (0, 0, 0, 0)) and to be
inverted (in which case the blitted image is also inverted).

This commit only hanldes a corner case that
arises in the game "Last Scenario"; emulating the full
RGSS behavior is however desirable.
This commit is contained in:
Jonas Kulla 2014-07-09 02:56:35 +02:00
parent 527a372bd3
commit 6bbdf7e183
2 changed files with 14 additions and 2 deletions

View file

@ -49,7 +49,7 @@ public:
IntRect rect() const;
void blt(int x, int y,
const Bitmap &source, const IntRect &rect,
const Bitmap &source, IntRect rect,
int opacity = 255);
void stretchBlt(const IntRect &destRect,