1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-17 10:08:29 +02:00
VVVVVV/desktop_version/src/CWrappers.cpp
Ethan Lee 8426e0930d VS2010 buildfixes.
The main issue was mostly that we have to build C files as C++ in some
cases, and extern "C" wasn't being used everywhere, so linker errors
popped up. The rest is the usual tedious VS2010 stuff like casting void*
to other stuff, so this commit as a whole is pretty boring!
2023-11-27 12:09:42 -05:00

26 lines
473 B
C++

#include "CWrappers.h"
#include <SDL.h>
#include "Localization.h"
#include "UtilityClass.h"
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);
}