Changeset - r21588:937e75283c6b
[Not reviewed]
master
0 1 0
frosch - 10 years ago 2014-08-03 11:59:07
frosch@openttd.org
(svn r26713) -Fix (r23027): [NewGRF] Parameters to SCC_NEWGRF_PUSH_WORD and SCC_NEWGRF_UNPRINT were not skipped during drawing.
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf_text.cpp
Show inline comments
 
@@ -1051,24 +1051,34 @@ uint RemapNewGRFStringControlCode(uint s
 

	
 
			case SCC_NEWGRF_PRINT_WORD_CARGO_LONG:
 
			case SCC_NEWGRF_PRINT_WORD_CARGO_SHORT:
 
			case SCC_NEWGRF_PRINT_WORD_CARGO_TINY:
 
				argv[0] = GetCargoTranslation(_newgrf_textrefstack.PopUnsignedWord(), _newgrf_textrefstack.grffile);
 
				argv[1] = _newgrf_textrefstack.PopUnsignedWord();
 
				break;
 

	
 
			case SCC_NEWGRF_PRINT_WORD_STRING_ID:
 
				*argv = MapGRFStringID(_newgrf_textrefstack.grffile->grfid, _newgrf_textrefstack.PopUnsignedWord());
 
				break;
 
		}
 
	} else {
 
		/* Consume additional parameter characters */
 
		switch (scc) {
 
			default: break;
 

	
 
			case SCC_NEWGRF_PUSH_WORD:
 
			case SCC_NEWGRF_UNPRINT:
 
				Utf8Consume(str);
 
				break;
 
		}
 
	}
 

	
 
	switch (scc) {
 
		default: NOT_REACHED();
 
		case SCC_NEWGRF_PRINT_DWORD_SIGNED:
 
		case SCC_NEWGRF_PRINT_WORD_SIGNED:
 
		case SCC_NEWGRF_PRINT_BYTE_SIGNED:
 
		case SCC_NEWGRF_PRINT_WORD_UNSIGNED:
 
			return SCC_COMMA;
 

	
 
		case SCC_NEWGRF_PRINT_BYTE_HEX:
 
		case SCC_NEWGRF_PRINT_WORD_HEX:
0 comments (0 inline, 0 general)