From 335543283e75ce3bfb0c4705d352e6d873cce9fa Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Wed, 19 Nov 2008 15:52:07 +0000 Subject: [PATCH] Do a songs_init() each time a song is played and try to read a new descent.sng - supporting descent.sng files in hog archives --- CHANGELOG.txt | 1 + main/songs.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7379787a2..00a63f9cc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20081119 -------- main/game.c: Actually demand ANY valid key to abort the Death sequence +main/songs.c: Do a songs_init() each time a song is played and try to read a new descent.sng - supporting descent.sng files in hog archives 20081118 -------- diff --git a/main/songs.c b/main/songs.c index 8b131cb03..0801e27e1 100644 --- a/main/songs.c +++ b/main/songs.c @@ -60,8 +60,6 @@ void songs_init() char inputline[80+1]; CFILE * fp; - if ( Songs_initialized ) return; - fp = cfopen( "descent.sng", "rb" ); if ( fp == NULL ) { int i; @@ -140,6 +138,8 @@ void songs_init() Songs_initialized = 1; cfclose(fp); + if ( Songs_initialized ) return; + // RBA Hook #if !defined(SHAREWARE) || ( defined(SHAREWARE) && defined(APPLE_DEMO) ) if (GameCfg.SndEnableRedbook) @@ -271,7 +271,7 @@ int songs_haved1_cd() void songs_play_song( int songnum, int repeat ) { - if ( !Songs_initialized ) songs_init(); + songs_init(); //stop any music already playing @@ -298,7 +298,7 @@ void songs_play_level_song( int levelnum ) Assert( levelnum != 0 ); - if ( !Songs_initialized ) songs_init(); + songs_init(); songs_stop_all();