mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
the final rename
This commit is contained in:
parent
f27a418dbe
commit
1627e21c1d
196 changed files with 836 additions and 815 deletions
41
src/content/ContentLoader.hpp
Normal file
41
src/content/ContentLoader.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef CONTENT_CONTENT_LOADER_HPP_
|
||||
#define CONTENT_CONTENT_LOADER_HPP_
|
||||
|
||||
#include "../voxels/Block.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
class ItemDef;
|
||||
struct ContentPack;
|
||||
class ContentBuilder;
|
||||
|
||||
namespace dynamic {
|
||||
class Map;
|
||||
}
|
||||
|
||||
class ContentLoader {
|
||||
const ContentPack* pack;
|
||||
scriptenv env;
|
||||
|
||||
void loadBlock(Block& def, std::string full, std::string name);
|
||||
void loadCustomBlockModel(Block& def, dynamic::Map* primitives);
|
||||
void loadItem(ItemDef& def, std::string full, std::string name);
|
||||
BlockMaterial loadBlockMaterial(fs::path file, std::string full);
|
||||
public:
|
||||
ContentLoader(ContentPack* pack);
|
||||
|
||||
bool fixPackIndices(
|
||||
fs::path folder,
|
||||
dynamic::Map* indicesRoot,
|
||||
std::string contentSection
|
||||
);
|
||||
void fixPackIndices();
|
||||
void loadBlock(Block& def, std::string name, fs::path file);
|
||||
void loadItem(ItemDef& def, std::string name, fs::path file);
|
||||
void load(ContentBuilder& builder);
|
||||
};
|
||||
|
||||
#endif // CONTENT_CONTENT_LOADER_HPP_
|
||||
Loading…
Add table
Add a link
Reference in a new issue