porymap/tileset.h

46 lines
1,002 B
C
Raw Normal View History

2016-09-07 04:50:47 +01:00
#ifndef TILESET_H
#define TILESET_H
2018-07-07 23:32:54 +01:00
#include "tile.h"
2016-09-07 04:50:47 +01:00
#include <QImage>
2018-07-07 23:32:54 +01:00
class Metatile;
2016-09-07 04:50:47 +01:00
class Tileset
{
public:
Tileset();
public:
QString name;
QString is_compressed;
QString is_secondary;
QString padding;
QString tiles_label;
QString palettes_label;
QString metatiles_label;
QString callback_label;
QString metatile_attrs_label;
2017-11-28 04:46:27 +00:00
QList<QImage> *tiles = NULL;
QList<Metatile*> *metatiles = NULL;
QList<QList<QRgb>> *palettes = NULL;
2016-09-07 04:50:47 +01:00
};
2018-07-07 23:32:54 +01:00
class Metatile
{
public:
Metatile();
public:
QList<Tile> *tiles = NULL;
int attr;
static QImage getMetatileImage(int, Tileset*, Tileset*);
static Metatile* getMetatile(int, Tileset*, Tileset*);
static QImage getMetatileTile(int, Tileset*, Tileset*);
static Tileset* getBlockTileset(int, Tileset*, Tileset*);
static int getBlockIndex(int);
static QList<QList<QRgb>> getBlockPalettes(Tileset*, Tileset*);
};
2016-09-07 04:50:47 +01:00
#endif // TILESET_H