57756 Commits

Author SHA1 Message Date
Chris Beck
4c06902df5 fixup an include
This unordered_map thing was totally unnecessary and this header
is included everywhere. From the logs it looks like the boost
unordered_map is a fairly expensive include.
2014-06-19 10:52:27 -04:00
Chris Beck
6b4ad80a65 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-19 10:25:59 -04:00
Chris Beck
0182224407 remove unnecessary include
This include is apparently totally unnecessary and we compile fine
without it.
2014-06-19 10:25:16 -04:00
Ignacio R. Morelle
5044300e44 validator: Update changelog for previous three commits 2014-06-19 03:35:32 -04:00
Ignacio R. Morelle
0e8b3afedf validator: Make missing attribute error format more consistent with the rest
Instead of:
> In tag slider_definition which begins here,  missing key id

Use:
> Missing key 'id=' in tag [slider_definition]

Since otherwise the wording is very awkward with the new format (the
file:line line comes after the error), all other key-related messages
use "'key='" to denote attribute names, and there's a double-blank typo
that was there even before I first touched this code.
2014-06-19 03:31:41 -04:00
Ignacio R. Morelle
b58a2d6ba1 validator: Remove redundant "on line N" output fragments
They were redundant even before my changes.
2014-06-19 03:31:41 -04:00
Ignacio R. Morelle
eed4ae8a52 validator: Conform to the new parser and preprocessor output style
Because I overlooked the validator's dependency on the preprocessor
lineno_string() function, we wound up with badly-formatted output like
the following:

> 20140619 03:16:32 error validation:
> gui/default/widget/slider_minimal.cfg:53
>     included from gui/default.cfg:30
>     included from gui/default/widget/slider_minimal.cfg:100
>     included from gui/default.cfg:30: tag [wrong_tag] may not be used in [resolution]

This commit changes the validator's error formatting functions to
produce output more akin to the parser/preprocessor under the new
scheme introduced in version 1.11.10:

> 20140619 03:17:36 error validation: Tag [wrong_tag] may not be used in [resolution]
> at gui/default/widget/slider_minimal.cfg:53
>     included from gui/default.cfg:30
>     included from gui/default/widget/slider_minimal.cfg:100
>     included from gui/default.cfg:30

There are no translatable strings involved in this change, so this
commit may be safely backported to 1.12.
2014-06-19 03:31:30 -04:00
Ignacio R. Morelle
8a30f348b1 gui2/tchat_log: Use a separate proper label for the page number text
This replaces the page number slider with a "minimal" variant slider and
an adjacent label widget whose text we enter manually.

The label format is "<PAGE>/<COUNT>" and it's untranslatable. Hopefully
this shouldn't cause any localization issues since it's all numbers and
we currently can't use alternative numeral systems anyway.

I'm leaving the page slider's maximum_value_label attribute intact just
in case this needs to be reverted later, since it's going into the 1.12
branch too.
2014-06-19 02:40:16 -04:00
Ignacio R. Morelle
a286bf1908 gui2/tslider: Add minimal variant without a text label
The default variant's text label is both inflexible in content (can't
customize the format for non-edge values) and layout (reserves way more
space than it needs at a time for its text label, often resulting in
huge horizontal gaps between a slider and an adjacent widget). This
makes it unsuitable for use in gui2::tchat_log.

This new minimal variant will be wired into gui2::tchat_log next.
2014-06-19 02:40:16 -04:00
Turuk
f39142c676 Fixed Gold arguments. 2014-06-18 23:18:56 -04:00
gfgtdf
0ac850847f fix a segfault
scope_active_.size() = SCOPE_COUNT, so scope_active_[SCOPE_COUNT] is
undefined behaviour.

