Skip to content
Snippets Groups Projects
Commit 3872bbb9 authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Noticed VertMode and LightMode enums had not been implemented, so did so.

parent 82784d7b
No related branches found
No related tags found
No related merge requests found
...@@ -538,6 +538,29 @@ ostream & operator<<( ostream & out, PixelLayout const & val ) { ...@@ -538,6 +538,29 @@ ostream & operator<<( ostream & out, PixelLayout const & val ) {
}; };
} }
//VertMode
void NifStream( VertMode & val, istream& in, uint version ) { val = VertMode(ReadUInt( in )); };
void NifStream( VertMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); }
ostream & operator<<( ostream & out, VertMode const & val ) {
switch ( val ) {
case VERT_MODE_SRC_IGNORE: return out << "VERT_MODE_SRC_IGNORE";
case VERT_MODE_SRC_EMISSIVE: return out << "VERT_MODE_SRC_EMISSIVE";
case VERT_MODE_SRC_AMB_DIF: return out << "VERT_MODE_SRC_AMB_DIF";
default: return out << "Invalid Value! - " << uint(val);
};
}
//LightMode
void NifStream( LightMode & val, istream& in, uint version ) { val = LightMode(ReadUInt( in )); };
void NifStream( LightMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); }
ostream & operator<<( ostream & out, LightMode const & val ) {
switch ( val ) {
case LIGHT_MODE_EMISSIVE: return out << "LIGHT_MODE_EMISSIVE";
case LIGHT_MODE_EMI_AMB_DIF: return out << "LIGHT_MODE_EMI_AMB_DIF";
default: return out << "Invalid Value! - " << uint(val);
};
}
//The HexString function creates a formatted hex display of the given data for use in printing //The HexString function creates a formatted hex display of the given data for use in printing
//a debug string for information that is not understood //a debug string for information that is not understood
string HexString( const byte * src, uint len ) { string HexString( const byte * src, uint len ) {
......
...@@ -163,6 +163,23 @@ enum PixelLayout { ...@@ -163,6 +163,23 @@ enum PixelLayout {
PIX_LAY_DEFAULT = 5 /*!< Use default setting. */ PIX_LAY_DEFAULT = 5 /*!< Use default setting. */
}; };
/*!
* Specifies what type of light is active on the shape.
*/
enum VertMode {
VERT_MODE_SRC_IGNORE = 0, /*!< Source Ignore. */
VERT_MODE_SRC_EMISSIVE = 1, /*!< Source Emissive. */
VERT_MODE_SRC_AMB_DIF = 2, /*!< Source Ambient/Diffuse. */
};
/*!
* Specifies the light mode.
*/
enum LightMode {
LIGHT_MODE_EMISSIVE = 0, /*!< Emissive. */
LIGHT_MODE_EMI_AMB_DIF = 1, /*!< Emissive + Ambient + Diffuse. */
};
//--IO Functions--// //--IO Functions--//
int BlockSearch( istream& in ); int BlockSearch( istream& in );
...@@ -327,6 +344,16 @@ void NifStream( PixelLayout & val, istream& in, uint version = 0 ); ...@@ -327,6 +344,16 @@ void NifStream( PixelLayout & val, istream& in, uint version = 0 );
void NifStream( PixelLayout const & val, ostream& out, uint version = 0 ); void NifStream( PixelLayout const & val, ostream& out, uint version = 0 );
ostream & operator<<( ostream & out, PixelLayout const & val ); ostream & operator<<( ostream & out, PixelLayout const & val );
//VertMode
void NifStream( VertMode & val, istream& in, uint version = 0 );
void NifStream( VertMode const & val, ostream& out, uint version = 0 );
ostream & operator<<( ostream & out, VertMode const & val );
//LightMode
void NifStream( LightMode & val, istream& in, uint version = 0 );
void NifStream( LightMode const & val, ostream& out, uint version = 0 );
ostream & operator<<( ostream & out, LightMode const & val );
//--Templates--// //--Templates--//
//Key<T> //Key<T>
......
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