-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmap.h
57 lines (44 loc) · 1.45 KB
/
map.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
#ifndef MAP_H
#define MAP_H
#include "mapobjects.h"
class Map
{
public:
Map();
Map(QFile* file);
~Map();
QString getPath() { return path; }
bool save(QWidget* parent, QString path="");
void exportAsC(QString cFilePath, QString rFilePath, QString prefix, int worldId);
QList<Node*> nodes;
QList<PathBehavior*> pathBehaviors;
QList<MapObject*> starCoinSigns;
QList<MapObject*> towersCastles;
QList<MapObject*> mushroomHouses;
QList<AnimationPath*> animationpaths;
quint8 sprite1Type;
quint8 sprite1StartNode;
quint8 sprite2Type;
quint8 sprite2StartNode;
Node* getNodePtr(int index);
void addNode(Node* node, int index = -1);
void removeNode(int index);
void removeNode(Node* node);
void moveNodeUp(int index);
void moveNodeDown(int index);
PathBehavior* getPathBehaviorPtr(int index);
void addPathBehavior(PathBehavior* pathBehavior, int index = -1);
void removePathBehavior(int index);
void removePathBehavior(PathBehavior* node);
void movePathBehaviorUp(int index);
void movePathBehaviorDown(int index);
private:
QString path;
void readNodes(QXmlStreamReader* xmlReader);
void readPathSettings(QXmlStreamReader* xmlReader);
void readMapObjects(QXmlStreamReader* xmlReader, quint8 type);
void readSprites(QXmlStreamReader* xmlReader);
void readAnimationPaths(QXmlStreamReader* xmlReader);
QString hex(uint addr);
};
#endif // MAP_H