diff options
Diffstat (limited to 'common/encoding.h')
-rw-r--r-- | common/encoding.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common/encoding.h b/common/encoding.h index 6018eaf6e4..c8f864d2ec 100644 --- a/common/encoding.h +++ b/common/encoding.h @@ -35,6 +35,11 @@ typedef void* iconv_t; #include "common/scummsys.h" #include "common/str.h" +#include "common/system.h" + +#ifdef WIN32 +#include "backends/platform/sdl/win32/win32.h" +#endif namespace Common { @@ -44,6 +49,9 @@ namespace Common { * ScummVM is compiled with or without iconv. */ class Encoding { +#ifdef WIN32 + friend char *OSystem_Win32::convertEncoding(const char*, const char *, const char *, size_t); +#endif public: /** * Constructs everything needed for the conversion between 2 encodings @@ -234,6 +242,17 @@ class Encoding { * the same string. */ static String addUtfEndianness(const String &str); + + /** + * Switches the endianity of a string. + * + * @param string Array containing the characters of a string. + * @param length Length of the string in bytes + * @param bitCount Number of bits used for each character. + * + * @return Array of characters with the opposite endianity + */ + static char *switchEndian(const char *string, int length, int bitCount); }; } |