|
Polyphase Game Engine
|
#include <TileMap.h>
Public Member Functions | |
| DECLARE_ASSET (TileMap, Asset) | |
| TileMap () | |
| virtual | ~TileMap () |
| virtual void | LoadStream (Stream &stream, Platform platform) override |
| virtual void | SaveStream (Stream &stream, Platform platform) override |
| virtual void | Create () override |
| virtual void | Destroy () override |
| virtual void | GatherProperties (std::vector< Property > &outProps) override |
| virtual glm::vec4 | GetTypeColor () override |
| virtual const char * | GetTypeName () override |
| TileSet * | GetTileSet () const |
| void | SetTileSet (TileSet *tileSet) |
| glm::ivec2 | GetTileSize () const |
| void | SetTileSize (glm::ivec2 size) |
| glm::vec2 | GetOrigin () const |
| void | SetOrigin (glm::vec2 origin) |
| int32_t | GetNumLayers () const |
| TileMapLayer * | GetLayer (int32_t layerIndex) |
| const TileMapLayer * | GetLayer (int32_t layerIndex) const |
| TileCell | GetCell (int32_t cellX, int32_t cellY, int32_t layerIndex=0) const |
| void | SetCell (int32_t cellX, int32_t cellY, const TileCell &cell, int32_t layerIndex=0) |
| void | ClearCell (int32_t cellX, int32_t cellY, int32_t layerIndex=0) |
| bool | IsCellOccupied (int32_t cellX, int32_t cellY, int32_t layerIndex=0) const |
| int32_t | GetTile (int32_t cellX, int32_t cellY, int32_t layerIndex=0) const |
| void | SetTile (int32_t cellX, int32_t cellY, int32_t tileIndex, int32_t layerIndex=0) |
| int32_t | ReplaceTile (int32_t oldIndex, int32_t newIndex, int32_t layerIndex=0) |
| int32_t | ReplaceTilesWithTag (const std::string &tag, int32_t newIndex, int32_t layerIndex=0) |
| int32_t | CountTileUses (int32_t tileIndex, int32_t layerIndex=0) const |
| glm::ivec2 | GetMinUsed () const |
| glm::ivec2 | GetMaxUsed () const |
| bool | HasContent () const |
| const std::unordered_set< int64_t > & | GetDirtyChunks () const |
| void | ClearDirtyChunks () |
| void | MarkAllDirty () |
Public Member Functions inherited from Asset | |
| DECLARE_FACTORY_MANAGER (Asset) | |
| DECLARE_FACTORY (Asset, Asset) | |
| DECLARE_OBJECT (Asset, Object) | |
| Asset () | |
| virtual | ~Asset () |
| virtual void | Copy (Asset *srcAsset) |
| const std::string & | GetName () const |
| bool | IsLoaded () const |
| bool | IsRefCounted () const |
| int32_t | GetRefCount () const |
| bool | IsEmbedded () const |
| void | SetEmbedded (bool embed) |
| bool | IsEngineAsset () const |
| void | SetEngineAsset (bool engineAsset) |
| void | SetName (const std::string &name) |
| void | IncrementRefCount () |
| void | DecrementRefCount () |
| void | LoadFile (const char *path, AsyncLoadRequest *request=nullptr) |
| void | LoadEmbedded (const EmbeddedFile *embeddedAsset, AsyncLoadRequest *request=nullptr) |
| void | SaveFile (const char *path, Platform platform) |
| virtual bool | Import (const std::string &path, ImportOptions *options=nullptr) |
| virtual const char * | GetTypeImportExt () |
| virtual bool | ShouldSnapshotForPie () const |
| bool | IsTransient () const |
| void | SetTransient (bool transient) |
| uint64_t | GetUuid () const |
| void | SetUuid (uint64_t uuid) |
| void | EnsureUuid () |
| void | WriteHeader (Stream &stream) |
Public Member Functions inherited from Object | |
| virtual | ~Object ()=default |
| virtual const char * | RuntimeName () const =0 |
| virtual const char * | RuntimeParentName () const =0 |
| virtual RuntimeId | InstanceRuntimeId () const =0 |
| virtual Object * | QueryInterface (RuntimeId id) const |
| virtual bool | Is (RuntimeId id) const |
| virtual bool | Is (const char *name) const |
| virtual bool | DrawCustomProperty (Property &prop) |
| template<typename T > | |
| T * | As () const |
| virtual bool | Equals (const Object *rhs) const |
Static Public Member Functions | |
| static int64_t | PackChunkKey (int32_t chunkX, int32_t chunkY) |
| static void | UnpackChunkKey (int64_t key, int32_t &outChunkX, int32_t &outChunkY) |
| static int32_t | FloorDivChunk (int32_t cell) |
| static int32_t | FloorModChunk (int32_t cell) |
| static bool | HandlePropChange (class Datum *datum, uint32_t index, const void *newValue) |
Static Public Member Functions inherited from Asset | |
| static AssetHeader | ReadHeader (Stream &stream) |
| static std::string | GetNameFromPath (const std::string &path) |
| static std::string | GetDirectoryFromPath (const std::string &path) |
| static const char * | GetNameFromTypeId (TypeId id) |
| static TypeId | GetTypeIdFromName (const char *name) |
Static Public Member Functions inherited from Object | |
| static const char * | ClassRuntimeName () |
Protected Member Functions | |
| void | EnsureLayer (int32_t layerIndex) |
| void | RecomputeUsedBounds () |
Protected Attributes | |
| AssetRef | mTileSet |
| glm::ivec2 | mTileSize = { 1, 1 } |
| glm::vec2 | mOrigin = { 0.0f, 0.0f } |
| bool | mAllowNegativeCoords = true |
| std::vector< TileMapLayer > | mLayers |
| glm::ivec2 | mMinUsed = { 0, 0 } |
| glm::ivec2 | mMaxUsed = { 0, 0 } |
| bool | mHasContent = false |
| std::unordered_set< int64_t > | mDirtyChunks |
Protected Attributes inherited from Asset | |
| uint32_t | mVersion = 0 |
| TypeId | mType = INVALID_TYPE_ID |
| uint64_t | mUuid = 0 |
| bool | mEmbedded = false |
| bool | mLoaded = false |
| bool | mEnableRefCount = true |
| bool | mEngineAsset = false |
| bool | mTransient = false |
| std::string | mName = "Asset" |
| int32_t | mRefCount = 0 |
| TileMap::TileMap | ( | ) |
|
virtual |
| void TileMap::ClearCell | ( | int32_t | cellX, |
| int32_t | cellY, | ||
| int32_t | layerIndex = 0 |
||
| ) |
|
inline |
| int32_t TileMap::CountTileUses | ( | int32_t | tileIndex, |
| int32_t | layerIndex = 0 |
||
| ) | const |
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
protected |
|
static |
|
static |
|
overridevirtual |
Reimplemented from Asset.
| TileCell TileMap::GetCell | ( | int32_t | cellX, |
| int32_t | cellY, | ||
| int32_t | layerIndex = 0 |
||
| ) | const |
|
inline |
| TileMapLayer * TileMap::GetLayer | ( | int32_t | layerIndex | ) |
| const TileMapLayer * TileMap::GetLayer | ( | int32_t | layerIndex | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
| int32_t TileMap::GetTile | ( | int32_t | cellX, |
| int32_t | cellY, | ||
| int32_t | layerIndex = 0 |
||
| ) | const |
| TileSet * TileMap::GetTileSet | ( | ) | const |
|
inline |
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
static |
|
inline |
| bool TileMap::IsCellOccupied | ( | int32_t | cellX, |
| int32_t | cellY, | ||
| int32_t | layerIndex = 0 |
||
| ) | const |
Reimplemented from Asset.
| void TileMap::MarkAllDirty | ( | ) |
|
static |
|
protected |
| int32_t TileMap::ReplaceTile | ( | int32_t | oldIndex, |
| int32_t | newIndex, | ||
| int32_t | layerIndex = 0 |
||
| ) |
| int32_t TileMap::ReplaceTilesWithTag | ( | const std::string & | tag, |
| int32_t | newIndex, | ||
| int32_t | layerIndex = 0 |
||
| ) |
Reimplemented from Asset.
| void TileMap::SetCell | ( | int32_t | cellX, |
| int32_t | cellY, | ||
| const TileCell & | cell, | ||
| int32_t | layerIndex = 0 |
||
| ) |
|
inline |
| void TileMap::SetTile | ( | int32_t | cellX, |
| int32_t | cellY, | ||
| int32_t | tileIndex, | ||
| int32_t | layerIndex = 0 |
||
| ) |
| void TileMap::SetTileSet | ( | TileSet * | tileSet | ) |
|
inline |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |