Merge master branch

This commit is contained in:
A-lex-Ra
2024-02-23 18:53:53 +06:00
19 changed files with 512 additions and 254 deletions
+11 -1
View File
@@ -7,11 +7,15 @@
#include <glm/glm.hpp>
#include <filesystem>
#include <unordered_set>
#include <functional>
#define GLEW_STATIC
#include "audio/Audio.h"
#include "assets/Assets.h"
#include "assets/AssetsLoader.h"
#include "world/WorldGenerators.h"
#include "voxels/DefaultWorldGenerator.h"
#include "voxels/FlatWorldGenerator.h"
#include "window/Window.h"
#include "window/Events.h"
#include "window/Camera.h"
@@ -41,6 +45,11 @@
namespace fs = std::filesystem;
void addWorldGenerators() {
WorldGenerators::addGenerator<DefaultWorldGenerator>("core:default");
WorldGenerators::addGenerator<FlatWorldGenerator>("core:flat");
}
Engine::Engine(EngineSettings& settings, EnginePaths* paths)
: settings(settings), paths(paths)
{
@@ -80,6 +89,7 @@ Engine::Engine(EngineSettings& settings, EnginePaths* paths)
menus::create_version_label(this);
}
setLanguage(settings.ui.language);
addWorldGenerators();
}
void Engine::updateTimers() {
@@ -251,4 +261,4 @@ EnginePaths* Engine::getPaths() {
std::shared_ptr<Screen> Engine::getScreen() {
return screen;
}
}