diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-19 15:12:06 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-19 15:12:06 +0000 |
commit | 4050f8c0bced625a95d542d30647c3f8bbf2267b (patch) | |
tree | 420d65a5ed6a2155762b4e13a4c90ab2df9f888e /src/graphics.cpp | |
parent | da3a1fd114dd7b8e5e8c880bd987506acc16ac42 (diff) | |
download | mana-4050f8c0bced625a95d542d30647c3f8bbf2267b.tar.gz mana-4050f8c0bced625a95d542d30647c3f8bbf2267b.tar.bz2 mana-4050f8c0bced625a95d542d30647c3f8bbf2267b.tar.xz mana-4050f8c0bced625a95d542d30647c3f8bbf2267b.zip |
Merged new_animation branch until r2415 into trunk.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index d709bfe1..2757214a 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -126,14 +126,16 @@ bool Graphics::drawImage(Image *image, int x, int y) bool Graphics::drawImage(Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height) { + // Check that preconditions for blitting are met. + if (!mScreen || !image || !image->mImage) return false; + dstX += mClipStack.top().xOffset; dstY += mClipStack.top().yOffset; srcX += image->mBounds.x; srcY += image->mBounds.y; - // Check that preconditions for blitting are met. - if (!mScreen || !image->mImage) return false; + SDL_Rect dstRect; SDL_Rect srcRect; |