You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
/******************************************************************************
|
|
|
|
|
* File - world.h
|
|
|
|
|
* Author - Joey Pollack
|
|
|
|
|
* Date - 2022/06/28 (y/m/d)
|
|
|
|
|
* Mod Date - 2022/06/28 (y/m/d)
|
|
|
|
|
* Description - Editor asset for a World object
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef LUNARIUM_EDITOR_WORLD_H_
|
|
|
|
|
#define LUNARIUM_EDITOR_WORLD_H_
|
|
|
|
|
|
|
|
|
|
#include "editor_asset.h"
|
|
|
|
|
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
|
|
namespace lunarium
|
|
|
|
|
{
|
|
|
|
|
class World;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace lunarium { namespace editor
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
class World : public EditorAsset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
World(std::filesystem::path name = "WORLD");
|
|
|
|
|
~World();
|
|
|
|
|
|
|
|
|
|
[[nodiscard]] virtual OpRes LoadRawFile();
|
|
|
|
|
[[nodiscard]] virtual OpRes Serialize(nlohmann::json& node);
|
|
|
|
|
[[nodiscard]] virtual OpRes Deserialize(nlohmann::json& node);
|
|
|
|
|
[[nodiscord]] virtual bool IsValidNode(nlohmann::json& node);
|
|
|
|
|
[[nodiscard]] virtual nlohmann::json AsJSON();
|
|
|
|
|
|
|
|
|
|
lunarium::World* GetWorld();
|
|
|
|
|
|
|
|
|
|
private: // DATA
|
|
|
|
|
lunarium::World* mpWorld;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: // DISABLED
|
|
|
|
|
World(const World&) = delete;
|
|
|
|
|
World& operator=(const World&) = delete;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // LUNARIUM_EDITOR_WORLD_H_
|