New options to control Sector Steady Ambients:

ENABLE_SSA (default FALSE)
VOLUME_SSA (default 50)
DEBUG_SSA (default FALSE)

Increased number of sound channels to 64.
SoundPlay(): show more information when failed to play sound.
PlayVoiceTaunt(): limit max number of voices to 99.
vfs::String::as_utf16(): show original string if failed to convert.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8745 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-02-08 19:35:10 +00:00
parent 39c773e0c6
commit 7e0606932f
8 changed files with 392 additions and 37 deletions
+7 -1
View File
@@ -185,12 +185,17 @@ vfs::String::str_t vfs::String::as_utf16(const char* str)
}
void vfs::String::as_utf16(const char* str, vfs::String::str_t &str16)
{
wchar_t buf16[1024];
if(str == NULL)
{
return;
}
try
{
memset(buf16, 0, 1024 * sizeof(wchar_t));
mbstowcs(buf16, str, 1024 - 1);
::size_t len = strlen(str);
::size_t d = utf8::distance(str,str+len);
if(d > 0)
@@ -202,7 +207,8 @@ void vfs::String::as_utf16(const char* str, vfs::String::str_t &str16)
catch(utf8::invalid_utf8& ex)
{
utf8::uint8_t c = ex.utf8_octet();
VFS_THROW( _BS(L"Invalid UTF8 character '") << (wchar_t)c << L"'=" << (unsigned char)c << _BS::wget );
//VFS_THROW( _BS(L"Invalid UTF8 character '") << (wchar_t)c << L"'=" << (unsigned char)c << _BS::wget );
VFS_THROW(_BS(L"Invalid UTF8 character '") << (wchar_t)c << L"'=" << (unsigned char)c << L" str16:" << buf16 << _BS::wget);
}
catch(utf8::not_enough_room &ex)
{