diff --git a/include/gen/Footer.h b/include/gen/Footer.h index 6ef939a5ff08b2bf2c8cb939a0db6e7987e9cfd5..cec6ed2f66df968fd1c1cb845bfc3a1f936cefa8 100644 --- a/include/gen/Footer.h +++ b/include/gen/Footer.h @@ -37,9 +37,9 @@ struct Footer { * Bip Head node). */ vector<Ref<NiObject > > roots; - void Read( istream& in, list<unsigned int> & link_stack, unsigned int version, unsigned int user_version ); - void Write( ostream& out, const map<NiObjectRef,unsigned int> & link_map, unsigned int version, unsigned int user_version ) const; - string asString( bool verbose = false ) const; + NIFLIB_HIDDEN void Read( istream& in, list<unsigned int> & link_stack, unsigned int version, unsigned int user_version ); + NIFLIB_HIDDEN void Write( ostream& out, const map<NiObjectRef,unsigned int> & link_map, unsigned int version, unsigned int user_version ) const; + NIFLIB_HIDDEN string asString( bool verbose = false ) const; }; } diff --git a/include/gen/Header.h b/include/gen/Header.h index 8b7c1db6529cda5873c52f3c29188f8a0aa06c99..ad54673fc6bdeecd880fe23b7012ac1e165fad17 100644 --- a/include/gen/Header.h +++ b/include/gen/Header.h @@ -31,7 +31,7 @@ struct Header { /*! * Unknown. */ - vector<LineString > copyright; + array<3,LineString > copyright; /*! * The NIF version, in hexadecimal notation: 0x04000002, 0x0401000C, * 0x04020002, 0x04020100, 0x04020200, 0x0A000100, 0x0A010000, @@ -88,9 +88,9 @@ struct Header { * Unknown. */ unsigned int unknownInt2; - void Read( istream& in ); - void Write( ostream& out ) const; - string asString( bool verbose = false ) const; + NIFLIB_HIDDEN void Read( istream& in ); + NIFLIB_HIDDEN void Write( ostream& out ) const; + NIFLIB_HIDDEN string asString( bool verbose = false ) const; }; } diff --git a/include/nif_math.h b/include/nif_math.h index 085d6a58bcb7184f9670973a02b8d8146d9b4ddc..1378c0013286869fba50bf3b38280c5b6f673371 100644 --- a/include/nif_math.h +++ b/include/nif_math.h @@ -816,6 +816,7 @@ struct Matrix44 { return rows[n]; } + private: /*! The 4x4 identity matrix constant */ static const Matrix44 IDENTITY; }; diff --git a/include/nif_versions.h b/include/nif_versions.h index 4aa85c23f2255c36b0169276a2e6dbd91de4366a..86e5f227fdabfaad580e5863943f3f5b8a20c7dd 100644 --- a/include/nif_versions.h +++ b/include/nif_versions.h @@ -8,7 +8,7 @@ All rights reserved. Please see niflib.h for licence. */ namespace Niflib { -const unsigned VER_3_1 = 0x03010000; /*!< NIF Version 3.3.0.13 */ +const unsigned VER_3_1 = 0x03010000; /*!< NIF Version 3.1 */ const unsigned VER_3_3_0_13 = 0x0303000D; /*!< NIF Version 3.3.0.13 */ const unsigned VER_4_0_0_0 = 0x04000000; /*!< NIF Version 4.0.0.0 */ const unsigned VER_4_0_0_2 = 0x04000002; /*!< NIF Version 4.0.0.2 */ diff --git a/src/gen/Header.cpp b/src/gen/Header.cpp index df85dcb42553396e445f881e93dd42cf79a8154e..a861387d0c9c963de5640a248fe92052474fcf5e 100644 --- a/src/gen/Header.cpp +++ b/src/gen/Header.cpp @@ -5,7 +5,7 @@ All rights reserved. Please see niflib.h for licence. */ using namespace Niflib; //Constructor -Header::Header() : version((unsigned int)0x04000002), endianType((byte)1), userVersion((unsigned int)0), numBlocks((unsigned int)0), userVersion2((unsigned int)0), numBlockTypes((unsigned short)0), unknownInt2((unsigned int)0), copyright(3) {}; +Header::Header() : version((unsigned int)0x04000002), endianType((byte)1), userVersion((unsigned int)0), numBlocks((unsigned int)0), userVersion2((unsigned int)0), numBlockTypes((unsigned short)0), unknownInt2((unsigned int)0) {}; //Copy Constructor Header::Header( const Header & src ) { diff --git a/src/nif_math.cpp b/src/nif_math.cpp index 73d24e41f0e2ea1e845f769dfe14d62c30a03d1c..b1d5cc8dd5ebad764fb85c0b74d2cd577690317a 100644 --- a/src/nif_math.cpp +++ b/src/nif_math.cpp @@ -162,7 +162,7 @@ Vector3 Vector3::CrossProduct( const Vector3 & rh) const { */ Matrix22::Matrix22() { - *this = Matrix22::IDENTITY; + *this = Matrix22::Identity(); } /* @@ -170,7 +170,7 @@ Matrix22::Matrix22() { */ Matrix33::Matrix33() { - *this = Matrix33::IDENTITY; + *this = Matrix33::Identity(); } Quaternion Matrix33::AsQuaternion() { @@ -241,7 +241,7 @@ Matrix33 Matrix33::operator*( const Matrix33 & m ) const */ Matrix44::Matrix44() { - *this = Matrix44::IDENTITY; + *this = Matrix44::Identity(); } Matrix44::Matrix44( const Matrix33 & r ) { diff --git a/src/obj/NiGeometry.cpp b/src/obj/NiGeometry.cpp index bffd82bb4959c83cedfc5f35b82cf87c209948b9..4ada3fd3d1e95dcc8affee79334c7457fb046974 100644 --- a/src/obj/NiGeometry.cpp +++ b/src/obj/NiGeometry.cpp @@ -210,7 +210,7 @@ void NiGeometry::ApplySkinOffset() { this->ApplyTransforms(); //Set the skin overall transform to the identity - skinInstance->GetSkinData()->SetOverallTransform( Matrix44::IDENTITY ); + skinInstance->GetSkinData()->SetOverallTransform( Matrix44::Identity() ); //Reset skin offsets skinInstance->GetSkinData()->ResetOffsets( this ); @@ -352,7 +352,7 @@ void NiGeometry::ApplyTransforms() { geom_data->Transform( this->GetLocalTransform() ); //Now that the transforms have been applied, clear them to the identity - this->SetLocalTransform( Matrix44::IDENTITY ); + this->SetLocalTransform( Matrix44::Identity() ); } // Calculate bounding sphere using minimum-volume axis-align bounding box. Its fast but not a very good fit. diff --git a/src/obj/NiNode.cpp b/src/obj/NiNode.cpp index aa6e7b92308debc7f8f17d86b9de7c71135f4783..b1a79f5015891ce0baa408034f6b6a7a60bb5dcf 100644 --- a/src/obj/NiNode.cpp +++ b/src/obj/NiNode.cpp @@ -221,7 +221,7 @@ void NiNode::PropagateTransform() { } //Nowthat the transforms have been propogated, clear them out - this->SetLocalTransform( Matrix44::IDENTITY ); + this->SetLocalTransform( Matrix44::Identity() ); } bool NiNode::IsSplitMeshProxy() const { @@ -245,7 +245,7 @@ bool NiNode::IsSplitMeshProxy() const { if ( children[i]->IsDerivedType( NiTriBasedGeom::TypeConst() ) == false ) { return false; } - if ( children[i]->GetLocalTransform() != Matrix44::IDENTITY ) { + if ( children[i]->GetLocalTransform() != Matrix44::Identity() ) { return false; } if ( children[i]->GetVisibility() == false ) {