diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4d0b2ac04..b82fba041 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20110306 +-------- +main/songs.c: Be safer not interrupting other ports of descent or the original MS-DOS game when it comes to reading song files: Try reading from MISSION_NAME.sngdxx to have a way reading a song file for a specific mission outside the mission's HOG, next try reading from descent.sngdxx which shall serve as an alternative song file specifically for DXX and then try descent.sng. This should give authors enough possibilities to add OSTs for all different versions of the game without the need to publish different versions of their missions + 20110224 -------- 2d/canvas.c: Fix for last revision: Correctly initialize cv_fade_level and cv_blend_func when creating initializing a canvas diff --git a/main/songs.c b/main/songs.c index b6dec97a7..4de376ca5 100644 --- a/main/songs.c +++ b/main/songs.c @@ -73,13 +73,16 @@ void songs_init() d_free(BIMSongs); memset(sng_file, '\0', sizeof(sng_file)); - if (Current_mission != NULL) + if (Current_mission != NULL) // try MISSION_NAME.sngdxx - might be rarely used but handy if you want a songfile for a specific mission outside of the mission hog file. use special extension to not crash with other ports of the game { - snprintf(sng_file, strlen(Current_mission_filename)+5, "%s.sng", Current_mission_filename); + snprintf(sng_file, strlen(Current_mission_filename)+8, "%s.sngdxx", Current_mission_filename); fp = cfopen(sng_file, "rb"); } - if (fp == NULL) + if (fp == NULL) // try descent.sngdxx - a songfile specifically for dxx which level authors CAN use (dxx does not care if descent.sng contains MP3/OGG/etc. as well) besides the normal descent.sng containing files other versions of the game cannot play. this way a mission can contain a DOS-Descent compatible OST (hmp files) as well as a OST using MP3, OGG, etc. + fp = cfopen( "descent.sngdxx", "rb" ); + + if (fp == NULL) // try to open regular descent.sng fp = cfopen( "descent.sng", "rb" ); if ( fp == NULL ) // No descent.sng available. Define a default song-set