Commit graph

1769 commits

Author SHA1 Message Date
Pentarctagon
c4bc4237cd Add script for starting wesnoth on macos+steam with the right arch. 2023-05-19 11:08:45 -05:00
Iris Morelle
a1f9b6a59a
Update copyright on macOS About dialog 2023-05-19 01:50:38 -04:00
newfrenchy83
4494689d68 update codeblock projectfiles 2023-05-05 13:50:43 -05:00
gfgtdf
01f28b12ae Refactor statistics
Previously statistics were stored in global variables, now
it is a part of saved_game. With this saved_game now finally
represent the contents of a safefile as it was intended to,
without needing to fill the statistics part in some global
variable. (See also #4672 )

In particular now no longer have to manually reset the
statistics as random parts of the code, it gets reset
along with the saved_game object. Also it is now in theroy
possible for multiple saved_game objects to exist.

Statistics was split in two objects, the statistics_record
which only contains the data, and statistics_t, which
provides methods to modify statistics during a game (to get
cleaner dependencies)

This fixes multiple related bugs with statistics in replays:
- #4133 (stats not bring reset when loading a replay)
- #4133 (duplicate entry for current scenario in replay)
- #4441 (wrong stats at the beginning of a replay)

And issues with statistics being lost for non-host players when
reloading a game in (online) mp (no ticket for that one found).
2023-05-04 21:25:55 +02:00
Pentarctagon
9909f5910d 1.17.16 2023-04-22 22:34:20 -05:00
Pentarctagon
f27b4f1bfc 1.17.15 2023-04-15 20:03:24 -05:00
newfrenchy83
81f72539d9 update codeblock projectfiles 2023-03-21 14:15:38 -05:00
Pentarctagon
f4ac9e03de 1.17.14 2023-03-18 21:48:59 -05:00
gfgtdf
d954d307bc move carryover message to new file
This will in particular make future refactors of that code easier.
2023-03-18 19:04:39 +01:00
Pentarctagon
9315079389 Add curl-based functionality to download files from a URL.
This is a complement to #7416 where it replaces opening the replay's download URL in a browser with directly downloading it into the player's save folder.
2023-03-15 14:49:16 -05:00
Pentarctagon
6fe2627048 Fixup, complete, and enable the lobby's game history viewer.
At some point in the future I'd like to come back and add some search parameters - right now it shows the game history of the currently selected player in the lobby, but ideally it would instead have options for player name, era, scenario, etc.
2023-03-11 10:55:55 -06:00
Pentarctagon
113056c9e1 1.17.13 2023-02-19 22:08:56 -06:00
Pentarctagon
3f63908296 Further consolidate logging functionality between Windows and non-Windows platforms.
For non-Windows platforms this adds:
* a new check for whether the logs directory exists and is writable by attempting to write a single whitespace to a dummy.log file.
* a popup shown immediately after the GUI system is initialized letting the player know if there was an issue creating the log file.

For Windows, this changes:
* instead of writing to the OS temp directory and then attempting to move that file to the logs directory, this uses the same check that was described above for non-Windows platforms.
* the alert shown when writing the dummy log file fails is now a Wesnoth alert message rather than the Windows-specific MessageBox.
* a failure to create a log file does not immediately exit wesnoth anymore.

Additionally, this makes it so that for the default state (logging to file), all platforms follow the same code path by calling `lg::set_log_to_file()`. `log_windows` now contains only the Windows-specific logic needed for handling the creation/redirection of output to a console.
2023-02-17 10:03:05 -06:00
Celtic Minstrel
6722f04510 Xcode: Pass --no-log-to-file in the scheme
[ci skip]
2023-01-25 19:41:55 -05:00
Pentarctagon
d1465a9eb9
Add basic achievements functionality. (#7237)
* Add basic achievements functionality.

This reads the mainline achievements.cfg and then all the achievements of each installed add-on.

This is intentionally handled separately from other WML loading so that:
a) All achievements and their status are able to be displayed on the main menu right after Wesnoth starts and regardless of which add-ons are active.
b) Add-ons can add additional achievements to other content, whether UMC or mainline. For example, a modification that adds more achievements for mainline campaigns.

Marking something as achieved is handled by the new [set_achieved] tag and whether an achievement has been completed can be checked via [has_achievement].

There is no attempt to prevent people from manually editing which achievements they've accomplished.

