summaryrefslogtreecommitdiff
path: root/ZAPD/ZPath.h
blob: 722e84afe7364884a6d399326ae7f28c1259fdbf (plain)
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
#pragma once

#include "ZResource.h"
#include "ZVector.h"

class PathwayEntry : public ZResource
{
public:
	PathwayEntry(ZFile* nParent);

	void ParseRawData() override;
	void DeclareReferences(const std::string& prefix) override;

	std::string GetBodySourceCode() const override;

	std::string GetSourceTypeName() const override;
	ZResourceType GetResourceType() const override;

	size_t GetRawDataSize() const override;
	segptr_t GetListAddress() const;

public:
	int32_t numPoints;
	int8_t unk1;   // (MM Only)
	int16_t unk2;  // (MM Only)
	segptr_t listSegmentAddress;
	std::vector<ZVector> points;
};

class ZPath : public ZResource
{
public:
	ZPath(ZFile* nParent);

	void ParseXML(tinyxml2::XMLElement* reader) override;
	void ParseRawData() override;
	void DeclareReferences(const std::string& prefix) override;

	Declaration* DeclareVar(const std::string& prefix, const std::string& bodyStr) override;
	std::string GetBodySourceCode() const override;

	std::string GetSourceTypeName() const override;
	ZResourceType GetResourceType() const override;

	size_t GetRawDataSize() const override;
	void SetNumPaths(uint32_t nNumPaths);

public:
	uint32_t numPaths;
	std::vector<PathwayEntry> pathways;
};