Each terrain_graphics rule is associated a set of images, which are applied on the terrain if the rule matches. More...
#include <builder.hpp>
Public Member Functions | |
rule_image (int layer, int x, int y, bool global_image=false, int center_x=-1, int center_y=-1, bool is_water=false) | |
This file holds the terrain_builder implementation. More... | |
bool | is_background () const |
Public Attributes | |
int | layer |
The layer of the image for horizontal layering. More... | |
int | basex |
The position of the image base (that is, the point where the image reaches the floor) for vertical layering. More... | |
int | basey |
std::vector< rule_image_variant > | variants |
A list of variants for this image. More... | |
bool | global_image |
Set to true if the image was defined as a child of the [terrain_graphics] tag, set to false if it was defined as a child of a [tile] tag. More... | |
int | center_x |
The position where the center of the image base should be. More... | |
int | center_y |
bool | is_water |
Each terrain_graphics rule is associated a set of images, which are applied on the terrain if the rule matches.
An image is more than graphics: it is graphics (with several possible tod-alternatives,) and a position for these graphics. The rule_image structure represents one such image.
Definition at line 233 of file builder.hpp.
terrain_builder::rule_image::rule_image | ( | int | layer, |
int | x, | ||
int | y, | ||
bool | global_image = false , |
||
int | center_x = -1 , |
||
int | center_y = -1 , |
||
bool | is_water = false |
||
) |
This file holds the terrain_builder implementation.
Definition at line 89 of file builder.cpp.
|
inline |
Definition at line 243 of file builder.hpp.
References basey, layer, and terrain_builder::UNITPOS.
Referenced by gui2::dialogs::terrain_layers::pre_show().
int terrain_builder::rule_image::basex |
The position of the image base (that is, the point where the image reaches the floor) for vertical layering.
Definition at line 253 of file builder.hpp.
Referenced by gui2::dialogs::terrain_layers::pre_show().
int terrain_builder::rule_image::basey |
Definition at line 253 of file builder.hpp.
Referenced by is_background(), terrain_builder::tile::rule_image_rand::operator<(), and gui2::dialogs::terrain_layers::pre_show().
int terrain_builder::rule_image::center_x |
The position where the center of the image base should be.
Definition at line 265 of file builder.hpp.
Referenced by terrain_builder::load_images(), and gui2::dialogs::terrain_layers::pre_show().
int terrain_builder::rule_image::center_y |
Definition at line 265 of file builder.hpp.
Referenced by terrain_builder::load_images(), and gui2::dialogs::terrain_layers::pre_show().
bool terrain_builder::rule_image::global_image |
Set to true if the image was defined as a child of the [terrain_graphics] tag, set to false if it was defined as a child of a [tile] tag.
Definition at line 261 of file builder.hpp.
Referenced by terrain_builder::load_images().
bool terrain_builder::rule_image::is_water |
Definition at line 267 of file builder.hpp.
int terrain_builder::rule_image::layer |
The layer of the image for horizontal layering.
Definition at line 249 of file builder.hpp.
Referenced by is_background(), terrain_builder::tile::rule_image_rand::operator<(), and gui2::dialogs::terrain_layers::pre_show().
std::vector<rule_image_variant> terrain_builder::rule_image::variants |
A list of variants for this image.
Definition at line 256 of file builder.hpp.
Referenced by terrain_builder::building_rule::get_hash(), and terrain_builder::load_images().