the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3class Direction
4{
5public:
6 static const int UNDEFINED = -1;
7 static const int SOUTH = 0;
8 static const int WEST = 1;
9 static const int NORTH = 2;
10 static const int EAST = 3;
11
12 static const int STEP_X[];
13 static const int STEP_Z[];
14
15 static const wstring NAMES[];;
16
17 // for [direction] it gives [tile-face]
18 static int DIRECTION_FACING[];
19
20 // for [facing] it gives [direction]
21 static int FACING_DIRECTION[];
22
23 // for [direction] it gives [opposite direction]
24 static int DIRECTION_OPPOSITE[];
25
26 // for [direction] it gives [90 degrees clockwise direction]
27 static int DIRECTION_CLOCKWISE[];
28
29 // for [direction] it gives [90 degrees counter-clockwise direction]
30 static int DIRECTION_COUNTER_CLOCKWISE[];
31
32 // for [direction][world-facing] it gives [tile-facing]
33 static int RELATIVE_DIRECTION_FACING[4][6];
34
35 static int getDirection(double xd, double zd);
36 static int getDirection(int x0, int z0, int x1, int z1);
37};