4 #define CONTROL_CODES_H |
4 #define CONTROL_CODES_H |
5 |
5 |
6 /* List of string control codes used for string formatting, displaying, and |
6 /* List of string control codes used for string formatting, displaying, and |
7 * by strgen to generate the language files. */ |
7 * by strgen to generate the language files. */ |
8 |
8 |
9 enum { |
9 enum StringControlCode { |
10 SCC_CONTROL_START = 0xE000, |
10 SCC_CONTROL_START = 0xE000, |
11 SCC_CONTROL_END = 0xE1FF, |
11 SCC_CONTROL_END = 0xE1FF, |
12 |
12 |
13 SCC_SPRITE_START = 0xE200, |
13 SCC_SPRITE_START = 0xE200, |
14 SCC_SPRITE_END = SCC_SPRITE_START + 0xFF, |
14 SCC_SPRITE_END = SCC_SPRITE_START + 0xFF, |
88 SCC_GRAY, |
88 SCC_GRAY, |
89 SCC_DKBLUE, |
89 SCC_DKBLUE, |
90 SCC_BLACK, |
90 SCC_BLACK, |
91 SCC_PREVIOUS_COLOUR, |
91 SCC_PREVIOUS_COLOUR, |
92 |
92 |
|
93 /** |
|
94 * The next variables are part of a NewGRF subsystem for creating text strings. |
|
95 * It uses a "stack" of bytes and reads from there. |
|
96 */ |
|
97 SCC_NEWGRF_FIRST, |
|
98 SCC_NEWGRF_PRINT_DWORD = SCC_NEWGRF_FIRST, ///< Read 4 bytes from the stack |
|
99 SCC_NEWGRF_PRINT_SIGNED_WORD, ///< Read 2 bytes from the stack as signed value |
|
100 SCC_NEWGRF_PRINT_SIGNED_BYTE, ///< Read 1 bytes from the stack as signed value |
|
101 SCC_NEWGRF_PRINT_UNSIGNED_WORD, ///< Read 2 bytes from the stack as unsigned value |
|
102 SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< Read 4 bytes from the stack as currency |
|
103 SCC_NEWGRF_PRINT_STRING_ID, ///< Read 2 bytes from the stack as String ID |
|
104 SCC_NEWGRF_PRINT_DATE, ///< Read 2 bytes from the stack as base 1920 date |
|
105 SCC_NEWGRF_PRINT_MONTH_YEAR, ///< Read 2 bytes from the stack as base 1920 date |
|
106 SCC_NEWGRF_PRINT_WORD_SPEED, ///< Read 2 bytes from the stack as signed speed |
|
107 SCC_NEWGRF_PRINT_WORD_LITRES, ///< Read 2 bytes from the stack as signed litres |
|
108 SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< Read 8 bytes from the stack as currency |
|
109 SCC_NEWGRF_PUSH_WORD, ///< Pushes 2 bytes onto the stack |
|
110 SCC_NEWGRF_UNPRINT, ///< "Unprints" the given number of bytes from the string |
|
111 SCC_NEWGRF_DISCARD_WORD, ///< Discard the next two bytes |
|
112 SCC_NEWGRF_ROTATE_TOP_4_WORDS, ///< Rotate the top 4 words of the stack (W4 W1 W2 W3) |
|
113 SCC_NEWGRF_LAST = SCC_NEWGRF_ROTATE_TOP_4_WORDS, |
|
114 |
93 /* Special printable symbols. |
115 /* Special printable symbols. |
94 * These are mapped to the original glyphs */ |
116 * These are mapped to the original glyphs */ |
95 SCC_LESSTHAN = SCC_SPRITE_START + 0x3C, |
117 SCC_LESSTHAN = SCC_SPRITE_START + 0x3C, |
96 SCC_GREATERTHAN = SCC_SPRITE_START + 0x3E, |
118 SCC_GREATERTHAN = SCC_SPRITE_START + 0x3E, |
97 SCC_UPARROW = SCC_SPRITE_START + 0x80, |
119 SCC_UPARROW = SCC_SPRITE_START + 0x80, |