-
Notifications
You must be signed in to change notification settings - Fork 0
/
MapDataTools.h
49 lines (39 loc) · 1.56 KB
/
MapDataTools.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
#ifndef __MAPDATATOOLS_H__
#define __MAPDATATOOLS_H__
#include <fstream>
#include <iostream>
#include <vector>
#include "MapData.h"
#include "MapMetadata.h"
using namespace std;
typedef enum {SUCCESS = 0, FAILURE = 1} Status;
namespace MapDataTools {
Status GetMapData(fstream &ROMFile,
MapMetadata &MapMetadata,
MapData &aMapData);
void GetMapArrangementData(fstream &ROMFile,
MapData &aMapData,
int MapDataAddress);
void GetTilesetData(fstream &ROMFile,
MapData &aMapData,
int TilesetAddress);
void GetGraphicsData(fstream &ROMFile,
MapData &aMapData,
int GraphicsAddress,
bool bDataIsCompressed);
void GetPaletteData(fstream &ROMFile,
MapData &aMapData,
int PaletteAddress,
int NbColors);
void InsertMapDataIntoROM(fstream &ROMFile,
MapMetadata &aMapMetadata,
MapData &aMapData);
void Compress(vector<unsigned char> &DataToCompress,
vector<unsigned char> &CompressedData);
void Decompress(fstream &ROMFile,
vector<unsigned char> &DecompressedData,
int Address,
int DecompressedDataLength,
int &CompressedDataLength);
}
#endif // __MAPDATATOOLS_H__