Change all includes to start at the base instead of assuming the directory where included from.
This makes it more apparent exactly which header has been included, since many have the same name.
This also allows moving all header files out of the src directory.
09d35947f4
The mentioned commit broke the Lua map generator by removing a parameter from an
overridden method. This commit fixes that by removing it from the superclass as well
and cascading that through.
In addition, override annotations have been added to the generators to guard against
similar mistakes in the future.
This reverts commit 9a569df848.
This commit somehow causes massive lag when opening the Campaign dialog with a large (several hundred) saves.
Somehow, the save_index was being regenerated every single time a new save was processed, likely due to
the calling of save.summary() in the create_engine initialization loop. It remains to be seen if this is a bug
in the save_index code, which seems possible.
This commit was also likely the cause of bug #25146. While the fix for that might have been simpler (short-circuiting
the campaign type conditional with a savefile corruption check), since this commit has already caused issues, it's
best to revert it and revisit this idea at another time.
Instead of showing the difficulty dialog in post_show and setting the retval to twindow::NONE if the
dialog was canceled, we add a custom exit hook that fires when double clicking the games list or pressing
the Create Game button that shows the dialog instead, and returns if canceled. This is much cleaner.
This constitutes drop-in replacements for:
* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast
This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
This commit removes the utility srt_cast() function and replaces its calls,
along with calls to lexical_cast<std::string>() (and its boost variant),
with std::to_string().
In a few cases where the input type isn't compatible with to_string,
lexical_cast<std::string> is still used.
In other cases where lexical_cast was operating on MAKE_ENUM enums, the
call has been replaced with ENUM::enum_to_string, which is faster.
The code to guard against an eventuality was hidden inside an if-block that relied
on a specified define index value being passed to select_campaign_difficulty().
And related commits.
This reverts commit 545253ec2b.
This reverts commit 1215f65eb8.
This reverts commit 11664f4024.
This reverts commit e948df3424.
This reverts commit 3781e7839f.
This commits were reverted to exclude them from wesnoth 1.13.2 release because:
1) We are still unsure about the best name oftthese attributes
2) This breaks multiple campaigns, including LoW and the tutorial.
Feel free to revert this revert after 1.13.2 when thse issues can be solved..
Previous it couldhappens that create_engines and depcheck::manager s lis
of mods could get out of sync which caused wrong modification to be
active.
Also we add a type= key to [era]s chiech defaults to mp so that only the
default era is avaiable in sp by default (for technical reasons there
must be at least one era avaiable in sp.
We now automaticly show mp_configure in sp iff there are actually things
to configure. This means if eigher force_lock_settiings was explicitly
set to false or if the [campaign] or one of the [modification] provides
[options] to configure.
This removes a config reload when opening multiplayer or singleplayer
campaign selection screen after playign a campaign.
To do this we must make sure the default era for sp and for mp have the
same id becasue otherwise we might get an id not found error.
Instead of creating an enum, the MAKE_ENUM macro now creates a struct
which holds an enum and provides functions for enum <-> string
conversion.
This has multiple advantages:
1) We don't need MAKE_ENUM_STREAM_OPS anymore.
2) The generated struct is much easier to use in templates
3) We don't allow implicit to int conversions anymore.
4) The enum values are now declared inside the structs scope.
This was introduced in commit 8e5eb9a8d4,
probably because it's not clear enough in our implementation of MD5 that
the result of MD5::raw_digest() (and util::md5() by proxy) is not a
null-terminated string. I've added a comment to util::md5() to clarify
this in case it comes up again, but what we really should do is replace
the MD5 implementation with something a bit more C++-ish.
Fixed the issue by having the caller request the text representation of
the MD5 digest instead.