![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Basic struct containing the graphics elements to render a map level. More...
#include <RenderLevel.hpp>
Classes | |
struct | Zone |
Batched graphics primitives for a set of layers. More... | |
Public Member Functions | |
void | create (bl::engine::Engine &engine, bl::rc::res::TextureRef tileset, unsigned int layerCount, const sf::Vector2u &mapSize, bl::rc::Scene *scene) |
Creates the graphics primitives and adds them to the given scene. More... | |
void | insertLayer (unsigned int position) |
Inserts a layer at the given position. More... | |
void | removeLayer (unsigned int position) |
Removes the layer at the given position. More... | |
void | swapLayers (unsigned int l1, unsigned int l2) |
Swaps two render layers. More... | |
Public Attributes | |
std::vector< Zone * > | zones |
The graphics primitives for all the layers in the level. More... | |
Basic struct containing the graphics elements to render a map level.
Definition at line 16 of file RenderLevel.hpp.
void core::map::RenderLevel::create | ( | bl::engine::Engine & | engine, |
bl::rc::res::TextureRef | tileset, | ||
unsigned int | layerCount, | ||
const sf::Vector2u & | mapSize, | ||
bl::rc::Scene * | scene | ||
) |
Creates the graphics primitives and adds them to the given scene.
engine | Game engine instance |
tileset | Stitched texture atlas for all tiles |
layerCount | The total number of layers in the level |
mapSize | The size of the map in tiles |
scene | The scene to add primitives to |
Definition at line 9 of file RenderLevel.cpp.
void core::map::RenderLevel::insertLayer | ( | unsigned int | position | ) |
Inserts a layer at the given position.
position | The index to insert at |
Definition at line 40 of file RenderLevel.cpp.
void core::map::RenderLevel::removeLayer | ( | unsigned int | position | ) |
Removes the layer at the given position.
position | The index of the layer to remove |
Definition at line 51 of file RenderLevel.cpp.
void core::map::RenderLevel::swapLayers | ( | unsigned int | l1, |
unsigned int | l2 | ||
) |
Swaps two render layers.
l1 | Index of the first layer to swap |
l2 | Index of the second layer to swap |
Definition at line 30 of file RenderLevel.cpp.
std::vector<Zone*> core::map::RenderLevel::zones |
The graphics primitives for all the layers in the level.
Definition at line 26 of file RenderLevel.hpp.