]> git.lizzy.rs Git - dragonfireclient.git/blob - src/util/directiontables.h
Add function to get server info.
[dragonfireclient.git] / src / util / directiontables.h
1 /*
2 Minetest
3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef UTIL_DIRECTIONTABLES_HEADER
21 #define UTIL_DIRECTIONTABLES_HEADER
22
23 #include "../irrlichttypes.h"
24 #include "../irr_v3d.h"
25
26 extern const v3s16 g_6dirs[6];
27
28 extern const v3s16 g_26dirs[26];
29
30 // 26th is (0,0,0)
31 extern const v3s16 g_27dirs[27];
32
33 /// Direction in the 6D format. g_27dirs contains corresponding vectors.
34 /// Here P means Positive, N stands for Negative.
35 enum Direction6D {
36 // 0
37         D6D_ZP,
38         D6D_YP,
39         D6D_XP,
40         D6D_ZN,
41         D6D_YN,
42         D6D_XN,
43 // 6
44         D6D_XN_YP,
45         D6D_XP_YP,
46         D6D_YP_ZP,
47         D6D_YP_ZN,
48         D6D_XN_ZP,
49         D6D_XP_ZP,
50         D6D_XN_ZN,
51         D6D_XP_ZN,
52         D6D_XN_YN,
53         D6D_XP_YN,
54         D6D_YN_ZP,
55         D6D_YN_ZN,
56 // 18
57         D6D_XN_YP_ZP,
58         D6D_XP_YP_ZP,
59         D6D_XN_YP_ZN,
60         D6D_XP_YP_ZN,
61         D6D_XN_YN_ZP,
62         D6D_XP_YN_ZP,
63         D6D_XN_YN_ZN,
64         D6D_XP_YN_ZN,
65 // 26
66         D6D,
67
68 // aliases
69         D6D_BACK   = D6D_ZP,
70         D6D_TOP    = D6D_YP,
71         D6D_RIGHT  = D6D_XP,
72         D6D_FRONT  = D6D_ZN,
73         D6D_BOTTOM = D6D_YN,
74         D6D_LEFT   = D6D_XN,
75 };
76
77 /// Direction in the wallmounted format.
78 /// P is Positive, N is Negative.
79 enum DirectionWallmounted {
80         DWM_YP,
81         DWM_YN,
82         DWM_XP,
83         DWM_XN,
84         DWM_ZP,
85         DWM_ZN,
86 };
87
88 #endif