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
This commit is contained in:
parent
2e5cd378d3
commit
335543283e
|
@ -3,6 +3,7 @@ D1X-Rebirth Changelog
|
||||||
20081119
|
20081119
|
||||||
--------
|
--------
|
||||||
main/game.c: Actually demand ANY valid key to abort the Death sequence
|
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
|
20081118
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -60,8 +60,6 @@ void songs_init()
|
||||||
char inputline[80+1];
|
char inputline[80+1];
|
||||||
CFILE * fp;
|
CFILE * fp;
|
||||||
|
|
||||||
if ( Songs_initialized ) return;
|
|
||||||
|
|
||||||
fp = cfopen( "descent.sng", "rb" );
|
fp = cfopen( "descent.sng", "rb" );
|
||||||
if ( fp == NULL ) {
|
if ( fp == NULL ) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -140,6 +138,8 @@ void songs_init()
|
||||||
Songs_initialized = 1;
|
Songs_initialized = 1;
|
||||||
cfclose(fp);
|
cfclose(fp);
|
||||||
|
|
||||||
|
if ( Songs_initialized ) return;
|
||||||
|
|
||||||
// RBA Hook
|
// RBA Hook
|
||||||
#if !defined(SHAREWARE) || ( defined(SHAREWARE) && defined(APPLE_DEMO) )
|
#if !defined(SHAREWARE) || ( defined(SHAREWARE) && defined(APPLE_DEMO) )
|
||||||
if (GameCfg.SndEnableRedbook)
|
if (GameCfg.SndEnableRedbook)
|
||||||
|
@ -271,7 +271,7 @@ int songs_haved1_cd()
|
||||||
|
|
||||||
void songs_play_song( int songnum, int repeat )
|
void songs_play_song( int songnum, int repeat )
|
||||||
{
|
{
|
||||||
if ( !Songs_initialized ) songs_init();
|
songs_init();
|
||||||
|
|
||||||
//stop any music already playing
|
//stop any music already playing
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ void songs_play_level_song( int levelnum )
|
||||||
|
|
||||||
Assert( levelnum != 0 );
|
Assert( levelnum != 0 );
|
||||||
|
|
||||||
if ( !Songs_initialized ) songs_init();
|
songs_init();
|
||||||
|
|
||||||
songs_stop_all();
|
songs_stop_all();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue