* Check whether the header is a valid header for OpenTTD. * @return true iff the header is deemed valid. */
| 2015 | * @return true iff the header is deemed valid. |
| 2016 | */ |
| 2017 | bool LanguagePackHeader::IsValid() const |
| 2018 | { |
| 2019 | return this->ident == TO_LE32(LanguagePackHeader::IDENT) && |
| 2020 | this->version == TO_LE32(LANGUAGE_PACK_VERSION) && |
| 2021 | this->plural_form < LANGUAGE_MAX_PLURAL && |
| 2022 | this->text_dir <= 1 && |
| 2023 | this->newgrflangid < MAX_LANG && |
| 2024 | this->num_genders < MAX_NUM_GENDERS && |
| 2025 | this->num_cases < MAX_NUM_CASES && |
| 2026 | StrValid(this->name) && |
| 2027 | StrValid(this->own_name) && |
| 2028 | StrValid(this->isocode) && |
| 2029 | StrValid(this->digit_group_separator) && |
| 2030 | StrValid(this->digit_group_separator_currency) && |
| 2031 | StrValid(this->digit_decimal_separator); |
| 2032 | } |
| 2033 | |
| 2034 | /** |
| 2035 | * Check whether a translation is sufficiently finished to offer it to the public. |
no test coverage detected