summaryrefslogtreecommitdiff
path: root/MapLoading.cpp
diff options
context:
space:
mode:
authorJapa2011-08-21 15:08:04 +0000
committerJapa2011-08-21 15:08:04 +0000
commit5b813e32b57ea085c0eb04b1b5f528b3698a167d (patch)
treef379955486124c7f2674c8e4db220ab2baa6dc76 /MapLoading.cpp
parent6f96b930653206ca09fa79985126921cfe8fb03f (diff)
downloadstonesense-5b813e32b57ea085c0eb04b1b5f528b3698a167d.tar.gz
stonesense-5b813e32b57ea085c0eb04b1b5f528b3698a167d.tar.bz2
stonesense-5b813e32b57ea085c0eb04b1b5f528b3698a167d.tar.xz
Diffstat (limited to 'MapLoading.cpp')
-rw-r--r--MapLoading.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/MapLoading.cpp b/MapLoading.cpp
index 9c84f8e..798fd48 100644
--- a/MapLoading.cpp
+++ b/MapLoading.cpp
@@ -7,6 +7,7 @@
#include "GameBuildings.h"
#include "Creatures.h"
#include "ContentLoader.h"
+#include "Occlusion_Test.h"
static DFHack::Core* pDFApiHandle = 0;
static DFHack::Process * DFProc = 0;
@@ -398,7 +399,7 @@ void ReadCellToSegment(DFHack::Core& DF, WorldSegment& segment, int CellX, int C
//option for including hidden blocks
isHidden &= !config.show_hidden_blocks;
bool shouldBeIncluded = (!isOpenTerrain(t) || b->water.index || !designations[lx][ly].bits.skyview) && !isHidden;
- /*
+
//include hidden blocks as shaded black
if(config.shade_hidden_blocks && isHidden && (isBlockOnVisibleEdgeOfSegment(&segment, b) || areNeighborsVisible(designations, lx, ly)))
{
@@ -417,7 +418,7 @@ void ReadCellToSegment(DFHack::Core& DF, WorldSegment& segment, int CellX, int C
b->building.sprites.push_back( sprite );
shouldBeIncluded= true;
}
-*/
+
if( shouldBeIncluded )
{
//this only needs to be done for included blocks
@@ -934,9 +935,15 @@ void beautify_Segment(WorldSegment * segment)
TMR1_START;
//do misc beautification
uint32_t numblocks = segment->getNumBlocks();
+
for(uint32_t i=0; i < numblocks; i++){
Block* b = segment->getBlock(i);
+ occlude_block(b);
+
+ if(!b->visible)
+ continue;
+
//Grass
if(b->grasslevel > 0 && (
(tileTypeTable[b->floorType].material == GRASS) ||