NOTE: These are *not* in any way related to Steam achievements!
2023-01-21 10:32:45 -06:00
Pentarctagon
b08582209b 1.17.12 2023-01-14 18:27:55 -06:00
Pentarctagon
ba8227e994 Wesnoth 1.17.11. 2022-12-17 19:14:04 -06:00
Pentarctagon
79b2385140 1.17.10. 2022-11-19 23:38:25 -06:00
Pentarctagon
6682ef8ab8 1.17.9. 2022-10-15 21:09:25 -05:00
Pentarctagon
3b2cf63779 1.17.8 2022-09-18 23:19:48 -05:00
Pentarctagon
0e85fac29c
Have /report show a dialog for entering information. (#6969)
Resolves #5056
2022-09-02 21:18:03 -05:00
Pentarctagon
72a1c801c0 Log exception type when doing catch(...). 2022-08-25 22:22:22 -05:00
Pentarctagon
8a4ff22985 1.17.7 2022-08-20 19:55:18 -05:00
newfrenchy83
2d89af63b4 update codeblock projectfiles 2022-08-07 16:08:40 -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
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
newfrenchy83
b16a196dbc
update codeblock test project (#6929) 2022-08-03 08:40:25 -04:00
newfrenchy83
7c4e0e51d9 update codeblock projectfile 2022-07-31 01:34:54 +12:00
Celtic Minstrel
9edb9cdc16 Update Xcode project 2022-07-30 00:07:46 -05:00
newfrenchy83
0bfb384887
Update codeblocks project files for gcc11 2022-07-20 11:39:50 +02:00
Pentarctagon
ab8fe65b83
1.17.6 2022-07-19 19:30:24 -05:00
Martin Hrubý (hrubymar10)
698f93f68e
Update Xcode project for new MCS 2022-07-17 19:58:45 +02:00
newfrenchy83
8cb73a4231 update codeblocks projectfiles 2022-07-13 14:15:05 +02:00
Gunter Labes
c4635b1058 Update Xcode project 2022-07-13 13:34:01 +12: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
newfrenchy83
6024df5794 update codeblock projectfiles
remove unused tracer.cpp source file
2022-07-07 21:05:53 +10:00
newfrenchy83
d8b8c5ea80 add GLIBCXX_USE_DEPRECATED=0 in codeblock projectfiles 2022-07-05 08:57:12 -05:00
newfrenchy83
55fedbb27c Revert "update codeblock projectfiles"
This reverts commit df05b5061a.
2022-07-04 21:21:16 -04:00
newfrenchy83
df05b5061a update codeblock projectfiles 2022-07-04 13:13:43 -05:00
Celtic Minstrel
e39f91682a Xcode: Remove the DYLD environment variables from the unit test scheme
It runs without them so there's no point in them being there.
2022-07-02 09:55:14 -04:00
Celtic Minstrel
b22f57ea08 Xcode: Sadly the internal output console doesn't support colour 2022-07-02 09:55:10 -04:00
Celtic Minstrel
d3124af4a5 Xcode: Add additional command line parameters in the unit tests to match those passed in the CI 2022-07-01 23:08:38 -04:00
Celtic Minstrel
c2593ff79c Xcode: Set correct working directory for unit tests 2022-07-01 22:36:49 -04:00
Celtic Minstrel
8ba57c4290 Allow specifying where the unit test output file is
The default location probably makes sense on Linux or Windows, but it is nonsensical on Mac and breaks the game's build when the tests are run.
2022-07-01 21:50:11 -04:00
mattsc
1f9f7a076c Boost unit tests: fix Xcode warnings 2022-07-01 15:30:28 -07:00
Celtic Minstrel
8cb19eafbf Xcode: Add a sample command-line argument to the unit test scheme 2022-07-01 15:54:17 -04:00
Celtic Minstrel
3d20ea27d2 Xcode: Copy additional libraries so the unit tests can run 2022-07-01 15:42:21 -04:00
Celtic Minstrel
eddd762615 Xcode: Add additional rpath entries to wesnothd
This should allow it to run in different configurations:
- When clicking "run" in Xcode, it's adjacent to the Wesnoth applicaiton
- If you wanted a standalone install of wesnothd you'd now only need to copy over the Frameworks directory.

All of this assumes that wesnothd will run at all, which works with a debug build but probably not in the actual release.
2022-07-01 15:39:26 -04:00
Celtic Minstrel
864666f1dc Xcode: Set unit tests runpath correctly 2022-07-01 15:36:08 -04:00