annotate TileFrameTable.h @ 663:a32962bca266

Слияние
author Ritor1
date Tue, 12 Mar 2013 11:34:13 +0600
parents 1b813023fcbd
children 7f1487b74571
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5 /* 327 */
Ritor1
parents:
diff changeset
6 enum TILE_DESC_FLAGS
Ritor1
parents:
diff changeset
7 {
Ritor1
parents:
diff changeset
8 TILE_DESC_BURNS = 0x1,
Ritor1
parents:
diff changeset
9 TILE_DESC_WATER = 0x2,
Ritor1
parents:
diff changeset
10 TILE_DESC_BLOCK = 0x4,
Ritor1
parents:
diff changeset
11 TILE_DESC_REPULSE = 0x8,
Ritor1
parents:
diff changeset
12 TILE_DESC_FLAT = 0x10,
Ritor1
parents:
diff changeset
13 TILE_DESC_WAVY = 0x20,
Ritor1
parents:
diff changeset
14 TILE_DESC_DONT_DRAW = 0x40,
Ritor1
parents:
diff changeset
15 TILE_DESC_WATER_2 = 0x100,
Ritor1
parents:
diff changeset
16 TILE_DESC_TRANSITION = 0x200,
Ritor1
parents:
diff changeset
17 TILE_DESC_SCROLL_DOWN = 0x400,
Ritor1
parents:
diff changeset
18 TILE_DESC_SCROLL_UP = 0x800,
Ritor1
parents:
diff changeset
19 TILE_DESC_SCROLL_LEFT = 0x1000,
Ritor1
parents:
diff changeset
20 TILE_DESC_SCROLL_RIGHT = 0x2000,
Ritor1
parents:
diff changeset
21 };
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23
630
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
24 enum Tileset: unsigned __int16
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
25 {
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
26 Tileset_Grass = 0,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
27 Tileset_Snow = 1,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
28 Tileset_2 = 2,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
29 Tileset_3 = 3,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
30 Tileset_Dirt = 4,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
31 Tileset_Water = 5,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
32 Tileset_6 = 6,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
33 Tileset_Swamp = 7,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
34 Tileset_8 = 8,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
35 Tileset_9 = 9,
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
36 Tileset_RoadGrassCobble = 10
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
37 };
0
Ritor1
parents:
diff changeset
38
Ritor1
parents:
diff changeset
39 /* 48 */
Ritor1
parents:
diff changeset
40 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
41 struct TileDesc
Ritor1
parents:
diff changeset
42 {
Ritor1
parents:
diff changeset
43 char pTileName[16];
Ritor1
parents:
diff changeset
44 unsigned __int16 uTileID;
Ritor1
parents:
diff changeset
45 unsigned __int16 uBitmapID;
630
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
46 Tileset tileset;
0
Ritor1
parents:
diff changeset
47 unsigned __int16 uSection;
Ritor1
parents:
diff changeset
48 unsigned __int16 uAttributes;
Ritor1
parents:
diff changeset
49 };
Ritor1
parents:
diff changeset
50 #pragma pack(pop)
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52 /* 49 */
Ritor1
parents:
diff changeset
53 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
54 struct TileTable
Ritor1
parents:
diff changeset
55 {
Ritor1
parents:
diff changeset
56 //----- (00487E13) --------------------------------------------------------
Ritor1
parents:
diff changeset
57 TileTable()
Ritor1
parents:
diff changeset
58 {
Ritor1
parents:
diff changeset
59 this->pTiles = nullptr;
Ritor1
parents:
diff changeset
60 this->uNumTiles = 0;
Ritor1
parents:
diff changeset
61 }
Ritor1
parents:
diff changeset
62 ~TileTable();
Ritor1
parents:
diff changeset
63
Ritor1
parents:
diff changeset
64 TileDesc *GetTileById(unsigned int uTileID);
630
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
65 void InitializeTileset(Tileset tileset);
0
Ritor1
parents:
diff changeset
66 int method_487ED6(signed int a1, int a2);
Ritor1
parents:
diff changeset
67 unsigned int GetTileId(unsigned int uTerrainType, unsigned int uSection);
Ritor1
parents:
diff changeset
68 void ToFile();
Ritor1
parents:
diff changeset
69 void FromFile(void *pSerialized);
Ritor1
parents:
diff changeset
70 int FromFileTxt(const char *pFilename);
Ritor1
parents:
diff changeset
71
Ritor1
parents:
diff changeset
72 unsigned int uNumTiles;
Ritor1
parents:
diff changeset
73 struct TileDesc *pTiles;
Ritor1
parents:
diff changeset
74 };
Ritor1
parents:
diff changeset
75 #pragma pack(pop)