From d679603cab6ec77b94e0ffebdeeed789de160420 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 30 Oct 2019 05:51:53 +0000 Subject: [PATCH] SW: Fix MIDI music git-svn-id: https://svn.eduke32.com/eduke32@8271 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/config.cpp # source/sw/src/config.h # source/sw/src/game.cpp # source/sw/src/menus.cpp # source/sw/src/sounds.cpp --- source/sw/src/game.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index cd369c378..b0bb87366 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -273,6 +273,7 @@ void BOT_DeleteAllBots(void); void BotPlayerInsert(PLAYERp pp); void SybexScreen(void); void DosScreen(void); +void PlayTheme(void); void MenuLevel(void); void StatScreen(PLAYERp mpp); void InitRunLevel(void); @@ -1599,13 +1600,19 @@ NewLevel(void) if (SW_SHAREWARE) { if (FinishAnim) + { + PlayTheme(); MenuLevel(); } + } else { if (FinishAnim == ANIM_ZILLA || FinishAnim == ANIM_SERP) + { + PlayTheme(); MenuLevel(); } + } FinishAnim = 0; } @@ -1656,6 +1663,15 @@ ResetKeyRange(uint8_t* kb, uint8_t* ke) } } +void PlayTheme() +{ + // start music at logo + strcpy(LevelSong,"theme.mid"); + PlaySong(LevelSong, RedBookSong[0], TRUE, TRUE); + + DSPRINTF(ds,"After music stuff..."); + MONO_PRINT(ds); +} void LogoLevel(void) @@ -1679,13 +1695,6 @@ LogoLevel(void) DSPRINTF(ds,"Created palookup..."); MONO_PRINT(ds); - // start music at logo - strcpy(LevelSong,"theme.mid"); - PlaySong(LevelSong, RedBookSong[0], TRUE, TRUE); - - DSPRINTF(ds,"After music stuff..."); - MONO_PRINT(ds); - //GetPaletteFromVESA(pal); //memcpy(backup_pal, pal, PAL_SIZE); @@ -2055,11 +2064,6 @@ MenuLevel(void) DSPRINTF(ds,"MenuLevel..."); MONO_PRINT(ds); - if (MusicEnabled()) - { - PlaySong(NULL, RedBookSong[0], TRUE, FALSE); - } - if (AutoNet) { DrawMenuLevelScreen(); @@ -2822,6 +2826,7 @@ GameIntro(void) + PlayTheme(); if (!AutoNet) {