Commit graph

66063 commits

Author SHA1 Message Date
Charles Dang
717aa892d2 Preferences Dialog: extensive refactor 2016-09-07 12:23:36 +11:00
Charles Dang
84759a2713 Added flag to register_bool to enable an initial firing of the passed callback event 2016-09-07 10:52:18 +11:00
Charles Dang
df51776780 Added two small features to the status label helper
* Made the first argument twidget instead of twindow to allow passing grids
* Added a 4th argument for label id. Defaults to id + "_label"
2016-09-07 10:51:17 +11:00
Charles Dang
ba81174ade Updated CB projfile 2016-09-07 10:48:26 +11:00
mattsc
e7bd4bc4ef Default AI: fix bug causing units with max_moves=0 not to attack
The support parameter in the attack evaluation quantifies how much
power the AI can bring to an attack hex. This is supposed to include
the attacking unit itself. However, in some circumstances (such as when
the unit cannot move for one reason or another) this unit is not
accounted for. If no other units can get to this hex either, support is
(erroneously) set to zero, resulting in an attack score of zero, which
in turn results in no attack. Skipping the multiplication of the score
by support in this case does not affect comparison with other attacks
here, as this is by definition the only attack possible on the given
hex.

Note that the '!is_surrounded' conditional is also covered by 'support
!= 0' and can therefore be deleted.

This fixes bug #23720.
2016-09-06 16:45:50 -07:00
Celtic Minstrel
8d6e513671 Fix XCode warnings and add missing header ref 2016-09-06 18:48:14 -04:00
Celtic Minstrel
e3346fec78 Update XCode, scons, CMake 2016-09-06 18:26:39 -04:00
Celtic Minstrel
0180a72573 Fix lots of warnings in MSVC12
Some explanations:
- savepng uses setjmp, so I changed it to C; this guarantees that someone does not accidentally introduce a C++ object in it (unlikely though that is)
- The loop in multiplayer.cpp seemed intended to allow the command-line to request repeated plays, so the break was removed rather than refactoring it to an if statement
- Some uninitialized structs were changed to be zero-initialized
- Use luaW_toboolean instead of lua_toboolean
- Needed explicit constructor for vconfig iterators, since their only member is const
2016-09-06 17:55:00 -04:00
Celtic Minstrel
84e1f4ba4d MSVC: Ignore truncated type name warnings 2016-09-06 16:30:01 -04:00
Jyrki Vesterinen
bda24b3f93 Merge pull request #760 from jyrkive/editor-crashes
Fix crash on placing a unit with the scenario editor
2016-09-06 23:27:03 +03:00
Jyrki Vesterinen
e82fc498ac Remove the map parameter from the unit::is_visible_to_team() function
Now when the function receives the entire display_context and can get the
map from there, passing the map separately is unnecessary.
2016-09-06 23:03:10 +03:00
Jyrki Vesterinen
7573678201 Fix crash on placing a unit with the scenario editor
The unit::get_ability_bool() function accessed resources::gameboard that
is not set in the editor. Now the function receives the display context
as a parameter instead.

