MCPcopy Create free account
hub / github.com/JACoders/OpenJK / AS_GetBModelSet

Function AS_GetBModelSet

code/client/snd_ambient.cpp:566–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564*/
565
566static void AS_GetBModelSet( ambientSet_t &set )
567{
568 int keywordID;
569
570 //The other parameters of the set come in a specific order
571 while ( parsePos <= parseSize )
572 {
573 int iFieldsScanned = sscanf( parseBuffer+parsePos, "%s", tempBuffer );
574 if (iFieldsScanned <= 0)
575 return;
576
577 keywordID = AS_GetKeywordIDForString( (const char *) &tempBuffer );
578
579 //Find and parse the keyword info
580 switch ( keywordID )
581 {
582 case SET_KEYWORD_SUBWAVES:
583 AS_GetSubWaves( set );
584 break;
585
586 default:
587
588 //Check to see if we've finished this group
589 if ( AS_GetSetNameIDForString( (const char *) &tempBuffer ) == -1 )
590 {
591 //Ignore comments
592 if ( tempBuffer[0] == ';' )
593 return;
594
595 //This wasn't a set name, so it's an error
596 #ifndef FINAL_BUILD
597 Com_Printf( S_COLOR_YELLOW"WARNING: Unknown ambient set keyword \"%s\"\n", tempBuffer );
598 #endif
599 }
600
601 return;
602 break;
603 }
604 }
605}
606
607/*
608-------------------------

Callers

nothing calls this directly

Calls 5

sscanfFunction · 0.85
AS_GetKeywordIDForStringFunction · 0.70
AS_GetSubWavesFunction · 0.70
AS_GetSetNameIDForStringFunction · 0.70
Com_PrintfFunction · 0.50

Tested by

no test coverage detected