diff options
author | rubidium <rubidium@openttd.org> | 2007-09-22 23:55:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-22 23:55:34 +0000 |
commit | 08c5765c0ba34ccb2aee245fbd354205e8cffb64 (patch) | |
tree | 5340ffd36488542b738acc4e6c6c80a223189d8a /src/table/control_codes.h | |
parent | b1fa49d3fa0d7e4a271bd6caa73ebf058aa9d7e9 (diff) | |
download | openttd-08c5765c0ba34ccb2aee245fbd354205e8cffb64.tar.xz |
(svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
Diffstat (limited to 'src/table/control_codes.h')
-rw-r--r-- | src/table/control_codes.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/table/control_codes.h b/src/table/control_codes.h index e853ca898..5c1ae73e7 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -6,7 +6,7 @@ /* List of string control codes used for string formatting, displaying, and * by strgen to generate the language files. */ -enum { +enum StringControlCode { SCC_CONTROL_START = 0xE000, SCC_CONTROL_END = 0xE1FF, @@ -90,6 +90,28 @@ enum { SCC_BLACK, SCC_PREVIOUS_COLOUR, + /** + * The next variables are part of a NewGRF subsystem for creating text strings. + * It uses a "stack" of bytes and reads from there. + */ + SCC_NEWGRF_FIRST, + SCC_NEWGRF_PRINT_DWORD = SCC_NEWGRF_FIRST, ///< Read 4 bytes from the stack + SCC_NEWGRF_PRINT_SIGNED_WORD, ///< Read 2 bytes from the stack as signed value + SCC_NEWGRF_PRINT_SIGNED_BYTE, ///< Read 1 bytes from the stack as signed value + SCC_NEWGRF_PRINT_UNSIGNED_WORD, ///< Read 2 bytes from the stack as unsigned value + SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< Read 4 bytes from the stack as currency + SCC_NEWGRF_PRINT_STRING_ID, ///< Read 2 bytes from the stack as String ID + SCC_NEWGRF_PRINT_DATE, ///< Read 2 bytes from the stack as base 1920 date + SCC_NEWGRF_PRINT_MONTH_YEAR, ///< Read 2 bytes from the stack as base 1920 date + SCC_NEWGRF_PRINT_WORD_SPEED, ///< Read 2 bytes from the stack as signed speed + SCC_NEWGRF_PRINT_WORD_LITRES, ///< Read 2 bytes from the stack as signed litres + SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< Read 8 bytes from the stack as currency + SCC_NEWGRF_PUSH_WORD, ///< Pushes 2 bytes onto the stack + SCC_NEWGRF_UNPRINT, ///< "Unprints" the given number of bytes from the string + SCC_NEWGRF_DISCARD_WORD, ///< Discard the next two bytes + SCC_NEWGRF_ROTATE_TOP_4_WORDS, ///< Rotate the top 4 words of the stack (W4 W1 W2 W3) + SCC_NEWGRF_LAST = SCC_NEWGRF_ROTATE_TOP_4_WORDS, + /* Special printable symbols. * These are mapped to the original glyphs */ SCC_LESSTHAN = SCC_SPRITE_START + 0x3C, |