Terrain builder. More...
#include "terrain/builder.hpp"
#include "game_preferences.hpp"
#include "image.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "serialization/string_utils.hpp"
#include "gui/dialogs/loadscreen.hpp"
Go to the source code of this file.
Macros | |
#define | ERR_NG LOG_STREAM(err, log_engine) |
#define | WRN_NG LOG_STREAM(warn, log_engine) |
Functions | |
static map_location | legacy_negation (const map_location &me) |
These legacy map_location functions moved here from map_location. More... | |
static map_location & | legacy_sum_assign (map_location &me, const map_location &a) |
static map_location | legacy_sum (const map_location &me, const map_location &a) |
static map_location | legacy_difference (const map_location &me, const map_location &a) |
static unsigned int | get_noise (const map_location &loc, unsigned int index) |
static bool | image_exists (const std::string &name) |
static std::vector< std::string > | get_variations (const std::string &base, const std::string &variations) |
static unsigned int | hash_str (const std::string &str) |
Variables | |
static lg::log_domain | log_engine ("engine") |
Terrain builder.
Definition in file builder.cpp.
#define ERR_NG LOG_STREAM(err, log_engine) |
Definition at line 30 of file builder.cpp.
Referenced by terrain_builder::parse_mapstring(), and terrain_builder::rotate_rule().
#define WRN_NG LOG_STREAM(warn, log_engine) |
Definition at line 31 of file builder.cpp.
Referenced by terrain_builder::parse_config().
|
static |
Definition at line 191 of file builder.cpp.
References c, map_location::x, and map_location::y.
Referenced by terrain_builder::apply_rule(), and terrain_builder::rule_matches().
|
static |
Definition at line 405 of file builder.cpp.
References pos, and utils::split().
Referenced by terrain_builder::load_images().
|
static |
Definition at line 1101 of file builder.cpp.
Referenced by terrain_builder::building_rule::get_hash(), and config::hash().
|
static |
Definition at line 392 of file builder.cpp.
References image::exists(), and image::precached_file_exists().
Referenced by terrain_builder::load_images().
|
static |
Definition at line 76 of file builder.cpp.
References legacy_negation(), and legacy_sum().
Referenced by terrain_builder::build_terrains().
|
static |
These legacy map_location functions moved here from map_location.
?pp. We have refactored them out of everything but this class. Hopefully the end is near...
Adds an absolute location to a "delta" location This is not the mathematically correct behavior, it is neither commutative nor associative. Negative coordinates may give strange results. It is retained because terrain builder code relies in this broken behavior. Best avoid. map_location legacy_negation() const; map_location legacy_sum(const map_location &a) const; map_location& legacy_sum_assign(const map_location &a); map_location legacy_difference(const map_location &a) const;
Definition at line 51 of file builder.cpp.
References map_location::x, and map_location::y.
Referenced by legacy_difference().
|
static |
Definition at line 69 of file builder.cpp.
References legacy_sum_assign().
Referenced by terrain_builder::apply_rule(), legacy_difference(), and terrain_builder::rule_matches().
|
static |
Definition at line 56 of file builder.cpp.
References map_location::x, and map_location::y.
Referenced by legacy_sum(), and terrain_builder::rotate_rule().
|
static |