68335 Commits

Author SHA1 Message Date
Celtic Minstrel
e3b5213f21 Update changelog
[ci skip]
2017-04-11 23:55:06 -04:00
Celtic Minstrel
fcc0da5bd4 Some cleanup of attack_type usage for enable_shared_from_this safety
- Call shared_from_this() instead of taking the address
- Don't use raw pointers to attack_type
- Change some cases of attack_type objects that weren't owned by a shared_ptr
  (either owned by another object or allocated directly on the stack)

List of files that currently call attack_type constructors:
- game_events/conditional_wml.cpp
- gui/dialogs/unit_attack.cpp
- scripting/lua_unit_attacks.cpp
- units/types.cpp
- units/unit.cpp

Each of these has been individually considered and made safe for use with
enable_shared_from_this. (Most of them already were safe.)
2017-04-11 17:15:38 -04:00
Charles Dang
2ca105e146 convert attack_type to use shared_from_this instead of instrusive_ptrs 2017-04-11 17:15:37 -04:00
Charles Dang
2a017b4862 Fixed duplicate key (typo) 2017-04-12 08:07:37 +11:00
Charles Dang
0c3260dc05 Finished deploying std::map::emplace (cont. e1a579da51)
Apparently, the last time I did this I only grepped for `insert(std::pair` not `insert(std::make_pair`. Oversight, much?
2017-04-12 07:51:42 +11:00
Charles Dang
a9e499bb64 Cleaned up register_*_property functions
Marked inline to fix unused function warnings
2017-04-12 07:32:05 +11:00
Charles Dang
e9eb98743e Gamestate Inspector: attempt to fix memleaks 2017-04-12 05:42:57 +11:00
Jyrki Vesterinen
c4be6a7ec8 Don't trigger relayout when a widget is hidden during initial layout
This fixes the add-on list not showing up when the player connects to an
empty add-on server with --new-widgets enabled.
2017-04-11 21:32:53 +03:00
Jyrki Vesterinen
aa762995e2 Add tooltips to add-on manager buttons 2017-04-11 21:32:53 +03:00
Charles Dang
f948d02509 Select Orb Colors: attempt to fix memleak 2017-04-12 05:26:53 +11:00
Charles Dang
07895df087 Outro: updated comments
[ci skip]
2017-04-12 05:10:59 +11:00
Charles Dang
117f1fc4c9 Outro: switch fade handling to hook into DRAW events instead of using a timer
This is safer since a timer ins't always guaranteed to run at the specified time.
2017-04-12 04:52:42 +11:00
mattsc
c590149102 Update Xcode project 2017-04-11 07:10:15 -07:00
Charles Dang
920f36d6df Updated CB projectfile 2017-04-11 16:26:36 +11:00
Celtic Minstrel
28184b3629 fixup! GUI2 Canvas: Add tile_center resize mode 2017-04-11 01:08:58 -04:00
Celtic Minstrel
898f9ea0c7 GUI2 Canvas: Add tile_center resize mode 2017-04-11 01:05:51 -04:00
Celtic Minstrel
aefbea950b Fix WFL debug output using an invalid vector 2017-04-11 01:01:19 -04:00
Celtic Minstrel
169cc9245e Some canvas documentation fixups 2017-04-11 01:01:18 -04:00
Celtic Minstrel
dde91f9a77 Move canvas shape class definitions into private header 2017-04-11 01:01:16 -04:00
Celtic Minstrel
1b42378bdc WFL: Add colon to debug_print() output with two parameters 2017-04-11 01:01:13 -04:00
Charles Dang
22ef217d38 Fixup cd08fab 2017-04-11 15:16:25 +11:00
Charles Dang
cd08fab8e4 Story Viewer: don't spawn floating image draw timer if delay is 0 2017-04-11 13:52:26 +11:00
gfgtdf
4608c2d368 wesnoth.set_dialog_value can now unfold treeview nodes (#978) 2017-04-11 03:59:22 +02:00
Celtic Minstrel
3d0bd73803 Fix behaviour of [heal_unit]amount= for negative/zero values (#979) 2017-04-10 21:58:46 -04:00
Celtic Minstrel
3f61eda282 Fix [animate_unit]amount=0 healing 1 hp 2017-04-10 21:31:15 -04:00
Charles Dang
e369e10eee Story Viewer: disabled title background for now
It's causing placement issues with some titles...
2017-04-11 03:37:18 +11:00
Charles Dang
c452a4cc25 Revert "Story Viewer: only show upper gradient if no title is present"
This reverts commit 512723055953580bc67c2772e928e475cd3cba2f on the behast of zookeeper.
2017-04-11 03:26:08 +11:00
Charles Dang
15daebd149 Outro: fixed text being shown for approx 2.5 seconds longer than specified
I was performing a value check on fade_step in the timer, and then multiplying it fivefold in the alpha
calculation, meaning full alpha was reached long before the fade in sequence stopped and the duration timer
was initialized.
2017-04-11 03:19:17 +11:00
Charles Dang
142ced01e1 Multipage: made add_page return the grid of the newly added page 2017-04-11 02:59:09 +11:00
Charles Dang
bbd9463b17 Story Viewer: fixed all floating images drawing in the same spot
Since all the floating images' data was set with a formula that relied on a canvas-wide variable whose value
was constantly changing and no serialization was done, the formulas all evaluated to the same location.

To fix this, we do away with the use of the variables and insert the necessary values directly into the formula
string.
2017-04-10 16:12:47 +11:00
gfgtdf
7e5e1e762f attempt to fix faction info sometimes missing in [side]
http://gna.org/bugs/?25638
2017-04-09 20:07:04 +02:00
Jyrki Vesterinen
cec90f5379 Update Visual Studio project 2017-04-09 18:56:15 +03:00
Charles Dang
528e6b89b8 Fixup 08d25b0 2017-04-10 01:15:48 +11:00
mattsc
4d76be9d61 Update Xcode project 2017-04-09 07:10:17 -07:00
Charles Dang
61aa601a6f GUI2/Canvas: converted other shapes to use formulas for their color handling
For rectangles, color_t::null_color() needs to be specified as the default since typed_formula
utilizes the default type ctor if no default value is provided. In this case, color_t's default
ctor returns opaque white, which doesn't mesh well with GUI2's drawing.

Other shapes don't get this default value, since color is essentially mandatory for them, whereas
in rectangles either fill_color or border_color may be omitted.
2017-04-10 00:02:49 +11:00
Charles Dang
c379b7ccc9 Added getter for null color 2017-04-09 23:59:21 +11:00
Charles Dang
08d25b0542 GUI2: refactor typed_formula to make code cleaner
Essentially, I delegated the call to variant::evaluate to the operator() function and not the execute
specializations, which are now passed he resulting variant instead.

That and a ton of formatting and a bunch of moving stuff around.
2017-04-09 23:36:27 +11:00
Charles Dang
8ed11e7506 GUI2/Canvas: removed [line] alpha= key in favor of evaluating color as a formula 2017-04-09 22:04:11 +11:00
Charles Dang
53adf0ba1a Story Viewer: enforce at least 200 height for the story box
[ci skip]
2017-04-09 21:57:34 +11:00
Charles Dang
dec0fd6dfd Convert outro screen to GUI2
It's the screen that shows 'The End' at the end of an SP campaign.
2017-04-09 21:37:16 +11:00
Charles Dang
10f867bd7e GUI2/Canvas: evaluate text color as formula 2017-04-09 21:37:15 +11:00
Celtic Minstrel
57efa5cf47 Ad f_color to GUIVariable wiki page 2017-04-09 02:07:24 -04:00
Celtic Minstrel
7835e05d93 Fix [animate_unit][facing] not working.
This also tweaks the animator:add() API, replacing the facing key
with a target key and requiring it to be an adjacent location.
2017-04-09 01:29:10 -04:00
Charles Dang
e1a579da51 Deployed std::map::emplace en-masse 2017-04-09 15:40:13 +11:00
Charles Dang
76f92a205f Enable new storyscreen by default (but not remove the old one yet)
Also removes an unnecessary trigger_full_redraw call from the new codepath.
2017-04-09 15:13:00 +11:00
Charles Dang
3b88044816 Minor fixup to 92d1a26caf17 2017-04-09 15:06:47 +11:00
Charles Dang
92d1a26caf Attempt to fix memleak when quitting the game with music enabled (bug #25092) 2017-04-09 15:00:27 +11:00
mattsc
be3cf5fa62 Update Xcode project to fix linker warnings
This fixes several warnings of this type:
ld: warning: direct access in return_to_play_side_exception::execute()
to global weak symbol typeinfo for lua_jailbreak_exception means the
weak symbol cannot be overridden at runtime. This was likely caused by
different translation units being compiled with different visibility
settings.
2017-04-08 19:12:05 -07:00
Celtic Minstrel
88280285ee Fixup non-virtual destructor 2017-04-08 21:15:32 -04:00
Celtic Minstrel
abcd235fdb Merge pull request #972 from wesnoth/lua_ai_fallback
Add fallback_human() action to the Lua AI
2017-04-08 20:36:49 -04:00