Covers more cases of:
* push_back(std::pair
* push_back(std::make_pair
* push_back(std::make_tuple
* push_back(T) where T is an empty object of type T
Small thing I noticed: this does mean the numbers in font::subset_descriptor are no longer 'cast' to size_t before being
added to the vector, but that shouldn't matter (hopefully).
Plus a bunch of changes which were necessary for the script to work:
* The "simulate lobby activity" plugin now exits when the server is shut
down.
* The plugin now uses wesnoth.random() for random number generation.
Math.random() uses a fixed seed, which would make all the clients
perform the exact same actions.
* Exposed wesnoth.random() to plugins to allow the change above.
* --nogui no longer implies --wconsole on Windows. With implied --wconsole
the clients attached themselves to the standard output of the Python
script, which made it impossible to see the output of the script itself.
Instead of passing the video object to the Lua kernel, the game now simply
fetches the video singleton when displaying dialogs. This means there is
no longer any need to store a reference to the video object.
This also delegates the redraw_background handling to a separate flag, since retvals are, by nature, a post-display]
value, and as such cannot be evaluated prior to display.
This removes the ugly string markup and makes the dialog parse the config directly.
This also temporarily disables the display of credits in the help browser.
This constitutes drop-in replacements for:
* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast
This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
This reverts commit 7b21849487fb9ff1607a8ab6aca813bf1df05171.
The commit was ill-advised in the first place and appears to cause issues
with the XCode build.
This commit converts the following function calls:
* boost::bind -> std::bind
* boost::function and boost::functionN -> std::function
* boost::ref and boost::cref -> std::ref and std::cref
* boost::bad_function_call -> std::bad_function_call
In the process, it was discovered that std::bind has trouble with overloaded
functions. There were two such cases in the code:
* gui2::twindow had an ancient unused overload to draw(). The overload was removed.
* gui2::trepeating_button was binding tdispatcher::fire. This case was converted
to a lambda.
We now create a new thread that does the actual loading while the main
thread handles user input (and drawing of the loadingscreen ). That way
wesnoth can still react on user input such as close game requests while
reading the config files.