1 | /* |
2 | Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de> |
3 | |
4 | Kmahjongg is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or |
7 | (at your option) any later version. |
8 | |
9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, write to the Free Software |
16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | */ |
18 | |
19 | #ifndef _KM_TYPES_ |
20 | #define _KM_TYPES_ |
21 | |
22 | //---------------------------------------------------------- |
23 | // TYPEDEFS |
24 | //---------------------------------------------------------- |
25 | typedef unsigned char UCHAR; |
26 | typedef unsigned char BYTE; |
27 | typedef unsigned short USHORT; |
28 | typedef unsigned long ULONG; |
29 | |
30 | |
31 | /** |
32 | * @short struct pos POSITION |
33 | */ |
34 | typedef struct pos { |
35 | pos() : e(0), y(0), x(0), f(0) { } |
36 | USHORT e; /**< Member Description */ |
37 | USHORT y; /**< Member Description */ |
38 | USHORT x; /**< Member Description */ |
39 | USHORT f; /**< Member Description */ |
40 | } POSITION; |
41 | |
42 | /** |
43 | * @short struct dep DEPENDENCY |
44 | */ |
45 | typedef struct dep { |
46 | int turn_dep[4]; /**< Turn dependencies */ |
47 | int place_dep[4]; /**< Placing dependencies */ |
48 | int lhs_dep[2]; /**< Left side dependencies, same level */ |
49 | int rhs_dep[2]; /**< Right side dependencies, same level */ |
50 | bool filled; /**< True if this tile has been placed. */ |
51 | bool free; /**< True if this tile can be removed? */ |
52 | } DEPENDENCY; |
53 | |
54 | /** |
55 | * @short Tile angles for face composition |
56 | */ |
57 | enum TileViewAngle { |
58 | NW, /**< North West */ |
59 | NE, /**< North East */ |
60 | SE, /**< South East */ |
61 | SW /**< South West */ |
62 | }; |
63 | |
64 | #define TILE_OFFSET 2 |
65 | #define TILE_CHARACTER (0+TILE_OFFSET) |
66 | #define TILE_BAMBOO (9+TILE_OFFSET) |
67 | #define TILE_ROD (18+TILE_OFFSET) |
68 | #define TILE_SEASON (27+TILE_OFFSET) |
69 | #define TILE_WIND (31+TILE_OFFSET) |
70 | #define TILE_DRAGON (35+TILE_OFFSET) |
71 | #define TILE_FLOWER (38+TILE_OFFSET) |
72 | |
73 | #endif |
74 | |