forked from DFHack/stonesense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TileTree.h
91 lines (81 loc) · 2.54 KB
/
TileTree.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
#pragma once
#include "common.h"
#include "SpriteObjects.h"
#include "Tile.h"
#include "WorldSegment.h"
class Tile;
class c_tile_tree_twig
{
c_sprite own_sprite;
vector<c_sprite> westward_growth;
vector<c_sprite> eastward_growth;
public:
c_tile_tree_twig(void);
~c_tile_tree_twig(void);
void insert_sprites(WorldSegment * w, int x, int y, int z, Tile * parent);
void set_single_sprite(void);
void set_sheetindex(int32_t in) {
own_sprite.set_sheetindex(in);
}
void set_fileindex(int32_t in) {
own_sprite.set_fileindex(in);
}
int32_t get_sheetindex(void) {
return own_sprite.get_sheetindex();
}
void set_by_xml(TiXmlElement* elemSprite, int32_t fileindex);
void add_sprite(int x, c_sprite sprite);
void reset();
void assemble_world(int x, int y, int z, Tile * b, bool chop = false) {
own_sprite.assemble_world(x,y,z,b,chop);
}
};
class c_tile_tree_branch
{
c_tile_tree_twig own_twig;
vector<c_tile_tree_twig> northward_growth;
vector<c_tile_tree_twig> southward_growth;
public:
c_tile_tree_branch(void);
~c_tile_tree_branch(void);
void insert_sprites(WorldSegment * w, int x, int y, int z, Tile * parent);
void set_sheetindex(int32_t in) {
own_twig.set_sheetindex(in);
}
void set_fileindex(int32_t in) {
own_twig.set_fileindex(in);
}
int32_t get_sheetindex(void) {
return own_twig.get_sheetindex();
}
void set_by_xml(TiXmlElement* elemSprite, int32_t fileindex);
void add_sprite(int x, int y, c_sprite sprite);
void reset();
void assemble_world(int x, int y, int z, Tile * b, bool chop = false) {
own_twig.assemble_world(x,y,z,b,chop);
}
};
class c_tile_tree
{
c_tile_tree_branch own_branch;
vector<c_tile_tree_branch> upward_growth;
public:
c_tile_tree(void);
~c_tile_tree(void);
void insert_sprites(WorldSegment * w, int x, int y, int z, Tile * parent);
void set_sheetindex(int32_t in) {
own_branch.set_sheetindex(in);
}
void set_fileindex(int32_t in) {
own_branch.set_fileindex(in);
}
int32_t get_sheetindex(void) {
return own_branch.get_sheetindex();
}
void set_by_xml(TiXmlElement* elemSprite, int32_t fileindex);
void add_sprite(int x, int y, int z, c_sprite sprite);
void reset();
void assemble_world(int x, int y, int z, Tile * b, bool chop = false) {
own_branch.assemble_world(x,y,z,b,chop);
}
};