Peoplemon  0.1.0
Peoplemon 3 game source documentation
RenderLevel.hpp
Go to the documentation of this file.
1 #ifndef CORE_MAPS_RENDERLEVEL_HPP
2 #define CORE_MAPS_RENDERLEVEL_HPP
3 
4 #include <BLIB/Graphics.hpp>
5 #include <Core/Maps/LayerSet.hpp>
6 
7 namespace core
8 {
9 namespace map
10 {
16 struct RenderLevel {
20  struct Zone {
21  bl::gfx::BatchedSprites tileSprites;
22  bl::gfx::BatchedSlideshows tileAnims;
23  };
24 
26  std::vector<Zone*> zones;
27 
37  void create(bl::engine::Engine& engine, bl::rc::res::TextureRef tileset,
38  unsigned int layerCount, const sf::Vector2u& mapSize, bl::rc::Scene* scene);
39 
45  void insertLayer(unsigned int position);
46 
52  void removeLayer(unsigned int position);
53 
60  void swapLayers(unsigned int l1, unsigned int l2);
61 
62 private:
63  bl::engine::Engine* enginePtr;
64  bl::rc::res::TextureRef tileset;
65  sf::Vector2u mapSize;
66  bl::rc::Scene* scene;
67  std::list<Zone> storage;
68 };
69 
70 } // namespace map
71 } // namespace core
72 
73 #endif
Core classes and functionality for both the editor and game.
Basic struct containing the graphics elements to render a map level.
Definition: RenderLevel.hpp:16
void swapLayers(unsigned int l1, unsigned int l2)
Swaps two render layers.
Definition: RenderLevel.cpp:30
void removeLayer(unsigned int position)
Removes the layer at the given position.
Definition: RenderLevel.cpp:51
std::vector< Zone * > zones
The graphics primitives for all the layers in the level.
Definition: RenderLevel.hpp:26
void insertLayer(unsigned int position)
Inserts a layer at the given position.
Definition: RenderLevel.cpp:40
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.
Definition: RenderLevel.cpp:9
Batched graphics primitives for a set of layers.
Definition: RenderLevel.hpp:20
bl::gfx::BatchedSprites tileSprites
Definition: RenderLevel.hpp:21
bl::gfx::BatchedSlideshows tileAnims
Definition: RenderLevel.hpp:22