80757 Commits

Author SHA1 Message Date
Tommy
bc63f4f00c color_t: Inherit from SDL_Color 2022-07-01 17:11:16 +12:00
Tommy
4489f358f8 sdl/point: Inherit from SDL_Point 2022-07-01 17:11:16 +12:00
Astrid Halberkamp
4878c3565e
Add the Skeleton Rider line and Death Squire to core (#6088) 2022-06-30 23:34:17 -04:00
Tommy
613f047c1e Remove hex_brightening config option
It is not used, and appears to have been unused for a long time.
It was related to mouseover hex brightening, but the brightening
amount is hardcoded. There were associated hex_semi_brightening,
mouseover_image and selected_image keys, but that info is also
hardcoded, and those keys appear to have been removed already.
2022-07-01 15:06:25 +12:00
Tommy
e44129fb91 Address some slightly less straightforward TODOs 2022-07-01 15:06:25 +12:00
Tommy
827ae6568a Remove some done and trivial todos. 2022-07-01 15:06:25 +12:00
Tommy
c6c3480605 draw: Empty src and dst rects can be passed to several drawing functions
They behave as if the parameter was not given.
2022-06-30 23:02:51 +12:00
Pentarctagon
44d41ff93f Manual forward-port of #4244.
This seems to have been applied to 1.14, but not 1.15/master at the time.

-

Revert network_transmission.cpp/hpp to its 1.14.7 version

I re-ran the timing test discussed in PR wesnoth#4201 (comment linked to below), and
saw similar numbers.  The old, simpler code downloads an 86.1MB addon in 25
seconds, the code with the extra thread takes 29 seconds.

https://github.com/wesnoth/wesnoth/pull/4201#issuecomment-517856090
2022-06-29 20:48:38 -05:00
Celtic Minstrel
9ade435cd4
Remove WC's custom Pick Your Advancements mod (#6807) 2022-06-29 19:29:04 -04:00
newfrenchy83
a077235e8d update codeblock projectfiles 2022-06-29 13:35:49 +02:00
Pentarctagon
1244639dc7
Fix whitespace. 2022-06-28 23:34:27 -05:00
Celtic Minstrel
a089c6e5ea Deprecate {AI_CA_POISONING}
This was already effectively deprecated by proxy due to the overall deprecation of FormulaAI.
So this just adds a message.
2022-06-28 23:07:50 -04:00
Tommy
9b9d30bd7f GUI2: Move alternate create_rect() implementation to sdl/rect.hpp
gui/widgets/helper.*pp had an implementation creating a rectangle
from points. It was added to sdl/rect.hpp.
2022-06-29 13:13:15 +12:00
Tommy
132a45c52f sdl/rect: Move fill_surface_rect to sdl/utils.hpp
And then have to clean up over a dozen files that were relying on
sdl/rect.hpp including sdl/utils.hpp and various other side effects.
2022-06-29 13:13:15 +12:00
Tommy
c2e23b64f6 sdl/utils: Remove several unused functions
sdl_copy_portion (only used one place internally, so inlined there)
stretch_surface_horizontal (obsoleted by hardware rendering)
stretch_surface_vertical (obsoleted by hardware rendering)
tile_surface (obsoleted by hardware rendering)
surface_submerge_alpha (now done via IPF)
blit_surface (not used anywhere, so sdl_blit must be fine)
2022-06-29 13:13:15 +12:00
Tommy
614d405663 sdl: Finish moving functions out of render_utils.hpp
Functions have moved to draw.hpp and sdl/texture.hpp as appropriate.
Most of these had already moved. set_texture_blend_mode() was the last
uncategorized function. It is now in texture.hpp.
2022-06-29 13:13:15 +12:00
Tommy
6661d4423b sdl/texture: add getters/setters for alpha mod, color mod, blend mode. 2022-06-29 13:13:15 +12:00
mattsc
38978feadd Schema: allow key values to be variables 2022-06-28 09:47:11 -05:00
mattsc
1eca762270 Schema: add missing newline character to message 2022-06-28 09:47:11 -05:00
mattsc
6fcca95be0 Schema: Add missing path key to [textdomain] 2022-06-28 09:47:11 -05:00
mattsc
07d8a55d17
Merge pull request #6802 from mattsc/mai_parms_tests
Add Micro AI parameter checking
2022-06-28 06:21:31 -07:00
Charles Dang
7f1bc41162 GUI2/Canvas: removed unused image_shape members 2022-06-28 20:14:47 +12:00
Charles Dang
a6ae7c8f3b Minimap: fixed negative-to-unsigned map size calculation 2022-06-28 20:14:47 +12:00
Charles Dang
a79ea921f5 GUI2: removed unused offset parameters from drawing functions
These were added in 8f945cf235faa4c5cbfe955f3ddf42b6a48d5d4d, but since the "new" listbox
implementation never came to be, these have just been unused clutter. There was one place
they were used as parameters in a manual call to calculate_blitting_rectangle, but that was
refactored out in db1717721ed4c8a8e8e7315fed740787704e695f.

This also removes an overload of widget::draw_debug_border, since without the offsets, both
functions now did the same thing.

This affects:
* widget::draw_background
* widget::draw_children
* widget::draw_foreground
* widget::impl_draw_background (offset overload removed)
* widget::impl_draw_children
* widget::impl_draw_foreground
* widget::calculate_blitting_rectangle
* widget::calculate_clipping_rectangle
* widget::draw_debug_border
2022-06-28 20:14:47 +12:00
Charles Dang
14dbe3143d GUI2/Minimap: make use of render_minimap, throw out weird cache
I didn't take too close a look at what that weird cache was doing, but I recall last time
I did this concluding it didn't do much of anything at all.
2022-06-28 20:14:47 +12:00
Charles Dang
9222a11f61 Minimap: port the render_minimap implementation 2022-06-28 20:14:47 +12:00
Tommy
8efd9d43f2 GUI2: Port over most of the canvas cleanup
Text is still drawing clipped because otherwise Credits crashes. It has
bugs because the viewport is too large, but at least it doesn't crash.
2022-06-28 20:14:47 +12:00
Tommy
0f6da374e0 draw: Overhaul clip rectangle handling
Viewports now manage the clipping rectangle when set and unset,
converting it to the viewport coordinate space. Some improvements
were also made to handling when clipping is disabled.
2022-06-28 20:14:47 +12:00
Tahsin Jahin Khalid
1ef94ce7e3 units/javelineer: add missing special notes 2022-06-27 23:34:08 -05:00
Tahsin Jahin Khalid
b541b4cb23
world conquest: fix bezoar artifact being bugged (#6515) 2022-06-27 23:33:55 -05:00
Celtic Minstrel
a7755749e3 WC: Fix a typo 2022-06-27 23:46:09 -04:00
mattsc
cc53020aa6 Do not duplicate [ai] tag when defined inside [side]
Previously it was added for both the side and the side leader, now it is added only for the side.
2022-06-27 20:21:28 -07:00
mattsc
0092c141d2 Micro AIs: fix image paths 2022-06-27 20:21:28 -07:00
mattsc
2f3f70a709 Micro AIs: add warning messages if invalid parameters are used 2022-06-27 20:21:21 -07:00
mattsc
21475ced4f Micro AIs: add error messages if parameters are of wrong type
Fixes #6408.
2022-06-27 20:20:06 -07:00
larry_the_cow
8d91bc69a2 [harm_unit] fix secondary_attack animation 2022-06-27 23:17:31 -04:00
Tommy
2d7e0a074d Merge PR #5163 (halo animation freezing fix) 2022-06-28 14:32:39 +12:00
Tommy
12c4e5d7d6 image::flush_cache(): fix typo in code, and small tidy. 2022-06-27 16:05:47 +12:00
Pentarctagon
e61fc20c05
Add missing newline. 2022-06-26 18:23:54 -05:00
Tommy
76422acb79 sdl: Add a cheap runtime SDL version check.
A few places were updated to use this check, including one that turned
out to be incorrectly making runtime decisions at compile time.
2022-06-26 21:22:36 +12:00
Tommy
382692c630 draw: Draw rectangles as lines for some SDL versions.
Some versions of SDL aren't very good at drawing rectangles, on some
systems.

Aimed at fixing #6799.
2022-06-26 21:22:36 +12:00
Nils Kneuper
9301e93c26 updated Finnish translation 2022-06-25 12:00:31 +02:00
Nils Kneuper
6b1722ae3b updated British English translation 2022-06-25 11:57:50 +02:00
Nils Kneuper
df93183a21 updated Arabic translation 2022-06-25 11:55:49 +02:00
Tommy
738392069d Fix a whole bunch of bad indentation.
Mostly spaces where tabs should have been used.
2022-06-25 15:24:03 +12:00
Tommy
a0daa2ddce Remove old code to hide VSync in prefs for old SDL versions.
It was for the software renderer, and is no longer relevant as hardware
rendering has been enabled exclusively.
2022-06-25 13:54:26 +12:00
Tommy
bef4ceba4f
Merge pull request #6795 from mesilliac/image_cache_skip
Add options to skip adding images to the surface and texture caches
2022-06-25 13:32:33 +12:00
mattsc
a70ecf1ff5
Merge pull request #6783 from mattsc/expai_updates
Some fixes to the Experimental AI
2022-06-24 16:37:59 -07:00
mattsc
6796ac3d56
Merge pull request #6792 from mattsc/retreat_allied_villages
Fix retreat injured CA taking allied villages
2022-06-24 16:31:15 -07:00
mattsc
b55148ce91 Retreat injured CA: fix for regenerate ability without value key
The ability does not need to contain a value key if it only heals poison.
2022-06-24 16:03:51 -07:00