137 Commits

Author SHA1 Message Date
Charles Dang
2a6ca6cd9e Deployed more emplace_back (how do I keep missing these...)
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).
2017-04-28 17:15:13 +11:00
Charles Dang
323516d3d8 Avoid copy initialization of arrays (use direct instead) 2017-04-21 03:10:07 +11:00
Celtic Minstrel
f3a574da46 Fix for GNA584 2017-04-12 23:37:39 -04:00
Charles Dang
0c3260dc05 Finished deploying std::map::emplace (cont. e1a579da51)
Apparently, the last time I did this I only grepped for `insert(std::pair` not `insert(std::make_pair`. Oversight, much?
2017-04-12 07:51:42 +11:00
Charles Dang
19e0d86e6d Removed some Visual Leak Detector-related code
[ci skip]

These should really be included only locally when testing, if anyone happens to use that tool.
2017-04-04 17:25:42 +11:00
Celtic Minstrel
e6045b17c6 Rename game_logic namespace to wfl and move variant class into it 2017-04-03 04:31:38 -04:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Jyrki Vesterinen
fc928d6841 Renamed manager_old.hpp back to manager.hpp
There isn't anything obsolete in manager.hpp.
Hence having _old in its name is unnecessary and misleading.
2017-01-12 20:34:23 +02:00
Charles Dang
e22c8967ee Cleaned up global.hpp includes 2016-12-17 15:21:04 +11:00
GregoryLundberg
93e3ac4800 Hide C4456 and C4458 due to bugs in boost gzip implementation 2016-12-03 14:09:56 -06:00
Charles Dang
d8d986d734 Cleaned up a bunch of unnecessary Boost includes 2016-11-30 11:25:22 +11:00
Celtic Minstrel
67ea79d86f Rename some GUI2 files to match the contained class 2016-11-19 17:16:10 -05:00
Celtic Minstrel
b5b086a3b2 Normalize data and userdata paths 2016-11-18 12:09:55 -05:00
Celtic Minstrel
517f397325 Fix OSX build broken by PR #868 2016-11-11 11:49:54 -05:00
Charles Dang
bd2d040f2a Merge pull request #868 from GregoryLundberg/GL_Delete_Google_NaCL
Delete support for Google Native Client (NaCL).
2016-11-12 02:14:27 +11:00
Gregory A Lundberg
046f8e24a4 Remove #if for __native_client__ 2016-11-09 11:34:32 -06:00
Celtic Minstrel
10b6a34615 Rename all GUI2 dialogs to drop t- prefix
This also places them in a new dialogs namespace.
2016-11-09 01:27:30 -05:00
Celtic Minstrel
8c929585aa Rename core GUI2 types to drop t- prefix 2016-11-09 01:24:25 -05:00
Celtic Minstrel
a1967ec16a Rename twml_exception -> wml_exception 2016-11-09 01:17:14 -05:00
Celtic Minstrel
e0614251c4 Rename exception classes to avoid t- prefix 2016-11-09 01:13:17 -05:00
Jyrki Vesterinen
e7c2105c48 Add a script to simulate heavy lobby traffic
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.
2016-10-23 16:52:36 +03:00
Celtic Minstrel
09d35947f4 Fix Lua-invoked dialogs not showing before prestart
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.
2016-10-18 12:48:15 -04:00
Chris Beck
545800f9f8 give better error messages for font initialization failure 2016-10-16 21:47:45 -04:00
Chris Beck
202408f28e simplify font::manager object a bit, give better error messages for font initialization failure 2016-10-16 21:07:09 -04:00
Chris Beck
e3417bd954 split gui1 font interface into a font_config and sdl_ttf interface
move all of these into font folder
2016-10-15 05:52:23 -04:00
Charles Dang
74bf3428e9 Title Screen: big code/formatting cleanup 2016-10-03 13:28:12 +11:00
Charles Dang
85a6a5132f Minor fixups to 6f7cb3901ebd 2016-10-03 06:19:56 +11:00
Charles Dang
6f7cb3901e Title Screen: refactored button handling to use dialog retvals
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.
2016-10-03 06:01:47 +11:00
Celtic Minstrel
31a972242a When --wconsole causes the allocation of a new console,
print a 'press enter to continue' message when the program
terminates due to a caught exception.
2016-09-17 11:53:27 -04:00
Charles Dang
476027f239 Completely refactored internal handling of credits and enabled new dialog
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.
2016-09-15 03:09:14 +11:00
Charles Dang
54e879b183 Fix not being able to load a game from within a game
Every time an attempt was made, the titlescreen got in the way.
2016-09-11 00:19:11 +11:00
Celtic Minstrel
d0906ceac5 Refactor titlescreen loop so that it redraws properly behind other dialogs 2016-09-08 02:24:16 -04:00
Celtic Minstrel
201abc9d7e Make title screen rebuild its layout when the window is resized
This also restores one of the two reverted title screen tweaks.
2016-08-25 15:58:17 -04:00
Celtic Minstrel
2cde73888c Tweaks to the title screen, mainly for 800x600
Also:
- Hide cores button if there are no addon cores installed
- Remove "failsafe" core since it didn't work as advertised
2016-08-25 04:36:50 -04:00
Charles Dang
24577e117d Merge pull request #716 from wesnoth/boost_trimming
Boost-related cleanups
2016-07-30 15:51:30 +11:00
gfgtdf
6f021631e1 replace some std::bind with lambdas 2016-07-29 14:36:22 +02:00
Charles Dang
a1f6884555 Refactor uses of boost::tuple to std::tuple or std::pair as appropriate 2016-07-25 17:26:24 +11:00
Charles Dang
05092ba2f6 Refactor most boost pointer related stuff to use their stdlib counterparts
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.
2016-07-25 09:28:42 +11:00
Andreas Löf
516daccbba Move the global event context onto the general event queue.
This moves the global event context onto the general event queue
and creates it through RAII instead.
2016-07-17 20:33:09 +12:00
Celtic Minstrel
d3cd314f46 Revert "Cleaned up cstdlib includes"
This reverts commit 7b21849487fb9ff1607a8ab6aca813bf1df05171.

The commit was ill-advised in the first place and appears to cause issues
with the XCode build.
2016-06-06 21:08:44 -04:00
Charles Dang
7b21849487 Cleaned up cstdlib includes 2016-06-07 03:12:04 +11:00
gfgtdf
dca57bd5b0 remove uses of network::error and fix gui2 mp lobby 2016-06-05 14:50:53 +02:00
Charles Dang
0ca4e6c943 Convert uses of boost functional to standard library variants
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.
2016-04-04 02:20:52 +11:00
Celtic Minstrel
ca382018b7 BOOST_FOREACH -> range for 2016-04-02 09:38:29 -04:00
Celtic Minstrel
1368a05ee9 Correct indentation 2016-03-31 21:40:09 -04:00
Celtic Minstrel
a5cd2c7f4a Restore loadscreen translatable stage messages 2016-03-31 21:40:08 -04:00
Celtic Minstrel
1c5f6024fd Reduce needlessly large closures 2016-03-31 21:40:05 -04:00
Celtic Minstrel
86b4680371 Use vector/templating for Lua-like bulk registration functions 2016-03-31 02:13:38 -04:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
gfgtdf
99bbaaeff4 make loadingscreen more responsive to user input.
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.
2016-03-30 15:37:54 +02:00