From c8809cad152125d30563c07dca63d2d3c1ea2e14 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 28 Sep 2015 20:14:48 -1000 Subject: [PATCH] Restored internal name possibility --- DataSpec/DNAMP2/DNAMP2.cpp | 12 ++++++++++-- DataSpec/DNAMP3/DNAMP3.cpp | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/DataSpec/DNAMP2/DNAMP2.cpp b/DataSpec/DNAMP2/DNAMP2.cpp index 26dc9637d..ce09fe2e2 100644 --- a/DataSpec/DNAMP2/DNAMP2.cpp +++ b/DataSpec/DNAMP2/DNAMP2.cpp @@ -110,10 +110,18 @@ void PAKBridge::build() if (areaDeps.name.empty()) { #if HECL_UCS2 - areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString()); + areaDeps.name = HECL::UTF8ToWide(area.internalAreaName); #else - areaDeps.name = "MREA_" + area.areaMREAId.toString(); + areaDeps.name = area.internalAreaName; #endif + if (areaDeps.name.empty()) + { +#if HECL_UCS2 + areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString()); +#else + areaDeps.name = "MREA_" + area.areaMREAId.toString(); +#endif + } } HECL::SystemChar num[16]; HECL::SNPrintf(num, 16, _S("%02u "), ai++); diff --git a/DataSpec/DNAMP3/DNAMP3.cpp b/DataSpec/DNAMP3/DNAMP3.cpp index 987d0065c..583fcbca4 100644 --- a/DataSpec/DNAMP3/DNAMP3.cpp +++ b/DataSpec/DNAMP3/DNAMP3.cpp @@ -120,10 +120,18 @@ void PAKBridge::build() if (areaDeps.name.empty()) { #if HECL_UCS2 - areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString()); + areaDeps.name = HECL::UTF8ToWide(area.internalAreaName); #else - areaDeps.name = "MREA_" + area.areaMREAId.toString(); + areaDeps.name = area.internalAreaName; #endif + if (areaDeps.name.empty()) + { +#if HECL_UCS2 + areaDeps.name = _S("MREA_") + HECL::UTF8ToWide(area.areaMREAId.toString()); +#else + areaDeps.name = "MREA_" + area.areaMREAId.toString(); +#endif + } } HECL::SystemChar num[16]; HECL::SNPrintf(num, 16, _S("%02u "), ai++);