Commit graph

75 commits

Author SHA1 Message Date
Jyrki Vesterinen
670bcf71a3 Address a bunch of Coverity Scan warnings 2017-09-01 23:24:04 +03:00
Celtic Minstrel
74cff96475 Vary victory laurel in campaign select, depending on the difficulty beaten at
(No change to the laurel in difficulty select.)
2017-08-14 12:36:08 -04:00
Celtic Minstrel
25a0d099a9 Enable sorting campaign list in chronological or lexicographical order 2017-08-14 12:36:07 -04:00
Jyrki Vesterinen
56433d12a3 Merge branch 'login_save_crypt' 2017-05-22 20:10:09 +03:00
Celtic Minstrel
96ca0b026e Replace config_of with new variadic config constructor 2017-05-21 16:27:46 -04:00
Celtic Minstrel
9365538b3b Don't store the user's password in plaintext in the prefs file
The game now supports @ or = in usernames for the purpose of saving them to a file.

Though I don't think these are allowed currently, it's probably better to
support it from the start rather than having things break if they later
become allowed.
2017-05-12 15:56:41 -04:00
Charles Dang
e4f03fe459 Moved all preferences source files into a single folder 2017-05-04 11:04:19 +11:00
Charles Dang
e0f3ce428d Cleaned up unnecessary uses of get()->
This applies both to uses of smart pointers and the SDL_Surface wrapper (surface).
2017-04-30 23:47:34 +11:00
gfgtdf
c41aafd96d fix memleak in scenario start
https://gna.org/bugs/?25677
2017-04-27 00:26:58 +02:00
gfgtdf
25d7110c8c use std::scoped_ptr where appropriate 3 (filesystem code) 2017-04-14 13:48:37 +02:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Charles Dang
e19255c4fd Create Engine: major refactor of game list storage and code cleanup
This greately reduces the need to manually add handling of new game types and the long switch statements
where every single game type was checked.
2017-02-24 10:10:05 +11:00
Charles Dang
d435d861f2 Create Engine: removed surface getters from type classes 2016-11-12 13:10:24 +11:00
Charles Dang
c6bf9359d8 Create Engine: GUI1 markup and include cleanup 2016-11-12 13:02:36 +11:00
Gregory A Lundberg
d31555f8cf Pedantic includes
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.
2016-11-11 11:00:22 -06:00
Celtic Minstrel
10b6a34615 Rename all GUI2 dialogs to drop t- prefix
This also places them in a new dialogs namespace.
2016-11-09 01:27:30 -05:00
Celtic Minstrel
a1967ec16a Rename twml_exception -> wml_exception 2016-11-09 01:17:14 -05:00
Celtic Minstrel
6513d6ac01 fixup! Fix Lua-invoked dialogs not showing before prestart
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.
2016-10-20 03:21:39 -04:00
Charles Dang
b6ea5106ca Moved marked-up_text.*pp to font/ 2016-10-16 22:54:07 +11:00
Charles Dang
ebc8ddfb78 Move certain text constants into the constants file 2016-10-16 22:07:37 +11:00
Charles Dang
9b6fc78690 Revert "MP Create: basic implementation of saved games as their own category (debug only)"
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.
2016-10-05 05:53:06 +11:00
Charles Dang
de8a4270a4 Forgot to include this in d88f591eb5 2016-10-02 02:58:57 +11:00
gfgtdf
e8bf29c241 clean some includes
this contains a fix in  playcampaign.cpp where an object was accidently
copied.
2016-09-16 22:35:41 +02:00
Charles Dang
9a569df848 MP Create: basic implementation of saved games as their own category (debug only) 2016-09-08 18:53:58 +11:00
Charles Dang
a232b0c2cb MP Create: disable Settings button if generator doesn't allow settings 2016-09-03 16:47:53 +11:00
Charles Dang
8b60904074 Create Engine: added method to get active mod data 2016-09-02 12:53:50 +11:00
Charles Dang
7ec92eb754 Create Engine: if only one difficulty is defined, use it without a dialog prompt 2016-08-31 10:35:02 +11:00
Charles Dang
88726caebc Fixup typo from 6b3f9d8cbd 2016-08-19 13:41:01 +11:00
Charles Dang
6b3f9d8cbd MP Create: much more efficient method of game filtering 2016-08-19 13:37:23 +11:00
Charles Dang
90c3c05af4 MP Create: improved handling of campaign difficulty selection
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.
2016-08-19 12:33:00 +11:00
gfgtdf
f124dd179c gui2 mp create improvements 2016-08-17 14:41:30 +02:00
Jyrki Vesterinen
8d1cb23f82 MP create: fix UB if filter excludes all campaigns/scenarios/maps 2016-08-11 22:41:54 +03:00
Charles Dang
05092ba2f6 Refactor most boost pointer related stuff to use their stdlib counterparts
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.
2016-07-25 09:28:42 +11:00
Celtic Minstrel
ca382018b7 BOOST_FOREACH -> range for 2016-04-02 09:38:29 -04:00
Charles Dang
0936066bf3 Fixed initializing of mp scenarios
Was accidentally broken in 876710af8c.
2016-04-01 02:00:23 +11:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04: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
bc711f5f43 Consolidate related files into subdirectories 2016-03-20 16:20:09 -04:00
Celtic Minstrel
fe0df45947 Consolidate formula and hotkey files in corresponding dirs 2016-03-20 16:15:50 -04:00
gfgtdf
2369d3f9ae clenaup more includes
this changes some class member types to scoped pointer so that we can
remove an include from the header.
2016-01-16 23:42:02 +01:00
gfgtdf
93c53df6d8 remove display dependency from mp connect code.
and from codes that are used by it, specially the loadgame and the
networkrecieve dialog.
2016-01-12 23:18:01 +01:00
gfgtdf
bb546c17bc remove display dependency from map_generator 2016-01-12 23:11:07 +01: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
Elvish_Hunter
9b7b1751fd Removed trailing tabs and whitespaces from C++ source
I used this command line: find <source directory> -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
2015-12-21 20:39:46 +01:00
Charles Dang
591b1aa6be Give new [difficulty] tag precedence over old difficulties= syntax 2015-12-16 19:49:20 +11:00
Charles Dang
7a1b5c80ff Fix a crash when entering a campaign with no difficulties provided
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().
2015-12-16 19:47:17 +11:00
gfgtdf
7f13156c28 Revert "Rename team_name/user_team_name to team_id/team_name (old syntax still valid)"
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..
2015-12-10 21:29:52 +01:00
Charles Dang
3781e7839f Rename team_name/user_team_name to team_id/team_name (old syntax still valid) 2015-10-26 00:44:28 +11:00
Charles Dang
bdaddd9a4f New syntax for campaign difficulty
This replaces the old format using the tlegacy_menu_item syntax with a new one using a [difficulty] tag.
The only syntax is still supported for now
2015-09-29 15:35:39 +11:00
Lipka Boldizsár
6d64baa207 Remember modifications separately for sp and mp.
Fixes bug #23617.
2015-07-27 01:27:36 +02:00