mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
Merge branch 'main' into heightmaps
This commit is contained in:
commit
ea9ad08bfd
64 changed files with 3473 additions and 733 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue