Mercurial > hg > openttd
comparison src/newgrf_text.cpp @ 6873:608145365c5d draft
(svn r10114) -Fix: Only load newgrf error messages if the language matches the current
language. Since only one error can be loaded anyway, if the language didn't
match you'd get "Undefined string". Also since we're only loading one language
there's no need to use AddGRFString any more.
author | maedhros <maedhros@openttd.org> |
---|---|
date | Tue, 12 Jun 2007 13:22:14 +0000 |
parents | 350b0b2111ce |
children | f9048d03454b |
comparison
equal
deleted
inserted
replaced
6872:5b52562b4be1 | 6873:608145365c5d |
---|---|
443 } | 443 } |
444 } | 444 } |
445 _currentLangID = ret; | 445 _currentLangID = ret; |
446 } | 446 } |
447 | 447 |
448 bool CheckGrfLangID(byte lang_id, byte grf_version) | |
449 { | |
450 if (grf_version < 7) { | |
451 switch (_currentLangID) { | |
452 case GRFLX_GERMAN: return (lang_id & GRFLB_GERMAN) != 0; | |
453 case GRFLX_FRENCH: return (lang_id & GRFLB_FRENCH) != 0; | |
454 case GRFLX_SPANISH: return (lang_id & GRFLB_SPANISH) != 0; | |
455 default: return (lang_id & (GRFLB_ENGLISH | GRFLB_AMERICAN)) != 0; | |
456 } | |
457 } | |
458 | |
459 return (lang_id == _currentLangID || lang_id == GRFLX_UNSPECIFIED); | |
460 } | |
461 | |
448 /** | 462 /** |
449 * House cleaning. | 463 * House cleaning. |
450 * Remove all strings and reset the text counter. | 464 * Remove all strings and reset the text counter. |
451 */ | 465 */ |
452 void CleanUpStrings() | 466 void CleanUpStrings() |