No Description

tileset.h 1002B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef TILESET_H
  2. #define TILESET_H
  3. #include "tile.h"
  4. #include <QImage>
  5. class Metatile;
  6. class Tileset
  7. {
  8. public:
  9. Tileset();
  10. public:
  11. QString name;
  12. QString is_compressed;
  13. QString is_secondary;
  14. QString padding;
  15. QString tiles_label;
  16. QString palettes_label;
  17. QString metatiles_label;
  18. QString callback_label;
  19. QString metatile_attrs_label;
  20. QList<QImage> *tiles = NULL;
  21. QList<Metatile*> *metatiles = NULL;
  22. QList<QList<QRgb>> *palettes = NULL;
  23. };
  24. class Metatile
  25. {
  26. public:
  27. Metatile();
  28. public:
  29. QList<Tile> *tiles = NULL;
  30. int attr;
  31. static QImage getMetatileImage(int, Tileset*, Tileset*);
  32. static Metatile* getMetatile(int, Tileset*, Tileset*);
  33. static QImage getMetatileTile(int, Tileset*, Tileset*);
  34. static Tileset* getBlockTileset(int, Tileset*, Tileset*);
  35. static int getBlockIndex(int);
  36. static QList<QList<QRgb>> getBlockPalettes(Tileset*, Tileset*);
  37. };
  38. #endif // TILESET_H