Read NiSpotLight

openmw-38
scrawl 9 years ago
parent ba211ad9ad
commit a29d1ace2b

@ -55,4 +55,12 @@ void NiPointLight::read(NIFStream *nif)
quadraticAttenuation = nif->getFloat();
}
void NiSpotLight::read(NIFStream *nif)
{
NiPointLight::read(nif);
cutoff = nif->getFloat();
exponent = nif->getFloat();
}
}

@ -60,6 +60,13 @@ struct NiPointLight : public NiLight
void read(NIFStream *nif);
};
struct NiSpotLight : public NiPointLight
{
float cutoff;
float exponent;
void read(NIFStream *nif);
};
struct NiTextureEffect : NiDynamicEffect
{
NiSourceTexturePtr texture;

@ -83,6 +83,7 @@ static std::map<std::string,RecordFactoryEntry> makeFactory()
newFactory.insert(makeEntry("NiAmbientLight", &construct <NiLight> , RC_NiLight ));
newFactory.insert(makeEntry("NiDirectionalLight", &construct <NiLight> , RC_NiLight ));
newFactory.insert(makeEntry("NiPointLight", &construct <NiPointLight> , RC_NiLight ));
newFactory.insert(makeEntry("NiSpotLight", &construct <NiSpotLight> , RC_NiLight ));
newFactory.insert(makeEntry("NiTextureEffect", &construct <NiTextureEffect> , RC_NiTextureEffect ));
newFactory.insert(makeEntry("NiVertWeightsExtraData", &construct <NiVertWeightsExtraData> , RC_NiVertWeightsExtraData ));
newFactory.insert(makeEntry("NiTextKeyExtraData", &construct <NiTextKeyExtraData> , RC_NiTextKeyExtraData ));

Loading…
Cancel
Save