mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-14 03:13:03 +00:00
Parse techset files for IW4
This commit is contained in:
31
src/ObjLoading/Techset/TechsetDefinition.cpp
Normal file
31
src/ObjLoading/Techset/TechsetDefinition.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "TechsetDefinition.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace techset;
|
||||
|
||||
TechsetDefinition::TechsetDefinition(const size_t techniqueTypeCount)
|
||||
: m_has_technique(techniqueTypeCount),
|
||||
m_technique_names(techniqueTypeCount)
|
||||
{
|
||||
}
|
||||
|
||||
bool TechsetDefinition::GetTechniqueByIndex(const size_t index, std::string& techniqueName) const
|
||||
{
|
||||
assert(index < m_has_technique.size());
|
||||
if (index >= m_has_technique.size() || !m_has_technique[index])
|
||||
return false;
|
||||
|
||||
techniqueName = m_technique_names[index];
|
||||
return true;
|
||||
}
|
||||
|
||||
void TechsetDefinition::SetTechniqueByIndex(const size_t index, std::string techniqueName)
|
||||
{
|
||||
assert(index < m_has_technique.size());
|
||||
if (index >= m_has_technique.size())
|
||||
return;
|
||||
|
||||
m_has_technique[index] = true;
|
||||
m_technique_names[index] = std::move(techniqueName);
|
||||
}
|
||||
Reference in New Issue
Block a user