porymap/tileset.h

46 lines
1,014 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;
2018-09-15 00:37:44 +01:00
QList<QImage> *tiles = nullptr;
QList<Metatile*> *metatiles = nullptr;
QList<QList<QRgb>> *palettes = nullptr;
2016-09-07 04:50:47 +01:00
};
2018-07-07 23:32:54 +01:00
class Metatile
{
public:
Metatile();
public:
2018-09-15 00:37:44 +01:00
QList<Tile> *tiles = nullptr;
2018-07-07 23:32:54 +01:00
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