1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-21 09:39:56 +00:00

Support reading bool GMST by ESM4

This commit is contained in:
elsid 2023-05-17 18:35:55 +02:00
parent ee3956e4f2
commit 584c0dbcdc
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625
2 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,12 @@ namespace ESM4
const char type = editorId[0];
switch (type)
{
case 'b':
{
std::uint32_t value = 0;
reader.get(value);
return value != 0;
}
case 'i':
{
std::int32_t value = 0;

View File

@ -13,7 +13,7 @@ namespace ESM4
struct GameSetting
{
using Data = std::variant<float, std::int32_t, std::string>;
using Data = std::variant<bool, float, std::int32_t, std::string>;
FormId mFormId; // from the header
std::uint32_t mFlags; // from the header, see enum type RecordFlag for details