80952 Commits

Author SHA1 Message Date
Tommy
76c7a83dab display: Initialize render textures to black, just in case
Fixes #4210
2022-07-14 15:33:34 +12:00
Pentarctagon
e1f15234a4
Check whether the unit is valid before using it.
Fixes #6863.
2022-07-13 09:58:35 -05:00
newfrenchy83
8cb73a4231 update codeblocks projectfiles 2022-07-13 14:15:05 +02:00
Tommy
5c3ae68ba0 Fix map screenshots 2022-07-13 22:58:41 +12:00
Tommy
33def270d8 editor: Stop drawing the palette during callbacks 2022-07-13 22:58:34 +12:00
Tommy
caa8619898 widgets/menu: Don't draw during layout 2022-07-13 22:58:27 +12:00
Tommy
bb05eee11e display: Allow redraw_everything() to be called outside draw phase
It still needs a refactor, but this is a quick fix.
2022-07-13 19:26:18 +12:00
Tommy
f48a469dd1 display: Update the off-map area on both buffer textures, not just one
Fixes a potential glitch after zooming.
2022-07-13 18:31:09 +12:00
Tommy
cf828f1c81 Don't show the window until the renderer has been created
Fixes brief window flicker when starting the game.
2022-07-13 17:36:16 +12:00
Tommy
26ae5a6fb0 Make blue fires in test scenario more obviously blue 2022-07-13 16:33:09 +12:00
Tommy
fd8068ddc9 Remove comment about fire animation in test scenario
This method of item animation is unsupported. Ref GH#1219
2022-07-13 16:32:25 +12:00
Tommy
efa9946bbb Fix some display issues for themes with no background or minimap
Mostly affects the cutscene theme.
2022-07-13 16:31:08 +12:00
Wedge009
a6c57d014d Test scenario: Use progressive syntax for fire animation
[ci skip]
2022-07-13 13:11:00 +10:00
mattsc
2424d5705f Micro AI CAs: add handle_user_interact calls 2022-07-12 22:57:16 -04:00
mattsc
c7b3393a9d ai_helper: add handle_user_interact calls 2022-07-12 22:57:16 -04:00
mattsc
b1b521f582 Lua AI CAs: add handle_user_interact calls
Insert these calls in loops that do expensive calculations for the CAs of the default and experimental AIs.
2022-07-12 22:57:16 -04:00
mattsc
d7ecfa2744 Add wesnoth.interface.handle_user_interact Lua function 2022-07-12 22:57:16 -04:00
Tommy
7370ef62cb Disable other mouse motion events while scrolling via middle mouse
Fixes stuttering while scrolling, and also various other distracting
effects such as showing reach map of units when passed over.
2022-07-13 13:34:01 +12:00
Tommy
2279ec99eb Fix crash when resizing window in map editor
Something is processing events during render, but finding it is
more difficult than just aborting drawing when the vector of
drawables gets invalidated.

Once that is fixed nothing will be changing the drawable vector,
so this will then have no effect. Until then it will cause some
flickering when resizing, but it won't crash.
2022-07-13 13:34:01 +12:00
Tommy
f967007511 display: Fill render buffers with background texture when created
Fixes possible missing bg texture at the start of a scenario, when
the map doesn't fill the whole display area.
2022-07-13 13:34:01 +12:00
Tommy
d95a154a59 Do not block everything when fading music in and out.
Fixes #4460.

Also fixes the seconds-long UI block at the start of a scenario and
when beginning story view at the start of a campaign.

And thus, also fixes the new visual fade-in effect which was completely
broken by music fade-in blocking everything.

Note that this fix does cause fades to happen in a non-blocking manner.
Old music will fade out in the background, then the new music will
fade in once the old music has finished fading out.
2022-07-13 13:34:01 +12:00
Tommy
96ebc1b531 Disable minimap generation when display is faked 2022-07-13 13:34:01 +12:00
Tommy
efffe284b8 Begin single-player scenarios with a smooth fade-in effect
Currently it fades from black over half a second.
2022-07-13 13:34:01 +12:00
Tommy
859f10a232 display: Add the capability to fade the game display to a solid colour
Currently this is simply display.fade_to(colour, fade_time).
2022-07-13 13:34:01 +12:00
Tommy
d9acaf3c71 color_t: Add functions for proportional blending
color_t::smooth_blend(other, proportion) and color_blend(v1, v2, p).
2022-07-13 13:34:01 +12:00
Tommy
f6aaa5dbd9 Fix game display painting over the loading screen.
This adds loading_screen::raise() which can be called to ensure that
the loading screen is on top of the draw stack.
2022-07-13 13:34:01 +12:00
Tommy
2931615cdf Ported over the text texture cache from new_rendering
Squashed from new_rendering:
 * Ported over the basic text texture cache
 * Font/Text: fixed bad hashing leading to duplicate textures
 * Use text texture drawing method instead of surface one
 * Cleaned up and optimized pango_text rendering pipeline
 * Font/Text: removed get_width and get_height in favor of just get_size
 * Font/Text: guard against caching a null texture

This breaks the credits screen. The game will crash when it tries to
display it.
2022-07-13 13:34:01 +12:00
Gunter Labes
c4635b1058 Update Xcode project 2022-07-13 13:34:01 +12:00
Tommy
06254e5581 Mega draw manager implementation
This has been megasquashed because it was a month-long mess of fixes
and reworks.

