From 01b8ed5295875262a91b60af878bf2a18c1b7aae Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 3 Apr 2020 08:57:01 +0200 Subject: Pulled the BlockID and BlockInfo headers from Globals.h. (#4591) The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change) The BlockInfo.h file was removed from Globals.h (main change) The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics) The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor) Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header. That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified. eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values --- src/Generating/Caves.cpp | 1 + src/Generating/ChunkGenerator.h | 1 + src/Generating/DungeonRoomsFinisher.cpp | 1 + src/Generating/FinishGen.cpp | 1 + src/Generating/Prefab.cpp | 1 + src/Generating/RoughRavines.cpp | 1 + src/Generating/StructGen.cpp | 1 + src/Generating/Trees.cpp | 1 + src/Generating/VillageGen.cpp | 1 + 9 files changed, 9 insertions(+) (limited to 'src/Generating') diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp index 240248b5a..193c75554 100644 --- a/src/Generating/Caves.cpp +++ b/src/Generating/Caves.cpp @@ -30,6 +30,7 @@ reduced in complexity in order for this generator to be useful, so the caves' sh #include "Globals.h" #include "Caves.h" +#include "../BlockInfo.h" diff --git a/src/Generating/ChunkGenerator.h b/src/Generating/ChunkGenerator.h index 5fe58c65a..52c9cd896 100644 --- a/src/Generating/ChunkGenerator.h +++ b/src/Generating/ChunkGenerator.h @@ -1,5 +1,6 @@ #pragma once +#include "../Defines.h" diff --git a/src/Generating/DungeonRoomsFinisher.cpp b/src/Generating/DungeonRoomsFinisher.cpp index 768dd27cf..c595a6451 100644 --- a/src/Generating/DungeonRoomsFinisher.cpp +++ b/src/Generating/DungeonRoomsFinisher.cpp @@ -5,6 +5,7 @@ #include "Globals.h" #include "DungeonRoomsFinisher.h" +#include "../BlockInfo.h" #include "../FastRandom.h" #include "../BlockEntities/ChestEntity.h" #include "../BlockEntities/MobSpawnerEntity.h" diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp index 7aece7219..5b328ec49 100644 --- a/src/Generating/FinishGen.cpp +++ b/src/Generating/FinishGen.cpp @@ -14,6 +14,7 @@ #include "../Simulator/FireSimulator.h" #include "../IniFile.h" #include "../MobSpawner.h" +#include "../BlockInfo.h" diff --git a/src/Generating/Prefab.cpp b/src/Generating/Prefab.cpp index 1f2b5c916..903ca8eab 100644 --- a/src/Generating/Prefab.cpp +++ b/src/Generating/Prefab.cpp @@ -10,6 +10,7 @@ uses a prefabricate in a cBlockArea for drawing itself. #include "Prefab.h" #include "../WorldStorage/SchematicFileSerializer.h" #include "ChunkDesc.h" +#include "../BlockInfo.h" diff --git a/src/Generating/RoughRavines.cpp b/src/Generating/RoughRavines.cpp index a9e9a97de..a65f57268 100644 --- a/src/Generating/RoughRavines.cpp +++ b/src/Generating/RoughRavines.cpp @@ -6,6 +6,7 @@ #include "Globals.h" #include "RoughRavines.h" +#include "../BlockInfo.h" diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp index d3bd6114e..0b45502a6 100644 --- a/src/Generating/StructGen.cpp +++ b/src/Generating/StructGen.cpp @@ -6,6 +6,7 @@ #include "Trees.h" #include "../BlockArea.h" #include "../LinearUpscale.h" +#include "../BlockInfo.h" diff --git a/src/Generating/Trees.cpp b/src/Generating/Trees.cpp index de6da5265..558b4619e 100644 --- a/src/Generating/Trees.cpp +++ b/src/Generating/Trees.cpp @@ -5,6 +5,7 @@ #include "Globals.h" #include "Trees.h" +#include "../BlockType.h" diff --git a/src/Generating/VillageGen.cpp b/src/Generating/VillageGen.cpp index c2693608d..340d9adb8 100644 --- a/src/Generating/VillageGen.cpp +++ b/src/Generating/VillageGen.cpp @@ -6,6 +6,7 @@ #include "Globals.h" #include "VillageGen.h" #include "PieceGeneratorBFSTree.h" +#include "../BlockInfo.h" -- cgit v1.2.3