Separate NIFFileReader from NIFFile

NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
This commit is contained in:
elsid 2022-09-17 19:24:42 +02:00
parent b39ccbeeef
commit f2fb3d6de8
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
31 changed files with 446 additions and 420 deletions

View file

@ -165,7 +165,7 @@ namespace Nif
mWorldObjectInfo.read(nif);
}
void bhkWorldObject::post(NIFFile* nif)
void bhkWorldObject::post(Reader& nif)
{
mShape.post(nif);
}
@ -181,7 +181,7 @@ namespace Nif
mShape.read(nif);
}
void bhkBvTreeShape::post(NIFFile* nif)
void bhkBvTreeShape::post(Reader& nif)
{
mShape.post(nif);
}
@ -207,7 +207,7 @@ namespace Nif
nif->getUInts(mFilters, numFilters);
}
void bhkNiTriStripsShape::post(NIFFile* nif)
void bhkNiTriStripsShape::post(Reader& nif)
{
mData.post(nif);
}
@ -229,7 +229,7 @@ namespace Nif
mData.read(nif);
}
void bhkPackedNiTriStripsShape::post(NIFFile* nif)
void bhkPackedNiTriStripsShape::post(Reader& nif)
{
mData.post(nif);
}