File indexing completed on 2024-12-01 06:51:19
0001 /* 0002 SPDX-FileCopyrightText: 1997 Mathias Mueller <in5y158@public.uni-hamburg.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KMTYPES_H 0008 #define KMTYPES_H 0009 0010 //---------------------------------------------------------- 0011 // TYPEDEFS 0012 //---------------------------------------------------------- 0013 typedef unsigned char UCHAR; 0014 typedef unsigned char BYTE; 0015 typedef unsigned short USHORT; 0016 0017 /** 0018 * @short struct pos POSITION 0019 */ 0020 typedef struct pos 0021 { 0022 pos() 0023 : z(0) 0024 , y(0) 0025 , x(0) 0026 , f(0) 0027 { 0028 } 0029 USHORT z; 0030 USHORT y; 0031 USHORT x; 0032 USHORT f; /**< face id of the tile */ 0033 } POSITION; 0034 0035 /** 0036 * @short struct dep DEPENDENCY 0037 */ 0038 typedef struct dep 0039 { 0040 int turn_dep[4]; /**< Turn dependencies */ 0041 int place_dep[4]; /**< Placing dependencies */ 0042 int lhs_dep[2]; /**< Left side dependencies, same level */ 0043 int rhs_dep[2]; /**< Right side dependencies, same level */ 0044 bool filled; /**< True if this tile has been placed. */ 0045 bool free; /**< True if this tile can be removed? */ 0046 } DEPENDENCY; 0047 0048 /** 0049 * @short Tile angles for face composition 0050 */ 0051 enum TileViewAngle { 0052 NW, /**< North West */ 0053 NE, /**< North East */ 0054 SE, /**< South East */ 0055 SW /**< South West */ 0056 }; 0057 0058 constexpr int TILE_OFFSET = 2; 0059 constexpr int TILE_CHARACTER = 0 + TILE_OFFSET; 0060 constexpr int TILE_BAMBOO = 9 + TILE_OFFSET; 0061 constexpr int TILE_ROD = 18 + TILE_OFFSET; 0062 constexpr int TILE_SEASON = 27 + TILE_OFFSET; 0063 constexpr int TILE_WIND = 31 + TILE_OFFSET; 0064 constexpr int TILE_DRAGON = 35 + TILE_OFFSET; 0065 constexpr int TILE_FLOWER = 38 + TILE_OFFSET; 0066 0067 #endif