78908 Commits

Author SHA1 Message Date
Celtic Minstrel
1410b5cef9 Allow accessing variables through the new APIs in the mapgen kernel
This also reverses the deprecation of wml.tovconfig and friends in the mapgen kernel.
2021-05-11 14:52:20 -04:00
Celtic Minstrel
05b0b7a1df Update uses of wesnoth.fire 2021-05-11 14:52:20 -04:00
Celtic Minstrel
e8381ea9da Update uses of eval_conditional 2021-05-11 14:52:20 -04:00
Celtic Minstrel
2ea92baa13 Move some more functions to the wml module
- eval_conditional and fire
- the internal set|get_variable functions
2021-05-11 14:52:20 -04:00
Celtic Minstrel
603ecdfb99 Move the deprecation for wesnoth.modify_ai to Lua so that it honours --strict-lua 2021-05-11 14:52:19 -04:00
Celtic Minstrel
9bf189a615 Move wesnoth.create_side -> wesnoth.sides.create 2021-05-11 14:52:19 -04:00
Celtic Minstrel
1205e3fd25 Move the Lua global variable helpers from WC to a new "experimental" module 2021-05-11 14:52:19 -04:00
Celtic Minstrel
f4d528f616 Make it easier to deprecate Lua attributes in C++ __index metafunctions 2021-05-11 14:52:19 -04:00
Celtic Minstrel
e7ec2fbca2 Deprecate wesnoth.game_config.version
There's no point having the same info in two places
2021-05-11 14:52:19 -04:00
Celtic Minstrel
c88e60b98e Now color_adjust takes three arguments instead of a config
Consider it part of the public API now.
2021-05-11 14:52:19 -04:00
Celtic Minstrel
ea5367de17 Move create_animator and create_weapon into the units module 2021-05-11 14:52:18 -04:00
Celtic Minstrel
7b2ceb863c Move open_help to the gui module (as show_help)
This also exposes it in kernels besides the game kernel.
2021-05-11 14:52:18 -04:00
Celtic Minstrel
6e9826cfcd Update mainline content to use the wesnoth.audio module 2021-05-11 14:52:18 -04:00
Celtic Minstrel
dddd551765 Add an audio module 2021-05-11 14:52:17 -04:00
Celtic Minstrel
2a1fc43860 Add a versions userdata for a cleaner way to compare and manipulate game versions 2021-05-11 14:50:29 -04:00
Celtic Minstrel
1dccc3ad76 Update mainline content to use the mathx module 2021-05-08 17:20:49 -04:00
Celtic Minstrel
1fc31c23d0 Replace all uses of get_time_stamp -> ms_since_init 2021-05-08 17:20:49 -04:00
Celtic Minstrel
7e1f3bc27f Rename get_time_stamp to ms_since_init
This better reflects what it actually does - it is not and has never been a timestamp.
2021-05-08 17:20:49 -04:00
Celtic Minstrel
a09f88c1c9 Start a Lua mathx module to hold round, shuffle, random, and a few other things 2021-05-08 17:20:47 -04:00
Celtic Minstrel
c4d9590e71 WFL: Add recall list to the side object 2021-05-08 17:15:02 -04:00
Celtic Minstrel
96964f0dd1 Log any Lua errors during map generation 2021-05-08 17:15:02 -04:00
Celtic Minstrel
b20e226f30 Unit test to verify that [event]delayed_variable_substitution=no works 2021-05-08 17:15:02 -04:00
Celtic Minstrel
900c576fe8 Fix bug in wesnoth.map.read_location 2021-05-08 17:15:02 -04:00
Steve Cotton
f282eb7948 Render only a viewport area in pango_text and text_shape
The line-by-line workaround for rendering huge areas of text is dropped, as we
now only expect to be rendering screen-sized or smaller parts of the text.

Rendering huge texts (greater than 64kpixels high) now requires the caller of
pango_text::render() to change to calling pango_text::render(SDL_Rect) instead.
This is used by text_shape, fixing the crash when opening the credits screen.

