mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 20:39:40 +00:00
Follow global naming convention for new records
This commit is contained in:
parent
6e5b45453d
commit
cc4c96d0f1
6 changed files with 60 additions and 58 deletions
|
@ -273,7 +273,7 @@ namespace Nif
|
||||||
void NiControllerManager::read(NIFStream *nif)
|
void NiControllerManager::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
Controller::read(nif);
|
Controller::read(nif);
|
||||||
cumulative = nif->getBoolean();
|
mCumulative = nif->getBoolean();
|
||||||
unsigned int numSequences = nif->getUInt();
|
unsigned int numSequences = nif->getUInt();
|
||||||
nif->skip(4 * numSequences); // Controller sequences
|
nif->skip(4 * numSequences); // Controller sequences
|
||||||
nif->skip(4); // Object palette
|
nif->skip(4); // Object palette
|
||||||
|
|
|
@ -186,7 +186,7 @@ struct bhkBlendController : public Controller
|
||||||
|
|
||||||
struct NiControllerManager : public Controller
|
struct NiControllerManager : public Controller
|
||||||
{
|
{
|
||||||
bool cumulative;
|
bool mCumulative;
|
||||||
void read(NIFStream *nif) override;
|
void read(NIFStream *nif) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -96,18 +96,18 @@ void BSBound::read(NIFStream *nif)
|
||||||
|
|
||||||
void BSFurnitureMarker::LegacyFurniturePosition::read(NIFStream *nif)
|
void BSFurnitureMarker::LegacyFurniturePosition::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
offset = nif->getVector3();
|
mOffset = nif->getVector3();
|
||||||
orientation = nif->getUShort();
|
mOrientation = nif->getUShort();
|
||||||
positionRef = nif->getChar();
|
mPositionRef = nif->getChar();
|
||||||
nif->skip(1); // Position ref 2
|
nif->skip(1); // Position ref 2
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSFurnitureMarker::FurniturePosition::read(NIFStream *nif)
|
void BSFurnitureMarker::FurniturePosition::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
offset = nif->getVector3();
|
mOffset = nif->getVector3();
|
||||||
heading = nif->getFloat();
|
mHeading = nif->getFloat();
|
||||||
type = nif->getUShort();
|
mType = nif->getUShort();
|
||||||
entryPoint = nif->getUShort();
|
mEntryPoint = nif->getUShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSFurnitureMarker::read(NIFStream *nif)
|
void BSFurnitureMarker::read(NIFStream *nif)
|
||||||
|
@ -116,14 +116,14 @@ void BSFurnitureMarker::read(NIFStream *nif)
|
||||||
unsigned int num = nif->getUInt();
|
unsigned int num = nif->getUInt();
|
||||||
if (nif->getBethVersion() <= NIFFile::BethVersion::BETHVER_FO3)
|
if (nif->getBethVersion() <= NIFFile::BethVersion::BETHVER_FO3)
|
||||||
{
|
{
|
||||||
legacyMarkers.resize(num);
|
mLegacyMarkers.resize(num);
|
||||||
for (auto& marker : legacyMarkers)
|
for (auto& marker : mLegacyMarkers)
|
||||||
marker.read(nif);
|
marker.read(nif);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
markers.resize(num);
|
mMarkers.resize(num);
|
||||||
for (auto& marker : markers)
|
for (auto& marker : mMarkers)
|
||||||
marker.read(nif);
|
marker.read(nif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,22 +124,23 @@ struct BSFurnitureMarker : public Extra
|
||||||
{
|
{
|
||||||
struct LegacyFurniturePosition
|
struct LegacyFurniturePosition
|
||||||
{
|
{
|
||||||
osg::Vec3f offset;
|
osg::Vec3f mOffset;
|
||||||
uint16_t orientation;
|
uint16_t mOrientation;
|
||||||
uint8_t positionRef;
|
uint8_t mPositionRef;
|
||||||
void read(NIFStream *nif);
|
void read(NIFStream *nif);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FurniturePosition
|
struct FurniturePosition
|
||||||
{
|
{
|
||||||
osg::Vec3f offset;
|
osg::Vec3f mOffset;
|
||||||
float heading;
|
float mHeading;
|
||||||
uint16_t type, entryPoint;
|
uint16_t mType;
|
||||||
|
uint16_t mEntryPoint;
|
||||||
void read(NIFStream *nif);
|
void read(NIFStream *nif);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<LegacyFurniturePosition> legacyMarkers;
|
std::vector<LegacyFurniturePosition> mLegacyMarkers;
|
||||||
std::vector<FurniturePosition> markers;
|
std::vector<FurniturePosition> mMarkers;
|
||||||
|
|
||||||
void read(NIFStream *nif) override;
|
void read(NIFStream *nif) override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,49 +6,49 @@ namespace Nif
|
||||||
void bhkCollisionObject::read(NIFStream *nif)
|
void bhkCollisionObject::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
NiCollisionObject::read(nif);
|
NiCollisionObject::read(nif);
|
||||||
flags = nif->getUShort();
|
mFlags = nif->getUShort();
|
||||||
body.read(nif);
|
mBody.read(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bhkWorldObject::read(NIFStream *nif)
|
void bhkWorldObject::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
shape.read(nif);
|
mShape.read(nif);
|
||||||
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD)
|
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD)
|
||||||
nif->skip(4); // Unknown
|
nif->skip(4); // Unknown
|
||||||
flags = nif->getUInt();
|
mFlags = nif->getUInt();
|
||||||
nif->skip(4); // Unused
|
nif->skip(4); // Unused
|
||||||
worldObjectInfo.phaseType = nif->getChar();
|
mWorldObjectInfo.mPhaseType = nif->getChar();
|
||||||
nif->skip(3); // Unused
|
nif->skip(3); // Unused
|
||||||
worldObjectInfo.data = nif->getUInt();
|
mWorldObjectInfo.mData = nif->getUInt();
|
||||||
worldObjectInfo.size = nif->getUInt();
|
mWorldObjectInfo.mSize = nif->getUInt();
|
||||||
worldObjectInfo.capacityAndFlags = nif->getUInt();
|
mWorldObjectInfo.mCapacityAndFlags = nif->getUInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void bhkWorldObject::post(NIFFile *nif)
|
void bhkWorldObject::post(NIFFile *nif)
|
||||||
{
|
{
|
||||||
shape.post(nif);
|
mShape.post(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bhkEntity::read(NIFStream *nif)
|
void bhkEntity::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
bhkWorldObject::read(nif);
|
bhkWorldObject::read(nif);
|
||||||
responseType = static_cast<hkResponseType>(nif->getChar());
|
mResponseType = static_cast<hkResponseType>(nif->getChar());
|
||||||
nif->skip(1); // Unused
|
nif->skip(1); // Unused
|
||||||
processContactDelay = nif->getUShort();
|
mProcessContactDelay = nif->getUShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HavokMaterial::read(NIFStream *nif)
|
void HavokMaterial::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD)
|
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD)
|
||||||
nif->skip(4); // Unknown
|
nif->skip(4); // Unknown
|
||||||
material = nif->getUInt();
|
mMaterial = nif->getUInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void hkSubPartData::read(NIFStream *nif)
|
void hkSubPartData::read(NIFStream *nif)
|
||||||
{
|
{
|
||||||
havokFilter = nif->getUInt();
|
mHavokFilter = nif->getUInt();
|
||||||
numVertices = nif->getUInt();
|
mNumVertices = nif->getUInt();
|
||||||
material.read(nif);
|
mHavokMaterial.read(nif);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Namespace
|
} // Namespace
|
|
@ -12,45 +12,45 @@ namespace Nif
|
||||||
struct NiCollisionObject : public Record
|
struct NiCollisionObject : public Record
|
||||||
{
|
{
|
||||||
// The node that references this object
|
// The node that references this object
|
||||||
NodePtr target;
|
NodePtr mTarget;
|
||||||
|
|
||||||
void read(NIFStream *nif) override
|
void read(NIFStream *nif) override
|
||||||
{
|
{
|
||||||
target.read(nif);
|
mTarget.read(nif);
|
||||||
}
|
}
|
||||||
void post(NIFFile *nif) override
|
void post(NIFFile *nif) override
|
||||||
{
|
{
|
||||||
target.post(nif);
|
mTarget.post(nif);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Bethesda Havok-specific collision object
|
// Bethesda Havok-specific collision object
|
||||||
struct bhkCollisionObject : public NiCollisionObject
|
struct bhkCollisionObject : public NiCollisionObject
|
||||||
{
|
{
|
||||||
unsigned short flags;
|
unsigned short mFlags;
|
||||||
CollisionBodyPtr body;
|
CollisionBodyPtr mBody;
|
||||||
|
|
||||||
void read(NIFStream *nif) override;
|
void read(NIFStream *nif) override;
|
||||||
void post(NIFFile *nif) override
|
void post(NIFFile *nif) override
|
||||||
{
|
{
|
||||||
NiCollisionObject::post(nif);
|
NiCollisionObject::post(nif);
|
||||||
body.post(nif);
|
mBody.post(nif);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Abstract Havok shape info record
|
// Abstract Havok shape info record
|
||||||
struct bhkWorldObject : public Record
|
struct bhkWorldObject : public Record
|
||||||
{
|
{
|
||||||
bhkShapePtr shape;
|
bhkShapePtr mShape;
|
||||||
unsigned int flags; // Havok layer type, collision filter flags and group
|
unsigned int mFlags; // Havok layer type, collision filter flags and group
|
||||||
struct WorldObjectInfo
|
struct WorldObjectInfo
|
||||||
{
|
{
|
||||||
unsigned char phaseType;
|
unsigned char mPhaseType;
|
||||||
unsigned int data;
|
unsigned int mData;
|
||||||
unsigned int size;
|
unsigned int mSize;
|
||||||
unsigned int capacityAndFlags;
|
unsigned int mCapacityAndFlags;
|
||||||
};
|
};
|
||||||
WorldObjectInfo worldObjectInfo;
|
WorldObjectInfo mWorldObjectInfo;
|
||||||
void read(NIFStream *nif) override;
|
void read(NIFStream *nif) override;
|
||||||
void post(NIFFile *nif) override;
|
void post(NIFFile *nif) override;
|
||||||
};
|
};
|
||||||
|
@ -59,29 +59,30 @@ struct bhkShape : public Record {};
|
||||||
|
|
||||||
enum class hkResponseType : uint8_t
|
enum class hkResponseType : uint8_t
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
Response_Invalid = 0,
|
||||||
SimpleContact = 1,
|
Response_SimpleContact = 1,
|
||||||
Reporting = 2,
|
Response_Reporting = 2,
|
||||||
None = 3
|
Response_None = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bhkEntity : public bhkWorldObject
|
struct bhkEntity : public bhkWorldObject
|
||||||
{
|
{
|
||||||
hkResponseType responseType;
|
hkResponseType mResponseType;
|
||||||
unsigned short processContactDelay;
|
unsigned short mProcessContactDelay;
|
||||||
void read(NIFStream *nif) override;
|
void read(NIFStream *nif) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HavokMaterial
|
struct HavokMaterial
|
||||||
{
|
{
|
||||||
unsigned int material;
|
unsigned int mMaterial;
|
||||||
void read(NIFStream *nif);
|
void read(NIFStream *nif);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hkSubPartData
|
struct hkSubPartData
|
||||||
{
|
{
|
||||||
HavokMaterial material;
|
HavokMaterial mHavokMaterial;
|
||||||
unsigned int numVertices, havokFilter;
|
unsigned int mNumVertices;
|
||||||
|
unsigned int mHavokFilter;
|
||||||
void read(NIFStream *nif);
|
void read(NIFStream *nif);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue