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.
lunarium_OLD/src/run_modes/editor/contents/world.h

56 lines
1.3 KiB
C

/******************************************************************************
* 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 <utils/uuid.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::ordered_json& node);
[[nodiscard]] virtual OpRes Deserialize(nlohmann::ordered_json& node);
[[nodiscord]] virtual bool IsValidNode(nlohmann::ordered_json& node);
[[nodiscard]] virtual nlohmann::ordered_json AsJSON();
lunarium::World* GetWorld();
void UnloadWorld();
OpRes LoadWorld();
private: // DATA
lunarium::World* mpWorld;
private:
private: // DISABLED
World(const World&) = delete;
World& operator=(const World&) = delete;
};
}}
#endif // LUNARIUM_EDITOR_WORLD_H_