57600 Commits

Author SHA1 Message Date
Ignacio R. Morelle
6e90e01d70 Add a test case for bug #22215 2014-06-20 21:51:17 -04: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
Ignacio R. Morelle
8601c79647 Cache the config cache files prefix
No pun intended.

This micro-refactoring step will be required for introducing
functionality that requires to know the config cache files' naming
pattern.
2014-06-19 20:43:36 -04:00
Chris Beck
2415df79b8 turn on vebose logging on travis, to see about strict mode 2014-06-19 20:24:19 -04:00
Chris Beck
7951ba5f1a Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-19 20:14:48 -04:00
Chris Beck
377410723a fixup: initialize ref_count_ to 0 in units 2014-06-19 20:13:26 -04:00
Chris Beck
52c5bf44ab add unit drawer, remove drawable_unit
This avoids the casting to superclass, and it's also a bit faster,
in the refactor of the redraw_unit function we cache all the values
from display that we need locally.
2014-06-19 20:08:34 -04:00
aquileia
9f92dacabb Fix VC project files 2014-06-20 01:51:21 +02:00
aquileia
4a99787348 Fix OpenMP compilation
Delete a #pragma that tries to paralellize a BOOST_FOREACH loop. This
doesn't work as boost inserts lines before the for, thus hindering the
compiler to find the 'for'.
2014-06-20 01:51:17 +02:00
Alexander van Gessel
ad7cf1317d Merge branch 'master' of github.com:wesnoth/wesnoth 2014-06-20 01:30:36 +02:00
gfgtdf
11bd01b91a added test checks in intrusive_ptr_add_ref/release 2014-06-20 01:30:07 +02:00
Alexander van Gessel
bde0a3ab52 Special-case si_string(0) so we don't get 0.0 yocto-whatever 2014-06-20 01:29:07 +02:00
Alexander van Gessel
ebaea5812d Rewrite some logic so C++11 considers it a boolean context 2014-06-20 01:26:24 +02:00
gfgtdf
af2d16a0d2 remove code duplication of unit advancements
the advancemnts after [unstore_unit] and after attacks now use the same
function.
2014-06-19 22:01:35 +02:00
gfgtdf
0e3b185f62 fix servergenerated replays
if this is a reloaded game then we dont need to add [start]
2014-06-19 22:00:44 +02:00
Chris Beck
7dfc3760e6 remove unnecessary include 2014-06-19 15:44:16 -04:00
Chris Beck
19f85dffcb move SDL threading includes out of header 2014-06-19 15:34:16 -04:00
Chris Beck
6b477dad0d remove unnecessary include 2014-06-19 15:22:08 -04:00
Chris Beck
aa999669c1 Merge branch 'include_guards_on_boost_function' 2014-06-19 15:09:00 -04:00
Chris Beck
c4c69d6d79 remove unnecessary include 2014-06-19 15:08:12 -04:00
Chris Beck
184ea58c85 fixup previous commit
(bool) ptr -> static_cast<bool> (ptr)
2014-06-19 14:39:44 -04:00
Chris Beck
a570e5b88f fixup previous commit
(bool) ptr -> bool (ptr)
2014-06-19 14:37:37 -04:00
Chris Beck
8a18fa1e40 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-19 14:35:28 -04:00
Chris Beck
cd596499b5 fixup an implicit cast to bool 2014-06-19 14:35:09 -04:00
mattsc
474b8990d8 Return Guardian MAI: fix bug when path to return hex is blocked
Such as when the unit is surrounded.
2014-06-19 11:30:02 -07:00
Chris Beck
06b05067b5 finish fix up in aabdd2969aa5430614a1c1bfe249a88aca7e8fdd 2014-06-19 14:01:02 -04:00
Chris Beck
8f0fe88635 put include guards on boost/function
According to clang boost/function.hpp does not have include guards,
and from inspecting clang diagnostics we include it many times
in several compilation units. This commit adds an external include
guard to all of our includes of this header, it was made using

find . -type f -exec sed -i 's/^#include <boost\/function\.hpp>$/\n#ifndef I

and inspecting the results.
2014-06-19 13:58:58 -04:00
Chris Beck
aabdd2969a fixup travis 2014-06-19 13:47:34 -04:00
Chris Beck
54f4b77966 inline functions using expensive boost includes in map_location
From running scons with compiler flag -H it seems like these
actually include quite a bit, and most of it does not have
include guards.
2014-06-19 13:18:33 -04:00
Chris Beck
267ebd3385 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-19 12:54:58 -04:00
Chris Beck
a43fbf79f9 fixup 16da9a707437
needed to use boost::uint8_t
2014-06-19 12:53:31 -04:00
mattsc
1491934224 Random Recruit Micro AI: fix bug with custom castle terrain
Previously, only terrain with C or K in the terrain code passed the
SLF.  Now we check whether the hex is a castle instead, independent of
the terrain code.
2014-06-19 09:33:17 -07:00
Turuk
475bcf504d NR S1 Dialogue/Map Update
The dialogue was changed to make it less basic, and the map was altered
to have the player start in the West, with Al'Tar now to the North.
This enables the player to be more actively involved in the battle
earlier on in the scenario.
2014-06-19 12:17:48 -04:00
Chris Beck
8aa0d99ff2 fixup includes (put inside the include guard) 2014-06-19 12:17:30 -04:00
Chris Beck
16da9a7074 fixup 871f2f4591cf
Use the boost cstdint include like we do in the rest of the
project
2014-06-19 12:12:45 -04:00
Chris Beck
871f2f4591 fixup includes, use uint8_t in key.hpp instead of Uint8 2014-06-19 12:09:52 -04:00
Chris Beck
cec386ad35 fixup includes in clipboard 2014-06-19 11:51:59 -04:00
Chris Beck
9b4756964f fixup includes 2014-06-19 11:48:08 -04:00
Chris Beck
10d78ba4a5 fixup includes 2014-06-19 11:36:45 -04:00
Chris Beck
98922ff0af fixup unnecessary include 2014-06-19 11:19:15 -04:00
Chris Beck
78b538bc1f fixup includes, remove include SDL.h from src/events.hpp 2014-06-19 11:11:05 -04:00