summaryrefslogtreecommitdiff
path: root/MapLoading.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-05-18 21:47:01 +0000
committerPetr Mrázek2011-05-18 21:47:01 +0000
commit053e3dafbb59c27d8464aded9d1942ac7d7c35b8 (patch)
treec79444207b3b03a1fe307c57ee8ddb7d6a5d5f38 /MapLoading.cpp
parent244db2cf0b316c58f52fe530a397455b9088c833 (diff)
downloadstonesense-053e3dafbb59c27d8464aded9d1942ac7d7c35b8.tar.gz
stonesense-053e3dafbb59c27d8464aded9d1942ac7d7c35b8.tar.bz2
stonesense-053e3dafbb59c27d8464aded9d1942ac7d7c35b8.tar.xz
Fix for current dfhack (0.5.14). linux side only.
Diffstat (limited to 'MapLoading.cpp')
-rw-r--r--MapLoading.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/MapLoading.cpp b/MapLoading.cpp
index 880505c..72abf1f 100644
--- a/MapLoading.cpp
+++ b/MapLoading.cpp
@@ -245,7 +245,7 @@ void ReadCellToSegment(DFHack::Context& DF, WorldSegment& segment, int CellX, in
uint8_t regionoffsets[16];
t_temperatures temp1, temp2;
DFHack::mapblock40d mapBlock;
- std::vector<t_tree> plants;
+ std::vector<DFHack::dfh_plant> plants;
Maps->ReadTileTypes(CellX, CellY, CellZ, (tiletypes40d *) tiletypes);
Maps->ReadDesignations(CellX, CellY, CellZ, (designations40d *) designations);
Maps->ReadOccupancy(CellX, CellY, CellZ, (occupancies40d *) occupancies);
@@ -519,7 +519,7 @@ void ReadCellToSegment(DFHack::Context& DF, WorldSegment& segment, int CellX, in
}
}
- if(tileTypeTable[b->tileType].m == OBSIDIAN)
+ if(tileTypeTable[b->tileType].material == OBSIDIAN)
{
b->material.type = INORGANIC;
b->material.index = contentLoader.obsidian;
@@ -541,18 +541,18 @@ void ReadCellToSegment(DFHack::Context& DF, WorldSegment& segment, int CellX, in
//add trees and other vegetation
for(int i = 0; i < plants.size(); i++)
{
- Block* b = segment.getBlock( plants[i].x, plants[i].y, CellZ);
+ Block* b = segment.getBlock( plants[i].sdata.x, plants[i].sdata.y, CellZ);
if(b && (
- (tileTypeTable[b->tileType].c == TREE_DEAD) ||
- (tileTypeTable[b->tileType].c == TREE_OK) ||
- (tileTypeTable[b->tileType].c == SAPLING_DEAD) ||
- (tileTypeTable[b->tileType].c == SAPLING_OK) ||
- (tileTypeTable[b->tileType].c == SHRUB_DEAD) ||
- (tileTypeTable[b->tileType].c == SHRUB_OK)
+ (tileTypeTable[b->tileType].shape == TREE_DEAD) ||
+ (tileTypeTable[b->tileType].shape == TREE_OK) ||
+ (tileTypeTable[b->tileType].shape == SAPLING_DEAD) ||
+ (tileTypeTable[b->tileType].shape == SAPLING_OK) ||
+ (tileTypeTable[b->tileType].shape == SHRUB_DEAD) ||
+ (tileTypeTable[b->tileType].shape == SHRUB_OK)
))
{
- b->tree.type = plants[i].type;
- b->tree.index = plants[i].material;
+ b->tree.type = plants[i].sdata.type;
+ b->tree.index = plants[i].sdata.material;
}
}
}
@@ -955,10 +955,10 @@ void beautify_Segment(WorldSegment * segment)
//Grass
if(b->grasslevel > 0 && (
- (tileTypeTable[b->floorType].m == GRASS) ||
- (tileTypeTable[b->floorType].m == GRASS2) ||
- (tileTypeTable[b->floorType].m == GRASS_DEAD) ||
- (tileTypeTable[b->floorType].m == GRASS_DRY)))
+ (tileTypeTable[b->floorType].material == GRASS) ||
+ (tileTypeTable[b->floorType].material == GRASS2) ||
+ (tileTypeTable[b->floorType].material == GRASS_DEAD) ||
+ (tileTypeTable[b->floorType].material == GRASS_DRY)))
{
c_block_tree * vegetationsprite = 0;
vegetationsprite = getVegetationTree(contentLoader.grassConfigs,b->grassmat,true,true);
@@ -973,7 +973,7 @@ void beautify_Segment(WorldSegment * segment)
//populate trees
if(b->tree.index)
{
- c_block_tree * Tree = GetTreeVegetation( (TileClass) getVegetationType( b->floorType ), b->tree.index );
+ c_block_tree * Tree = GetTreeVegetation( (TileShape) tileShape( b->floorType ), b->tree.index );
Tree->insert_sprites(segment, b->x, b->y, b->z, b);
}