refactor
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include "../graphics/core/Font.h"
|
#include "../graphics/core/Font.h"
|
||||||
#include "../graphics/core/GfxContext.h"
|
#include "../graphics/core/GfxContext.h"
|
||||||
#include "../graphics/core/Shader.h"
|
#include "../graphics/core/Shader.h"
|
||||||
|
#include "../graphics/render/BlocksPreview.h"
|
||||||
#include "../graphics/ui/elements/containers.h"
|
#include "../graphics/ui/elements/containers.h"
|
||||||
#include "../graphics/ui/elements/controls.h"
|
#include "../graphics/ui/elements/controls.h"
|
||||||
#include "../items/Inventories.h"
|
#include "../items/Inventories.h"
|
||||||
@@ -23,7 +24,6 @@
|
|||||||
#include "../window/Events.h"
|
#include "../window/Events.h"
|
||||||
#include "../window/input.h"
|
#include "../window/input.h"
|
||||||
#include "../world/Level.h"
|
#include "../world/Level.h"
|
||||||
#include "BlocksPreview.h"
|
|
||||||
#include "LevelFrontend.h"
|
#include "LevelFrontend.h"
|
||||||
|
|
||||||
SlotLayout::SlotLayout(
|
SlotLayout::SlotLayout(
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
#include "LevelFrontend.h"
|
#include "LevelFrontend.h"
|
||||||
|
|
||||||
#include "BlocksPreview.h"
|
|
||||||
#include "ContentGfxCache.h"
|
|
||||||
|
|
||||||
#include "../audio/audio.h"
|
|
||||||
#include "../world/Level.h"
|
|
||||||
#include "../voxels/Block.h"
|
|
||||||
#include "../assets/Assets.h"
|
#include "../assets/Assets.h"
|
||||||
#include "../graphics/core/Atlas.h"
|
#include "../audio/audio.h"
|
||||||
#include "../content/Content.h"
|
#include "../content/Content.h"
|
||||||
|
#include "../graphics/core/Atlas.h"
|
||||||
|
#include "../graphics/render/BlocksPreview.h"
|
||||||
#include "../logic/LevelController.h"
|
#include "../logic/LevelController.h"
|
||||||
#include "../logic/PlayerController.h"
|
#include "../logic/PlayerController.h"
|
||||||
|
#include "../voxels/Block.h"
|
||||||
|
#include "../world/Level.h"
|
||||||
|
#include "ContentGfxCache.h"
|
||||||
|
|
||||||
LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets)
|
LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets)
|
||||||
: level(controller->getLevel()),
|
: level(controller->getLevel()),
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "../engine.h"
|
#include "../engine.h"
|
||||||
#include "../graphics/core/Mesh.h"
|
#include "../graphics/core/Mesh.h"
|
||||||
#include "../graphics/ui/elements/controls.h"
|
#include "../graphics/ui/elements/controls.h"
|
||||||
|
#include "../graphics/render/WorldRenderer.h"
|
||||||
#include "../objects/Player.h"
|
#include "../objects/Player.h"
|
||||||
#include "../physics/Hitbox.h"
|
#include "../physics/Hitbox.h"
|
||||||
#include "../util/stringutil.h"
|
#include "../util/stringutil.h"
|
||||||
@@ -15,8 +16,6 @@
|
|||||||
#include "../world/Level.h"
|
#include "../world/Level.h"
|
||||||
#include "../world/World.h"
|
#include "../world/World.h"
|
||||||
|
|
||||||
#include "WorldRenderer.h"
|
|
||||||
|
|
||||||
using namespace gui;
|
using namespace gui;
|
||||||
|
|
||||||
static std::shared_ptr<Label> create_label(wstringsupplier supplier) {
|
static std::shared_ptr<Label> create_label(wstringsupplier supplier) {
|
||||||
|
|||||||
+39
-39
@@ -1,56 +1,56 @@
|
|||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <sstream>
|
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
#include "../typedefs.h"
|
|
||||||
#include "../content/Content.h"
|
|
||||||
#include "../util/stringutil.h"
|
|
||||||
#include "../util/timeutil.h"
|
|
||||||
#include "../assets/Assets.h"
|
#include "../assets/Assets.h"
|
||||||
#include "../graphics/core/Shader.h"
|
#include "../content/Content.h"
|
||||||
|
#include "../core_defs.h"
|
||||||
|
#include "../delegates.h"
|
||||||
|
#include "../engine.h"
|
||||||
|
#include "../graphics/core/Atlas.h"
|
||||||
#include "../graphics/core/Batch2D.h"
|
#include "../graphics/core/Batch2D.h"
|
||||||
#include "../graphics/core/Batch3D.h"
|
#include "../graphics/core/Batch3D.h"
|
||||||
#include "../graphics/core/Font.h"
|
#include "../graphics/core/Font.h"
|
||||||
#include "../graphics/core/Atlas.h"
|
|
||||||
#include "../graphics/core/Mesh.h"
|
|
||||||
#include "../graphics/core/Texture.h"
|
|
||||||
#include "../graphics/core/GfxContext.h"
|
#include "../graphics/core/GfxContext.h"
|
||||||
#include "../window/Camera.h"
|
#include "../graphics/core/Mesh.h"
|
||||||
#include "../window/Window.h"
|
#include "../graphics/core/Shader.h"
|
||||||
#include "../window/Events.h"
|
#include "../graphics/core/Texture.h"
|
||||||
#include "../window/input.h"
|
#include "../graphics/render/BlocksPreview.h"
|
||||||
#include "../voxels/Chunks.h"
|
#include "../graphics/render/WorldRenderer.h"
|
||||||
#include "../voxels/Block.h"
|
|
||||||
#include "../voxels/Chunk.h"
|
|
||||||
#include "../world/World.h"
|
|
||||||
#include "../world/Level.h"
|
|
||||||
#include "../objects/Player.h"
|
|
||||||
#include "../physics/Hitbox.h"
|
|
||||||
#include "../maths/voxmaths.h"
|
|
||||||
#include "../graphics/ui/elements/controls.h"
|
|
||||||
#include "../graphics/ui/elements/containers.h"
|
#include "../graphics/ui/elements/containers.h"
|
||||||
|
#include "../graphics/ui/elements/controls.h"
|
||||||
#include "../graphics/ui/elements/UINode.h"
|
#include "../graphics/ui/elements/UINode.h"
|
||||||
#include "../graphics/ui/GUI.h"
|
#include "../graphics/ui/GUI.h"
|
||||||
|
#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 "../util/stringutil.h"
|
||||||
|
#include "../util/timeutil.h"
|
||||||
|
#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 "../world/Level.h"
|
||||||
|
#include "../world/World.h"
|
||||||
#include "ContentGfxCache.h"
|
#include "ContentGfxCache.h"
|
||||||
#include "menu/menu.h"
|
|
||||||
#include "screens.h"
|
|
||||||
#include "WorldRenderer.h"
|
|
||||||
#include "BlocksPreview.h"
|
|
||||||
#include "InventoryView.h"
|
#include "InventoryView.h"
|
||||||
#include "LevelFrontend.h"
|
#include "LevelFrontend.h"
|
||||||
|
#include "menu/menu.h"
|
||||||
|
#include "screens.h"
|
||||||
#include "UiDocument.h"
|
#include "UiDocument.h"
|
||||||
#include "../engine.h"
|
|
||||||
#include "../delegates.h"
|
#include <assert.h>
|
||||||
#include "../core_defs.h"
|
#include <iostream>
|
||||||
#include "../items/ItemDef.h"
|
#include <memory>
|
||||||
#include "../items/Inventory.h"
|
#include <sstream>
|
||||||
#include "../items/Inventories.h"
|
#include <stdexcept>
|
||||||
#include "../logic/scripting/scripting.h"
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
// implemented in debug_panel.cpp
|
// implemented in debug_panel.cpp
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "../graphics/core/GfxContext.h"
|
#include "../graphics/core/GfxContext.h"
|
||||||
#include "../graphics/core/Shader.h"
|
#include "../graphics/core/Shader.h"
|
||||||
#include "../graphics/core/TextureAnimation.h"
|
#include "../graphics/core/TextureAnimation.h"
|
||||||
|
#include "../graphics/render/WorldRenderer.h"
|
||||||
#include "../graphics/ui/elements/containers.h"
|
#include "../graphics/ui/elements/containers.h"
|
||||||
#include "../graphics/ui/GUI.h"
|
#include "../graphics/ui/GUI.h"
|
||||||
#include "../logic/ChunksController.h"
|
#include "../logic/ChunksController.h"
|
||||||
@@ -31,7 +32,6 @@
|
|||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
#include "LevelFrontend.h"
|
#include "LevelFrontend.h"
|
||||||
#include "menu/menu.h"
|
#include "menu/menu.h"
|
||||||
#include "WorldRenderer.h"
|
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|||||||
@@ -2,20 +2,20 @@
|
|||||||
|
|
||||||
#include <glm/ext.hpp>
|
#include <glm/ext.hpp>
|
||||||
|
|
||||||
#include "../assets/Assets.h"
|
#include "../../assets/Assets.h"
|
||||||
#include "../graphics/core/Viewport.h"
|
#include "../../constants.h"
|
||||||
#include "../graphics/core/Texture.h"
|
#include "../../content/Content.h"
|
||||||
#include "../graphics/core/Atlas.h"
|
#include "../../frontend/ContentGfxCache.h"
|
||||||
#include "../graphics/core/Batch3D.h"
|
#include "../../voxels/Block.h"
|
||||||
#include "../graphics/core/Framebuffer.h"
|
#include "../../window/Camera.h"
|
||||||
#include "../graphics/core/GfxContext.h"
|
#include "../../window/Window.h"
|
||||||
#include "../graphics/core/Shader.h"
|
#include "../core/Atlas.h"
|
||||||
#include "../window/Window.h"
|
#include "../core/Batch3D.h"
|
||||||
#include "../window/Camera.h"
|
#include "../core/Framebuffer.h"
|
||||||
#include "../voxels/Block.h"
|
#include "../core/GfxContext.h"
|
||||||
#include "../content/Content.h"
|
#include "../core/Shader.h"
|
||||||
#include "../constants.h"
|
#include "../core/Texture.h"
|
||||||
#include "ContentGfxCache.h"
|
#include "../core/Viewport.h"
|
||||||
|
|
||||||
ImageData* BlocksPreview::draw(
|
ImageData* BlocksPreview::draw(
|
||||||
const ContentGfxCache* cache,
|
const ContentGfxCache* cache,
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
#ifndef FRONTEND_BLOCKS_PREVIEW_H_
|
#ifndef GRAPHICS_RENDER_BLOCKS_PREVIEW_H_
|
||||||
#define FRONTEND_BLOCKS_PREVIEW_H_
|
#define GRAPHICS_RENDER_BLOCKS_PREVIEW_H_
|
||||||
|
|
||||||
|
#include "../../typedefs.h"
|
||||||
|
|
||||||
#include "../typedefs.h"
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@@ -32,4 +33,4 @@ public:
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FRONTEND_BLOCKS_PREVIEW_H_
|
#endif // GRAPHICS_RENDER_BLOCKS_PREVIEW_H_
|
||||||
@@ -1,40 +1,41 @@
|
|||||||
#include "WorldRenderer.h"
|
#include "WorldRenderer.h"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <GL/glew.h>
|
|
||||||
#include <memory>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "../assets/Assets.h"
|
#include "../../assets/Assets.h"
|
||||||
#include "../content/Content.h"
|
#include "../../content/Content.h"
|
||||||
#include "../engine.h"
|
#include "../../engine.h"
|
||||||
#include "../graphics/core/Atlas.h"
|
#include "../../frontend/LevelFrontend.h"
|
||||||
#include "../graphics/core/Batch3D.h"
|
#include "../../items/Inventory.h"
|
||||||
#include "../graphics/core/GfxContext.h"
|
#include "../../items/ItemDef.h"
|
||||||
#include "../graphics/core/LineBatch.h"
|
#include "../../items/ItemStack.h"
|
||||||
#include "../graphics/core/Mesh.h"
|
#include "../../logic/PlayerController.h"
|
||||||
#include "../graphics/core/PostProcessing.h"
|
#include "../../maths/FrustumCulling.h"
|
||||||
#include "../graphics/core/Shader.h"
|
#include "../../maths/voxmaths.h"
|
||||||
#include "../graphics/core/Texture.h"
|
#include "../../objects/Player.h"
|
||||||
#include "../graphics/render/ChunksRenderer.h"
|
#include "../../settings.h"
|
||||||
#include "../graphics/render/Skybox.h"
|
#include "../../voxels/Block.h"
|
||||||
#include "../items/Inventory.h"
|
#include "../../voxels/Chunk.h"
|
||||||
#include "../items/ItemDef.h"
|
#include "../../voxels/Chunks.h"
|
||||||
#include "../items/ItemStack.h"
|
#include "../../window/Camera.h"
|
||||||
#include "../logic/PlayerController.h"
|
#include "../../window/Window.h"
|
||||||
#include "../maths/FrustumCulling.h"
|
#include "../../world/Level.h"
|
||||||
#include "../maths/voxmaths.h"
|
#include "../../world/LevelEvents.h"
|
||||||
#include "../objects/Player.h"
|
#include "../../world/World.h"
|
||||||
#include "../settings.h"
|
#include "../core/Atlas.h"
|
||||||
#include "../voxels/Block.h"
|
#include "../core/Batch3D.h"
|
||||||
#include "../voxels/Chunk.h"
|
#include "../core/GfxContext.h"
|
||||||
#include "../voxels/Chunks.h"
|
#include "../core/LineBatch.h"
|
||||||
#include "../window/Camera.h"
|
#include "../core/Mesh.h"
|
||||||
#include "../window/Window.h"
|
#include "../core/PostProcessing.h"
|
||||||
#include "../world/Level.h"
|
#include "../core/Shader.h"
|
||||||
#include "../world/LevelEvents.h"
|
#include "../core/Texture.h"
|
||||||
#include "../world/World.h"
|
#include "ChunksRenderer.h"
|
||||||
#include "LevelFrontend.h"
|
#include "Skybox.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* player)
|
WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* player)
|
||||||
: engine(engine),
|
: engine(engine),
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WORLD_RENDERER_CPP
|
#ifndef GRAPHICS_RENDER_WORLD_RENDERER_H_
|
||||||
#define WORLD_RENDERER_CPP
|
#define GRAPHICS_RENDER_WORLD_RENDERER_H_
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -77,4 +77,4 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // WORLD_RENDERER_CPP
|
#endif // GRAPHICS_RENDER_WORLD_RENDERER_H_
|
||||||
Reference in New Issue
Block a user