summaryrefslogtreecommitdiff
path: root/plugins/mapexport
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-04-10 18:21:19 +0400
committerAlexander Gavrilov2012-04-10 18:21:19 +0400
commitb15d2da819b434f94dc7bd2cd22bbab93c992565 (patch)
tree8eee470ad903ccdbcd3a558b54f64a7b69a07316 /plugins/mapexport
parent249be0c1a0e267e806a8b0b1342f1f58f53e44fd (diff)
downloaddfhack-b15d2da819b434f94dc7bd2cd22bbab93c992565.tar.gz
dfhack-b15d2da819b434f94dc7bd2cd22bbab93c992565.tar.bz2
dfhack-b15d2da819b434f94dc7bd2cd22bbab93c992565.tar.xz
Get rid of some obsolete api functions, and restructure MapCache.
Diffstat (limited to 'plugins/mapexport')
-rw-r--r--plugins/mapexport/mapexport.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/mapexport/mapexport.cpp b/plugins/mapexport/mapexport.cpp
index d7d9daea..805261c2 100644
--- a/plugins/mapexport/mapexport.cpp
+++ b/plugins/mapexport/mapexport.cpp
@@ -151,7 +151,7 @@ command_result mapexport (color_ostream &out, std::vector <std::string> & parame
// Get the map block
df::coord2d blockCoord(b_x, b_y);
MapExtras::Block *b = map.BlockAt(DFHack::DFCoord(b_x, b_y, z));
- if (!b || !b->valid)
+ if (!b || !b->is_valid())
{
continue;
}
@@ -161,15 +161,9 @@ command_result mapexport (color_ostream &out, std::vector <std::string> & parame
protoblock.set_y(b_y);
protoblock.set_z(z);
- { // Find features
- uint32_t index = b->raw.global_feature;
- if (index != -1)
- Maps::GetGlobalFeature(blockFeatureGlobal, index);
-
- index = b->raw.local_feature;
- if (index != -1)
- Maps::GetLocalFeature(blockFeatureLocal, blockCoord, index);
- }
+ // Find features
+ b->GetGlobalFeature(&blockFeatureGlobal);
+ b->GetLocalFeature(&blockFeatureLocal);
int global_z = df::global::world->map.region_z + z;