-
Notifications
You must be signed in to change notification settings - Fork 12
/
options.h
195 lines (170 loc) · 3.39 KB
/
options.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
// Copyright (c) 2018 huderlem, 2021-2024 red031000
#ifndef OPTIONS_H
#define OPTIONS_H
#include <stdint.h>
#include <stdbool.h>
struct GbaToPngOptions {
char *paletteFilePath;
int bitDepth;
bool hasTransparency;
int width;
int colsPerChunk;
int rowsPerChunk;
int palIndex;
};
struct PngToGbaOptions {
int numTiles;
int bitDepth;
int colsPerChunk;
int rowsPerChunk;
};
struct PngToNtrOptions {
int numTiles;
int bitDepth;
int colsPerChunk;
int rowsPerChunk;
bool clobberSize;
bool byteOrder;
bool version101;
bool sopc;
uint32_t scanMode;
bool wrongSize;
bool handleEmpty;
bool vramTransfer;
int mappingType;
};
struct NtrToPngOptions {
char *paletteFilePath;
int bitDepth;
bool hasTransparency;
int width;
int colsPerChunk;
int rowsPerChunk;
int palIndex;
bool scanFrontToBack;
bool handleEmpty;
};
struct CellVramTransferData {
int sourceDataOffset;
int size;
};
struct Attr0 {
int YCoordinate;
bool Rotation;
bool SizeDisable;
int Mode;
bool Mosaic;
int Colours;
int Shape;
};
struct Attr1 {
int XCoordinate;
int RotationScaling;
int Size;
};
struct Attr2 {
int CharName;
int Priority;
int Palette;
};
struct OAM {
struct Attr0 attr0;
struct Attr1 attr1;
struct Attr2 attr2;
};
struct CellAttributes {
bool hFlip; // 1 << 8
bool vFlip; // 1 << 9
bool hvFlip; // 1 << 10
bool boundingRect; // 1 << 11
int boundingSphereRadius; // 1 << 0 (6 bits);
};
struct Cell {
struct CellAttributes attributes;
short maxX;
short maxY;
short minX;
short minY;
short oamCount;
struct OAM *oam;
};
struct JsonToCellOptions {
bool labelEnabled;
bool extended;
bool vramTransferEnabled;
int mappingType;
int cellCount;
struct Cell **cells;
int vramTransferMaxSize;
struct CellVramTransferData **transferData;
char **labels;
int labelCount;
};
struct JsonToScreenOptions {
int height;
int width;
unsigned short *data;
int bitdepth;
};
struct FrameData {
int resultId;
short frameDelay;
int resultOffset;
};
struct SequenceData {
short frameCount;
short loopStartFrame;
short animationElement;
short animationType;
int playbackMode;
struct FrameData **frameData;
};
struct AnimationDataSRT {
short index;
unsigned short rotation;
int scaleX;
int scaleY;
short positionX;
short positionY;
};
struct AnimationDataT {
short index;
//unsigned short rotation;
short positionX;
short positionY;
};
struct AnimationResults {
short resultType;
bool padded;
union {
short index;
struct AnimationDataSRT dataSrt;
struct AnimationDataT dataT;
};
};
struct JsonToAnimationOptions {
bool multiCell;
short sequenceCount;
short frameCount;
struct SequenceData **sequenceData;
struct AnimationResults **animationResults;
bool labelEnabled;
char **labels;
int labelCount;
short resultCount;
};
struct NtrFontOptions {
char *metadataFilePath;
bool useSubscreenPalette;
};
struct NtrFontMetadata {
uint32_t size;
uint32_t widthTableOffset;
uint32_t numGlyphs;
uint8_t maxWidth;
uint8_t maxHeight;
uint8_t glyphWidth;
uint8_t glyphHeight;
uint8_t *glyphWidthTable;
};
#endif // OPTIONS_H