Add original music soundtracks. If you have a playlist already, you need to delete it
or add the music to it manually. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5261 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
0d706d02fd
commit
1c3835ce23
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -169,10 +169,7 @@ zone 2100 Resurrection Project (http://wiki.wz2100.net/command_line_options).
|
||||||
|
|
||||||
3.3 Music
|
3.3 Music
|
||||||
---------
|
---------
|
||||||
As the original game music is part of the data that was not liberated, music is
|
A playlist-system is used that can point to any *.ogg in your warzone-data-path.
|
||||||
reintroduced in a different way. A playlist-system is used that can point to any
|
|
||||||
*.ogg in your warzone-data-path. This is still experimental and we are gradually
|
|
||||||
making this more usable.
|
|
||||||
|
|
||||||
Warzone reads the following two playlists (in the order they are mentioned) and
|
Warzone reads the following two playlists (in the order they are mentioned) and
|
||||||
the first playlist found will be used:
|
the first playlist found will be used:
|
||||||
|
@ -184,6 +181,8 @@ the first playlist found will be used:
|
||||||
* Warzone-install-path:
|
* Warzone-install-path:
|
||||||
o <whereverwarzoneisinstalled>/music/music.wpl
|
o <whereverwarzoneisinstalled>/music/music.wpl
|
||||||
|
|
||||||
|
If no playlist is present, one is created that plays the original game music.
|
||||||
|
|
||||||
Using the playlist
|
Using the playlist
|
||||||
******************
|
******************
|
||||||
The playlist contains two sections, [game] and [menu]. For each section you can
|
The playlist contains two sections, [game] and [menu]. For each section you can
|
||||||
|
|
|
@ -72,7 +72,6 @@ bool PlayList_Read(const char* path)
|
||||||
{
|
{
|
||||||
PHYSFS_file* fileHandle;
|
PHYSFS_file* fileHandle;
|
||||||
char* path_to_music = NULL;
|
char* path_to_music = NULL;
|
||||||
|
|
||||||
char fileName[PATH_MAX];
|
char fileName[PATH_MAX];
|
||||||
|
|
||||||
// Construct file name
|
// Construct file name
|
||||||
|
@ -81,6 +80,22 @@ bool PlayList_Read(const char* path)
|
||||||
// Attempt to open the playlist file
|
// Attempt to open the playlist file
|
||||||
fileHandle = PHYSFS_openRead(fileName);
|
fileHandle = PHYSFS_openRead(fileName);
|
||||||
if (fileHandle == NULL)
|
if (fileHandle == NULL)
|
||||||
|
{
|
||||||
|
// Create default playlist file
|
||||||
|
// This is an ugly HACK which should be FIXME'd into oblivion some other time
|
||||||
|
fileHandle = PHYSFS_openWrite(fileName);
|
||||||
|
if (fileHandle)
|
||||||
|
{
|
||||||
|
const char *gamestr = "[game]\npath=music\nshuffle=yes\ntrack1.ogg\ntrack2.ogg\n\n";
|
||||||
|
const char *menustr = "[menu]\npath=music\nmenu.ogg\n";
|
||||||
|
|
||||||
|
PHYSFS_write(fileHandle, gamestr, strlen(gamestr), 1);
|
||||||
|
PHYSFS_write(fileHandle, menustr, strlen(menustr), 1);
|
||||||
|
PHYSFS_close(fileHandle);
|
||||||
|
}
|
||||||
|
fileHandle = PHYSFS_openRead(fileName);
|
||||||
|
}
|
||||||
|
if (fileHandle == NULL)
|
||||||
{
|
{
|
||||||
debug(LOG_NEVER, "sound_LoadTrackFromFile: PHYSFS_openRead(\"%s\") failed with error: %s\n", fileName, PHYSFS_getLastError());
|
debug(LOG_NEVER, "sound_LoadTrackFromFile: PHYSFS_openRead(\"%s\") failed with error: %s\n", fileName, PHYSFS_getLastError());
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue