VisorParameters scan passthrough property

This commit is contained in:
Jack Andersen 2018-06-15 10:37:00 -10:00
parent de952f8e8b
commit 513d9c99cd
4 changed files with 13 additions and 15 deletions

View File

@ -380,8 +380,8 @@ struct VisorParameters : BigDNA
AT_DECL_DNA_YAML AT_DECL_DNA_YAML
Value<atUint32> propertyCount; Value<atUint32> propertyCount;
Value<bool> unknown1; Value<bool> unknown1;
Value<bool> unknown2; Value<bool> scanPassthrough;
Value<atUint32> unknown3; Value<atUint32> visorMask;
}; };
struct PlayerParameters : BigDNA struct PlayerParameters : BigDNA

View File

@ -19,9 +19,9 @@ namespace urde
static CMaterialList MakeActorMaterialList(const CMaterialList& materialList, const CActorParameters& params) static CMaterialList MakeActorMaterialList(const CMaterialList& materialList, const CActorParameters& params)
{ {
CMaterialList ret = materialList; CMaterialList ret = materialList;
if (params.GetVisorParameters().x0_28_b3) if (params.GetVisorParameters().x0_4_b1)
ret.Add(EMaterialTypes::Unknown46); ret.Add(EMaterialTypes::Unknown46);
if (params.GetVisorParameters().x0_29_b4) if (params.GetVisorParameters().x0_5_scanPassthrough)
ret.Add(EMaterialTypes::ScanPassthrough); ret.Add(EMaterialTypes::ScanPassthrough);
return ret; return ret;
} }

View File

@ -11,13 +11,11 @@ class CVisorParameters
public: public:
u8 x0_mask : 4; u8 x0_mask : 4;
bool x0_4_b1 : 1; bool x0_4_b1 : 1;
bool x0_5_b2 : 1; bool x0_5_scanPassthrough : 1;
bool x0_28_b3 : 1;
bool x0_29_b4 : 1;
CVisorParameters() CVisorParameters()
: x0_mask(0xf), x0_4_b1(false), x0_5_b2(false) {} : x0_mask(0xf), x0_4_b1(false), x0_5_scanPassthrough(false) {}
CVisorParameters(u8 mask, bool b1, bool b2) CVisorParameters(u8 mask, bool b1, bool scanPassthrough)
: x0_mask(mask), x0_4_b1(b1), x0_5_b2(b2) {} : x0_mask(mask), x0_4_b1(b1), x0_5_scanPassthrough(scanPassthrough) {}
u8 GetMask() const { return x0_mask; } u8 GetMask() const { return x0_mask; }
}; };

View File

@ -262,13 +262,13 @@ CVisorParameters ScriptLoader::LoadVisorParameters(CInputStream& in)
if (propCount >= 1 && propCount <= 3) if (propCount >= 1 && propCount <= 3)
{ {
bool b1 = in.readBool(); bool b1 = in.readBool();
bool b2 = false; bool scanPassthrough = false;
u8 mask = 0xf; u8 mask = 0xf;
if (propCount > 1)
b2 = in.readBool();
if (propCount > 2) if (propCount > 2)
mask = in.readUint32Big(); scanPassthrough = in.readBool();
return CVisorParameters(mask, b1, b2); if (propCount >= 2)
mask = u8(in.readUint32Big());
return CVisorParameters(mask, b1, scanPassthrough);
} }
return CVisorParameters(); return CVisorParameters();
} }