annotate TileFrameTable.h @ 1054:5520fdca7a74

m
author Ritor1
date Wed, 22 May 2013 22:22:36 +0600
parents 7f1487b74571
children 7ef4b64f6329
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
760
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
24 enum Tileset: signed __int16
630
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,
760
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
36 Tileset_RoadGrassCobble = 10,
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
37 Tileset_NULL =-1
630
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
38 };
0
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40 /* 48 */
Ritor1
parents:
diff changeset
41 #pragma pack(push, 1)
760
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
42 struct TileDesc //26
0
Ritor1
parents:
diff changeset
43 {
Ritor1
parents:
diff changeset
44 char pTileName[16];
Ritor1
parents:
diff changeset
45 unsigned __int16 uTileID;
Ritor1
parents:
diff changeset
46 unsigned __int16 uBitmapID;
630
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
47 Tileset tileset;
0
Ritor1
parents:
diff changeset
48 unsigned __int16 uSection;
Ritor1
parents:
diff changeset
49 unsigned __int16 uAttributes;
Ritor1
parents:
diff changeset
50 };
Ritor1
parents:
diff changeset
51 #pragma pack(pop)
Ritor1
parents:
diff changeset
52
Ritor1
parents:
diff changeset
53 /* 49 */
Ritor1
parents:
diff changeset
54 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
55 struct TileTable
Ritor1
parents:
diff changeset
56 {
Ritor1
parents:
diff changeset
57 //----- (00487E13) --------------------------------------------------------
Ritor1
parents:
diff changeset
58 TileTable()
Ritor1
parents:
diff changeset
59 {
Ritor1
parents:
diff changeset
60 this->pTiles = nullptr;
760
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
61 this->sNumTiles = 0;
0
Ritor1
parents:
diff changeset
62 }
Ritor1
parents:
diff changeset
63 ~TileTable();
Ritor1
parents:
diff changeset
64
Ritor1
parents:
diff changeset
65 TileDesc *GetTileById(unsigned int uTileID);
630
1b813023fcbd Tilesets change according to current season
Nomad
parents: 0
diff changeset
66 void InitializeTileset(Tileset tileset);
760
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
67 int GetTileForTerrainType(signed int a1, bool a2);
0
Ritor1
parents:
diff changeset
68 unsigned int GetTileId(unsigned int uTerrainType, unsigned int uSection);
Ritor1
parents:
diff changeset
69 void ToFile();
Ritor1
parents:
diff changeset
70 void FromFile(void *pSerialized);
Ritor1
parents:
diff changeset
71 int FromFileTxt(const char *pFilename);
Ritor1
parents:
diff changeset
72
760
7f1487b74571 some outdoor cleaning
Gloval
parents: 630
diff changeset
73 signed int sNumTiles;
0
Ritor1
parents:
diff changeset
74 struct TileDesc *pTiles;
Ritor1
parents:
diff changeset
75 };
Ritor1
parents:
diff changeset
76 #pragma pack(pop)