Update Maps to match the new geo_biome definitions.

develop
Alexander Gavrilov 2012-01-20 20:27:39 +04:00
parent cc510a2c4b
commit 80292bd49e
2 changed files with 9 additions and 3 deletions

@ -43,6 +43,8 @@ using namespace std;
#include "DataDefs.h"
#include "df/world_data.h"
#include "df/world_underground_region.h"
#include "df/world_geo_biome.h"
#include "df/world_geo_layer.h"
#include "df/feature_init.h"
using namespace DFHack;
@ -565,14 +567,18 @@ bool Maps::ReadGeology (vector < vector <uint16_t> >& assign)
/// geology blocks have a vector of layer descriptors
// get the vector with pointer to layers
vector <df::world_data::T_unk_190::T_unk_4 *> &geolayers = world->world_data->unk_190[geoindex]->unk_4;
df::world_geo_biome *geo_biome = df::world_geo_biome::find(geoindex);
if (!geo_biome)
continue;
vector <df::world_geo_layer*> &geolayers = geo_biome->layers;
/// layer descriptor has a field that determines the type of stone/soil
v_geology[i].reserve(geolayers.size());
// finally, read the layer matgloss
for (uint32_t j = 0; j < geolayers.size(); j++)
v_geology[i].push_back(geolayers[j]->unk_4);
v_geology[i].push_back(geolayers[j]->mat_index);
}
assign.clear();

@ -1 +1 @@
Subproject commit d5abec61f72f113e023219fed19c4022363de953
Subproject commit 8f9f7cf3bc4cff3dc721dc9e0ba51bc54b069587