Feature: NewGRF string codes for force and power. diff -r df21d7a8351a src/newgrf_text.cpp --- a/src/newgrf_text.cpp Sat Aug 20 14:34:50 2011 +0200 +++ b/src/newgrf_text.cpp Sat Aug 20 14:39:28 2011 +0200 @@ -570,6 +570,9 @@ case 0x16: case 0x17: d += Utf8Encode(d, SCC_NEWGRF_PRINT_DWORD_DATE + code - 0x16); break; + case 0x18: + case 0x19: d += Utf8Encode(d, SCC_NEWGRF_PRINT_WORD_POWER + code - 0x18); break; + default: grfmsg(1, "missing handler for extended format code"); break; @@ -1026,6 +1029,8 @@ case SCC_NEWGRF_PRINT_WORD_SPEED: case SCC_NEWGRF_PRINT_WORD_VOLUME: case SCC_NEWGRF_PRINT_WORD_WEIGHT: + case SCC_NEWGRF_PRINT_WORD_POWER: + case SCC_NEWGRF_PRINT_WORD_FORCE: case SCC_NEWGRF_PRINT_WORD_STATION_NAME: case SCC_NEWGRF_PRINT_UNSIGNED_WORD: *argv = _newgrf_textrefstack.PopUnsignedWord(); break; @@ -1086,6 +1091,12 @@ case SCC_NEWGRF_PRINT_WORD_WEIGHT: return SCC_WEIGHT; + case SCC_NEWGRF_PRINT_WORD_POWER: + return SCC_POWER; + + case SCC_NEWGRF_PRINT_WORD_FORCE: + return SCC_FORCE; + case SCC_NEWGRF_PRINT_WORD_STATION_NAME: return SCC_STATION_NAME; diff -r df21d7a8351a src/table/control_codes.h --- a/src/table/control_codes.h Sat Aug 20 14:34:50 2011 +0200 +++ b/src/table/control_codes.h Sat Aug 20 14:39:28 2011 +0200 @@ -125,6 +125,8 @@ SCC_NEWGRF_PRINT_WORD_SPEED, ///< Read 2 bytes from the stack as signed speed SCC_NEWGRF_PRINT_WORD_VOLUME, ///< Read 2 bytes from the stack as signed volume SCC_NEWGRF_PRINT_WORD_WEIGHT, ///< Read 2 bytes from the stack as signed weight + SCC_NEWGRF_PRINT_WORD_POWER, ///< Read 2 bytes from the stack as signed power + SCC_NEWGRF_PRINT_WORD_FORCE, ///< Read 2 bytes from the stack as signed force SCC_NEWGRF_PRINT_WORD_STATION_NAME, ///< Read 2 bytes from the stack as station name SCC_NEWGRF_PRINT_QWORD_CURRENCY, ///< Read 8 bytes from the stack as currency SCC_NEWGRF_PRINT_HEX_BYTE, ///< Read 1 byte from the stack and print it as hex