diff --git a/src/m_menu.c b/src/m_menu.c index 984a9e0f6..b9b4f597f 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -8099,10 +8099,6 @@ static void M_MusicTest(INT32 choice) UINT8 i; char buf[8]; - //soundtestpage = (UINT8)(unlockables[ul].variable); - if (!soundtestpage) - soundtestpage = 1; - if (!S_PrepareSoundTest()) { M_StartMessage(M_GetText("No selectable tracks found.\n"),NULL,MM_NOTHING); @@ -8145,32 +8141,24 @@ static void M_DrawMusicTest(void) if (curplaying) { { - if (curplaying->stoppingtics && st_time >= curplaying->stoppingtics) - { - curplaying = NULL; - st_time = 0; - } - else - { - fixed_t work; - //angle_t ang; - //bpm = FixedDiv((60*TICRATE)<= (FRACUNIT>>1)) // prevent overflow jump - takes about 15 minutes of loop on the same song to reach - st_time = (work>>FRACBITS); + if (st_time >= (FRACUNIT>>1)) // prevent overflow jump - takes about 15 minutes of loop on the same song to reach + st_time = (work>>FRACBITS); - //work = FixedDiv(work*180, bpm); - //frame[0] = 8-(work/(20<>ANGLETOFINESHIFT) & FINEMASK; - //bounce = (FINESINE(ang) - FRACUNIT/2); - //hscale -= bounce/16; - //vscale += bounce/16; + //work = FixedDiv(work*180, bpm); + //frame[0] = 8-(work/(20<>ANGLETOFINESHIFT) & FINEMASK; + //bounce = (FINESINE(ang) - FRACUNIT/2); + //hscale -= bounce/16; + //vscale += bounce/16; - st_time++; - } + st_time++; } } @@ -8291,11 +8279,7 @@ static void M_DrawMusicTest(void) { if (t == st_sel) V_DrawFill(40, y-4, 240-1, 16, 155); - if (!soundtestdefs[t]->allowed) - { - V_DrawString(x, y, (t == st_sel ? V_YELLOWMAP : 0)|V_ALLOWLOWERCASE, "???"); - } - else + { const size_t MAXLENGTH = 28; const tic_t SCROLLSPEED = TICRATE/5; // Number of tics for name being scrolled by 1 letter @@ -8447,17 +8431,8 @@ static void M_HandleMusicTest(INT32 choice) S_StopSounds(); S_StopMusic(); st_time = 0; - if (soundtestdefs[st_sel]->allowed) - { - curplaying = soundtestdefs[st_sel]; - - S_ChangeMusicInternal(curplaying->name, !curplaying->stoppingtics); - } - else - { - curplaying = NULL; - S_StartSound(NULL, sfx_lose); - } + curplaying = soundtestdefs[st_sel]; + S_ChangeMusicInternal(curplaying->name, true); break; default: diff --git a/src/s_sound.c b/src/s_sound.c index 4b54d8128..4b08c81dd 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1539,7 +1539,6 @@ void S_ShowMusicCredit(void) musicdef_t **soundtestdefs = NULL; INT32 numsoundtestdefs = 0; -UINT8 soundtestpage = 1; // // S_PrepareSoundTest @@ -1553,7 +1552,6 @@ boolean S_PrepareSoundTest(void) for (def = musicdefstart; def; def = def->next) { - def->allowed = false; numsoundtestdefs++; } @@ -1569,7 +1567,6 @@ boolean S_PrepareSoundTest(void) for (def = musicdefstart; def /*&& i < numsoundtestdefs*/; def = def->next) { soundtestdefs[pos++] = def; - def->allowed = true; } return true; diff --git a/src/s_sound.h b/src/s_sound.h index 8ebc6fde4..c16b05d64 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -145,16 +145,8 @@ boolean S_SpeedMusic(float speed); typedef struct musicdef_s { char name[7]; - char title[32]; - char alttitle[64]; //char usage[256]; char source[256]; - char authors[256]; - UINT8 soundtestpage; - INT16 soundtestcond; // +ve for map, -ve for conditionset, 0 for already here - tic_t stoppingtics; - fixed_t bpm; - boolean allowed; // question marks or listenable on sound test? struct musicdef_s *next; } musicdef_t;