mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-28 00:15:06 +00:00
0688b6de40
To make it possible to set record list state independently from reading NIF file.
33 lines
780 B
C++
33 lines
780 B
C++
#include "base.hpp"
|
|
|
|
namespace Nif
|
|
{
|
|
void Extra::read(NIFStream* nif)
|
|
{
|
|
if (nif->getVersion() >= NIFStream::generateVersion(10, 0, 1, 0))
|
|
name = nif->getString();
|
|
else if (nif->getVersion() <= NIFStream::generateVersion(4, 2, 2, 0))
|
|
{
|
|
next.read(nif);
|
|
recordSize = nif->getUInt();
|
|
}
|
|
}
|
|
|
|
void Named::read(NIFStream* nif)
|
|
{
|
|
name = nif->getString();
|
|
if (nif->getVersion() < NIFStream::generateVersion(10, 0, 1, 0))
|
|
extra.read(nif);
|
|
else
|
|
readRecordList(nif, extralist);
|
|
controller.read(nif);
|
|
}
|
|
|
|
void Named::post(Reader& nif)
|
|
{
|
|
extra.post(nif);
|
|
postRecordList(nif, extralist);
|
|
controller.post(nif);
|
|
}
|
|
}
|