summaryrefslogtreecommitdiff
path: root/plugins/changelayer.cpp
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/changelayer.cpp
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/changelayer.cpp')
-rw-r--r--plugins/changelayer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/changelayer.cpp b/plugins/changelayer.cpp
index d56360d8..317a0fa3 100644
--- a/plugins/changelayer.cpp
+++ b/plugins/changelayer.cpp
@@ -189,13 +189,13 @@ command_result changelayer (color_ostream &out, std::vector <std::string> & para
uint32_t tileY = cursorY % 16;
MapExtras::Block * b = mc.BlockAt(cursor/16);
- if(!b && !b->valid)
+ if(!b || !b->is_valid())
{
out.printerr("No data.\n");
return CR_OK;
}
- mapblock40d & block = b->raw;
- df::tile_designation &des = block.designation[tileX][tileY];
+
+ df::tile_designation des = b->DesignationAt(cursor%16);
// get biome and geolayer at cursor position
uint32_t biome = des.bits.biome;