80829 Commits

Author SHA1 Message Date
newfrenchy83
df05b5061a update codeblock projectfiles 2022-07-04 13:13:43 -05:00
Pentarctagon
628d388a6a
More explicitly specify the cmake version to use. 2022-07-04 00:39:43 -05:00
newfrenchy83
159d5286bd
fix compilation issue in src/test/main.cpp (#6835)
Fixes this error with gcc called via codeblocks:

src\tests\main.cpp:78 error: no matching function for call to 'std::basic_ofstream<char>::open(const value_type*)'
note: candidate: 'void std::basic_ofstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode)
    [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]'
note: no known conversion for argument 1 from 'const value_type*' {aka 'const wchar_t*'} to 'const char*'
2022-07-03 20:09:56 +02:00
mattsc
6ed684af73 move-to-any-enemy CA: stop eval if no enemies
Otherwise there is an error caused by one of the sort functions later in the code.
2022-07-03 06:48:47 -07:00
Tommy
635bdd8c3e sdl/rect: Add contains(rect) overload to check for contained subrect 2022-07-03 19:59:07 +12:00
Luis Miguel Iglesias Sánchez
65515848ef
Fixed replay OOS by moving victory event to synced event (#6676) 2022-07-03 01:02:36 -05:00
Tommy
166d489475 draw: Use updated debug color_t representation 2022-07-03 12:31:10 +12:00
Tommy
ef692c0f98 Tweak debug representations of color_t, point and SDL_Rect
color_t is now represented as a hex colour code #rrggbb or #rrggbbaa
point is now bracketed (X,Y)
SDL_Rect now has a compact representation [X,Y|W,H]
2022-07-03 12:31:10 +12:00
Descacharrado
21e22fad97 Fixed Warden’s and Arbiter’s animations popping on water tiles 2022-07-02 16:39:18 -05:00
Pentarctagon
3a796974c3 Skip vcpkg setup if the cache exists already. 2022-07-02 16:11:05 -05:00
Pentarctagon
a573e58007
Windows paths can use either separator. 2022-07-02 13:42:15 -05:00
Celtic Minstrel
e613010b4b Lua: Document wesnoth.units.teleport and wesnoth.units.create_weapon 2022-07-02 11:22:28 -04:00
Pentarctagon
43bc4c1611 Add PLAIN_LOG logging macro.
This logs the provided text always, and without adding the log domain or timestamp. This is meant to be a replacement for std::cerr/std::cout, but that also goes through the normal logging logic as well.
2022-07-02 09:44:21 -05:00
Celtic Minstrel
33749361a9 Xcode: Skip changing default log level in the unit tests
For some reason, it fails due to what appears to be an RTTI issue. Since it's non-crucial code, just skip it.
2022-07-02 09:55:14 -04:00
Celtic Minstrel
984309b100 Don't give a deprecation warning about --userdata-dir when using the backup preferences directory 2022-07-02 09:55:14 -04:00
Celtic Minstrel
e39f91682a Xcode: Remove the DYLD environment variables from the unit test scheme
It runs without them so there's no point in them being there.
2022-07-02 09:55:14 -04:00
Celtic Minstrel
b22f57ea08 Xcode: Sadly the internal output console doesn't support colour 2022-07-02 09:55:10 -04:00
Nils Kneuper
492ae4b218 updated Arabic translation 2022-07-02 12:19:15 +02:00
Tommy
30cd5afd55 Fix doxygen errors 2022-07-02 17:12:01 +12:00
Tommy
23baabf6d5 Fix unit tint when submerged, and fix unit shadow when tinted 2022-07-02 17:12:01 +12:00
Tommy
09186f841c Implement unit and animation frame tinting in hardware.
I tried to match the effect from 1.16. It seems mostly okay.
2022-07-02 17:12:01 +12:00
Tommy
046f1c932a Hardware acceleration for unit highlight effect
Uses some tricks to increase brightness by blitting twice.
2022-07-02 17:12:00 +12:00
Tommy
0fbc12ea01 Remove largely incorrect usage of floating_to_fixed_point()
Added new functions float_to_color() and color_multiply() for dealing
with uint8_t colour values directly, with an assumed mapping from
0-255 to 0.0-1.0 and back.
2022-07-02 17:12:00 +12:00
Pentarctagon
1bc108e9ac
A table looks nicer. 2022-07-01 23:24:07 -05:00
Pentarctagon
e8d6c6eee5
Link to the specific branches. 2022-07-01 23:19:56 -05:00
Pentarctagon
9b52148e77
Add newlines. 2022-07-01 23:17:15 -05:00
Pentarctagon
72934e82e1
Add badges for the CI. 2022-07-01 23:14:06 -05:00
Celtic Minstrel
8ed261053d blah 2022-07-01 23:18:58 -04:00
Celtic Minstrel
d3124af4a5 Xcode: Add additional command line parameters in the unit tests to match those passed in the CI 2022-07-01 23:08:38 -04:00
Celtic Minstrel
c2593ff79c Xcode: Set correct working directory for unit tests 2022-07-01 22:36:49 -04:00
mattsc
90f1c01f41 AI: improve efficiency of move-to-any-enemy CA
The new method avoids a lot of path finding that the previous method did, esp. on large maps with many units and/or enemies, leading to significant speed improvements in some cases.

This fixes #6504
2022-07-01 18:56:00 -07:00
Celtic Minstrel
8ba57c4290 Allow specifying where the unit test output file is
The default location probably makes sense on Linux or Windows, but it is nonsensical on Mac and breaks the game's build when the tests are run.
2022-07-01 21:50:11 -04:00
Celtic Minstrel
a0c2997fac Add an event context to the unit tests to avoid a crash 2022-07-01 21:32:28 -04:00
mattsc
7b90c154cb
Merge pull request #6821 from mattsc/unit_test_warnings
Boost unit tests: fix Xcode warnings
2022-07-01 18:00:56 -07:00
Tommy
6aacb796ac Remove sdl::create_rect in favour of just creating a rect 2022-07-02 12:30:58 +12:00
Tommy
96703ca242 Replace sdl::intersect_rects with new rect::intersect and rect::clip
rect::intersect returns the constructed intersection, whereas
rect::clip modifies the rectangle.
2022-07-02 12:30:58 +12:00
Tommy
d4a152a307 Replace sdl::union_rects with new rect::minimal_cover
It isn't currently used anywhere.
2022-07-02 12:30:58 +12:00
Tommy
0481a63f56 Replace sdl::rects_overlap with new rect::overlaps 2022-07-02 12:30:58 +12:00
Tommy
103dfc031c Replace sdl::point_in_location with new rect::contains 2022-07-02 12:30:58 +12:00
Tommy
f0e4d3673f sdl/rect: Add scalar multiplication and division operators
Mostly useful for simplifying pixel scale conversions.
2022-07-02 12:30:58 +12:00
Tommy
9181ae2cc4 Add a new "rect" struct, wrapping SDL_Rect.
Currently it's only used to simplify construction and for a better
null rect check, but it will soon be expanded to do a little more.
2022-07-02 12:30:58 +12:00
mattsc
5aee9edb65
Merge pull request #6818 from mattsc/sound_path
Do not show user name in output
2022-07-01 16:17:57 -07:00
mattsc
7f14cc57ee Fix seg fault when weapon is removed during attack
Events during attacks may modify either of the units involved. If, as a result, one of the units does not have a weapon of the type used any more, this previously caused a segmentation fault in unit_attack() in udisplay.cpp. The solution is to set the remaining number of strikes for the unit to zero. This prevents that unit from striking again, but lets the opponent continue its attack.

Fixes #4927 and #5914
2022-07-01 15:50:50 -07:00
mattsc
221bae4e2d
Merge pull request #6817 from mattsc/unit_debug_error
Add no-unit error message for unit debug command
2022-07-01 15:41:27 -07:00
mattsc
1f9f7a076c Boost unit tests: fix Xcode warnings 2022-07-01 15:30:28 -07:00
mattsc
ea749d5cef Apply sanitize_path to output not using the logger 2022-07-01 14:19:23 -07:00
mattsc
4c0c21c98d Logger: do not show user name in paths
This fixes #3777
2022-07-01 14:17:15 -07:00
Celtic Minstrel
8cb19eafbf Xcode: Add a sample command-line argument to the unit test scheme 2022-07-01 15:54:17 -04:00
Celtic Minstrel
3d20ea27d2 Xcode: Copy additional libraries so the unit tests can run 2022-07-01 15:42:21 -04:00
Celtic Minstrel
eddd762615 Xcode: Add additional rpath entries to wesnothd
This should allow it to run in different configurations:
- When clicking "run" in Xcode, it's adjacent to the Wesnoth applicaiton
- If you wanted a standalone install of wesnothd you'd now only need to copy over the Frameworks directory.

All of this assumes that wesnothd will run at all, which works with a debug build but probably not in the actual release.
2022-07-01 15:39:26 -04:00