French localization support
This commit is contained in:
parent
12a48ffddf
commit
a9f82ef975
|
|
@ -186,6 +186,9 @@ static void Harness_DetectGameMode(void) {
|
|||
} else if (strstr(buffer, "NOWA GRA") != NULL) {
|
||||
harness_game_info.localization = eGameLocalization_polish;
|
||||
LOG_INFO2("Language: \"%s\"", "Polish");
|
||||
} else if (strstr(buffer, "NOUVELLE PARTIE") != NULL) {
|
||||
harness_game_info.localization = eGameLocalization_french;
|
||||
LOG_INFO2("Language: \"%s\"", "French");
|
||||
} else {
|
||||
LOG_INFO("Language: unrecognized");
|
||||
}
|
||||
|
|
@ -547,6 +550,14 @@ int Harness_Hook_isalnum(int c) {
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
} if (harness_game_info.localization == eGameLocalization_french) {
|
||||
// French diacritic letters in Windows-1252
|
||||
unsigned char letters[] = { 140, 156, 159, 192, 194, 198, 199, 200, 201, 202, 203, 206, 207, 212, 217, 219, 220, 224, 226, 230, 231, 232, 233, 234, 235, 238, 239, 244, 249, 251, 252, 255 };
|
||||
for (i = 0; i < (int)sizeof(letters); i++) {
|
||||
if ((unsigned char)c == letters[i]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isalnum(c);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ typedef enum {
|
|||
eGameLocalization_none,
|
||||
eGameLocalization_german,
|
||||
eGameLocalization_polish,
|
||||
eGameLocalization_french,
|
||||
} tHarness_game_localization;
|
||||
|
||||
typedef struct tHarness_game_info {
|
||||
|
|
|
|||
Loading…
Reference in New Issue