Peoplemon  0.1.0
Peoplemon 3 game source documentation
Classes | Public Member Functions | Public Attributes | List of all members
core::map::RenderLevel Struct Reference

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

Detailed Description

Basic struct containing the graphics elements to render a map level.

Definition at line 16 of file RenderLevel.hpp.

Member Function Documentation

◆ create()

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.

Parameters
engineGame engine instance
tilesetStitched texture atlas for all tiles
layerCountThe total number of layers in the level
mapSizeThe size of the map in tiles
sceneThe scene to add primitives to

Definition at line 9 of file RenderLevel.cpp.

◆ insertLayer()

void core::map::RenderLevel::insertLayer ( unsigned int  position)

Inserts a layer at the given position.

Parameters
positionThe index to insert at

Definition at line 40 of file RenderLevel.cpp.

◆ removeLayer()

void core::map::RenderLevel::removeLayer ( unsigned int  position)

Removes the layer at the given position.

Parameters
positionThe index of the layer to remove

Definition at line 51 of file RenderLevel.cpp.

◆ swapLayers()

void core::map::RenderLevel::swapLayers ( unsigned int  l1,
unsigned int  l2 
)

Swaps two render layers.

Parameters
l1Index of the first layer to swap
l2Index of the second layer to swap

Definition at line 30 of file RenderLevel.cpp.

Member Data Documentation

◆ zones

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.


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