mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
Add supplemental data for iw4 statemap layout
This commit is contained in:
@ -4,11 +4,11 @@ using namespace state_map;
|
||||
|
||||
StateMapParserState::StateMapParserState(std::string stateMapName, const StateMapLayout& layout)
|
||||
: m_layout(layout),
|
||||
m_definition(std::make_unique<StateMapDefinition>(std::move(stateMapName), layout.m_layout_entries.size())),
|
||||
m_definition(std::make_unique<StateMapDefinition>(std::move(stateMapName), layout.m_entry_layout.m_entries.size())),
|
||||
m_in_entry(false),
|
||||
m_current_entry_index(0u),
|
||||
m_current_rule(nullptr)
|
||||
{
|
||||
for (auto i = 0u; i < m_layout.m_layout_entries.size(); i++)
|
||||
m_valid_state_map_entry_names.emplace(m_layout.m_layout_entries[i].m_name, i);
|
||||
for (auto i = 0u; i < m_layout.m_entry_layout.m_entries.size(); i++)
|
||||
m_valid_state_map_entry_names.emplace(m_layout.m_entry_layout.m_entries[i].m_name, i);
|
||||
}
|
||||
|
@ -31,11 +31,11 @@ bool StateMapReader::IsValidEndState(const StateMapParserState* state) const
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto i = 0u; i < state->m_layout.m_layout_entries.size(); i++)
|
||||
for (auto i = 0u; i < state->m_layout.m_entry_layout.m_entries.size(); i++)
|
||||
{
|
||||
if (state->m_definition->m_state_map_entries[i].m_rules.empty())
|
||||
{
|
||||
std::cerr << "In \"" << m_file_name << "\": State map must define a rule for \"" << state->m_layout.m_layout_entries[i].m_name << "\"!\n";
|
||||
std::cerr << "In \"" << m_file_name << "\": State map must define a rule for \"" << state->m_layout.m_entry_layout.m_entries[i].m_name << "\"!\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user