axmol/tools/tolua++/CCTMXXMLParser.pkg

67 lines
2.1 KiB
Plaintext

enum {
TMXLayerAttribNone = 1 << 0,
TMXLayerAttribBase64 = 1 << 1,
TMXLayerAttribGzip = 1 << 2,
TMXLayerAttribZlib = 1 << 3,
};
enum {
TMXPropertyNone,
TMXPropertyMap,
TMXPropertyLayer,
TMXPropertyObjectGroup,
TMXPropertyObject,
TMXPropertyTile
};
class CCTMXLayerInfo : public CCObject
{
CCStringToStringDictionary* getProperties();
void setProperties(CCStringToStringDictionary* pval);
};
class CCTMXTilesetInfo : public CCObject
{
CCRect rectForGID(unsigned int gid);
};
class CCTMXMapInfo : public CCObject
{
void setOrientation(int val);
int getOrientation();
void setMapSize(CCSize sz);
CCSize getMapSize();
void setTileSize(CCSize sz);
CCSize getTileSize();
void setLayers(CCMutableArray<CCTMXLayerInfo*>* pval);
CCMutableArray<CCTMXLayerInfo*>* getLayers();
void setTilesets(CCMutableArray<CCTMXTilesetInfo*>* pval);
CCMutableArray<CCTMXTilesetInfo*>* getTilesets();
void setObjectGroups(CCMutableArray<CCTMXObjectGroup*>* val);
CCMutableArray<CCTMXObjectGroup*>* getObjectGroups();
void setParentElement(int val);
int getParentElement();
void setParentGID(unsigned int val);
unsigned int getParentGID();
void setLayerAttribs(int val);
int getLayerAttribs();
void setStoringCharacters(bool val);
bool getStoringCharacters();
void setProperties(CCStringToStringDictionary* pval);
CCStringToStringDictionary* getProperties();
void setTileProperties(CCDictionary<int, CCStringToStringDictionary*> * tileProperties);
CCDictionary<int, CCStringToStringDictionary*> * getTileProperties();
void setCurrentString(const char *currentString);
const char* getCurrentString();
void setTMXFileName(const char *fileName);
const char* getTMXFileName();
void startElement(void *ctx, const char *name, const char **atts);
void endElement(void *ctx, const char *name);
void textHandler(void *ctx, const char *ch, int len);
bool parseXMLFile(const char *xmlFilename);
static CCTMXMapInfo * formatWithTMXFile(const char *tmxFile);
};