|
|
|
@ -332,25 +332,27 @@ namespace embark_assist {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
// Exported operations
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
void setup(uint16_t max_inorganic) {
|
|
|
|
|
state = new(states);
|
|
|
|
|
state->max_inorganic = max_inorganic;
|
|
|
|
|
void embark_assist::survey::setup(uint16_t max_inorganic) {
|
|
|
|
|
embark_assist::survey::state = new(embark_assist::survey::states);
|
|
|
|
|
embark_assist::survey::state->max_inorganic = max_inorganic;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
df::coord2d get_last_pos() {
|
|
|
|
|
return{state->x, state->y};
|
|
|
|
|
df::coord2d embark_assist::survey::get_last_pos() {
|
|
|
|
|
return{ embark_assist::survey::state->x, embark_assist::survey::state->y };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
void initiate(embark_assist::defs::mid_level_tiles *mlt) {
|
|
|
|
|
void embark_assist::survey::initiate(embark_assist::defs::mid_level_tiles *mlt) {
|
|
|
|
|
for (uint8_t i = 0; i < 16; i++) {
|
|
|
|
|
for (uint8_t k = 0; k < 16; k++) {
|
|
|
|
|
mlt->at(i).at(k).metals.resize(state->max_inorganic);
|
|
|
|
@ -362,7 +364,7 @@ namespace embark_assist {
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
void clear_results(embark_assist::defs::match_results *match_results) {
|
|
|
|
|
void embark_assist::survey::clear_results(embark_assist::defs::match_results *match_results) {
|
|
|
|
|
for (uint16_t i = 0; i < world->worldgen.worldgen_parms.dim_x; i++) {
|
|
|
|
|
for (uint16_t k = 0; k < world->worldgen.worldgen_parms.dim_y; k++) {
|
|
|
|
|
match_results->at(i).at(k).preliminary_match = false;
|
|
|
|
@ -379,11 +381,11 @@ namespace embark_assist {
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
void high_level_world_survey(embark_assist::defs::geo_data *geo_summary,
|
|
|
|
|
void embark_assist::survey::high_level_world_survey(embark_assist::defs::geo_data *geo_summary,
|
|
|
|
|
embark_assist::defs::world_tile_data *survey_results) {
|
|
|
|
|
// color_ostream_proxy out(Core::getInstance().getConsole());
|
|
|
|
|
|
|
|
|
|
geo_survey(geo_summary);
|
|
|
|
|
embark_assist::survey::geo_survey(geo_summary);
|
|
|
|
|
for (uint16_t i = 0; i < world->worldgen.worldgen_parms.dim_x; i++) {
|
|
|
|
|
for (uint16_t k = 0; k < world->worldgen.worldgen_parms.dim_y; k++) {
|
|
|
|
|
df::coord2d adjusted;
|
|
|
|
@ -467,13 +469,13 @@ namespace embark_assist {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
survey_rivers(survey_results);
|
|
|
|
|
survey_evil_weather(survey_results);
|
|
|
|
|
embark_assist::survey::survey_rivers(survey_results);
|
|
|
|
|
embark_assist::survey::survey_evil_weather(survey_results);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
void survey_mid_level_tile(embark_assist::defs::geo_data *geo_summary,
|
|
|
|
|
void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data *geo_summary,
|
|
|
|
|
embark_assist::defs::world_tile_data *survey_results,
|
|
|
|
|
embark_assist::defs::mid_level_tiles *mlt) {
|
|
|
|
|
// color_ostream_proxy out(Core::getInstance().getConsole());
|
|
|
|
@ -822,7 +824,7 @@ namespace embark_assist {
|
|
|
|
|
}
|
|
|
|
|
//=================================================================================
|
|
|
|
|
|
|
|
|
|
df::coord2d apply_offset(uint16_t x, uint16_t y, int8_t offset) {
|
|
|
|
|
df::coord2d embark_assist::survey::apply_offset(uint16_t x, uint16_t y, int8_t offset) {
|
|
|
|
|
df::coord2d result;
|
|
|
|
|
result.x = x;
|
|
|
|
|
result.y = y;
|
|
|
|
@ -1076,5 +1078,4 @@ namespace embark_assist {
|
|
|
|
|
void embark_assist::survey::shutdown() {
|
|
|
|
|
delete state;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|