1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Use loc::toupper_ch instead of SDL_toupper in VFormat

This commit is part of rewritten history of the localization branch.
The original (unsquashed) commit history can be found here:
https://github.com/Dav999-v/VVVVVV/tree/localization-orig
This commit is contained in:
Dav999-v 2022-12-30 23:09:36 +01:00 committed by Misa Elizabeth Kai
parent 7ffbf0b115
commit 1ead8885ba
3 changed files with 14 additions and 2 deletions

View file

@ -1,8 +1,12 @@
#include <SDL.h>
#include "Localization.h"
#include "UtilityClass.h"
extern "C" char* HELP_number_words(int _t)
extern "C"
{
char* HELP_number_words(int _t)
{
/* C wrapper for UtilityClass::number_words.
* Caller must VVV_free. */
@ -15,3 +19,10 @@ extern "C" char* HELP_number_words(int _t)
return buffer;
}
uint32_t LOC_toupper_ch(uint32_t ch)
{
return loc::toupper_ch(ch);
}
} /* extern "C" */

View file

@ -2,5 +2,6 @@
#define CWRAPPERS_H
char* HELP_number_words(int _t);
uint32_t LOC_toupper_ch(uint32_t ch);
#endif /* CWRAPPERS_H */

View file

@ -74,7 +74,7 @@ static inline void call_with_upper(format_callback callback, void* userdata, con
utf8[bytes] = '\0';
PHYSFS_utf8ToUcs4(utf8, utf32, conv_bytes*4);
utf32[0] = SDL_toupper(utf32[0]); /* FIXME: use loc::toupper_ch in localization branch */
utf32[0] = LOC_toupper_ch(utf32[0]);
PHYSFS_utf8FromUcs4(utf32, utf8, conv_bytes);
callback(userdata, utf8, SDL_strlen(utf8));