diff options
| author | Japa | 2011-08-22 14:14:04 +0000 |
|---|---|---|
| committer | Japa | 2011-08-22 14:14:04 +0000 |
| commit | e30a6661982aad7614e12e3bb66248992864d6b7 (patch) | |
| tree | c39f8f7c59c9b5ca544d110e2ca6a5d2cdcdd562 /Block.cpp | |
| parent | 3082298368e67933947d00d005821019ded2da81 (diff) | |
| download | stonesense-e30a6661982aad7614e12e3bb66248992864d6b7.tar.gz stonesense-e30a6661982aad7614e12e3bb66248992864d6b7.tar.bz2 stonesense-e30a6661982aad7614e12e3bb66248992864d6b7.tar.xz | |
Got tile occlusion fully working.
Todo: transparent glass.
Diffstat (limited to 'Block.cpp')
| -rw-r--r-- | Block.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -104,12 +104,11 @@ void Block::Draw() material.index = 0;
}
-#ifdef _DEBUG
- if(!(this->designation.bits.hidden) || config.show_hidden_blocks)
+
+ if((!(this->designation.bits.hidden) || config.show_hidden_blocks) && config.block_count)
{
config.tilecount ++;
}
-#endif
bool defaultSnow = 1;
int sheetOffsetX, sheetOffsetY;
@@ -130,9 +129,8 @@ 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())))
- visible = false;
- else visible = true;
+ if(((drawx + TILEWIDTH) < 0) || (drawx > al_get_bitmap_width(al_get_target_bitmap())) || ((drawy + TILEHEIGHT + FLOORHEIGHT) < 0) || (drawy - WALLHEIGHT > al_get_bitmap_height(al_get_target_bitmap())))
+ return;
bool chopThisBlock = 0;
|