it seems like in add_hotkey it can happen that
hotkey::get_hotkey_command(item.get_command()).scope return SCOPE_COUNT
for wml hotkeys
2014-06-19 01:10:39 +02:00
Chris Beck
d5cc615bfa Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-18 18:42:24 -04:00
Chris Beck
8481b90b96 move game_display::footsteps_images into game_display.cpp
It is not called by any other compilation unit, so it's better to
internalize it and avoid being forced to declare SDL surface in
the header if possible etc.
2014-06-18 18:36:17 -04:00
mattsc
4b10e1b9fb Update Xcode project 2014-06-18 15:32:41 -07:00
Chris Beck
3e2d27f58a add --debug=time to scons line in travis
This might help to figure out why builds time out and what parts
of the compilation process are slow.
2014-06-18 17:59:55 -04:00
Chris Beck
44a0752cb4 fake unit manager returns a range rather than & to container 2014-06-18 17:52:24 -04:00
Chris Beck
fd9379e276 fixup 13155c4f41c7d60f9dec1e323eaa9477a54aaec3
In this commit, the order in which fake units vs real units was
changed without realizing the significance. Comments near to the
fake_units code makes it clear that the fake units are intended
to be drawn after the real units, so that e.g. when the whiteboard
is used, the fake units draw over the real ones.
2014-06-18 17:17:49 -04:00
gfgtdf
876b24b531 dont forward declare return values in msvc <= 2010
this is a known compiler bug of msvc <= 2010
2014-06-18 22:57:32 +02:00
gfgtdf
a0e47b95ab dont forward declare return values in msvc <= 2010
there is a known compiler bug in these versions.
2014-06-18 22:52:30 +02:00
Chris Beck
bc9de36508 Merge pull request #209 from cbeck88/reference_counting_in_animations
use UnitPtr (intrusive_ptr) in unit_animations
2014-06-18 16:04:17 -04:00
Chris Beck
45b2db4e24 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-18 15:49:38 -04:00
Chris Beck
94d68dc322 disable all tests on gcc builds, to prevent timeouts
It seems that we cannot avoid the segfault without adding gcc-4.8
download and install to the test sequence, but this seems to push
us over the time limit consistently. In this commit, go back to
using gcc-4.8 but disable everything but the wesnoth target itself
for the gcc build to save time.
2014-06-18 15:48:28 -04:00
Turuk
0b3ea2a36e Altered WML that allowed for 4 difficulty levels. 2014-06-18 15:38:27 -04:00
Turuk
9e0b9ab6f0 Altered WML that allowed for 4 difficulty levels. 2014-06-18 15:36:23 -04:00
Turuk
54b8fd9581 Altered WML that allowed for 4 difficulty levels. 2014-06-18 15:32:27 -04:00
Turuk
0b18d2aac5 Altered WML that allowed for 4 difficulty levels. 2014-06-18 15:25:08 -04:00
Turuk
2e5eafc2c6 Altered WML that allowed for 4 difficulty levels. 2014-06-18 15:08:54 -04:00
Turuk
a062c17ebe Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:50:54 -04:00
Turuk
b7b74b4b96 Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:45:37 -04:00
Turuk
a12340c3d5 Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:42:45 -04:00
Turuk
8e645c4605 Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:30:41 -04:00
Chris Beck
823d8c2d38 use UnitPtr (intrusive_ptr) in unit_animations
In this commit the unit * in unit_animation is changed to a smart
pointer. This is to prevent the unit_map or some other object
from destroying the unit and creating a dangling pointer
(reported to cause segfaults).

In this commit, we also change the fake_unit class to make sure to
increment the refcounter when the fake_unit is constructed. The
reason is that the fake_unit holder is supposed to own that unit
and let it expire when it goes out of scope. No smart pointer is
supposed to delete it.

This mechanism should possibly be revisited, for example the
fake units could also be held in a reference counted pointer.
With the current system it is still possible that the fake_unit
will go out of scope and be destoryed while the animation is still
alive, this change only prevents smart pointers from destroying it
before it goes out of scope.

I also comment out the reentry_preventer class uses in
unit_animation.cpp, to prevent assertions from happening when I
test for example with the "double debug kill" version of the bug.
The reentry_preventer seems to be unnecessary now.

