minor refactor
This commit is contained in:
parent
75e56ebd83
commit
7f8a86b740
@ -1,4 +1,4 @@
|
||||
#include "toml.h"
|
||||
#include "toml.hpp"
|
||||
#include "commons.h"
|
||||
#include "../data/setting.hpp"
|
||||
#include "../data/dynamic.h"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_TOML_H_
|
||||
#define CODERS_TOML_H_
|
||||
#ifndef CODERS_TOML_HPP_
|
||||
#define CODERS_TOML_HPP_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -19,4 +19,4 @@ namespace toml {
|
||||
);
|
||||
}
|
||||
|
||||
#endif // CODERS_TOML_H_
|
||||
#endif // CODERS_TOML_HPP_
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
#include "items/ItemDef.h"
|
||||
#include "content/Content.h"
|
||||
#include "window/Window.h"
|
||||
#include "window/Events.h"
|
||||
#include "window/input.h"
|
||||
#include "window/Window.hpp"
|
||||
#include "window/Events.hpp"
|
||||
#include "window/input.hpp"
|
||||
#include "voxels/Block.h"
|
||||
|
||||
// All in-game definitions (blocks, items, etc..)
|
||||
@ -40,4 +40,4 @@ void corecontent::setup_bindings() {
|
||||
Events::bind(BIND_PLAYER_BUILD, inputtype::mouse, mousecode::BUTTON_2);
|
||||
Events::bind(BIND_PLAYER_PICK, inputtype::mouse, mousecode::BUTTON_3);
|
||||
Events::bind(BIND_HUD_INVENTORY, inputtype::keyboard, keycode::TAB);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include "coders/GLSLExtension.h"
|
||||
#include "coders/imageio.hpp"
|
||||
#include "coders/json.h"
|
||||
#include "coders/toml.h"
|
||||
#include "coders/toml.hpp"
|
||||
#include "content/ContentLoader.h"
|
||||
#include "core_defs.h"
|
||||
#include "files/files.h"
|
||||
@ -28,10 +28,10 @@
|
||||
#include "util/platform.h"
|
||||
#include "voxels/DefaultWorldGenerator.h"
|
||||
#include "voxels/FlatWorldGenerator.h"
|
||||
#include "window/Camera.h"
|
||||
#include "window/Events.h"
|
||||
#include "window/input.h"
|
||||
#include "window/Window.h"
|
||||
#include "window/Camera.hpp"
|
||||
#include "window/Events.hpp"
|
||||
#include "window/input.hpp"
|
||||
#include "window/Window.hpp"
|
||||
#include "world/WorldGenerators.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#include "../voxels/Block.h"
|
||||
#include "../voxels/Chunk.h"
|
||||
#include "../voxels/voxel.h"
|
||||
#include "../window/Camera.h"
|
||||
#include "../window/Camera.hpp"
|
||||
#include "../world/World.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
#include "settings_io.hpp"
|
||||
|
||||
#include "../window/Events.h"
|
||||
#include "../window/input.h"
|
||||
#include "../coders/toml.h"
|
||||
#include "../window/Events.hpp"
|
||||
#include "../window/input.hpp"
|
||||
#include "../coders/toml.hpp"
|
||||
#include "../coders/json.h"
|
||||
#include "../debug/Logger.hpp"
|
||||
#include "../settings.h"
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
#include "../graphics/core/Atlas.hpp"
|
||||
#include "../graphics/core/Batch2D.hpp"
|
||||
#include "../graphics/core/Batch3D.hpp"
|
||||
#include "../graphics/core/Font.hpp"
|
||||
#include "../graphics/core/DrawContext.hpp"
|
||||
#include "../graphics/core/Font.hpp"
|
||||
#include "../graphics/core/Mesh.hpp"
|
||||
#include "../graphics/core/Shader.hpp"
|
||||
#include "../graphics/core/Texture.hpp"
|
||||
@ -33,10 +33,10 @@
|
||||
#include "../voxels/Block.h"
|
||||
#include "../voxels/Chunk.h"
|
||||
#include "../voxels/Chunks.h"
|
||||
#include "../window/Camera.h"
|
||||
#include "../window/Events.h"
|
||||
#include "../window/input.h"
|
||||
#include "../window/Window.h"
|
||||
#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 "ContentGfxCache.h"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include "../logic/scripting/scripting.h"
|
||||
#include "../settings.h"
|
||||
#include "../util/stringutil.h"
|
||||
#include "../window/Window.h"
|
||||
#include "../window/Window.hpp"
|
||||
#include "locale/langs.h"
|
||||
#include "UiDocument.h"
|
||||
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
#include "../../voxels/Chunks.h"
|
||||
#include "../../world/Level.h"
|
||||
#include "../../world/World.h"
|
||||
#include "../../window/Camera.h"
|
||||
#include "../../window/Events.h"
|
||||
#include "../../window/Camera.hpp"
|
||||
#include "../../window/Events.hpp"
|
||||
#include "../../engine.h"
|
||||
|
||||
static debug::Logger logger("level-screen");
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
#include "../../graphics/core/Batch2D.hpp"
|
||||
#include "../../graphics/core/Shader.hpp"
|
||||
#include "../../graphics/core/Texture.hpp"
|
||||
#include "../../window/Window.h"
|
||||
#include "../../window/Camera.h"
|
||||
#include "../../window/Window.hpp"
|
||||
#include "../../window/Camera.hpp"
|
||||
#include "../../engine.h"
|
||||
|
||||
MenuScreen::MenuScreen(Engine* engine) : Screen(engine) {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include "commons.hpp"
|
||||
#include "Viewport.hpp"
|
||||
#include "../../window/Window.h"
|
||||
#include "../../window/Window.hpp"
|
||||
#include "../../typedefs.h"
|
||||
|
||||
class Batch2D;
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
#include "../../content/Content.h"
|
||||
#include "../../frontend/ContentGfxCache.h"
|
||||
#include "../../voxels/Block.h"
|
||||
#include "../../window/Camera.h"
|
||||
#include "../../window/Window.h"
|
||||
#include "../../window/Camera.hpp"
|
||||
#include "../../window/Window.hpp"
|
||||
#include "../core/Atlas.hpp"
|
||||
#include "../core/Batch3D.hpp"
|
||||
#include "../core/Framebuffer.hpp"
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
#include "../../graphics/core/Cubemap.hpp"
|
||||
#include "../../graphics/core/Framebuffer.hpp"
|
||||
#include "../../graphics/core/DrawContext.hpp"
|
||||
#include "../../window/Window.h"
|
||||
#include "../../window/Camera.h"
|
||||
#include "../../window/Window.hpp"
|
||||
#include "../../window/Camera.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <GL/glew.h>
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
#include "../../voxels/Block.h"
|
||||
#include "../../voxels/Chunk.h"
|
||||
#include "../../voxels/Chunks.h"
|
||||
#include "../../window/Camera.h"
|
||||
#include "../../window/Window.h"
|
||||
#include "../../window/Camera.hpp"
|
||||
#include "../../window/Window.hpp"
|
||||
#include "../../world/Level.h"
|
||||
#include "../../world/LevelEvents.h"
|
||||
#include "../../world/World.h"
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
#include "../../graphics/core/Batch2D.hpp"
|
||||
#include "../../graphics/core/Shader.hpp"
|
||||
#include "../../graphics/core/DrawContext.hpp"
|
||||
#include "../../window/Events.h"
|
||||
#include "../../window/input.h"
|
||||
#include "../../window/Camera.h"
|
||||
#include "../../window/Events.hpp"
|
||||
#include "../../window/input.hpp"
|
||||
#include "../../window/Camera.hpp"
|
||||
|
||||
using namespace gui;
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
#include "../../../objects/Player.h"
|
||||
#include "../../../util/stringutil.h"
|
||||
#include "../../../voxels/Block.h"
|
||||
#include "../../../window/Events.h"
|
||||
#include "../../../window/input.h"
|
||||
#include "../../../window/Events.hpp"
|
||||
#include "../../../window/input.hpp"
|
||||
#include "../../../world/Level.h"
|
||||
#include "../../core/Atlas.hpp"
|
||||
#include "../../core/Batch2D.hpp"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include "../../core/Font.hpp"
|
||||
#include "../../../assets/Assets.h"
|
||||
#include "../../../util/stringutil.h"
|
||||
#include "../../../window/Events.h"
|
||||
#include "../../../window/Events.hpp"
|
||||
|
||||
using namespace gui;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define GRAPHICS_UI_ELEMENTS_UINODE_H_
|
||||
|
||||
#include "../../../delegates.h"
|
||||
#include "../../../window/input.h"
|
||||
#include "../../../window/input.hpp"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <vector>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#include "../../logic/scripting/scripting.h"
|
||||
#include "../../maths/voxmaths.h"
|
||||
#include "../../util/stringutil.h"
|
||||
#include "../../window/Events.h"
|
||||
#include "../../window/Events.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
#include "../voxels/Block.h"
|
||||
#include "../voxels/voxel.h"
|
||||
#include "../voxels/Chunks.h"
|
||||
#include "../window/Camera.h"
|
||||
#include "../window/Events.h"
|
||||
#include "../window/input.h"
|
||||
#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"
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
#include "../../../logic/LevelController.h"
|
||||
#include "../../../logic/EngineController.hpp"
|
||||
#include "../../../world/Level.h"
|
||||
#include "../../../window/Events.h"
|
||||
#include "../../../window/Window.h"
|
||||
#include "../../../window/Events.hpp"
|
||||
#include "../../../window/Window.hpp"
|
||||
#include "../../../world/WorldGenerators.h"
|
||||
#include "../scripting.h"
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#include "lua_commons.h"
|
||||
#include "../scripting.h"
|
||||
|
||||
#include "../../../window/input.h"
|
||||
#include "../../../window/Events.h"
|
||||
#include "../../../window/input.hpp"
|
||||
#include "../../../window/Events.hpp"
|
||||
#include "../../../frontend/screens/Screen.hpp"
|
||||
#include "../../../frontend/hud.h"
|
||||
#include "../../../engine.h"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include "../../../world/Level.h"
|
||||
#include "../../../objects/Player.h"
|
||||
#include "../../../physics/Hitbox.h"
|
||||
#include "../../../window/Camera.h"
|
||||
#include "../../../window/Camera.hpp"
|
||||
#include "../../../items/Inventory.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "lua_commons.h"
|
||||
#include "../scripting.h"
|
||||
#include "../../../engine.h"
|
||||
#include "../../../window/Window.h"
|
||||
#include "../../../window/Window.hpp"
|
||||
|
||||
static int l_time_uptime(lua_State* L) {
|
||||
lua_pushnumber(L, Window::time());
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
#include "../physics/PhysicsSolver.h"
|
||||
#include "../voxels/Chunks.h"
|
||||
#include "../world/Level.h"
|
||||
#include "../window/Events.h"
|
||||
#include "../window/Camera.h"
|
||||
#include "../window/Events.hpp"
|
||||
#include "../window/Camera.hpp"
|
||||
#include "../items/Inventory.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
#include <filesystem>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "core_defs.h"
|
||||
@ -12,13 +7,11 @@
|
||||
#include "files/engine_paths.h"
|
||||
#include "util/platform.h"
|
||||
#include "util/command_line.hpp"
|
||||
#include "window/Events.h"
|
||||
#include "window/Events.hpp"
|
||||
#include "debug/Logger.hpp"
|
||||
|
||||
static debug::Logger logger("main");
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
debug::Logger::init("latest.log");
|
||||
|
||||
@ -27,7 +20,6 @@ int main(int argc, char** argv) {
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
platform::configure_encoding();
|
||||
fs::path userfiles = paths.getUserfiles();
|
||||
try {
|
||||
EngineSettings settings;
|
||||
SettingsHandler handler(settings);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "Camera.h"
|
||||
#include "Window.h"
|
||||
#include "Camera.hpp"
|
||||
#include "Window.hpp"
|
||||
|
||||
#include <glm/ext.hpp>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef WINDOW_CAMERA_H_
|
||||
#define WINDOW_CAMERA_H_
|
||||
#ifndef WINDOW_CAMERA_HPP_
|
||||
#define WINDOW_CAMERA_HPP_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
@ -31,4 +31,4 @@ public:
|
||||
float getFov() const;
|
||||
};
|
||||
|
||||
#endif /* WINDOW_CAMERA_H_ */
|
||||
#endif // WINDOW_CAMERA_HPP_
|
||||
@ -1,4 +1,5 @@
|
||||
#include "Events.h"
|
||||
#include "Events.hpp"
|
||||
#include "Window.hpp"
|
||||
#include "../debug/Logger.hpp"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
#ifndef WINDOW_EVENTS_H_
|
||||
#define WINDOW_EVENTS_H_
|
||||
#ifndef WINDOW_EVENTS_HPP_
|
||||
#define WINDOW_EVENTS_HPP_
|
||||
|
||||
#include "Window.h"
|
||||
#include "input.h"
|
||||
#include "input.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -54,4 +53,4 @@ public:
|
||||
static void loadBindings(const std::string& filename, const std::string& source);
|
||||
};
|
||||
|
||||
#endif /* WINDOW_EVENTS_H_ */
|
||||
#endif // WINDOW_EVENTS_HPP_
|
||||
@ -1,6 +1,6 @@
|
||||
#include <iostream>
|
||||
#include "Window.h"
|
||||
#include "Events.h"
|
||||
#include "Window.hpp"
|
||||
#include "Events.hpp"
|
||||
#include "../debug/Logger.hpp"
|
||||
#include "../graphics/core/ImageData.hpp"
|
||||
#include "../graphics/core/Texture.hpp"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef WINDOW_WINDOW_H_
|
||||
#define WINDOW_WINDOW_H_
|
||||
#ifndef WINDOW_WINDOW_HPP_
|
||||
#define WINDOW_WINDOW_HPP_
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
@ -61,4 +61,4 @@ public:
|
||||
static std::unique_ptr<ImageData> takeScreenshot();
|
||||
};
|
||||
|
||||
#endif /* WINDOW_WINDOW_H_ */
|
||||
#endif // WINDOW_WINDOW_HPP_
|
||||
@ -1,4 +1,4 @@
|
||||
#include "input.h"
|
||||
#include "input.hpp"
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef WINDOW_INPUT_H_
|
||||
#define WINDOW_INPUT_H_
|
||||
#ifndef WINDOW_INPUT_HPP_
|
||||
#define WINDOW_INPUT_HPP_
|
||||
|
||||
#include "../util/RunnablesList.hpp"
|
||||
|
||||
@ -154,4 +154,4 @@ struct Binding {
|
||||
};
|
||||
|
||||
|
||||
#endif // WINDOW_INPUT_H_
|
||||
#endif // WINDOW_INPUT_HPP_
|
||||
@ -13,7 +13,7 @@
|
||||
#include "../voxels/Chunks.h"
|
||||
#include "../voxels/ChunksStorage.h"
|
||||
#include "../objects/Player.h"
|
||||
#include "../window/Camera.h"
|
||||
#include "../window/Camera.hpp"
|
||||
#include "../items/Inventories.h"
|
||||
|
||||
world_load_error::world_load_error(std::string message)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user