From 20f64e51960ba42197d1653f3891fc3ab2475356 Mon Sep 17 00:00:00 2001 From: Shon Ferguson <shonferg@users.sourceforge.net> Date: Fri, 23 Jun 2006 03:28:36 +0000 Subject: [PATCH] Moved version constants to a separate file to clear up problems with no longer including NIF_IO.h in niflib.h. --- NIF_IO.h | 17 +---------------- nif_versions.h | 21 +++++++++++++++++++++ niflib.h | 3 +++ niflib.vcproj | 4 ++++ 4 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 nif_versions.h diff --git a/NIF_IO.h b/NIF_IO.h index 234b5923..30df26db 100644 --- a/NIF_IO.h +++ b/NIF_IO.h @@ -11,6 +11,7 @@ All rights reserved. Please see niflib.h for licence. */ #include <sstream> #include <vector> #include "nif_math.h" +#include "nif_versions.h" namespace Niflib { using namespace std; @@ -18,22 +19,6 @@ using namespace std; #define NULL 0 #endif -//--Constants--// - -//NIF Versions -const unsigned int VER_4_0_0_2 = 0x04000002; /*!< Nif Version 4.0.0.2 */ -const unsigned int VER_4_1_0_12 = 0x0401000C; /*!< Nif Version 4.1.0.12 */ -const unsigned int VER_4_2_0_2 = 0x04020002; /*!< Nif Version 4.2.0.2 */ -const unsigned int VER_4_2_1_0 = 0x04020100; /*!< Nif Version 4.2.1.0 */ -const unsigned int VER_4_2_2_0 = 0x04020200; /*!< Nif Version 4.2.2.0 */ -const unsigned int VER_10_0_1_0 = 0x0A000100; /*!< Nif Version 10.0.1.0 */ -const unsigned int VER_10_1_0_0 = 0x0A010000; /*!< Nif Version 10.1.0.0 */ -const unsigned int VER_10_2_0_0 = 0x0A020000; /*!< Nif Version 10.2.0.0 */ -const unsigned int VER_20_0_0_4 = 0x14000004; /*!< Nif Version 20.0.0.4 */ -const unsigned int VER_20_0_0_5 = 0x14000005; /*!< Nif Version 20.0.0.4 */ -const unsigned int VER_UNSUPPORTED = 0xFFFFFFFF; /*!< Unsupported Nif Version */ -const unsigned int VER_INVALID = 0xFFFFFFFE; /*!< Not a Nif file */ - //--Non-mathematical Basic Types--// typedef unsigned char byte; diff --git a/nif_versions.h b/nif_versions.h new file mode 100644 index 00000000..7a430aff --- /dev/null +++ b/nif_versions.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2006, NIF File Format Library and Tools +All rights reserved. Please see niflib.h for licence. */ + +#ifndef _NIF_VERSIONS_H_ +#define _NIF_VERSIONS_H_ + +//NIF Version Constants +const unsigned int VER_4_0_0_2 = 0x04000002; /*!< Nif Version 4.0.0.2 */ +const unsigned int VER_4_1_0_12 = 0x0401000C; /*!< Nif Version 4.1.0.12 */ +const unsigned int VER_4_2_0_2 = 0x04020002; /*!< Nif Version 4.2.0.2 */ +const unsigned int VER_4_2_1_0 = 0x04020100; /*!< Nif Version 4.2.1.0 */ +const unsigned int VER_4_2_2_0 = 0x04020200; /*!< Nif Version 4.2.2.0 */ +const unsigned int VER_10_0_1_0 = 0x0A000100; /*!< Nif Version 10.0.1.0 */ +const unsigned int VER_10_1_0_0 = 0x0A010000; /*!< Nif Version 10.1.0.0 */ +const unsigned int VER_10_2_0_0 = 0x0A020000; /*!< Nif Version 10.2.0.0 */ +const unsigned int VER_20_0_0_4 = 0x14000004; /*!< Nif Version 20.0.0.4 */ +const unsigned int VER_20_0_0_5 = 0x14000005; /*!< Nif Version 20.0.0.4 */ +const unsigned int VER_UNSUPPORTED = 0xFFFFFFFF; /*!< Unsupported Nif Version */ +const unsigned int VER_INVALID = 0xFFFFFFFE; /*!< Not a Nif file */ + +#endif \ No newline at end of file diff --git a/niflib.h b/niflib.h index 613fb7a4..9639e0f3 100644 --- a/niflib.h +++ b/niflib.h @@ -49,6 +49,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #include <map> #include "dll_export.h" #include "nif_math.h" +#include "nif_versions.h" #include "Ref.h" using namespace std; @@ -63,6 +64,8 @@ class NiAVObject; #define NULL 0 /*!< Definition used to detect null pointers. */ #endif +//--Constants--// + /*! Keyframe trees are game dependent, so here we define a few games. */ enum NifGame { KF_MW = 0, /*!< keyframe files: NiSequenceStreamHelper header, .kf extension */ diff --git a/niflib.vcproj b/niflib.vcproj index e257e6c6..85c6e15e 100644 --- a/niflib.vcproj +++ b/niflib.vcproj @@ -1414,6 +1414,10 @@ RelativePath=".\nif_math.h" > </File> + <File + RelativePath=".\nif_versions.h" + > + </File> <File RelativePath=".\niflib.h" > -- GitLab