Commit graph

70547 commits

Author SHA1 Message Date
Gregory A Lundberg
d091391899 Renamed the target and binary for the Boost unit tests from test to boost_unit_tests
This quells warnings from CMake about reserved target names, and reduces confusion about which `test` is intended: the wesnoth executable or the standard shell command.
2017-11-06 20:32:27 +02:00
Charles Dang
9019074182 MP: prompt for server address before loading game config
This allows players to cancel and return to titlescreen quicker if they so choose.
2017-11-06 18:28:29 +11:00
Alexander van Gessel
e226ef324a Weight RGB values by alpha 2017-11-06 17:06:27 +11:00
Alexander van Gessel
8f730f2dd3 Further refactoring of blur algorithm
Logic is now repeated less and pixels are only decomposed once.
2017-11-06 15:58:22 +11:00
Alexander van Gessel
0300913715 Improve doxygen comments 2017-11-06 15:58:22 +11:00
Alexander van Gessel
403a45ecf4 Add comments explaining how the blurring works 2017-11-06 15:58:22 +11:00
Alexander van Gessel
cd886048dc Get rid of avg, which is now redundant 2017-11-06 15:58:22 +11:00
Alexander van Gessel
0f75e9eea0 Properly size circular buffer
In most cases, it should now use less memory and be faster to construct.
In the other cases, blurring used to be incorrect because the buffer was too small.
2017-11-06 15:58:22 +11:00
Alexander van Gessel
dc873f4627 Add larger blur testcase 2017-11-06 15:58:22 +11:00
Alexander van Gessel
39b8a5cdc9 Replace hand-written circular buffer with the boost one 2017-11-06 15:58:22 +11:00
Alexander van Gessel
1c73adb70f Attempt to silence a coverity issue yet again by splitting up an expression 2017-11-06 03:40:00 +01:00
josteph
a43792f278 Lua API: Add advances_from and advances_to to unit type getter
Fixes #2169.
2017-11-06 11:32:19 +11:00
Charles Dang
2277926c06 Game Config Manager: utilize unique_ptrs over shared_ptrs 2017-11-06 00:34:52 +11:00
Charles Dang
3b9e73f7d2 Create Engine: exclude campaigns from the has-sides check
This allows campaigns to be started from MP again. Should have remembered to commit this before 1.13.10 :(
2017-11-06 00:23:14 +11:00
Alexander van Gessel
c705047bfa Merge branch 'master' of github.com:wesnoth/wesnoth 2017-11-05 13:43:18 +01:00
Alexander van Gessel
2fec007382 Add warning about additional characters being ignored 2017-11-05 13:40:08 +01:00
Charles Dang
961c8c05d3 MP Lobby: cleaned up WML layout
[ci skip]

This mostly focused on formatting and reducing the number of sub-grids in the player tree area.
2017-11-05 22:22:15 +11:00
Charles Dang
744608882b Fixup 21545b5 for GCC 2017-11-05 18:35:50 +11:00
Charles Dang
21545b5a2e GUI2/Chatbox: code cleanup/minor refactoring
* Some doc/formatting cleanup
* Removed some unnecessary functions
* Added some explanatory comments
* Removed some commented out code
* Simplified a few things.
2017-11-05 17:43:15 +11:00
sigurdfdragon
65cf6eb6af Fixup c4d78f8 2017-11-03 22:45:00 -04:00
Jyrki Vesterinen
8279602d70 Invalidate all windows again on DRAW_ALL_EVENT
Fixes #2159.
2017-11-03 20:50:00 +02:00
Alexander van Gessel
8b1902e864 Switch to default destructor, removing very old TODO 2017-11-03 08:28:21 +01:00
josteph
673c1fa4d9 help: Handle traits with empty names or descriptions.
Fixes #2108.
2017-11-03 18:11:08 +11:00
Charles Dang
237b7a00bc Silence -Wunused-private-field warnings on Clang (fixes #2164) 2017-11-03 18:08:01 +11:00
Alexander van Gessel
cdec9b2a7a Remove an unnecessary layer of indirection 2017-11-03 07:24:45 +01:00
Charles Dang
99ddd7b53b Fixup feccf66231 for Travis
lobby var was set but not used after that commit.
2017-11-03 14:59:16 +11:00
Charles Dang
9902b07519 GUI2/Listbox: fully show any partially-obscured items when selected 2017-11-03 14:57:03 +11:00
Charles Dang
feccf66231 MP Lobby: disable Current Room user list for now
Room support was lost when porting wesnothd to boost::asio and has yet to be re-added.
Hiding this for now.
2017-11-03 13:07:01 +11:00
Charles Dang
c4a182dc0e Updated changelog
[ci skip]
2017-11-03 11:51:09 +11:00
Charles Dang
a9b234d7e4 Clarified invalid nickname message (fixes #2157)
Apparently nicks require at least 1 alphanumeric character, meaning the previous message
was rather confusing, since the apparently valid nickname of "-_-" did not work.
2017-11-03 11:28:30 +11:00
Charles Dang
67a43390f8 Preferences Dialog: fixed friends list row being added even if username was a duplicate
This fixes #2156.

preferences::add_acquaintance replaces the existing friend entry if the given username
has already been added to the acquaintance list, but the prefs dialog always added a
new row unconditionally. I've changed it to only add a new row if the username creates
a new entry, else replace the appropriate exiting row.
2017-11-03 11:18:31 +11:00
Gregory A Lundberg
e0366b1352 Give up on Coverity for this
Coverity wants a cast to double. Add it and it wants a cast to long long. Add THAT and Coverity and GCC both complain.

I suppose there might be a way to rewrite things to make everyone happy. But it's easier to tell Coverity it's a false positive and force the issue closed.
2017-11-02 17:45:14 -05:00
Gregory A Lundberg
23b98e2827 Quell missing declaration warnings
This so-called header is actually just splitting a large source file into two files. I would mark these functions static but this is a header; so I'm pre-declaring them in case some other compiler complains about static functions in a header.

Hopefully someone in the future will do something about this smelliness.
2017-11-02 17:06:16 -05:00
Gregory A Lundberg
052afd4ce8 Fix missing 'static'
Actual warning was missing declaration. All other functions being exposed to Lua, here, are static so make this one  static also.
2017-11-02 17:06:16 -05:00
Gregory A Lundberg
b42ca757da Fix useless cast 2017-11-02 17:06:16 -05:00
Alexander van Gessel
ee5a6e03f4 Check pointer before derefencing (fixes #2161)
current_track may be uninialized when this function is called at load-time
2017-11-02 21:52:25 +01:00
Charles Dang
ba3c6ec3da Fixed floating label context dtors sometimes getting stuck in an infinite loop
This fixes #2154. For some reason, after opening help from the File menu and then quitting to desktop,
the number of labels recorded in the label map and context set weren't equal. I'm not exactly sure
why, since the code seems to indicate they should be, and the loop doesn't seem to be hit when only
invoking help with the hotkey (F1).

This just removes the predication of a label being present in the label map for removal from the context
set. I also removed two useless, unused variables that I'm surprised no one's complained about.
2017-11-03 07:48:49 +11:00
Jyrki Vesterinen
a82eb4452f Fix tooltips still being drawn over
Simply use the list of event dispatchers like the old code did.
2017-11-02 19:34:14 +02:00
sigurdfdragon
54d7f6154c Update changelogs 2017-11-01 22:17:39 -04:00
Jyrki Vesterinen
e5fb29dba6 Redraw windows on top when any window changes
This commit restores redraws of entire windows, but only if a window below
has actually changed. It should fix most regressions from commit c6d8692ac6
with a much smaller CPU usage cost.

The commit also includes a check for the situation where the title screen
changes all the time, which would restore the high CPU usage (that the
developer would be unlikely to notice immediately).
2017-11-01 21:15:26 +02:00
Jyrki Vesterinen
61bbd51f3a Revert "Quell CID 1380157"
This reverts commit 37ac4414b9.
2017-11-01 18:17:41 +02:00
Jyrki Vesterinen
911411a1a8 Revert "add an assert to detect possible division by zero"
This reverts commit 968d8a900d.
2017-11-01 18:17:19 +02:00
Jyrki Vesterinen
9c18a44f52 Revert "Quell divide-by-zero warning"
This reverts commit 07b04775ff.

This code is performance-critical: adding a branch for every pixel in
the surface isn't a good idea. @GregoryLundberg was fine with reverting
the commit, as well. The same is true for the next two reverts.

Fixing Coverity Scan warnings is good and all, but we shouldn't
sacrifice performance for it.
2017-11-01 18:13:56 +02:00
Gregory A Lundberg
631acb2bb8 One more time Coverity
When you fix the complaint about implicitly converting a long long to a double you get a complaint about implicity discarding the remainder from an integer division.

Mumble. Grumble. Glare at Coverity.

Closes CID 1382228
2017-11-01 10:15:18 -05:00
Elvish_Hunter
df4e424db0 moved a have_icon flag that caused wmlscope to not find attack icons any more 2017-11-01 13:46:31 +01:00
Elvish_Hunter
fca4795f30 wmlscope: fixed a bug that caused UMC map paths to not be found
Due to the new regex used, the tilde before UMC paths was now collected but never removed from the paths.
2017-11-01 13:46:31 +01:00
loonycyborg
6163285ae0 Made ogg vorbis support check use dummy SDL audio driver 2017-11-01 19:54:17 +11:00
Gregory A Lundberg
c4d78f8fc6 Fix Scons for SDL2_mixer 2.0.2
With the change from SDL_mixer 2.0.1 to 2.0.2, we cannot simply check if SDL_mixer can open an OGG/Vorbis file, we must first open an audio device. [This is probably a mistake, since the documentation implies simply initializing the codec should be enough.] To avoid future problems, upgrade the feature-test program to perform a full initialization and shut-down; everything except actually playing the sound.

Closes #2137
2017-11-01 19:54:17 +11:00
lundberg
81809a9dd7 Quell variable hides variable warning from VC15 2017-10-31 23:49:41 -05:00
Severin Glöckner
725815afa2 add an "optional objective" caption
In case of tsg7a neither alternative nor bonus objective fits

[ci skip]
2017-11-01 12:45:21 +11:00