mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:45:33 +00:00
NIF version adjustments
Cut down on obscure version numbers Call generateVersion without using a stream object
This commit is contained in:
parent
0e3ae38e49
commit
a08a9518c3
4 changed files with 3 additions and 7 deletions
|
@ -225,7 +225,7 @@ void NiSkinData::read(NIFStream *nif)
|
|||
trafo.scale = nif->getFloat();
|
||||
|
||||
int boneNum = nif->getInt();
|
||||
if (nif->getVersion() >= NIFFile::NIFVersion::VER_MW && nif->getVersion() <= NIFFile::NIFVersion::VER_GAMEBRYO)
|
||||
if (nif->getVersion() >= NIFFile::NIFVersion::VER_MW && nif->getVersion() <= NIFStream::generateVersion(10,1,0,0))
|
||||
nif->skip(4); // NiSkinPartition link
|
||||
|
||||
bones.resize(boneNum);
|
||||
|
|
|
@ -144,7 +144,7 @@ void NIFFile::parse(Files::IStreamPtr stream)
|
|||
ver = nif.getUInt();
|
||||
// 4.0.0.0 is an older, practically identical version of the format.
|
||||
// It's not used by Morrowind assets but Morrowind supports it.
|
||||
if(ver != nif.generateVersion(4,0,0,0) && ver != VER_MW)
|
||||
if(ver != NIFStream::generateVersion(4,0,0,0) && ver != VER_MW)
|
||||
fail("Unsupported NIF version: " + printVersion(ver));
|
||||
// Number of records
|
||||
size_t recNum = nif.getInt();
|
||||
|
|
|
@ -79,11 +79,7 @@ public:
|
|||
enum NIFVersion
|
||||
{
|
||||
VER_MW = 0x04000002, // 4.0.0.2. Main Morrowind NIF version.
|
||||
VER_CI = 0x04020200, // 4.2.2.0. Main Culpa Innata NIF version, also used in Civ4.
|
||||
VER_ZT2 = 0x0A000100, // 10.0.1.0. Main Zoo Tycoon 2 NIF version, also used in Oblivion and Civ4.
|
||||
VER_OB_OLD = 0x0A000102, // 10.0.1.2. Main older Oblivion NIF version.
|
||||
VER_GAMEBRYO = 0x0A010000, // 10.1.0.0. Lots of games use it. The first version that has Gamebryo File Format header.
|
||||
VER_CIV4 = 0x14000004, // 20.0.0.4. Main Civilization IV NIF version.
|
||||
VER_OB = 0x14000005, // 20.0.0.5. Main Oblivion NIF version.
|
||||
VER_BGS = 0x14020007 // 20.2.0.7. Main Fallout 3/4/76/New Vegas and Skyrim/SkyrimSE NIF version.
|
||||
};
|
||||
|
|
|
@ -285,7 +285,7 @@ struct NiLODNode : public NiSwitchNode
|
|||
void read(NIFStream *nif)
|
||||
{
|
||||
NiSwitchNode::read(nif);
|
||||
if (nif->getVersion() >= NIFFile::NIFVersion::VER_MW && nif->getVersion() <= NIFFile::NIFVersion::VER_ZT2)
|
||||
if (nif->getVersion() >= NIFFile::NIFVersion::VER_MW && nif->getVersion() <= NIFStream::generateVersion(10,0,1,0))
|
||||
lodCenter = nif->getVector3();
|
||||
unsigned int numLodLevels = nif->getUInt();
|
||||
for (unsigned int i=0; i<numLodLevels; ++i)
|
||||
|
|
Loading…
Reference in a new issue