This repository was archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCTileTypeClass.h
More file actions
103 lines (87 loc) · 2.75 KB
/
CTileTypeClass.h
File metadata and controls
103 lines (87 loc) · 2.75 KB
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
#pragma once
#include "FA2PP.h"
#include "Drawing.h"
class ImageDataClass;
enum LandType : char
{
Clear0 = 0x0,
Clear1 = 0x1,
Clear13 = 0xD,
Ice0 = 0x0,
Ice1 = 0x1,
Ice2 = 0x2,
Ice3 = 0x3,
Ice4 = 0x4,
Tunnel = 0x5,
Railroad = 0x6,
Rock7 = 0x7,
Rock8 = 0x8,
CliffRock = 0xF,
Water = 0x9,
Beach = 0xA,
Road11 = 0xB,
Road12 = 0xC,
Rough = 0xE,
Cliff = 0xF,
};
class CTileBlockClass
{
public:
BOOL HasValidImage;
unsigned char* ImageData; // Had been drawn already at 48E9E7
struct ValidRangeData
{
short First;
short Last;
} *pPixelValidRanges;
short BlockWidth;
short BlockHeight;
short XMinusExX;
short YMinusExY;
unsigned char Height;
unsigned char RampType;
LandType TerrainType;
RGBClass RadarColorLeft;
RGBClass RadarColorRight;
LandType TerrainTypeAlt; // Beach -> Water, Rough->Clear13, ShoreTerrainRA2/TS -> Water/Rough, WaterSet -> Water
PROTECTED_PROPERTY(char, align_1E[2]);
};
struct NOVTABLE CTileTypeClass
{
public:
static constexpr reference<CTileTypeClass**, 0x7EE070> const Instance{};
static constexpr reference<CTileTypeClass**, 0x7EE070> const CurrentTileType{};
static constexpr reference<int*, 0x7EE074> const InstanceCount{};
static constexpr reference<int*, 0x7EE074> const CurrentTileTypeCount{};
// These two are technically same
static int __stdcall GetTileIndexAlt(int nTileset, int nTileBlock = 0) { JMP_STD(0x4BA0A0); }
static int __stdcall GetTileIndex(int nTileSet, int nTileBlock = 0) { JMP_STD(0x4F2620); }
int TileSet;
CTileBlockClass* TileBlockDatas;
unsigned short TileBlockCount;
short Height;
short Width;
PROTECTED_PROPERTY(unsigned char, align_E[2]);
int AllowTiberium;
int AllowToPlace;
int Morphable;
BOOL IsHidden; // Is this tileset being hidden, which means which being drawn transparently
int NonMarbleMadness;
unsigned short FrameModeIndex;
PROTECTED_PROPERTY(unsigned char, align_26[2]);
RECT Bounds; // The pixel range
CTileTypeClass* AltTypes; // clear01a, clear01b, clear01c and so on
unsigned char AltTypeCount; // we have 3 if ends to 'c'
PROTECTED_PROPERTY(unsigned char, align_3D[3]);
};
struct CTileTypeInfo
{
static constexpr reference<CTileTypeInfo, 0x7EE040> const Temperate{};
static constexpr reference<CTileTypeInfo, 0x7EE048> const Snow{};
static constexpr reference<CTileTypeInfo, 0x7EE050> const Urban{};
static constexpr reference<CTileTypeInfo, 0x7EE058> const NewUrban{};
static constexpr reference<CTileTypeInfo, 0x7EE060> const Lunar{};
static constexpr reference<CTileTypeInfo, 0x7EE068> const Desert{};
CTileTypeClass* Datas;
int Count;
};