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

Function Music_BaseStateToString

code/client/snd_music.cpp:180–205  ·  view source on GitHub ↗

this MUST return NULL for non-base states unless doing debug-query

Source from the content-addressed store, hash-verified

178
179// this MUST return NULL for non-base states unless doing debug-query
180const char *Music_BaseStateToString( MusicState_e eMusicState, qboolean bDebugPrintQuery /* = qfalse */ )
181{
182 switch (eMusicState)
183 {
184 case eBGRNDTRACK_EXPLORE: return "explore";
185 case eBGRNDTRACK_ACTION: return "action";
186 case eBGRNDTRACK_BOSS: return "boss";
187 case eBGRNDTRACK_SILENCE: return "silence"; // not used in this module, but snd_dma uses it now it's de-static'd
188 case eBGRNDTRACK_DEATH: return "death";
189
190 // info only, not map<> lookup keys (unlike above)...
191 //
192 case eBGRNDTRACK_ACTIONTRANS0: if (bDebugPrintQuery) return "action_tr0";
193 case eBGRNDTRACK_ACTIONTRANS1: if (bDebugPrintQuery) return "action_tr1";
194 case eBGRNDTRACK_ACTIONTRANS2: if (bDebugPrintQuery) return "action_tr2";
195 case eBGRNDTRACK_ACTIONTRANS3: if (bDebugPrintQuery) return "action_tr3";
196 case eBGRNDTRACK_EXPLORETRANS0: if (bDebugPrintQuery) return "explore_tr0";
197 case eBGRNDTRACK_EXPLORETRANS1: if (bDebugPrintQuery) return "explore_tr1";
198 case eBGRNDTRACK_EXPLORETRANS2: if (bDebugPrintQuery) return "explore_tr2";
199 case eBGRNDTRACK_EXPLORETRANS3: if (bDebugPrintQuery) return "explore_tr3";
200 case eBGRNDTRACK_FADE: if (bDebugPrintQuery) return "fade";
201 default: break;
202 }
203
204 return NULL;
205}
206
207static qboolean Music_ParseMusic( gsl::czstring filename, const CGenericParser2& Parser, MusicData_t* MusicData, const CGPGroup& pgMusicFiles, const gsl::cstring_view& psMusicName, const gsl::cstring_view& psMusicNameKey, MusicState_e eMusicState )
208{

Callers 7

Music_ParseLeveldataFunction · 0.70
Music_GetBaseMusicFileFunction · 0.70
Music_GetRandomEntryTimeFunction · 0.70
DynamicMusicInfoPrintFunction · 0.70
S_SwitchDynamicTracksFunction · 0.70
S_SetDynamicMusicStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected