74768 Commits

Author SHA1 Message Date
Gunter Labes
40a343268a
Check if isutf8 is installed and exit 0 if not
We don't want to exit with failure if the tool is not installed.
Simplified exclusion of certain file extensions.
2019-07-29 20:54:08 +02:00
Praveen Batra
a3a57cbff6 EI S15: Fix typo 2019-07-29 17:41:57 +11:00
Steve Cotton
ea25735501 Remove code from replay_controller that's already handled by the hotkey system
Fixes a crash when playing a replay that includes a theme, when that theme doesn't
have all of the buttons that the removed code expected. For example, this replay
from SXRPG 5.2.3 has two replay themes, of which one lacks button-nextmove:
* https://replays.wesnoth.org/1.14/20190701/SXRPG_TempleOfBones_Turn_8_(53897).bz2

All of the button::enable() calls were unnecessary logic, because the hotkey
system will query replay_controller::can_execute_command() and enable or
disable the buttons to match. However, the enable() calls appear to have had
the side-effect of triggering the hotkey system to check the buttons' required
states and redraw.

The code in build_replay_theme() was unreachable, because replay_controller
doesn't attach itself to the completely_redrawn event.
2019-07-28 18:38:18 +02:00
Nils Kneuper
9b998568b0 updated Portuguese (Brazil) translation 2019-07-27 17:27:41 +02:00
Pentarctagon
b8acbfe8d0 Put --add-cap right after docker run. 2019-07-25 19:18:47 -05:00
Pentarctagon
1165ce0d39 Docker doesn't like --cap-add for some reason. 2019-07-25 18:33:35 -05:00
Pentarctagon
b0200d1380 Attempt to fix gdb error when attempting to disable aslr 2019-07-25 18:27:19 -05:00
Gunter Labes
4607205f53
Remove typedef unused since 567dba1 2019-07-25 19:53:24 +02:00
Pentarctagon
e47fc68ef0 OpenMP isn't supported anymore, so don't set OMP_WAIT_POLICY in cwesnoth.cmd. 2019-07-24 19:53:41 -05:00
Charles Dang
edaeca2ab6 Removed OpenMP code (closes #4130)
We already concluded a long time ago the introduction of OMP was quite ineffective at speeding up
performance

Most of this code was removed previously. This just gets rid of a few remnants that snuck back in
when we rolled back the master branch.
2019-07-25 11:39:33 +11:00
Gunter Labes
90c7335228
Properly log advancing to the next scenario
Restores part of commit 2932d30.
2019-07-24 13:35:38 +02:00
Nils Kneuper
f0f1aab935 updated Portuguese (Brazil) translation 2019-07-23 21:12:39 +02:00
gfgtdf
4741b0037b fix unit_type_fix on variations
previously it would not apply the changes to the variations,in particular the genders
2019-07-23 19:31:34 +02:00
gfgtdf
1fafa76962 remove unused argument 2019-07-23 19:31:34 +02:00
Charles Dang
ba025668a6 Deal with warnings about reinterpret_cast sizes on the 64 bit build 2019-07-23 12:30:02 +11:00
Charles Dang
0e173a451d Removed set_pixel_format
This is rather redundant. It's only called once when the CVideo subsystem is initialized and
nowhere else, and we already use the ARGB8888 format for all surfaces (which is what my testing
has revealed the SDL framebuffer surface's format is).
2019-07-23 12:30:01 +11:00
Steve Cotton
a4893a8990 Fix units fading in or out affecting other units of the same type 2019-07-23 09:54:33 +11:00
Steve Cotton
358f564301 Add unit tests for movement and vision costs
Includes changing the terrain costs, and aliased terrains.

Can be cleanly cherry-picked to 1.14.
2019-07-22 17:18:20 +02:00
Charles Dang
e62982325a We use noexcept directly on this branch 2019-07-22 23:27:11 +11:00
Charles Dang
8fcbbcee9f Fixed some circuitous logic
By using a surface object here I ran the rick of a logic loop. The ctor would try to refor the surface using
the neutral pixel format while trying to set up the neutral pixel format.
2019-07-22 21:19:08 +11:00
Charles Dang
ee35f6ac9a Cleaned up various surface-related backend things
* Removed create_neutral_surface in favor of a surface ctor that takes w/h dimensions.

* Removed make_neutral_surface in favor of a surface::make_neutral function. Most usecases of this were
  to make a copy of a surface anyway, so I added a new surface::clone function

* Moved the pixel format validation and conversion to the surface class. Now *all* surfaces should be
  guaranteed to be in the 'neutral' format. Any new surface that is created (with clone() or the dimension
  ctor will be in that format, and any time a raw SDL_Surface* ptr is assigned, it is also converted. This
  applies both to the ctor and assignment operators.

* Removed create_compatible_surface. All surfaces should be compatible in the first place.

* Removed surface::assign was in favor of simple assignment operators. The existing assignment operators
  already just called assign().

* Removed surface::null in favor of the implicit SDL_Surface* conversion operator for consistency. We were
  already using null and implicit pointer bool conversion, so I decided to go with the latter. I was going
  to add an operator bool(), but it was ambiguous in surface-to-surface comparisons.
2019-07-22 15:39:00 +11:00
Charles Dang
2470984af3 Prepend 'SDL2/' to all SDL includes
This was needed to get the build working with vcpkg's version of SDL, where all the SDL files are
in their own SDL folder. However, our cmake config also has a note saying it was a deliberate choice
to move our SDL files *out* of their SDL2 folder due to certain distros (FreeBSD is mentioned) not
putting the files in said folder in the first place.
2019-07-22 15:35:55 +11:00
josteph
7ebc663723 changelog: Add #3330 as requested in #3514 2019-07-21 00:43:02 +00:00
nemaara
3818582149 TSG: fix storytext typo 2019-07-20 15:57:57 -04:00
loonycyborg
4ed39d7ee7 pot-update and regenerate doc files
as requested in issue #4173
2019-07-18 16:10:13 +03:00
Pentarctagon
95286cb49f Command line --preprocess missing some macros.
Command line --preprocess doesn't process macros in data/core/units.cfg.

Fixes #4152.
2019-07-16 19:15:29 -05:00
Nils Kneuper
ae2d89b132 updated Portuguese (Brazil) translation 2019-07-16 22:23:23 +02:00
loonycyborg
f8a18ac759 Merge pull request #4169 2019-07-16 17:02:14 +03:00
loonycyborg
b72181c0e6 Merge branch 'help_ref_count_master' of https://github.com/stevecotton/wesnoth into stevecotton-help_ref_count_master 2019-07-16 16:47:23 +03:00
loonycyborg
05d109215d Fix -Wdeprecated-copy compiler warnings with gcc 9 2019-07-16 13:11:05 +03:00
Steve Cotton
eabf933c8e Fix Wdeprecated-copy in wfl::variant, and add move operations
Fixes the majority of the warnings in issue #4166.

This class already shared copies of value_ between instances,
it seems to be the immutable design pattern so can share from
const to non-const instances safely.

Cherry-picking this to 1.14 needs a trivial conflict to be
resolved, the next line in the .cpp file has changed from
size_t in 1.14 to std::size_t in 1.15.
2019-07-16 09:53:47 +11:00
Nils Kneuper
1fac6ac1a6 updated Portuguese (Brazil) translation 2019-07-15 23:23:59 +02:00
Nils Kneuper
c0ca4156d7 updated Portuguese (Brazil) translation 2019-07-15 20:54:48 +02:00
Steve Cotton
66f0924c8b SoF S2: Dialogue fixes (no dwarves outside, repeated comment about side entrances)
If all the dwarves are inside when the gate closes, don't say there were some lost outside.

Make the dialogue about the north and south side entrances only trigger once.
2019-07-15 20:51:07 +02:00
Steve Cotton
469fcc9c52 Convert help_impl's ref-counting to std::shared_ptr
This is part of #4166, as topic_text wasn't consistent with
the Rule of Three.
2019-07-15 16:51:12 +02:00
nemaara
5ef720e9dd Add DiD update to changelog 2019-07-14 23:05:53 -04:00
nemaara
ab4f8aa4f4 DiD S4: reduce difficulty on easier modes 2019-07-14 23:05:52 -04:00
Charles Dang
c10cdd3322 Removed redundant std::ref causing problems with Boost 1.70 (fixes #3990)
The asio socket ctor already takes a reference.
2019-07-15 04:05:12 +11:00
Steve Cotton
bd130fc8e3 Tutorial S2: Warn about orcs crossing the river when they cross
Closes issue 2a of #1584

Previously the warning was always given on turn 7. It will still trigger even
if the player has units ready to defend that crossing, because I think it's
better to show the message and let the player think "I'm already ready" than to
have it pop up once some fighting has already happened; and it seems easier to
test this logic than to test logic for not showing the message if the crossing
is currently guarded.

Also add a first_time_only=no to the check_income event, so that it can trigger
on turn 7 if it doesn't trigger on turn 6.
2019-07-14 17:00:30 +02:00
Nils Kneuper
ead1e7a393 updated Portuguese (Brazil) translation 2019-07-14 09:17:47 +02:00
Nils Kneuper
390463b481 updated Spanish translation 2019-07-14 09:16:01 +02:00
Pentarctagon
0bd3682b66 Fixes incorrect handling of Xue transitions.
The transitions from the Xue terrain to the Xoc / Xos / Xoi / Xom terrains were displayed incorrectly.

Fixes #4154.
2019-07-13 05:14:44 +11:00
Charles Dang
36f4e80113 Fixup 2019-07-12 18:16:43 +11:00
Charles Dang
452fdbead7 Label Settings: code cleanup 2019-07-12 17:25:04 +11:00
Charles Dang
9ef67052d6 Dropped redundant and/or unused team color getters 2019-07-12 17:23:02 +11:00
Charles Dang
a4622c7a40 Throw exception as per request 2019-07-11 21:20:06 +11:00
Charles Dang
0949ecfb43 Used get_value_bool() 2019-07-11 17:51:19 +11:00
Charles Dang
f60edbf6e0 Bad const_cast. Shoo. 2019-07-11 17:51:18 +11:00
Pentarctagon
4a5db39cd5 Update doc comment. 2019-07-10 19:00:24 -05:00
mattsc
e148d25d2a ExpAI grab villages CA: fix enemy distance rating under fog
ai_helper.get_closest_enemy() returns math.huge for the enemy distance if no enemy is visible to the AI. This fixes #4157.
2019-07-10 08:07:11 -07:00