9 #ifndef _TurtleBrains_TileSystem_h_
10 #define _TurtleBrains_TileSystem_h_
12 #include "../core/tb_string.h"
13 #include "../core/tb_dynamic_structure.h"
14 #include "../graphics/tb_graphic_list.h"
15 #include "../graphics/tb_sprite_map.h"
16 #include "../math/tb_vector.h"
23 class TileSystemRenderer;
26 namespace TurtleBrains {
namespace Game {
namespace Unstable {
class TileSystemCollider; }; }; };
27 namespace TurtleBrains {
namespace Math {
namespace Unstable {
class BoundingVolume; }; }; };
182 const tbCore::tbString& tileSetName,
const TileLocation& columnCount,
const TileLocation& rowCount);
188 const std::vector<TileSetIndex>& tileSetData,
const TileLocation& columnCount,
const TileLocation& rowCount);
233 virtual void OnRender(
void)
const override;
242 TileLocation mTileColumns;
243 TileLocation mTileRows;
244 typedef std::vector<TileIndex> TileContainer;
245 TileContainer mTileData;
246 typedef std::vector<TileSetIndex> TileSetContainer;
247 TileSetContainer mTileSetData;
262 typedef std::map<tbCore::uint16, tbCore::DynamicStructure> TilePropertyTable;
263 TilePropertyTable mTileProperties;
267 typedef std::vector<tbCore::tbString> NameContainer;
268 typedef std::map<tbCore::tbString, TileLayer> TileLayerTable;
269 TileLayerTable mTileLayers;
270 NameContainer mOrderedLayerNames;
271 NameContainer mOrderedTileSetNames;
273 typedef std::map<tbCore::tbString, TileSet> TileSetTable;
274 TileSetTable mTileSets;
279 typedef std::map<tbCore::tbString, tbImplementation::TileSystemRenderer*> LayerRendererTable;
280 mutable LayerRendererTable mLayerRenderers;
282 TurtleBrains::Game::Unstable::TileSystemCollider* mCollider;
Definition: tb_vector.h:48
TileIndex mTileIndex
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:51
Definition: tb_graphic_list.h:25
int GetMapPropertyAsInteger(const tbCore::tbString &propertyName) const
bool IsPointInSolid(const tbMath::Vector2 &pointPosition) const
float mCenterY
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:54
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: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:58
float mCenterX
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:53
uint16_t uint16
Unsigned integer with a size of 16 bits. Supports values from 0 to 65535.
Definition: tb_types.h:25
static const DynamicStructure kNullValue
Definition: tb_dynamic_structure.h:554
Definition: tb_tile_system.h:69
Definition: tb_noncopyable.h:22
Contains all functions, classes and helpers related to game/application development written by Tim "B...
Definition: tb_application_dialog.h:21
bool MoveEntity(const tbMath::Vector2 ¤tPosition, tbMath::Vector2 &finalPosition, const TurtleBrains::Math::Unstable::BoundingVolume &boundingVolume) const
const TileSetIndex kInvalidTileSetIndex
TODO: TIM: 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)
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: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:62
tbCore::uint16 TileIndex
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:34
uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.h:23
TileLocation mRow
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:49
void UpdateColliderInformation(void)
Definition: tbu_bounding_volume.h:24
tbCore::DynamicStructure mPropertyValue
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:59
tbCore::tbString GetTilePropertyAsString(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::tbString &propertyName) const
Definition: tb_tile_system.h:47
Definition: tb_dynamic_structure.h:28
float mWidth
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:57
tbCore::uint16 TileLocation
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:35
Definition: tb_sprite_map.h:23
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: TIM: Documentation: Teach the user how to use this.
float mTop
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:55
void SetPropertiesForTile(const tbCore::tbString &tileSetName, const TileIndex &tileIndex, const tbCore::DynamicStructure &tileProperties)
tbCore::tbString GetMapPropertyAsString(const tbCore::tbString &propertyName) const
float mLeft
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:56
const TileIndex kInvalidTileIndex
TODO: TIM: Documentation: Teach the user how to use this.
bool GetMapPropertyAsBoolean(const tbCore::tbString &propertyName) const
std::string tbString
Definition: tb_string.h:293
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...
tbCore::uint8 TileSetIndex
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:40
Definition: tb_application_dialog.h:19
virtual ~TileSystem(void)
TileLocation mColumn
TODO: TIM: Documentation: Teach the user how to use this.
Definition: tb_tile_system.h:50