Terrain builder. More...
#include "terrain/builder.hpp"
#include "game_config_view.hpp"
#include "global.hpp"
#include "gui/dialogs/loading_screen.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "picture.hpp"
#include "preferences/preferences.hpp"
#include "serialization/string_utils.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 33 of file builder.cpp.
#define WRN_NG LOG_STREAM(warn, log_engine) |
Definition at line 34 of file builder.cpp.
|
static |
Definition at line 178 of file builder.cpp.
References b, c, utf8::index(), loc, map_location::x, and map_location::y.
Referenced by terrain_builder::apply_rule(), and terrain_builder::rule_matches().
|
static |
Definition at line 397 of file builder.cpp.
References utils::split().
Referenced by terrain_builder::load_images().
|
static |
Definition at line 1102 of file builder.cpp.
References h.
Referenced by terrain_builder::building_rule::get_hash(), and config::hash().
|
static |
Definition at line 384 of file builder.cpp.
References image::exists(), and image::precached_file_exists().
Referenced by terrain_builder::load_images().
|
static |
Definition at line 81 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 56 of file builder.cpp.
References map_location::x, and map_location::y.
Referenced by legacy_difference().
|
static |
Definition at line 74 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 61 of file builder.cpp.
References map_location::x, and map_location::y.
Referenced by legacy_sum(), and terrain_builder::rotate_rule().
|
static |