mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-14 15:46:17 +00:00
More changes to how we handle text encoding, fixing up the code so it compiles now
This commit is contained in:
@@ -36,11 +36,11 @@ const ELanguage gkSupportedLanguagesDKCR[] =
|
||||
};
|
||||
|
||||
// Utility function - retrieve the index of a given language
|
||||
static int FindLanguageIndex(CStringTable* pInTable, ELanguage InLanguage)
|
||||
static int FindLanguageIndex(const CStringTable* pkInTable, ELanguage InLanguage)
|
||||
{
|
||||
for (uint LanguageIdx = 0; LanguageIdx < pInTable->NumLanguages(); LanguageIdx++)
|
||||
for (uint LanguageIdx = 0; LanguageIdx < pkInTable->NumLanguages(); LanguageIdx++)
|
||||
{
|
||||
if (pInTable->LanguageByIndex(LanguageIdx) == InLanguage)
|
||||
if (pkInTable->LanguageByIndex(LanguageIdx) == InLanguage)
|
||||
{
|
||||
return LanguageIdx;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ CDependencyTree* CStringTable::BuildDependencyTree() const
|
||||
// Determine which params are textures based on image type
|
||||
TStringList Params = ParamString.Split(",");
|
||||
TString ImageType = Params.front();
|
||||
int TexturesStart = -1;
|
||||
uint TexturesStart = 0;
|
||||
|
||||
if (ImageType == "A")
|
||||
TexturesStart = 2;
|
||||
@@ -265,7 +265,7 @@ bool CStringTable::IsLanguageSupported(ELanguage Language, EGame Game, ERegion R
|
||||
pkSupportedLanguages = &gkSupportedLanguagesDKCR[0];
|
||||
NumLanguages = ARRAY_SIZE( gkSupportedLanguagesDKCR );
|
||||
}
|
||||
ASSERT(pkSupportedLangages);
|
||||
ASSERT(pkSupportedLanguages);
|
||||
ASSERT(NumLanguages > 0);
|
||||
|
||||
// Check if the requested language is in the array.
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include <Common/TString.h>
|
||||
#include <vector>
|
||||
|
||||
/** A table of localized strings from STRG assets */
|
||||
/** A table of localized strings from STRG assets.
|
||||
* Strings are always internally stored as UTF-8.
|
||||
*/
|
||||
class CStringTable : public CResource
|
||||
{
|
||||
DECLARE_RESOURCE_TYPE(StringTable)
|
||||
|
||||
@@ -15,7 +15,7 @@ enum class ELanguage
|
||||
Italian = FOURCC('ITAL'),
|
||||
Dutch = FOURCC('DUTC'), // Unused
|
||||
Japanese = FOURCC('JAPN'),
|
||||
// The rest of these languages were added in Metroid Prime 3
|
||||
// The rest of these languages were added in Donkey Kong Country Returns
|
||||
SimplifiedChinese = FOURCC('SCHN'), // Unused
|
||||
TraditionalChinese = FOURCC('TCHN'), // Unused
|
||||
UKEnglish = FOURCC('UKEN'),
|
||||
|
||||
Reference in New Issue
Block a user