57784 Commits

Author SHA1 Message Date
Mark de Wever
34126ca66a Fix compilation with CMake. 2014-06-28 10:21:59 +02:00
Chris Beck
089f9e9239 add copyright notice 2014-06-28 00:17:08 -04:00
Ignacio R. Morelle
559e03c071 Add missing include guards 2014-06-27 22:30:36 -04:00
Ignacio R. Morelle
fc13d09019 notifications.cpp uses _(), include gettext.hpp
Fixes Windows builds.
2014-06-27 22:30:35 -04:00
Ignacio R. Morelle
0050fdda65 Readd copyright notices
Apparently lost in commit cb5a9a0d28ed4761272fcad65001c376445cc7d6.
2014-06-27 22:30:34 -04:00
Ignacio R. Morelle
fc1afefccb Resort wesnoth-main_SRC in CMakeLists.txt 2014-06-27 21:59:27 -04:00
Ignacio R. Morelle
fc834885e2 Resort CodeBlocks project file 2014-06-27 21:56:07 -04:00
Chris Beck
ed3453f742 move some utility files to utils folder 2014-06-27 19:06:18 -04:00
Chris Beck
10a6f4bf38 cleanup notifications preprocessor instructions, for readability 2014-06-27 18:26:36 -04:00
Chris Beck
d2edec5921 move notifications files to their own folder 2014-06-27 18:14:45 -04:00
Chris Beck
14fc744d9e fixup SDL2 notifications
fixes up series of commits:
cb5a9a0d28ed4761272fcad65001c376445cc7d6
fafb03bafb72b16572e2a794fbd0210879c8d26f
2014-06-27 18:05:53 -04:00
Chris Beck
33ae8d7398 move bar drawing code from display to unit_drawer
That's the only place it is used.
2014-06-27 17:53:48 -04:00
Chris Beck
6fd7845597 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-27 16:35:10 -04:00
Chris Beck
fafb03bafb fixup SDL2 compilation 2014-06-27 16:34:51 -04:00
gfgtdf
ea61f1759b Merge pull request #226 from gfgtdf/config_comparision
add operators ==,!= (attribute_value, std::string)

previously comparisions like c["a"] = "b" were evaluated by 
inline bool operator==(const std::string &a, const t_string &b) 
by casting atribute_value to std::string, and const char * to t_string

we fix this by adding explicit equality operator for these cases.

Not creating t_string also results in significant preformance improvements in some cases.
2014-06-27 22:33:42 +02:00
Chris Beck
cb5a9a0d28 add display chat manager, notifications support outside game_display
The functionality of tracking observers and displaying chat messages
is moved to a manager class, which the gui owns.

The functionality of displaying notifications is similarly moved out
of the game_display and to a private namespace. (Static singleton
pattern seems okay here since there really won't need to be more
than one of these for a single application, it seems.)
2014-06-27 15:57:57 -04:00
gfgtdf
5089669eb9 extend attibute_value unit test 2014-06-27 21:05:43 +02:00
gfgtdf
606becd24b fix unit(_type)::resistance_filter_matches
fix use of operator == (atribute_value, char*)
2014-06-27 19:21:10 +02:00
gfgtdf
484d926c30 fixup use of operator !=(attribute_value, const char*)
since we don't use t_string's == operator anymore in this case, c["a"]
!= "" will evaluate to true in case of "a" beeing not existent. To get
the desired behaviour we need to use the .empty() method.

I also add an assert in map_generation for a possible segfault that i
noticed during fixing this.
2014-06-27 19:16:35 +02:00
gfgtdf
852b698132 add operators !=(attribute_value, std::string) 2014-06-27 17:56:06 +02:00
gfgtdf
8d8248f369 fixup 'add operators == (attribute_value, std::string)'
we need to keep the code form using these functions in case of c["a"] ==
0
2014-06-27 16:36:46 +02:00
gfgtdf
4d73031680 add operators == (attribute_value, std::string) 2014-06-27 16:36:45 +02:00
Chris Beck
b0e407ac66 move halo::manager from play_controller to display
Also this removes the need to have it in the editor.
2014-06-27 10:36:15 -04:00
Chris Beck
1010fbee77 pass halo::manager as an argument to unit frame redraw fcn 2014-06-27 09:52:31 -04:00
Chris Beck
2b42441214 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-27 00:03:36 -04:00
Chris Beck
6666dca651 fixup safebool syntax in halo::handle
There was a subtle flaw introduced by using safebool in halo_record,
but defining the handle as a pointer to this -- the pointer also
is castable to bool so it makes mistakes very easy. We replace the
safe bool stuff with a function "valid" of halo_record, and fixup
the places that were supposed to be using this test.

Also move the NO_HALO variable back to the header.

