_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include "SDL_byteorder.h"#include "SDL_endian.h"Go to the source code of this file.
Macros | |
myendian.h - The endian-specific headerfile. | |
| #define | ConvertLE16(v) SDL_SwapLE16((v)) |
| #define | ConvertLE32(v) SDL_SwapLE32((v)) |
| #define | AccessLE16(p) SDL_SwapLE16(*((unsigned short *)(p))) |
| #define | AccessLE32(p) SDL_SwapLE32(*((unsigned int *)(p))) |
| #define | FetchLE16(p) SDL_SwapLE16(*((unsigned short *)(p))); p += 2 |
| #define | FetchLE32(p) SDL_SwapLE32(*((unsigned int *)(p))); p += 4 |
| #define | STRATAGUS_LITTLE_ENDIAN |
| #define AccessLE16 | ( | p | ) | SDL_SwapLE16(*((unsigned short *)(p))) |
Access a 16 bit value in little endian and return it in native format.
| #define AccessLE32 | ( | p | ) | SDL_SwapLE32(*((unsigned int *)(p))) |
Access a 32 bit value in little endian and return it in native format.
| #define ConvertLE16 | ( | v | ) | SDL_SwapLE16((v)) |
Convert a 16 bit value in little endian and return it in native format.
| #define ConvertLE32 | ( | v | ) | SDL_SwapLE32((v)) |
Convert a 32 bit value in little endian and return it in native format.
| #define FetchLE16 | ( | p | ) | SDL_SwapLE16(*((unsigned short *)(p))); p += 2 |
Fetch a 16 bit value in little endian with incrementing pointer and return it in native format.
| #define FetchLE32 | ( | p | ) | SDL_SwapLE32(*((unsigned int *)(p))); p += 4 |
Fetch a 32 bit value in little endian with incrementing pointer and return it in native format.
| #define STRATAGUS_LITTLE_ENDIAN |
1.8.17
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.