The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
display::drawing_buffer_key Class Reference

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, drawing_layer layer)
bool operator< (const drawing_buffer_key &rhs) const

Private Attributes

unsigned int key_

Static Private Attributes

static const std::array< drawing_layer, 4 > layer_groups

Detailed Description

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 ...

Definition at line 923 of file display.hpp.

Constructor & Destructor Documentation

◆ drawing_buffer_key()

display::drawing_buffer_key::drawing_buffer_key ( const map_location loc,
drawing_layer  layer 

Definition at line 1250 of file display.cpp.

Member Function Documentation

◆ operator<()

bool display::drawing_buffer_key::operator< ( const drawing_buffer_key rhs) const

Definition at line 933 of file display.hpp.

References key_.

Member Data Documentation

◆ key_

unsigned int display::drawing_buffer_key::key_

Definition at line 926 of file display.hpp.

Referenced by operator<().

◆ layer_groups

const std::array< display::drawing_layer, 4 > display::drawing_buffer_key::layer_groups
Initial value:

Definition at line 928 of file display.hpp.

The documentation for this class was generated from the following files: