80551 Commits

Author SHA1 Message Date
Luis Miguel Iglesias Sánchez
7e87826303
UtBS S05 Enforce encounter with the Cloaked Figure (#6644)
* Enforce encounter with the Cloaked Figure

* Revert "Avoid counting encounters with 'Cloaked Figure'."

This reverts commit ada454b20a652136a2f6f29003a8d1137eead9c9.
2022-05-09 10:32:14 +10:00
Nils Kneuper
3d5cef29fd updated Italian translation 2022-05-08 10:49:28 +02:00
Nils Kneuper
877d02f680 updated Italian translation 2022-05-08 10:49:00 +02:00
Tommy
603006f0ed Minor code clarification.
Clarifies usage of a non-intuitive SDL error code in CVideo::fill.
2022-05-08 16:24:34 +12:00
Pentarctagon
f5dfdd71b0
Remove CI caching - hasn't worked for a while. 2022-05-07 22:46:05 -05:00
Celtic Minstrel
e681ef3a32 Update Xcode project 2022-05-07 21:47:05 -04:00
Tommy
36ece6b478 Clean up high-dpi todos and comments. 2022-05-08 12:24:41 +12:00
Tommy
98b2f507df Remove vsync compatibility check.
If you are forcing hardware rendering, this check is unnecessary.
2022-05-08 11:55:24 +12:00
Tommy
00bf4a258e CVideo: Clean up error handling. 2022-05-08 11:34:44 +12:00
Tommy
0bb74bdb32 Remove all remaining direct usage of the drawing surface.
It can now be phased out.

Everything should now be fixed and working except map screenshots.
2022-05-08 11:34:39 +12:00
Tommy
5cf876a2a6 CVideo: Ensure correct transfer of alpha when blitting surfaces. 2022-05-08 11:26:27 +12:00
Tommy
29c862b088 Fix blur. 2022-05-08 11:25:59 +12:00
Tommy
19f3037731 Use new CVideo clipping interface. 2022-05-08 11:23:22 +12:00
Tommy
11c78c9519 CVideo: Add a helper for setting the clip area.
This will correctly work for both the old surface blit calls,
and the new texture blit calls.
2022-05-08 11:23:16 +12:00
Tommy
cba8b9d8aa CVideo: Fix read_pixels behaviour in a certain edge case.
That being when the logical viewport is slightly offset on the
underlying render target. SDL doesn't give a way of determining this
offset, but it's straightforward to calculate.
2022-05-08 11:23:03 +12:00
Tommy
01cf583fa9 Fix halo background rendering. 2022-05-08 11:22:55 +12:00
Tommy
1ac5b42e35 video: Ensure render viewport is an integer multiple of logical size.
This fixes most problems with floating labels and background redraws.
2022-05-08 11:21:41 +12:00
Tommy
c627c96fa9 sdl/surface: use low-res pixel retrieval for surface_restorer. 2022-05-08 11:21:33 +12:00
Tommy
3089477a93 Add a low-res pixel retrieval function and use it for reports. 2022-05-08 11:21:24 +12:00
Tommy
12260a731d Buggy but forward-compatible halo rendering. 2022-05-08 11:21:14 +12:00
Tommy
27758e4b24 gui/canvas: Reenable blur.
This is now done in a way compatible with hardware rendering,
but is not yet behaving correctly.
2022-05-08 11:21:07 +12:00
Tommy
f85f1dafdb gui/window: cache restorer as a texture and from the render target. 2022-05-08 11:20:49 +12:00
Tommy
3a3342f5ee sdl/texture: Allow creating an empty texture from am empty surface. 2022-05-08 11:20:39 +12:00
Tommy
c0ea33e3ac Reenable floating labels.
Label background restoration is still a little broken,
but that is slated for removal anyway.
2022-05-08 11:20:29 +12:00
Tommy
2d221203db sdl/texture: Add wrapper for setting an alpha modifier. 2022-05-08 11:20:17 +12:00
Tommy
d45440f2ae Read title_screen screenshots from the high-res render target. 2022-05-08 11:20:03 +12:00
Tommy
5877371d70 CVideo: add functions to read pixels back from the render target. 2022-05-08 11:19:47 +12:00
Tommy
fca99c9f6f CVideo: mark location arguments of blit_texture as const. 2022-05-08 11:19:41 +12:00
Tommy
eb60753664 Overhaul drawing to use CVideo API in stead of blitting to a surface.
Draws now immediately apply to the render target, in stead of
accumulating on the drawing surface. This means textures can start
to be used for drawing in stead of surfaces, and both systems
should be able to be used interchangably for now.

Some things have been broken, including but probably not limited to:
  * background blur
  * the occasional direct SDL_FillRect call
  * floating labels
  * map screenshots

Some things will be broken if textures are used for drawing:
  * widget restore images
  * other screenshots
  * clipping areas

However, this is the first step towards proper high-dpi hardware-
accelerated rendering.
2022-05-08 11:17:42 +12:00
Tommy
581c6e6a93 video: Add functions for immediate rendering of surfaces and textures. 2022-05-08 11:08:57 +12:00
Steve Cotton
24f7d0d329 Fix a typo in the editor-help
po: in wesnoth-help's `<header>text='The files: .map and .cfg' ...`,
the change is just a spelling correction of "scenaro" to "scenario".

(cherry picked from commit b8a37cb8ca0596a74298e72bdca28a9fdf84f667)
2022-05-07 20:18:51 +02:00
Charles Dang
a47ae39da3 Cleaned up a bunch of display pointers in the unit animation code 2022-05-07 12:17:35 -04:00
Nils Kneuper
4467a8d52d updated French translation 2022-05-07 10:39:57 +02:00
Pentarctagon
52ad51ab25
Looks like on 1.14 the afterlife bot doesn't always populate client source and version. 2022-05-06 16:41:14 -05:00
Pentarctagon
c9523e809c
Query fixup. 2022-05-06 16:28:40 -05:00
Charles Dang
8a960fca68 MP/Create: added button to reset timer settings, ensure they're saved (resolves #1556) 2022-05-06 16:10:45 -04:00
Elvish_Hunter
62ef86e2bd wmllint: updated mainline campaigns tuple 2022-05-06 20:53:22 +02:00
Eric Gallager
3344241e6a Update woptipng.py
add encoding comment
see: https://peps.python.org/pep-0263/
2022-05-06 19:10:58 +02:00
Charles Dang
840799eef4 GUI2/Language Selection: double borders 2022-05-06 02:45:40 -04:00
Charles Dang
e950b5f2ac GUI2/Uninstall Addons: double borders 2022-05-06 02:02:06 -04:00
Charles Dang
cdfadff142 Enable accelerated rendering! 2022-05-06 00:09:33 -04:00
Charles Dang
2722493f80 GUI2/Window: removed window_swap_grid helper
This was only used in one place (fianlize()), and it's first argument was always null.
2022-05-06 00:09:06 -04:00
Charles Dang
64b7624ea2 GUI2/Preferences: doubled borders in advanced prefs 2022-05-05 23:38:30 -04:00
Charles Dang
a5e9b4ecc6
GUI2: made widget initialization process more secure against memory leaks (#6681)
This commit is the followup to a similar one I did regarding window initialization. Instead
of widgets being created on the heap and not being managed by a smart pointer until they're
added to a grid, they are now always managed by a unique_ptr. A shared_ptr would have been
easier, code-wise, since we'd be able to use functions like static_pointer_cast instead of having
to release, then cast, but the unique_ptr better shows that there should only ever be one place
owning a widget: either the grid it's in, or if it's a standalone instance. It does make the interface
a bit more awkward when it comes to non-owning raw pointers, and it is definitely a valid design
wherein those classes could just store a shared_ptr.

To that end, this commit covers a bunch of things:

* builder_widget::build (both overloads) and all its overrides now return unique_ptr<widget>.

* The builder_grid::build() override now returns the same instead of grid* since you can't
  use covariant return types with smart pointers.

* The two implementation build helpers in builder_grid have been combined with an optional
  replacement map as the second parameter. Uses of the version that took a grid pointer could
  be easily converted to pass a reference instead.

* The pane, matrix, and viewport build() functions were removed in favor of making the ctor
  public. In case there was a deprecated ctor, that was removed.

* The viewport now keeps a widget shared_ptr instead of a reference that was then deleted
  by address-of. This was both better design and necessary to fix a crash.

* grid::swap_child now returns its passed-in wifdget if no replacement takes place. This is to
  guard against crashes when recursing into child grids.

* generator_base::build now returns a unique_ptr.

* The listbox, multi_page, and stacked_widget now have their builders passed to `fianlize` instead
  of having the generator object created in the constructor. This is because we need to keep a
  non-owning pointer in the class, and since the generator returns a unique_ptr, it was easier just
  to pass it in as an additional argument. This also means the listbox ctor was cleaned up a bit.
2022-05-05 23:35:16 -04:00
Luis Miguel Iglesias Sánchez
2acc8e5e79
Added PASSABLE_HEX macro to core and Fixed wallstuck units in UtBS S8 (#6677) 2022-05-05 23:44:45 +06:00
Pentarctagon
a8d145813d
Whitespace fix. 2022-05-04 17:46:36 -05:00
Charles Dang
9aac90dd81
Merge pull request #6680 from wesnoth/remove-surface-param-from-draw
GUI2: removed frameBuffer argument from widget drawing functions
2022-05-03 21:53:23 -04:00
Charles Dang
724b1edad5 Doc comment fix 2022-05-03 21:52:47 -04:00
Pentarctagon
e9fd0833e8 Clear out old travis stuff. 2022-05-03 20:36:00 -05:00
Pentarctagon
9929d3ca1c Remove some unused scons code. 2022-05-03 20:36:00 -05:00