1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-16 07:59:43 +01:00
VVVVVV/desktop_version/src/CWrappers.cpp
Dav999-v 1ead8885ba 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
2022-12-31 20:04:56 -08:00

28 lines
483 B
C++

#include <SDL.h>
#include "Localization.h"
#include "UtilityClass.h"
extern "C"
{
char* HELP_number_words(int _t)
{
/* C wrapper for UtilityClass::number_words.
* Caller must VVV_free. */
std::string str = help.number_words(_t);
char* buffer = (char*) SDL_malloc(str.size() + 1);
str.copy(buffer, str.size());
buffer[str.size()] = '\0';
return buffer;
}
uint32_t LOC_toupper_ch(uint32_t ch)
{
return loc::toupper_ch(ch);
}
} /* extern "C" */