multiline textbox mode

This commit is contained in:
MihailRis
2024-02-26 15:12:02 +03:00
parent 925ef426de
commit 256808630b
11 changed files with 260 additions and 51 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ Level::Level(World* world, const Content* content, EngineSettings& settings)
uint matrixSize = (settings.chunks.loadDistance+
settings.chunks.padding) * 2;
chunks = new Chunks(matrixSize, matrixSize, 0, 0,
world->wfile, events, content);
world->wfile.get(), events, content);
lighting = new Lighting(content, chunks);
events->listen(EVT_CHUNK_HIDDEN, [this](lvl_event_type type, Chunk* chunk) {
+11 -10
View File
@@ -27,18 +27,18 @@ World::World(
uint64_t seed,
EngineSettings& settings,
const Content* content,
const std::vector<ContentPack> packs)
: name(name),
generator(generator),
seed(seed),
settings(settings),
content(content),
packs(packs) {
wfile = new WorldFiles(directory, settings.debug);
const std::vector<ContentPack> packs
) : name(name),
generator(generator),
seed(seed),
settings(settings),
content(content),
packs(packs)
{
wfile = std::make_unique<WorldFiles>(directory, settings.debug);
}
World::~World(){
delete wfile;
}
void World::updateTimers(float delta) {
@@ -73,7 +73,8 @@ Level* World::create(std::string name,
uint64_t seed,
EngineSettings& settings,
const Content* content,
const std::vector<ContentPack>& packs) {
const std::vector<ContentPack>& packs
) {
auto world = new World(name, generator, directory, seed, settings, content, packs);
auto level = new Level(world, content, settings);
auto inventory = level->player->getInventory();
+2 -1
View File
@@ -3,6 +3,7 @@
#include <string>
#include <vector>
#include <memory>
#include <filesystem>
#include <stdexcept>
#include "../typedefs.h"
@@ -36,7 +37,7 @@ class World : Serializable {
int64_t nextInventoryId = 1;
public:
WorldFiles* wfile;
std::unique_ptr<WorldFiles> wfile;
/**
* Day/night loop timer in range 0..1