forked from mrkite/minutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflatteningconverter.h
34 lines (26 loc) · 923 Bytes
/
flatteningconverter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/** Copyright (c) 2018, EtlamGit */
#ifndef FLATTENINGCONVERTER_H_
#define FLATTENINGCONVERTER_H_
#include "./paletteentry.h"
class JSONArray;
class JSONObject;
class FlatteningConverter {
public:
// singleton: access to global usable instance
static FlatteningConverter &Instance();
int addDefinitions(JSONArray *, int pack = -1);
void enableDefinitions(int id);
void disableDefinitions(int id);
// const BlockData * getPalette();
PaletteEntry * getPalette();
private:
// singleton: prevent access to constructor and copyconstructor
FlatteningConverter();
~FlatteningConverter();
FlatteningConverter(const FlatteningConverter &);
FlatteningConverter &operator=(const FlatteningConverter &);
void parseDefinition(JSONObject *block, int *parentID, int pack);
PaletteEntry palette[16*256]; // 4 bit data + 8 bit ID
// QList<QList<BlockInfo*> > packs;
};
#endif // FLATTENINGCONVERTER_H_