mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Switch over to using TString to represent filesystem paths instead of TWideString. Fixed FileUtil not handling UTF-8 paths with Unicode characters correctly.
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
|
||||
ASSERT(ParamString.Size() == IDLength * 2);
|
||||
pTree->AddDependency( CAssetID::FromString(ParamString) );
|
||||
pTree->AddDependency( CAssetID::FromString(ParamString.ToUTF8()) );
|
||||
}
|
||||
|
||||
// Image
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
|
||||
ASSERT(Param.Size() == IDLength * 2);
|
||||
pTree->AddDependency( CAssetID::FromString(Param) );
|
||||
pTree->AddDependency( CAssetID::FromString(Param.ToUTF8()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ TString CWorld::InGameName() const
|
||||
if (mpWorldName)
|
||||
return mpWorldName->String("ENGL", 0).ToUTF8();
|
||||
else
|
||||
return Entry()->Name().ToUTF8();
|
||||
return Entry()->Name();
|
||||
}
|
||||
|
||||
TString CWorld::AreaInGameName(u32 AreaIndex) const
|
||||
|
||||
@@ -68,7 +68,7 @@ void CScriptCooker::WriteProperty(IProperty *pProp, bool InSingleStruct)
|
||||
case eStringProperty:
|
||||
{
|
||||
TStringProperty *pStringCast = static_cast<TStringProperty*>(pProp);
|
||||
mpSCLY->WriteString(pStringCast->Get().ToStdString());
|
||||
mpSCLY->WriteString(pStringCast->Get());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ bool CWorldCooker::CookMLVL(CWorld *pWorld, IOutputStream& rMLVL)
|
||||
rMLVL.WriteLong(ModuleNames.size());
|
||||
|
||||
for (u32 iMod = 0; iMod < ModuleNames.size(); iMod++)
|
||||
rMLVL.WriteString(ModuleNames[iMod].ToStdString());
|
||||
rMLVL.WriteString(ModuleNames[iMod]);
|
||||
|
||||
rMLVL.WriteLong(ModuleLayerOffsets.size());
|
||||
|
||||
@@ -144,7 +144,7 @@ bool CWorldCooker::CookMLVL(CWorld *pWorld, IOutputStream& rMLVL)
|
||||
|
||||
// Internal Name
|
||||
if (Game >= eEchoesDemo)
|
||||
rMLVL.WriteString(rArea.InternalName.ToStdString());
|
||||
rMLVL.WriteString(rArea.InternalName);
|
||||
}
|
||||
|
||||
if (Game <= eCorruption)
|
||||
@@ -218,7 +218,7 @@ bool CWorldCooker::CookMLVL(CWorld *pWorld, IOutputStream& rMLVL)
|
||||
rMLVL.WriteLong(LayerNames.size());
|
||||
|
||||
for (u32 iLyr = 0; iLyr < LayerNames.size(); iLyr++)
|
||||
rMLVL.WriteString(LayerNames[iLyr].ToStdString());
|
||||
rMLVL.WriteString(LayerNames[iLyr]);
|
||||
|
||||
// todo: Layer Saved State IDs go here for MP3/DKCR; need support for saved state IDs to implement
|
||||
if (Game == eCorruption || Game == eReturns)
|
||||
|
||||
@@ -562,7 +562,7 @@ void CAreaLoader::Decompress()
|
||||
|
||||
TString Source = mpMREA->GetSourceString();
|
||||
mpMREA = new CMemoryInStream(mpDecmpBuffer, mTotalDecmpSize, IOUtil::eBigEndian);
|
||||
mpMREA->SetSourceString(Source.ToStdString());
|
||||
mpMREA->SetSourceString(Source);
|
||||
mpSectionMgr->SetInputStream(mpMREA);
|
||||
mHasDecompressedBuffer = true;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ void CStringLoader::LoadCorruptionSTRG(IInputStream& rSTRG)
|
||||
rSTRG.Seek(StringsStart + LangOffsets[iLang][iStr], SEEK_SET);
|
||||
rSTRG.Seek(0x4, SEEK_CUR); // Skipping string size
|
||||
|
||||
pLang->Strings[iStr] = rSTRG.ReadString();
|
||||
pLang->Strings[iStr] = rSTRG.ReadString().ToUTF16();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user