From 41f7c4f75fba317bad189b74363951b3b4fa3340 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Thu, 1 Apr 2021 22:00:04 +0300 Subject: [PATCH] WIP inventory prototyping. --- module/CMakeLists.txt | 1 + module/Core/Inventory.cpp | 19 +++++++++++++ module/Core/Inventory.hpp | 58 +++++++++++++++++++++++++++++++++++++++ module/Register.cpp | 2 ++ 4 files changed, 80 insertions(+) create mode 100644 module/Core/Inventory.cpp create mode 100644 module/Core/Inventory.hpp diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index 51bc9258..c0471573 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -38,6 +38,7 @@ add_library(SqModule MODULE SqBase.hpp Main.cpp Core/Command.cpp Core/Command.hpp Core/Common.cpp Core/Common.hpp Core/Entity.cpp Core/Entity.hpp + Core/Inventory.cpp Core/Inventory.hpp Core/Loot.cpp Core/Loot.hpp Core/Privilege.cpp Core/Privilege.hpp Core/Privilege/Base.cpp Core/Privilege/Base.hpp diff --git a/module/Core/Inventory.cpp b/module/Core/Inventory.cpp new file mode 100644 index 00000000..ccc6f7aa --- /dev/null +++ b/module/Core/Inventory.cpp @@ -0,0 +1,19 @@ +// ------------------------------------------------------------------------------------------------ +#include "Core/Inventory.hpp" + +// ------------------------------------------------------------------------------------------------ +#include + +// ------------------------------------------------------------------------------------------------ +namespace SqMod { + +// ------------------------------------------------------------------------------------------------ + + +// ================================================================================================ +void Register_Inventory(HSQUIRRELVM vm) +{ + +} + +} // Namespace:: SqMod diff --git a/module/Core/Inventory.hpp b/module/Core/Inventory.hpp new file mode 100644 index 00000000..e913dcc1 --- /dev/null +++ b/module/Core/Inventory.hpp @@ -0,0 +1,58 @@ +#pragma once + +// ------------------------------------------------------------------------------------------------ +#include "Core/Utility.hpp" +#include "Base/Vector3.hpp" +#include "Base/Quaternion.hpp" + +// ------------------------------------------------------------------------------------------------ +#include +#include +#include +#include + +// ------------------------------------------------------------------------------------------------ +namespace SqMod { + +/* ------------------------------------------------------------------------------------------------ + * Built-in inventory. +*/ +class InventoryManager +{ +public: + + /* -------------------------------------------------------------------------------------------- + * Default constructor. + */ + InventoryManager() = default; + + /* -------------------------------------------------------------------------------------------- + * Copy constructor. (disabled) + */ + InventoryManager(const InventoryManager & o) = delete; + + /* -------------------------------------------------------------------------------------------- + * Move constructor. (disabled) + */ + InventoryManager(InventoryManager && o) = delete; + + /* -------------------------------------------------------------------------------------------- + * Destructor. + */ + ~InventoryManager() = default; + + /* -------------------------------------------------------------------------------------------- + * Copy assignment operator. (disabled) + */ + InventoryManager & operator = (const InventoryManager & o) = delete; + + /* -------------------------------------------------------------------------------------------- + * Copy assignment operator. (disabled) + */ + InventoryManager & operator = (InventoryManager && o) = delete; + +private: + +}; + +} // Namespace:: SqMod diff --git a/module/Register.cpp b/module/Register.cpp index 878f4fea..5dad7fb2 100644 --- a/module/Register.cpp +++ b/module/Register.cpp @@ -50,6 +50,7 @@ extern void Register_Constants(HSQUIRRELVM vm); extern void Register_Log(HSQUIRRELVM vm); extern void Register_Core(HSQUIRRELVM vm); extern void Register_Command(HSQUIRRELVM vm); +extern void Register_Inventory(HSQUIRRELVM vm); extern void Register_Loot(HSQUIRRELVM vm); extern void Register_Privilege(HSQUIRRELVM vm); extern void Register_Routine(HSQUIRRELVM vm); @@ -104,6 +105,7 @@ bool RegisterAPI(HSQUIRRELVM vm) Register_Log(vm); Register_Core(vm); Register_Command(vm); + Register_Inventory(vm); Register_Loot(vm); Register_Privilege(vm); Register_Routine(vm);