In summary:
* objects no-longer draw by hooking a DRAW event. In stead they
  inherit from gui2::top_level_drawable, and implement its interface.
* the game display now renders to an offscreen buffer. This is used
  to implement hardware scrolling, and to redraw after halos, floating
  labels etc. move.
* halos, floating labels, tooltips, and a few more things are now
  drawn on top of the game display, rather than as part of it. This
  allows them to be updated independently without reading pixels
  from the screen.
* surface restorers have been removed. Reading pixels from the screen
  should now be unnecessary excepting two cases: (a) screenshots,
  (b) background blur. Blur is cached, and screenshots are occasional.
* GUI2 widgets no longer keep track of dirty state. They are redrawn
  as necessary. Most places which previously set dirty state now queue
  a redraw in their part of the screen in stead.
* A consequence is that active translucency is enabled across all UI
  elements, and the game display can (and does) continue to animate
  while menus and dialogs are showing.
* performance is drastically increased for basically everything, most
  notably map scrolling, floating text, and halos.
* CPU usage is drastically decreased. With animations disabled it is
  essentially zero while nothing is moving.
* GPU usage is also minimal. The display is only flipped if something
  is drawn.
2022-07-13 13:34:01 +12:00
Tommy
3dbf212f8c Add a draw manager, to manage drawing to the screen
There is a new global interface draw_manager which handles drawing,
and a new abstract base class top_level_drawable (TLD) to indicate
that an object is something that has a place on the screen and should
be drawn.

Basic usage is fairly straightforward. Top-level objects (such as
windows) inherit from top_level_drawable. They must implement the
functions layout(), screen_location(), and expose().

layout() should ensure that screen location and animations are current.
screen_location() should return the current draw location on screen.
expose() should do the actual drawing.

The draw manager keeps track of what regions of the screen, if any,
need to be redrawn. Regions must be invalidated by calling
invalidate_region(rect). This can be done at any time other than during
expose(). It must not be called during expose().

The draw manager has one main callable function, sparkle(). This may
be renamed at some point. It manages calling the TLD functions on all
TLDs in the correct order. It also manages loop delay and vsync.

The standard game loop now becomes:
1. events::pump()
2. draw_manager::sparkle()
2022-07-13 13:34:01 +12:00
Gunter Labes
b988608bfb
Set default dir and avoid shell injection 2022-07-11 18:37:07 +02:00
doofus-01
a964c807ab
Update changelog.md 2022-07-10 18:15:27 -07:00
doofus-01
be14c5ab35
1.17 Loyalist sprite updates (#6803)
* update swordsman sprite and anims

* update royal guard sprite and anims

* update pikeman sprite and anims

* update lieutenant sprite and anims

* update sergeant sprite and anims

* update halberdier sprite and anims
2022-07-10 18:03:11 -07:00
doofus-01
09fe5a19fd
Adding Amorphous to credits
for the swordsman attack animation.
2022-07-10 17:12:13 -07:00
Gunter Labes
b39b7e348b
Run test steps independently 2022-07-10 23:18:22 +02:00
Pentarctagon
9d8911dac0
Sync changelog. 2022-07-10 10:21:35 -05:00
Gunter Labes
4313e2485c
Move notifications to the bottom 2022-07-10 16:56:52 +02:00
Gunter Labes
8bd8c53f98 Combine windows jobs into a matrix 2022-07-10 16:37:44 +02:00
Gunter Labes
b063bb5e2e Split ubuntu build into separate steps 2022-07-10 14:24:15 +02:00
Gunter Labes
7cbf24c9e7 Split macos build into separate steps 2022-07-10 13:44:23 +02:00
Nils Kneuper
e28e483355 updated Czech translation 2022-07-10 11:43:34 +02:00
mattsc
26081536a9
Merge pull request #6850 from mattsc/mp_map_errors
MP Create Game dialog: improve error handling
2022-07-09 06:52:10 -07:00
Nils Kneuper
d491415bbf added a cmake hack for finding asciidoc when using recent archlinux 2022-07-09 12:05:48 +02:00
Nils Kneuper
051b7a0450 updated Arabic translation 2022-07-09 11:03:30 +02:00
Nils Kneuper
072add480c updated French translation 2022-07-09 11:00:44 +02:00
Pentarctagon
10e40aa8e3 Print vcpkg_abi_info.txt contents.
The only suggestion that came up was checking to see if something in this file changed between when the vcpkg cache is used vs isn't used, so... print out the contents of a random dependency and then check back later I guess.
2022-07-08 23:09:23 -05:00
Steve Cotton
353ff1a013 Re-add an <fstream> include for GCC 11
3874fe5f0 compiled okay on the CI, but it seems it was relying
on an implicit include somewhere. GCC 11.3.0 requires this.
2022-07-08 10:35:06 -05:00
Pentarctagon
3cdf3b39be Remove one more std::cerr. 2022-07-07 22:30:46 -05:00
Celtic Minstrel
a1eb63b359 Xcode: Disable header maps
This makes the Xcode build's way of locating headers be similar to other compilers.
The header maps feature means you can include any header in the project just by the filename,
but none of the other supported build systems allow this, requiring a full path relative
to the src directory.

By disabling header maps, Xcode will give an error if you miss the file path
(unless including a file in the same directory).
2022-07-07 22:05:33 -04:00
Nils Kneuper
91153e3c21 updated French translation 2022-07-07 19:34:44 +02:00