Added formats conversion

Functor, NonCopyable, Tuple are now parts of NazaraCore (NazaraCore no
longer needs NazaraUtility)
Added loadFormat image parameter (ask loader to load image in specific
format)
Fixed utility project building
It is now possible to convert, get validity or get name of pixel formats
Changed endianness macros' name
Removed useless NazaraEndianness macro
Removed unused files
This commit is contained in:
Lynix
2012-05-24 18:55:48 +02:00
parent 570e0a8070
commit b243d15c74
40 changed files with 1609 additions and 150 deletions

View File

@@ -17,27 +17,11 @@ inline void NzByteSwap(void* buffer, unsigned int size)
inline nzEndianness NzGetPlatformEndianness()
{
#if NAZARA_ENDIANNESS_DETECTED
return NazaraEndianness;
#else
static nzEndianness endianness = nzEndianness_Unknown;
static bool tested = false;
if (!tested)
{
nzUInt32 i = 1;
nzUInt8* p = reinterpret_cast<nzUInt8*>(&i);
// Méthode de récupération de l'endianness au runtime
if (p[0] == 1)
endianness = nzEndianness_LittleEndian;
else if (p[3] == 1)
endianness = nzEndianness_BigEndian;
tested = true;
}
return endianness;
#endif
#if defined(NAZARA_BIG_ENDIAN)
return nzEndianness_BigEndian;
#elif defined(NAZARA_LITTLE_ENDIAN)
return nzEndianness_LittleEndian;
#endif
}
#include <Nazara/Core/DebugOff.hpp>