diff options
| author | Japa | 2011-02-18 05:30:00 +0000 |
|---|---|---|
| committer | Japa | 2011-02-18 05:30:00 +0000 |
| commit | 4757c2d4e449be85400fbccc53ec1391c84f8673 (patch) | |
| tree | e617912c61934017edc9c74d0321f6a240511ad9 /Block.cpp | |
| parent | f67f437e90145b94ebd016c3b4c41f9ee5e7cdc3 (diff) | |
| download | stonesense-4757c2d4e449be85400fbccc53ec1391c84f8673.tar.gz stonesense-4757c2d4e449be85400fbccc53ec1391c84f8673.tar.bz2 stonesense-4757c2d4e449be85400fbccc53ec1391c84f8673.tar.xz | |
Got preliminary grass working.
Diffstat (limited to 'Block.cpp')
| -rw-r--r-- | Block.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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)
{
|
