2018-09-26 00:13:33 +01:00
|
|
|
#ifndef IMAGEPROVIDERS_H
|
|
|
|
#define IMAGEPROVIDERS_H
|
|
|
|
|
|
|
|
#include "block.h"
|
|
|
|
#include "tileset.h"
|
|
|
|
#include <QImage>
|
|
|
|
#include <QPixmap>
|
|
|
|
|
|
|
|
QImage getCollisionMetatileImage(Block);
|
|
|
|
QImage getCollisionMetatileImage(int, int);
|
2020-07-02 02:43:19 +01:00
|
|
|
QImage getMetatileImage(uint16_t, Tileset*, Tileset*, QList<int>, QList<float>, bool useTruePalettes = false);
|
2021-12-01 21:06:14 +00:00
|
|
|
QImage getMetatileImage(Metatile*, Tileset*, Tileset*, QList<int>, QList<float>, bool useTruePalettes = false);
|
2018-09-30 18:33:58 +01:00
|
|
|
QImage getTileImage(uint16_t, Tileset*, Tileset*);
|
2020-05-03 16:31:44 +01:00
|
|
|
QImage getPalettedTileImage(uint16_t, Tileset*, Tileset*, int, bool useTruePalettes = false);
|
2019-06-17 18:00:31 +01:00
|
|
|
QImage getGreyscaleTileImage(uint16_t tile, Tileset *primaryTileset, Tileset *secondaryTileset);
|
2023-06-16 12:39:32 +01:00
|
|
|
void flattenTo4bppImage(QImage * image);
|
2019-06-17 18:00:31 +01:00
|
|
|
|
|
|
|
static QList<QRgb> greyscalePalette({
|
|
|
|
qRgb(0, 0, 0),
|
|
|
|
qRgb(16, 16, 16),
|
|
|
|
qRgb(32, 32, 32),
|
|
|
|
qRgb(48, 48, 48),
|
|
|
|
qRgb(64, 64, 64),
|
|
|
|
qRgb(80, 80, 80),
|
|
|
|
qRgb(96, 96, 96),
|
|
|
|
qRgb(112, 112, 112),
|
|
|
|
qRgb(128, 128, 128),
|
|
|
|
qRgb(144, 144, 144),
|
|
|
|
qRgb(160, 160, 160),
|
|
|
|
qRgb(176, 176, 176),
|
|
|
|
qRgb(192, 192, 192),
|
|
|
|
qRgb(208, 208, 208),
|
|
|
|
qRgb(224, 224, 224),
|
|
|
|
qRgb(240, 240, 240),
|
|
|
|
});
|
2018-09-26 00:13:33 +01:00
|
|
|
|
|
|
|
#endif // IMAGEPROVIDERS_H
|