summaryrefslogtreecommitdiff
path: root/Block.cpp
diff options
context:
space:
mode:
authorJapa2011-02-18 05:30:00 +0000
committerJapa2011-02-18 05:30:00 +0000
commit4757c2d4e449be85400fbccc53ec1391c84f8673 (patch)
treee617912c61934017edc9c74d0321f6a240511ad9 /Block.cpp
parentf67f437e90145b94ebd016c3b4c41f9ee5e7cdc3 (diff)
downloadstonesense-4757c2d4e449be85400fbccc53ec1391c84f8673.tar.gz
stonesense-4757c2d4e449be85400fbccc53ec1391c84f8673.tar.bz2
stonesense-4757c2d4e449be85400fbccc53ec1391c84f8673.tar.xz
Got preliminary grass working.
Diffstat (limited to 'Block.cpp')
-rw-r--r--Block.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Block.cpp b/Block.cpp
index 76033f9..528850e 100644
--- a/Block.cpp
+++ b/Block.cpp
@@ -233,6 +233,20 @@ void Block::Draw(){
vegetationsprite->draw_world(x, y, z);
}
+ //Grass
+ if(this->grasslevel > 0 && (
+ (tileTypeTable[this->floorType].m == GRASS) ||
+ (tileTypeTable[this->floorType].m == GRASS2) ||
+ (tileTypeTable[this->floorType].m == GRASS_DEAD) ||
+ (tileTypeTable[this->floorType].m == GRASS_DRY)))
+ {
+ c_sprite * vegetationsprite = 0;
+ vegetationsprite = getVegetationSprite(contentLoader.grassConfigs,grassmat,true,true);
+ if(vegetationsprite)
+ vegetationsprite->draw_world(x, y, z);
+ }
+
+
//shadow
if (shadow > 0)
{