|
Polyphase Game Engine
|
#include <TileSet.h>
Public Member Functions | |
| DECLARE_ASSET (TileSet, Asset) | |
| TileSet () | |
| virtual | ~TileSet () |
| 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 |
| virtual bool | ShouldSnapshotForPie () const override |
| Texture * | GetTexture () const |
| void | SetTexture (Texture *tex) |
| int32_t | GetTileWidth () const |
| int32_t | GetTileHeight () const |
| int32_t | GetMarginX () const |
| int32_t | GetMarginY () const |
| int32_t | GetSpacingX () const |
| int32_t | GetSpacingY () const |
| void | RebuildTileGrid () |
| int32_t | GetNumTiles () const |
| glm::ivec2 | GetAtlasGridSize () const |
| glm::ivec2 | TileIndexToAtlasCoord (int32_t tileIndex) const |
| bool | GetTileUVs (int32_t tileIndex, glm::vec2 &outUV0, glm::vec2 &outUV1) const |
| const TileDefinition * | GetTileDef (int32_t tileIndex) const |
| TileDefinition * | GetTileDefMutable (int32_t tileIndex) |
| bool | IsTileSolid (int32_t tileIndex) const |
| bool | HasTileTag (int32_t tileIndex, const std::string &tag) const |
| const std::vector< TileDefinition > & | GetTiles () const |
| const std::vector< NineBoxBrushDef > & | GetNineBoxBrushes () const |
| std::vector< NineBoxBrushDef > & | GetNineBoxBrushesMutable () |
| int32_t | AddNineBoxBrush (const std::string &name) |
| void | RemoveNineBoxBrush (int32_t index) |
| const std::vector< AutotileSet > & | GetAutotileSets () const |
| std::vector< AutotileSet > & | GetAutotileSetsMutable () |
| int32_t | AddAutotileSet (const std::string &name) |
| void | RemoveAutotileSet (int32_t index) |
| bool | IsTileMemberOfAutotile (int32_t autotileIndex, int32_t tileIndex) const |
| int32_t | MatchAutotileRule (int32_t autotileIndex, uint8_t selfMask) const |
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 () |
| 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 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 Attributes | |
| AssetRef | mTexture |
| int32_t | mTileWidth = 16 |
| int32_t | mTileHeight = 16 |
| int32_t | mMarginX = 0 |
| int32_t | mMarginY = 0 |
| int32_t | mSpacingX = 0 |
| int32_t | mSpacingY = 0 |
| int32_t | mAtlasColumns = 0 |
| int32_t | mAtlasRows = 0 |
| std::vector< TileDefinition > | mTiles |
| std::vector< NineBoxBrushDef > | mNineBoxBrushes |
| std::vector< AutotileSet > | mAutotileSets |
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 |
| TileSet::TileSet | ( | ) |
|
virtual |
| int32_t TileSet::AddAutotileSet | ( | const std::string & | name | ) |
| int32_t TileSet::AddNineBoxBrush | ( | const std::string & | name | ) |
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| int32_t TileSet::GetNumTiles | ( | ) | const |
|
inline |
|
inline |
| Texture * TileSet::GetTexture | ( | ) | const |
| const TileDefinition * TileSet::GetTileDef | ( | int32_t | tileIndex | ) | const |
| TileDefinition * TileSet::GetTileDefMutable | ( | int32_t | tileIndex | ) |
|
inline |
|
inline |
| bool TileSet::GetTileUVs | ( | int32_t | tileIndex, |
| glm::vec2 & | outUV0, | ||
| glm::vec2 & | outUV1 | ||
| ) | const |
|
inline |
|
overridevirtual |
Reimplemented from Asset.
|
overridevirtual |
Reimplemented from Asset.
|
static |
| bool TileSet::HasTileTag | ( | int32_t | tileIndex, |
| const std::string & | tag | ||
| ) | const |
| bool TileSet::IsTileMemberOfAutotile | ( | int32_t | autotileIndex, |
| int32_t | tileIndex | ||
| ) | const |
| bool TileSet::IsTileSolid | ( | int32_t | tileIndex | ) | const |
Reimplemented from Asset.
| int32_t TileSet::MatchAutotileRule | ( | int32_t | autotileIndex, |
| uint8_t | selfMask | ||
| ) | const |
| void TileSet::RebuildTileGrid | ( | ) |
| void TileSet::RemoveAutotileSet | ( | int32_t | index | ) |
| void TileSet::RemoveNineBoxBrush | ( | int32_t | index | ) |
Reimplemented from Asset.
| void TileSet::SetTexture | ( | Texture * | tex | ) |
|
inlineoverridevirtual |
Reimplemented from Asset.
| glm::ivec2 TileSet::TileIndexToAtlasCoord | ( | int32_t | tileIndex | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |