the 2nd param here is pretty kludgy (sigh), and only used for testing for the "boss" type. Unfortunately two of the places that calls this doesn't have much other access to the state other than a string, not an enum, so for those cases they only pass in BOSS or EXPLORE, so don't rely on it totally.
| 161 | // a string, not an enum, so for those cases they only pass in BOSS or EXPLORE, so don't rely on it totally. |
| 162 | // |
| 163 | static const char *Music_BuildFileName(const char *psFileNameBase, MusicState_e eMusicState ) |
| 164 | { |
| 165 | static sstring_t sFileName; |
| 166 | |
| 167 | //HACK! |
| 168 | if (eMusicState == eBGRNDTRACK_DEATH) |
| 169 | { |
| 170 | return "music/death_music.mp3"; |
| 171 | } |
| 172 | |
| 173 | const char *psDirName = (eMusicState == eBGRNDTRACK_BOSS) ? gsLevelNameForBossLoad.c_str() : gsLevelNameForLoad.c_str(); |
| 174 | |
| 175 | sFileName = va("music/%s/%s.mp3",psDirName,psFileNameBase); |
| 176 | return sFileName.c_str(); |
| 177 | } |
| 178 | |
| 179 | // this MUST return NULL for non-base states unless doing debug-query |
| 180 | const char *Music_BaseStateToString( MusicState_e eMusicState, qboolean bDebugPrintQuery /* = qfalse */ ) |
no test coverage detected