mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
FEAT: Update land flag representation in ESMTool
This commit is contained in:
parent
798208f6e5
commit
659874cb65
1 changed files with 9 additions and 10 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include <components/esm3/loadcont.hpp>
|
#include <components/esm3/loadcont.hpp>
|
||||||
#include <components/esm3/loadcrea.hpp>
|
#include <components/esm3/loadcrea.hpp>
|
||||||
#include <components/esm3/loadench.hpp>
|
#include <components/esm3/loadench.hpp>
|
||||||
|
#include <components/esm3/loadland.hpp>
|
||||||
#include <components/esm3/loadlevlist.hpp>
|
#include <components/esm3/loadlevlist.hpp>
|
||||||
#include <components/esm3/loadligh.hpp>
|
#include <components/esm3/loadligh.hpp>
|
||||||
#include <components/esm3/loadmgef.hpp>
|
#include <components/esm3/loadmgef.hpp>
|
||||||
|
@ -766,18 +767,16 @@ std::string enchantmentFlags(int flags)
|
||||||
std::string landFlags(std::uint32_t flags)
|
std::string landFlags(std::uint32_t flags)
|
||||||
{
|
{
|
||||||
std::string properties;
|
std::string properties;
|
||||||
// The ESM component says that this first four bits are used, but
|
|
||||||
// only the first three bits are used as far as I can tell.
|
|
||||||
// There's also no enumeration of the bit in the ESM component.
|
|
||||||
if (flags == 0)
|
if (flags == 0)
|
||||||
properties += "[None] ";
|
properties += "[None] ";
|
||||||
if (flags & 0x00000001)
|
if (flags & ESM::Land::Flag_HeightsNormals)
|
||||||
properties += "Unknown1 ";
|
properties += "HeightsNormals ";
|
||||||
if (flags & 0x00000004)
|
if (flags & ESM::Land::Flag_Colors)
|
||||||
properties += "Unknown3 ";
|
properties += "Colors ";
|
||||||
if (flags & 0x00000002)
|
if (flags & ESM::Land::Flag_Textures)
|
||||||
properties += "Unknown2 ";
|
properties += "Textures ";
|
||||||
if (flags & 0xFFFFFFF8)
|
int unused = 0xFFFFFFFF ^ (ESM::Land::Flag_HeightsNormals | ESM::Land::Flag_Colors | ESM::Land::Flag_Textures);
|
||||||
|
if (flags & unused)
|
||||||
properties += "Invalid ";
|
properties += "Invalid ";
|
||||||
properties += Misc::StringUtils::format("(0x%08X)", flags);
|
properties += Misc::StringUtils::format("(0x%08X)", flags);
|
||||||
return properties;
|
return properties;
|
||||||
|
|
Loading…
Reference in a new issue