mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-17 18:27:56 -05:00
Remove reference asset names from info strings
This commit is contained in:
@ -144,6 +144,14 @@ InfoString InfoStringFromStructConverterBase::Convert()
|
||||
return std::move(m_info_string);
|
||||
}
|
||||
|
||||
const char* InfoStringFromStructConverterBase::AssetName(const char* name)
|
||||
{
|
||||
if (name && name[0] == ',')
|
||||
return &name[1];
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
void InfoStringFromStructConverterBase::FillFromString(const std::string& key, const size_t offset)
|
||||
{
|
||||
const auto* str = *reinterpret_cast<const char**>(reinterpret_cast<uintptr_t>(m_structure) + offset);
|
||||
|
@ -54,6 +54,7 @@ protected:
|
||||
const void* m_structure;
|
||||
const std::function<std::string(scr_string_t)> m_get_scr_string;
|
||||
|
||||
static const char* AssetName(const char* name);
|
||||
void FillFromString(const std::string& key, size_t offset);
|
||||
void FillFromStringBuffer(const std::string& key, size_t offset, size_t bufferSize);
|
||||
void FillFromInt(const std::string& key, size_t offset);
|
||||
|
Reference in New Issue
Block a user