mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-05 18:11:32 +00:00
ESX variable type cleanup
This commit is contained in:
parent
955e2713a9
commit
a7102c143f
3 changed files with 37 additions and 37 deletions
|
@ -56,7 +56,7 @@ namespace MWWorld
|
||||||
&iter->mValue);
|
&iter->mValue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESM::VT_Int:
|
case ESM::VT_Long:
|
||||||
|
|
||||||
type = 'l';
|
type = 'l';
|
||||||
value.mLong = *reinterpret_cast<const Interpreter::Type_Float *> (
|
value.mLong = *reinterpret_cast<const Interpreter::Type_Float *> (
|
||||||
|
|
|
@ -13,9 +13,9 @@ enum VarType
|
||||||
{
|
{
|
||||||
VT_Unknown,
|
VT_Unknown,
|
||||||
VT_None,
|
VT_None,
|
||||||
VT_Short,
|
VT_Short, // stored as a float, kinda
|
||||||
VT_Int,
|
VT_Int,
|
||||||
VT_Long,
|
VT_Long, // stored as a float
|
||||||
VT_Float,
|
VT_Float,
|
||||||
VT_String,
|
VT_String,
|
||||||
VT_Ignored
|
VT_Ignored
|
||||||
|
|
|
@ -12,7 +12,7 @@ void Global::load(ESMReader &esm)
|
||||||
if (tmp == "s")
|
if (tmp == "s")
|
||||||
mType = VT_Short;
|
mType = VT_Short;
|
||||||
else if (tmp == "l")
|
else if (tmp == "l")
|
||||||
mType = VT_Int;
|
mType = VT_Long;
|
||||||
else if (tmp == "f")
|
else if (tmp == "f")
|
||||||
mType = VT_Float;
|
mType = VT_Float;
|
||||||
else
|
else
|
||||||
|
@ -30,7 +30,7 @@ void Global::save(ESMWriter &esm)
|
||||||
esm.writeHNString("FNAM", "s");
|
esm.writeHNString("FNAM", "s");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VT_Int:
|
case VT_Long:
|
||||||
esm.writeHNString("FNAM", "l");
|
esm.writeHNString("FNAM", "l");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue