Implemented equipping of items, reading of slot types from item database, and prepared set items and stats structures.

This commit is contained in:
2023-11-30 23:33:40 -06:00
parent b97c63f7b0
commit 298b0c4ca7
9 changed files with 147 additions and 28 deletions
+2 -21
View File
@@ -37,6 +37,7 @@ All rights reserved.
#pragma endregion
#pragma once
#include "Menu.h"
#include "BitwiseEnum.h"
enum class ButtonAttr{
NONE=0b00,
@@ -110,24 +111,4 @@ public:
std::string GetName();
void Enable(bool enabled);
virtual void Cleanup();
};
constexpr auto operator|(ButtonAttr attribute,ButtonAttr attribute2) noexcept
{
return ButtonAttr(static_cast<std::underlying_type_t<ButtonAttr>>(attribute)|static_cast<std::underlying_type_t<ButtonAttr>>(attribute2));
}
constexpr auto operator&(ButtonAttr attribute,ButtonAttr attribute2) noexcept
{
return static_cast<std::underlying_type_t<ButtonAttr>>(attribute)&static_cast<std::underlying_type_t<ButtonAttr>>(attribute2);
}
constexpr auto operator|(ComponentAttr attribute,ComponentAttr attribute2) noexcept
{
return ComponentAttr(static_cast<std::underlying_type_t<ComponentAttr>>(attribute)|static_cast<std::underlying_type_t<ComponentAttr>>(attribute2));
}
constexpr auto operator&(ComponentAttr attribute,ComponentAttr attribute2) noexcept
{
return static_cast<std::underlying_type_t<ComponentAttr>>(attribute)&static_cast<std::underlying_type_t<ComponentAttr>>(attribute2);
}
};