Mercurial > might-and-magic-trilogy
diff TileFrameTable.h @ 0:8b8875f5b359
Initial commit
author | Nomad |
---|---|
date | Fri, 05 Oct 2012 16:07:14 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TileFrameTable.h Fri Oct 05 16:07:14 2012 +0200 @@ -0,0 +1,61 @@ +#pragma once + + + +/* 327 */ +enum TILE_DESC_FLAGS +{ + TILE_DESC_BURNS = 0x1, + TILE_DESC_WATER = 0x2, + TILE_DESC_BLOCK = 0x4, + TILE_DESC_REPULSE = 0x8, + TILE_DESC_FLAT = 0x10, + TILE_DESC_WAVY = 0x20, + TILE_DESC_DONT_DRAW = 0x40, + TILE_DESC_WATER_2 = 0x100, + TILE_DESC_TRANSITION = 0x200, + TILE_DESC_SCROLL_DOWN = 0x400, + TILE_DESC_SCROLL_UP = 0x800, + TILE_DESC_SCROLL_LEFT = 0x1000, + TILE_DESC_SCROLL_RIGHT = 0x2000, +}; + + + +/* 48 */ +#pragma pack(push, 1) +struct TileDesc +{ + char pTileName[16]; + unsigned __int16 uTileID; + unsigned __int16 uBitmapID; + unsigned __int16 uTerrainType; + unsigned __int16 uSection; + unsigned __int16 uAttributes; +}; +#pragma pack(pop) + +/* 49 */ +#pragma pack(push, 1) +struct TileTable +{ + //----- (00487E13) -------------------------------------------------------- + TileTable() + { + this->pTiles = nullptr; + this->uNumTiles = 0; + } + ~TileTable(); + + TileDesc *GetTileById(unsigned int uTileID); + void InitializeTileset(int uTerrainType); + int method_487ED6(signed int a1, int a2); + unsigned int GetTileId(unsigned int uTerrainType, unsigned int uSection); + void ToFile(); + void FromFile(void *pSerialized); + int FromFileTxt(const char *pFilename); + + unsigned int uNumTiles; + struct TileDesc *pTiles; +}; +#pragma pack(pop)