Merge branch 'enhanced_viewport_overlay' into jgrpp
Further fixes for viewport lines/marker for multiplayer clients. # Conflicts: # src/lang/russian.txt
This commit is contained in:
@@ -528,6 +528,7 @@ char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newline
|
||||
case 0x1B:
|
||||
case 0x1C:
|
||||
case 0x1D:
|
||||
case 0x1E:
|
||||
d += Utf8Encode(d, SCC_NEWGRF_PRINT_DWORD_DATE_LONG + code - 0x16);
|
||||
break;
|
||||
|
||||
@@ -1000,6 +1001,7 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
|
||||
case SCC_NEWGRF_PRINT_WORD_WEIGHT_SHORT:
|
||||
case SCC_NEWGRF_PRINT_WORD_POWER:
|
||||
case SCC_NEWGRF_PRINT_WORD_STATION_NAME:
|
||||
case SCC_NEWGRF_PRINT_WORD_CARGO_NAME:
|
||||
if (argv_size < 1) {
|
||||
DEBUG(misc, 0, "Too many NewGRF string parameters.");
|
||||
return 0;
|
||||
@@ -1063,6 +1065,12 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
|
||||
case SCC_NEWGRF_PRINT_WORD_STRING_ID:
|
||||
*argv = MapGRFStringID(_newgrf_textrefstack.grffile->grfid, _newgrf_textrefstack.PopUnsignedWord());
|
||||
break;
|
||||
|
||||
case SCC_NEWGRF_PRINT_WORD_CARGO_NAME: {
|
||||
CargoID cargo = GetCargoTranslation(_newgrf_textrefstack.PopUnsignedWord(), _newgrf_textrefstack.grffile);
|
||||
*argv = cargo < NUM_CARGO ? 1 << cargo : 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Consume additional parameter characters */
|
||||
@@ -1132,6 +1140,9 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
|
||||
case SCC_NEWGRF_PRINT_WORD_CARGO_TINY:
|
||||
return SCC_CARGO_TINY;
|
||||
|
||||
case SCC_NEWGRF_PRINT_WORD_CARGO_NAME:
|
||||
return SCC_CARGO_LIST;
|
||||
|
||||
case SCC_NEWGRF_PRINT_WORD_STATION_NAME:
|
||||
return SCC_STATION_NAME;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user