This time I added an option to disable the feature to allow the currently
playing track to finish when changing the playlist. This allows more
fine-grained control of distinct use cases.
In wesnoth.cpp:do_gameloop(), I reversed the order of the title screen
music and default music because otherwise adding the default music would
enable play_once for the title screen music and prevent instant music
change when the player loads a save. I play title screen music with
immediate=yes, so it's still played first.
(cherry-picked from commit 91afbfd586)
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.
For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
- Handle all plausible cases of assigning into the playlist
- Allow changing the current track to an existing one on the playlist
- Allow getting playlist as a real array instead of an array-like proxy
(Could be useful for storing it to a WML variable, for example)
- Allow removing a track by index and fixup the "set track" interface
- Commit music changes only after event completes, not after any control=flow tag is executed
- Allow inserting a track into the middle of the playlist
- Allow assigning a config to an existing track to overwrite it
- Use std::find when checking for duplicate tracks
font::manager::init() had a call to the font::describe_versions()
function I just dropped since there's little point in having that line
there when one can just run wesnoth --version to get the full table now.
The music_track struct has been rewritten (and "promoted" to class) and
music caching behavior in Wesnoth has changed a bit. This should not
noticeably affect performance or be visible to users in other ways (if
it is, we've got regressions).
There's a hidden, disarmed core bomb in this commit. Can you find it?
Formerly, the engine resolved binary paths to music files whenever it
hit one in the playlist. Now it resolves the binary path when
loading/editing the playlist, reducing the time it takes to play a new
track by an insignificant amount of time. It will also consider a
data/add-ons/foo/music/track1.ogg as a different file to
data/core/music/track1.ogg as far as the music cache is concerned, since
it now stores entries by real paths rather than just filenames.
* Wesnoth is distributed under the terms of the GPL version 2, made
that more explicit
* updated the copyright range to 2007
* updated Dave's email adress