mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
world/
This commit is contained in:
parent
5153152389
commit
9f9b9f2d64
31 changed files with 47 additions and 47 deletions
|
|
@ -36,7 +36,7 @@
|
||||||
#include "window/Events.hpp"
|
#include "window/Events.hpp"
|
||||||
#include "window/input.hpp"
|
#include "window/input.hpp"
|
||||||
#include "window/Window.hpp"
|
#include "window/Window.hpp"
|
||||||
#include "world/WorldGenerators.hpp"
|
#include <world/WorldGenerators.hpp>
|
||||||
#include <settings.hpp>
|
#include <settings.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include <voxels/Chunk.hpp>
|
#include <voxels/Chunk.hpp>
|
||||||
#include <voxels/voxel.hpp>
|
#include <voxels/voxel.hpp>
|
||||||
#include "../window/Camera.hpp"
|
#include "../window/Camera.hpp"
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
|
|
||||||
#define WORLD_FORMAT_MAGIC ".VOXWLD"
|
#define WORLD_FORMAT_MAGIC ".VOXWLD"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#include <logic/PlayerController.hpp>
|
#include <logic/PlayerController.hpp>
|
||||||
#include <objects/Player.hpp>
|
#include <objects/Player.hpp>
|
||||||
#include <voxels/Block.hpp>
|
#include <voxels/Block.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
|
|
||||||
LevelFrontend::LevelFrontend(
|
LevelFrontend::LevelFrontend(
|
||||||
Player* currentPlayer, LevelController* controller, Assets* assets
|
Player* currentPlayer, LevelController* controller, Assets* assets
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
#include <voxels/Block.hpp>
|
#include <voxels/Block.hpp>
|
||||||
#include <voxels/Chunk.hpp>
|
#include <voxels/Chunk.hpp>
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@
|
||||||
#include "../window/Events.hpp"
|
#include "../window/Events.hpp"
|
||||||
#include "../window/input.hpp"
|
#include "../window/input.hpp"
|
||||||
#include "../window/Window.hpp"
|
#include "../window/Window.hpp"
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
#include "../../window/Camera.hpp"
|
#include "../../window/Camera.hpp"
|
||||||
#include "../../window/Events.hpp"
|
#include "../../window/Events.hpp"
|
||||||
#include "../../window/Window.hpp"
|
#include "../../window/Window.hpp"
|
||||||
#include "../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
|
|
||||||
static debug::Logger logger("level-screen");
|
static debug::Logger logger("level-screen");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#include <debug/Logger.hpp>
|
#include <debug/Logger.hpp>
|
||||||
#include <graphics/core/Mesh.hpp>
|
#include <graphics/core/Mesh.hpp>
|
||||||
#include <voxels/Chunk.hpp>
|
#include <voxels/Chunk.hpp>
|
||||||
#include "../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include <settings.hpp>
|
#include <settings.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include "../../window/Camera.hpp"
|
#include "../../window/Camera.hpp"
|
||||||
#include "../../window/Window.hpp"
|
#include "../../window/Window.hpp"
|
||||||
#include "../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../../world/LevelEvents.hpp"
|
#include <world/LevelEvents.hpp>
|
||||||
#include "../../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include <graphics/core/Atlas.hpp>
|
#include <graphics/core/Atlas.hpp>
|
||||||
#include <graphics/core/Batch3D.hpp>
|
#include <graphics/core/Batch3D.hpp>
|
||||||
#include <graphics/core/DrawContext.hpp>
|
#include <graphics/core/DrawContext.hpp>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
#include <voxels/Block.hpp>
|
#include <voxels/Block.hpp>
|
||||||
#include "../../../window/Events.hpp"
|
#include "../../../window/Events.hpp"
|
||||||
#include "../../../window/input.hpp"
|
#include "../../../window/input.hpp"
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include <graphics/core/Atlas.hpp>
|
#include <graphics/core/Atlas.hpp>
|
||||||
#include <graphics/core/Batch2D.hpp>
|
#include <graphics/core/Batch2D.hpp>
|
||||||
#include <graphics/core/Font.hpp>
|
#include <graphics/core/Font.hpp>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
|
|
||||||
Inventories::Inventories(Level& level) : level(level) {
|
Inventories::Inventories(Level& level) : level(level) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
#include <voxels/Chunk.hpp>
|
#include <voxels/Chunk.hpp>
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include <voxels/voxel.hpp>
|
#include <voxels/voxel.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "scripting/scripting.hpp"
|
#include "scripting/scripting.hpp"
|
||||||
|
|
||||||
BlocksController::BlocksController(Level* level, uint padding)
|
BlocksController::BlocksController(Level* level, uint padding)
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include <voxels/ChunksStorage.hpp>
|
#include <voxels/ChunksStorage.hpp>
|
||||||
#include <voxels/WorldGenerator.hpp>
|
#include <voxels/WorldGenerator.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "../world/WorldGenerators.hpp"
|
#include <world/WorldGenerators.hpp>
|
||||||
|
|
||||||
const uint MAX_WORK_PER_FRAME = 128;
|
const uint MAX_WORK_PER_FRAME = 128;
|
||||||
const uint MIN_SURROUNDING = 9;
|
const uint MIN_SURROUNDING = 9;
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
#include <graphics/ui/gui_util.hpp>
|
#include <graphics/ui/gui_util.hpp>
|
||||||
#include "../interfaces/Task.hpp"
|
#include "../interfaces/Task.hpp"
|
||||||
#include <util/stringutil.hpp>
|
#include <util/stringutil.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "LevelController.hpp"
|
#include "LevelController.hpp"
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
#include <objects/Entities.hpp>
|
#include <objects/Entities.hpp>
|
||||||
#include "../physics/Hitbox.hpp"
|
#include "../physics/Hitbox.hpp"
|
||||||
#include <settings.hpp>
|
#include <settings.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "scripting/scripting.hpp"
|
#include "scripting/scripting.hpp"
|
||||||
|
|
||||||
static debug::Logger logger("level-control");
|
static debug::Logger logger("level-control");
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include "../window/Events.hpp"
|
#include "../window/Events.hpp"
|
||||||
#include "../window/Window.hpp"
|
#include "../window/Window.hpp"
|
||||||
#include "../window/input.hpp"
|
#include "../window/input.hpp"
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "BlocksController.hpp"
|
#include "BlocksController.hpp"
|
||||||
#include "scripting/scripting.hpp"
|
#include "scripting/scripting.hpp"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <voxels/Chunk.hpp>
|
#include <voxels/Chunk.hpp>
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include <voxels/voxel.hpp>
|
#include <voxels/voxel.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <content/Content.hpp>
|
#include <content/Content.hpp>
|
||||||
#include "../../../window/Camera.hpp"
|
#include "../../../window/Camera.hpp"
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@
|
||||||
#include <logic/LevelController.hpp>
|
#include <logic/LevelController.hpp>
|
||||||
#include "../../../window/Events.hpp"
|
#include "../../../window/Events.hpp"
|
||||||
#include "../../../window/Window.hpp"
|
#include "../../../window/Window.hpp"
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../../../world/WorldGenerators.hpp"
|
#include <world/WorldGenerators.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "../../../frontend/hud.hpp"
|
#include "../../../frontend/hud.hpp"
|
||||||
#include <objects/Entities.hpp>
|
#include <objects/Entities.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include <logic/LevelController.hpp>
|
#include <logic/LevelController.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
#include <graphics/ui/gui_util.hpp>
|
#include <graphics/ui/gui_util.hpp>
|
||||||
#include <items/Inventories.hpp>
|
#include <items/Inventories.hpp>
|
||||||
#include <util/stringutil.hpp>
|
#include <util/stringutil.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace gui;
|
using namespace gui;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
#include <voxels/Block.hpp>
|
#include <voxels/Block.hpp>
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include <voxels/voxel.hpp>
|
#include <voxels/voxel.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
namespace scripting {
|
namespace scripting {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <items/Inventories.hpp>
|
#include <items/Inventories.hpp>
|
||||||
#include <items/ItemStack.hpp>
|
#include <items/ItemStack.hpp>
|
||||||
#include <logic/BlocksController.hpp>
|
#include <logic/BlocksController.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
#include <engine.hpp>
|
#include <engine.hpp>
|
||||||
#include <files/WorldFiles.hpp>
|
#include <files/WorldFiles.hpp>
|
||||||
#include <files/engine_paths.hpp>
|
#include <files/engine_paths.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../../../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <objects/Player.hpp>
|
#include <objects/Player.hpp>
|
||||||
#include "../../../physics/Hitbox.hpp"
|
#include "../../../physics/Hitbox.hpp"
|
||||||
#include "../../../window/Camera.hpp"
|
#include "../../../window/Camera.hpp"
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "libentity.hpp"
|
#include "libentity.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
#include <assets/AssetsLoader.hpp>
|
#include <assets/AssetsLoader.hpp>
|
||||||
#include <engine.hpp>
|
#include <engine.hpp>
|
||||||
#include <files/engine_paths.hpp>
|
#include <files/engine_paths.hpp>
|
||||||
#include "../../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../../../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "api_lua.hpp"
|
#include "api_lua.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <util/stringutil.hpp>
|
#include <util/stringutil.hpp>
|
||||||
#include <util/timeutil.hpp>
|
#include <util/timeutil.hpp>
|
||||||
#include <voxels/Block.hpp>
|
#include <voxels/Block.hpp>
|
||||||
#include "../../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "lua/lua_engine.hpp"
|
#include "lua/lua_engine.hpp"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#include "rigging.hpp"
|
#include "rigging.hpp"
|
||||||
#include "../physics/Hitbox.hpp"
|
#include "../physics/Hitbox.hpp"
|
||||||
#include "../physics/PhysicsSolver.hpp"
|
#include "../physics/PhysicsSolver.hpp"
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
|
|
||||||
static debug::Logger logger("entities");
|
static debug::Logger logger("entities");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include "../window/Camera.hpp"
|
#include "../window/Camera.hpp"
|
||||||
#include "../window/Events.hpp"
|
#include "../window/Events.hpp"
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
|
|
||||||
const float CROUCH_SPEED_MUL = 0.35f;
|
const float CROUCH_SPEED_MUL = 0.35f;
|
||||||
const float RUN_SPEED_MUL = 1.5f;
|
const float RUN_SPEED_MUL = 1.5f;
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
#include "../maths/rays.hpp"
|
#include "../maths/rays.hpp"
|
||||||
#include "../maths/voxmaths.hpp"
|
#include "../maths/voxmaths.hpp"
|
||||||
#include <objects/Entities.hpp>
|
#include <objects/Entities.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/LevelEvents.hpp"
|
#include <world/LevelEvents.hpp>
|
||||||
#include "Block.hpp"
|
#include "Block.hpp"
|
||||||
#include "Chunk.hpp"
|
#include "Chunk.hpp"
|
||||||
#include "WorldGenerator.hpp"
|
#include "WorldGenerator.hpp"
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
#include "../maths/voxmaths.hpp"
|
#include "../maths/voxmaths.hpp"
|
||||||
#include <objects/Entities.hpp>
|
#include <objects/Entities.hpp>
|
||||||
#include <typedefs.hpp>
|
#include <typedefs.hpp>
|
||||||
#include "../world/Level.hpp"
|
#include <world/Level.hpp>
|
||||||
#include "../world/World.hpp"
|
#include <world/World.hpp>
|
||||||
#include "Block.hpp"
|
#include "Block.hpp"
|
||||||
#include "Chunk.hpp"
|
#include "Chunk.hpp"
|
||||||
#include "VoxelsVolume.hpp"
|
#include "VoxelsVolume.hpp"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
#include <voxels/Chunk.hpp>
|
#include <voxels/Chunk.hpp>
|
||||||
#include <voxels/Chunks.hpp>
|
#include <voxels/Chunks.hpp>
|
||||||
#include <voxels/ChunksStorage.hpp>
|
#include <voxels/ChunksStorage.hpp>
|
||||||
#include "../world/WorldGenerators.hpp"
|
#include "WorldGenerators.hpp"
|
||||||
#include "Level.hpp"
|
#include "Level.hpp"
|
||||||
|
|
||||||
static debug::Logger logger("world");
|
static debug::Logger logger("world");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue