Merge branch 'main' into heightmaps

This commit is contained in:
MihailRis
2024-10-03 19:12:37 +03:00
64 changed files with 3472 additions and 732 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
#include <utility>
#include "content/Content.hpp"
#include "content/ContentLUT.hpp"
#include "content/ContentReport.hpp"
#include "debug/Logger.hpp"
#include "files/WorldFiles.hpp"
#include "items/Inventories.hpp"
@@ -156,12 +156,12 @@ std::unique_ptr<Level> World::load(
return level;
}
std::shared_ptr<ContentLUT> World::checkIndices(
std::shared_ptr<ContentReport> World::checkIndices(
const std::shared_ptr<WorldFiles>& worldFiles, const Content* content
) {
fs::path indicesFile = worldFiles->getIndicesFile();
if (fs::is_regular_file(indicesFile)) {
return ContentLUT::create(worldFiles, indicesFile, content);
return ContentReport::create(worldFiles, indicesFile, content);
}
return nullptr;
}
+4 -4
View File
@@ -13,7 +13,7 @@
class Content;
class WorldFiles;
class Level;
class ContentLUT;
class ContentReport;
struct EngineSettings;
namespace fs = std::filesystem;
@@ -80,11 +80,11 @@ public:
/// @brief Write all unsaved level data to the world directory
void write(Level* level);
/// @brief Check world indices and generate ContentLUT if convert required
/// @brief Check world indices and generate ContentReport if convert required
/// @param directory world directory
/// @param content current Content instance
/// @return ContentLUT if world convert required else nullptr
static std::shared_ptr<ContentLUT> checkIndices(
/// @return ContentReport if world convert required else nullptr
static std::shared_ptr<ContentReport> checkIndices(
const std::shared_ptr<WorldFiles>& worldFiles, const Content* content
);