Commit graph

24 commits

Author SHA1 Message Date
Martin Hrubý
50301f84e3 Fix building with Xcode 10 (#3460)
Resolves #3458.
2018-08-16 15:06:00 +03:00
Martin Hrubý (hrubymar10)
bc4d22dc72 Migrate links to https if available - Fwd c18537edc0 2018-07-16 19:07:08 +11:00
Charles Dang
b8d051cb72 Moved game version stuff from game_config.hpp to version.hpp
They're still in the game_config namespace but are now in a more logical header.

game_config::version has been replaced with wesnoth_version.str(), save for one case
where it was replaced with wesnoth_version directly (it was a comparison against another
version_info object; no need to compare against a string...).

Also cleaned up a bunch of game_config.hpp includes.
2018-04-04 22:08:18 +11:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Charles Dang
1bfa170856 Backend changes to allow uses of proper display names for missing content in MP Lobby
For Campaigns, I needed to store the campaign name in the classification info.

For Eras, I repurposed the mp_era_addon_id key I added a year ago in d88f591eb5. It wasn't used anywhere
else, and having a better name for missing eras was the original reason to add it. I'm not sure why I
didn't think to use the name directly at the time; I do seem to have used addon_id for mod names too, but
that was changed in 5a55899b83 and again now (see below).

For Modifications, I added the relevant mod name to the server data. Why only this type of content
required a server change I'm not entirely sure. :/ This also finally properly fixes #1794.
2017-10-27 02:00:15 +11:00
Charles Dang
e2a6979f60 Game Classification: formatting cleanup 2017-10-27 01:49:51 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Charles Dang
e22c8967ee Cleaned up global.hpp includes 2016-12-17 15:21:04 +11:00
Charles Dang
4d48ed1319 Cleaned up util.hpp includes 2016-12-08 14:21:18 +11:00
Charles Dang
71b154b6e3 Refactored out savegame::savegame_config class
This was basically an unnecessary stub class. It also allows us to
remove the unused soundsource::manager::to_config() function (write_sourcespecs()
did the actual job).
2016-04-05 18:10:44 +11:00
Charles Dang
a0a8836bbe Used to_string() method instead of enum::enum_to_string() when possible 2016-04-01 02:41:17 +11:00
Charles Dang
876710af8c Use std::to_string() or equivalent wherever possible
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.
2016-03-31 11:18:51 +11:00
Celtic Minstrel
baed863df0 Don't include config.hpp when possible
Instead, try to forward-declare it only.
2016-02-23 15:41:34 -05:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
gfgtdf
f01fe682bc use parse() instead of lexical_cast_default() for MAKE_ENUM types
this is faster, specially becasue it doesn't throw an exception if the
string is no valid enum value.
2015-12-03 01:39:10 +01:00
gfgtdf
7df9c043d0 don't convert [scenario] to [multiplayer]
This should fix the :cl list which previously did not show all scenarios.

Also it speeds up config reloading becasue previously the contents of every [scenario] were copied multiple times when reloading the game config.

I don't know why the [scenario]s were converted to [multiplayer] in the first place.
2015-07-21 17:32:35 +02:00
gfgtdf
0b5e0b42c5 More spmp fixes
refactors out common expressions
game_classification::get_tagname/is_normal_mp_game()

Change some mp_configure defaults from mp campaigns to match the
defaults of sp campaigns (note that since campaigns have
force_lock_settings=yes by default this does not really matter)

Also we simplify how mp_wait reloads the game config.
2015-07-21 17:32:32 +02:00
gfgtdf
da1c8bf60e rewrite MAKE_ENUM macro
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.
2015-06-04 02:08:02 +02:00
gfgtdf
641d59e4bc remove game_classification::completion member
this member was never read just written
2015-03-01 15:40:52 +01:00
gfgtdf
dbb75bdd47 add oos debug mode and mp_debug_checkup class
The game sometimes does some checkup to test whether the calculated results in a replay match the ones calculated during the original game.
This data was stored in the replay inside the [command] for that action. The problem is that this doesn't work in networked mp because we often send the [command] before calculating the results.
I added an alternative mode that used get_user_choice to compare the results, this also works in networked mp but it causes a little more network traffic.
2015-01-08 17:09:07 +01:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Nathan Walker
99b3bd2699 Add define functionality to modifications.
Added a new method, void create_engine::prepare_for_era_and_mods(),
which sets era and mod in game classification.
Prepare_for_[scenario, campaign] then set their respective defines and reload.

Conflicts:
	changelog
	src/gamestatus.cpp
	src/gamestatus.hpp
2014-06-22 15:33:36 -05:00
Nathan Walker
b5fbda3530 Implement define= for mp scenarios and eras
Implemented reloading of configs with define= attributes in both mp_create and mp_wait::join_game().
Added myself to about.cfg and updated changelog.

Conflicts:
	changelog
	src/gamestatus.cpp
	src/gamestatus.hpp
	src/multiplayer_wait.cpp
2014-06-22 15:29:14 -05:00
gfgtdf
63c07fea3e move game_classification to its own file 2014-06-17 00:12:42 +02:00