Restored internal name possibility

This commit is contained in:
Jack Andersen 2015-09-28 20:14:48 -10:00
parent e6fb4f36cf
commit c8809cad15
2 changed files with 20 additions and 4 deletions

View File

@ -109,12 +109,20 @@ void PAKBridge::build()
} }
if (areaDeps.name.empty()) if (areaDeps.name.empty())
{ {
#if HECL_UCS2
areaDeps.name = HECL::UTF8ToWide(area.internalAreaName);
#else
areaDeps.name = area.internalAreaName;
#endif
if (areaDeps.name.empty())
{
#if HECL_UCS2 #if HECL_UCS2
areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString()); areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString());
#else #else
areaDeps.name = "MREA_" + area.areaMREAId.toString(); areaDeps.name = "MREA_" + area.areaMREAId.toString();
#endif #endif
} }
}
HECL::SystemChar num[16]; HECL::SystemChar num[16];
HECL::SNPrintf(num, 16, _S("%02u "), ai++); HECL::SNPrintf(num, 16, _S("%02u "), ai++);
areaDeps.name = num + areaDeps.name; areaDeps.name = num + areaDeps.name;

View File

@ -119,12 +119,20 @@ void PAKBridge::build()
} }
if (areaDeps.name.empty()) if (areaDeps.name.empty())
{ {
#if HECL_UCS2
areaDeps.name = HECL::UTF8ToWide(area.internalAreaName);
#else
areaDeps.name = area.internalAreaName;
#endif
if (areaDeps.name.empty())
{
#if HECL_UCS2 #if HECL_UCS2
areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString()); areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString());
#else #else
areaDeps.name = "MREA_" + area.areaMREAId.toString(); areaDeps.name = "MREA_" + area.areaMREAId.toString();
#endif #endif
} }
}
HECL::SystemChar num[16]; HECL::SystemChar num[16];
HECL::SNPrintf(num, 16, _S("%02u "), ai++); HECL::SNPrintf(num, 16, _S("%02u "), ai++);
areaDeps.name = num + areaDeps.name; areaDeps.name = num + areaDeps.name;