-
Notifications
You must be signed in to change notification settings - Fork 7
/
project.h
executable file
·131 lines (113 loc) · 4.11 KB
/
project.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
#ifndef PROJECT_H
#define PROJECT_H
#include "map.h"
#include "blockdata.h"
#include <QStringList>
#include <QList>
#include <QStandardItem>
class Project
{
public:
Project();
QString root;
QStringList *groupNames = NULL;
QMap<QString, int> *map_groups;
QList<QStringList> groupedMapNames;
QStringList *mapNames = NULL;
QMap<QString, QString>* mapConstantsToMapNames;
QMap<QString, QString>* mapNamesToMapConstants;
QList<QString> mapLayoutsTable;
QList<QString> mapLayoutsTableMaster;
QMap<QString, MapLayout*> mapLayouts;
QMap<QString, MapLayout*> mapLayoutsMaster;
QStringList *regionMapSections = NULL;
QStringList *itemNames = NULL;
QStringList *flagNames = NULL;
QStringList *varNames = NULL;
QStringList *movementTypes = NULL;
QStringList *mapTypes = NULL;
QStringList *mapBattleScenes = NULL;
QStringList *weatherNames = NULL;
QStringList *coordEventWeatherNames = NULL;
QStringList *secretBaseIds = NULL;
QStringList *bgEventFacingDirections = NULL;
QStringList mapsWithConnections;
QMap<QString, Map*> *map_cache;
Map* loadMap(QString);
Map* getMap(QString);
QMap<QString, Tileset*> *tileset_cache = NULL;
Tileset* loadTileset(QString);
Tileset* getTileset(QString);
Blockdata* readBlockdata(QString);
void loadBlockdata(Map*);
QString readTextFile(QString path);
void saveTextFile(QString path, QString text);
void appendTextFile(QString path, QString text);
void deleteFile(QString path);
void readMapGroups();
Map* addNewMapToGroup(QString mapName, int groupNum);
QString getNewMapName();
QString getProjectTitle();
QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
QStringList* getLabelValues(QList<QStringList>*, QString);
void readMapHeader(Map*);
void readMapLayoutsTable();
void readAllMapLayouts();
QStringList* readLayoutValues(QString layoutName);
void readMapLayout(Map*);
void readMapsWithConnections();
void loadMapTilesets(Map*);
void loadTilesetAssets(Tileset*);
void saveBlockdata(Map*);
void saveMapBorder(Map*);
void writeBlockdata(QString, Blockdata*);
void saveAllMaps();
void saveMap(Map*);
void saveAllDataStructures();
void saveAllMapLayouts();
void saveMapGroupsTable();
void saveMapConstantsHeader();
QList<QStringList>* parseAsm(QString text);
QStringList getSongNames();
QStringList getVisibilities();
QMap<QString, QStringList> getTilesets();
void readRegionMapSections();
void readItemNames();
void readFlagNames();
void readVarNames();
void readMovementTypes();
void readMapTypes();
void readMapBattleScenes();
void readWeatherNames();
void readCoordEventWeatherNames();
void readSecretBaseIds();
void readBgEventFacingDirections();
void loadEventPixmaps(QList<Event*> objects);
QMap<QString, int> getEventObjGfxConstants();
QString fixGraphicPath(QString path);
void readMapEvents(Map *map);
void loadMapConnections(Map *map);
void loadMapBorder(Map *map);
void saveMapEvents(Map *map);
QStringList readCArray(QString text, QString label);
QString readCIncbin(QString text, QString label);
QMap<QString, int> readCDefines(QString text, QStringList prefixes);
private:
QString getMapLayoutsTableFilepath();
QString getMapLayoutFilepath(QString);
void saveMapHeader(Map*);
void saveMapConnections(Map*);
void updateMapsWithConnections(Map*);
void saveMapsWithConnections();
void saveMapLayoutsTable();
void updateMapLayout(Map*);
void readCDefinesSorted(QString, QStringList, QStringList*);
void readCDefinesSorted(QString, QStringList, QStringList*, QString, int);
void setNewMapHeader(Map* map, int mapIndex);
void setNewMapLayout(Map* map);
void setNewMapBlockdata(Map* map);
void setNewMapBorder(Map *map);
void setNewMapEvents(Map *map);
void setNewMapConnections(Map *map);
};
#endif // PROJECT_H