src/gfx_type.h
branchnoai
changeset 11044 097ea3e7ec56
parent 10355 ee4b5f7a5bf2
child 11126 72d4c9314c72
equal deleted inserted replaced
11043:e44adcf4ed4d 11044:097ea3e7ec56
     3 /** @file gfx_type.h Types related to the graphics and/or input devices. */
     3 /** @file gfx_type.h Types related to the graphics and/or input devices. */
     4 
     4 
     5 #ifndef GFX_TYPE_H
     5 #ifndef GFX_TYPE_H
     6 #define GFX_TYPE_H
     6 #define GFX_TYPE_H
     7 
     7 
       
     8 #include "core/endian_type.hpp"
     8 #include "core/enum_type.hpp"
     9 #include "core/enum_type.hpp"
     9 #include "core/geometry_type.hpp"
    10 #include "core/geometry_type.hpp"
    10 #include "zoom_type.h"
    11 #include "zoom_type.h"
    11 
    12 
    12 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
    13 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
   140 	int pitch;
   141 	int pitch;
   141 	ZoomLevel zoom;
   142 	ZoomLevel zoom;
   142 };
   143 };
   143 
   144 
   144 struct Colour {
   145 struct Colour {
   145 	byte r;
   146 #if TTD_ENDIAN == TTD_BIG_ENDIAN
   146 	byte g;
   147 	uint8 a, r, g, b; ///< colour channels in BE order
   147 	byte b;
   148 #else
       
   149 	uint8 b, g, r, a; ///< colour channels in LE order
       
   150 #endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */
       
   151 
       
   152 	operator uint32 () { return *(uint32 *)this; }
   148 };
   153 };
   149 
   154 
   150 enum FontSize {
   155 enum FontSize {
   151 	FS_NORMAL,
   156 	FS_NORMAL,
   152 	FS_SMALL,
   157 	FS_SMALL,