-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameTiles.cpp
86 lines (69 loc) · 1.78 KB
/
GameTiles.cpp
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
#include <string>
#include "GameTiles.h"
#include "Utilities.h"
#include "GameAPI.h"
#include <cmath>
DListNode<Tile>* Tile::GetNthChild(UInt32 index)
{
return children.Tail()->Regress(index);
}
void Tile::DestroyAllChildren()
{
ThisCall(0xBEB880, this);
}
Tile* Tile::GetChildByName(const char* _name)
{
return ThisCall<Tile*>(0xBEABD0, this, _name);
}
void Tile::SetFloat(UInt32 id, float fltVal, bool bRemoveFromReactionMap)
{
ThisCall(kTile_SetFloatAddr, this, id, fltVal, bRemoveFromReactionMap);
}
void Tile::SetString(const char* strVal, bool bRemoveFromReactionMap)
{
SetString(kTileValue_string, strVal);
}
void Tile::SetString(UInt32 id, const char* strVal, bool bRemoveFromReactionMap)
{
ThisCall(kTile_SetStringAddr, this, id, strVal, bRemoveFromReactionMap);
}
void Tile::SetVisible(bool isVisible, bool bRemoveFromReactionMap)
{
SetFloat(kTileValue_visible, isVisible, bRemoveFromReactionMap);
}
Tile* Tile::ReadXML(const char* xmlPath)
{
return ThisCall<Tile*>(0xBF37B0, this, xmlPath);
}
float Tile::GetValueFloat(UInt32 id)
{
Tile::Value* val = ThisCall<Tile::Value*>(0xBECE90, this, id);
if (val) {
return val->num;
}
return 0.0;
}
void Tile::StartGradualSetTrait(TileValues trait, float startValue, float endValue, float duration, int type)
{
ThisCall(0xBF05A0, this, trait, startValue, endValue, duration, type);
}
bool Tile::IsInGradualSetTrait(TileValues trait)
{
return !ThisCall<bool>(0xBEACA0, this, trait);
}
void Tile::EndGradualSetTrait(UInt32 trait)
{
ThisCall(0xBED770, this, trait);
}
float Tile::GetLocusAdjustedPosX()
{
return ThisCall<float>(0xBECFB0, this);
}
float Tile::GetLocusAdjustedPosY()
{
return ThisCall<float>(0xBED040, this);
}
void Tile::SetParent(Tile* newParent, Tile* oldParent)
{
ThisCall(0xBEEA70, this, newParent, oldParent);
}