9 #ifndef TurtleBrains_TileSystem_hpp
10 #define TurtleBrains_TileSystem_hpp
12 #include <turtle_brains/core/tb_string.hpp>
13 #include <turtle_brains/core/tb_dynamic_structure.hpp>
14 #include <turtle_brains/graphics/tb_graphic_list.hpp>
15 #include <turtle_brains/graphics/tb_sprite_map.hpp>
16 #include <turtle_brains/math/tb_vector.hpp>
23 class TileSystemRenderer;
26 namespace TurtleBrains {
namespace Game {
namespace Unstable {
class TileSystemCollider; }; }; };
27 namespace TurtleBrains {
namespace Math {
namespace Unstable {
class BoundingVolume; }; }; };
203 const tbCore::tbString& tileSetName,
const TileLocation& columnCount,
const TileLocation& rowCount);
209 const std::vector<TileSetIndex>& tileSetData,
const TileLocation& columnCount,
const TileLocation& rowCount);
219 void SetTile(
const tbCore::tbString& tileLayerName,
const TileLocation& tileColumn,
const TileLocation& tileRow,
220 const TileIndex& toTileIndex,
const TileSetIndex& toTileSetIndex = kInvalidTileSetIndex);
264 virtual void OnRender(
void)
const override;
273 TileLocation mTileColumns;
274 TileLocation mTileRows;
275 typedef std::vector<TileIndex> TileContainer;
276 TileContainer mTileData;
277 typedef std::vector<TileSetIndex> TileSetContainer;
278 TileSetContainer mTileSetData;
293 typedef std::map<tbCore::uint16, tbCore::DynamicStructure> TilePropertyTable;
294 TilePropertyTable mTileProperties;
298 typedef std::vector<tbCore::tbString> NameContainer;
299 typedef std::map<tbCore::tbString, TileLayer> TileLayerTable;
300 TileLayerTable mTileLayers;
301 NameContainer mOrderedLayerNames;
302 NameContainer mOrderedTileSetNames;
304 typedef std::map<tbCore::tbString, TileSet> TileSetTable;
305 TileSetTable mTileSets;
310 typedef std::map<tbCore::tbString, tbImplementation::TileSystemRenderer*> LayerRendererTable;
311 mutable LayerRendererTable mLayerRenderers;
313 TurtleBrains::Game::Unstable::TileSystemCollider* mCollider;
Definition: tb_vector.hpp:48
TileIndex mTileIndex
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:66
Definition: tb_graphic.hpp:61
Definition: tb_entity.hpp:46
int GetMapPropertyAsInteger(const tbCore::tbString &propertyName) const
bool IsPointInSolid(const tbMath::Vector2 &pointPosition) const
float mCenterY
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:71
void AddTileSet(const tbCore::tbString &tilesetName, const tbGraphics::SpriteMap &spriteMap, const tbCore::DynamicStructure &tileSetProperties=tbCore::DynamicStructure::kNullValue)
AboutTileContainer FindTilesWithProperty(const tbCore::tbString &tileProperty, bool onlyVisibleLayers=false) const
virtual void OnRender(void) const override
float mHeight
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:75
float mCenterX
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:70
uint16_t uint16
Unsigned integer with a size of 16 bits. Supports values from 0 to 65535.
Definition: tb_types.hpp:26
static const DynamicStructure kNullValue
Definition: tb_dynamic_structure.hpp:819
Definition: tb_tile_system.hpp:90
Definition: tb_noncopyable.hpp:22
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
bool MoveEntity(const tbMath::Vector2 ¤tPosition, tbMath::Vector2 &finalPosition, const TurtleBrains::Math::Unstable::BoundingVolume &boundingVolume) const
const TileSetIndex kInvalidTileSetIndex
TODO: TurtleBrains: Documentation: Teach the user how to use this.
int GetTilePropertyAsInteger(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const
void SetLayerVisible(const tbCore::tbString &tileLayerName, const bool isVisible)
tbCore::tbString mLayerName
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:68
void SetPropertiesForMap(const tbCore::DynamicStructure &mapProperties)
bool GetTilePropertyAsBoolean(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const
std::vector< AboutTile > AboutTileContainer
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:79
tbCore::uint16 TileIndex
Definition: tb_tile_system.hpp:33
uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.hpp:23
TileLocation mRow
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:64
void UpdateColliderInformation(void)
Definition: tbu_bounding_volume.hpp:24
tbCore::DynamicStructure mPropertyValue
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:76
void SetTile(const tbCore::tbString &tileLayerName, const TileLocation &tileColumn, const TileLocation &tileRow, const TileIndex &toTileIndex, const TileSetIndex &toTileSetIndex=kInvalidTileSetIndex)
tbCore::tbString GetTilePropertyAsString(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const
Definition: tb_tile_system.hpp:62
Definition: tb_dynamic_structure.hpp:37
float mWidth
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:74
tbCore::uint16 TileLocation
Definition: tb_tile_system.hpp:51
Definition: tb_sprite_map.hpp:23
tbCore::tbString mTileSetName
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:67
void AddTileLayer(const tbCore::tbString &tileLayerName, const std::vector< TileIndex > &tileData, const tbCore::tbString &tileSetName, const TileLocation &columnCount, const TileLocation &rowCount)
AboutTileContainer FindTilesWithPropertyEquals(const tbCore::tbString &tileProperty, bool propertyValue, bool onlyVisibleLayers=false) const
void SetTileProperty(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName, const tbCore::tbString &propertyValue)
const TileLocation kInvalidTileLocation
TODO: TurtleBrains: Documentation: Teach the user how to use this.
float mTop
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:72
void SetPropertiesForTile(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::DynamicStructure &tileProperties)
tbCore::tbString GetMapPropertyAsString(const tbCore::tbString &propertyName) const
float mLeft
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:73
const TileIndex kInvalidTileIndex
bool GetMapPropertyAsBoolean(const tbCore::tbString &propertyName) const
std::string tbString
Definition: tb_string.hpp:335
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...
tbCore::uint8 TileSetIndex
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:55
Definition: tb_application_dialog.hpp:19
virtual ~TileSystem(void)
TileLocation mColumn
TODO: TurtleBrains: Documentation: Teach the user how to use this.
Definition: tb_tile_system.hpp:65