| 360 | } |
| 361 | |
| 362 | void Sampler::enableKeys( const char* pattern, bool state ) |
| 363 | { |
| 364 | if( gSamplerRunning ) |
| 365 | { |
| 366 | Con::errorf( "Sampler::enableKeys -- cannot change key states while sampling" ); |
| 367 | return; |
| 368 | } |
| 369 | |
| 370 | for( U32 i = 0; i < gSampleKeys.size(); ++ i ) |
| 371 | if( gSampleKeys[ i ].matchesPattern( pattern ) ) |
| 372 | { |
| 373 | gSampleKeys[ i ].mEnabled = state; |
| 374 | Con::printf( "Sampler::enableKeys -- %s %s", state ? "enabling" : "disabling", |
| 375 | gSampleKeys[ i ].mName ); |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | #define SAMPLE_FUNC( type ) \ |
| 380 | void Sampler::sample( U32 key, type value ) \ |
nothing calls this directly
no test coverage detected