equal
deleted
inserted
replaced
27 */ |
27 */ |
28 typedef struct SortStruct { |
28 typedef struct SortStruct { |
29 uint32 index; |
29 uint32 index; |
30 byte owner; |
30 byte owner; |
31 } SortStruct; |
31 } SortStruct; |
32 |
|
33 typedef struct YearMonthDay { |
|
34 int year, month, day; |
|
35 } YearMonthDay; |
|
36 |
|
37 /* --- 1 Day is 74 ticks --- |
|
38 * The game's internal structure is dictated by ticks. The date counter (date_fract) is an integer of |
|
39 * uint16 type, so it can have a max value of 65536. Every tick this variable (date_fract) is |
|
40 * increased by 885. When it overflows, the new day loop is called. |
|
41 * * this that means 1 day is : 65536 / 885 = 74 ticks |
|
42 * * 1 tick is approximately 27ms. |
|
43 * * 1 day is thus about 2 seconds (74*27 = 1998) on a machine that can run OpenTTD normally |
|
44 */ |
|
45 #define DAY_TICKS 74 |
|
46 #define MAX_YEAR_BEGIN_REAL 1920 |
|
47 #define MAX_YEAR_END_REAL 2090 |
|
48 #define MAX_YEAR_END 170 |
|
49 |
32 |
50 #include "map.h" |
33 #include "map.h" |
51 #include "slope.h" |
34 #include "slope.h" |
52 |
35 |
53 // Forward declarations of structs. |
36 // Forward declarations of structs. |
75 typedef uint16 EngineID; ///< All enginenumbers should be of this type |
58 typedef uint16 EngineID; ///< All enginenumbers should be of this type |
76 typedef uint16 UnitID; ///< All unitnumber stuff is of this type (or anyway, should be) |
59 typedef uint16 UnitID; ///< All unitnumber stuff is of this type (or anyway, should be) |
77 |
60 |
78 typedef uint32 WindowNumber; |
61 typedef uint32 WindowNumber; |
79 typedef byte WindowClass; |
62 typedef byte WindowClass; |
|
63 |
|
64 typedef uint8 Year; |
|
65 typedef uint32 Date; |
80 |
66 |
81 |
67 |
82 enum GameModes { |
68 enum GameModes { |
83 GM_MENU, |
69 GM_MENU, |
84 GM_NORMAL, |
70 GM_NORMAL, |