Follow change in xml again.

develop
Alexander Gavrilov 2012-08-27 23:03:02 +04:00
parent 5ad9b82ace
commit f1915915b4
8 changed files with 14 additions and 8 deletions

@ -77,6 +77,7 @@ distribution.
#include "df/job_material_category.h" #include "df/job_material_category.h"
#include "df/burrow.h" #include "df/burrow.h"
#include "df/building_civzonest.h" #include "df/building_civzonest.h"
#include "df/region_map_entry.h"
#include <lua.h> #include <lua.h>
#include <lauxlib.h> #include <lauxlib.h>
@ -931,8 +932,7 @@ static int maps_getRegionBiome(lua_State *L)
static int maps_getTileBiomeRgn(lua_State *L) static int maps_getTileBiomeRgn(lua_State *L)
{ {
auto pos = CheckCoordXYZ(L, 1, true); auto pos = CheckCoordXYZ(L, 1, true);
Lua::PushPosXY(L, Maps::getTileBiomeRgn(pos)); return Lua::PushPosXY(L, Maps::getTileBiomeRgn(pos));
return 1;
} }
static const luaL_Reg dfhack_maps_funcs[] = { static const luaL_Reg dfhack_maps_funcs[] = {

@ -258,7 +258,7 @@ inline df::tile_occupancy *getTileOccupancy(df::coord pos) {
/** /**
* Returns biome info about the specified world region. * Returns biome info about the specified world region.
*/ */
DFHACK_EXPORT df::world_data::T_region_map *getRegionBiome(df::coord2d rgn_pos); DFHACK_EXPORT df::region_map_entry *getRegionBiome(df::coord2d rgn_pos);
/** /**
* Returns biome world region coordinates for the given tile within given block. * Returns biome world region coordinates for the given tile within given block.

@ -57,6 +57,7 @@ using namespace std;
#include "df/builtin_mats.h" #include "df/builtin_mats.h"
#include "df/block_square_event_grassst.h" #include "df/block_square_event_grassst.h"
#include "df/z_level_flags.h" #include "df/z_level_flags.h"
#include "df/region_map_entry.h"
using namespace DFHack; using namespace DFHack;
using namespace df::enums; using namespace df::enums;
@ -166,7 +167,7 @@ df::tile_occupancy *Maps::getTileOccupancy(int32_t x, int32_t y, int32_t z)
return block ? &block->occupancy[x&15][y&15] : NULL; return block ? &block->occupancy[x&15][y&15] : NULL;
} }
df::world_data::T_region_map *Maps::getRegionBiome(df::coord2d rgn_pos) df::region_map_entry *Maps::getRegionBiome(df::coord2d rgn_pos)
{ {
auto data = world->world_data; auto data = world->world_data;
if (!data) if (!data)

@ -1 +1 @@
Subproject commit 3fc2e1569ff19953d11b6ea651bc9b8ca832b8a3 Subproject commit 328a8dbdc7d9e1e838798abf79861cc18a387e3f

@ -19,6 +19,7 @@
#include "df/world_data.h" #include "df/world_data.h"
#include "df/world_geo_biome.h" #include "df/world_geo_biome.h"
#include "df/world_geo_layer.h" #include "df/world_geo_layer.h"
#include "df/region_map_entry.h"
using namespace DFHack; using namespace DFHack;
using namespace df::enums; using namespace df::enums;

@ -27,6 +27,7 @@ using namespace std;
#include "df/world_region_details.h" #include "df/world_region_details.h"
#include "df/world_geo_biome.h" #include "df/world_geo_biome.h"
#include "df/world_geo_layer.h" #include "df/world_geo_layer.h"
#include "df/region_map_entry.h"
#include "df/inclusion_type.h" #include "df/inclusion_type.h"
#include "df/viewscreen_choose_start_sitest.h" #include "df/viewscreen_choose_start_sitest.h"
@ -113,7 +114,7 @@ command_result rprobe (color_ostream &out, vector <string> & parameters)
{ {
coord2d rg = screen->biome_rgn[i]; coord2d rg = screen->biome_rgn[i];
df::world_data::T_region_map* rd = &data->region_map[rg.x][rg.y]; auto rd = &data->region_map[rg.x][rg.y];
if (set && i == to_set) { if (set && i == to_set) {
if (set_field == 0) if (set_field == 0)

@ -27,6 +27,7 @@ using namespace std;
#include "df/world.h" #include "df/world.h"
#include "df/world_raws.h" #include "df/world_raws.h"
#include "df/building_def.h" #include "df/building_def.h"
#include "df/region_map_entry.h"
using std::vector; using std::vector;
using std::string; using std::string;
@ -224,8 +225,7 @@ command_result df_probe (color_ostream &out, vector <string> & parameters)
int bx = clip_range(block.region_pos.x + (offset % 3) - 1, 0, world->world_data->world_width-1); int bx = clip_range(block.region_pos.x + (offset % 3) - 1, 0, world->world_data->world_width-1);
int by = clip_range(block.region_pos.y + (offset / 3) - 1, 0, world->world_data->world_height-1); int by = clip_range(block.region_pos.y + (offset / 3) - 1, 0, world->world_data->world_height-1);
df::world_data::T_region_map* biome = auto biome = &world->world_data->region_map[bx][by];
&world->world_data->region_map[bx][by];
int sav = biome->savagery; int sav = biome->savagery;
int evi = biome->evilness; int evi = biome->evilness;

@ -27,6 +27,7 @@ using namespace std;
#include "df/world_region_details.h" #include "df/world_region_details.h"
#include "df/world_geo_biome.h" #include "df/world_geo_biome.h"
#include "df/world_geo_layer.h" #include "df/world_geo_layer.h"
#include "df/region_map_entry.h"
#include "df/inclusion_type.h" #include "df/inclusion_type.h"
#include "df/viewscreen_choose_start_sitest.h" #include "df/viewscreen_choose_start_sitest.h"
@ -536,6 +537,8 @@ command_result prospector (color_ostream &con, vector <string> & parameters)
case tiletype_material::LAVA_STONE: case tiletype_material::LAVA_STONE:
// TODO ? // TODO ?
break; break;
default:
break;
} }
} }
} }