|
@@ -45,7 +45,7 @@ static inline EResType::Type readType(const std::string& name)
|
|
|
return EResTypeHelper::getTypeFromExtension(FileInfo::GetExtension(name).to_string());
|
|
return EResTypeHelper::getTypeFromExtension(FileInfo::GetExtension(name).to_string());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static inline std::string readName(std::string name)
|
|
|
|
|
|
|
+static inline std::string readName(std::string name, EResType::Type type)
|
|
|
{
|
|
{
|
|
|
const auto dotPos = name.find_last_of('.');
|
|
const auto dotPos = name.find_last_of('.');
|
|
|
|
|
|
|
@@ -61,7 +61,8 @@ static inline std::string readName(std::string name)
|
|
|
name.resize(dotPos);
|
|
name.resize(dotPos);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- toUpper(name);
|
|
|
|
|
|
|
+ if(type != EResType::MAP && type != EResType::CAMPAIGN && type != EResType::SAVEGAME)
|
|
|
|
|
+ toUpper(name);
|
|
|
|
|
|
|
|
return name;
|
|
return name;
|
|
|
}
|
|
}
|
|
@@ -75,12 +76,12 @@ ResourceID::ResourceID()
|
|
|
|
|
|
|
|
ResourceID::ResourceID(std::string name_):
|
|
ResourceID::ResourceID(std::string name_):
|
|
|
type{readType(name_)},
|
|
type{readType(name_)},
|
|
|
- name{readName(std::move(name_))}
|
|
|
|
|
|
|
+ name{readName(std::move(name_), readType(name_))}
|
|
|
{}
|
|
{}
|
|
|
|
|
|
|
|
ResourceID::ResourceID(std::string name_, EResType::Type type_):
|
|
ResourceID::ResourceID(std::string name_, EResType::Type type_):
|
|
|
type{type_},
|
|
type{type_},
|
|
|
- name{readName(std::move(name_))}
|
|
|
|
|
|
|
+ name{readName(std::move(name_), type_)}
|
|
|
{}
|
|
{}
|
|
|
#if 0
|
|
#if 0
|
|
|
std::string ResourceID::getName() const
|
|
std::string ResourceID::getName() const
|