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.
55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
|
4 years ago
|
/******************************************************************************
|
||
|
|
* File - project.h
|
||
|
|
* Author - Joey Pollack
|
||
|
|
* Date - 2021/11/09 (y/m/d)
|
||
|
|
* Mod Date - 2021/11/09 (y/m/d)
|
||
|
|
* Description - Manage data for a game project
|
||
|
|
******************************************************************************/
|
||
|
|
|
||
|
|
#ifndef PROJECT_H_
|
||
|
|
#define PROJECT_H_
|
||
|
|
|
||
|
|
#include <utils/opRes.h>
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include <vector>
|
||
|
|
#include <filesystem>
|
||
|
|
|
||
|
4 years ago
|
namespace lunarium { namespace editor
|
||
|
4 years ago
|
{
|
||
|
4 years ago
|
class ContentManager;
|
||
|
|
class World;
|
||
|
|
|
||
|
4 years ago
|
class Project
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
Project();
|
||
|
4 years ago
|
|
||
|
|
/// location should NOT include the project file
|
||
|
4 years ago
|
[[nodiscard]] OpRes GenerateProject(std::string name, std::filesystem::path location);
|
||
|
4 years ago
|
|
||
|
|
/// location should be the full path including the project file
|
||
|
4 years ago
|
[[nodiscard]] OpRes LoadProject(std::filesystem::path location);
|
||
|
4 years ago
|
void UnloadCurrentProject();
|
||
|
4 years ago
|
void SaveProject();
|
||
|
4 years ago
|
|
||
|
|
bool IsLoaded() const;
|
||
|
4 years ago
|
const std::string& GetName() const;
|
||
|
|
std::filesystem::path GetRootDirectory() const;
|
||
|
4 years ago
|
std::filesystem::path GetContentDirectory() const;
|
||
|
|
std::filesystem::path GetAssetDirectory() const;
|
||
|
4 years ago
|
|
||
|
|
private:
|
||
|
|
bool mIsLoaded;
|
||
|
|
std::string mName;
|
||
|
|
std::filesystem::path mLocation;
|
||
|
|
|
||
|
4 years ago
|
ContentManager* mpContentManager;
|
||
|
|
std::vector<World*> mWorlds;
|
||
|
|
|
||
|
|
private:
|
||
|
|
void LoadContent();
|
||
|
4 years ago
|
};
|
||
|
4 years ago
|
}}
|
||
|
4 years ago
|
|
||
|
|
#endif // PROJECT_H_
|