Skip to content
Snippets Groups Projects
Commit c9ed869c authored by Amorilia's avatar Amorilia
Browse files

niflib:

* NIF_BIG/LITTLE_ENDIAN -> ENDIAN_BIG/LITTLE
parent b29f38e3
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,8 @@ typedef unsigned char byte; ...@@ -30,8 +30,8 @@ typedef unsigned char byte;
/*! Specifies the low-level nature of the storage process */ /*! Specifies the low-level nature of the storage process */
enum EndianType { enum EndianType {
NIF_BIG_ENDIAN = 0, /*!< Big Endian storage, such as that used by PowerPC processors */ ENDIAN_BIG = 0, /*!< Big Endian storage, such as that used by PowerPC processors */
NIF_LITTLE_ENDIAN = 1 /*!< Little Endian storage, such as that used by x86 processors */ ENDIAN_LITTLE = 1 /*!< Little Endian storage, such as that used by x86 processors */
}; };
//--Structures--// //--Structures--//
...@@ -41,12 +41,12 @@ enum EndianType { ...@@ -41,12 +41,12 @@ enum EndianType {
* the way an existing file was stored. * the way an existing file was stored.
*/ */
struct NifInfo { struct NifInfo {
NifInfo() : version(VER_4_0_0_2), userVersion(0), userVersion2(0), endian(NIF_LITTLE_ENDIAN) {} NifInfo() : version(VER_4_0_0_2), userVersion(0), userVersion2(0), endian(ENDIAN_LITTLE) {}
NifInfo( unsigned version, unsigned userVersion = 0, unsigned userVersion2 = 0) { NifInfo( unsigned version, unsigned userVersion = 0, unsigned userVersion2 = 0) {
this->version = version; this->version = version;
this->userVersion = userVersion; this->userVersion = userVersion;
this->userVersion2 = userVersion2; this->userVersion2 = userVersion2;
endian = NIF_LITTLE_ENDIAN; endian = ENDIAN_LITTLE;
} }
unsigned version; unsigned version;
unsigned userVersion; unsigned userVersion;
......
...@@ -24,9 +24,9 @@ EndianType DetectEndianType() { ...@@ -24,9 +24,9 @@ EndianType DetectEndianType() {
short r = *(short *)test; short r = *(short *)test;
if ( r == 1 ) { if ( r == 1 ) {
return NIF_LITTLE_ENDIAN; return ENDIAN_LITTLE;
} else { } else {
return NIF_BIG_ENDIAN; return ENDIAN_BIG;
} }
} }
......
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