MCPcopy Create free account
hub / github.com/carbonengine/trinity / ResetParamsToDefault

Method ResetParamsToDefault

trinity/Tr2GStateAnimation.cpp:130–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void Tr2GStateAnimation::ResetParamsToDefault()
131{
132 auto defaultParameterInstance = m_gStateParameterDefaultList.cbegin();
133 for( auto parameterInstance = m_gStateParameterList.cbegin(); parameterInstance != m_gStateParameterList.cend(); parameterInstance++ )
134 {
135 auto parameterNodeName = ( *parameterInstance )->GetNodeName();
136 auto name = ( *parameterInstance )->GetName();
137 auto value = ( *defaultParameterInstance )->GetValue();
138 ( *parameterInstance )->SetValue( value );
139 if( ( parameterNodeName.length() != 0 ) && ( name.length() != 0 ) )
140 {
141 auto iterator = m_gStateParameterCachedList.find( { parameterNodeName, name } );
142 if( iterator != m_gStateParameterCachedList.end() )
143 {
144 SetParameter( parameterNodeName, iterator->second, value );
145 }
146 }
147 defaultParameterInstance++;
148 }
149}
150
151void Tr2GStateAnimation::InitializeParametersFromGState()
152{

Callers

nothing calls this directly

Calls 4

GetNameMethod · 0.45
GetValueMethod · 0.45
SetValueMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected