Start of ECS - files added
NFD wrapped up behind utils FileSystem functionsgui_api_redesign
parent
36c67d57d7
commit
d9f7a136e5
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,19 @@
|
||||
/******************************************************************************
|
||||
* File - uuid.cpp
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/05/23 (y/m/d)
|
||||
* Mod Date - 2022/05/23 (y/m/d)
|
||||
* Description - Generates 64 bit uuids
|
||||
******************************************************************************/
|
||||
|
||||
#include "uuid.h"
|
||||
#include <ctime>
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
std::mt19937_64 UUID::mt64(time(nullptr));
|
||||
LUUID UUID::GetID()
|
||||
{
|
||||
return mt64();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
/******************************************************************************
|
||||
* File - uuid.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/05/23 (y/m/d)
|
||||
* Mod Date - 2022/05/23 (y/m/d)
|
||||
* Description - Generates 64 bit uuids
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef LUNARIUM_UUID_H_
|
||||
#define LUNARIUM_UUID_H_
|
||||
|
||||
#include <core/common_defs.h>
|
||||
#include <random>
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
class UUID
|
||||
{
|
||||
public:
|
||||
static LUUID GetID();
|
||||
|
||||
private:
|
||||
static std::mt19937_64 mt64;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif // LUNARIUM_UUID_H_
|
||||
@ -0,0 +1,24 @@
|
||||
/******************************************************************************
|
||||
* File - components.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/05/24 (y/m/d)
|
||||
* Mod Date - 2022/05/24 (y/m/d)
|
||||
* Description - ECS component declarations
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef LUNARIUM_COMPONENTS_H_
|
||||
#define LUNARIUM_COMPONENTS_H_
|
||||
|
||||
#include <core/common_defs.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
struct LabelComponent
|
||||
{
|
||||
std::string Label
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LUNARIUM_COMPONENTS_H_
|
||||
@ -0,0 +1,18 @@
|
||||
/******************************************************************************
|
||||
* File - entity.cpp
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/05/23 (y/m/d)
|
||||
* Mod Date - 2022/05/23 (y/m/d)
|
||||
* Description - Provides functionality to work with world entities
|
||||
******************************************************************************/
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
Entity::Entity(entt::registry* r)
|
||||
: mID(entt::null), mpRegistry(r)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
/******************************************************************************
|
||||
* File - entity.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/05/23 (y/m/d)
|
||||
* Mod Date - 2022/05/23 (y/m/d)
|
||||
* Description - Provides functionality to work with world entities
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef LUNARIUM_ENTITY_H_
|
||||
#define LUNARIUM_ENTITY_H_
|
||||
|
||||
#include <entt/entt.hpp>
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
class Entity
|
||||
{
|
||||
public:
|
||||
Entity(entt::registry* r);
|
||||
|
||||
private:
|
||||
entt::entity mID;
|
||||
entt::registry* mpRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LUNARIUM_ENTITY_H_
|
||||
Loading…
Reference in New Issue