1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

an option to replace letters when foreign letters are not available

This commit is contained in:
Zeno Rogue 2021-06-25 15:14:50 +02:00
parent 59ea009521
commit b6a6b1b442

View File

@ -113,8 +113,18 @@ EX int getnext(const char* s, int& i) {
if(eqs(s+i, natchars[k])) { if(eqs(s+i, natchars[k])) {
i += siz; return 128+k; i += siz; return 128+k;
} }
#ifdef REPLACE_LETTERS
for(int i=0; i<isize(dialog::latin_letters); i++)
if(s[i] == dialog::foreign_letters[2*i] && s[i+1] == dialog::foreign_letters[2*i+1]) {
i += 2;
return int(dialog::latin_letters[i]);
break;
}
#endif
printf("Unknown character in: '%s' at position %d\n", s, i); printf("Unknown character in: '%s' at position %d\n", s, i);
i ++; return '?'; i += siz; return '?';
} }
#if CAP_SDLTTF #if CAP_SDLTTF