annotate Engine/Tables/TileFrameTable.h @ 2553:48708da03b7f

Party Creation UI logic separated from MainMenu
author a.parshin
date Wed, 13 May 2015 02:20:05 +0200
parents 1bcadc6dd203
children
rev   line source
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
1 #pragma once
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
2
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
3
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
4
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
5 /* 327 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
6 enum TILE_DESC_FLAGS
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
7 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
8 TILE_DESC_BURNS = 0x1,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
9 TILE_DESC_WATER = 0x2,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
10 TILE_DESC_BLOCK = 0x4,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
11 TILE_DESC_REPULSE = 0x8,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
12 TILE_DESC_FLAT = 0x10,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
13 TILE_DESC_WAVY = 0x20,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
14 TILE_DESC_DONT_DRAW = 0x40,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
15 TILE_DESC_WATER_2 = 0x100,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
16 TILE_DESC_TRANSITION = 0x200,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
17 TILE_DESC_SCROLL_DOWN = 0x400,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
18 TILE_DESC_SCROLL_UP = 0x800,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
19 TILE_DESC_SCROLL_LEFT = 0x1000,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
20 TILE_DESC_SCROLL_RIGHT = 0x2000,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
21 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
22
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
23 #pragma warning( push )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
24 #pragma warning( disable: 4341 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
25 enum Tileset: signed __int16
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
26 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
27 Tileset_Grass = 0,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
28 Tileset_Snow = 1,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
29 Tilset_Desert = 2,
2534
1bcadc6dd203 enum SOUND_
Ritor1
parents: 2499
diff changeset
30 Tileset_CooledLava = 3,
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
31 Tileset_Dirt = 4,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
32 Tileset_Water = 5,
2534
1bcadc6dd203 enum SOUND_
Ritor1
parents: 2499
diff changeset
33 Tileset_Badlands = 6,
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
34 Tileset_Swamp = 7,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
35 Tileset_8 = 8,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
36 Tileset_9 = 9,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
37 Tileset_RoadGrassCobble = 10,
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
38 Tileset_NULL =-1
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
39 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
40 #pragma warning( pop )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
41
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
42 /* 48 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
43 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
44 struct TileDesc //26
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
45 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
46 char pTileName[16];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
47 unsigned __int16 uTileID;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
48 unsigned __int16 uBitmapID;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
49 Tileset tileset;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
50 unsigned __int16 uSection;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
51 unsigned __int16 uAttributes;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
52 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
53 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
54
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
55 /* 49 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
56 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
57 struct TileTable
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
58 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
59 //----- (00487E13) --------------------------------------------------------
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
60 TileTable()
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
61 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
62 this->pTiles = nullptr;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
63 this->sNumTiles = 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
64 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
65 ~TileTable();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
66
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
67 TileDesc *GetTileById(unsigned int uTileID);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
68 void InitializeTileset(Tileset tileset);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
69 int GetTileForTerrainType(signed int a1, bool a2);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
70 unsigned int GetTileId(unsigned int uTerrainType, unsigned int uSection);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
71 void ToFile();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
72 void FromFile(void *data_mm6, void *data_mm7, void *data_mm8);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
73 int FromFileTxt(const char *pFilename);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
74
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
75 signed int sNumTiles;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
76 struct TileDesc *pTiles;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
77 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
78 #pragma pack(pop)