mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
Add scriptstrings from loaded zones to newly linked zone
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
#include "AssetWriter.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
AssetWriter::AssetWriter(XAssetInfoGeneric* asset, Zone* zone, IZoneOutputStream* stream)
|
||||
: ContentWriterBase(zone, stream),
|
||||
@ -19,15 +17,7 @@ scr_string_t AssetWriter::UseScriptString(const scr_string_t scrString) const
|
||||
return scrString;
|
||||
|
||||
const auto strValue = m_asset->m_zone->m_script_strings[scrString];
|
||||
const auto scrStringEntry = std::find(m_zone->m_script_strings.begin(), m_zone->m_script_strings.end(), strValue);
|
||||
assert(scrStringEntry != m_zone->m_script_strings.end());
|
||||
|
||||
if (scrStringEntry != m_zone->m_script_strings.end())
|
||||
{
|
||||
return static_cast<scr_string_t>(std::distance(scrStringEntry, m_zone->m_script_strings.begin()));
|
||||
}
|
||||
|
||||
return 0;
|
||||
return m_zone->m_script_strings.GetScriptString(strValue);
|
||||
}
|
||||
|
||||
void AssetWriter::WriteScriptStringArray(const bool atStreamStart, const size_t count)
|
||||
|
Reference in New Issue
Block a user