In order to render a hex properly it needs to be rendered per row. More...
#include <display.hpp>
Public Member Functions | |
| drawing_buffer_key (const map_location &loc, tdrawing_layer layer) | |
| bool | operator< (const drawing_buffer_key &rhs) const |
Private Attributes | |
| unsigned int | key_ |
Static Private Attributes | |
| static const tdrawing_layer | layer_groups [] |
| static const unsigned int | max_layer_group = sizeof(display::drawing_buffer_key::layer_groups) / sizeof(display::tdrawing_layer) - 2 |
In order to render a hex properly it needs to be rendered per row.
On this row several layers need to be drawn at the same time. Mainly the unit and the background terrain. This is needed since both can spill in the next hex. The foreground terrain needs to be drawn before to avoid decapitation a unit.
In other words: for every layer for every row (starting from the top) for every hex in the row ...
this is modified to: for every layer group for every row (starting from the top) for every layer in the group for every hex in the row ...
* Surfaces are rendered per level in a map. * Per level the items are rendered per location these locations are stored in the drawing order required for units. * every location has a vector with surfaces, each with its own screen coordinate to render at. * every vector element has a vector with surfaces to render.
Definition at line 822 of file display.hpp.
| display::drawing_buffer_key::drawing_buffer_key | ( | const map_location & | loc, | |
| tdrawing_layer | layer | |||
| ) | [inline] |
Definition at line 946 of file display.cpp.
References BITS_FOR_LAYER, BITS_FOR_LAYER_GROUP, BITS_FOR_X_PARITY, BITS_FOR_Y, key_, layer_groups, max_layer_group, map_location::x, and map_location::y.
| bool display::drawing_buffer_key::operator< | ( | const drawing_buffer_key & | rhs | ) | const [inline] |
Definition at line 833 of file display.hpp.
References key_.
unsigned int display::drawing_buffer_key::key_ [private] |
Definition at line 825 of file display.hpp.
Referenced by drawing_buffer_key(), and operator<().
const display::tdrawing_layer display::drawing_buffer_key::layer_groups [static, private] |
{
LAYER_TERRAIN_BG,
LAYER_UNIT_FIRST,
LAYER_UNIT_MOVE_DEFAULT,
LAYER_REACHMAP,
LAYER_LAST_LAYER
}
Definition at line 827 of file display.hpp.
Referenced by drawing_buffer_key().
const unsigned int display::drawing_buffer_key::max_layer_group = sizeof(display::drawing_buffer_key::layer_groups) / sizeof(display::tdrawing_layer) - 2 [static, private] |
Definition at line 828 of file display.hpp.
Referenced by drawing_buffer_key().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:13:45 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |