81153 Commits

Author SHA1 Message Date
macabeus
2d00b7ebd4 map-diff: fix when reading attributes with comments 2022-08-09 14:54:13 +02:00
Tommy
5129d61dd2 draw_manager: More cleanly abort if an expose throws an exception 2022-08-09 14:03:28 +12:00
Tommy
837d12d645 Clear all texture caches before game end 2022-08-09 13:04:58 +12:00
doofus-01
cbd36d1261
Update changelog.md 2022-08-07 20:15:33 -07:00
doofus-01
d77a16f415
1.17 Lower terrain (#6927)
* two terrain types: unwalkable "^Qhx" and base "^Qhu"

* water variation

* snow variation
2022-08-07 20:10:36 -07:00
Tommy
1d63543f98 Maybe fix MP create dialog 2022-08-08 10:10:13 +12:00
Pentarctagon
db948c00ac Update missed copyright notices. 2022-08-07 16:13:40 -05:00
newfrenchy83
2d89af63b4 update codeblock projectfiles 2022-08-07 16:08:40 -05:00
Tommy
54fedb4d6a HttT:24: Use screen_fade for effects during "last breath" event 2022-08-07 23:11:21 +12:00
Tommy
090d6e6a4a EI:17b: Use screen_fade for flash effect when enough liches die 2022-08-07 23:11:21 +12:00
Tommy
d0557e505a DW:10: Update effect when Caladon dies to use screen_fade
The basic fade algorithm is the same, but it flows more smoothly.
2022-08-07 23:11:21 +12:00
Tommy
37a084af37 SoF:09: Update final fade out effect to use screen_fade
* Changed FADE_TO_BLACK to SCREEN_FADE_OUT
* Updated the red [color_adjust] to [screen_fade]. Also tweaked the
  timing to make it flow smoothly.
* Removed the now-unnecessary kill tag used to hide units before
  the fade.
2022-08-07 23:11:21 +12:00
Tommy
973ee1ea37 THoT:10: Use SCREEN_FADE rather than FADE_TO_BLACK
Also tweaked the timing to make it more dramatic, and removed the
now-unnecessary commands hiding units and removing items.
2022-08-07 23:11:21 +12:00
Tommy
5b5bdde080 WoF:08: Use SCREEN_FADE_OUT not FADE_TO_BLACK 2022-08-07 23:11:21 +12:00
Tommy
b2a15487a8 DiD: Replace FADE_TO_BLACK with SCREEN_FADE_OUT 2022-08-07 23:11:21 +12:00
Tommy
cb62f0cd76 HttT:14: Use FLASH_LIGHTNING 2022-08-07 23:11:21 +12:00
Tommy
65f4c8cfe2 DM: Use global FLASH_LIGHTING effect in stead of local macro 2022-08-07 23:11:21 +12:00
Tommy
24e1da729d Tutorial: use FLASH_LIGHTNING rather than color_adjust 2022-08-07 23:11:21 +12:00
Tommy
2d37a13bb8 WML: Add macros for screen_fade, and modify FLASH to use it as well
New macros:
 * SCREEN_FADE_OUT - to replace FADE_TO_BLACK in most cases
 * SCREEN_FADE_IN - to replace FADE_IN in most cases
 * SCREEN_FADE r g b duration
   - convenience wrapper for [screen_fade] with 255 alpha
 * SCREEN_UNFADE duration
   - convenience wrapper for [screen_fade] with 0 alpha
 * FLASH r g b actionWML
   - like FLASH_WHITE etc but takes a colour
 * FLASH_LIGHTNING actionWML
   - flashes an appropriate colour and plays lightning.ogg

Modified macros:
 * FLASH_WHITE/RED/GREEN/BLUE}
   - these now use [screen_fade] not [color_adjust]
2022-08-07 23:11:21 +12:00
Alexander Lacson
34ff1117f7 [UtBS] In S6b, add a scroll to detonation event
When Jorgin dies, make the map scroll to the detonation event that occurs right after so that the player will clearly know what happened.
2022-08-07 14:11:29 +08:00
Alexander Lacson
14c17c3368 [UtBS] In S6b, add an "explosive charge failed" sound to event
Used the dwarvish thunderer miss sound as a sound effect that plays in an event where a dwarf lights an explosive charge but if fails to detonate.
2022-08-07 14:11:29 +08:00
Pentarctagon
5382c0f9bc Update for modeless dialogs being windows. 2022-08-06 15:11:41 -05:00
Pentarctagon
cd53c51780 Add file_progress to omitted gui2 tests
because trivially adding it didn't work.

Manually cherry-picked from a commit by mesilliac
2022-08-06 15:11:41 -05:00
Tommy
a0ffcaf69c Update addon install-progress dialog to use the new draw system. 2022-08-06 15:11:41 -05:00
Iris Morelle
532ec4e06f addon/client: Add modeless dialog for displaying add-on install progress
This implements an add-on extraction progress dialog that does not
actually run its own event loop, allowing the caller to take ownership
of it (display() static method) and update its state using a callback
function object. The object in question is passed into the add-ons
management API and used to update the dialog status each time an add-on
file is written to disk as part of the pack extraction process.

