X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Futil%2Fdirectiontables.h;h=3cfe0fb3eb5396747b1d9965d23a60acc0da57c9;hb=ae0d8f74d747fab2fbe5b4553818e0f938e3289d;hp=c02b3d124b6604192a37d4e77dbff07963d6746c;hpb=1bc37d576ce790c1169c5f9996be7bbc8026db2c;p=dragonfireclient.git diff --git a/src/util/directiontables.h b/src/util/directiontables.h index c02b3d124..3cfe0fb3e 100644 --- a/src/util/directiontables.h +++ b/src/util/directiontables.h @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2010-2012 celeron55, Perttu Ahola +Minetest +Copyright (C) 2010-2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #define UTIL_DIRECTIONTABLES_HEADER #include "../irrlichttypes.h" +#include "../irr_v3d.h" extern const v3s16 g_6dirs[6]; @@ -29,5 +30,59 @@ extern const v3s16 g_26dirs[26]; // 26th is (0,0,0) extern const v3s16 g_27dirs[27]; -#endif +/// Direction in the 6D format. g_27dirs contains corresponding vectors. +/// Here P means Positive, N stands for Negative. +enum Direction6D { +// 0 + D6D_ZP, + D6D_YP, + D6D_XP, + D6D_ZN, + D6D_YN, + D6D_XN, +// 6 + D6D_XN_YP, + D6D_XP_YP, + D6D_YP_ZP, + D6D_YP_ZN, + D6D_XN_ZP, + D6D_XP_ZP, + D6D_XN_ZN, + D6D_XP_ZN, + D6D_XN_YN, + D6D_XP_YN, + D6D_YN_ZP, + D6D_YN_ZN, +// 18 + D6D_XN_YP_ZP, + D6D_XP_YP_ZP, + D6D_XN_YP_ZN, + D6D_XP_YP_ZN, + D6D_XN_YN_ZP, + D6D_XP_YN_ZP, + D6D_XN_YN_ZN, + D6D_XP_YN_ZN, +// 26 + D6D, + +// aliases + D6D_BACK = D6D_ZP, + D6D_TOP = D6D_YP, + D6D_RIGHT = D6D_XP, + D6D_FRONT = D6D_ZN, + D6D_BOTTOM = D6D_YN, + D6D_LEFT = D6D_XN, +}; +/// Direction in the wallmounted format. +/// P is Positive, N is Negative. +enum DirectionWallmounted { + DWM_YP, + DWM_YN, + DWM_XP, + DWM_XN, + DWM_ZP, + DWM_ZN, +}; + +#endif