build time decreased
This commit is contained in:
parent
41ef80e938
commit
0ad3dd7ab8
@ -35,6 +35,7 @@
|
||||
#include "window/input.hpp"
|
||||
#include "window/Window.hpp"
|
||||
#include "world/WorldGenerators.hpp"
|
||||
#include "settings.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#define ENGINE_HPP_
|
||||
|
||||
#include "delegates.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "typedefs.hpp"
|
||||
|
||||
#include "assets/Assets.hpp"
|
||||
@ -27,6 +26,7 @@ class ResPaths;
|
||||
class Batch2D;
|
||||
class EngineController;
|
||||
class SettingsHandler;
|
||||
struct EngineSettings;
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include "../objects/Player.hpp"
|
||||
#include "../physics/Hitbox.hpp"
|
||||
#include "../typedefs.hpp"
|
||||
#include "../settings.hpp"
|
||||
#include "../util/data_io.hpp"
|
||||
#include "../voxels/Block.hpp"
|
||||
#include "../voxels/Chunk.hpp"
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
|
||||
#include "files.hpp"
|
||||
#include "../typedefs.hpp"
|
||||
#include "../settings.hpp"
|
||||
#include "../content/ContentPack.hpp"
|
||||
#include "../voxels/Chunk.hpp"
|
||||
|
||||
@ -24,6 +23,7 @@ class Player;
|
||||
class Content;
|
||||
class ContentIndices;
|
||||
class World;
|
||||
struct DebugSettings;
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../delegates.hpp"
|
||||
#include "../engine.hpp"
|
||||
#include "../settings.hpp"
|
||||
#include "../graphics/core/Mesh.hpp"
|
||||
#include "../graphics/ui/elements/CheckBox.hpp"
|
||||
#include "../graphics/ui/elements/TextBox.hpp"
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#include "LevelController.hpp"
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../files/WorldFiles.hpp"
|
||||
#include "../debug/Logger.hpp"
|
||||
#include "../world/Level.hpp"
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#define LOGIC_LEVEL_CONTROLLER_HPP_
|
||||
|
||||
#include <memory>
|
||||
#include "../settings.hpp"
|
||||
|
||||
#include "PlayerController.hpp"
|
||||
#include "BlocksController.hpp"
|
||||
@ -10,6 +9,7 @@
|
||||
|
||||
class Level;
|
||||
class Player;
|
||||
struct EngineSettings;
|
||||
|
||||
/// @brief LevelController manages other controllers
|
||||
class LevelController {
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "../items/ItemStack.hpp"
|
||||
#include "../items/Inventory.hpp"
|
||||
#include "../core_defs.hpp"
|
||||
#include "../settings.hpp"
|
||||
|
||||
const float CAM_SHAKE_OFFSET = 0.025f;
|
||||
const float CAM_SHAKE_OFFSET_Y = 0.031f;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#ifndef PLAYER_CONTROL_HPP_
|
||||
#define PLAYER_CONTROL_HPP_
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../objects/Player.hpp"
|
||||
|
||||
#include <memory>
|
||||
@ -12,7 +11,9 @@
|
||||
class Camera;
|
||||
class Level;
|
||||
class Block;
|
||||
class Chunks;
|
||||
class BlocksController;
|
||||
struct CameraSettings;
|
||||
|
||||
class CameraControl {
|
||||
std::shared_ptr<Player> player;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#ifndef SRC_OBJECTS_PLAYER_HPP_
|
||||
#define SRC_OBJECTS_PLAYER_HPP_
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../data/dynamic.hpp"
|
||||
#include "../voxels/voxel.hpp"
|
||||
#include "../settings.hpp"
|
||||
#include "../interfaces/Serializable.hpp"
|
||||
#include "../interfaces/Object.hpp"
|
||||
|
||||
@ -14,23 +14,22 @@ class Camera;
|
||||
class Hitbox;
|
||||
class Inventory;
|
||||
class ContentLUT;
|
||||
class PhysicsSolver;
|
||||
class Chunks;
|
||||
class Level;
|
||||
struct EngineSettings;
|
||||
|
||||
struct PlayerInput {
|
||||
bool zoom;
|
||||
bool cameraMode;
|
||||
bool moveForward;
|
||||
bool moveBack;
|
||||
bool moveRight;
|
||||
bool moveLeft;
|
||||
bool sprint;
|
||||
bool shift;
|
||||
bool cheat;
|
||||
bool jump;
|
||||
bool noclip;
|
||||
bool flight;
|
||||
bool zoom : 1;
|
||||
bool cameraMode : 1;
|
||||
bool moveForward : 1;
|
||||
bool moveBack : 1;
|
||||
bool moveRight : 1;
|
||||
bool moveLeft : 1;
|
||||
bool sprint : 1;
|
||||
bool shift : 1;
|
||||
bool cheat : 1;
|
||||
bool jump : 1;
|
||||
bool noclip : 1;
|
||||
bool flight : 1;
|
||||
};
|
||||
|
||||
class Player : public Object, public Serializable {
|
||||
@ -46,8 +45,7 @@ public:
|
||||
bool noclip = false;
|
||||
bool debug = false;
|
||||
voxel selectedVoxel {0, 0};
|
||||
|
||||
glm::vec2 cam = {};
|
||||
glm::vec2 cam {};
|
||||
|
||||
Player(glm::vec3 position, float speed, std::shared_ptr<Inventory> inv);
|
||||
~Player();
|
||||
@ -77,4 +75,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* SRC_OBJECTS_PLAYER_HPP_ */
|
||||
#endif // SRC_OBJECTS_PLAYER_HPP_
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
#include "engine.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "files/settings_io.hpp"
|
||||
#include "files/engine_paths.hpp"
|
||||
#include "util/platform.hpp"
|
||||
#include "util/command_line.hpp"
|
||||
#include "debug/Logger.hpp"
|
||||
#include "objects/Player.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@ -11,6 +13,7 @@ static debug::Logger logger("main");
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
debug::Logger::init("latest.log");
|
||||
std::cout << sizeof(PlayerInput) << std::endl;
|
||||
|
||||
EnginePaths paths;
|
||||
if (!parse_cmdline(argc, argv, paths))
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "Level.hpp"
|
||||
#include "World.hpp"
|
||||
#include "LevelEvents.hpp"
|
||||
#include "../settings.hpp"
|
||||
#include "../content/Content.hpp"
|
||||
#include "../lighting/Lighting.hpp"
|
||||
#include "../voxels/Chunk.hpp"
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#ifndef WORLD_LEVEL_HPP_
|
||||
#define WORLD_LEVEL_HPP_
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../interfaces/Object.hpp"
|
||||
|
||||
#include <memory>
|
||||
@ -21,6 +20,7 @@ class LevelEvents;
|
||||
class Lighting;
|
||||
class PhysicsSolver;
|
||||
class ChunksStorage;
|
||||
struct EngineSettings;
|
||||
|
||||
/// @brief A level, contains chunks and objects
|
||||
class Level {
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
#include "Level.hpp"
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../content/Content.hpp"
|
||||
#include "../content/ContentLUT.hpp"
|
||||
#include "../debug/Logger.hpp"
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#define WORLD_WORLD_HPP_
|
||||
|
||||
#include "../typedefs.hpp"
|
||||
#include "../settings.hpp"
|
||||
#include "../util/timeutil.hpp"
|
||||
#include "../data/dynamic.hpp"
|
||||
#include "../interfaces/Serializable.hpp"
|
||||
@ -17,6 +16,7 @@ class Content;
|
||||
class WorldFiles;
|
||||
class Level;
|
||||
class ContentLUT;
|
||||
struct EngineSettings;
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user