Skip to content
Snippets Groups Projects
Commit ec842ca3 authored by Tazpn's avatar Tazpn
Browse files

niflib: Add helper properties to shaders and fix type in versions.

parent c42dcee7
No related branches found
No related tags found
No related merge requests found
Showing
with 153 additions and 1 deletion
......@@ -26,7 +26,7 @@ const unsigned VER_10_2_0_0 = 0x0A020000; /*!< NIF Version 10.2.0.0 */
const unsigned VER_20_0_0_4 = 0x14000004; /*!< NIF Version 20.0.0.4 */
const unsigned VER_20_0_0_5 = 0x14000005; /*!< NIF Version 20.0.0.4 */
const unsigned VER_20_1_0_3 = 0x14010003; /*!< NIF Version 20.1.0.3 */
const unsigned VER_20_2_0_7 = 0x14010007; /*!< NIF Version 20.2.0.7 */
const unsigned VER_20_2_0_7 = 0x14020007; /*!< NIF Version 20.2.0.7 */
const unsigned VER_20_3_0_3 = 0x14030003; /*!< NIF Version 20.3.0.3 */
const unsigned VER_20_3_0_6 = 0x14030006; /*!< NIF Version 20.3.0.6 */
const unsigned VER_UNSUPPORTED = 0xFFFFFFFF; /*!< Unsupported NIF Version */
......
......@@ -54,6 +54,13 @@ public:
NIFLIB_API virtual const Type & GetType() const;
//--BEGIN MISC CUSTOM CODE--//
// The texture glow map.
// \return The current value.
string GetFileName() const;
// The texture glow map.
// \param[in] value The new value.
void SetFileName( const string & value );
//--END CUSTOM CODE--//
protected:
......
......@@ -60,6 +60,14 @@ public:
//--BEGIN MISC CUSTOM CODE--//
// Texture Set
// \return The current value.
Ref<BSShaderTextureSet > GetTextureSet() const;
// Texture Set
// \param[in] value The new value.
void SetTextureSet( Ref<BSShaderTextureSet > value );
//--END CUSTOM CODE--//
protected:
/*! Texture Set */
......
......@@ -55,6 +55,22 @@ public:
//--BEGIN MISC CUSTOM CODE--//
// Unknown
// \return The current value.
unsigned short GetFlags() const;
// Unknown
// \param[in] value The new value.
void SetFlags( unsigned short value );
// Unknown (Set to 0x21 for NoLighting, 0x11 for Water)
// \return The current value.
BSShaderType GetShaderType() const;
// Unknown (Set to 0x21 for NoLighting, 0x11 for Water)
// \param[in] value The new value.
void SetShaderType( BSShaderType value );
//--END CUSTOM CODE--//
protected:
/*! Unknown */
......
......@@ -55,6 +55,23 @@ public:
//--BEGIN MISC CUSTOM CODE--//
// Textures
// \return The current value.
vector<string > GetTextures() const;
// Textures
// \param[in] value The new value.
void SetTextures( const vector<string >& value );
// Textures
// \return The current value.
string GetTexture( size_t i ) const;
// Textures
// \param[in] i Index of texture to set
// \param[in] value The new value.
void SetTexture( size_t i, const string& value);
//--END CUSTOM CODE--//
protected:
/*! Number of Textures */
......
......@@ -53,6 +53,8 @@ public:
*/
NIFLIB_API virtual const Type & GetType() const;
//--This object has no eligable attributes. No example implementation generated--//
//--BEGIN MISC CUSTOM CODE--//
//--END CUSTOM CODE--//
......
......@@ -55,6 +55,14 @@ public:
//--BEGIN MISC CUSTOM CODE--//
// The texture.
// \return The current value.
string GetFileName() const;
// The texture.
// \param[in] value The new value.
void SetFileName( const string & value );
//--END CUSTOM CODE--//
protected:
/*! Unknown */
......
......@@ -55,6 +55,14 @@ public:
//--BEGIN MISC CUSTOM CODE--//
// Texture file name
// \return The current value.
string GetFileName() const;
// Texture file name
// \param[in] value The new value.
void SetFileName( const string & value );
//--END CUSTOM CODE--//
protected:
/*! Texture file name */
......
......@@ -55,6 +55,14 @@ public:
//--BEGIN MISC CUSTOM CODE--//
// Texture file name
// \return The current value.
string GetFileName() const;
// Texture file name
// \param[in] value The new value.
void SetFileName( const string & value );
//--END CUSTOM CODE--//
protected:
/*! Texture file name */
......
......@@ -118,4 +118,12 @@ std::list<NiObjectRef> BSShaderNoLightingProperty::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
string BSShaderNoLightingProperty::GetFileName() const {
return fileName;
}
void BSShaderNoLightingProperty::SetFileName( const string & value ) {
fileName = value;
}
//--END CUSTOM CODE--//
......@@ -136,4 +136,12 @@ std::list<NiObjectRef> BSShaderPPLightingProperty::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
Ref<BSShaderTextureSet > BSShaderPPLightingProperty::GetTextureSet() const {
return textureSet;
}
void BSShaderPPLightingProperty::SetTextureSet( Ref<BSShaderTextureSet > value ) {
textureSet = value;
}
//--END CUSTOM CODE--//
......@@ -114,4 +114,20 @@ std::list<NiObjectRef> BSShaderProperty::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
unsigned short BSShaderProperty::GetFlags() const {
return flags;
}
void BSShaderProperty::SetFlags( unsigned short value ) {
flags = value;
}
BSShaderType BSShaderProperty::GetShaderType() const {
return shaderType;
}
void BSShaderProperty::SetShaderType( BSShaderType value ) {
shaderType = value;
}
//--END CUSTOM CODE--//
......@@ -123,4 +123,24 @@ std::list<NiObjectRef> BSShaderTextureSet::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
vector<string > BSShaderTextureSet::GetTextures() const {
return textures;
}
void BSShaderTextureSet::SetTextures( const vector<string >& value ) {
textures = value;
}
string BSShaderTextureSet::GetTexture(size_t i) const {
if (i >= textures.size())
throw runtime_error("Invalid Texture Index specified");
return textures[i];
}
void BSShaderTextureSet::SetTexture( size_t i, const string& value) {
if (i >= textures.size())
textures.resize(i+1);
textures[i] = value;
}
//--END CUSTOM CODE--//
......@@ -97,6 +97,8 @@ std::list<NiObjectRef> Lighting30ShaderProperty::GetRefs() const {
return refs;
}
//--This object has no eligable attributes. No example implementation generated--//
//--BEGIN MISC CUSTOM CODE--//
//--END CUSTOM CODE--//
......@@ -108,4 +108,12 @@ std::list<NiObjectRef> SkyShaderProperty::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
string SkyShaderProperty::GetFileName() const {
return fileName;
}
void SkyShaderProperty::SetFileName( const string & value ) {
fileName = value;
}
//--END CUSTOM CODE--//
......@@ -102,4 +102,12 @@ std::list<NiObjectRef> TallGrassShaderProperty::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
string TallGrassShaderProperty::GetFileName() const {
return fileName;
}
void TallGrassShaderProperty::SetFileName( const string & value ) {
fileName = value;
}
//--END CUSTOM CODE--//
......@@ -102,4 +102,12 @@ std::list<NiObjectRef> TileShaderProperty::GetRefs() const {
//--BEGIN MISC CUSTOM CODE--//
string TileShaderProperty::GetFileName() const {
return fileName;
}
void TileShaderProperty::SetFileName( const string & value ) {
fileName = value;
}
//--END CUSTOM CODE--//
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment