December 2014 files

This commit is contained in:
Loki Rautio
2026-03-01 11:00:23 -06:00
parent b691c43c44
commit 8fd3ac6e37
2049 changed files with 260190 additions and 134787 deletions

View File

@@ -11,6 +11,20 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
{
src = byteArray(pbData, dwSize);
ProcessStringTableData();
}
void StringTable::ReloadStringTable()
{
m_stringsMap.clear();
m_stringsVec.clear();
ProcessStringTableData();
}
void StringTable::ProcessStringTableData(void)
{
ByteArrayInputStream bais(src);
DataInputStream dis(&bais);
@@ -35,8 +49,8 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
//
for( AUTO_VAR(it_locales, locales.begin());
it_locales!=locales.end() && (!foundLang);
it_locales++
it_locales!=locales.end() && (!foundLang);
it_locales++
)
{
bytesToSkip = 0;
@@ -72,7 +86,7 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
// Read the language file for the selected language
int langVersion = dis2.readInt();
isStatic = false; // 4J-JEV: Versions 1 and up could use
if (langVersion > 0) // integers rather than wstrings as keys.
isStatic = dis2.readBoolean();
@@ -80,6 +94,8 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
wstring langId = dis2.readUTF();
int totalStrings = dis2.readInt();
app.DebugPrintf("IsStatic=%d totalStrings = %d\n",isStatic?1:0,totalStrings);
if (!isStatic)
{
for(int i = 0; i < totalStrings; ++i)
@@ -109,11 +125,12 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
isStatic = false;
}
// We can't delete this data in the dtor, so clear the reference
bais.reset();
}
StringTable::~StringTable(void)
{
// delete src.data; TODO 4J-JEV: ?