diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:57:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:57:47 +0100 |
commit | 3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch) | |
tree | c070350db219f2c4241d22bc31949685c7b42fe9 /src/util/directiontables.cpp | |
parent | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff) | |
parent | 6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff) | |
download | dragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/util/directiontables.cpp')
-rw-r--r-- | src/util/directiontables.cpp | 171 |
1 files changed, 91 insertions, 80 deletions
diff --git a/src/util/directiontables.cpp b/src/util/directiontables.cpp index fba432c15..296585f90 100644 --- a/src/util/directiontables.cpp +++ b/src/util/directiontables.cpp @@ -19,91 +19,102 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "directiontables.h" -const v3s16 g_6dirs[6] = { - // +right, +top, +back - v3s16(0, 0, 1), // back - v3s16(0, 1, 0), // top - v3s16(1, 0, 0), // right - v3s16(0, 0, -1), // front - v3s16(0, -1, 0), // bottom - v3s16(-1, 0, 0) // left +const v3s16 g_6dirs[6] = +{ + // +right, +top, +back + v3s16( 0, 0, 1), // back + v3s16( 0, 1, 0), // top + v3s16( 1, 0, 0), // right + v3s16( 0, 0,-1), // front + v3s16( 0,-1, 0), // bottom + v3s16(-1, 0, 0) // left }; -const v3s16 g_7dirs[7] = { - v3s16(0, 0, 1), // back - v3s16(0, 1, 0), // top - v3s16(1, 0, 0), // right - v3s16(0, 0, -1), // front - v3s16(0, -1, 0), // bottom - v3s16(-1, 0, 0), // left - v3s16(0, 0, 0), // self +const v3s16 g_7dirs[7] = +{ + v3s16(0,0,1), // back + v3s16(0,1,0), // top + v3s16(1,0,0), // right + v3s16(0,0,-1), // front + v3s16(0,-1,0), // bottom + v3s16(-1,0,0), // left + v3s16(0,0,0), // self }; -const v3s16 g_26dirs[26] = { - // +right, +top, +back - v3s16(0, 0, 1), // back - v3s16(0, 1, 0), // top - v3s16(1, 0, 0), // right - v3s16(0, 0, -1), // front - v3s16(0, -1, 0), // bottom - v3s16(-1, 0, 0), // left - // 6 - v3s16(-1, 1, 0), // top left - v3s16(1, 1, 0), // top right - v3s16(0, 1, 1), // top back - v3s16(0, 1, -1), // top front - v3s16(-1, 0, 1), // back left - v3s16(1, 0, 1), // back right - v3s16(-1, 0, -1), // front left - v3s16(1, 0, -1), // front right - v3s16(-1, -1, 0), // bottom left - v3s16(1, -1, 0), // bottom right - v3s16(0, -1, 1), // bottom back - v3s16(0, -1, -1), // bottom front - // 18 - v3s16(-1, 1, 1), // top back-left - v3s16(1, 1, 1), // top back-right - v3s16(-1, 1, -1), // top front-left - v3s16(1, 1, -1), // top front-right - v3s16(-1, -1, 1), // bottom back-left - v3s16(1, -1, 1), // bottom back-right - v3s16(-1, -1, -1), // bottom front-left - v3s16(1, -1, -1), // bottom front-right - // 26 +const v3s16 g_26dirs[26] = +{ + // +right, +top, +back + v3s16( 0, 0, 1), // back + v3s16( 0, 1, 0), // top + v3s16( 1, 0, 0), // right + v3s16( 0, 0,-1), // front + v3s16( 0,-1, 0), // bottom + v3s16(-1, 0, 0), // left + // 6 + v3s16(-1, 1, 0), // top left + v3s16( 1, 1, 0), // top right + v3s16( 0, 1, 1), // top back + v3s16( 0, 1,-1), // top front + v3s16(-1, 0, 1), // back left + v3s16( 1, 0, 1), // back right + v3s16(-1, 0,-1), // front left + v3s16( 1, 0,-1), // front right + v3s16(-1,-1, 0), // bottom left + v3s16( 1,-1, 0), // bottom right + v3s16( 0,-1, 1), // bottom back + v3s16( 0,-1,-1), // bottom front + // 18 + v3s16(-1, 1, 1), // top back-left + v3s16( 1, 1, 1), // top back-right + v3s16(-1, 1,-1), // top front-left + v3s16( 1, 1,-1), // top front-right + v3s16(-1,-1, 1), // bottom back-left + v3s16( 1,-1, 1), // bottom back-right + v3s16(-1,-1,-1), // bottom front-left + v3s16( 1,-1,-1), // bottom front-right + // 26 }; -const v3s16 g_27dirs[27] = { - // +right, +top, +back - v3s16(0, 0, 1), // back - v3s16(0, 1, 0), // top - v3s16(1, 0, 0), // right - v3s16(0, 0, -1), // front - v3s16(0, -1, 0), // bottom - v3s16(-1, 0, 0), // left - // 6 - v3s16(-1, 1, 0), // top left - v3s16(1, 1, 0), // top right - v3s16(0, 1, 1), // top back - v3s16(0, 1, -1), // top front - v3s16(-1, 0, 1), // back left - v3s16(1, 0, 1), // back right - v3s16(-1, 0, -1), // front left - v3s16(1, 0, -1), // front right - v3s16(-1, -1, 0), // bottom left - v3s16(1, -1, 0), // bottom right - v3s16(0, -1, 1), // bottom back - v3s16(0, -1, -1), // bottom front - // 18 - v3s16(-1, 1, 1), // top back-left - v3s16(1, 1, 1), // top back-right - v3s16(-1, 1, -1), // top front-left - v3s16(1, 1, -1), // top front-right - v3s16(-1, -1, 1), // bottom back-left - v3s16(1, -1, 1), // bottom back-right - v3s16(-1, -1, -1), // bottom front-left - v3s16(1, -1, -1), // bottom front-right - // 26 - v3s16(0, 0, 0), +const v3s16 g_27dirs[27] = +{ + // +right, +top, +back + v3s16( 0, 0, 1), // back + v3s16( 0, 1, 0), // top + v3s16( 1, 0, 0), // right + v3s16( 0, 0,-1), // front + v3s16( 0,-1, 0), // bottom + v3s16(-1, 0, 0), // left + // 6 + v3s16(-1, 1, 0), // top left + v3s16( 1, 1, 0), // top right + v3s16( 0, 1, 1), // top back + v3s16( 0, 1,-1), // top front + v3s16(-1, 0, 1), // back left + v3s16( 1, 0, 1), // back right + v3s16(-1, 0,-1), // front left + v3s16( 1, 0,-1), // front right + v3s16(-1,-1, 0), // bottom left + v3s16( 1,-1, 0), // bottom right + v3s16( 0,-1, 1), // bottom back + v3s16( 0,-1,-1), // bottom front + // 18 + v3s16(-1, 1, 1), // top back-left + v3s16( 1, 1, 1), // top back-right + v3s16(-1, 1,-1), // top front-left + v3s16( 1, 1,-1), // top front-right + v3s16(-1,-1, 1), // bottom back-left + v3s16( 1,-1, 1), // bottom back-right + v3s16(-1,-1,-1), // bottom front-left + v3s16( 1,-1,-1), // bottom front-right + // 26 + v3s16(0,0,0), }; -const u8 wallmounted_to_facedir[6] = {20, 0, 16 + 1, 12 + 3, 8, 4 + 2}; +const u8 wallmounted_to_facedir[6] = { + 20, + 0, + 16 + 1, + 12 + 3, + 8, + 4 + 2 +}; |