From a78fd671b229b32b04a7abf9018edb7a6c08ccbe Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Fri, 25 Sep 2020 10:13:59 +0100 Subject: Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) * Removed BiomeDef.h * Removed ChunkDef.h from Globals.h * Added to CONTRIBUTORS. * Re-added empty last line to Globals.h * Included stddef and StringUtils in BiomeDef.h * Fixed build tools compiling. It compiles, but at what cost? * Added include to src/Generating/Trees.h * Include added in ChunkGeneratorThread.h * Moved rearranged includes in LineBlockTracer.cpp * Re-arrange headers in ChunkInterface.cpp * Included ChunkDef.h in Path.h * Included ChunkDef.h in NBTChunkSerializer.h * Rearranged included and added required includes to headers. * Removed unnecessary included in StringUtils.h. --- src/BiomeDef.cpp | 2 ++ src/BiomeDef.h | 4 ---- src/BlockEntities/BlockEntity.h | 2 +- src/BlockInfo.h | 1 + src/BlockTracer.h | 2 +- src/BlockType.h | 1 + src/Blocks/ChunkInterface.h | 2 +- src/ChunkData.h | 2 +- src/ChunkDef.h | 2 +- src/ChunkGeneratorThread.h | 2 +- src/ChunkStay.h | 2 +- src/Generating/ChunkGenerator.h | 2 +- src/Generating/IntGen.h | 1 + src/Generating/Trees.h | 2 +- src/Globals.h | 3 +-- src/Map.h | 2 +- src/Mobs/Path.h | 2 ++ src/OSSupport/File.h | 2 +- src/Root.h | 2 +- src/Scoreboard.h | 1 + src/Simulator/Simulator.h | 2 ++ src/StringUtils.h | 2 -- src/WorldStorage/NBTChunkSerializer.h | 2 +- src/WorldStorage/WorldStorage.h | 2 +- 24 files changed, 25 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/BiomeDef.cpp b/src/BiomeDef.cpp index f56d9c815..822b641ba 100644 --- a/src/BiomeDef.cpp +++ b/src/BiomeDef.cpp @@ -3,7 +3,9 @@ // Implements biome helper functions + #include "Globals.h" +#include "BiomeDef.h" diff --git a/src/BiomeDef.h b/src/BiomeDef.h index f8dea3e9f..a7b2b7e8a 100644 --- a/src/BiomeDef.h +++ b/src/BiomeDef.h @@ -9,10 +9,6 @@ #pragma once - - - - // tolua_begin /** Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft. diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h index 0d67bcef9..1933ed891 100644 --- a/src/BlockEntities/BlockEntity.h +++ b/src/BlockEntities/BlockEntity.h @@ -1,7 +1,7 @@ #pragma once - +#include "ChunkDef.h" diff --git a/src/BlockInfo.h b/src/BlockInfo.h index 01b5557d4..f35df90ae 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -1,6 +1,7 @@ #pragma once +#include "ChunkDef.h" diff --git a/src/BlockTracer.h b/src/BlockTracer.h index 46b588771..434058bbc 100644 --- a/src/BlockTracer.h +++ b/src/BlockTracer.h @@ -14,7 +14,7 @@ #include "Defines.h" - +#include "ChunkDef.h" diff --git a/src/BlockType.h b/src/BlockType.h index 50422b346..95207dbee 100644 --- a/src/BlockType.h +++ b/src/BlockType.h @@ -1,5 +1,6 @@ #pragma once +#include "ChunkDef.h" // tolua_begin diff --git a/src/Blocks/ChunkInterface.h b/src/Blocks/ChunkInterface.h index 3017df8ab..a8ebb7a41 100644 --- a/src/Blocks/ChunkInterface.h +++ b/src/Blocks/ChunkInterface.h @@ -3,7 +3,7 @@ #include "../ForEachChunkProvider.h" #include "../FunctionRef.h" - +#include "ChunkDef.h" diff --git a/src/ChunkData.h b/src/ChunkData.h index 95a38b194..3b4c9c867 100644 --- a/src/ChunkData.h +++ b/src/ChunkData.h @@ -13,7 +13,7 @@ #include #include "AllocationPool.h" - +#include "ChunkDef.h" class cChunkData diff --git a/src/ChunkDef.h b/src/ChunkDef.h index 82e7e518e..b77eec38f 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -9,7 +9,7 @@ #pragma once - +#include "BiomeDef.h" diff --git a/src/ChunkGeneratorThread.h b/src/ChunkGeneratorThread.h index 7d47549d3..e6d1cff7b 100644 --- a/src/ChunkGeneratorThread.h +++ b/src/ChunkGeneratorThread.h @@ -1,7 +1,7 @@ #pragma once #include "OSSupport/IsThread.h" - +#include "ChunkDef.h" diff --git a/src/ChunkStay.h b/src/ChunkStay.h index 59b6841a4..383d4d170 100644 --- a/src/ChunkStay.h +++ b/src/ChunkStay.h @@ -12,7 +12,7 @@ not unload #pragma once - +#include "ChunkDef.h" diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index 52c9cd896..5b9f2c0ac 100644 --- a/src/Generating/ChunkGenerator.h +++ b/src/Generating/ChunkGenerator.h @@ -1,7 +1,7 @@ #pragma once #include "../Defines.h" - +#include "ChunkDef.h" diff --git a/src/Generating/IntGen.h b/src/Generating/IntGen.h index 3b9f3b027..786c6099d 100644 --- a/src/Generating/IntGen.h +++ b/src/Generating/IntGen.h @@ -31,6 +31,7 @@ by using templates. #include #include "../Noise/Noise.h" +#include "BiomeDef.h" diff --git a/src/Generating/Trees.h b/src/Generating/Trees.h index c9fa0ec18..99a5c24f9 100644 --- a/src/Generating/Trees.h +++ b/src/Generating/Trees.h @@ -18,7 +18,7 @@ logs can overwrite others(leaves), but others shouldn't overwrite logs. This is #pragma once #include "../Noise/Noise.h" - +#include "../ChunkDef.h" // For sSetBlockVector diff --git a/src/Globals.h b/src/Globals.h index 7fc9addf6..192969fa5 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -355,5 +355,4 @@ auto ToUnsigned(T a_Val) // Common headers (part 2, with macros): #include "Vector3.h" -#include "BiomeDef.h" -#include "ChunkDef.h" + diff --git a/src/Map.h b/src/Map.h index 67c9a7dcd..7ae120c30 100644 --- a/src/Map.h +++ b/src/Map.h @@ -10,7 +10,7 @@ #pragma once #include "Defines.h" - +#include "ChunkDef.h" diff --git a/src/Mobs/Path.h b/src/Mobs/Path.h index 20834535b..90b2525f7 100644 --- a/src/Mobs/Path.h +++ b/src/Mobs/Path.h @@ -1,6 +1,8 @@ #pragma once +#include "ChunkDef.h" + /* // Needed Fwds: cPath enum class ePathFinderStatus; diff --git a/src/OSSupport/File.h b/src/OSSupport/File.h index b2099e9fd..62853ede7 100644 --- a/src/OSSupport/File.h +++ b/src/OSSupport/File.h @@ -28,7 +28,7 @@ For reading entire files into memory, just use the static cFile::ReadWholeFile() #pragma once - +#include "StringUtils.h" diff --git a/src/Root.h b/src/Root.h index 6ec8e5481..a117596df 100644 --- a/src/Root.h +++ b/src/Root.h @@ -8,7 +8,7 @@ #include "Protocol/Authenticator.h" #include "Protocol/MojangAPI.h" #include "RankManager.h" - +#include "ChunkDef.h" diff --git a/src/Scoreboard.h b/src/Scoreboard.h index 0e70a7654..c22ddfb28 100644 --- a/src/Scoreboard.h +++ b/src/Scoreboard.h @@ -12,6 +12,7 @@ #include "FunctionRef.h" +#include "ChunkDef.h" class cObjective; diff --git a/src/Simulator/Simulator.h b/src/Simulator/Simulator.h index 32a36213b..e386c0bcf 100644 --- a/src/Simulator/Simulator.h +++ b/src/Simulator/Simulator.h @@ -1,6 +1,8 @@ #pragma once +#include "ChunkDef.h" + class cWorld; class cChunk; class cCuboid; diff --git a/src/StringUtils.h b/src/StringUtils.h index 12cd06140..a8cd41090 100644 --- a/src/StringUtils.h +++ b/src/StringUtils.h @@ -8,8 +8,6 @@ #pragma once - - typedef std::string AString; typedef std::vector AStringVector; typedef std::list AStringList; diff --git a/src/WorldStorage/NBTChunkSerializer.h b/src/WorldStorage/NBTChunkSerializer.h index b14a58c40..aeac9fc46 100644 --- a/src/WorldStorage/NBTChunkSerializer.h +++ b/src/WorldStorage/NBTChunkSerializer.h @@ -2,7 +2,7 @@ #pragma once - +#include "ChunkDef.h" diff --git a/src/WorldStorage/WorldStorage.h b/src/WorldStorage/WorldStorage.h index dc4bb2e17..fd6cd59e1 100644 --- a/src/WorldStorage/WorldStorage.h +++ b/src/WorldStorage/WorldStorage.h @@ -14,7 +14,7 @@ #include "../OSSupport/IsThread.h" #include "../OSSupport/Queue.h" - +#include "ChunkDef.h" -- cgit v1.2.3