summaryrefslogtreecommitdiff
path: root/Occlusion_Test.cpp
diff options
context:
space:
mode:
authorJapa Illo2012-02-19 18:02:52 +0530
committerJapa Illo2012-02-19 18:02:52 +0530
commit8f1887c90e249b83e70d950891df037e95fb6a02 (patch)
tree0270271bff03eb31596e8ae8545e497c60a360f8 /Occlusion_Test.cpp
parent7c346109c5b370a226a46585cfa2e461b0d100d0 (diff)
downloadstonesense-8f1887c90e249b83e70d950891df037e95fb6a02.tar.gz
stonesense-8f1887c90e249b83e70d950891df037e95fb6a02.tar.bz2
stonesense-8f1887c90e249b83e70d950891df037e95fb6a02.tar.xz
got rid of floorType, wallType, etc, for good.
Signed-off-by: Japa Illo <japa.mala.illo@gmail.com>
Diffstat (limited to 'Occlusion_Test.cpp')
-rw-r--r--Occlusion_Test.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/Occlusion_Test.cpp b/Occlusion_Test.cpp
index b95a011..59494f9 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(DFHack::tileTypeTable[b->tileType].shape == RAMP_TOP)
+ if(b->tileMaterial == 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(tileTypeTable[b->tileType].shape == BROOK_TOP)
+ if(b->tileMaterial == tiletype_shape::BROOK_TOP)
return false;
return true;
}
@@ -43,7 +43,7 @@ void mask_center(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->wallType && tileTypeTable[b->tileType].shape != BROOK_BED)
+ if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -56,7 +56,11 @@ void mask_center(Block * b, int offset)
base_mask_right &= ~(wall_mask_right >> -offset*2);
}
}
- else if(b->floorType || b->ramp.type || tileTypeTable[b->tileType].shape != BROOK_BED)
+ else if(
+ b->tileShapeBasic==tiletype_shape_basic::Floor ||
+ b->tileShapeBasic==tiletype_shape_basic::Ramp ||
+ b->tileMaterial != tiletype_shape::BROOK_BED
+ )
{
if(offset >= 0)
{
@@ -77,7 +81,7 @@ void mask_left(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->wallType && tileTypeTable[b->tileType].shape != BROOK_BED)
+ if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -88,7 +92,7 @@ void mask_left(Block * b, int offset)
base_mask_left &= ~(wall_mask_right >> -offset*2);
}
}
- else if(b->floorType || b->ramp.type || tileTypeTable[b->tileType].shape != BROOK_BED)
+ else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileMaterial != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -107,7 +111,7 @@ void mask_right(Block * b, int offset)
return;
if(!is_block_solid(b))
return;
- if(b->wallType && tileTypeTable[b->tileType].shape != BROOK_BED)
+ if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{
@@ -118,7 +122,7 @@ void mask_right(Block * b, int offset)
base_mask_right &= ~(wall_mask_left >> -offset*2);
}
}
- else if(b->floorType || b->ramp.type || tileTypeTable[b->tileType].shape != BROOK_BED)
+ else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileMaterial != tiletype_shape::BROOK_BED)
{
if(offset >= 0)
{