mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
refactor Engine
This commit is contained in:
parent
331734792d
commit
e442402e43
17 changed files with 130 additions and 135 deletions
|
|
@ -5,6 +5,8 @@
|
|||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
#include "ContentPack.hpp"
|
||||
|
||||
class Content;
|
||||
struct ContentPack;
|
||||
class EnginePaths;
|
||||
|
|
@ -16,33 +18,31 @@ namespace io {
|
|||
|
||||
class ContentControl {
|
||||
public:
|
||||
ContentControl(std::function<void()> postContent);
|
||||
ContentControl(
|
||||
EnginePaths& paths, Input& input, std::function<void()> postContent
|
||||
);
|
||||
~ContentControl();
|
||||
|
||||
Content* get();
|
||||
|
||||
const Content* get() const;
|
||||
|
||||
std::vector<std::string>& getBasePacks();
|
||||
|
||||
void resetContent(
|
||||
EnginePaths& paths, Input& input, std::vector<ContentPack>& packs
|
||||
);
|
||||
void resetContent();
|
||||
|
||||
void loadContent(
|
||||
EnginePaths& paths,
|
||||
Input& input,
|
||||
std::vector<ContentPack>& packs,
|
||||
const std::vector<std::string>& names
|
||||
);
|
||||
void loadContent(const std::vector<std::string>& names);
|
||||
|
||||
void loadContent(
|
||||
EnginePaths& paths,
|
||||
Input& input,
|
||||
std::vector<ContentPack>& packs
|
||||
);
|
||||
void loadContent();
|
||||
|
||||
std::vector<io::path> getDefaultSources();
|
||||
std::vector<ContentPack>& getContentPacks();
|
||||
std::vector<ContentPack> getAllContentPacks();
|
||||
private:
|
||||
EnginePaths& paths;
|
||||
Input& input;
|
||||
std::unique_ptr<Content> content;
|
||||
std::vector<std::string> basePacks;
|
||||
std::function<void()> postContent;
|
||||
std::vector<std::string> basePacks;
|
||||
std::vector<ContentPack> contentPacks;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue