NIFStream: remove getBoolean, getString

macos_ci_fix
Alexei Kotov 1 year ago
parent 05d8975ed1
commit b0dfd74562

@ -156,8 +156,6 @@ namespace Nif
osg::Vec2f getVector2() { return get<osg::Vec2f>(); }
osg::Vec3f getVector3() { return get<osg::Vec3f>(); }
osg::Vec4f getVector4() { return get<osg::Vec4f>(); }
bool getBoolean() { return get<bool>(); }
std::string getString() { return get<std::string>(); }
};
template <>

@ -153,8 +153,8 @@ namespace Nif
if (nif->getVersion() < NIFStream::generateVersion(10, 0, 1, 0))
return;
unsigned int num = 0;
if (nif->getVersion() <= NIFStream::generateVersion(20, 1, 0, 3))
num = nif->getBoolean(); // Has Shader
if (nif->getVersion() <= NIFStream::generateVersion(20, 1, 0, 3) && nif->get<bool>())
num = 1;
else if (nif->getVersion() >= NIFStream::generateVersion(20, 2, 0, 5))
num = nif->getUInt();
@ -163,7 +163,7 @@ namespace Nif
if (nif->getVersion() >= NIFStream::generateVersion(20, 2, 0, 5))
active = nif->getUInt();
if (nif->getVersion() >= NIFFile::NIFVersion::VER_BGS)
needsUpdate = nif->getBoolean();
nif->read(needsUpdate);
}
void NiGeometry::read(NIFStream* nif)
@ -210,7 +210,7 @@ namespace Nif
nearDist = nif->getFloat();
farDist = nif->getFloat();
if (nif->getVersion() >= NIFStream::generateVersion(10, 1, 0, 0))
orthographic = nif->getBoolean();
nif->read(orthographic);
vleft = nif->getFloat();
vright = nif->getFloat();
vtop = nif->getFloat();

@ -8,7 +8,7 @@ namespace Nif
void NiTexturingProperty::Texture::read(NIFStream* nif)
{
inUse = nif->getBoolean();
nif->read(inUse);
if (!inUse)
return;
@ -36,7 +36,7 @@ namespace Nif
nif->skip(2); // Unknown short
else if (nif->getVersion() >= NIFStream::generateVersion(10, 1, 0, 0))
{
if (nif->getBoolean()) // Has texture transform
if (nif->get<bool>()) // Has texture transform
{
nif->getVector2(); // UV translation
nif->getVector2(); // UV scale

Loading…
Cancel
Save