summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek2012-04-18 05:08:34 +0200
committerPetr Mrázek2012-04-18 05:08:34 +0200
commit15e3b726c3e68d2985aecd95d2a33bf4550caaa1 (patch)
tree9eab2d6dd34ae1a7633df061e151ed1d702ea4b3
parentcddc64777b8368e15c1a820ccd1cf56e11267e52 (diff)
downloadstonesense-15e3b726c3e68d2985aecd95d2a33bf4550caaa1.tar.gz
stonesense-15e3b726c3e68d2985aecd95d2a33bf4550caaa1.tar.bz2
stonesense-15e3b726c3e68d2985aecd95d2a33bf4550caaa1.tar.xz
Fix enum comparison mismatch in occlusion tests
-rw-r--r--Occlusion_Test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Occlusion_Test.cpp b/Occlusion_Test.cpp
index 7c8061e..08e26ee 100644
--- a/Occlusion_Test.cpp
+++ b/Occlusion_Test.cpp
@@ -21,7 +21,7 @@ bitset<2*S_SPRITE_HEIGHT> floor_mask_right;
bool is_block_solid(Block * b)
{
- if(b->tileMaterial == tiletype_shape::RAMP_TOP)
+ if(b->tileShape == tiletype_shape::RAMP_TOP)
return false;
if(!config.shade_hidden_blocks && !config.show_hidden_blocks && b->designation.bits.hidden)
return false;
@@ -32,7 +32,7 @@ bool is_block_solid(Block * b)
b->material.type == 5 ||
b->material.type == 6)
return false;
- if(b->tileMaterial == tiletype_shape::BROOK_TOP)
+ if(b->tileShape == tiletype_shape::BROOK_TOP)
return false;
return true;
}
@@ -81,7 +81,7 @@ void mask_left(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED)
+ if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileShape != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -92,7 +92,7 @@ void mask_left(Block * b, int offset)
base_mask_left &= ~(wall_mask_right >> -offset*2);
}
}
- else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileMaterial != tiletype_shape::BROOK_BED)
+ else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileShape != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -111,7 +111,7 @@ void mask_right(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED)
+ if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileShape != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -122,7 +122,7 @@ void mask_right(Block * b, int offset)
base_mask_right &= ~(wall_mask_left >> -offset*2);
}
}
- else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileMaterial != tiletype_shape::BROOK_BED)
+ else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileShape != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{