80624 Commits

Author SHA1 Message Date
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
Charles Dang
0f9ee653ab GUI2: removed frameBuffer argument from widget drawing functions 2022-05-03 21:19:06 -04:00
Pentarctagon
0aa8dc3c6c Have cmake also execute the conftests. 2022-05-03 18:10:46 -05:00
Andrei BENCSIK
ea83e36bdb Refactor FindVorbisFile win32 cleanup 2022-05-02 16:23:17 -05:00
Andrei BENCSIK
066210254a Refactor FindVorbisFile.cmake 2022-05-02 16:23:17 -05:00
Andrei BENCSIK
67758cf113 Coherence between readme and CMake script 2022-05-02 16:23:17 -05:00
Andrei BENCSIK
43c79e34a2 Refactor FindTranslationTools.cmake
* macro for avoiding code repetition
2022-05-01 22:31:23 -05:00
Charles Dang
e20bb4ba9e sdl/window: added assertion if render-to-texture is not supported 2022-05-01 23:25:01 -04:00
doofus-01
20af906b54
1.17 skeleton sprite cleanup (#6670)
* remove semitransparent swooshes

* skeleton sprite cleanup
2022-05-01 19:51:17 -07:00
doofus-01
5b239bb596
1.17 necromancers cleanup (#6669)
* remove semitransparent swooshes

* necromancer sprite cleanup
2022-05-01 17:06:15 -07:00
doofus-01
e54fcd907d
1.17 elf sprite cleanup (#6668)
* remove semitransparent pixels and black/blurry shadows

* removed some outdated/unused images

* elf sprite cleanup
2022-05-01 16:26:50 -07:00
Wedge009
78ea9ed0dd Editor: Add sconce tile to cave group.
[ci skip]
2022-05-02 09:00:11 +10:00
Wedge009
af72f75b2d Editor: Add some missing terrain groupings (resolves #6643).
[ci skip]
2022-05-02 09:00:11 +10:00
Elvish_Hunter
52da1fa774 wmllint: replaced gif with webp in two regexps 2022-05-01 11:24:28 +02:00
doofus-01
f17b8b76e9
1.17 dunefolk sprite cleanup (#6662)
* dunefolk sprite cleanup
2022-04-30 20:43:50 -07:00
doofus-01
0712c33b3a
1.17 goblin sprite cleanup (#6659)
* goblin sprite palette cleanup
2022-04-30 17:51:31 -07:00
newfrenchy83
de5409b5d2 add sdl/ texture and input to codeblock projectfiles 2022-04-30 16:40:42 -05:00
Charles Dang
0a265d1c51 Re-added SDL_Texture wrapper and render utils
These were from the last attempt at accelerated rendering. We might be getting somewhere this time...
2022-04-30 16:57:59 -04:00
Charles Dang
fe69a7f501 CVideo: added renderer getter 2022-04-30 16:54:33 -04:00
Charles Dang
4a5d127c74 CVideo: renamed flip to render_screen 2022-04-30 16:54:32 -04:00
doofus-01
21ddeadfed
1.17 orc sprite cleanup (#6657)
* remove semitransparent swooshes

* orc sprite palette cleanup
2022-04-30 13:52:36 -07:00
Tahsin Jahin Khalid
945d1c8160 [liberty] fix missing background image 2022-04-30 14:59:01 -05:00
Tahsin Jahin Khalid
2a0d198240 [DiD] fix missing background image 2022-04-30 14:59:01 -05:00
Pentarctagon
e3a99b367a
Update changelog. 2022-04-30 14:26:08 -05:00
Pentarctagon
9bfd432abe Update image pages for webp extension. 2022-04-30 14:23:32 -05:00
Pentarctagon
9469f8af63 Update wmllint. 2022-04-30 14:23:32 -05:00
Pentarctagon
51b58ad218 Rename converted images to webp. 2022-04-30 14:23:32 -05:00
Pentarctagon
e5d6d806bf Convert image contents to webp. 2022-04-30 14:23:32 -05:00