1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Read NiSpotLight

This commit is contained in:
scrawl 2015-11-12 23:45:12 +01:00
parent ba211ad9ad
commit a29d1ace2b
3 changed files with 16 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -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;

View File

@ -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 ));