2022-07-21 11:51:34 +00:00
|
|
|
#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
|
2022-09-18 13:59:42 +00:00
|
|
|
readRecordList(nif, extralist);
|
2022-07-21 11:51:34 +00:00
|
|
|
controller.read(nif);
|
|
|
|
}
|
|
|
|
|
2022-09-17 17:24:42 +00:00
|
|
|
void Named::post(Reader& nif)
|
2022-07-21 11:51:34 +00:00
|
|
|
{
|
|
|
|
extra.post(nif);
|
2022-09-18 13:59:42 +00:00
|
|
|
postRecordList(nif, extralist);
|
2022-07-21 11:51:34 +00:00
|
|
|
controller.post(nif);
|
|
|
|
}
|
|
|
|
}
|