FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
fife_stdint.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2019 by the FIFE team *
3  * http://www.fifengine.net *
4  * This file is part of FIFE. *
5  * *
6  * FIFE is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2.1 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20  ***************************************************************************/
21 
22 #ifndef FIFE_UTIL_FIFE_STDINT_H
23 #define FIFE_UTIL_FIFE_STDINT_H
24 
25 // Standard C++ library includes
26 
27 // Platform specific includes
28 #if defined( WIN32 ) && defined( _MSC_VER )
29 #ifndef _SDL_H
30 typedef signed __int8 int8_t;
31 typedef unsigned __int8 uint8_t;
32 typedef signed __int16 int16_t;
33 typedef unsigned __int16 uint16_t;
34 typedef signed __int32 int32_t;
35 typedef unsigned __int32 uint32_t;
36 typedef signed __int64 int64_t;
37 typedef unsigned __int64 uint64_t;
38 #endif
39 #else
40 #include <stdint.h>
41 #endif
42 
43 // 3rd party library includes
44 
45 // FIFE includes
46 // These includes are split up in two parts, separated by one empty line
47 // First block: files included from the FIFE root src directory
48 // Second block: files included from the same folder
49 
50 // SDL masks for SDL_CreateRGBSurface
51 namespace FIFE {
52 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
53  const uint32_t RMASK = 0xff000000;
54  const uint32_t GMASK = 0x00ff0000;
55  const uint32_t BMASK = 0x0000ff00;
56  const uint32_t AMASK = 0x000000ff;
57 #else
58  const uint32_t RMASK = 0x000000ff;
59  const uint32_t GMASK = 0x0000ff00;
60  const uint32_t BMASK = 0x00ff0000;
61  const uint32_t AMASK = 0xff000000;
62 #endif
63  const uint32_t NULLMASK = 0x00000000;
64 } //FIFE
65 
66 #endif // FIFEINT_H
const uint32_t NULLMASK
Definition: fife_stdint.h:63
const uint32_t RMASK
Definition: fife_stdint.h:53
const uint32_t AMASK
Definition: fife_stdint.h:56
unsigned char uint8_t
Definition: core.h:38
const uint32_t GMASK
Definition: fife_stdint.h:54
const uint32_t BMASK
Definition: fife_stdint.h:55
unsigned short uint16_t
Definition: core.h:39
unsigned int uint32_t
Definition: core.h:40