src/openttd.h
changeset 8121 3bc6351e7369
parent 8119 52b48108425a
child 8123 ce31d2843a95
equal deleted inserted replaced
8120:7128bb2b57a3 8121:3bc6351e7369
     8 #define VARDEF extern
     8 #define VARDEF extern
     9 #endif
     9 #endif
    10 
    10 
    11 #include "helpers.hpp"
    11 #include "helpers.hpp"
    12 #include "strings_type.h"
    12 #include "strings_type.h"
    13 
       
    14 struct Oblong {
       
    15 	int x, y;
       
    16 	int width, height;
       
    17 };
       
    18 
       
    19 struct BoundingRect {
       
    20 	int width;
       
    21 	int height;
       
    22 };
       
    23 
       
    24 struct Pair {
       
    25 	int a;
       
    26 	int b;
       
    27 };
       
    28 
    13 
    29 #include "map.h"
    14 #include "map.h"
    30 #include "slope_type.h"
    15 #include "slope_type.h"
    31 
    16 
    32 // Forward declarations of structs.
    17 // Forward declarations of structs.
    44 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
    29 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
    45 struct PalSpriteID {
    30 struct PalSpriteID {
    46 	SpriteID sprite;
    31 	SpriteID sprite;
    47 	SpriteID pal;
    32 	SpriteID pal;
    48 };
    33 };
       
    34 typedef int32 CursorID;
    49 typedef uint16 EngineID;
    35 typedef uint16 EngineID;
    50 typedef uint16 UnitID;
    36 typedef uint16 UnitID;
    51 
    37 
    52 typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C code (see helpers.cpp)
    38 typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C code (see helpers.cpp)
    53 
    39 
    80 
    66 
    81 typedef int32 Year;
    67 typedef int32 Year;
    82 typedef int32 Date;
    68 typedef int32 Date;
    83 
    69 
    84 typedef uint32 PlayerFace; ///< player face bits, info see in player_face.h
    70 typedef uint32 PlayerFace; ///< player face bits, info see in player_face.h
       
    71 
       
    72 enum GameModes {
       
    73 	GM_MENU,
       
    74 	GM_NORMAL,
       
    75 	GM_EDITOR
       
    76 };
    85 
    77 
    86 enum SwitchModes {
    78 enum SwitchModes {
    87 	SM_NONE            =  0,
    79 	SM_NONE            =  0,
    88 	SM_NEWGAME         =  1,
    80 	SM_NEWGAME         =  1,
    89 	SM_EDITOR          =  2,
    81 	SM_EDITOR          =  2,
   280 	MSG_OTTD_SAVETHREAD_ERROR,
   272 	MSG_OTTD_SAVETHREAD_ERROR,
   281 };
   273 };
   282 
   274 
   283 void OTTD_SendThreadMessage(ThreadMsg msg);
   275 void OTTD_SendThreadMessage(ThreadMsg msg);
   284 
   276 
       
   277 extern byte _game_mode;
       
   278 extern bool _exit_game;
       
   279 extern byte _pause_game;
       
   280 
   285 #endif /* OPENTTD_H */
   281 #endif /* OPENTTD_H */