This should reduce memory usage when rendering text. It doesn't seem to reduce
the amount of work done by Pango, but the drawing will be clipped in the Cairo
library.
2021-05-08 23:01:54 +02:00
Gunter Labes
b740153d92
Add missing newline 2021-05-08 16:20:34 +02:00
Nils Kneuper
44525e56a9 updated Czech translation 2021-05-08 13:31:56 +02:00
Pentarctagon
24d546df63 Some more cmake cleanups.
Also moved boost and openssl to using the "import targets" (ie: https://cmake.org/cmake/help/latest/module/FindBoost.html#imported-targets) which are apparently the modern way to use cmake. Many of the other libraries don't support that however, and SDL is only fully(?) supported using this as of cmake 3.19.
2021-05-07 15:53:21 -05:00
Pentarctagon
34a493e6df
Remove unused cmake files. 2021-05-07 11:38:47 -05:00
Pentarctagon
986e2eb998
Fixup spaces > tabs. 2021-05-07 11:25:10 -05:00
Steve Cotton
13bc062975 Remove the old PNG optimisation script
A Python version was added in b3fe980d709add4fb8b3fb88faad946bfe55e477, the
main reason for removing the old one is that it's inconsistent to have two
tools where one does almost (but not quite) the same as the other.

Both versions check that the old and new images look the same. However, if any
tool changed the pixels' values then old script would discard the changes from
the other tools too. The new script checks the image after each tool is run, so
that the optimisations from the other tools can still be kept.

The indexed2rgb.sh script had a call to utils/wesnoth-optipng. It's deleted
instead of updated because both wesnoth-optipng itself (since 17c242a9f) and
the new woptipng both do what indexed2rgb.sh did (they all run ImageMagick with
option "png:color-type=6").
2021-05-07 12:01:59 +02:00
Pentarctagon
edb225da8e Directly check for iOS rather than using an SDL header. 2021-05-07 00:02:02 -05:00
Pentarctagon
b95d72f9c1 Use cmake to create VS project files.
Due to an upstream change in vcpkg that breaks the simple integration previously available with `vcpkg integrate install`, building using that setup method is no longer possible. In order to work correctly, cmake must instead be used to generate the VS project files, since that is able to integrate with vcpkg, since vcpkg also uses cmake to build all the library dependencies.

An additional benefit of this is that it will no longer be necessary to separately update the VS project files since it will read the same source_lists files as cmake (on linux) and scons do.

This also enables running the WML unit tests on Windows with this in order to confirm that a valid wesnoth.exe is in fact being generated as well as fixes building the boost unit tests.

The warning level for both release and debug builds are now at level three, the remaining warnings have been fixed, and therefore strict builds have been enabled - any warning will now cause the build to fail, just like for the linux jobs.

Known issues:
* The boost unit tests don't actually run successfully - they fail on CI at least with an exit code on 201 - however I don't know if this is a real problem or just a problem with running headless on CI.
* The debug build doesn't quite work since the executables are built against the non-debug dlls but cmake copies over the debug dlls into the output directory. For now this can be worked around by copying the release dlls into the debug directory.
* The instructions in INSTALL.md are not very good since I don't use Windows and thus can't write anything more detailed. Ideally someone who uses Windows can add more detailed step by step instructions at some point.

Fixes #5741
2021-05-07 00:02:02 -05:00
Steve Cotton
df41f13e41 Rewrite the WML unit test for sighted events
The old version's [event]name=sighted had a {RETURN} statement in it,
which meant the test stopped on the first sighting. Most of the test
wasn't testing anything.
2021-05-06 01:21:59 +02:00
newfrenchy83
00452c0187
add 'ability_id_active' attribute to filter (#5739)
Add 'ability_id_active' attribute to filter

Until now, only the type of ability could be filtered with activity, and id only for unit who have ability, same if she's inactive.
2021-05-03 14:38:05 -05:00
loonycyborg
ad38010a03
update flatpak manifest because boost download url changed 2021-05-03 20:28:58 +03:00
sigurdfdragon
f67f28d7a9 Fix deprecation message 2021-05-03 11:26:40 -04:00
Steve Cotton
24e2f8f767 Whitespace fixes for no newline at end of file
The new CI script whitespace-checking script changes these, but not on Linux.
2021-05-03 11:52:40 +02:00
Iris Morelle
847233d5ee campaignd: Fix erroneous error message text 2021-05-03 04:35:18 -04:00
Steve Cotton
529d5c1a46 Run woptipng on images with bad iCCP, and associated files
The files that had bad iCC profiles were the following subset. I ran woptipng
on the files that were checked in at the same time too.
* data/core/images/portraits/monsters/woodland_boar.png
* data/core/images/portraits/undead/zombie-boar.png
* data/core/images/terrain/castle/troll/tile.png
* data/core/images/units/human-loyalists/heavyinfantry-attack-8.png
* data/core/images/units/human-outlaws/bandit-idle-1.png
* data/core/images/units/human-outlaws/bandit-idle-2.png
* data/core/images/units/human-outlaws/bandit-idle-3.png
* data/core/images/units/human-outlaws/bandit-idle-4.png
* data/core/images/units/human-outlaws/bandit-idle-5.png
* data/core/images/units/human-outlaws/bandit-idle-6.png
* data/core/images/units/human-outlaws/trapper-bow-attack1.png
* data/core/images/units/human-outlaws/trapper-bow-attack2.png
* data/core/images/units/human-outlaws/trapper-bow-attack3.png
* data/core/images/units/human-outlaws/trapper-bow-attack4.png
* data/core/images/units/human-outlaws/trapper-bow-attack5.png
* data/core/images/units/human-outlaws/trapper-bow-attack6.png
* data/core/images/units/human-outlaws/trapper-bow-attack7.png
* data/core/images/units/human-outlaws/trapper-bow-defend.png
* data/core/images/units/human-outlaws/trapper-bow.png
* data/core/images/units/human-outlaws/trapper.png
2021-05-03 10:33:40 +02:00
newfrenchy83
1cb2393b42 fix anerror 2021-05-02 19:40:48 -05:00
newfrenchy83
ad95696b4a Fix teaching_anim not implmmented in variation_id=sceptre of Httt Princes and Battle Princess
I have forget to pull this in variation scpeter of unit_type
2021-05-02 19:40:48 -05:00
Pentarctagon
9dde4d5f6d
sed doesn't work quite the same on macOS. 2021-05-02 17:09:10 -05:00
Tahsin Jahin Khalid
0547941b13 [world conquest] Restored 2 instances of wml.parsed
1. removed the "cfg = cfg" thing
2. restored 2 instances of wml.parsed()

As for the wml.parsed() in line 74 of effects.lua, I chose to not re-add it as it causes an error.
2021-05-02 17:06:26 -05:00
Tahsin Jahin Khalid
45d7372e69 [world conquest] fix remaining deprecated code usage
1. Fixed an un-added entry in the changelog
2. fixed the last 2 deprecation messages
3. removed instances of `wml.parsed` as it is no longer required.
2021-05-02 17:06:26 -05:00
Pentarctagon
73c4e19ea2
Make whitespace fixing a script. 2021-05-02 16:40:40 -05:00
Nils Kneuper
07a4be462b updated Italian translation 2021-05-01 13:15:11 +02:00
Iris Morelle
667cb7f571 Remove orphaned declarations of removed functions 2021-05-01 02:59:52 -04:00
Pentarctagon
c4b42eadc0
Fix cmake warning. 2021-04-29 20:29:42 -05:00
Gunter Labes
e061cc1415
Remove obsolete code path
This was left in by 7434533 for some reason.
2021-04-29 17:51:13 +02:00
Steve Cotton
5015c666f0 Make command-line option --language never require --all-translations
When the user supplies an exact locale identifier on the command line,
it doesn't make sense to check whether it's an incomplete translation.
2021-04-29 16:50:34 +02:00