//=========================================================================== // S_LevelMusic // Start the song for the current map. //=========================================================================== void S_LevelMusic(void) { ddmapinfo_t info; char id[10]; if(gamestate != GS_LEVEL) return; sprintf(id, "E%iM%i", gameepisode, gamemap); if(Def_Get(DD_DEF_MAP_INFO, id, &info) && info.music >= 0) { S_StartMusicNum(info.music, true); } else { S_StartMusicNum((gameepisode - 1) * 9 + gamemap - 1, true); } }
void Cht_MusicFunc(player_t *plyr, char *buf) { int off, musnum; if(gamemode == commercial) { off = (buf[0] - '0') * 10 + buf[1] - '0'; musnum = MUS_MAP01 + off - 1; if(off < 1 || off > 35) P_SetMessage(plyr, STSTR_NOMUS, false); else S_StartMusicNum(musnum, true); } else { off = (buf[0] - '1') * 9 + (buf[1] - '1'); musnum = MUS_E1M1 + off; if(off > 31) P_SetMessage(plyr, STSTR_NOMUS, false); else S_StartMusicNum(musnum, true); } }
// Updates stuff each tick void WI_Ticker(void) { // counter for general background animation bcnt++; if(bcnt == 1) { // intermission music if(gamemode == commercial) S_StartMusicNum(mus_dm2int, true); else S_StartMusicNum(mus_inter, true); } WI_checkForAccelerate(); switch (state) { case StatCount: if(deathmatch) WI_updateDeathmatchStats(); else if(IS_NETGAME) WI_updateNetgameStats(); else WI_updateStats(); break; case ShowNextLoc: WI_updateShowNextLoc(); break; case NoState: WI_updateNoState(); break; } }