57745 Commits

Author SHA1 Message Date
Chris Beck
34a7454696 restore openmp parallelization in display.cpp
This was removed in 4a997873485a6be4b511ea11241ec0349c8410fc
2014-06-23 12:55:01 -04:00
Chris Beck
4bb55f4ab8 make fake_unit_manager foreachable, drop the "range" getter 2014-06-23 12:45:46 -04:00
Alexander van Gessel
e2e82e88b6 Merge pull request #215 from gfgtdf/hotkey_scopes
Hotkey scopes
2014-06-23 18:01:47 +02:00
Chris Beck
c1f3af2cbd Merge branch 'fake_unit_ptr' 2014-06-23 11:18:56 -04:00
Chris Beck
0f5876fe38 change fake_unit class to fake_unit_ptr
This is consistent with the introduction of the UnitPtr class.
fake_units really aren't different from units, the only difference
is their life time / allocation and ownership. Since we are trying
to use reference counting for all units (to make them safe to use
with animations), the fake units need to be managed by a reference
counted pointer also. This is the easiest way to achieve that.

I also remove some odd code the [move_units_fake] handler --
there was explicit code to remove the fake units from the fake
unit manager, but this is redundant as it is the responsibility
of the destructor.

Code Blocks and VC project files are updated, but
Code::Blocks Scons and Xcode are not.
2014-06-23 11:17:55 -04:00
Alexander van Gessel
54e0bd92c9 Prevent infinitely recursive macros (bug #20126)
We simply use the system already in place for file inclusions, and bump the
limit up to 100 to appease compulsive macro users.
2014-06-23 17:00:08 +02:00
Paweł Jackowski
ed06d2526f Two Brothers: Polish translation update
Two Brothers: Polish translation update, updates delivered by Wesbane.
2014-06-23 02:51:24 +01:00
Charles Dang
04098fd82a Merge pull request #217 from AlainODea/grammar_tut1_victory
Grammar: missing preposition in tutorial 1 victory
2014-06-23 12:37:04 +11:00
Nathan Walker
be366af523 Implemented defines for largest mainline scenarios 2014-06-22 15:37:53 -05:00
Nathan Walker
b53461e075 Fixed reloading for commandline mp 2014-06-22 15:33:48 -05: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
Alain O'Dea
877e897f72 Grammar: missing preposition in tutorial 1 victory 2014-06-22 16:37:44 +00:00
Chris Beck
e803a9d12d Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-21 22:11:07 -04:00
Chris Beck
14808e186b add unit test for an object-based "feeding" ability
based on tekelili's forum post here:
http://forums.wesnoth.org/viewtopic.php?f=8&t=40449#p572206
2014-06-21 22:08:32 -04:00
David Mikos
0997a1c4bf Fix initial MP dep check on first scenario instead of last played. Menu size workaround removed. 2014-06-22 10:05:42 +09:30
Chris Beck
0f7b06cd1a fix a broken include guard (typo) 2014-06-21 18:52:30 -04:00
Chris Beck
762efc278f add error reporting to [insert_tag] if it has no variable= field
The lack of reporting here is somewhat annoying so i patched it.
2014-06-21 18:13:42 -04:00
gfgtdf
436be9a306 more flexible hotkey scopes
there are some hotkeys that are senseful in editor and in game but not
in teh main menu, so now instead of having hotkeys eigher in GAME,
EDITOR, MAIN_MENU or GENERAL we now allow any combination of the first
3.

this is also intended to fix a bug in add_hotkey() if new_scope ==
hotkey::SCOPE_COUNT where new hotkeys doesn't correctly overwrite other
scoped hotkeys.
2014-06-21 23:44:24 +02:00
Chris Beck
c7c69f260b Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-21 16:59:17 -04:00
Chris Beck
5e9d356c9f unit tests for defining custom event handlers in events and firing 2014-06-21 16:58:40 -04:00
gfgtdf
7e3ba43934 use std::bitset instead of vector<bool>
for hotkey scope.
2014-06-21 22:04:23 +02:00
gfgtdf
86f0f97e22 add const 2014-06-21 22:03:50 +02:00
gfgtdf
74188182c2 enable [message] side_for key with options
or text input.

Note that if used together with text_input side_for cannot be a list,
only a single number.
2014-06-21 19:05:52 +02:00
gfgtdf
0b5c8142c6 add comment in show_caryover_message 2014-06-21 17:02:56 +02:00
gfgtdf
ff11e85925 fix gold carryover
we need side["income"] + game_config::base_income instead of just
side["income"]
2014-06-21 17:02:54 +02:00
Chris Beck
f8a4347262 Use delayed screen rebuilding with lua terrain fcn
This is a fixup for ac59b0d0e72c706a6e14fe59cb77ceaabcc7bce2
2014-06-21 10:39:46 -04:00
Ignacio R. Morelle
da8f3c824c NR: Search for White Magi respawn locs only within map edges (bug #22097)
Without this, the engine may match map borders and send the respawnee
back to the player's recall list as those count as invalid locations
like "recall","recall".
2014-06-21 10:17:42 -04:00
Ignacio R. Morelle
ce33ba394a NR: Refactor the White Magi respawn location finding code into a macro
This bit was subject to a particularly bad case of code copy-pasting
when the only real variable is the id of the first respawn hub
candidate.

Added a statement to clear the respawn_hub WML variable after running
the code since it's never used again afterwards.
2014-06-21 10:07:33 -04:00
Ignacio R. Morelle
45e8753cc5 Apply local ToD lighting to hex overlays when applicable (bug #22215)
This replaces map-wide ToD lighting with local ToD lighting for overlays
associated with locations that have custom local ToD lighting. The
method employed for this is more or less the same already used by
display::get_terrain_images() bar the complications associated to
dealing with terrain transitions, since overlays don't have those.

Note that for this to have an effect, local ToD lighting must be enabled
in Preferences -> Advanced. This is the default since Wesnoth 1.10.x.

This patch is more noisy than I expected, so it might require some
additional testing before landing in 1.12 to ensure it does not
introduce any regressions.
2014-06-21 09:19:35 -04:00
aquileia
3abfb483cd Reintroduce <algorithm> include 2014-06-21 14:40:04 +02:00
Mark de Wever
d8409507ae Improve CVideo::get_available_resolutions.
If there is a main window use that else fall back to the original code.

Based on a patch by AI0867.
2014-06-21 14:17:36 +02:00
Timotei Dolean
572ac8ea66 Merge pull request #214 from aquileia/VC_update
Update VC project
2014-06-21 14:59:39 +03:00
timotei
7fdbf0c166 Update the UMC IDE developer manual 2014-06-21 14:29:21 +03:00
Mark de Wever
6cd0bdc23d Mark some functions static. 2014-06-21 12:22:14 +02:00
Mark de Wever
ef104ed833 Fix Clang documentation warnings.
The string //<< is seen as documentation comment instead of normal
comment.
2014-06-21 12:21:12 +02:00
Mark de Wever
f574695899 Fix compilation with SDL2.
Commit cec386ad35a1d5ddb9b721d3c66abc091e8ca68f broke compilation due to
removing an required include.
2014-06-21 12:20:21 +02:00
Ignacio R. Morelle
1554374c45 CodeBlocks project update 2014-06-20 22:15:26 -04:00
Ignacio R. Morelle
6e90e01d70 Add a test case for bug #22215 2014-06-20 21:51:17 -04:00
aquileia
28e12a73aa Update VC project 2014-06-21 03:39:41 +02:00
gfgtdf
cad1db07d5 replace a warning with an assert.
the warning was a temporary because there was a bug in the code that would have caused this assertion to fail. Since that bugs was fixed, i replaced it with an assert.
2014-06-21 03:31:20 +02:00
Andrius Silinskas
9de5d02097 Don't lock controller when 'use map settings' is unchecked.
This partially fixes #21978.
2014-06-20 11:04:01 +01:00
Alexander van Gessel
fb63278540 Merge pull request #207 from aquileia/VC_update
Fix VC and OpenMP build
2014-06-20 11:38:22 +02:00
Ignacio R. Morelle
9cdb9cd321 gui2/tgame_cache_options: Add to GUI2 tests 2014-06-19 22:04:54 -04:00
Chris Beck
9120cbeff1 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-19 21:12:29 -04:00
Chris Beck
ab5658b3d8 remove unnecessary include 2014-06-19 21:12:12 -04:00
Ignacio R. Morelle
d48ad2440e Merge branch 'feature/cache-manager' 2014-06-19 20:45:28 -04:00
Ignacio R. Morelle
17c8d568d5 gui2/tgame_cache_options: New Preferences subdialog for cache management
It allows the user to browse to the cache (using a desktop API call),
copy its path to clipboard, clean the cache contents (deleting stale
files), or purge it entirely.

This is ideal for people sticking to the same cache dir for very long
and thus keeping content that was generated by previous versions of
Wesnoth they might not even use anymore. Purging the cache might also
aid troubleshooting (although there is a --nocache switch for that too).

The dialog also makes Wesnoth slightly more transparent about its own
disk usage, information which may not be readily accessible to people
without the technical know-how to locate a hidden directory.

For now it's accessed by pushing a button in Preferences -> General,
even though this is not ideal since it is actually Advanced Preferences
material given the nature of the cache. Unfortunately, the Advanced
page's layout is currently monopolized by the advanced preferences
options and I'm not interested right now in solving that UI design
puzzle; it will have to wait, much like the Paths dialog has done and
continues to do for 1.12.
2014-06-19 20:43:36 -04:00
Ignacio R. Morelle
3154af156a Add functionality to clean or purge the cache to game_config::config_cache
Cleaning the cache removes all stale cache files (files that do not
match the current cache's naming pattern), and purging removes
*everything* in sight in the cache dir.

Ideally we would clean the cache every once in a while without asking,
but for now there will be a user-controlled option to allow doing this
by hand.
2014-06-19 20:43:36 -04:00
Ignacio R. Morelle
c5e81ca5f5 fs: Add dir_size() function to obtain the total size of directory's contents 2014-06-19 20:43:36 -04:00