feat: loot tables (#43)

self-explanatory

Reviewed-on: https://git.neolegacy.dev/neoStudiosLCE/neoLegacy/pulls/43
This commit is contained in:
Fireblade
2026-07-12 02:05:06 +01:00
parent 0449af2be6
commit 54528fac16
146 changed files with 6397 additions and 1277 deletions
+10 -9
View File
@@ -70,8 +70,9 @@ wstring convStringToWstring(const string& converting)
// to save having to clear it up everywhere this is used.
const char *wstringtofilename(const wstring& name)
{
static char buf[256];
assert(name.length()<256);
static std::string buf;
buf.clear();
buf.reserve(name.length());
for(unsigned int i = 0; i < name.length(); i++ )
{
wchar_t c = name[i];
@@ -82,23 +83,23 @@ const char *wstringtofilename(const wstring& name)
#endif
assert(c<128); // Will we have to do any conversion of non-ASCII characters in filenames?
buf[i] = static_cast<char>(c);
buf.push_back(static_cast<char>(c));
}
buf[name.length()] = 0;
return buf;
return buf.c_str();
}
const char *wstringtochararray(const wstring& name)
{
static char buf[256];
assert(name.length()<256);
static std::string buf;
buf.clear();
buf.reserve(name.length());
for(unsigned int i = 0; i < name.length(); i++ )
{
wchar_t c = name[i];
assert(c<128); // Will we have to do any conversion of non-ASCII characters in filenames?
buf[i] = static_cast<char>(c);
buf.push_back(static_cast<char>(c));
}
buf[name.length()] = 0;
return buf;
return buf.c_str();
}
wstring filenametowstring(const char *name)