diff options
| author | Japa | 2011-08-14 19:12:35 +0000 |
|---|---|---|
| committer | Japa | 2011-08-14 19:12:35 +0000 |
| commit | cddfb7611c8d7f649785271064090092e186ab9d (patch) | |
| tree | 2ca4f325639f48f5ec4767943ba412ec0dece5b6 /Block.cpp | |
| parent | e7f42e6900b7a71e670e7216692259405d41c09d (diff) | |
| download | stonesense-cddfb7611c8d7f649785271064090092e186ab9d.tar.gz stonesense-cddfb7611c8d7f649785271064090092e186ab9d.tar.bz2 stonesense-cddfb7611c8d7f649785271064090092e186ab9d.tar.xz | |
Diffstat (limited to 'Block.cpp')
| -rw-r--r-- | Block.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -128,6 +128,9 @@ void Block::Draw(){ pointToScreen((int*)&drawx, (int*)&drawy, drawz);
drawx -= TILEWIDTH>>1;
+ if(((drawx + TILEWIDTH) < 0) || (drawx > al_get_bitmap_width(al_get_target_bitmap())) || ((drawy + TILEHEIGHT + WALLHEIGHT + FLOORHEIGHT) < 0) || (drawy > al_get_bitmap_height(al_get_target_bitmap())))
+ return;
+
bool chopThisBlock = 0;
if(config.truncate_walls == 1) chopThisBlock = 1;
|
