summaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-03-12 21:21:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-03-12 21:21:01 (GMT)
commitde680a1e5cd65c771a9ed659510fb48b2916a5f0 (patch)
tree660919b656177aa469d4dc17571e9b7dfcc7d4a2 /src/graphics
parent86b7a118004c9f9797d4d898dd587000e5178cea (diff)
parent134d1fab10a713ce0e99bfc3325b099abcbbe591 (diff)
downloadpowder-de680a1e5cd65c771a9ed659510fb48b2916a5f0.zip
powder-de680a1e5cd65c771a9ed659510fb48b2916a5f0.tar.gz
Merge
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/RasterDrawMethods.inl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/graphics/RasterDrawMethods.inl b/src/graphics/RasterDrawMethods.inl
index dec15f1..07b8257 100644
--- a/src/graphics/RasterDrawMethods.inl
+++ b/src/graphics/RasterDrawMethods.inl
@@ -362,6 +362,12 @@ void PIXELMETHODS_CLASS::draw_image(pixel *img, int x, int y, int w, int h, int
int i, j, r, g, b;
if (!img) return;
if(y + h > VIDYRES) h = ((VIDYRES)-y)-1; //Adjust height to prevent drawing off the bottom
+ if (y < 0 && -y < h)
+ {
+ img += -y*w;
+ h += y;
+ y = 0;
+ }
if(!h || y < 0) return;
if(a >= 255)
for (j=0; j<h; j++)