summaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authorcracker64 <cracker642@gmail.com>2013-03-10 03:48:12 (GMT)
committer cracker64 <cracker642@gmail.com>2013-03-10 03:48:12 (GMT)
commit3abc33fd3b8bfaa720202ad2e4d5c46b9d51e9d7 (patch)
treed7adefd78acebcc127c684a00bcd31e253ef148a /src/graphics
parenta9e66429d60c0867e540d645a8c52db79abb1736 (diff)
parente6f6eedd1364fd3792d6ca7aa3ac2d0c97911f70 (diff)
downloadpowder-3abc33fd3b8bfaa720202ad2e4d5c46b9d51e9d7.zip
powder-3abc33fd3b8bfaa720202ad2e4d5c46b9d51e9d7.tar.gz
Merge branch 'master' of git@github.com:FacialTurd/The-Powder-Toy.git
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++)