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.
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
|
4 years ago
|
/******************************************************************************
|
||
|
|
* 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
|
||
|
|
******************************************************************************/
|
||
|
|
|
||
|
|
#include "world.h"
|
||
|
|
|
||
|
|
#include <world/world.h>
|
||
|
|
|
||
|
|
namespace lunarium { namespace editor
|
||
|
|
{
|
||
|
|
World::World(std::filesystem::path name)
|
||
|
|
: EditorAsset(AssetType::EATYPE_WORLD), mpWorld(new lunarium::World)
|
||
|
|
{
|
||
|
|
mLocation = name;
|
||
|
|
}
|
||
|
|
|
||
|
|
World::~World()
|
||
|
|
{
|
||
|
|
delete mpWorld;
|
||
|
|
}
|
||
|
|
|
||
|
|
lunarium::World* World::GetWorld()
|
||
|
|
{
|
||
|
|
return mpWorld;
|
||
|
|
}
|
||
|
|
|
||
|
|
OpRes World::LoadRawFile()
|
||
|
|
{
|
||
|
|
return OpRes::OK();
|
||
|
|
}
|
||
|
|
|
||
|
|
OpRes World::LoadFromJSON(nlohmann::json& node)
|
||
|
|
{
|
||
|
|
// TODO: Implement World::LoadFromJSON
|
||
|
|
// Create the lunarium::World Object here
|
||
|
|
// Replace the one created in the constructor
|
||
|
|
return OpRes::OK();
|
||
|
|
}
|
||
|
|
|
||
|
|
OpRes World::SaveToJSON(nlohmann::json& node)
|
||
|
|
{
|
||
|
|
// TODO: Implement World::SaveToJSON
|
||
|
|
// Store the entities UUID - the Entity class will serialize itself
|
||
|
|
return OpRes::OK();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
bool World::IsValidNode(nlohmann::json& node)
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
}}
|