In order to avoid stalling the extraction process in UI code, the
callback is invoked for every single file, but the dialog's progress
update method places a time restriction on GUI2 API calls of 120
milliseconds -- this is a good throttle interval that allows add-ons to
be extracted in about the same amount of time as before while still
updating the progress bar smoothly enough for add-ons that take longer
than that.

(This is not the most trivial code to test, so it is suggested to add a
sleep/delay API call in unarchive_file() in src/addon/manager.cpp to
introduce artificial delays.)

One issue with this code, however, is that because modeless_dialog
doesn't execute its own event loop, the only way to get the dialog to be
updated is to force a draw event in ourselves via the new
gui2::dialogs::modeless_dialog::force_redraw() method. This is really a
side-effect of my design choice here to run the dialog in the middle of
a blocking operation instead of somewhere where events are being
processed normally. I'm not entirely sure if the draw events would be
pushed even in that case, however.

Closes #1101.
2022-08-06 15:11:41 -05:00
newfrenchy83
ad8f6a6f4c update codeblock 2022-08-06 10:37:38 -05:00
Pentarctagon
56ada809c0 Refactor test_gui2 into individual tests
Otherwise testing 55 things in a single test takes a lot longer than any other test when using the debug build, which messes with the execution script's process timeout setting.
2022-08-06 03:03:17 -05:00
Pentarctagon
43a1ea2132 Re-implement the boost tests execution.
All tests are now executed one at a time in order to avoid cross-test pollution.

Fixes #6937
2022-08-06 03:03:17 -05:00
Pentarctagon
8fd558f0f1 Fix tests interdependency.
test_fs_binary_path was previously implicitly relying on test_gui2 to run first and populate additional binary paths.
2022-08-06 03:03:17 -05:00
Pentarctagon
8e160c5e07 Silence error when testing the debug clock. 2022-08-06 03:03:17 -05:00
Pentarctagon
a6fedd1847 Fix wml_exception getting thrown. 2022-08-06 03:03:17 -05:00
Pentarctagon
1c0a41100b Add a function to find out the type of an unknown exception.
Only works with gcc and clang for now - someone on Windows can experiment with how to get this working with MSVC.
2022-08-06 03:03:17 -05:00
Pentarctagon
19784009f0 Split these checks into separate tests. 2022-08-06 03:03:17 -05:00
Pentarctagon
325666ca57 Remove empty test and commented tests. 2022-08-06 03:03:17 -05:00
Pentarctagon
e58afae66d Disable a few more GUI2 checks.
Fixed a few things in other commits, but I don't have time to figure out all the different ways these tests aren't isolated from each other.
2022-08-06 03:03:17 -05:00
Pentarctagon
389182c3fb Fix another instance of incorrect global fixture usage. 2022-08-06 03:03:17 -05:00
Pentarctagon
d029d33961 Fix global fixture usage. 2022-08-06 03:03:17 -05:00
Pentarctagon
38fa775559 Make window_builder_invalid_id extend std::exception.
Bost.Test gives essentially no information about things thrown that don't extend std::exception.
2022-08-06 03:03:17 -05:00
Pentarctagon
a5e7986b3e Updates for newer luacheck. 2022-08-06 03:03:17 -05:00
Pentarctagon
8e7029fc51 Address doxygen issues. 2022-08-06 03:03:17 -05:00
Pentarctagon
966f5cd255 Silence new git warning that's irrelevant to the CI. 2022-08-06 03:03:17 -05:00
Pentarctagon
b03a5df7d4 Change CI to use Ubuntu 22.04 docker images. 2022-08-06 03:03:17 -05:00
Tommy
08c28c19b3 Maybe fix CI problems
If this was the actual problem, i have no idea how this ever worked.
2022-08-06 17:31:52 +12:00
Tommy
059da51a32 Don't keep the title screen alive all game just to destroy it after
Either it should be reused, or it should be destroyed before the game.
Previously it was being kept alive just out of view until game end,
whereupon it was destroyed and recreated.

Now it just gets destroyed before entering the game.

This would probably have fixed several other bugs if i hadn't already
made independent workarounds for them.
2022-08-06 17:31:52 +12:00
Tommy
6299000630 Disconnect window event dispatcher on hide, and reconnect on show
Windows can now be kept and hidden/shown as required. Event callbacks
should now be set in the constructor, not in pre_show(), unless they
are also disconnected in post_show().
2022-08-06 17:31:52 +12:00
Tommy
20a73a0291 Only set title screen callbacks once.
Also clarified modal dialog hiding behaviour.
2022-08-06 17:31:52 +12:00
Tommy
71d1bd3f62 Correctly trigger credits animation
Or it would probably correctly trigger, if it didn't crash.
2022-08-06 17:31:52 +12:00
Tommy
af81bba53b GUI2: a modal_dialog is now a window
As it always should have been.

There may be some bugs with semi-persistent windows, i haven't
thoroughly checked whether they should explicitly hide.
2022-08-06 17:31:52 +12:00
newfrenchy83
465e5c1a4d revert removefiles of list
all files necessary for compilation of tests in codeblock projectfiles/CodeBlocks/tests
2022-08-05 00:08:03 -05:00
Tommy
6ad4cd4a31 modeless_dialog: Remove now-unnecessary friend declaration 2022-08-05 15:23:01 +12:00