Last track is endgame track for any audio CD, endgame track not played when a level is started, jukebox/redbook works in game even if no MIDI songs
This commit is contained in:
parent
b63f988d37
commit
cb9afb9bdf
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-Rebirth Changelog
|
||||||
|
|
||||||
|
20090131
|
||||||
|
--------
|
||||||
|
main/songs.c: Last track is endgame track for any audio CD, endgame track not played when a level is started, jukebox/redbook works in game even if no MIDI songs
|
||||||
|
|
||||||
20090130
|
20090130
|
||||||
--------
|
--------
|
||||||
arch/ogl/ogl.c, main/render.c: New level render order for better seperation and blending between transculent level geometry and sprites
|
arch/ogl/ogl.c, main/render.c: New level render order for better seperation and blending between transculent level geometry and sprites
|
||||||
|
|
17
main/songs.c
17
main/songs.c
|
@ -224,7 +224,7 @@ int play_redbook_track(int tracknum,int keep_playing)
|
||||||
|
|
||||||
#define REDBOOK_FIRST_LEVEL_TRACK (songs_haved1_cd()?6:1)
|
#define REDBOOK_FIRST_LEVEL_TRACK (songs_haved1_cd()?6:1)
|
||||||
#define REDBOOK_ENDLEVEL_TRACK 4
|
#define REDBOOK_ENDLEVEL_TRACK 4
|
||||||
#define REDBOOK_ENDGAME_TRACK 14
|
#define REDBOOK_ENDGAME_TRACK (RBAGetNumberOfTracks())
|
||||||
|
|
||||||
// songs_haved1_cd returns 1 if the descent 1 Mac CD is in the drive and
|
// songs_haved1_cd returns 1 if the descent 1 Mac CD is in the drive and
|
||||||
// 0 otherwise
|
// 0 otherwise
|
||||||
|
@ -302,15 +302,9 @@ void songs_play_level_song( int levelnum )
|
||||||
|
|
||||||
songs_stop_all();
|
songs_stop_all();
|
||||||
|
|
||||||
if (cGameSongsAvailable < 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
current_song_level = levelnum;
|
current_song_level = levelnum;
|
||||||
|
|
||||||
if (levelnum < 0)
|
songnum = (levelnum>0)?(levelnum-1):(-levelnum);
|
||||||
songnum = (-levelnum) % cGameSongsAvailable;
|
|
||||||
else
|
|
||||||
songnum = (levelnum-1) % cGameSongsAvailable;
|
|
||||||
|
|
||||||
if (!RBAEnabled() && GameCfg.SndEnableRedbook) // need this to determine if we currently have the official CD
|
if (!RBAEnabled() && GameCfg.SndEnableRedbook) // need this to determine if we currently have the official CD
|
||||||
reinit_redbook();
|
reinit_redbook();
|
||||||
|
@ -320,12 +314,13 @@ void songs_play_level_song( int levelnum )
|
||||||
if (RBAEnabled() && GameCfg.SndEnableRedbook) {
|
if (RBAEnabled() && GameCfg.SndEnableRedbook) {
|
||||||
|
|
||||||
//try to play redbook
|
//try to play redbook
|
||||||
|
// don't play endgame track during game
|
||||||
play_redbook_track(REDBOOK_FIRST_LEVEL_TRACK + (songnum % (n_tracks-REDBOOK_FIRST_LEVEL_TRACK+1)),!songs_haved1_cd());
|
|
||||||
|
play_redbook_track(REDBOOK_FIRST_LEVEL_TRACK + (n_tracks<=REDBOOK_FIRST_LEVEL_TRACK) ? 0 : (songnum % (n_tracks-REDBOOK_FIRST_LEVEL_TRACK)),!songs_haved1_cd());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! Redbook_playing) { //not playing redbook, so play midi
|
if (! Redbook_playing) { //not playing redbook, so play midi
|
||||||
songnum += SONG_LEVEL_MUSIC;
|
songnum = SONG_LEVEL_MUSIC + (songnum % cGameSongsAvailable);
|
||||||
digi_play_midi_song( Songs[songnum].filename, Songs[songnum].melodic_bank_file, Songs[songnum].drum_bank_file, 1 );
|
digi_play_midi_song( Songs[songnum].filename, Songs[songnum].melodic_bank_file, Songs[songnum].drum_bank_file, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue