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

Tiles are now local IDs (relative to the tileset), making collision data usable.

Palettes can be overridden per-tile thru a layer.
This commit is contained in:
2015-10-26 17:09:27 +11:00
parent f213fca3cc
commit b7e320824b
11 changed files with 269 additions and 67 deletions

View File

@@ -3,8 +3,12 @@
#include <istream>
#include <vector>
#include <string>
#include <cstdint>
class CTmxTileset;
class CTmxLayer;
namespace rapidxml { template<class Ch = char> class xml_node; }
class CTmxReader
{
@@ -21,9 +25,17 @@ public:
const CTmxLayer* GetLayer ( std::string a_strName ) const;
int GetLayerCount () const;
uint32_t LidFromGid ( uint32_t a_uiGid );
private:
bool DecodeMap ( uint32_t* a_pOut, size_t a_outSize, const std::string& a_strIn );
void ReadTileset ( rapidxml::xml_node<>* a_xNode );
void ReadLayer ( rapidxml::xml_node<>* a_xNode );
int m_iWidth, m_iHeight;
std::vector<CTmxLayer*> m_vpLayers;
std::vector<CTmxTileset*> m_vpTileset;
std::vector<CTmxLayer*> m_vpLayers;
std::vector<uint32_t> m_vuiGidTable;
};