This addresses bug #18921 and maybe others.
2014-06-18 14:30:13 -04:00
Turuk
ac36feeee1 Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:17:19 -04:00
Turuk
85913e2ac2 Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:13:43 -04:00
Turuk
130574cd9a Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:12:23 -04:00
Turuk
9ad308501e Altered WML that allowed for 4 difficulty levels. 2014-06-18 14:07:03 -04:00
Chris Beck
32848679ad Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-18 14:05:45 -04:00
Chris Beck
458c2f0f06 set travis back to gcc 4.6 version
The gcc-4.8 patch requires travis to download and install gcc-4.8
from an ubuntu ppa. This takes a few mintues and the gcc build is
already fairly close to the timelimit, so this change can push
some builds over the edge. Since it doesn't seem to be strictly
necessary right now, I comment out the code for v 4.8 install.
2014-06-18 14:04:33 -04:00
Turuk
46f5ff36d3 Altered difficulties= 2014-06-18 14:03:59 -04:00
Chris Beck
bc4b4a9569 remove declarations of fcns that we were moved
fixes up a4b194c0794d360dc6eff5c464c6634941dff5da
2014-06-18 14:03:47 -04:00
Turuk
a15c39fe17 Changed from 4 to 3 difficulty levels for balancing.
Revamping difficulty levels to aid in upcoming balancing for "expert" campaign.
2014-06-18 14:03:20 -04:00
Chris Beck
c3ad891fba Merge pull request #208 from cbeck88/add_recall_list_mgr
add recall list manager
2014-06-18 13:54:29 -04:00
Chris Beck
a4b194c079 add recall list manager
This commit adds a dedicated recall list manager class.

The purpose of this is to

- Simplify the code that interacts with the recall list. Prior to
the commit most such code was based on iteration with explicit
iterators, and called global helper functions implemented in
unit.cpp to wrap the code that finds a unit in a vector. It turns
out that interacting with the recall list was the *only* use of
that code, so we make it a member function of the recall list
manager and take it out of unit.cpp.

Most of the code that touches the recall list was previously
7 or 8 lines with a for loop, now it tends to be 1 or 2 lines,
although further refactor may be possible.

- Improve encapsulation. This makes it possible to track how
other classes are interacting with the recall list, and may
make it easier to debug recall list problems by adding debugging
output to the class.
2014-06-18 12:54:32 -04:00
Chris Beck
12515a6466 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-18 11:33:31 -04:00
Chris Beck
000c71a2c2 fixup 9e7dc5ba008298d823c13cff214f7477601b5efd
The scoped_ptr<unit> construct which was used previously in
actions/create.cpp is unnecessary after this commit, and it seems
like it could be related to this error report:

http://wesnoth.org:8080/job/Wesnoth/branch=master,compiler=default,label=Debian7-64/185/consoleText

The most significant change of this commit is that
unit_creator::add_unit now does not make a "temporary" unit
instance from the cfg, and then copy construct it. From source
inspection that step appears to be unnecessary, and it somewhat
obfuscates the meaning of this code in actions/create.cpp
2014-06-18 10:52:40 -04:00
mattsc
9593d10050 Update Xcode project 2014-06-17 17:50:11 -07:00
Chris Beck
393a16e871 favor to return a smart pointer in ai/actions recall_unit 2014-06-17 19:32:26 -04:00
Chris Beck
d119fe7e18 fixup the fixup
this fixes up a0b849596cabf8ed801dacb6707001ad944dc0a5
2014-06-17 19:20:13 -04:00
Chris Beck
a0b849596c fixup 9e7dc5ba008298d823c13cff214f7477601b5efd 2014-06-17 18:47:59 -04:00
Alexander van Gessel
3fe799a091 Change run_wml_tests failure exit code from 1 to 2
xvfb-run returns 1 when it fails, so this way we can differentiate.
2014-06-17 23:40:41 +02:00