fixes up commit 82c6b98907d9709aef0d23a3846c1e75ac48e1d5
2014-06-27 00:03:15 -04:00
gfgtdf
06a3a859fa remove unneeded variable 2014-06-27 05:17:42 +02:00
gfgtdf
5739429c39 remove unneeded variable 2014-06-27 05:17:41 +02:00
gfgtdf
8f9b5414b5 make a variable const 2014-06-27 05:17:40 +02:00
gfgtdf
139d6252dd add update_label function to saved_game 2014-06-27 05:17:39 +02:00
Chris Beck
83d9976526 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-26 22:22:06 -04:00
Chris Beck
a226e6dc10 fixup halos segfaulting
fixes up commit 82c6b98907d9709aef0d23a3846c1e75ac48e1d5

Use smart "handles" for halos which have been added to a halo
manager. The handles remember what manager they came from, and
delete themselves automatically on destruction.

This wasn't an issue when haloes were basically managed by a
C library, but if we want to get rid of the static singleton
system, the handles need to be smarter than just int's.
2014-06-26 22:18:57 -04:00
Ignacio R. Morelle
9e447d1e3a gui2/taddon_filter_options: Allow filtering TC core add-ons 2014-06-26 20:54:37 -04:00
Ignacio R. Morelle
90e9ec3b2f wesnothd/fuh: Fix instances of std::string initialized from time_t(0)
Fixes the build with the fuh enabled on clang 3.3:

> src/server/forum_user_handler.cpp:206:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
>   return time_t(0);
>          ^~~~~~~~~
> src/server/forum_user_handler.cpp:215:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
>   return time_t(0);
>          ^~~~~~~~~

A time_t(0) is cast equivalently to a null pointer, and an empty C
string is equivalent to a null pointer for std::string instantiation.
2014-06-26 19:58:44 -04:00
Ignacio R. Morelle
050aab785c Revert "new_release: Workaround race condition in wesnothd SIGHUP handler"
This reverts commit 62eb55a5a712b3e2157cf7fc0bb12873c4f0a574, since it
was superseded by a real fix in 6629fdf64e7db529db574f2f8f6600ebd797d5ff.
2014-06-26 19:44:39 -04:00
Ignacio R. Morelle
991b68a128 wam/html: Add add-on type labels for campaign_sp_mp and mod_mp 2014-06-26 19:17:54 -04:00
Chris Beck
673c44512f Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-26 18:54:30 -04:00
Chris Beck
82c6b98907 halo uses handle-body instead of static singleton idiom 2014-06-26 18:45:45 -04:00
Chris Beck
dc9585af62 fixup minimap in case teams is null 2014-06-26 18:45:44 -04:00
Andrius Silinskas
cef9f78468 Added 'faction_lock' and 'leader_lock' for MultiplayerWML.
These attributes work similarly as all other lock attributes such as
'gold_lock': 'faction_lock' locks faction selection, while 'leader_lock' locks
both leader and its gender selections.

These attributes were added to fix #21978.
2014-06-26 22:01:20 +01:00
Turuk
d8514c3275 LoW S10: Added "or" to objectives
Previously the objectives were written in a way that indicated the
player would need to complete both.
2014-06-26 16:37:58 -04:00
Turuk
f24eed9efd LoW S9: Message on Dwarf Recruitment
Current message read as if Kalenz could recruit dwarves.  It has been
changed to make it clear that only Olurf can recruit dwarves for Kalenz.
2014-06-26 11:26:24 -04:00
Turuk
4fbcb93372 LoW S7: Dialogue change/Message Fix
Dialogue changed to have proper English formatting.  Eradion death
message fixed to remove potential of an enemy side expressing concern
over his death.
2014-06-26 10:08:21 -04:00
Chris Beck
e62553139c move is_observer to gameboard, with accessor in playcontroller 2014-06-26 00:40:53 -04:00
Chris Beck
f5a9de40d5 move village_owner function to display_context
I would have liked to put it in game_board, but it is needed for
reports so it can't go there
2014-06-25 22:22:07 -04:00
Chris Beck
221863b893 remove unnecessary include from header, despite what iwyu tool says 2014-06-25 21:07:40 -04:00
Chris Beck
236e26e794 Revert "attempt to fix travis compilation"
This reverts commit 6e3e8990e8a1b2cbcddf6738c7b63a5cfd0fc4a5.
2014-06-25 20:23:34 -04:00
Chris Beck
7c6e47d7e7 attempt to fix travis compilation 2014-06-25 20:05:49 -04:00
Chris Beck
6e3e8990e8 attempt to fix travis compilation 2014-06-25 19:53:49 -04:00
Chris Beck
399ec11ddf fixup includes in headers, started as just config, but led to more
The changes in config required changes in ai/contexts which
cascaded, also many places were throwing game::game_error without
including its definition except from config.
2014-06-25 19:20:11 -04:00