I also fixed two crashes on editor startup in MSVC debug builds (both
caused by indexing the teams vector when there aren't any teams), and the
GUI2 unit list dialog showing wrong status icons.
2016-09-06 23:03:09 +03:00
Charles Dang
f97dc8ae12 Fire a NOTIFY_MODIFIED in all places tselectable_-inherited classes use a custom callback
These custom callbacks should be refactored out
2016-09-07 07:00:17 +11:00
Celtic Minstrel
206096cc1e Fix ignored qualifiers warning 2016-09-06 12:43:54 -04:00
Celtic Minstrel
60c62bcabc Remove several hotkeys from the titlescreen scope 2016-09-06 12:43:22 -04:00
Celtic Minstrel
91bd6ab6d0 Fix returning invalid unit types (bug #25041) 2016-09-06 11:41:22 -04:00
Celtic Minstrel
b7455d3bd4 Remove suokko AI remnants 2016-09-06 10:29:52 -04:00
Charles Dang
f4ba176e1e Added a single-member group getter 2016-09-06 16:16:30 +11:00
Charles Dang
9918e0e3e8 Faction Select: made use of tgroup::set_member_active 2016-09-06 15:48:34 +11:00
Charles Dang
e6b0d1e841 Unit Create: don't show invalid gender options for the selected type 2016-09-06 15:45:43 +11:00
Charles Dang
41b254da31 Unit Type: implement helper to get whether a type has a specific gender variation 2016-09-06 15:33:02 +11:00
Charles Dang
5d6fe12ca3 Refactored tgroup to use a map 2016-09-06 15:33:01 +11:00
Celtic Minstrel
758315f533 Enable GUI2 themes 2016-09-05 13:43:58 -04:00
mattsc
ea744e1707 Update players_changelog and release notes 2016-09-05 10:34:04 -07:00
mattsc
4ec5a811ae Clean up release notes for 1.13.5+dev 2016-09-05 10:34:04 -07:00
gfgtdf
486e3ec1ee fix comment 2016-09-05 15:09:39 +02:00
Celtic Minstrel
36345ac56b Fixup whitespace 2016-09-05 02:10:02 -04:00
Celtic Minstrel
4ad1950669 MP Create: Honour developer's order for custom options
Plus two minor changes:
- Support [spacer] to add space between options
  (This may or may not be kept indefinitely)
- Deprecate the misleading [combo] in favour of [choice]
2016-09-05 02:10:02 -04:00
Celtic Minstrel
a4655b5ede MP Lobby: Re-enable Esc key to exit, now with confirmation 2016-09-05 02:10:02 -04:00
JaMiT
d46a327029 Missing file, moved files, and alphabetical order 2016-09-05 00:42:03 -05:00
JaMiT
24a4dd8062 Replace raw pointer with shared pointer 2016-09-05 00:23:40 -05:00
JaMiT
44741dc36d Add some const, virtual, and override qualifiers
Also a new non-const version of a wrapper.
2016-09-05 00:23:40 -05:00
JaMiT
4212a3c660 Doxygen for new function 2016-09-05 00:23:40 -05:00
JaMiT
a6d23581e1 Return mouse_action by reference instead of a not-null pointer
Plus the implementation of a previously-declared wrapper function
to get said mouse_action.
2016-09-05 00:23:40 -05:00
JaMiT
a422e657a4 Use editor_toolkit& instead of mouse_action** in palettes
This goes along with the principle of using references when a pointer
cannot be null. It's also better for data encapsulation to not give
someone the address of one of your private data members.
2016-09-05 00:23:40 -05:00
JaMiT
ee03df92ab Change a raw pointer to a shared pointer
This makes sure the memory is freed, addressing bug #24499, or at
least most of it.
2016-09-05 00:23:40 -05:00
JaMiT
e42f079d78 Use an existing typedef to simplify two declarations 2016-09-05 00:23:40 -05:00
Charles Dang
4d7df69428 Some cleanup/fixups on 7c663bc0a9 2016-09-05 15:05:33 +11:00
Charles Dang
7c663bc0a9 Added an helper function for creating bound status labels 2016-09-05 14:34:59 +11:00
mattsc
c03bd5411f Various Lua AI code: use simpler and faster new syntax
No change in behavior.
2016-09-04 18:54:26 -07:00
Celtic Minstrel
0b15dfd0fc Add many missing override annotations
This mainly fixes cases caught by -Winconsistent-missing-override,
so there are doubtless still many missing ones.
2016-09-04 16:07:55 -04:00
Celtic Minstrel
39a6726516 Enable tests for tooltips and several previously excluded dialogs 2016-09-04 16:07:55 -04:00
Celtic Minstrel
5141021234 Merge pull request #766 from GregoryLundberg/GL_fix_user_team_name
Fix bug: user_team_name is wrong
2016-09-04 15:04:46 -04:00
Gregory A Lundberg
2ecacdf5fe Fix bug: user_team_name is wrong
When pressing End Scenario and proceeding to the next scenario, the user_team_name shown on Menu|Status Table is incorrect.

If you Load (from the title screen) the saved scenario-start, the correct user_team_name appears.

This is caused by the random-shuffle feature for multi-player scenario. This fixes it for Single-Player campaigns and tries not to break it too badly for randomized Multi-Player campaigns.
2016-09-04 09:23:43 -05:00
mattsc
a6a7e79194 TRoW S15: correct side numbers in AI setup
This is not technically necessary as this value is overridden when used
inside a [side] tag, but it seems cleaner that way.
2016-09-04 07:19:21 -07:00
mattsc
56d30fc82b Merge pull request #764 from wesnoth/ai_high_xp_attack
New high_xp_attack candidate action for default AI
2016-09-04 07:02:40 -07:00
Celtic Minstrel
c29ea4e261 Fix tests 2016-09-04 03:22:19 -04:00
Celtic Minstrel
3e6fcc4450 Make some translatable variable names more descriptive 2016-09-04 01:09:38 -04:00
Celtic Minstrel
b82f4697cf Fix strict aliasing warning 2016-09-04 01:09:38 -04:00
Charles Dang
285372a2d1 Further Battle Princess animation updates by doofus-01 2016-09-04 15:07:40 +11:00