Quietust 2012-01-21 09:59:54 -06:00
commit d504479fc2
5 changed files with 38 additions and 4 deletions

@ -235,7 +235,7 @@ namespace df
#define ENUM_NEXT_ITEM(enum,val) \
(DFHack::next_enum_item_<df::enum,ENUM_FIRST_ITEM(enum),df::enums::enum::is_valid>(val))
#define FOR_ENUM_ITEMS(enum,iter) \
for(df::enum iter = ENUM_FIRST_ITEM(enum); iter < ENUM_LAST_ITEM(enum); iter = df::enum(1+int(iter)))
for(df::enum iter = ENUM_FIRST_ITEM(enum); iter <= ENUM_LAST_ITEM(enum); iter = df::enum(1+int(iter)))
namespace df {
#define DF_KNOWN_GLOBALS \

@ -0,0 +1,20 @@
unsigned size() const { return x.size(); }
coord2d operator[] (unsigned idx) const {
if (idx >= x.size())
return coord2d();
else
return coord2d(x[idx], y[idx]);
}
void erase(unsigned idx) {
if (idx < x.size()) {
x.erase(x.begin()+idx);
y.erase(y.begin()+idx);
}
}
void push_back(const coord2d &crd) {
x.push_back(crd.x);
y.push_back(crd.y);
}

@ -1,8 +1,22 @@
unsigned size() const { return x.size(); }
coord operator[] (unsigned idx) const {
if (idx >= x.size() || idx >= y.size() || idx >= z.size())
if (idx >= x.size())
return coord();
else
return coord(x[idx], y[idx], z[idx]);
}
void erase(unsigned idx) {
if (idx < x.size()) {
x.erase(x.begin()+idx);
y.erase(y.begin()+idx);
z.erase(z.begin()+idx);
}
}
void push_back(const coord &crd) {
x.push_back(crd.x);
y.push_back(crd.y);
z.push_back(crd.z);
}

@ -567,7 +567,7 @@ bool Maps::ReadGeology (vector < vector <uint16_t> >& assign)
if (bioRY >= world->world_data->world_height) bioRY = world->world_data->world_height - 1;
// get index into geoblock vector
uint16_t geoindex = world->world_data->unk_1c0[bioRX][bioRY].geo_index;
uint16_t geoindex = world->world_data->region_map[bioRX][bioRY].geo_index;
/// geology blocks have a vector of layer descriptors
// get the vector with pointer to layers

@ -1 +1 @@
Subproject commit 8f9f7cf3bc4cff3dc721dc9e0ba51bc54b069587
Subproject commit 0b23a6e28b72f8383647b317635d9b75a69529e0