| 442 | */ |
| 443 | |
| 444 | static void AS_GetGeneralSet( ambientSet_t &set ) |
| 445 | { |
| 446 | int keywordID; |
| 447 | |
| 448 | //The other parameters of the set come in a specific order |
| 449 | while ( parsePos <= parseSize ) |
| 450 | { |
| 451 | int iFieldsScanned = sscanf( parseBuffer+parsePos, "%s", tempBuffer ); |
| 452 | if (iFieldsScanned <= 0) |
| 453 | return; |
| 454 | |
| 455 | keywordID = AS_GetKeywordIDForString( (const char *) &tempBuffer ); |
| 456 | |
| 457 | //Find and parse the keyword info |
| 458 | switch ( keywordID ) |
| 459 | { |
| 460 | case SET_KEYWORD_TIMEBETWEENWAVES: |
| 461 | AS_GetTimeBetweenWaves( set ); |
| 462 | break; |
| 463 | |
| 464 | case SET_KEYWORD_SUBWAVES: |
| 465 | AS_GetSubWaves( set ); |
| 466 | break; |
| 467 | |
| 468 | case SET_KEYWORD_LOOPEDWAVE: |
| 469 | AS_GetLoopedWave( set ); |
| 470 | break; |
| 471 | |
| 472 | case SET_KEYWORD_VOLRANGE: |
| 473 | AS_GetVolumeRange( set ); |
| 474 | break; |
| 475 | |
| 476 | default: |
| 477 | |
| 478 | //Check to see if we've finished this group |
| 479 | if ( AS_GetSetNameIDForString( (const char *) &tempBuffer ) == -1 ) |
| 480 | { |
| 481 | //Ignore comments |
| 482 | if ( tempBuffer[0] == ';' ) |
| 483 | return; |
| 484 | |
| 485 | //This wasn't a set name, so it's an error |
| 486 | #ifndef FINAL_BUILD |
| 487 | Com_Printf( S_COLOR_YELLOW"WARNING: Unknown ambient set keyword \"%s\"\n", tempBuffer ); |
| 488 | #endif |
| 489 | } |
| 490 | |
| 491 | return; |
| 492 | break; |
| 493 | } |
| 494 | } |
| 495 | } |
| 496 | |
| 497 | /* |
| 498 | ------------------------- |
nothing calls this directly
no test coverage detected