Mercurial > hg > openttd
diff src/newgrf_text.h @ 18145:767865264a2b draft
(svn r22970) -Fix [FS#4769]: strip newlines from NewGRF strings that should not have newlines, e.g. the NewGRF's name
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 01 Oct 2011 20:31:21 +0000 |
parents | 269813945876 |
children | 6af38106a773 |
line wrap: on
line diff
--- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -19,16 +19,16 @@ /** This character, the thorn ('รพ'), indicates a unicode string to NFO. */ static const WChar NFO_UTF8_IDENTIFIER = 0x00DE; -StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string); +StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string); StringID GetGRFStringID(uint32 grfid, uint16 stringid); const char *GetGRFStringFromGRFText(const struct GRFText *text); const char *GetGRFStringPtr(uint16 stringid); void CleanUpStrings(); void SetCurrentGrfLangID(byte language_id); -char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, const char *str, int *olen = NULL); +char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newlines, const char *str, int *olen = NULL); struct GRFText *DuplicateGRFText(struct GRFText *orig); void AddGRFTextToList(struct GRFText **list, struct GRFText *text_to_add); -void AddGRFTextToList(struct GRFText **list, byte langid, uint32 grfid, const char *text_to_add); +void AddGRFTextToList(struct GRFText **list, byte langid, uint32 grfid, bool allow_newlines, const char *text_to_add); void AddGRFTextToList(struct GRFText **list, const char *text_to_add); void CleanUpGRFText(struct GRFText *grftext);