a1dd77a fixed Delfador's unset disable_stronger_amlas variable, but inadvertently broken the campaign due to an unset save_id for side 1. By placing Delfador inside [leader] instead, we resolve both issues.
Move semantics imply that an r-value parameter is no longer useful once
it is passed into a function. However, this function is used as a helper
function that only partially moves from cfg, so that the rest of cfg
can be reused by the caller.
I don't believe this is a good mechanism for a function call. This
overload is only used in one place: append(config&& cfg), so this commit
moves the relevant logic there. This ensures there's no re-use of a
moved-from object.
Splitting this out separately since it's a special case and API change.
Variables can be automatically moved when a function returns. However,
declaring a variable as const prevents that move from occuring (as the
move modifies the moved-from variable).
This checks when a move constructor for an object copy constructs its
member classes or parent classes. Copying unnecessary as all of the
members of the moved-from object can be clobbered by the move.
If a function takes in an rvalue, it's taking ownership of the object
that's being moved into it. If the object never moves that rvalue param,
then there was no point to moving it into the function.
As an example of a problem this catches, in context_manager.cpp,
replace_map_context_with took in an rvalue unique_ptr "mc" to a map
context. The function then swapped it with a given value in
map_contexts_. This swap was unnecessary because "mc" expired after the
function call was complete. It is more optimal to std::move(mc) into
the value in map_context_ that we were previously swapping with.
A forwarding reference is one of the form (note the template parameter):
template<class X>
void foo( X&& x );
The difference between this and a regular rvalue reference (where X is
not a template) is that foo() also accept lvalues. So it is possible to
call:
std::string s = "Example";
foo(s)
And if the body of foo(X&& x) std::moves x, then s will be invalidated.
This check warns on usage of std::move in this context and recommends
std::forward, which automatically determines whether to std::move
depending on whether foo() is called with an rvalue or an lvalue.
For working out which languages have 80% of core translated, TSG is
now relevant and the old tutorial isn't. This means that the 80%
threshold has increased by around 500 strings.
Add missing changelog entries for 1.19.8 directly to the changelog.
https://wiki.wesnoth.org/Typography_Style_Guide
According to the Typography Style Guide, races shouldn’t be capitalized but unit types should be. Silverbacks aren’t a species, and in this case I think this refer to the Unit Type.
Closes#9633Fixes#9591
This could also have been fixed by simply adjust the clip rect origin on left alignment (such an adjustment was present for the other alignments), but honestly there's no reason to be messing with the clip rect here when we can set the width directly. The floating_label internals would set the maximum text width to clip rect if no max with was otherwise specified.
While adding TDG to mainline, I missed adding it to the schema. As a result, a lot of issues went unnoticed.
This PR adds TDG to the schema, and fixes the various discovered errors. This PR also updates the schema to reflect the engine supporting multiple [filter] tags in events, and to reflect the engine supporting [change_theme] without keys.
"resources" naming isn't correct - most of these files aren't resources.
Instead, we move the actual resources to data/internal/resources, and the other files to data/internal.
* TSG: Various small corrections and revisions.
[ci skip]
* add "without save-loading" to sg_help
---------
Co-authored-by: Dalas121 <33790750+Dalas121@users.noreply.github.com>
Many of the CI builds expect the .po files to already exist, and
fail without them.
For SCons builds, the .pot file needs to exist, because po/SConscript
uses the existing files to find out which textdomains it needs to
update.
It was already added for CMake, but keeping the list in alphabetical
order makes maintenance easier.
This fixes an issue where the bar borders would always be one pixel wide, regardless of the zoom level or game render scaling which made the bars stand out badly amongst the pixel art. This brings us closer to the old look from the surface-drawn days.
This is also an experiment with using normalized, fractional coordinates for rendering instead of absolute screen coordinates. I'd like to take this approach in more places, so this is a good proof of concept.
Replaces mentions of the old tutorial with TSG in the help page and changes the recommended begginer campaigns to TDG or AToTB. There’s also some slight wording changes.
Around two years ago Yumi asked me to create TDG as a replacement for Delfador's Memoirs, and gave me a rough script - the campaign covers Delfador's youth and Eldred's betrayal of Garard. Its gameplay includes a spellcasting mechanic for Delfador.
I'm not sure how it's possibly useful, but apparently this can be sent by the python client
This reverts commit fdc8d92fe6c38c995e0ef02c7fd219841da41ad8.