1
0
mirror of https://github.com/ScrelliCopter/tmx2gba.git synced 2025-02-21 03:29:25 +11:00

Added object exporting & the ability to store arguments in a parameters file, woo!

I'll update the readme when I can be bothered.
This commit is contained in:
2016-04-04 02:51:24 +10:00
parent cacfa29501
commit 29b64fffaf
10 changed files with 439 additions and 128 deletions

View File

@@ -8,6 +8,7 @@
class CTmxTileset;
class CTmxLayer;
class CTmxObject;
namespace rapidxml { template<class Ch = char> class xml_node; }
class CTmxReader
@@ -21,21 +22,26 @@ public:
int GetWidth () const;
int GetHeight () const;
const CTmxLayer* GetLayer ( int a_iId ) const;
const CTmxLayer* GetLayer ( int a_id ) const;
const CTmxLayer* GetLayer ( std::string a_strName ) const;
int GetLayerCount () const;
uint32_t LidFromGid ( uint32_t a_uiGid );
const CTmxObject* GetObject ( int a_id ) const;
int GetObjectCount () const;
uint32_t LidFromGid ( uint32_t a_gid );
private:
bool DecodeMap ( uint32_t* a_pOut, size_t a_outSize, const std::string& a_strIn );
bool DecodeMap ( uint32_t* a_out, size_t a_outSize, const std::string& a_strIn );
void ReadTileset ( rapidxml::xml_node<>* a_xNode );
void ReadLayer ( rapidxml::xml_node<>* a_xNode );
void ReadObjects ( rapidxml::xml_node<>* a_xNode );
int m_iWidth, m_iHeight;
std::vector<CTmxTileset*> m_vpTileset;
std::vector<CTmxLayer*> m_vpLayers;
std::vector<uint32_t> m_vuiGidTable;
int m_width, m_height;
std::vector<CTmxTileset*> m_tileset;
std::vector<CTmxLayer*> m_layers;
std::vector<CTmxObject*> m_objects;
std::vector<uint32_t> m_gidTable;
};