From b5f7249a7edc25077d84b27b38552228b92ff763 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 19 Aug 2017 09:12:54 +0200 Subject: Code modernization: src/m* (part 2) * empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function --- src/util/directiontables.cpp | 11 +++++++++++ src/util/directiontables.h | 2 ++ 2 files changed, 13 insertions(+) (limited to 'src/util') diff --git a/src/util/directiontables.cpp b/src/util/directiontables.cpp index d6c154842..587b0caf7 100644 --- a/src/util/directiontables.cpp +++ b/src/util/directiontables.cpp @@ -30,6 +30,17 @@ const v3s16 g_6dirs[6] = 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_26dirs[26] = { // +right, +top, +back diff --git a/src/util/directiontables.h b/src/util/directiontables.h index ab5b63217..8464453bc 100644 --- a/src/util/directiontables.h +++ b/src/util/directiontables.h @@ -24,6 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc., extern const v3s16 g_6dirs[6]; +extern const v3s16 g_7dirs[7]; + extern const v3s16 g_26dirs[26]; // 26th is (0,0,0) -- cgit v1.2.3