porymap/include/core/paletteutil.h

26 lines
762 B
C
Raw Normal View History

2020-09-13 23:37:55 +01:00
#pragma once
#ifndef PALETTEUTIL_H
#define PALETTEUTIL_H
#include <QList>
#include <QRgb>
#include <QString>
2021-02-18 00:20:14 +00:00
class PaletteUtil {
public:
PaletteUtil();
2021-02-18 00:20:14 +00:00
QList<QRgb> parse(QString filepath, bool* error);
void writeJASC(QString filepath, QVector<QRgb> colors, int offset, int nColors);
2021-02-18 00:20:14 +00:00
private:
2021-02-18 00:20:14 +00:00
QList<QRgb> parsePal(QString filepath, bool* error);
QList<QRgb> parseJASC(QString filepath, bool* error);
QList<QRgb> parseAdvanceMapPal(QString filepath, bool* error);
QList<QRgb> parseAdobeColorTable(QString filepath, bool* error);
QList<QRgb> parseTileLayerPro(QString filepath, bool* error);
QList<QRgb> parseAdvancePaletteEditor(QString filepath, bool* error);
int clampColorValue(int value);
};
#endif // PALETTEUTIL_H