diff options
| author | Quietust | 2012-01-19 21:44:17 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-19 21:44:17 -0600 |
| commit | e7ecda143413105d9e780bd9888ee17b095d9fe8 (patch) | |
| tree | 0ba9272f91f9fac61589e2ce470e02fc968a4be2 /plugins/tiletypes.cpp | |
| parent | e7dcd4c66ab78ca0dfbd3236fd6a5e808a557124 (diff) | |
| download | dfhack-e7ecda143413105d9e780bd9888ee17b095d9fe8.tar.gz dfhack-e7ecda143413105d9e780bd9888ee17b095d9fe8.tar.bz2 dfhack-e7ecda143413105d9e780bd9888ee17b095d9fe8.tar.xz | |
Kill the Maps module
Diffstat (limited to 'plugins/tiletypes.cpp')
| -rw-r--r-- | plugins/tiletypes.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/tiletypes.cpp b/plugins/tiletypes.cpp index e237f0fd..c06a6382 100644 --- a/plugins/tiletypes.cpp +++ b/plugins/tiletypes.cpp @@ -641,7 +641,6 @@ DFhackCExport command_result df_tiletypes (Core * c, vector <string> & parameter uint32_t x_max = 0, y_max = 0, z_max = 0; int32_t x = 0, y = 0, z = 0; - DFHack::Maps *maps; DFHack::Gui *gui; for(int i = 0; i < parameters.size();i++) { @@ -755,15 +754,14 @@ DFhackCExport command_result df_tiletypes (Core * c, vector <string> & parameter } c->Suspend(); - maps = c->getMaps(); gui = c->getGui(); - if (!maps->Start()) + if (!Maps::IsValid()) { - c->con.printerr("Cannot get map info!\n"); + c->con.printerr("Map is not available!\n"); c->Resume(); return CR_FAILURE; } - maps->getSize(x_max, y_max, z_max); + Maps::getSize(x_max, y_max, z_max); if (!(gui->Start() && gui->getCursorCoords(x,y,z))) { @@ -774,7 +772,7 @@ DFhackCExport command_result df_tiletypes (Core * c, vector <string> & parameter c->con.print("Cursor coords: (%d, %d, %d)\n",x,y,z); DFHack::DFCoord cursor(x,y,z); - MapExtras::MapCache map(maps); + MapExtras::MapCache map; coord_vec all_tiles = brush->points(map, cursor); c->con.print("working...\n"); @@ -892,7 +890,6 @@ DFhackCExport command_result df_tiletypes (Core * c, vector <string> & parameter { c->con.printerr("Something failed horribly! RUN!\n"); } - maps->Finish(); c->Resume(); } } |
