From 1627e21c1debb40c6fa9c392dabcd8489d55dc87 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 6 May 2024 03:38:19 +0300 Subject: [PATCH] the final rename --- src/assets/Assets.cpp | 2 +- src/assets/AssetsLoader.cpp | 14 ++++---- src/assets/AssetsLoader.hpp | 4 +-- src/assets/assetload_funcs.cpp | 7 ++-- src/audio/AL/ALAudio.hpp | 2 +- src/audio/AL/alutil.hpp | 2 +- src/audio/audio.hpp | 2 +- src/coders/GLSLExtension.cpp | 6 ++-- src/coders/binary_json.cpp | 1 + src/coders/binary_json.hpp | 7 +++- src/coders/byte_utils.hpp | 2 +- src/coders/commons.hpp | 9 +++--- src/coders/gzip.hpp | 2 +- src/coders/json.cpp | 8 ++--- src/coders/{json.h => json.hpp} | 8 ++--- src/coders/ogg.cpp | 2 +- src/coders/png.cpp | 2 +- src/coders/rle.hpp | 2 +- src/coders/toml.cpp | 2 +- src/{constants.h => constants.hpp} | 9 +++--- src/content/Content.cpp | 10 +++--- src/content/{Content.h => Content.hpp} | 10 +++--- src/content/ContentLUT.cpp | 14 ++++---- src/content/ContentLUT.hpp | 6 ++-- src/content/ContentLoader.cpp | 20 ++++++------ .../{ContentLoader.h => ContentLoader.hpp} | 8 ++--- src/content/ContentPack.cpp | 10 +++--- .../{ContentPack.h => ContentPack.hpp} | 8 ++--- src/content/PacksManager.hpp | 2 +- src/core_defs.cpp | 6 ++-- src/data/dynamic.cpp | 2 +- src/data/{dynamic.h => dynamic.hpp} | 9 +++--- src/data/setting.hpp | 10 +++--- src/{delegates.h => delegates.hpp} | 6 ++-- src/engine.cpp | 16 +++++----- src/{engine.h => engine.hpp} | 18 +++++------ src/files/WorldConverter.cpp | 12 +++---- .../{WorldConverter.h => WorldConverter.hpp} | 10 +++--- src/files/WorldFiles.cpp | 32 +++++++++---------- src/files/{WorldFiles.h => WorldFiles.hpp} | 16 +++++----- src/files/WorldRegions.cpp | 9 +++--- src/files/WorldRegions.hpp | 6 ++-- src/files/engine_paths.cpp | 6 ++-- .../{engine_paths.h => engine_paths.hpp} | 8 ++--- src/files/files.cpp | 6 ++-- src/files/{files.h => files.hpp} | 8 ++--- src/files/settings_io.cpp | 4 +-- src/files/settings_io.hpp | 2 +- src/frontend/ContentGfxCache.cpp | 6 ++-- src/frontend/ContentGfxCache.hpp | 2 +- src/frontend/LevelFrontend.cpp | 10 +++--- src/frontend/UiDocument.cpp | 4 +-- src/frontend/UiDocument.hpp | 2 +- src/frontend/debug_panel.cpp | 18 +++++------ src/frontend/hud.cpp | 32 +++++++++---------- src/frontend/hud.hpp | 2 +- src/frontend/locale.cpp | 8 ++--- src/frontend/locale.hpp | 2 +- src/frontend/menu.cpp | 12 +++---- src/frontend/screens/LevelScreen.cpp | 14 ++++---- src/frontend/screens/MenuScreen.cpp | 2 +- src/frontend/screens/Screen.cpp | 2 +- src/graphics/core/Atlas.hpp | 2 +- src/graphics/core/Batch3D.cpp | 2 +- src/graphics/core/Batch3D.hpp | 2 +- src/graphics/core/DrawContext.hpp | 2 +- src/graphics/core/Font.hpp | 2 +- src/graphics/core/Framebuffer.hpp | 2 +- src/graphics/core/ImageData.hpp | 2 +- src/graphics/core/Mesh.hpp | 2 +- src/graphics/core/PostProcessing.cpp | 2 +- .../{PostProcessing.h => PostProcessing.hpp} | 0 src/graphics/core/Shader.hpp | 2 +- src/graphics/core/Texture.hpp | 2 +- src/graphics/core/TextureAnimation.hpp | 2 +- src/graphics/core/Viewport.hpp | 2 +- src/graphics/render/BlocksPreview.cpp | 6 ++-- src/graphics/render/BlocksPreview.hpp | 2 +- src/graphics/render/BlocksRenderer.cpp | 16 +++++----- src/graphics/render/BlocksRenderer.hpp | 4 +-- src/graphics/render/ChunksRenderer.cpp | 6 ++-- src/graphics/render/ChunksRenderer.hpp | 4 +-- src/graphics/render/Skybox.hpp | 4 +-- src/graphics/render/WorldRenderer.cpp | 32 +++++++++---------- src/graphics/ui/GUI.hpp | 2 +- src/graphics/ui/elements/InventoryView.cpp | 20 ++++++------ src/graphics/ui/elements/InventoryView.hpp | 10 +++--- src/graphics/ui/elements/Plotter.hpp | 2 +- src/graphics/ui/elements/UINode.hpp | 8 ++--- src/graphics/ui/gui_util.cpp | 4 +-- src/graphics/ui/gui_util.hpp | 4 +-- src/graphics/ui/gui_xml.cpp | 6 ++-- src/interfaces/{Object.h => Object.hpp} | 6 ++-- .../{Serializable.h => Serializable.hpp} | 9 +++--- src/interfaces/Task.hpp | 2 +- src/items/Inventories.cpp | 6 ++-- src/items/{Inventories.h => Inventories.hpp} | 10 +++--- src/items/Inventory.cpp | 3 +- src/items/{Inventory.h => Inventory.hpp} | 19 ++++++----- src/items/ItemDef.cpp | 2 +- src/items/{ItemDef.h => ItemDef.hpp} | 8 ++--- src/items/ItemStack.cpp | 6 ++-- src/items/{ItemStack.h => ItemStack.hpp} | 10 +++--- src/lighting/LightSolver.cpp | 14 ++++---- .../{LightSolver.h => LightSolver.hpp} | 6 ++-- src/lighting/Lighting.cpp | 22 ++++++------- src/lighting/{Lighting.h => Lighting.hpp} | 8 ++--- src/lighting/Lightmap.cpp | 2 +- src/lighting/{Lightmap.h => Lightmap.hpp} | 10 +++--- src/logic/BlocksController.cpp | 28 ++++++++-------- ...locksController.h => BlocksController.hpp} | 10 +++--- src/logic/ChunksController.cpp | 32 +++++++++---------- ...hunksController.h => ChunksController.hpp} | 8 ++--- src/logic/EngineController.cpp | 12 +++---- src/logic/LevelController.cpp | 14 ++++---- ...{LevelController.h => LevelController.hpp} | 14 ++++---- src/logic/PlayerController.cpp | 30 ++++++++--------- ...layerController.h => PlayerController.hpp} | 10 +++--- src/logic/scripting/lua/LuaState.hpp | 4 +-- src/logic/scripting/lua/libaudio.cpp | 4 +-- src/logic/scripting/lua/libblock.cpp | 18 +++++------ src/logic/scripting/lua/libcore.cpp | 12 +++---- src/logic/scripting/lua/libfile.cpp | 8 ++--- src/logic/scripting/lua/libgui.cpp | 8 ++--- src/logic/scripting/lua/libhud.cpp | 18 +++++------ src/logic/scripting/lua/libinput.cpp | 4 +-- src/logic/scripting/lua/libinventory.cpp | 12 +++---- src/logic/scripting/lua/libitem.cpp | 6 ++-- src/logic/scripting/lua/libjson.cpp | 4 +-- src/logic/scripting/lua/libpack.cpp | 12 +++---- src/logic/scripting/lua/libplayer.cpp | 10 +++--- src/logic/scripting/lua/libtime.cpp | 4 +-- src/logic/scripting/lua/libworld.cpp | 10 +++--- src/logic/scripting/lua/lua_util.hpp | 6 ++-- src/logic/scripting/scripting.cpp | 28 ++++++++-------- .../scripting/{scripting.h => scripting.hpp} | 13 +++++--- src/logic/scripting/scripting_functional.cpp | 2 +- ..._functional.h => scripting_functional.hpp} | 10 +++--- src/logic/scripting/scripting_hud.cpp | 8 ++--- src/logic/scripting/scripting_hud.hpp | 2 +- src/maths/{aabb.h => aabb.hpp} | 6 ++-- src/maths/{fastmaths.h => fastmaths.hpp} | 8 ++--- src/maths/rays.cpp | 4 +-- src/maths/{rays.h => rays.hpp} | 9 +++--- src/maths/{util.h => util.hpp} | 6 ++-- src/maths/{voxmaths.h => voxmaths.hpp} | 8 ++--- src/objects/Player.cpp | 12 +++---- src/objects/{Player.h => Player.hpp} | 18 +++++------ src/physics/Hitbox.cpp | 2 +- src/physics/{Hitbox.h => Hitbox.hpp} | 6 ++-- src/physics/PhysicsSolver.cpp | 12 +++---- .../{PhysicsSolver.h => PhysicsSolver.hpp} | 10 +++--- src/{settings.h => settings.hpp} | 10 +++--- src/{typedefs.h => typedefs.hpp} | 6 ++-- src/util/BufferPool.hpp | 2 +- src/util/RunnablesList.hpp | 4 +-- src/util/ThreadPool.hpp | 8 ++--- src/util/command_line.hpp | 2 +- src/util/data_io.hpp | 2 +- src/util/listutil.hpp | 6 ++-- src/util/platform.cpp | 8 ++--- src/util/stringutil.hpp | 2 +- src/util/timeutil.cpp | 4 +-- src/util/{timeutil.h => timeutil.hpp} | 8 ++--- src/voxel_engine.cpp | 6 ++-- src/voxels/Block.cpp | 2 +- src/voxels/{Block.h => Block.hpp} | 10 +++--- src/voxels/Chunk.cpp | 8 ++--- src/voxels/{Chunk.h => Chunk.hpp} | 12 +++---- src/voxels/Chunks.cpp | 24 +++++++------- src/voxels/{Chunks.h => Chunks.hpp} | 8 ++--- src/voxels/ChunksStorage.cpp | 24 +++++++------- .../{ChunksStorage.h => ChunksStorage.hpp} | 10 +++--- src/voxels/DefaultWorldGenerator.cpp | 14 ++++---- ...dGenerator.h => DefaultWorldGenerator.hpp} | 10 +++--- src/voxels/FlatWorldGenerator.cpp | 8 ++--- ...orldGenerator.h => FlatWorldGenerator.hpp} | 10 +++--- src/voxels/VoxelsVolume.cpp | 2 +- .../{VoxelsVolume.h => VoxelsVolume.hpp} | 12 +++---- src/voxels/WorldGenerator.cpp | 12 +++---- .../{WorldGenerator.h => WorldGenerator.hpp} | 8 ++--- src/voxels/voxel.cpp | 2 +- src/voxels/{voxel.h => voxel.hpp} | 8 ++--- src/window/Events.cpp | 4 +-- src/window/Events.hpp | 2 +- src/window/Window.cpp | 2 +- src/window/Window.hpp | 2 +- src/world/Level.cpp | 26 +++++++-------- src/world/{Level.h => Level.hpp} | 10 +++--- src/world/LevelEvents.cpp | 6 ++-- src/world/LevelEvents.h | 23 ------------- src/world/LevelEvents.hpp | 23 +++++++++++++ src/world/World.cpp | 20 ++++++------ src/world/{World.h => World.hpp} | 19 +++++------ src/world/WorldGenerators.cpp | 8 ++--- ...{WorldGenerators.h => WorldGenerators.hpp} | 10 +++--- 196 files changed, 836 insertions(+), 815 deletions(-) rename src/coders/{json.h => json.hpp} (85%) rename src/{constants.h => constants.hpp} (91%) rename src/content/{Content.h => Content.hpp} (92%) rename src/content/{ContentLoader.h => ContentLoader.hpp} (83%) rename src/content/{ContentPack.h => ContentPack.hpp} (91%) rename src/data/{dynamic.h => dynamic.hpp} (97%) rename src/{delegates.h => delegates.hpp} (91%) rename src/{engine.h => engine.hpp} (90%) rename src/files/{WorldConverter.h => WorldConverter.hpp} (89%) rename src/files/{WorldFiles.h => WorldFiles.hpp} (86%) rename src/files/{engine_paths.h => engine_paths.hpp} (88%) rename src/files/{files.h => files.hpp} (95%) rename src/graphics/core/{PostProcessing.h => PostProcessing.hpp} (100%) rename src/interfaces/{Object.h => Object.hpp} (84%) rename src/interfaces/{Serializable.h => Serializable.hpp} (64%) rename src/items/{Inventories.h => Inventories.hpp} (82%) rename src/items/{Inventory.h => Inventory.hpp} (83%) rename src/items/{ItemDef.h => ItemDef.hpp} (88%) rename src/items/{ItemStack.h => ItemStack.hpp} (81%) rename src/lighting/{LightSolver.h => LightSolver.hpp} (82%) rename src/lighting/{Lighting.h => Lighting.hpp} (83%) rename src/lighting/{Lightmap.h => Lightmap.hpp} (94%) rename src/logic/{BlocksController.h => BlocksController.hpp} (87%) rename src/logic/{ChunksController.h => ChunksController.hpp} (83%) rename src/logic/{LevelController.h => LevelController.hpp} (78%) rename src/logic/{PlayerController.h => PlayerController.hpp} (93%) rename src/logic/scripting/{scripting.h => scripting.hpp} (90%) rename src/logic/scripting/{scripting_functional.h => scripting_functional.hpp} (85%) rename src/maths/{aabb.h => aabb.hpp} (95%) rename src/maths/{fastmaths.h => fastmaths.hpp} (72%) rename src/maths/{rays.h => rays.hpp} (93%) rename src/maths/{util.h => util.hpp} (89%) rename src/maths/{voxmaths.h => voxmaths.hpp} (88%) rename src/objects/{Player.h => Player.hpp} (85%) rename src/physics/{Hitbox.h => Hitbox.hpp} (70%) rename src/physics/{PhysicsSolver.h => PhysicsSolver.hpp} (80%) rename src/{settings.h => settings.hpp} (95%) rename src/{typedefs.h => typedefs.hpp} (91%) rename src/util/{timeutil.h => timeutil.hpp} (84%) rename src/voxels/{Block.h => Block.hpp} (97%) rename src/voxels/{Chunk.h => Chunk.hpp} (93%) rename src/voxels/{Chunks.h => Chunks.hpp} (94%) rename src/voxels/{ChunksStorage.h => ChunksStorage.hpp} (80%) rename src/voxels/{DefaultWorldGenerator.h => DefaultWorldGenerator.hpp} (53%) rename src/voxels/{FlatWorldGenerator.h => FlatWorldGenerator.hpp} (53%) rename src/voxels/{VoxelsVolume.h => VoxelsVolume.hpp} (80%) rename src/voxels/{WorldGenerator.h => WorldGenerator.hpp} (78%) rename src/voxels/{voxel.h => voxel.hpp} (84%) rename src/world/{Level.h => Level.hpp} (93%) delete mode 100644 src/world/LevelEvents.h create mode 100644 src/world/LevelEvents.hpp rename src/world/{World.h => World.hpp} (93%) rename src/world/{WorldGenerators.h => WorldGenerators.hpp} (76%) diff --git a/src/assets/Assets.cpp b/src/assets/Assets.cpp index 0f660aaf..d1c93360 100644 --- a/src/assets/Assets.cpp +++ b/src/assets/Assets.cpp @@ -6,7 +6,7 @@ #include "../graphics/core/Atlas.hpp" #include "../graphics/core/Font.hpp" #include "../frontend/UiDocument.hpp" -#include "../logic/scripting/scripting.h" +#include "../logic/scripting/scripting.hpp" Assets::~Assets() { } diff --git a/src/assets/AssetsLoader.cpp b/src/assets/AssetsLoader.cpp index ae11c779..4fb972c6 100644 --- a/src/assets/AssetsLoader.cpp +++ b/src/assets/AssetsLoader.cpp @@ -3,16 +3,16 @@ #include "Assets.hpp" #include "assetload_funcs.hpp" #include "../util/ThreadPool.hpp" -#include "../constants.h" -#include "../data/dynamic.h" +#include "../constants.hpp" +#include "../data/dynamic.hpp" #include "../debug/Logger.hpp" #include "../coders/imageio.hpp" -#include "../files/files.h" -#include "../files/engine_paths.h" -#include "../content/Content.h" -#include "../content/ContentPack.h" +#include "../files/files.hpp" +#include "../files/engine_paths.hpp" +#include "../content/Content.hpp" +#include "../content/ContentPack.hpp" #include "../graphics/core/Texture.hpp" -#include "../logic/scripting/scripting.h" +#include "../logic/scripting/scripting.hpp" #include #include diff --git a/src/assets/AssetsLoader.hpp b/src/assets/AssetsLoader.hpp index a3ff258f..ffb03c03 100644 --- a/src/assets/AssetsLoader.hpp +++ b/src/assets/AssetsLoader.hpp @@ -3,8 +3,8 @@ #include "Assets.hpp" #include "../interfaces/Task.hpp" -#include "../typedefs.h" -#include "../delegates.h" +#include "../typedefs.hpp" +#include "../delegates.hpp" #include #include diff --git a/src/assets/assetload_funcs.cpp b/src/assets/assetload_funcs.cpp index ea7ccea4..0d1aa152 100644 --- a/src/assets/assetload_funcs.cpp +++ b/src/assets/assetload_funcs.cpp @@ -2,11 +2,12 @@ #include "Assets.hpp" #include "AssetsLoader.hpp" +#include "../data/dynamic.hpp" #include "../audio/audio.hpp" -#include "../files/files.h" -#include "../files/engine_paths.h" +#include "../files/files.hpp" +#include "../files/engine_paths.hpp" #include "../coders/imageio.hpp" -#include "../coders/json.h" +#include "../coders/json.hpp" #include "../coders/GLSLExtension.hpp" #include "../graphics/core/Shader.hpp" #include "../graphics/core/Texture.hpp" diff --git a/src/audio/AL/ALAudio.hpp b/src/audio/AL/ALAudio.hpp index f4a5df1a..b1080cb1 100644 --- a/src/audio/AL/ALAudio.hpp +++ b/src/audio/AL/ALAudio.hpp @@ -2,7 +2,7 @@ #define SRC_AUDIO_AUDIO_HPP_ #include "../audio.hpp" -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/audio/AL/alutil.hpp b/src/audio/AL/alutil.hpp index 8c08248d..6ceccda4 100644 --- a/src/audio/AL/alutil.hpp +++ b/src/audio/AL/alutil.hpp @@ -1,7 +1,7 @@ #ifndef AUDIO_AUDIOUTIL_HPP_ #define AUDIO_AUDIOUTIL_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/audio/audio.hpp b/src/audio/audio.hpp index 42f19c2a..4a5ca9e0 100644 --- a/src/audio/audio.hpp +++ b/src/audio/audio.hpp @@ -1,7 +1,7 @@ #ifndef AUDIO_AUDIO_HPP_ #define AUDIO_AUDIO_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/coders/GLSLExtension.cpp b/src/coders/GLSLExtension.cpp index 15f0f5fa..84aece78 100644 --- a/src/coders/GLSLExtension.cpp +++ b/src/coders/GLSLExtension.cpp @@ -1,9 +1,9 @@ #include "GLSLExtension.hpp" #include "../util/stringutil.hpp" -#include "../typedefs.h" -#include "../files/files.h" -#include "../files/engine_paths.h" +#include "../typedefs.hpp" +#include "../files/files.hpp" +#include "../files/engine_paths.hpp" #include #include diff --git a/src/coders/binary_json.cpp b/src/coders/binary_json.cpp index 212bfa38..c6e7f533 100644 --- a/src/coders/binary_json.cpp +++ b/src/coders/binary_json.cpp @@ -2,6 +2,7 @@ #include "gzip.hpp" #include "byte_utils.hpp" +#include "../data/dynamic.hpp" #include diff --git a/src/coders/binary_json.hpp b/src/coders/binary_json.hpp index 06308e12..0c3056bb 100644 --- a/src/coders/binary_json.hpp +++ b/src/coders/binary_json.hpp @@ -1,9 +1,14 @@ #ifndef CODERS_BINARY_JSON_HPP_ #define CODERS_BINARY_JSON_HPP_ +#include "../typedefs.hpp" + #include #include -#include "../data/dynamic.h" + +namespace dynamic { + class Map; +} namespace json { const int BJSON_END = 0x0; diff --git a/src/coders/byte_utils.hpp b/src/coders/byte_utils.hpp index 8eef1943..068170af 100644 --- a/src/coders/byte_utils.hpp +++ b/src/coders/byte_utils.hpp @@ -1,7 +1,7 @@ #ifndef CODERS_BYTE_UTILS_HPP_ #define CODERS_BYTE_UTILS_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/coders/commons.hpp b/src/coders/commons.hpp index 68fb4427..dc1998eb 100644 --- a/src/coders/commons.hpp +++ b/src/coders/commons.hpp @@ -1,9 +1,10 @@ -#ifndef CODERS_COMMONS_H_ -#define CODERS_COMMONS_H_ +#ifndef CODERS_COMMONS_HPP_ +#define CODERS_COMMONS_HPP_ + +#include "../typedefs.hpp" #include #include -#include "../typedefs.h" inline int is_box(int c) { switch (c) { @@ -102,4 +103,4 @@ public: BasicParser(const std::string& file, const std::string& source); }; -#endif // CODERS_COMMONS_H_ +#endif // CODERS_COMMONS_HPP_ diff --git a/src/coders/gzip.hpp b/src/coders/gzip.hpp index a7758a6e..d7b3e944 100644 --- a/src/coders/gzip.hpp +++ b/src/coders/gzip.hpp @@ -1,7 +1,7 @@ #ifndef CODERS_GZIP_HPP_ #define CODERS_GZIP_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include namespace gzip { diff --git a/src/coders/json.cpp b/src/coders/json.cpp index 508ec683..1bb64776 100644 --- a/src/coders/json.cpp +++ b/src/coders/json.cpp @@ -1,13 +1,13 @@ -#include "json.h" +#include "json.hpp" + +#include "../data/dynamic.hpp" +#include "../util/stringutil.hpp" #include #include #include #include -#include "../data/dynamic.h" -#include "../util/stringutil.hpp" - using namespace json; using namespace dynamic; diff --git a/src/coders/json.h b/src/coders/json.hpp similarity index 85% rename from src/coders/json.h rename to src/coders/json.hpp index 14fe958d..95b3a942 100644 --- a/src/coders/json.h +++ b/src/coders/json.hpp @@ -1,10 +1,10 @@ -#ifndef CODERS_JSON_H_ -#define CODERS_JSON_H_ +#ifndef CODERS_JSON_HPP_ +#define CODERS_JSON_HPP_ #include "commons.hpp" #include "binary_json.hpp" -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include @@ -38,4 +38,4 @@ namespace json { const std::string& indent); } -#endif // CODERS_JSON_H_ +#endif // CODERS_JSON_HPP_ diff --git a/src/coders/ogg.cpp b/src/coders/ogg.cpp index 88262309..f2fd629f 100644 --- a/src/coders/ogg.cpp +++ b/src/coders/ogg.cpp @@ -2,7 +2,7 @@ #include "../debug/Logger.hpp" #include "../audio/audio.hpp" -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/coders/png.cpp b/src/coders/png.cpp index 5f98ced7..b3128fc8 100644 --- a/src/coders/png.cpp +++ b/src/coders/png.cpp @@ -2,7 +2,7 @@ #include "../graphics/core/ImageData.hpp" #include "../graphics/core/Texture.hpp" -#include "../files/files.h" +#include "../files/files.hpp" #include "../debug/Logger.hpp" #include diff --git a/src/coders/rle.hpp b/src/coders/rle.hpp index 60d75a04..9055296a 100644 --- a/src/coders/rle.hpp +++ b/src/coders/rle.hpp @@ -1,7 +1,7 @@ #ifndef CODERS_RLE_HPP_ #define CODERS_RLE_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" namespace rle { size_t encode(const ubyte* src, size_t length, ubyte* dst); diff --git a/src/coders/toml.cpp b/src/coders/toml.cpp index 48f3c740..10139285 100644 --- a/src/coders/toml.cpp +++ b/src/coders/toml.cpp @@ -2,7 +2,7 @@ #include "commons.hpp" #include "../data/setting.hpp" -#include "../data/dynamic.h" +#include "../data/dynamic.hpp" #include "../util/stringutil.hpp" #include "../files/settings_io.hpp" diff --git a/src/constants.h b/src/constants.hpp similarity index 91% rename from src/constants.h rename to src/constants.hpp index debd6a40..202d7ac5 100644 --- a/src/constants.h +++ b/src/constants.hpp @@ -1,9 +1,10 @@ -#ifndef CONSTANTS_H_ -#define CONSTANTS_H_ +#ifndef CONSTANTS_HPP_ +#define CONSTANTS_HPP_ + +#include "typedefs.hpp" #include #include -#include "typedefs.h" inline constexpr int ENGINE_VERSION_MAJOR = 0; inline constexpr int ENGINE_VERSION_MINOR = 21; @@ -49,4 +50,4 @@ inline const std::string FONTS_FOLDER = "fonts"; inline const std::string LAYOUTS_FOLDER = "layouts"; inline const std::string SOUNDS_FOLDER = "sounds"; -#endif // CONSTANTS_H_ +#endif // CONSTANTS_HPP_ diff --git a/src/content/Content.cpp b/src/content/Content.cpp index 7e2f41ec..df9e4d3f 100644 --- a/src/content/Content.cpp +++ b/src/content/Content.cpp @@ -1,14 +1,14 @@ -#include "Content.h" +#include "Content.hpp" #include #include #include -#include "../voxels/Block.h" -#include "../items/ItemDef.h" +#include "../voxels/Block.hpp" +#include "../items/ItemDef.hpp" -#include "ContentPack.h" -#include "../logic/scripting/scripting.h" +#include "ContentPack.hpp" +#include "../logic/scripting/scripting.hpp" ContentBuilder::~ContentBuilder() {} diff --git a/src/content/Content.h b/src/content/Content.hpp similarity index 92% rename from src/content/Content.h rename to src/content/Content.hpp index 1f921010..dcf3c56f 100644 --- a/src/content/Content.h +++ b/src/content/Content.hpp @@ -1,5 +1,5 @@ -#ifndef CONTENT_CONTENT_H_ -#define CONTENT_CONTENT_H_ +#ifndef CONTENT_CONTENT_HPP_ +#define CONTENT_CONTENT_HPP_ #include #include @@ -7,8 +7,8 @@ #include #include #include -#include "../typedefs.h" -#include "../voxels/Block.h" +#include "../typedefs.hpp" +#include "../voxels/Block.hpp" using DrawGroups = std::set; @@ -146,4 +146,4 @@ public: const std::unordered_map>& getPacks() const; }; -#endif // CONTENT_CONTENT_H_ +#endif // CONTENT_CONTENT_HPP_ diff --git a/src/content/ContentLUT.cpp b/src/content/ContentLUT.cpp index c671107c..6e76642c 100644 --- a/src/content/ContentLUT.cpp +++ b/src/content/ContentLUT.cpp @@ -1,12 +1,12 @@ #include "ContentLUT.hpp" -#include "Content.h" -#include "../constants.h" -#include "../files/files.h" -#include "../coders/json.h" -#include "../voxels/Block.h" -#include "../items/ItemDef.h" -#include "../data/dynamic.h" +#include "Content.hpp" +#include "../constants.hpp" +#include "../files/files.hpp" +#include "../coders/json.hpp" +#include "../voxels/Block.hpp" +#include "../items/ItemDef.hpp" +#include "../data/dynamic.hpp" #include diff --git a/src/content/ContentLUT.hpp b/src/content/ContentLUT.hpp index 7df0f3c4..399ad36f 100644 --- a/src/content/ContentLUT.hpp +++ b/src/content/ContentLUT.hpp @@ -1,10 +1,10 @@ #ifndef CONTENT_CONTENT_LUT_HPP_ #define CONTENT_CONTENT_LUT_HPP_ -#include "Content.h" +#include "Content.hpp" -#include "../typedefs.h" -#include "../constants.h" +#include "../typedefs.hpp" +#include "../constants.hpp" #include #include diff --git a/src/content/ContentLoader.cpp b/src/content/ContentLoader.cpp index 7e76057e..f6c53242 100644 --- a/src/content/ContentLoader.cpp +++ b/src/content/ContentLoader.cpp @@ -1,17 +1,17 @@ -#include "ContentLoader.h" +#include "ContentLoader.hpp" -#include "Content.h" -#include "ContentPack.h" -#include "../coders/json.h" +#include "Content.hpp" +#include "ContentPack.hpp" +#include "../coders/json.hpp" #include "../core_defs.hpp" -#include "../data/dynamic.h" +#include "../data/dynamic.hpp" #include "../debug/Logger.hpp" -#include "../files/files.h" -#include "../items/ItemDef.h" -#include "../logic/scripting/scripting.h" -#include "../typedefs.h" +#include "../files/files.hpp" +#include "../items/ItemDef.hpp" +#include "../logic/scripting/scripting.hpp" +#include "../typedefs.hpp" #include "../util/listutil.hpp" -#include "../voxels/Block.h" +#include "../voxels/Block.hpp" #include #include diff --git a/src/content/ContentLoader.h b/src/content/ContentLoader.hpp similarity index 83% rename from src/content/ContentLoader.h rename to src/content/ContentLoader.hpp index df968565..d709f0d0 100644 --- a/src/content/ContentLoader.h +++ b/src/content/ContentLoader.hpp @@ -1,7 +1,7 @@ -#ifndef CONTENT_CONTENT_LOADER_H_ -#define CONTENT_CONTENT_LOADER_H_ +#ifndef CONTENT_CONTENT_LOADER_HPP_ +#define CONTENT_CONTENT_LOADER_HPP_ -#include "../voxels/Block.h" +#include "../voxels/Block.hpp" #include #include @@ -38,4 +38,4 @@ public: void load(ContentBuilder& builder); }; -#endif // CONTENT_CONTENT_LOADER_H_ +#endif // CONTENT_CONTENT_LOADER_HPP_ diff --git a/src/content/ContentPack.cpp b/src/content/ContentPack.cpp index 2cd2fc72..a054e426 100644 --- a/src/content/ContentPack.cpp +++ b/src/content/ContentPack.cpp @@ -1,12 +1,12 @@ -#include "ContentPack.h" +#include "ContentPack.hpp" #include #include -#include "../coders/json.h" -#include "../files/files.h" -#include "../files/engine_paths.h" -#include "../data/dynamic.h" +#include "../coders/json.hpp" +#include "../files/files.hpp" +#include "../files/engine_paths.hpp" +#include "../data/dynamic.hpp" namespace fs = std::filesystem; diff --git a/src/content/ContentPack.h b/src/content/ContentPack.hpp similarity index 91% rename from src/content/ContentPack.h rename to src/content/ContentPack.hpp index 8571b34f..d8790b8b 100644 --- a/src/content/ContentPack.h +++ b/src/content/ContentPack.hpp @@ -1,7 +1,7 @@ -#ifndef CONTENT_CONTENT_PACK_H_ -#define CONTENT_CONTENT_PACK_H_ +#ifndef CONTENT_CONTENT_PACK_HPP_ +#define CONTENT_CONTENT_PACK_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include @@ -116,4 +116,4 @@ public: } }; -#endif // CONTENT_CONTENT_PACK_H_ +#endif // CONTENT_CONTENT_PACK_HPP_ diff --git a/src/content/PacksManager.hpp b/src/content/PacksManager.hpp index f9f97f33..41c9c179 100644 --- a/src/content/PacksManager.hpp +++ b/src/content/PacksManager.hpp @@ -1,7 +1,7 @@ #ifndef CONTENT_PACKS_MANAGER_HPP_ #define CONTENT_PACKS_MANAGER_HPP_ -#include "ContentPack.h" +#include "ContentPack.hpp" #include #include diff --git a/src/core_defs.cpp b/src/core_defs.cpp index 5eb755cf..4a060ca2 100644 --- a/src/core_defs.cpp +++ b/src/core_defs.cpp @@ -1,11 +1,11 @@ #include "core_defs.hpp" -#include "items/ItemDef.h" -#include "content/Content.h" +#include "items/ItemDef.hpp" +#include "content/Content.hpp" #include "window/Window.hpp" #include "window/Events.hpp" #include "window/input.hpp" -#include "voxels/Block.h" +#include "voxels/Block.hpp" // All in-game definitions (blocks, items, etc..) void corecontent::setup(ContentBuilder* builder) { diff --git a/src/data/dynamic.cpp b/src/data/dynamic.cpp index 3f14d4da..89ed67ff 100644 --- a/src/data/dynamic.cpp +++ b/src/data/dynamic.cpp @@ -1,4 +1,4 @@ -#include "dynamic.h" +#include "dynamic.hpp" #include diff --git a/src/data/dynamic.h b/src/data/dynamic.hpp similarity index 97% rename from src/data/dynamic.h rename to src/data/dynamic.hpp index a2ed3399..7e9ef327 100644 --- a/src/data/dynamic.h +++ b/src/data/dynamic.hpp @@ -1,12 +1,13 @@ -#ifndef DATA_DYNAMIC_H_ -#define DATA_DYNAMIC_H_ +#ifndef DATA_DYNAMIC_HPP_ +#define DATA_DYNAMIC_HPP_ + +#include "../typedefs.hpp" #include #include #include #include #include -#include "../typedefs.h" namespace dynamic { class Map; @@ -129,4 +130,4 @@ namespace dynamic { }; } -#endif // DATA_DYNAMIC_H_ +#endif // DATA_DYNAMIC_HPP_ diff --git a/src/data/setting.hpp b/src/data/setting.hpp index ef563207..e0efffbd 100644 --- a/src/data/setting.hpp +++ b/src/data/setting.hpp @@ -1,13 +1,13 @@ -#ifndef DATA_SETTING_H_ -#define DATA_SETTING_H_ +#ifndef DATA_SETTING_HPP_ +#define DATA_SETTING_HPP_ #include #include #include #include -#include "../typedefs.h" -#include "../delegates.h" +#include "../typedefs.hpp" +#include "../delegates.hpp" enum class setting_format { simple, percent @@ -177,4 +177,4 @@ public: virtual std::string toString() const override; }; -#endif // DATA_SETTING_H_ +#endif // DATA_SETTING_HPP_ diff --git a/src/delegates.h b/src/delegates.hpp similarity index 91% rename from src/delegates.h rename to src/delegates.hpp index 0533ba98..fe1c95e6 100644 --- a/src/delegates.h +++ b/src/delegates.hpp @@ -1,5 +1,5 @@ -#ifndef DELEGATES_H_ -#define DELEGATES_H_ +#ifndef DELEGATES_HPP_ +#define DELEGATES_HPP_ #include #include @@ -22,4 +22,4 @@ using boolconsumer = std::function; using int_array_consumer = std::function; using wstringchecker = std::function; -#endif // DELEGATES_H_ +#endif // DELEGATES_HPP_ diff --git a/src/engine.cpp b/src/engine.cpp index c42875e0..2f38e9b0 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -1,4 +1,4 @@ -#include "engine.h" +#include "engine.hpp" #define GLEW_STATIC @@ -7,11 +7,11 @@ #include "audio/audio.hpp" #include "coders/GLSLExtension.hpp" #include "coders/imageio.hpp" -#include "coders/json.h" +#include "coders/json.hpp" #include "coders/toml.hpp" -#include "content/ContentLoader.h" +#include "content/ContentLoader.hpp" #include "core_defs.hpp" -#include "files/files.h" +#include "files/files.hpp" #include "files/settings_io.hpp" #include "frontend/locale.hpp" #include "frontend/menu.hpp" @@ -23,16 +23,16 @@ #include "graphics/core/Shader.hpp" #include "graphics/ui/GUI.hpp" #include "logic/EngineController.hpp" -#include "logic/scripting/scripting.h" +#include "logic/scripting/scripting.hpp" #include "util/listutil.hpp" #include "util/platform.hpp" -#include "voxels/DefaultWorldGenerator.h" -#include "voxels/FlatWorldGenerator.h" +#include "voxels/DefaultWorldGenerator.hpp" +#include "voxels/FlatWorldGenerator.hpp" #include "window/Camera.hpp" #include "window/Events.hpp" #include "window/input.hpp" #include "window/Window.hpp" -#include "world/WorldGenerators.h" +#include "world/WorldGenerators.hpp" #include #include diff --git a/src/engine.h b/src/engine.hpp similarity index 90% rename from src/engine.h rename to src/engine.hpp index a6ba1b8d..331864ed 100644 --- a/src/engine.h +++ b/src/engine.hpp @@ -1,15 +1,15 @@ -#ifndef SRC_ENGINE_H_ -#define SRC_ENGINE_H_ +#ifndef ENGINE_HPP_ +#define ENGINE_HPP_ -#include "delegates.h" -#include "settings.h" -#include "typedefs.h" +#include "delegates.hpp" +#include "settings.hpp" +#include "typedefs.hpp" #include "assets/Assets.hpp" -#include "content/Content.h" -#include "content/ContentPack.h" +#include "content/Content.hpp" +#include "content/ContentPack.hpp" #include "content/PacksManager.hpp" -#include "files/engine_paths.h" +#include "files/engine_paths.hpp" #include "util/ObjectsKeeper.hpp" #include @@ -142,4 +142,4 @@ public: SettingsHandler& getSettingsHandler(); }; -#endif // SRC_ENGINE_H_ +#endif // ENGINE_HPP_ diff --git a/src/files/WorldConverter.cpp b/src/files/WorldConverter.cpp index 698da4d2..37bc5cee 100644 --- a/src/files/WorldConverter.cpp +++ b/src/files/WorldConverter.cpp @@ -1,14 +1,14 @@ -#include "WorldConverter.h" +#include "WorldConverter.hpp" -#include "WorldFiles.h" +#include "WorldFiles.hpp" #include "../content/ContentLUT.hpp" -#include "../data/dynamic.h" +#include "../data/dynamic.hpp" #include "../debug/Logger.hpp" -#include "../files/files.h" -#include "../objects/Player.h" +#include "../files/files.hpp" +#include "../objects/Player.hpp" #include "../util/ThreadPool.hpp" -#include "../voxels/Chunk.h" +#include "../voxels/Chunk.hpp" #include #include diff --git a/src/files/WorldConverter.h b/src/files/WorldConverter.hpp similarity index 89% rename from src/files/WorldConverter.h rename to src/files/WorldConverter.hpp index b341fba4..4e6159e0 100644 --- a/src/files/WorldConverter.h +++ b/src/files/WorldConverter.hpp @@ -1,12 +1,12 @@ -#ifndef FILES_WORLD_CONVERTER_H_ -#define FILES_WORLD_CONVERTER_H_ +#ifndef FILES_WORLD_CONVERTER_HPP_ +#define FILES_WORLD_CONVERTER_HPP_ #include #include #include -#include "../typedefs.h" -#include "../delegates.h" +#include "../typedefs.hpp" +#include "../delegates.hpp" #include "../interfaces/Task.hpp" namespace fs = std::filesystem; @@ -63,4 +63,4 @@ public: ); }; -#endif // FILES_WORLD_CONVERTER_H_ +#endif // FILES_WORLD_CONVERTER_HPP_ diff --git a/src/files/WorldFiles.cpp b/src/files/WorldFiles.cpp index 86e44ef7..e92d8e62 100644 --- a/src/files/WorldFiles.cpp +++ b/src/files/WorldFiles.cpp @@ -1,24 +1,24 @@ -#include "WorldFiles.h" +#include "WorldFiles.hpp" #include "../coders/byte_utils.hpp" -#include "../coders/json.h" -#include "../constants.h" -#include "../content/Content.h" +#include "../coders/json.hpp" +#include "../constants.hpp" +#include "../content/Content.hpp" #include "../core_defs.hpp" -#include "../data/dynamic.h" -#include "../items/Inventory.h" -#include "../items/ItemDef.h" -#include "../lighting/Lightmap.h" -#include "../maths/voxmaths.h" -#include "../objects/Player.h" -#include "../physics/Hitbox.h" -#include "../typedefs.h" +#include "../data/dynamic.hpp" +#include "../items/Inventory.hpp" +#include "../items/ItemDef.hpp" +#include "../lighting/Lightmap.hpp" +#include "../maths/voxmaths.hpp" +#include "../objects/Player.hpp" +#include "../physics/Hitbox.hpp" +#include "../typedefs.hpp" #include "../util/data_io.hpp" -#include "../voxels/Block.h" -#include "../voxels/Chunk.h" -#include "../voxels/voxel.h" +#include "../voxels/Block.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/voxel.hpp" #include "../window/Camera.hpp" -#include "../world/World.h" +#include "../world/World.hpp" #include #include diff --git a/src/files/WorldFiles.h b/src/files/WorldFiles.hpp similarity index 86% rename from src/files/WorldFiles.h rename to src/files/WorldFiles.hpp index 985d9141..7247b246 100644 --- a/src/files/WorldFiles.h +++ b/src/files/WorldFiles.hpp @@ -1,13 +1,13 @@ -#ifndef FILES_WORLD_FILES_H_ -#define FILES_WORLD_FILES_H_ +#ifndef FILES_WORLD_FILES_HPP_ +#define FILES_WORLD_FILES_HPP_ #include "WorldRegions.hpp" -#include "files.h" -#include "../typedefs.h" -#include "../settings.h" -#include "../content/ContentPack.h" -#include "../voxels/Chunk.h" +#include "files.hpp" +#include "../typedefs.hpp" +#include "../settings.hpp" +#include "../content/ContentPack.hpp" +#include "../voxels/Chunk.hpp" #include #include @@ -73,4 +73,4 @@ public: } }; -#endif // FILES_WORLD_FILES_H_ +#endif // FILES_WORLD_FILES_HPP_ diff --git a/src/files/WorldRegions.cpp b/src/files/WorldRegions.cpp index b955d266..151e8914 100644 --- a/src/files/WorldRegions.cpp +++ b/src/files/WorldRegions.cpp @@ -1,10 +1,11 @@ #include "WorldRegions.hpp" -#include "../coders/rle.hpp" -#include "../util/data_io.hpp" #include "../coders/byte_utils.hpp" -#include "../maths/voxmaths.h" -#include "../items/Inventory.h" +#include "../coders/rle.hpp" +#include "../data/dynamic.hpp" +#include "../items/Inventory.hpp" +#include "../maths/voxmaths.hpp" +#include "../util/data_io.hpp" #include diff --git a/src/files/WorldRegions.hpp b/src/files/WorldRegions.hpp index 85d8a971..ae727c09 100644 --- a/src/files/WorldRegions.hpp +++ b/src/files/WorldRegions.hpp @@ -1,10 +1,10 @@ #ifndef FILES_WORLD_REGIONS_HPP_ #define FILES_WORLD_REGIONS_HPP_ -#include "files.h" -#include "../typedefs.h" +#include "files.hpp" +#include "../typedefs.hpp" #include "../util/BufferPool.hpp" -#include "../voxels/Chunk.h" +#include "../voxels/Chunk.hpp" #include #include diff --git a/src/files/engine_paths.cpp b/src/files/engine_paths.cpp index 9201cbbf..f14828b3 100644 --- a/src/files/engine_paths.cpp +++ b/src/files/engine_paths.cpp @@ -1,4 +1,4 @@ -#include "engine_paths.h" +#include "engine_paths.hpp" #include #include @@ -6,8 +6,8 @@ #include #include "../util/stringutil.hpp" -#include "../typedefs.h" -#include "WorldFiles.h" +#include "../typedefs.hpp" +#include "WorldFiles.hpp" const fs::path SCREENSHOTS_FOLDER {"screenshots"}; const fs::path CONTROLS_FILE {"controls.json"}; diff --git a/src/files/engine_paths.h b/src/files/engine_paths.hpp similarity index 88% rename from src/files/engine_paths.h rename to src/files/engine_paths.hpp index 046c4c74..41c57e6e 100644 --- a/src/files/engine_paths.h +++ b/src/files/engine_paths.hpp @@ -1,12 +1,12 @@ -#ifndef FILES_ENGINE_PATHS_H_ -#define FILES_ENGINE_PATHS_H_ +#ifndef FILES_ENGINE_PATHS_HPP_ +#define FILES_ENGINE_PATHS_HPP_ #include #include #include #include -#include "../content/ContentPack.h" +#include "../content/ContentPack.hpp" namespace fs = std::filesystem; @@ -58,4 +58,4 @@ public: const fs::path& getMainRoot() const; }; -#endif // FILES_ENGINE_PATHS_H_ +#endif // FILES_ENGINE_PATHS_HPP_ diff --git a/src/files/files.cpp b/src/files/files.cpp index c956b96e..3cfffe76 100644 --- a/src/files/files.cpp +++ b/src/files/files.cpp @@ -1,9 +1,9 @@ -#include "files.h" +#include "files.hpp" -#include "../coders/json.h" +#include "../coders/json.hpp" #include "../coders/gzip.hpp" #include "../util/stringutil.hpp" -#include "../data/dynamic.h" +#include "../data/dynamic.hpp" #include #include diff --git a/src/files/files.h b/src/files/files.hpp similarity index 95% rename from src/files/files.h rename to src/files/files.hpp index 5bf79a0a..87a6e3a8 100644 --- a/src/files/files.h +++ b/src/files/files.hpp @@ -1,12 +1,12 @@ -#ifndef FILES_FILES_H_ -#define FILES_FILES_H_ +#ifndef FILES_FILES_HPP_ +#define FILES_FILES_HPP_ #include #include #include #include #include -#include "../typedefs.h" +#include "../typedefs.hpp" namespace fs = std::filesystem; @@ -69,4 +69,4 @@ namespace files { std::vector read_list(fs::path file); } -#endif /* FILES_FILES_H_ */ +#endif /* FILES_FILES_HPP_ */ diff --git a/src/files/settings_io.cpp b/src/files/settings_io.cpp index 5559f363..2769c8fd 100644 --- a/src/files/settings_io.cpp +++ b/src/files/settings_io.cpp @@ -3,9 +3,9 @@ #include "../window/Events.hpp" #include "../window/input.hpp" #include "../coders/toml.hpp" -#include "../coders/json.h" +#include "../coders/json.hpp" #include "../debug/Logger.hpp" -#include "../settings.h" +#include "../settings.hpp" #include diff --git a/src/files/settings_io.hpp b/src/files/settings_io.hpp index 7630028c..2acfcea4 100644 --- a/src/files/settings_io.hpp +++ b/src/files/settings_io.hpp @@ -1,7 +1,7 @@ #ifndef FILES_SETTINGS_IO_HPP_ #define FILES_SETTINGS_IO_HPP_ -#include "../data/dynamic.h" +#include "../data/dynamic.hpp" #include #include diff --git a/src/frontend/ContentGfxCache.cpp b/src/frontend/ContentGfxCache.cpp index 5cfdea82..373e9730 100644 --- a/src/frontend/ContentGfxCache.cpp +++ b/src/frontend/ContentGfxCache.cpp @@ -3,12 +3,12 @@ #include "UiDocument.hpp" #include "../assets/Assets.hpp" -#include "../content/Content.h" -#include "../content/ContentPack.h" +#include "../content/Content.hpp" +#include "../content/ContentPack.hpp" #include "../core_defs.hpp" #include "../graphics/core/Atlas.hpp" #include "../maths/UVRegion.hpp" -#include "../voxels/Block.h" +#include "../voxels/Block.hpp" #include diff --git a/src/frontend/ContentGfxCache.hpp b/src/frontend/ContentGfxCache.hpp index 182e3296..f1f696d4 100644 --- a/src/frontend/ContentGfxCache.hpp +++ b/src/frontend/ContentGfxCache.hpp @@ -1,7 +1,7 @@ #ifndef FRONTEND_BLOCKS_GFX_CACHE_HPP_ #define FRONTEND_BLOCKS_GFX_CACHE_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include diff --git a/src/frontend/LevelFrontend.cpp b/src/frontend/LevelFrontend.cpp index 280b0c4a..d44df1d1 100644 --- a/src/frontend/LevelFrontend.cpp +++ b/src/frontend/LevelFrontend.cpp @@ -4,13 +4,13 @@ #include "../assets/Assets.hpp" #include "../audio/audio.hpp" -#include "../content/Content.h" +#include "../content/Content.hpp" #include "../graphics/core/Atlas.hpp" #include "../graphics/render/BlocksPreview.hpp" -#include "../logic/LevelController.h" -#include "../logic/PlayerController.h" -#include "../voxels/Block.h" -#include "../world/Level.h" +#include "../logic/LevelController.hpp" +#include "../logic/PlayerController.hpp" +#include "../voxels/Block.hpp" +#include "../world/Level.hpp" LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets) : level(controller->getLevel()), diff --git a/src/frontend/UiDocument.cpp b/src/frontend/UiDocument.cpp index d1e5f6e1..5cf09589 100644 --- a/src/frontend/UiDocument.cpp +++ b/src/frontend/UiDocument.cpp @@ -1,10 +1,10 @@ #include "UiDocument.hpp" -#include "../files/files.h" +#include "../files/files.hpp" #include "../graphics/ui/elements/UINode.hpp" #include "../graphics/ui/elements/InventoryView.hpp" #include "../graphics/ui/gui_xml.hpp" -#include "../logic/scripting/scripting.h" +#include "../logic/scripting/scripting.hpp" UiDocument::UiDocument( std::string id, diff --git a/src/frontend/UiDocument.hpp b/src/frontend/UiDocument.hpp index d2d38884..d45b8783 100644 --- a/src/frontend/UiDocument.hpp +++ b/src/frontend/UiDocument.hpp @@ -1,7 +1,7 @@ #ifndef FRONTEND_UI_DOCUMENT_HPP_ #define FRONTEND_UI_DOCUMENT_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/frontend/debug_panel.cpp b/src/frontend/debug_panel.cpp index 5223cda9..a967ccad 100644 --- a/src/frontend/debug_panel.cpp +++ b/src/frontend/debug_panel.cpp @@ -1,20 +1,20 @@ #include "../audio/audio.hpp" -#include "../delegates.h" -#include "../engine.h" +#include "../delegates.hpp" +#include "../engine.hpp" #include "../graphics/core/Mesh.hpp" #include "../graphics/ui/elements/CheckBox.hpp" #include "../graphics/ui/elements/TextBox.hpp" #include "../graphics/ui/elements/TrackBar.hpp" #include "../graphics/ui/elements/InputBindBox.hpp" #include "../graphics/render/WorldRenderer.hpp" -#include "../objects/Player.h" -#include "../physics/Hitbox.h" +#include "../objects/Player.hpp" +#include "../physics/Hitbox.hpp" #include "../util/stringutil.hpp" -#include "../voxels/Block.h" -#include "../voxels/Chunk.h" -#include "../voxels/Chunks.h" -#include "../world/Level.h" -#include "../world/World.h" +#include "../voxels/Block.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/Chunks.hpp" +#include "../world/Level.hpp" +#include "../world/World.hpp" #include #include diff --git a/src/frontend/hud.cpp b/src/frontend/hud.cpp index 1d5314ba..aa74a5c8 100644 --- a/src/frontend/hud.cpp +++ b/src/frontend/hud.cpp @@ -5,10 +5,10 @@ #include "UiDocument.hpp" #include "../assets/Assets.hpp" -#include "../content/Content.h" +#include "../content/Content.hpp" #include "../core_defs.hpp" -#include "../delegates.h" -#include "../engine.h" +#include "../delegates.hpp" +#include "../engine.hpp" #include "../graphics/core/Atlas.hpp" #include "../graphics/core/Batch2D.hpp" #include "../graphics/core/Batch3D.hpp" @@ -25,24 +25,24 @@ #include "../graphics/ui/elements/UINode.hpp" #include "../graphics/ui/gui_util.hpp" #include "../graphics/ui/GUI.hpp" -#include "../items/Inventories.h" -#include "../items/Inventory.h" -#include "../items/ItemDef.h" -#include "../logic/scripting/scripting.h" -#include "../maths/voxmaths.h" -#include "../objects/Player.h" -#include "../physics/Hitbox.h" -#include "../typedefs.h" +#include "../items/Inventories.hpp" +#include "../items/Inventory.hpp" +#include "../items/ItemDef.hpp" +#include "../logic/scripting/scripting.hpp" +#include "../maths/voxmaths.hpp" +#include "../objects/Player.hpp" +#include "../physics/Hitbox.hpp" +#include "../typedefs.hpp" #include "../util/stringutil.hpp" -#include "../voxels/Block.h" -#include "../voxels/Chunk.h" -#include "../voxels/Chunks.h" +#include "../voxels/Block.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/Chunks.hpp" #include "../window/Camera.hpp" #include "../window/Events.hpp" #include "../window/input.hpp" #include "../window/Window.hpp" -#include "../world/Level.h" -#include "../world/World.h" +#include "../world/Level.hpp" +#include "../world/World.hpp" #include #include diff --git a/src/frontend/hud.hpp b/src/frontend/hud.hpp index 2cf3f59b..e37d5876 100644 --- a/src/frontend/hud.hpp +++ b/src/frontend/hud.hpp @@ -1,7 +1,7 @@ #ifndef FRONTEND_HUD_HPP_ #define FRONTEND_HUD_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include "../util/ObjectsKeeper.hpp" #include diff --git a/src/frontend/locale.cpp b/src/frontend/locale.cpp index c92ec5d7..caeaedd6 100644 --- a/src/frontend/locale.cpp +++ b/src/frontend/locale.cpp @@ -1,11 +1,11 @@ #include "locale.hpp" -#include "../coders/json.h" +#include "../coders/json.hpp" #include "../coders/commons.hpp" -#include "../content/ContentPack.h" -#include "../files/files.h" +#include "../content/ContentPack.hpp" +#include "../files/files.hpp" #include "../util/stringutil.hpp" -#include "../data/dynamic.h" +#include "../data/dynamic.hpp" #include "../debug/Logger.hpp" static debug::Logger logger("locale"); diff --git a/src/frontend/locale.hpp b/src/frontend/locale.hpp index cd209afe..a7d357d5 100644 --- a/src/frontend/locale.hpp +++ b/src/frontend/locale.hpp @@ -1,7 +1,7 @@ #ifndef FRONTEND_LOCALES_HPP_ #define FRONTEND_LOCALES_HPP_ -#include "../content/ContentPack.h" +#include "../content/ContentPack.hpp" #include #include diff --git a/src/frontend/menu.cpp b/src/frontend/menu.cpp index 7f2ff3ca..c2b3e1aa 100644 --- a/src/frontend/menu.cpp +++ b/src/frontend/menu.cpp @@ -3,16 +3,16 @@ #include "locale.hpp" #include "UiDocument.hpp" -#include "../delegates.h" -#include "../engine.h" -#include "../data/dynamic.h" +#include "../delegates.hpp" +#include "../engine.hpp" +#include "../data/dynamic.hpp" #include "../interfaces/Task.hpp" -#include "../files/engine_paths.h" +#include "../files/engine_paths.hpp" #include "../graphics/ui/elements/Menu.hpp" #include "../graphics/ui/gui_util.hpp" #include "../graphics/ui/GUI.hpp" -#include "../logic/scripting/scripting.h" -#include "../settings.h" +#include "../logic/scripting/scripting.hpp" +#include "../settings.hpp" #include "../coders/commons.hpp" #include "../util/stringutil.hpp" #include "../window/Window.hpp" diff --git a/src/frontend/screens/LevelScreen.cpp b/src/frontend/screens/LevelScreen.cpp index 61d1ce84..10fed5e5 100644 --- a/src/frontend/screens/LevelScreen.cpp +++ b/src/frontend/screens/LevelScreen.cpp @@ -5,22 +5,22 @@ #include "../../debug/Logger.hpp" #include "../../audio/audio.hpp" #include "../../coders/imageio.hpp" -#include "../../graphics/core/PostProcessing.h" +#include "../../graphics/core/PostProcessing.hpp" #include "../../graphics/core/DrawContext.hpp" #include "../../graphics/core/Viewport.hpp" #include "../../graphics/core/ImageData.hpp" #include "../../graphics/ui/GUI.hpp" #include "../../graphics/ui/elements/Menu.hpp" #include "../../graphics/render/WorldRenderer.hpp" -#include "../../logic/LevelController.h" +#include "../../logic/LevelController.hpp" #include "../../logic/scripting/scripting_hud.hpp" -#include "../../physics/Hitbox.h" -#include "../../voxels/Chunks.h" -#include "../../world/Level.h" -#include "../../world/World.h" +#include "../../physics/Hitbox.hpp" +#include "../../voxels/Chunks.hpp" +#include "../../world/Level.hpp" +#include "../../world/World.hpp" #include "../../window/Camera.hpp" #include "../../window/Events.hpp" -#include "../../engine.h" +#include "../../engine.hpp" static debug::Logger logger("level-screen"); diff --git a/src/frontend/screens/MenuScreen.cpp b/src/frontend/screens/MenuScreen.cpp index f6ec4a4d..08d4f8a4 100644 --- a/src/frontend/screens/MenuScreen.cpp +++ b/src/frontend/screens/MenuScreen.cpp @@ -7,7 +7,7 @@ #include "../../graphics/core/Texture.hpp" #include "../../window/Window.hpp" #include "../../window/Camera.hpp" -#include "../../engine.h" +#include "../../engine.hpp" MenuScreen::MenuScreen(Engine* engine) : Screen(engine) { engine->resetContent(); diff --git a/src/frontend/screens/Screen.cpp b/src/frontend/screens/Screen.cpp index 9c0fc0da..2f68f4d2 100644 --- a/src/frontend/screens/Screen.cpp +++ b/src/frontend/screens/Screen.cpp @@ -1,7 +1,7 @@ #include "Screen.hpp" #include "../../graphics/core/Batch2D.hpp" -#include "../../engine.h" +#include "../../engine.hpp" Screen::Screen(Engine* engine) : engine(engine), batch(new Batch2D(1024)) { } diff --git a/src/graphics/core/Atlas.hpp b/src/graphics/core/Atlas.hpp index d43aef62..1136ad2d 100644 --- a/src/graphics/core/Atlas.hpp +++ b/src/graphics/core/Atlas.hpp @@ -7,7 +7,7 @@ #include #include #include "../../maths/UVRegion.hpp" -#include "../../typedefs.h" +#include "../../typedefs.hpp" class ImageData; class Texture; diff --git a/src/graphics/core/Batch3D.cpp b/src/graphics/core/Batch3D.cpp index 2f2aeea8..105c8623 100644 --- a/src/graphics/core/Batch3D.cpp +++ b/src/graphics/core/Batch3D.cpp @@ -4,7 +4,7 @@ #include "Texture.hpp" #include -#include "../../typedefs.h" +#include "../../typedefs.hpp" inline constexpr uint B3D_VERTEX_SIZE = 9; diff --git a/src/graphics/core/Batch3D.hpp b/src/graphics/core/Batch3D.hpp index 536e9e81..d6cda86b 100644 --- a/src/graphics/core/Batch3D.hpp +++ b/src/graphics/core/Batch3D.hpp @@ -2,7 +2,7 @@ #define GRAPHICS_CORE_BATCH3D_HPP_ #include "../../maths/UVRegion.hpp" -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/graphics/core/DrawContext.hpp b/src/graphics/core/DrawContext.hpp index 1d69441d..ada2f516 100644 --- a/src/graphics/core/DrawContext.hpp +++ b/src/graphics/core/DrawContext.hpp @@ -4,7 +4,7 @@ #include "commons.hpp" #include "Viewport.hpp" #include "../../window/Window.hpp" -#include "../../typedefs.h" +#include "../../typedefs.hpp" class Batch2D; class Framebuffer; diff --git a/src/graphics/core/Font.hpp b/src/graphics/core/Font.hpp index daa9b1d3..caf1d8ee 100644 --- a/src/graphics/core/Font.hpp +++ b/src/graphics/core/Font.hpp @@ -4,7 +4,7 @@ #include #include #include -#include "../../typedefs.h" +#include "../../typedefs.hpp" class Texture; class Batch2D; diff --git a/src/graphics/core/Framebuffer.hpp b/src/graphics/core/Framebuffer.hpp index e72e46ad..2cca9dde 100644 --- a/src/graphics/core/Framebuffer.hpp +++ b/src/graphics/core/Framebuffer.hpp @@ -1,7 +1,7 @@ #ifndef GRAPHICS_CORE_FRAMEBUFFER_HPP_ #define GRAPHICS_CORE_FRAMEBUFFER_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include diff --git a/src/graphics/core/ImageData.hpp b/src/graphics/core/ImageData.hpp index a64fedb0..206f136f 100644 --- a/src/graphics/core/ImageData.hpp +++ b/src/graphics/core/ImageData.hpp @@ -1,7 +1,7 @@ #ifndef GRAPHICS_CORE_IMAGE_DATA_HPP_ #define GRAPHICS_CORE_IMAGE_DATA_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" enum class ImageFormat { rgb888, diff --git a/src/graphics/core/Mesh.hpp b/src/graphics/core/Mesh.hpp index e2de99d0..541d396e 100644 --- a/src/graphics/core/Mesh.hpp +++ b/src/graphics/core/Mesh.hpp @@ -2,7 +2,7 @@ #define GRAPHICS_CORE_MESH_HPP_ #include -#include "../../typedefs.h" +#include "../../typedefs.hpp" struct vattr { ubyte size; diff --git a/src/graphics/core/PostProcessing.cpp b/src/graphics/core/PostProcessing.cpp index d8ba26e1..67110faa 100644 --- a/src/graphics/core/PostProcessing.cpp +++ b/src/graphics/core/PostProcessing.cpp @@ -1,4 +1,4 @@ -#include "PostProcessing.h" +#include "PostProcessing.hpp" #include "Mesh.hpp" #include "Shader.hpp" #include "Texture.hpp" diff --git a/src/graphics/core/PostProcessing.h b/src/graphics/core/PostProcessing.hpp similarity index 100% rename from src/graphics/core/PostProcessing.h rename to src/graphics/core/PostProcessing.hpp diff --git a/src/graphics/core/Shader.hpp b/src/graphics/core/Shader.hpp index 1bb4992c..64b4cc83 100644 --- a/src/graphics/core/Shader.hpp +++ b/src/graphics/core/Shader.hpp @@ -1,7 +1,7 @@ #ifndef GRAPHICS_CORE_SHADER_HPP_ #define GRAPHICS_CORE_SHADER_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/graphics/core/Texture.hpp b/src/graphics/core/Texture.hpp index 0fac97bb..effb50ee 100644 --- a/src/graphics/core/Texture.hpp +++ b/src/graphics/core/Texture.hpp @@ -3,7 +3,7 @@ #include #include -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include "ImageData.hpp" class Texture { diff --git a/src/graphics/core/TextureAnimation.hpp b/src/graphics/core/TextureAnimation.hpp index 97aeeff5..ac6eb3b7 100644 --- a/src/graphics/core/TextureAnimation.hpp +++ b/src/graphics/core/TextureAnimation.hpp @@ -1,7 +1,7 @@ #ifndef GRAPHICS_CORE_TEXTURE_ANIMATION_HPP_ #define GRAPHICS_CORE_TEXTURE_ANIMATION_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/graphics/core/Viewport.hpp b/src/graphics/core/Viewport.hpp index 63f8b795..30e9de1d 100644 --- a/src/graphics/core/Viewport.hpp +++ b/src/graphics/core/Viewport.hpp @@ -3,7 +3,7 @@ #include -#include "../../typedefs.h" +#include "../../typedefs.hpp" class Viewport { uint width; diff --git a/src/graphics/render/BlocksPreview.cpp b/src/graphics/render/BlocksPreview.cpp index 7553811c..026c246e 100644 --- a/src/graphics/render/BlocksPreview.cpp +++ b/src/graphics/render/BlocksPreview.cpp @@ -1,10 +1,10 @@ #include "BlocksPreview.hpp" #include "../../assets/Assets.hpp" -#include "../../constants.h" -#include "../../content/Content.h" +#include "../../constants.hpp" +#include "../../content/Content.hpp" #include "../../frontend/ContentGfxCache.hpp" -#include "../../voxels/Block.h" +#include "../../voxels/Block.hpp" #include "../../window/Camera.hpp" #include "../../window/Window.hpp" #include "../core/Atlas.hpp" diff --git a/src/graphics/render/BlocksPreview.hpp b/src/graphics/render/BlocksPreview.hpp index 263beee4..138eec01 100644 --- a/src/graphics/render/BlocksPreview.hpp +++ b/src/graphics/render/BlocksPreview.hpp @@ -1,7 +1,7 @@ #ifndef GRAPHICS_RENDER_BLOCKS_PREVIEW_HPP_ #define GRAPHICS_RENDER_BLOCKS_PREVIEW_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/graphics/render/BlocksRenderer.cpp b/src/graphics/render/BlocksRenderer.cpp index 8268e6b9..232250f4 100644 --- a/src/graphics/render/BlocksRenderer.cpp +++ b/src/graphics/render/BlocksRenderer.cpp @@ -2,15 +2,15 @@ #include "../core/Mesh.hpp" #include "../../maths/UVRegion.hpp" -#include "../../constants.h" -#include "../../content/Content.h" -#include "../../voxels/Block.h" -#include "../../voxels/Chunk.h" -#include "../../voxels/VoxelsVolume.h" -#include "../../voxels/ChunksStorage.h" -#include "../../lighting/Lightmap.h" +#include "../../constants.hpp" +#include "../../content/Content.hpp" +#include "../../voxels/Block.hpp" +#include "../../voxels/Chunk.hpp" +#include "../../voxels/VoxelsVolume.hpp" +#include "../../voxels/ChunksStorage.hpp" +#include "../../lighting/Lightmap.hpp" #include "../../frontend/ContentGfxCache.hpp" -#include "../../settings.h" +#include "../../settings.hpp" #include diff --git a/src/graphics/render/BlocksRenderer.hpp b/src/graphics/render/BlocksRenderer.hpp index 4733de97..88596c86 100644 --- a/src/graphics/render/BlocksRenderer.hpp +++ b/src/graphics/render/BlocksRenderer.hpp @@ -4,8 +4,8 @@ #include #include #include -#include "../../voxels/voxel.h" -#include "../../typedefs.h" +#include "../../voxels/voxel.hpp" +#include "../../typedefs.hpp" class Content; class Mesh; diff --git a/src/graphics/render/ChunksRenderer.cpp b/src/graphics/render/ChunksRenderer.cpp index 82b7e94a..6781c971 100644 --- a/src/graphics/render/ChunksRenderer.cpp +++ b/src/graphics/render/ChunksRenderer.cpp @@ -2,9 +2,9 @@ #include "BlocksRenderer.hpp" #include "../../debug/Logger.hpp" #include "../../graphics/core/Mesh.hpp" -#include "../../voxels/Chunk.h" -#include "../../world/Level.h" -#include "../../settings.h" +#include "../../voxels/Chunk.hpp" +#include "../../world/Level.hpp" +#include "../../settings.hpp" #include #include diff --git a/src/graphics/render/ChunksRenderer.hpp b/src/graphics/render/ChunksRenderer.hpp index 0078c829..fe0f96d8 100644 --- a/src/graphics/render/ChunksRenderer.hpp +++ b/src/graphics/render/ChunksRenderer.hpp @@ -7,8 +7,8 @@ #include #include -#include "../../voxels/Block.h" -#include "../../voxels/ChunksStorage.h" +#include "../../voxels/Block.hpp" +#include "../../voxels/ChunksStorage.hpp" #include "../../util/ThreadPool.hpp" class Mesh; diff --git a/src/graphics/render/Skybox.hpp b/src/graphics/render/Skybox.hpp index 5260ab8f..57bd9c99 100644 --- a/src/graphics/render/Skybox.hpp +++ b/src/graphics/render/Skybox.hpp @@ -4,8 +4,8 @@ #include #include #include -#include "../../typedefs.h" -#include "../../maths/fastmaths.h" +#include "../../typedefs.hpp" +#include "../../maths/fastmaths.hpp" class Mesh; class Shader; diff --git a/src/graphics/render/WorldRenderer.cpp b/src/graphics/render/WorldRenderer.cpp index f13db437..c70bd589 100644 --- a/src/graphics/render/WorldRenderer.cpp +++ b/src/graphics/render/WorldRenderer.cpp @@ -4,31 +4,31 @@ #include "Skybox.hpp" #include "../../assets/Assets.hpp" -#include "../../content/Content.h" -#include "../../engine.h" +#include "../../content/Content.hpp" +#include "../../engine.hpp" #include "../../frontend/LevelFrontend.hpp" -#include "../../items/Inventory.h" -#include "../../items/ItemDef.h" -#include "../../items/ItemStack.h" -#include "../../logic/PlayerController.h" +#include "../../items/Inventory.hpp" +#include "../../items/ItemDef.hpp" +#include "../../items/ItemStack.hpp" +#include "../../logic/PlayerController.hpp" #include "../../maths/FrustumCulling.hpp" -#include "../../maths/voxmaths.h" -#include "../../objects/Player.h" -#include "../../settings.h" -#include "../../voxels/Block.h" -#include "../../voxels/Chunk.h" -#include "../../voxels/Chunks.h" +#include "../../maths/voxmaths.hpp" +#include "../../objects/Player.hpp" +#include "../../settings.hpp" +#include "../../voxels/Block.hpp" +#include "../../voxels/Chunk.hpp" +#include "../../voxels/Chunks.hpp" #include "../../window/Camera.hpp" #include "../../window/Window.hpp" -#include "../../world/Level.h" -#include "../../world/LevelEvents.h" -#include "../../world/World.h" +#include "../../world/Level.hpp" +#include "../../world/LevelEvents.hpp" +#include "../../world/World.hpp" #include "../core/Atlas.hpp" #include "../core/Batch3D.hpp" #include "../core/DrawContext.hpp" #include "../core/LineBatch.hpp" #include "../core/Mesh.hpp" -#include "../core/PostProcessing.h" +#include "../core/PostProcessing.hpp" #include "../core/Shader.hpp" #include "../core/Texture.hpp" diff --git a/src/graphics/ui/GUI.hpp b/src/graphics/ui/GUI.hpp index 12a75739..66cf8633 100644 --- a/src/graphics/ui/GUI.hpp +++ b/src/graphics/ui/GUI.hpp @@ -1,7 +1,7 @@ #ifndef FRONTEND_GUI_GUI_HPP_ #define FRONTEND_GUI_GUI_HPP_ -#include "../../delegates.h" +#include "../../delegates.hpp" #include #include diff --git a/src/graphics/ui/elements/InventoryView.cpp b/src/graphics/ui/elements/InventoryView.cpp index 7a0d8693..e6941437 100644 --- a/src/graphics/ui/elements/InventoryView.cpp +++ b/src/graphics/ui/elements/InventoryView.cpp @@ -1,19 +1,19 @@ #include "InventoryView.hpp" #include "../../../assets/Assets.hpp" -#include "../../../content/Content.h" +#include "../../../content/Content.hpp" #include "../../../frontend/LevelFrontend.hpp" -#include "../../../items/Inventories.h" -#include "../../../items/Inventory.h" -#include "../../../items/ItemDef.h" -#include "../../../items/ItemStack.h" -#include "../../../logic/scripting/scripting.h" -#include "../../../maths/voxmaths.h" -#include "../../../objects/Player.h" +#include "../../../items/Inventories.hpp" +#include "../../../items/Inventory.hpp" +#include "../../../items/ItemDef.hpp" +#include "../../../items/ItemStack.hpp" +#include "../../../logic/scripting/scripting.hpp" +#include "../../../maths/voxmaths.hpp" +#include "../../../objects/Player.hpp" #include "../../../util/stringutil.hpp" -#include "../../../voxels/Block.h" +#include "../../../voxels/Block.hpp" #include "../../../window/Events.hpp" #include "../../../window/input.hpp" -#include "../../../world/Level.h" +#include "../../../world/Level.hpp" #include "../../core/Atlas.hpp" #include "../../core/Batch2D.hpp" #include "../../core/Font.hpp" diff --git a/src/graphics/ui/elements/InventoryView.hpp b/src/graphics/ui/elements/InventoryView.hpp index 38b1e858..416d6a9e 100644 --- a/src/graphics/ui/elements/InventoryView.hpp +++ b/src/graphics/ui/elements/InventoryView.hpp @@ -1,10 +1,10 @@ -#ifndef FRONTEND_INVENTORY_VIEW_H_ -#define FRONTEND_INVENTORY_VIEW_H_ +#ifndef FRONTEND_INVENTORY_VIEW_HPP_ +#define FRONTEND_INVENTORY_VIEW_HPP_ #include "UINode.hpp" #include "Container.hpp" -#include "../../../typedefs.h" -#include "../../../constants.h" +#include "../../../typedefs.hpp" +#include "../../../constants.hpp" #include #include @@ -137,4 +137,4 @@ namespace gui { }; } -#endif // FRONTEND_INVENTORY_VIEW_H_ +#endif // FRONTEND_INVENTORY_VIEW_HPP_ diff --git a/src/graphics/ui/elements/Plotter.hpp b/src/graphics/ui/elements/Plotter.hpp index ea814c42..b651abae 100644 --- a/src/graphics/ui/elements/Plotter.hpp +++ b/src/graphics/ui/elements/Plotter.hpp @@ -2,7 +2,7 @@ #define GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_ #include "UINode.hpp" -#include "../../../typedefs.h" +#include "../../../typedefs.hpp" #include #include diff --git a/src/graphics/ui/elements/UINode.hpp b/src/graphics/ui/elements/UINode.hpp index 3f0e3c09..4dd80a13 100644 --- a/src/graphics/ui/elements/UINode.hpp +++ b/src/graphics/ui/elements/UINode.hpp @@ -1,7 +1,7 @@ -#ifndef GRAPHICS_UI_ELEMENTS_UINODE_H_ -#define GRAPHICS_UI_ELEMENTS_UINODE_H_ +#ifndef GRAPHICS_UI_ELEMENTS_UINODE_HPP_ +#define GRAPHICS_UI_ELEMENTS_UINODE_HPP_ -#include "../../../delegates.h" +#include "../../../delegates.hpp" #include "../../../window/input.hpp" #include @@ -215,4 +215,4 @@ namespace gui { }; } -#endif // GRAPHICS_UI_ELEMENTS_UINODE_H_ +#endif // GRAPHICS_UI_ELEMENTS_UINODE_HPP_ diff --git a/src/graphics/ui/gui_util.cpp b/src/graphics/ui/gui_util.cpp index ce104206..fda2913d 100644 --- a/src/graphics/ui/gui_util.cpp +++ b/src/graphics/ui/gui_util.cpp @@ -5,10 +5,10 @@ #include "elements/Button.hpp" #include "gui_xml.hpp" -#include "../../logic/scripting/scripting.h" +#include "../../logic/scripting/scripting.hpp" #include "../../frontend/locale.hpp" #include "../../util/stringutil.hpp" -#include "../../delegates.h" +#include "../../delegates.hpp" #include diff --git a/src/graphics/ui/gui_util.hpp b/src/graphics/ui/gui_util.hpp index 2862bea1..4ecaadff 100644 --- a/src/graphics/ui/gui_util.hpp +++ b/src/graphics/ui/gui_util.hpp @@ -4,8 +4,8 @@ #include #include #include "GUI.hpp" -#include "../../typedefs.h" -#include "../../delegates.h" +#include "../../typedefs.hpp" +#include "../../delegates.hpp" namespace gui { class Button; diff --git a/src/graphics/ui/gui_xml.cpp b/src/graphics/ui/gui_xml.cpp index 2d2efedb..b4bb5671 100644 --- a/src/graphics/ui/gui_xml.cpp +++ b/src/graphics/ui/gui_xml.cpp @@ -12,9 +12,9 @@ #include "../../frontend/menu.hpp" #include "../../frontend/locale.hpp" -#include "../../items/Inventory.h" -#include "../../logic/scripting/scripting.h" -#include "../../maths/voxmaths.h" +#include "../../items/Inventory.hpp" +#include "../../logic/scripting/scripting.hpp" +#include "../../maths/voxmaths.hpp" #include "../../util/stringutil.hpp" #include "../../window/Events.hpp" diff --git a/src/interfaces/Object.h b/src/interfaces/Object.hpp similarity index 84% rename from src/interfaces/Object.h rename to src/interfaces/Object.hpp index 220d3253..6f3a3f4b 100644 --- a/src/interfaces/Object.h +++ b/src/interfaces/Object.hpp @@ -1,5 +1,5 @@ -#ifndef OBJECT_H -#define OBJECT_H +#ifndef OBJECT_HPP_ +#define OBJECT_HPP_ #include #include @@ -23,4 +23,4 @@ public: virtual void destroyed() { } }; -#endif /* OBJECT_H */ \ No newline at end of file +#endif // OBJECT_HPP_ diff --git a/src/interfaces/Serializable.h b/src/interfaces/Serializable.hpp similarity index 64% rename from src/interfaces/Serializable.h rename to src/interfaces/Serializable.hpp index ee75498b..cc64f226 100644 --- a/src/interfaces/Serializable.h +++ b/src/interfaces/Serializable.hpp @@ -1,8 +1,9 @@ -#ifndef SERIALIZABLE_H -#define SERIALIZABLE_H +#ifndef SERIALIZABLE_HPP_ +#define SERIALIZABLE_HPP_ + +#include "../coders/json.hpp" #include -#include "../coders/json.h" class Serializable { public: @@ -11,4 +12,4 @@ public: virtual void deserialize(dynamic::Map* src) = 0; }; -#endif /* SERIALIZABLE_H */ \ No newline at end of file +#endif // SERIALIZABLE_HPP_ diff --git a/src/interfaces/Task.hpp b/src/interfaces/Task.hpp index ca17f3ca..7974baf5 100644 --- a/src/interfaces/Task.hpp +++ b/src/interfaces/Task.hpp @@ -1,7 +1,7 @@ #ifndef INTERFACES_TASK_HPP_ #define INTERFACES_TASK_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" /// @brief Task is a finite process interface. /// 'work' is a metric of task progress/remaining work (jobs/bytes/something other) diff --git a/src/items/Inventories.cpp b/src/items/Inventories.cpp index 3fe93c7c..dde1dee5 100644 --- a/src/items/Inventories.cpp +++ b/src/items/Inventories.cpp @@ -1,9 +1,9 @@ -#include "Inventories.h" +#include "Inventories.hpp" #include -#include "../world/Level.h" -#include "../world/World.h" +#include "../world/Level.hpp" +#include "../world/World.hpp" Inventories::Inventories(Level& level) : level(level) { } diff --git a/src/items/Inventories.h b/src/items/Inventories.hpp similarity index 82% rename from src/items/Inventories.h rename to src/items/Inventories.hpp index b31933eb..f60c62b0 100644 --- a/src/items/Inventories.h +++ b/src/items/Inventories.hpp @@ -1,12 +1,12 @@ -#ifndef ITEMS_INVENTORIES_H_ -#define ITEMS_INVENTORIES_H_ +#ifndef ITEMS_INVENTORIES_HPP_ +#define ITEMS_INVENTORIES_HPP_ #include #include #include -#include "Inventory.h" -#include "../maths/util.h" +#include "Inventory.hpp" +#include "../maths/util.hpp" class Level; @@ -41,4 +41,4 @@ public: const inventories_map& getMap() const; }; -#endif // ITEMS_INVENTORIES_H_ +#endif // ITEMS_INVENTORIES_HPP_ diff --git a/src/items/Inventory.cpp b/src/items/Inventory.cpp index f5f3df99..a21de911 100644 --- a/src/items/Inventory.cpp +++ b/src/items/Inventory.cpp @@ -1,5 +1,6 @@ -#include "Inventory.h" +#include "Inventory.hpp" +#include "../data/dynamic.hpp" #include "../content/ContentLUT.hpp" Inventory::Inventory(int64_t id, size_t size) : id(id), slots(size) { diff --git a/src/items/Inventory.h b/src/items/Inventory.hpp similarity index 83% rename from src/items/Inventory.h rename to src/items/Inventory.hpp index 69f6e173..78ae2abc 100644 --- a/src/items/Inventory.h +++ b/src/items/Inventory.hpp @@ -1,14 +1,17 @@ -#ifndef ITEMS_INVENTORY_H_ -#define ITEMS_INVENTORY_H_ +#ifndef ITEMS_INVENTORY_HPP_ +#define ITEMS_INVENTORY_HPP_ + +#include "ItemStack.hpp" + +#include "../typedefs.hpp" +#include "../interfaces/Serializable.hpp" #include #include -#include "ItemStack.h" - -#include "../typedefs.h" -#include "../data/dynamic.h" -#include "../interfaces/Serializable.h" +namespace dynamic { + class Map; +} class ContentLUT; class ContentIndices; @@ -57,4 +60,4 @@ public: static const size_t npos; }; -#endif // ITEMS_INVENTORY_H_ +#endif // ITEMS_INVENTORY_HPP_ diff --git a/src/items/ItemDef.cpp b/src/items/ItemDef.cpp index 4067144f..dec3b747 100644 --- a/src/items/ItemDef.cpp +++ b/src/items/ItemDef.cpp @@ -1,4 +1,4 @@ -#include "ItemDef.h" +#include "ItemDef.hpp" #include "../util/stringutil.hpp" ItemDef::ItemDef(std::string name) : name(name) { diff --git a/src/items/ItemDef.h b/src/items/ItemDef.hpp similarity index 88% rename from src/items/ItemDef.h rename to src/items/ItemDef.hpp index a536cf91..5dcf105a 100644 --- a/src/items/ItemDef.h +++ b/src/items/ItemDef.hpp @@ -1,10 +1,10 @@ -#ifndef CONTENT_ITEMS_ITEM_DEF_H_ -#define CONTENT_ITEMS_ITEM_DEF_H_ +#ifndef CONTENT_ITEMS_ITEM_DEF_HPP_ +#define CONTENT_ITEMS_ITEM_DEF_HPP_ #include #include -#include "../typedefs.h" +#include "../typedefs.hpp" struct item_funcs_set { bool init: 1; @@ -48,4 +48,4 @@ public: ItemDef(const ItemDef&) = delete; }; -#endif //CONTENT_ITEMS_ITEM_DEF_H_ +#endif //CONTENT_ITEMS_ITEM_DEF_HPP_ diff --git a/src/items/ItemStack.cpp b/src/items/ItemStack.cpp index f43b7546..c2c338e0 100644 --- a/src/items/ItemStack.cpp +++ b/src/items/ItemStack.cpp @@ -1,7 +1,7 @@ -#include "ItemStack.h" +#include "ItemStack.hpp" -#include "ItemDef.h" -#include "../content/Content.h" +#include "ItemDef.hpp" +#include "../content/Content.hpp" ItemStack::ItemStack() : item(ITEM_EMPTY), count(0) { } diff --git a/src/items/ItemStack.h b/src/items/ItemStack.hpp similarity index 81% rename from src/items/ItemStack.h rename to src/items/ItemStack.hpp index 7cc51e55..96861b8f 100644 --- a/src/items/ItemStack.h +++ b/src/items/ItemStack.hpp @@ -1,8 +1,8 @@ -#ifndef ITEMS_ITEM_STACK_H_ -#define ITEMS_ITEM_STACK_H_ +#ifndef ITEMS_ITEM_STACK_HPP_ +#define ITEMS_ITEM_STACK_HPP_ -#include "../typedefs.h" -#include "../constants.h" +#include "../typedefs.hpp" +#include "../constants.hpp" class ContentIndices; @@ -37,4 +37,4 @@ public: } }; -#endif // ITEMS_ITEM_STACK_H_ +#endif // ITEMS_ITEM_STACK_HPP_ diff --git a/src/lighting/LightSolver.cpp b/src/lighting/LightSolver.cpp index 12e09d5d..0656ee53 100644 --- a/src/lighting/LightSolver.cpp +++ b/src/lighting/LightSolver.cpp @@ -1,12 +1,12 @@ #include #include -#include "LightSolver.h" -#include "Lightmap.h" -#include "../content/Content.h" -#include "../voxels/Chunks.h" -#include "../voxels/Chunk.h" -#include "../voxels/voxel.h" -#include "../voxels/Block.h" +#include "LightSolver.hpp" +#include "Lightmap.hpp" +#include "../content/Content.hpp" +#include "../voxels/Chunks.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/voxel.hpp" +#include "../voxels/Block.hpp" LightSolver::LightSolver(const ContentIndices* contentIds, Chunks* chunks, int channel) : contentIds(contentIds), diff --git a/src/lighting/LightSolver.h b/src/lighting/LightSolver.hpp similarity index 82% rename from src/lighting/LightSolver.h rename to src/lighting/LightSolver.hpp index 25648ced..e57c6a79 100644 --- a/src/lighting/LightSolver.h +++ b/src/lighting/LightSolver.hpp @@ -1,5 +1,5 @@ -#ifndef LIGHTING_LIGHTSOLVER_H_ -#define LIGHTING_LIGHTSOLVER_H_ +#ifndef LIGHTING_LIGHTSOLVER_HPP_ +#define LIGHTING_LIGHTSOLVER_HPP_ #include @@ -28,4 +28,4 @@ public: void solve(); }; -#endif /* LIGHTING_LIGHTSOLVER_H_ */ +#endif /* LIGHTING_LIGHTSOLVER_HPP_ */ diff --git a/src/lighting/Lighting.cpp b/src/lighting/Lighting.cpp index a79b066d..c30c23b2 100644 --- a/src/lighting/Lighting.cpp +++ b/src/lighting/Lighting.cpp @@ -1,16 +1,16 @@ #include -#include "Lighting.h" -#include "LightSolver.h" -#include "Lightmap.h" -#include "../content/Content.h" -#include "../voxels/Chunks.h" -#include "../voxels/Chunk.h" -#include "../voxels/voxel.h" -#include "../voxels/Block.h" -#include "../constants.h" -#include "../typedefs.h" -#include "../util/timeutil.h" +#include "Lighting.hpp" +#include "LightSolver.hpp" +#include "Lightmap.hpp" +#include "../content/Content.hpp" +#include "../voxels/Chunks.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/voxel.hpp" +#include "../voxels/Block.hpp" +#include "../constants.hpp" +#include "../typedefs.hpp" +#include "../util/timeutil.hpp" Lighting::Lighting(const Content* content, Chunks* chunks) : content(content), chunks(chunks) { diff --git a/src/lighting/Lighting.h b/src/lighting/Lighting.hpp similarity index 83% rename from src/lighting/Lighting.h rename to src/lighting/Lighting.hpp index 06152760..83514206 100644 --- a/src/lighting/Lighting.h +++ b/src/lighting/Lighting.hpp @@ -1,7 +1,7 @@ -#ifndef LIGHTING_LIGHTING_H_ -#define LIGHTING_LIGHTING_H_ +#ifndef LIGHTING_LIGHTING_HPP_ +#define LIGHTING_LIGHTING_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" class Content; class ContentIndices; @@ -28,4 +28,4 @@ public: static void prebuildSkyLight(Chunk* chunk, const ContentIndices* indices); }; -#endif /* LIGHTING_LIGHTING_H_ */ +#endif /* LIGHTING_LIGHTING_HPP_ */ diff --git a/src/lighting/Lightmap.cpp b/src/lighting/Lightmap.cpp index 1b0f8019..feaf0689 100644 --- a/src/lighting/Lightmap.cpp +++ b/src/lighting/Lightmap.cpp @@ -1,4 +1,4 @@ -#include "Lightmap.h" +#include "Lightmap.hpp" #include "../util/data_io.hpp" diff --git a/src/lighting/Lightmap.h b/src/lighting/Lightmap.hpp similarity index 94% rename from src/lighting/Lightmap.h rename to src/lighting/Lightmap.hpp index 8912e304..ed58d546 100644 --- a/src/lighting/Lightmap.h +++ b/src/lighting/Lightmap.hpp @@ -1,8 +1,8 @@ -#ifndef LIGHTING_LIGHTMAP_H_ -#define LIGHTING_LIGHTMAP_H_ +#ifndef LIGHTING_LIGHTMAP_HPP_ +#define LIGHTING_LIGHTMAP_HPP_ -#include "../constants.h" -#include "../typedefs.h" +#include "../constants.hpp" +#include "../typedefs.hpp" #include @@ -87,4 +87,4 @@ public: static std::unique_ptr decode(ubyte* buffer); }; -#endif /* LIGHTING_LIGHTMAP_H_ */ +#endif /* LIGHTING_LIGHTMAP_HPP_ */ diff --git a/src/logic/BlocksController.cpp b/src/logic/BlocksController.cpp index e0f37765..31286310 100644 --- a/src/logic/BlocksController.cpp +++ b/src/logic/BlocksController.cpp @@ -1,19 +1,19 @@ -#include "BlocksController.h" +#include "BlocksController.hpp" -#include "../voxels/voxel.h" -#include "../voxels/Block.h" -#include "../voxels/Chunk.h" -#include "../voxels/Chunks.h" -#include "../world/Level.h" -#include "../world/World.h" -#include "../content/Content.h" -#include "../lighting/Lighting.h" -#include "../util/timeutil.h" -#include "../maths/fastmaths.h" -#include "../items/Inventory.h" -#include "../items/Inventories.h" +#include "../voxels/voxel.hpp" +#include "../voxels/Block.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/Chunks.hpp" +#include "../world/Level.hpp" +#include "../world/World.hpp" +#include "../content/Content.hpp" +#include "../lighting/Lighting.hpp" +#include "../util/timeutil.hpp" +#include "../maths/fastmaths.hpp" +#include "../items/Inventory.hpp" +#include "../items/Inventories.hpp" -#include "scripting/scripting.h" +#include "scripting/scripting.hpp" Clock::Clock(int tickRate, int tickParts) : tickRate(tickRate), diff --git a/src/logic/BlocksController.h b/src/logic/BlocksController.hpp similarity index 87% rename from src/logic/BlocksController.h rename to src/logic/BlocksController.hpp index 7b8874b1..9beb09bf 100644 --- a/src/logic/BlocksController.h +++ b/src/logic/BlocksController.hpp @@ -1,8 +1,8 @@ -#ifndef LOGIC_BLOCKS_CONTROLLER_H_ -#define LOGIC_BLOCKS_CONTROLLER_H_ +#ifndef LOGIC_BLOCKS_CONTROLLER_HPP_ +#define LOGIC_BLOCKS_CONTROLLER_HPP_ -#include "../typedefs.h" -#include "../maths/fastmaths.h" +#include "../typedefs.hpp" +#include "../maths/fastmaths.hpp" class Player; class Block; @@ -54,4 +54,4 @@ public: void unbindInventory(int x, int y, int z); }; -#endif // LOGIC_BLOCKS_CONTROLLER_H_ +#endif // LOGIC_BLOCKS_CONTROLLER_HPP_ diff --git a/src/logic/ChunksController.cpp b/src/logic/ChunksController.cpp index bff2ebb1..ba4bdbdf 100644 --- a/src/logic/ChunksController.cpp +++ b/src/logic/ChunksController.cpp @@ -1,24 +1,24 @@ -#include "ChunksController.h" +#include "ChunksController.hpp" + +#include "../content/Content.hpp" +#include "../voxels/Block.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/Chunks.hpp" +#include "../voxels/ChunksStorage.hpp" +#include "../voxels/WorldGenerator.hpp" +#include "../world/WorldGenerators.hpp" +#include "../graphics/core/Mesh.hpp" +#include "../lighting/Lighting.hpp" +#include "../files/WorldFiles.hpp" +#include "../world/Level.hpp" +#include "../world/World.hpp" +#include "../maths/voxmaths.hpp" +#include "../util/timeutil.hpp" #include #include #include -#include "../content/Content.h" -#include "../voxels/Block.h" -#include "../voxels/Chunk.h" -#include "../voxels/Chunks.h" -#include "../voxels/ChunksStorage.h" -#include "../voxels/WorldGenerator.h" -#include "../world/WorldGenerators.h" -#include "../graphics/core/Mesh.hpp" -#include "../lighting/Lighting.h" -#include "../files/WorldFiles.h" -#include "../world/Level.h" -#include "../world/World.h" -#include "../maths/voxmaths.h" -#include "../util/timeutil.h" - const uint MAX_WORK_PER_FRAME = 64; const uint MIN_SURROUNDING = 9; diff --git a/src/logic/ChunksController.h b/src/logic/ChunksController.hpp similarity index 83% rename from src/logic/ChunksController.h rename to src/logic/ChunksController.hpp index e16ce300..71d028f8 100644 --- a/src/logic/ChunksController.h +++ b/src/logic/ChunksController.hpp @@ -1,8 +1,8 @@ -#ifndef VOXELS_CHUNKSCONTROLLER_H_ -#define VOXELS_CHUNKSCONTROLLER_H_ +#ifndef VOXELS_CHUNKSCONTROLLER_HPP_ +#define VOXELS_CHUNKSCONTROLLER_HPP_ +#include "../typedefs.hpp" #include -#include "../typedefs.h" class Level; class Chunk; @@ -31,4 +31,4 @@ public: void update(int64_t maxDuration); }; -#endif /* VOXELS_CHUNKSCONTROLLER_H_ */ +#endif /* VOXELS_CHUNKSCONTROLLER_HPP_ */ diff --git a/src/logic/EngineController.cpp b/src/logic/EngineController.cpp index 200c59a9..13399d35 100644 --- a/src/logic/EngineController.cpp +++ b/src/logic/EngineController.cpp @@ -2,9 +2,9 @@ #include "../content/ContentLUT.hpp" #include "../debug/Logger.hpp" -#include "../engine.h" -#include "../files/WorldFiles.h" -#include "../files/WorldConverter.h" +#include "../engine.hpp" +#include "../files/WorldFiles.hpp" +#include "../files/WorldConverter.hpp" #include "../frontend/locale.hpp" #include "../frontend/screens/MenuScreen.hpp" #include "../frontend/screens/LevelScreen.hpp" @@ -13,9 +13,9 @@ #include "../graphics/ui/gui_util.hpp" #include "../interfaces/Task.hpp" #include "../util/stringutil.hpp" -#include "../world/World.h" -#include "../world/Level.h" -#include "LevelController.h" +#include "../world/World.hpp" +#include "../world/Level.hpp" +#include "LevelController.hpp" #include #include diff --git a/src/logic/LevelController.cpp b/src/logic/LevelController.cpp index 27b8e225..58f5ea1c 100644 --- a/src/logic/LevelController.cpp +++ b/src/logic/LevelController.cpp @@ -1,12 +1,12 @@ -#include "LevelController.h" -#include "../files/WorldFiles.h" +#include "LevelController.hpp" +#include "../files/WorldFiles.hpp" #include "../debug/Logger.hpp" -#include "../world/Level.h" -#include "../world/World.h" -#include "../physics/Hitbox.h" +#include "../world/Level.hpp" +#include "../world/World.hpp" +#include "../physics/Hitbox.hpp" -#include "scripting/scripting.h" -#include "../interfaces/Object.h" +#include "scripting/scripting.hpp" +#include "../interfaces/Object.hpp" static debug::Logger logger("level-control"); diff --git a/src/logic/LevelController.h b/src/logic/LevelController.hpp similarity index 78% rename from src/logic/LevelController.h rename to src/logic/LevelController.hpp index 6af0b76f..93d608c8 100644 --- a/src/logic/LevelController.h +++ b/src/logic/LevelController.hpp @@ -1,12 +1,12 @@ -#ifndef LOGIC_LEVEL_CONTROLLER_H_ -#define LOGIC_LEVEL_CONTROLLER_H_ +#ifndef LOGIC_LEVEL_CONTROLLER_HPP_ +#define LOGIC_LEVEL_CONTROLLER_HPP_ #include -#include "../settings.h" +#include "../settings.hpp" -#include "PlayerController.h" -#include "BlocksController.h" -#include "ChunksController.h" +#include "PlayerController.hpp" +#include "BlocksController.hpp" +#include "ChunksController.hpp" class Level; class Player; @@ -42,4 +42,4 @@ public: PlayerController* getPlayerController(); }; -#endif // LOGIC_LEVEL_CONTROLLER_H_ +#endif // LOGIC_LEVEL_CONTROLLER_HPP_ diff --git a/src/logic/PlayerController.cpp b/src/logic/PlayerController.cpp index cf15b8c0..1ae354a7 100644 --- a/src/logic/PlayerController.cpp +++ b/src/logic/PlayerController.cpp @@ -1,26 +1,26 @@ #define _USE_MATH_DEFINES #include -#include "PlayerController.h" -#include "BlocksController.h" -#include "scripting/scripting.h" +#include "PlayerController.hpp" +#include "BlocksController.hpp" +#include "scripting/scripting.hpp" -#include "../objects/Player.h" -#include "../physics/PhysicsSolver.h" -#include "../physics/Hitbox.h" -#include "../lighting/Lighting.h" -#include "../world/Level.h" -#include "../content/Content.h" -#include "../voxels/Block.h" -#include "../voxels/voxel.h" -#include "../voxels/Chunks.h" +#include "../objects/Player.hpp" +#include "../physics/PhysicsSolver.hpp" +#include "../physics/Hitbox.hpp" +#include "../lighting/Lighting.hpp" +#include "../world/Level.hpp" +#include "../content/Content.hpp" +#include "../voxels/Block.hpp" +#include "../voxels/voxel.hpp" +#include "../voxels/Chunks.hpp" #include "../window/Camera.hpp" #include "../window/Window.hpp" #include "../window/Events.hpp" #include "../window/input.hpp" -#include "../items/ItemDef.h" -#include "../items/ItemStack.h" -#include "../items/Inventory.h" +#include "../items/ItemDef.hpp" +#include "../items/ItemStack.hpp" +#include "../items/Inventory.hpp" #include "../core_defs.hpp" const float CAM_SHAKE_OFFSET = 0.025f; diff --git a/src/logic/PlayerController.h b/src/logic/PlayerController.hpp similarity index 93% rename from src/logic/PlayerController.h rename to src/logic/PlayerController.hpp index 3dd6a337..f74a988e 100644 --- a/src/logic/PlayerController.h +++ b/src/logic/PlayerController.hpp @@ -1,13 +1,13 @@ -#ifndef PLAYER_CONTROL_H_ -#define PLAYER_CONTROL_H_ +#ifndef PLAYER_CONTROL_HPP_ +#define PLAYER_CONTROL_HPP_ #include #include #include #include -#include "../settings.h" -#include "../objects/Player.h" +#include "../settings.hpp" +#include "../objects/Player.hpp" class Camera; class Level; @@ -94,4 +94,4 @@ public: void listenBlockInteraction(on_block_interaction callback); }; -#endif /* PLAYER_CONTROL_H_ */ +#endif /* PLAYER_CONTROL_HPP_ */ diff --git a/src/logic/scripting/lua/LuaState.hpp b/src/logic/scripting/lua/LuaState.hpp index 2a153e41..df1bacc7 100644 --- a/src/logic/scripting/lua/LuaState.hpp +++ b/src/logic/scripting/lua/LuaState.hpp @@ -3,8 +3,8 @@ #include "lua_commons.hpp" -#include "../../../data/dynamic.h" -#include "../../../delegates.h" +#include "../../../data/dynamic.hpp" +#include "../../../delegates.hpp" #ifndef LUAJIT_VERSION #error LuaJIT required diff --git a/src/logic/scripting/lua/libaudio.cpp b/src/logic/scripting/lua/libaudio.cpp index cca57037..d6d154f8 100644 --- a/src/logic/scripting/lua/libaudio.cpp +++ b/src/logic/scripting/lua/libaudio.cpp @@ -3,8 +3,8 @@ #include "lua_util.hpp" #include "../../../audio/audio.hpp" -#include "../../../engine.h" -#include "../scripting.h" +#include "../../../engine.hpp" +#include "../scripting.hpp" inline const char* DEFAULT_CHANNEL = "regular"; diff --git a/src/logic/scripting/lua/libblock.cpp b/src/logic/scripting/lua/libblock.cpp index dc446b7e..9e408f5d 100644 --- a/src/logic/scripting/lua/libblock.cpp +++ b/src/logic/scripting/lua/libblock.cpp @@ -1,15 +1,15 @@ #include "lua_commons.hpp" #include "api_lua.hpp" #include "lua_util.hpp" -#include "../scripting.h" -#include "../../../world/Level.h" -#include "../../../voxels/Chunks.h" -#include "../../../voxels/Chunk.h" -#include "../../../voxels/Block.h" -#include "../../../voxels/voxel.h" -#include "../../../lighting/Lighting.h" -#include "../../../content/Content.h" -#include "../../../logic/BlocksController.h" +#include "../scripting.hpp" +#include "../../../world/Level.hpp" +#include "../../../voxels/Chunks.hpp" +#include "../../../voxels/Chunk.hpp" +#include "../../../voxels/Block.hpp" +#include "../../../voxels/voxel.hpp" +#include "../../../lighting/Lighting.hpp" +#include "../../../content/Content.hpp" +#include "../../../logic/BlocksController.hpp" int l_block_name(lua_State* L) { auto indices = scripting::content->getIndices(); diff --git a/src/logic/scripting/lua/libcore.cpp b/src/logic/scripting/lua/libcore.cpp index cbe971b5..049ed191 100644 --- a/src/logic/scripting/lua/libcore.cpp +++ b/src/logic/scripting/lua/libcore.cpp @@ -2,18 +2,18 @@ #include "api_lua.hpp" #include "LuaState.hpp" -#include "../../../engine.h" +#include "../../../engine.hpp" #include "../../../files/settings_io.hpp" -#include "../../../files/engine_paths.h" +#include "../../../files/engine_paths.hpp" #include "../../../frontend/menu.hpp" #include "../../../frontend/screens/MenuScreen.hpp" -#include "../../../logic/LevelController.h" +#include "../../../logic/LevelController.hpp" #include "../../../logic/EngineController.hpp" -#include "../../../world/Level.h" +#include "../../../world/Level.hpp" #include "../../../window/Events.hpp" #include "../../../window/Window.hpp" -#include "../../../world/WorldGenerators.h" -#include "../scripting.h" +#include "../../../world/WorldGenerators.hpp" +#include "../scripting.hpp" #include #include diff --git a/src/logic/scripting/lua/libfile.cpp b/src/logic/scripting/lua/libfile.cpp index 538b2894..67023891 100644 --- a/src/logic/scripting/lua/libfile.cpp +++ b/src/logic/scripting/lua/libfile.cpp @@ -1,9 +1,9 @@ #include "lua_commons.hpp" #include "api_lua.hpp" -#include "../scripting.h" -#include "../../../engine.h" -#include "../../../files/files.h" -#include "../../../files/engine_paths.h" +#include "../scripting.hpp" +#include "../../../engine.hpp" +#include "../../../files/files.hpp" +#include "../../../files/engine_paths.hpp" #include #include diff --git a/src/logic/scripting/lua/libgui.cpp b/src/logic/scripting/lua/libgui.cpp index 682c2961..eebd57cb 100644 --- a/src/logic/scripting/lua/libgui.cpp +++ b/src/logic/scripting/lua/libgui.cpp @@ -3,10 +3,10 @@ #include "lua_util.hpp" #include "LuaState.hpp" -#include "../scripting.h" -#include "../../../engine.h" +#include "../scripting.hpp" +#include "../../../engine.hpp" #include "../../../assets/Assets.hpp" -#include "../../../items/Inventories.h" +#include "../../../items/Inventories.hpp" #include "../../../graphics/ui/gui_util.hpp" #include "../../../graphics/ui/elements/UINode.hpp" #include "../../../graphics/ui/elements/Button.hpp" @@ -19,7 +19,7 @@ #include "../../../frontend/UiDocument.hpp" #include "../../../frontend/locale.hpp" #include "../../../util/stringutil.hpp" -#include "../../../world/Level.h" +#include "../../../world/Level.hpp" using namespace gui; diff --git a/src/logic/scripting/lua/libhud.cpp b/src/logic/scripting/lua/libhud.cpp index 8cc972c1..8f1f9162 100644 --- a/src/logic/scripting/lua/libhud.cpp +++ b/src/logic/scripting/lua/libhud.cpp @@ -3,18 +3,18 @@ #include "LuaState.hpp" #include "../../../assets/Assets.hpp" -#include "../../../content/Content.h" -#include "../../../engine.h" +#include "../../../content/Content.hpp" +#include "../../../engine.hpp" #include "../../../frontend/hud.hpp" #include "../../../frontend/UiDocument.hpp" #include "../../../graphics/ui/elements/InventoryView.hpp" -#include "../../../items/Inventories.h" -#include "../../../logic/BlocksController.h" -#include "../../../voxels/Block.h" -#include "../../../voxels/Chunks.h" -#include "../../../voxels/voxel.h" -#include "../../../world/Level.h" -#include "../scripting.h" +#include "../../../items/Inventories.hpp" +#include "../../../logic/BlocksController.hpp" +#include "../../../voxels/Block.hpp" +#include "../../../voxels/Chunks.hpp" +#include "../../../voxels/voxel.hpp" +#include "../../../world/Level.hpp" +#include "../scripting.hpp" #include #include diff --git a/src/logic/scripting/lua/libinput.cpp b/src/logic/scripting/lua/libinput.cpp index 4291c6f5..56977498 100644 --- a/src/logic/scripting/lua/libinput.cpp +++ b/src/logic/scripting/lua/libinput.cpp @@ -1,13 +1,13 @@ #include "api_lua.hpp" #include "lua_commons.hpp" #include "LuaState.hpp" -#include "../scripting.h" +#include "../scripting.hpp" #include "../../../window/input.hpp" #include "../../../window/Events.hpp" #include "../../../frontend/screens/Screen.hpp" #include "../../../frontend/hud.hpp" -#include "../../../engine.h" +#include "../../../engine.hpp" namespace scripting { extern lua::LuaState* state; diff --git a/src/logic/scripting/lua/libinventory.cpp b/src/logic/scripting/lua/libinventory.cpp index 73384506..605cab0f 100644 --- a/src/logic/scripting/lua/libinventory.cpp +++ b/src/logic/scripting/lua/libinventory.cpp @@ -1,12 +1,12 @@ #include "lua_commons.hpp" #include "api_lua.hpp" #include "lua_util.hpp" -#include "../scripting.h" -#include "../../../content/Content.h" -#include "../../../world/Level.h" -#include "../../../items/ItemStack.h" -#include "../../../items/Inventories.h" -#include "../../../logic/BlocksController.h" +#include "../scripting.hpp" +#include "../../../content/Content.hpp" +#include "../../../world/Level.hpp" +#include "../../../items/ItemStack.hpp" +#include "../../../items/Inventories.hpp" +#include "../../../logic/BlocksController.hpp" static void validate_itemid(lua_State* L, itemid_t id) { if (id >= scripting::indices->countItemDefs()) { diff --git a/src/logic/scripting/lua/libitem.cpp b/src/logic/scripting/lua/libitem.cpp index 1eaa88d3..62760099 100644 --- a/src/logic/scripting/lua/libitem.cpp +++ b/src/logic/scripting/lua/libitem.cpp @@ -1,8 +1,8 @@ #include "lua_commons.hpp" #include "api_lua.hpp" -#include "../scripting.h" -#include "../../../content/Content.h" -#include "../../../items/ItemDef.h" +#include "../scripting.hpp" +#include "../../../content/Content.hpp" +#include "../../../items/ItemDef.hpp" static int l_item_name(lua_State* L) { auto indices = scripting::content->getIndices(); diff --git a/src/logic/scripting/lua/libjson.cpp b/src/logic/scripting/lua/libjson.cpp index a4ad9221..9dc71bca 100644 --- a/src/logic/scripting/lua/libjson.cpp +++ b/src/logic/scripting/lua/libjson.cpp @@ -2,8 +2,8 @@ #include "lua_commons.hpp" #include "LuaState.hpp" -#include "../../../coders/json.h" -#include "../../../data/dynamic.h" +#include "../../../coders/json.hpp" +#include "../../../data/dynamic.hpp" namespace scripting { extern lua::LuaState* state; diff --git a/src/logic/scripting/lua/libpack.cpp b/src/logic/scripting/lua/libpack.cpp index a2d043c7..e0f9b96f 100644 --- a/src/logic/scripting/lua/libpack.cpp +++ b/src/logic/scripting/lua/libpack.cpp @@ -1,13 +1,13 @@ #include "api_lua.hpp" #include "lua_commons.hpp" -#include "../scripting.h" -#include "../../../engine.h" +#include "../scripting.hpp" +#include "../../../engine.hpp" #include "../../../assets/AssetsLoader.hpp" -#include "../../../files/engine_paths.h" -#include "../../../files/WorldFiles.h" -#include "../../../world/Level.h" -#include "../../../world/World.h" +#include "../../../files/engine_paths.hpp" +#include "../../../files/WorldFiles.hpp" +#include "../../../world/Level.hpp" +#include "../../../world/World.hpp" #include #include diff --git a/src/logic/scripting/lua/libplayer.cpp b/src/logic/scripting/lua/libplayer.cpp index 50e15c90..f5f168106 100644 --- a/src/logic/scripting/lua/libplayer.cpp +++ b/src/logic/scripting/lua/libplayer.cpp @@ -1,11 +1,11 @@ #include "lua_commons.hpp" #include "api_lua.hpp" -#include "../scripting.h" -#include "../../../world/Level.h" -#include "../../../objects/Player.h" -#include "../../../physics/Hitbox.h" +#include "../scripting.hpp" +#include "../../../world/Level.hpp" +#include "../../../objects/Player.hpp" +#include "../../../physics/Hitbox.hpp" #include "../../../window/Camera.hpp" -#include "../../../items/Inventory.h" +#include "../../../items/Inventory.hpp" #include diff --git a/src/logic/scripting/lua/libtime.cpp b/src/logic/scripting/lua/libtime.cpp index 9c463214..b5a19a0a 100644 --- a/src/logic/scripting/lua/libtime.cpp +++ b/src/logic/scripting/lua/libtime.cpp @@ -1,7 +1,7 @@ #include "api_lua.hpp" #include "lua_commons.hpp" -#include "../scripting.h" -#include "../../../engine.h" +#include "../scripting.hpp" +#include "../../../engine.hpp" #include "../../../window/Window.hpp" static int l_time_uptime(lua_State* L) { diff --git a/src/logic/scripting/lua/libworld.cpp b/src/logic/scripting/lua/libworld.cpp index 285a2457..51ec7e0e 100644 --- a/src/logic/scripting/lua/libworld.cpp +++ b/src/logic/scripting/lua/libworld.cpp @@ -1,13 +1,13 @@ #include "lua_commons.hpp" #include "api_lua.hpp" -#include "../scripting.h" +#include "../scripting.hpp" #include "../../../assets/Assets.hpp" #include "../../../assets/AssetsLoader.hpp" -#include "../../../files/engine_paths.h" -#include "../../../world/Level.h" -#include "../../../world/World.h" -#include "../../../engine.h" +#include "../../../files/engine_paths.hpp" +#include "../../../world/Level.hpp" +#include "../../../world/World.hpp" +#include "../../../engine.hpp" #include #include diff --git a/src/logic/scripting/lua/lua_util.hpp b/src/logic/scripting/lua/lua_util.hpp index 5f55ca27..33176c95 100644 --- a/src/logic/scripting/lua/lua_util.hpp +++ b/src/logic/scripting/lua/lua_util.hpp @@ -1,5 +1,5 @@ -#ifndef LOGIC_SCRIPTING_LUA_UTIL_H_ -#define LOGIC_SCRIPTING_LUA_UTIL_H_ +#ifndef LOGIC_SCRIPTING_LUA_UTIL_HPP_ +#define LOGIC_SCRIPTING_LUA_UTIL_HPP_ #include "LuaState.hpp" @@ -120,4 +120,4 @@ namespace lua { } } -#endif // LOGIC_SCRIPTING_LUA_UTIL_H_ +#endif // LOGIC_SCRIPTING_LUA_UTIL_HPP_ diff --git a/src/logic/scripting/scripting.cpp b/src/logic/scripting/scripting.cpp index 43dc7893..866be129 100644 --- a/src/logic/scripting/scripting.cpp +++ b/src/logic/scripting/scripting.cpp @@ -1,21 +1,21 @@ -#include "scripting.h" +#include "scripting.hpp" -#include "../../content/ContentPack.h" +#include "../../content/ContentPack.hpp" #include "../../debug/Logger.hpp" -#include "../../engine.h" -#include "../../files/engine_paths.h" -#include "../../files/files.h" +#include "../../engine.hpp" +#include "../../files/engine_paths.hpp" +#include "../../files/files.hpp" #include "../../frontend/UiDocument.hpp" -#include "../../items/Inventory.h" -#include "../../items/ItemDef.h" -#include "../../logic/BlocksController.h" -#include "../../logic/LevelController.h" -#include "../../objects/Player.h" +#include "../../items/Inventory.hpp" +#include "../../items/ItemDef.hpp" +#include "../../logic/BlocksController.hpp" +#include "../../logic/LevelController.hpp" +#include "../../objects/Player.hpp" #include "../../util/stringutil.hpp" -#include "../../util/timeutil.h" -#include "../../util/timeutil.h" -#include "../../voxels/Block.h" -#include "../../world/Level.h" +#include "../../util/timeutil.hpp" +#include "../../util/timeutil.hpp" +#include "../../voxels/Block.hpp" +#include "../../world/Level.hpp" #include "lua/LuaState.hpp" #include diff --git a/src/logic/scripting/scripting.h b/src/logic/scripting/scripting.hpp similarity index 90% rename from src/logic/scripting/scripting.h rename to src/logic/scripting/scripting.hpp index f662ae6a..c4ed691c 100644 --- a/src/logic/scripting/scripting.h +++ b/src/logic/scripting/scripting.hpp @@ -1,8 +1,11 @@ -#include "../../data/dynamic.h" -#include "../../typedefs.h" -#include "../../delegates.h" +#ifndef LOGIC_SCRIPTING_SCRIPTING_HPP_ +#define LOGIC_SCRIPTING_SCRIPTING_HPP_ -#include "scripting_functional.h" +#include "../../data/dynamic.hpp" +#include "../../typedefs.hpp" +#include "../../delegates.hpp" + +#include "scripting_functional.hpp" #include #include @@ -110,3 +113,5 @@ namespace scripting { /// @brief Finalize lua state. Using scripting after will lead to Lua panic void close(); } + +#endif // LOGIC_SCRIPTING_SCRIPTING_HPP_ diff --git a/src/logic/scripting/scripting_functional.cpp b/src/logic/scripting/scripting_functional.cpp index 799e55ab..aa6ce4ff 100644 --- a/src/logic/scripting/scripting_functional.cpp +++ b/src/logic/scripting/scripting_functional.cpp @@ -1,4 +1,4 @@ -#include "scripting_functional.h" +#include "scripting_functional.hpp" #include "lua/LuaState.hpp" #include "../../debug/Logger.hpp" diff --git a/src/logic/scripting/scripting_functional.h b/src/logic/scripting/scripting_functional.hpp similarity index 85% rename from src/logic/scripting/scripting_functional.h rename to src/logic/scripting/scripting_functional.hpp index add73822..6ab338ce 100644 --- a/src/logic/scripting/scripting_functional.h +++ b/src/logic/scripting/scripting_functional.hpp @@ -1,10 +1,10 @@ -#ifndef LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_H_ -#define LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_H_ +#ifndef LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_HPP_ +#define LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_HPP_ #include #include -#include "../../typedefs.h" -#include "../../delegates.h" +#include "../../typedefs.hpp" +#include "../../delegates.hpp" namespace scripting { runnable create_runnable( @@ -68,4 +68,4 @@ namespace scripting { ); } -#endif // LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_H_ +#endif // LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_HPP_ diff --git a/src/logic/scripting/scripting_hud.cpp b/src/logic/scripting/scripting_hud.cpp index 043d9770..53d16521 100644 --- a/src/logic/scripting/scripting_hud.cpp +++ b/src/logic/scripting/scripting_hud.cpp @@ -1,14 +1,14 @@ #include "scripting_hud.hpp" -#include "scripting.h" +#include "scripting.hpp" #include "lua/api_lua.hpp" #include "lua/LuaState.hpp" #include "../../debug/Logger.hpp" #include "../../frontend/hud.hpp" -#include "../../objects/Player.h" -#include "../../files/files.h" -#include "../../engine.h" +#include "../../objects/Player.hpp" +#include "../../files/files.hpp" +#include "../../engine.hpp" namespace scripting { extern lua::LuaState* state; diff --git a/src/logic/scripting/scripting_hud.hpp b/src/logic/scripting/scripting_hud.hpp index c977506d..f7786d36 100644 --- a/src/logic/scripting/scripting_hud.hpp +++ b/src/logic/scripting/scripting_hud.hpp @@ -1,7 +1,7 @@ #ifndef LOGIC_SCRIPTING_SCRIPTING_HUD_HPP_ #define LOGIC_SCRIPTING_SCRIPTING_HUD_HPP_ -#include "../../typedefs.h" +#include "../../typedefs.hpp" #include #include diff --git a/src/maths/aabb.h b/src/maths/aabb.hpp similarity index 95% rename from src/maths/aabb.h rename to src/maths/aabb.hpp index 93b90e0f..f057fef7 100644 --- a/src/maths/aabb.h +++ b/src/maths/aabb.hpp @@ -1,5 +1,5 @@ -#ifndef MATHS_AABB_H_ -#define MATHS_AABB_H_ +#ifndef MATHS_AABB_HPP_ +#define MATHS_AABB_HPP_ #include @@ -56,4 +56,4 @@ struct AABB { } }; -#endif // MATHS_AABB_H_ \ No newline at end of file +#endif // MATHS_AABB_HPP_ diff --git a/src/maths/fastmaths.h b/src/maths/fastmaths.hpp similarity index 72% rename from src/maths/fastmaths.h rename to src/maths/fastmaths.hpp index 3d6a800a..52895eec 100644 --- a/src/maths/fastmaths.h +++ b/src/maths/fastmaths.hpp @@ -1,7 +1,7 @@ -#ifndef MATHS_FASTMATHS_H_ -#define MATHS_FASTMATHS_H_ +#ifndef MATHS_FASTMATHS_HPP_ +#define MATHS_FASTMATHS_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" class FastRandom { uint seed; @@ -20,4 +20,4 @@ public: } }; -#endif // MATHS_FASTMATHS_H_ +#endif // MATHS_FASTMATHS_HPP_ diff --git a/src/maths/rays.cpp b/src/maths/rays.cpp index b7f3a339..f8f43aee 100644 --- a/src/maths/rays.cpp +++ b/src/maths/rays.cpp @@ -1,6 +1,6 @@ -#include "rays.h" -#include "aabb.h" +#include "rays.hpp" +#include "aabb.hpp" #include "glm/glm.hpp" diff --git a/src/maths/rays.h b/src/maths/rays.hpp similarity index 93% rename from src/maths/rays.h rename to src/maths/rays.hpp index 7dabde3a..50d2921d 100644 --- a/src/maths/rays.h +++ b/src/maths/rays.hpp @@ -1,8 +1,7 @@ -#ifndef MATHS_RAYS_H_ -#define MATHS_RAYS_H_ +#ifndef MATHS_RAYS_HPP_ +#define MATHS_RAYS_HPP_ -// #include "../typedefs.h" -#include "aabb.h" +#include "aabb.hpp" #include "glm/glm.hpp" #define GLM_ENABLE_EXPERIMENTAL #include "glm/gtx/hash.hpp" @@ -75,4 +74,4 @@ public: scalar_t& distance_ret); }; -#endif // SRC_VOXNATHS_H_ +#endif // SRC_VOXNATHS_HPP_ diff --git a/src/maths/util.h b/src/maths/util.hpp similarity index 89% rename from src/maths/util.h rename to src/maths/util.hpp index 15774ae4..16977383 100644 --- a/src/maths/util.h +++ b/src/maths/util.hpp @@ -1,5 +1,5 @@ -#ifndef MATHS_UTIL_H_ -#define MATHS_UTIL_H_ +#ifndef MATHS_UTIL_HPP_ +#define MATHS_UTIL_HPP_ #include #include @@ -46,4 +46,4 @@ public: } }; -#endif // MATHS_UTIL_H_ +#endif // MATHS_UTIL_HPP_ diff --git a/src/maths/voxmaths.h b/src/maths/voxmaths.hpp similarity index 88% rename from src/maths/voxmaths.h rename to src/maths/voxmaths.hpp index da17c815..0b21492c 100644 --- a/src/maths/voxmaths.h +++ b/src/maths/voxmaths.hpp @@ -1,7 +1,7 @@ -#ifndef SRC_VOXNATHS_H_ -#define SRC_VOXNATHS_H_ +#ifndef VOXNATHS_HPP_ +#define VOXNATHS_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" inline int floordiv(int a, int b) { if (a < 0 && a % b) { @@ -48,4 +48,4 @@ inline light_t light_pack(ubyte r, ubyte g, ubyte b, ubyte s) { return r | (g << 4) | (b << 8) | (s << 12); } -#endif // SRC_VOXNATHS_H_ +#endif // VOXNATHS_HPP_ diff --git a/src/objects/Player.cpp b/src/objects/Player.cpp index b385c223..4fd682af 100644 --- a/src/objects/Player.cpp +++ b/src/objects/Player.cpp @@ -1,13 +1,13 @@ -#include "Player.h" +#include "Player.hpp" #include "../content/ContentLUT.hpp" -#include "../physics/Hitbox.h" -#include "../physics/PhysicsSolver.h" -#include "../voxels/Chunks.h" -#include "../world/Level.h" +#include "../physics/Hitbox.hpp" +#include "../physics/PhysicsSolver.hpp" +#include "../voxels/Chunks.hpp" +#include "../world/Level.hpp" #include "../window/Events.hpp" #include "../window/Camera.hpp" -#include "../items/Inventory.h" +#include "../items/Inventory.hpp" #include diff --git a/src/objects/Player.h b/src/objects/Player.hpp similarity index 85% rename from src/objects/Player.h rename to src/objects/Player.hpp index 05020637..18b9cb13 100644 --- a/src/objects/Player.h +++ b/src/objects/Player.hpp @@ -1,15 +1,15 @@ -#ifndef SRC_OBJECTS_PLAYER_H_ -#define SRC_OBJECTS_PLAYER_H_ +#ifndef SRC_OBJECTS_PLAYER_HPP_ +#define SRC_OBJECTS_PLAYER_HPP_ + +#include "../data/dynamic.hpp" +#include "../voxels/voxel.hpp" +#include "../settings.hpp" +#include "../interfaces/Serializable.hpp" +#include "../interfaces/Object.hpp" #include #include -#include "../data/dynamic.h" -#include "../voxels/voxel.h" -#include "../settings.h" -#include "../interfaces/Serializable.h" -#include "../interfaces/Object.h" - class Camera; class Hitbox; class Inventory; @@ -77,4 +77,4 @@ public: } }; -#endif /* SRC_OBJECTS_PLAYER_H_ */ +#endif /* SRC_OBJECTS_PLAYER_HPP_ */ diff --git a/src/physics/Hitbox.cpp b/src/physics/Hitbox.cpp index e8d39e84..4e6c5ba3 100644 --- a/src/physics/Hitbox.cpp +++ b/src/physics/Hitbox.cpp @@ -1,4 +1,4 @@ -#include "Hitbox.h" +#include "Hitbox.hpp" Hitbox::Hitbox(glm::vec3 position, glm::vec3 halfsize) : position(position), diff --git a/src/physics/Hitbox.h b/src/physics/Hitbox.hpp similarity index 70% rename from src/physics/Hitbox.h rename to src/physics/Hitbox.hpp index 5dc4ae01..ea0af903 100644 --- a/src/physics/Hitbox.h +++ b/src/physics/Hitbox.hpp @@ -1,5 +1,5 @@ -#ifndef PHYSICS_HITBOX_H_ -#define PHYSICS_HITBOX_H_ +#ifndef PHYSICS_HITBOX_HPP_ +#define PHYSICS_HITBOX_HPP_ #include @@ -14,4 +14,4 @@ public: Hitbox(glm::vec3 position, glm::vec3 halfsize); }; -#endif /* PHYSICS_HITBOX_H_ */ +#endif /* PHYSICS_HITBOX_HPP_ */ diff --git a/src/physics/PhysicsSolver.cpp b/src/physics/PhysicsSolver.cpp index 322f3146..6f3a8c36 100644 --- a/src/physics/PhysicsSolver.cpp +++ b/src/physics/PhysicsSolver.cpp @@ -1,10 +1,10 @@ -#include "PhysicsSolver.h" -#include "Hitbox.h" +#include "PhysicsSolver.hpp" +#include "Hitbox.hpp" -#include "../maths/aabb.h" -#include "../voxels/Block.h" -#include "../voxels/Chunks.h" -#include "../voxels/voxel.h" +#include "../maths/aabb.hpp" +#include "../voxels/Block.hpp" +#include "../voxels/Chunks.hpp" +#include "../voxels/voxel.hpp" const double E = 0.03; const double MAX_FIX = 0.1; diff --git a/src/physics/PhysicsSolver.h b/src/physics/PhysicsSolver.hpp similarity index 80% rename from src/physics/PhysicsSolver.h rename to src/physics/PhysicsSolver.hpp index 4bc748e3..d1b91dbf 100644 --- a/src/physics/PhysicsSolver.h +++ b/src/physics/PhysicsSolver.hpp @@ -1,9 +1,9 @@ -#ifndef PHYSICS_PHYSICSSOLVER_H_ -#define PHYSICS_PHYSICSSOLVER_H_ +#ifndef PHYSICS_PHYSICSSOLVER_HPP_ +#define PHYSICS_PHYSICSSOLVER_HPP_ #include -#include "../typedefs.h" -#include "../voxels/Block.h" +#include "../typedefs.hpp" +#include "../voxels/Block.hpp" class Hitbox; class Chunks; @@ -30,4 +30,4 @@ public: bool isBlockInside(int x, int y, int z, Block* def, blockstate_t states, Hitbox* hitbox); }; -#endif /* PHYSICS_PHYSICSSOLVER_H_ */ +#endif /* PHYSICS_PHYSICSSOLVER_HPP_ */ diff --git a/src/settings.h b/src/settings.hpp similarity index 95% rename from src/settings.h rename to src/settings.hpp index 28e3b780..1204512e 100644 --- a/src/settings.h +++ b/src/settings.hpp @@ -1,12 +1,12 @@ -#ifndef SETTINGS_H_ -#define SETTINGS_H_ +#ifndef SETTINGS_HPP_ +#define SETTINGS_HPP_ #include #include #include "data/setting.hpp" -#include "constants.h" -#include "typedefs.h" +#include "constants.hpp" +#include "typedefs.hpp" struct AudioSettings { /// @brief try to initialize AL backend @@ -86,4 +86,4 @@ struct EngineSettings { UiSettings ui; }; -#endif // SETTINGS_H_ +#endif // SETTINGS_HPP_ diff --git a/src/typedefs.h b/src/typedefs.hpp similarity index 91% rename from src/typedefs.h rename to src/typedefs.hpp index 5fac8b88..23129fd6 100644 --- a/src/typedefs.h +++ b/src/typedefs.hpp @@ -1,5 +1,5 @@ -#ifndef TYPEDEFS_H_ -#define TYPEDEFS_H_ +#ifndef TYPEDEFS_HPP_ +#define TYPEDEFS_HPP_ #include #include @@ -29,4 +29,4 @@ using itemcount_t = uint32_t; using blockstate_t = uint16_t; using light_t = uint16_t; -#endif // TYPEDEFS_H_ +#endif // TYPEDEFS_HPP_ diff --git a/src/util/BufferPool.hpp b/src/util/BufferPool.hpp index 82613ae5..1fcf130b 100644 --- a/src/util/BufferPool.hpp +++ b/src/util/BufferPool.hpp @@ -1,7 +1,7 @@ #ifndef UTIL_BUFFER_POOL_HPP_ #define UTIL_BUFFER_POOL_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/util/RunnablesList.hpp b/src/util/RunnablesList.hpp index 99d4e321..7af51a94 100644 --- a/src/util/RunnablesList.hpp +++ b/src/util/RunnablesList.hpp @@ -1,8 +1,8 @@ #ifndef UTIL_RUNNABLES_LIST_HPP_ #define UTIL_RUNNABLES_LIST_HPP_ -#include "../typedefs.h" -#include "../delegates.h" +#include "../typedefs.hpp" +#include "../delegates.hpp" #include #include diff --git a/src/util/ThreadPool.hpp b/src/util/ThreadPool.hpp index aa9545a8..a1c2cdad 100644 --- a/src/util/ThreadPool.hpp +++ b/src/util/ThreadPool.hpp @@ -1,6 +1,10 @@ #ifndef UTIL_THREAD_POOL_HPP_ #define UTIL_THREAD_POOL_HPP_ +#include "../delegates.hpp" +#include "../debug/Logger.hpp" +#include "../interfaces/Task.hpp" + #include #include #include @@ -9,10 +13,6 @@ #include #include -#include "../delegates.h" -#include "../debug/Logger.hpp" -#include "../interfaces/Task.hpp" - namespace util { template diff --git a/src/util/command_line.hpp b/src/util/command_line.hpp index f0d8bfbb..8b4ff22a 100644 --- a/src/util/command_line.hpp +++ b/src/util/command_line.hpp @@ -4,7 +4,7 @@ #include #include #include -#include "../files/engine_paths.h" +#include "../files/engine_paths.hpp" class ArgsReader { int argc; diff --git a/src/util/data_io.hpp b/src/util/data_io.hpp index 4cc3391c..131fa63f 100644 --- a/src/util/data_io.hpp +++ b/src/util/data_io.hpp @@ -1,7 +1,7 @@ #ifndef UTIL_DATA_IO_HPP_ #define UTIL_DATA_IO_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" namespace dataio { /* Read big-endian 16 bit signed integer from bytes */ diff --git a/src/util/listutil.hpp b/src/util/listutil.hpp index 11fe00ca..00d73cb7 100644 --- a/src/util/listutil.hpp +++ b/src/util/listutil.hpp @@ -1,5 +1,5 @@ -#ifndef UTIL_LISTUTIL_H_ -#define UTIL_LISTUTIL_H_ +#ifndef UTIL_LISTUTIL_HPP_ +#define UTIL_LISTUTIL_HPP_ #include #include @@ -15,4 +15,4 @@ namespace util { std::string to_string(const std::vector& vec); } -#endif // UTIL_LISTUTIL_H_ +#endif // UTIL_LISTUTIL_HPP_ diff --git a/src/util/platform.cpp b/src/util/platform.cpp index 49e44ff6..fa45ca11 100644 --- a/src/util/platform.cpp +++ b/src/util/platform.cpp @@ -1,6 +1,6 @@ #include "platform.hpp" -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include @@ -10,11 +10,11 @@ #ifdef _WIN32 #include -#include "./stringutil.h" +#include "./stringutil.hpp" void platform::configure_encoding() { - // set utf-8 encoding to console output - SetConsoleOutputCP(CP_UTF8); + // set utf-8 encoding to console output + SetConsoleOutputCP(CP_UTF8); setvbuf(stdout, nullptr, _IOFBF, 1000); } diff --git a/src/util/stringutil.hpp b/src/util/stringutil.hpp index 248fcb8f..22596572 100644 --- a/src/util/stringutil.hpp +++ b/src/util/stringutil.hpp @@ -1,7 +1,7 @@ #ifndef UTIL_STRINGUTIL_HPP_ #define UTIL_STRINGUTIL_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/util/timeutil.cpp b/src/util/timeutil.cpp index bebea0ad..78f1cf39 100644 --- a/src/util/timeutil.cpp +++ b/src/util/timeutil.cpp @@ -1,4 +1,4 @@ -#include "timeutil.h" +#include "timeutil.hpp" #include @@ -26,4 +26,4 @@ void timeutil::from_value(float value, int& hour, int& minute, int& second) { minute = int(value) % 60; value *= 60; second = int(value) % 60; -} \ No newline at end of file +} diff --git a/src/util/timeutil.h b/src/util/timeutil.hpp similarity index 84% rename from src/util/timeutil.h rename to src/util/timeutil.hpp index 97f53481..3d117b73 100644 --- a/src/util/timeutil.h +++ b/src/util/timeutil.hpp @@ -1,7 +1,7 @@ -#ifndef UTIL_TIMEUTIL_H_ -#define UTIL_TIMEUTIL_H_ +#ifndef UTIL_TIMEUTIL_HPP_ +#define UTIL_TIMEUTIL_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include namespace timeutil { @@ -34,4 +34,4 @@ namespace timeutil { void from_value(float value, int& hour, int& minute, int& second); } -#endif // UTIL_TIMEUTIL_H_ \ No newline at end of file +#endif // UTIL_TIMEUTIL_HPP_ diff --git a/src/voxel_engine.cpp b/src/voxel_engine.cpp index 71d4a252..28d25cbc 100644 --- a/src/voxel_engine.cpp +++ b/src/voxel_engine.cpp @@ -1,8 +1,8 @@ #include "core_defs.hpp" -#include "engine.h" -#include "files/files.h" +#include "engine.hpp" +#include "files/files.hpp" #include "files/settings_io.hpp" -#include "files/engine_paths.h" +#include "files/engine_paths.hpp" #include "util/platform.hpp" #include "util/command_line.hpp" #include "window/Events.hpp" diff --git a/src/voxels/Block.cpp b/src/voxels/Block.cpp index d69f4e4d..ac224b60 100644 --- a/src/voxels/Block.cpp +++ b/src/voxels/Block.cpp @@ -1,4 +1,4 @@ -#include "Block.h" +#include "Block.hpp" #include "../core_defs.hpp" #include "../util/stringutil.hpp" diff --git a/src/voxels/Block.h b/src/voxels/Block.hpp similarity index 97% rename from src/voxels/Block.h rename to src/voxels/Block.hpp index d3db753f..0c4b3b68 100644 --- a/src/voxels/Block.h +++ b/src/voxels/Block.hpp @@ -1,13 +1,13 @@ -#ifndef VOXELS_BLOCK_H_ -#define VOXELS_BLOCK_H_ +#ifndef VOXELS_BLOCK_HPP_ +#define VOXELS_BLOCK_HPP_ #include #include #include -#include "../maths/aabb.h" +#include "../maths/aabb.hpp" #include "../maths/UVRegion.hpp" -#include "../typedefs.h" +#include "../typedefs.hpp" #define BLOCK_ITEM_SUFFIX ".item" @@ -188,4 +188,4 @@ public: Block(const Block&) = delete; }; -#endif /* VOXELS_BLOCK_H_ */ +#endif /* VOXELS_BLOCK_HPP_ */ diff --git a/src/voxels/Chunk.cpp b/src/voxels/Chunk.cpp index b287ae17..bfd79cda 100644 --- a/src/voxels/Chunk.cpp +++ b/src/voxels/Chunk.cpp @@ -1,10 +1,10 @@ -#include "Chunk.h" +#include "Chunk.hpp" -#include "voxel.h" +#include "voxel.hpp" -#include "../items/Inventory.h" +#include "../items/Inventory.hpp" #include "../content/ContentLUT.hpp" -#include "../lighting/Lightmap.h" +#include "../lighting/Lightmap.hpp" Chunk::Chunk(int xpos, int zpos) : x(xpos), z(zpos){ bottom = 0; diff --git a/src/voxels/Chunk.h b/src/voxels/Chunk.hpp similarity index 93% rename from src/voxels/Chunk.h rename to src/voxels/Chunk.hpp index d2785d24..019b4f09 100644 --- a/src/voxels/Chunk.h +++ b/src/voxels/Chunk.hpp @@ -1,13 +1,13 @@ -#ifndef VOXELS_CHUNK_H_ -#define VOXELS_CHUNK_H_ +#ifndef VOXELS_CHUNK_HPP_ +#define VOXELS_CHUNK_HPP_ #include #include #include -#include "../constants.h" -#include "voxel.h" -#include "../lighting/Lightmap.h" +#include "../constants.hpp" +#include "voxel.hpp" +#include "../lighting/Lightmap.hpp" struct ChunkFlag { static const int MODIFIED = 0x1; @@ -97,4 +97,4 @@ public: static void convert(ubyte* data, const ContentLUT* lut); }; -#endif /* VOXELS_CHUNK_H_ */ +#endif /* VOXELS_CHUNK_HPP_ */ diff --git a/src/voxels/Chunks.cpp b/src/voxels/Chunks.cpp index 4a220d8e..3e98199e 100644 --- a/src/voxels/Chunks.cpp +++ b/src/voxels/Chunks.cpp @@ -1,16 +1,16 @@ -#include "Chunks.h" -#include "Chunk.h" -#include "voxel.h" -#include "Block.h" -#include "WorldGenerator.h" -#include "../content/Content.h" -#include "../lighting/Lightmap.h" -#include "../files/WorldFiles.h" -#include "../world/LevelEvents.h" +#include "Chunks.hpp" +#include "Chunk.hpp" +#include "voxel.hpp" +#include "Block.hpp" +#include "WorldGenerator.hpp" +#include "../content/Content.hpp" +#include "../lighting/Lightmap.hpp" +#include "../files/WorldFiles.hpp" +#include "../world/LevelEvents.hpp" #include "../graphics/core/Mesh.hpp" -#include "../maths/voxmaths.h" -#include "../maths/aabb.h" -#include "../maths/rays.h" +#include "../maths/voxmaths.hpp" +#include "../maths/aabb.hpp" +#include "../maths/rays.hpp" #include #include diff --git a/src/voxels/Chunks.h b/src/voxels/Chunks.hpp similarity index 94% rename from src/voxels/Chunks.h rename to src/voxels/Chunks.hpp index b129ba71..a8de62d8 100644 --- a/src/voxels/Chunks.h +++ b/src/voxels/Chunks.hpp @@ -1,11 +1,11 @@ -#ifndef VOXELS_CHUNKS_H_ -#define VOXELS_CHUNKS_H_ +#ifndef VOXELS_CHUNKS_HPP_ +#define VOXELS_CHUNKS_HPP_ #include #include #include #include -#include "../typedefs.h" +#include "../typedefs.hpp" class VoxelRenderer; @@ -68,4 +68,4 @@ public: void saveAndClear(); }; -#endif /* VOXELS_CHUNKS_H_ */ +#endif /* VOXELS_CHUNKS_HPP_ */ diff --git a/src/voxels/ChunksStorage.cpp b/src/voxels/ChunksStorage.cpp index 35484a3f..3cc59bd3 100644 --- a/src/voxels/ChunksStorage.cpp +++ b/src/voxels/ChunksStorage.cpp @@ -1,19 +1,19 @@ -#include "ChunksStorage.h" +#include "ChunksStorage.hpp" #include #include -#include "VoxelsVolume.h" -#include "Chunk.h" -#include "Block.h" -#include "../content/Content.h" -#include "../files/WorldFiles.h" -#include "../world/Level.h" -#include "../world/World.h" -#include "../maths/voxmaths.h" -#include "../lighting/Lightmap.h" -#include "../items/Inventories.h" -#include "../typedefs.h" +#include "VoxelsVolume.hpp" +#include "Chunk.hpp" +#include "Block.hpp" +#include "../content/Content.hpp" +#include "../files/WorldFiles.hpp" +#include "../world/Level.hpp" +#include "../world/World.hpp" +#include "../maths/voxmaths.hpp" +#include "../lighting/Lightmap.hpp" +#include "../items/Inventories.hpp" +#include "../typedefs.hpp" ChunksStorage::ChunksStorage(Level* level) : level(level) { } diff --git a/src/voxels/ChunksStorage.h b/src/voxels/ChunksStorage.hpp similarity index 80% rename from src/voxels/ChunksStorage.h rename to src/voxels/ChunksStorage.hpp index ad5b0093..2f671ee7 100644 --- a/src/voxels/ChunksStorage.h +++ b/src/voxels/ChunksStorage.hpp @@ -1,10 +1,10 @@ -#ifndef VOXELS_CHUNKSSTORAGE_H_ -#define VOXELS_CHUNKSSTORAGE_H_ +#ifndef VOXELS_CHUNKSSTORAGE_HPP_ +#define VOXELS_CHUNKSSTORAGE_HPP_ #include #include -#include "voxel.h" -#include "../typedefs.h" +#include "voxel.hpp" +#include "../typedefs.hpp" #define GLM_ENABLE_EXPERIMENTAL #include "glm/gtx/hash.hpp" @@ -30,4 +30,4 @@ public: }; -#endif // VOXELS_CHUNKSSTORAGE_H_ \ No newline at end of file +#endif // VOXELS_CHUNKSSTORAGE_HPP_ diff --git a/src/voxels/DefaultWorldGenerator.cpp b/src/voxels/DefaultWorldGenerator.cpp index 911de204..b0c8561b 100644 --- a/src/voxels/DefaultWorldGenerator.cpp +++ b/src/voxels/DefaultWorldGenerator.cpp @@ -1,14 +1,14 @@ -#include "DefaultWorldGenerator.h" -#include "voxel.h" -#include "Chunk.h" -#include "Block.h" +#include "DefaultWorldGenerator.hpp" +#include "voxel.hpp" +#include "Chunk.hpp" +#include "Block.hpp" #define FNL_IMPL #include "../maths/FastNoiseLite.h" -#include "../content/Content.h" -#include "../maths/voxmaths.h" -#include "../maths/util.h" +#include "../content/Content.hpp" +#include "../maths/voxmaths.hpp" +#include "../maths/util.hpp" #include "../core_defs.hpp" #include diff --git a/src/voxels/DefaultWorldGenerator.h b/src/voxels/DefaultWorldGenerator.hpp similarity index 53% rename from src/voxels/DefaultWorldGenerator.h rename to src/voxels/DefaultWorldGenerator.hpp index 92377efc..84daabb9 100644 --- a/src/voxels/DefaultWorldGenerator.h +++ b/src/voxels/DefaultWorldGenerator.hpp @@ -1,8 +1,8 @@ -#ifndef VOXELS_DEFAULTWORLDGENERATOR_H_ -#define VOXELS_DEFAULTWORLDGENERATOR_H_ +#ifndef VOXELS_DEFAULTWORLDGENERATOR_HPP_ +#define VOXELS_DEFAULTWORLDGENERATOR_HPP_ -#include "../typedefs.h" -#include "../voxels/WorldGenerator.h" +#include "../typedefs.hpp" +#include "../voxels/WorldGenerator.hpp" struct voxel; class Content; @@ -15,4 +15,4 @@ public: void generate(voxel* voxels, int x, int z, int seed); }; -#endif /* VOXELS_DEFAULTWORLDGENERATOR_H_ */ \ No newline at end of file +#endif /* VOXELS_DEFAULTWORLDGENERATOR_HPP_ */ diff --git a/src/voxels/FlatWorldGenerator.cpp b/src/voxels/FlatWorldGenerator.cpp index e4c7fa6f..8e5c440e 100644 --- a/src/voxels/FlatWorldGenerator.cpp +++ b/src/voxels/FlatWorldGenerator.cpp @@ -1,8 +1,8 @@ -#include "FlatWorldGenerator.h" -#include "voxel.h" -#include "Chunk.h" +#include "FlatWorldGenerator.hpp" +#include "voxel.hpp" +#include "Chunk.hpp" -#include "../content/Content.h" +#include "../content/Content.hpp" #include "../core_defs.hpp" void FlatWorldGenerator::generate(voxel* voxels, int cx, int cz, int seed) { diff --git a/src/voxels/FlatWorldGenerator.h b/src/voxels/FlatWorldGenerator.hpp similarity index 53% rename from src/voxels/FlatWorldGenerator.h rename to src/voxels/FlatWorldGenerator.hpp index 8a735495..67189119 100644 --- a/src/voxels/FlatWorldGenerator.h +++ b/src/voxels/FlatWorldGenerator.hpp @@ -1,8 +1,8 @@ -#ifndef VOXELS_FLATWORLDGENERATOR_H_ -#define VOXELS_FLATWORLDGENERATOR_H_ +#ifndef VOXELS_FLATWORLDGENERATOR_HPP_ +#define VOXELS_FLATWORLDGENERATOR_HPP_ -#include "../typedefs.h" -#include "../voxels/WorldGenerator.h" +#include "../typedefs.hpp" +#include "../voxels/WorldGenerator.hpp" struct voxel; class Content; @@ -15,4 +15,4 @@ public: void generate(voxel* voxels, int x, int z, int seed); }; -#endif /* VOXELS_FLATWORLDGENERATOR_H_ */ \ No newline at end of file +#endif /* VOXELS_FLATWORLDGENERATOR_HPP_ */ diff --git a/src/voxels/VoxelsVolume.cpp b/src/voxels/VoxelsVolume.cpp index a616d873..73bff62c 100644 --- a/src/voxels/VoxelsVolume.cpp +++ b/src/voxels/VoxelsVolume.cpp @@ -1,4 +1,4 @@ -#include "VoxelsVolume.h" +#include "VoxelsVolume.hpp" VoxelsVolume::VoxelsVolume(int x, int y, int z, int w, int h, int d) : x(x), y(y), z(z), w(w), h(h), d(d) { diff --git a/src/voxels/VoxelsVolume.h b/src/voxels/VoxelsVolume.hpp similarity index 80% rename from src/voxels/VoxelsVolume.h rename to src/voxels/VoxelsVolume.hpp index 32f064b4..30406891 100644 --- a/src/voxels/VoxelsVolume.h +++ b/src/voxels/VoxelsVolume.hpp @@ -1,9 +1,9 @@ -#ifndef VOXELS_VOXELSVOLUME_H_ -#define VOXELS_VOXELSVOLUME_H_ +#ifndef VOXELS_VOXELSVOLUME_HPP_ +#define VOXELS_VOXELSVOLUME_HPP_ -#include "../typedefs.h" -#include "../constants.h" -#include "voxel.h" +#include "../typedefs.hpp" +#include "../constants.hpp" +#include "voxel.hpp" class VoxelsVolume { int x, y, z; @@ -64,4 +64,4 @@ public: } }; -#endif // VOXELS_VOXELSVOLUME_H_ \ No newline at end of file +#endif // VOXELS_VOXELSVOLUME_HPP_ diff --git a/src/voxels/WorldGenerator.cpp b/src/voxels/WorldGenerator.cpp index 3770e0a3..f9d07d08 100644 --- a/src/voxels/WorldGenerator.cpp +++ b/src/voxels/WorldGenerator.cpp @@ -1,9 +1,9 @@ -#include "WorldGenerator.h" -#include "voxel.h" -#include "Chunk.h" -#include "Block.h" +#include "WorldGenerator.hpp" +#include "voxel.hpp" +#include "Chunk.hpp" +#include "Block.hpp" -#include "../content/Content.h" +#include "../content/Content.hpp" WorldGenerator::WorldGenerator(const Content* content) : idStone(content->requireBlock("base:stone").rt.id), @@ -15,4 +15,4 @@ WorldGenerator::WorldGenerator(const Content* content) idLeaves(content->requireBlock("base:leaves").rt.id), idGrass(content->requireBlock("base:grass").rt.id), idFlower(content->requireBlock("base:flower").rt.id), - idBazalt(content->requireBlock("base:bazalt").rt.id) {} \ No newline at end of file + idBazalt(content->requireBlock("base:bazalt").rt.id) {} diff --git a/src/voxels/WorldGenerator.h b/src/voxels/WorldGenerator.hpp similarity index 78% rename from src/voxels/WorldGenerator.h rename to src/voxels/WorldGenerator.hpp index 137f5aa5..0fa43eb4 100644 --- a/src/voxels/WorldGenerator.h +++ b/src/voxels/WorldGenerator.hpp @@ -1,7 +1,7 @@ -#ifndef VOXELS_WORLDGENERATOR_H_ -#define VOXELS_WORLDGENERATOR_H_ +#ifndef VOXELS_WORLDGENERATOR_HPP_ +#define VOXELS_WORLDGENERATOR_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include struct voxel; @@ -26,4 +26,4 @@ public: virtual void generate(voxel* voxels, int x, int z, int seed) = 0; }; -#endif /* VOXELS_WORLDGENERATOR_H_ */ \ No newline at end of file +#endif /* VOXELS_WORLDGENERATOR_HPP_ */ diff --git a/src/voxels/voxel.cpp b/src/voxels/voxel.cpp index 4a391ec7..228c462a 100644 --- a/src/voxels/voxel.cpp +++ b/src/voxels/voxel.cpp @@ -1,2 +1,2 @@ -#include "voxel.h" +#include "voxel.hpp" diff --git a/src/voxels/voxel.h b/src/voxels/voxel.hpp similarity index 84% rename from src/voxels/voxel.h rename to src/voxels/voxel.hpp index 117f4490..9f629b21 100644 --- a/src/voxels/voxel.h +++ b/src/voxels/voxel.hpp @@ -1,7 +1,7 @@ -#ifndef VOXELS_VOXEL_H_ -#define VOXELS_VOXEL_H_ +#ifndef VOXELS_VOXEL_HPP_ +#define VOXELS_VOXEL_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" const int BLOCK_DIR_NORTH = 0x0; const int BLOCK_DIR_WEST = 0x1; @@ -28,4 +28,4 @@ struct voxel { } }; -#endif /* VOXELS_VOXEL_H_ */ +#endif /* VOXELS_VOXEL_HPP_ */ diff --git a/src/window/Events.cpp b/src/window/Events.cpp index e5cee667..940a0786 100644 --- a/src/window/Events.cpp +++ b/src/window/Events.cpp @@ -147,8 +147,8 @@ void Events::setPosition(float xpos, float ypos) { Events::cursor.y = ypos; } -#include "../data/dynamic.h" -#include "../coders/json.h" +#include "../data/dynamic.hpp" +#include "../coders/json.hpp" std::string Events::writeBindings() { dynamic::Map obj; diff --git a/src/window/Events.hpp b/src/window/Events.hpp index b7cd5a4d..fbc69cb4 100644 --- a/src/window/Events.hpp +++ b/src/window/Events.hpp @@ -6,7 +6,7 @@ #include #include #include -#include "../typedefs.h" +#include "../typedefs.hpp" inline constexpr short KEYS_BUFFER_SIZE = 1036; diff --git a/src/window/Window.cpp b/src/window/Window.cpp index 6b73dad8..b8a22edb 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -4,7 +4,7 @@ #include "../debug/Logger.hpp" #include "../graphics/core/ImageData.hpp" #include "../graphics/core/Texture.hpp" -#include "../settings.h" +#include "../settings.hpp" #include "../util/ObjectsKeeper.hpp" #include diff --git a/src/window/Window.hpp b/src/window/Window.hpp index 758d9d5f..b301f6ad 100644 --- a/src/window/Window.hpp +++ b/src/window/Window.hpp @@ -1,7 +1,7 @@ #ifndef WINDOW_WINDOW_HPP_ #define WINDOW_WINDOW_HPP_ -#include "../typedefs.h" +#include "../typedefs.hpp" #include #include diff --git a/src/world/Level.cpp b/src/world/Level.cpp index f6f305a4..f4b7610c 100644 --- a/src/world/Level.cpp +++ b/src/world/Level.cpp @@ -1,16 +1,16 @@ -#include "Level.h" -#include "World.h" -#include "LevelEvents.h" -#include "../content/Content.h" -#include "../lighting/Lighting.h" -#include "../voxels/Chunk.h" -#include "../voxels/Chunks.h" -#include "../voxels/ChunksStorage.h" -#include "../physics/Hitbox.h" -#include "../physics/PhysicsSolver.h" -#include "../objects/Player.h" -#include "../items/Inventory.h" -#include "../items/Inventories.h" +#include "Level.hpp" +#include "World.hpp" +#include "LevelEvents.hpp" +#include "../content/Content.hpp" +#include "../lighting/Lighting.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/Chunks.hpp" +#include "../voxels/ChunksStorage.hpp" +#include "../physics/Hitbox.hpp" +#include "../physics/PhysicsSolver.hpp" +#include "../objects/Player.hpp" +#include "../items/Inventory.hpp" +#include "../items/Inventories.hpp" Level::Level(World* world, const Content* content, EngineSettings& settings) : world(world), diff --git a/src/world/Level.h b/src/world/Level.hpp similarity index 93% rename from src/world/Level.h rename to src/world/Level.hpp index 24b7e804..d8248153 100644 --- a/src/world/Level.h +++ b/src/world/Level.hpp @@ -1,8 +1,8 @@ -#ifndef WORLD_LEVEL_H_ -#define WORLD_LEVEL_H_ +#ifndef WORLD_LEVEL_HPP_ +#define WORLD_LEVEL_HPP_ -#include "../settings.h" -#include "../interfaces/Object.h" +#include "../settings.hpp" +#include "../interfaces/Object.hpp" #include #include @@ -69,4 +69,4 @@ public: } }; -#endif /* WORLD_LEVEL_H_ */ +#endif /* WORLD_LEVEL_HPP_ */ diff --git a/src/world/LevelEvents.cpp b/src/world/LevelEvents.cpp index 260aecb5..59a910b4 100644 --- a/src/world/LevelEvents.cpp +++ b/src/world/LevelEvents.cpp @@ -1,5 +1,5 @@ -#include "LevelEvents.h" -#include "../voxels/Chunk.h" +#include "LevelEvents.hpp" +#include "../voxels/Chunk.hpp" using std::vector; @@ -13,4 +13,4 @@ void LevelEvents::trigger(lvl_event_type type, Chunk* chunk) { for (chunk_event_func func : callbacks) { func(type, chunk); } -} \ No newline at end of file +} diff --git a/src/world/LevelEvents.h b/src/world/LevelEvents.h deleted file mode 100644 index ae4362b9..00000000 --- a/src/world/LevelEvents.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef WORLD_LEVEL_EVENTS_H_ -#define WORLD_LEVEL_EVENTS_H_ - -#include -#include -#include - -class Chunk; - -enum lvl_event_type { - EVT_CHUNK_HIDDEN, -}; - -typedef std::function chunk_event_func; - -class LevelEvents { - std::unordered_map> chunk_callbacks; -public: - void listen(lvl_event_type type, chunk_event_func func); - void trigger(lvl_event_type type, Chunk* chunk); -}; - -#endif // WORLD_LEVEL_EVENTS_H_ \ No newline at end of file diff --git a/src/world/LevelEvents.hpp b/src/world/LevelEvents.hpp new file mode 100644 index 00000000..bdbe07ab --- /dev/null +++ b/src/world/LevelEvents.hpp @@ -0,0 +1,23 @@ +#ifndef WORLD_LEVEL_EVENTS_HPP_ +#define WORLD_LEVEL_EVENTS_HPP_ + +#include +#include +#include + +class Chunk; + +enum lvl_event_type { + EVT_CHUNK_HIDDEN, +}; + +typedef std::function chunk_event_func; + +class LevelEvents { + std::unordered_map> chunk_callbacks; +public: + void listen(lvl_event_type type, chunk_event_func func); + void trigger(lvl_event_type type, Chunk* chunk); +}; + +#endif // WORLD_LEVEL_EVENTS_HPP_ diff --git a/src/world/World.cpp b/src/world/World.cpp index 97e4303d..d774fc33 100644 --- a/src/world/World.cpp +++ b/src/world/World.cpp @@ -1,16 +1,16 @@ -#include "World.h" +#include "World.hpp" -#include "Level.h" -#include "../content/Content.h" +#include "Level.hpp" +#include "../content/Content.hpp" #include "../content/ContentLUT.hpp" -#include "../files/WorldFiles.h" -#include "../items/Inventories.h" -#include "../objects/Player.h" -#include "../voxels/Chunk.h" -#include "../voxels/Chunks.h" -#include "../voxels/ChunksStorage.h" +#include "../files/WorldFiles.hpp" +#include "../items/Inventories.hpp" +#include "../objects/Player.hpp" +#include "../voxels/Chunk.hpp" +#include "../voxels/Chunks.hpp" +#include "../voxels/ChunksStorage.hpp" #include "../window/Camera.hpp" -#include "../world/WorldGenerators.h" +#include "../world/WorldGenerators.hpp" #include #include diff --git a/src/world/World.h b/src/world/World.hpp similarity index 93% rename from src/world/World.h rename to src/world/World.hpp index c8f9d6cc..1c5d4e70 100644 --- a/src/world/World.h +++ b/src/world/World.hpp @@ -1,17 +1,18 @@ -#ifndef WORLD_WORLD_H_ -#define WORLD_WORLD_H_ +#ifndef WORLD_WORLD_HPP_ +#define WORLD_WORLD_HPP_ + +#include "../typedefs.hpp" +#include "../settings.hpp" +#include "../util/timeutil.hpp" +#include "../data/dynamic.hpp" +#include "../interfaces/Serializable.hpp" +#include "../content/ContentPack.hpp" #include #include #include #include #include -#include "../typedefs.h" -#include "../settings.h" -#include "../util/timeutil.h" -#include "../data/dynamic.h" -#include "../interfaces/Serializable.h" -#include "../content/ContentPack.h" class Content; class WorldFiles; @@ -147,4 +148,4 @@ public: void deserialize(dynamic::Map *src) override; }; -#endif /* WORLD_WORLD_H_ */ +#endif /* WORLD_WORLD_HPP_ */ diff --git a/src/world/WorldGenerators.cpp b/src/world/WorldGenerators.cpp index 78e7bc0e..34b9719d 100644 --- a/src/world/WorldGenerators.cpp +++ b/src/world/WorldGenerators.cpp @@ -1,7 +1,7 @@ -#include "WorldGenerators.h" -#include "../voxels/WorldGenerator.h" -#include "../voxels/FlatWorldGenerator.h" -#include "../content/Content.h" +#include "WorldGenerators.hpp" +#include "../voxels/WorldGenerator.hpp" +#include "../voxels/FlatWorldGenerator.hpp" +#include "../content/Content.hpp" #include std::vector WorldGenerators::getGeneratorsIDs() { diff --git a/src/world/WorldGenerators.h b/src/world/WorldGenerators.hpp similarity index 76% rename from src/world/WorldGenerators.h rename to src/world/WorldGenerators.hpp index 01940394..772c7935 100644 --- a/src/world/WorldGenerators.h +++ b/src/world/WorldGenerators.hpp @@ -1,8 +1,8 @@ -#ifndef WORLD_WORLDGENERATORS_H_ -#define WORLD_WORLDGENERATORS_H_ +#ifndef WORLD_WORLDGENERATORS_HPP_ +#define WORLD_WORLDGENERATORS_HPP_ -#include "../voxels/WorldGenerator.h" -#include "../content/Content.h" +#include "../voxels/WorldGenerator.hpp" +#include "../content/Content.hpp" #include #include #include @@ -35,4 +35,4 @@ void WorldGenerators::addGenerator(std::string id) { }; } -#endif /* WORLD_WORLDGENERATORS_H_ */ +#endif /* WORLD_WORLDGENERATORS_HPP_ */