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

Function ReadAnnotations

trinity/Shader/Tr2EffectDescription.cpp:114–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113
114void ReadAnnotations( Tr2EffectParameterAnnotationMap& annotationMap, EffectStream& stream )
115{
116 uint8_t annotationCount = stream.Read<uint8_t>();
117 annotationMap.resize( annotationCount );
118
119 for( int annotationIx = 0; annotationIx < annotationCount; ++annotationIx )
120 {
121 Tr2EffectParameterAnnotation& annotation = annotationMap[annotationIx];
122 annotation.name = stream.ReadString();
123 annotation.type = Tr2EffectParameterAnnotation::Type( stream.Read<uint8_t>() );
124
125 if( annotation.type == Tr2EffectParameterAnnotation::STRING )
126 {
127 annotation.stringValue = stream.ReadString();
128 }
129 else
130 {
131 annotation.intValue = int( stream.Read<uint32_t>() );
132 }
133 }
134}
135
136Tr2EffectConstant ReadConstant( EffectStream& stream, unsigned version )
137{

Callers 2

ReadInputFunction · 0.85
ReadMethod · 0.85

Calls 2

ReadStringMethod · 0.80
TypeEnum · 0.70

Tested by

no test coverage detected