51543 Commits

Author SHA1 Message Date
J. Tyne
82b26cf7fe Merge an [if] into a [while] conditional...
...so we don't loop more often than is useful.
2013-01-31 23:37:06 +00:00
J. Tyne
4adfa2a576 Solve the "invalid WML array index" messages emitted...
...upon starting turn 2 of Dark Forecast.
2013-01-31 23:04:57 +00:00
J. Tyne
dbeba84088 Adjust the timing of when animations are played during movement.
This is (at least) a first step in resolving bug #20324 (choppy
movement on fogged maps).
2013-01-31 21:22:24 +00:00
J. Tyne
b4b32ca00c Clear haloes when extracting a unit.
This cleans up a display artifact at the beginning of Delfador's Memoirs (when
Methor moves in the opening scenario).
2013-01-31 20:58:05 +00:00
J. Tyne
efb6189879 Initialize a variable outside the loop where it is incremented.
This should allow the intended limitation of at most two spawns after
$final_turns.
2013-01-31 06:30:13 +00:00
J. Tyne
80638bdd0e Remove an unsed variable. 2013-01-31 06:22:54 +00:00
J. Tyne
b4a9505e0b Simplify the new_turn event that spawns the waves of creatures. 2013-01-31 06:22:27 +00:00
J. Tyne
7a6c382851 Don't waste time adding and subtracting zero. 2013-01-31 06:04:05 +00:00
J. Tyne
c9627819b2 Move a conditional earlier.
The logic is exactly the same, but this might read a bit better (and
is marginally more efficient).
2013-01-31 06:01:11 +00:00
J. Tyne
b98fcd866e Sides with no_leader=yes have no use for keys from SingleUnitWML. 2013-01-31 05:38:28 +00:00
J. Tyne
067b7bf620 Less round-about way to update the weather. 2013-01-31 05:26:41 +00:00
J. Tyne
72af74ca4d Simplify RANDOMIZE_INDEX, eliminating two temporary variables. 2013-01-31 03:50:25 +00:00
J. Tyne
8dc87d7d82 Simplify how some variables receive their values,
and remove some unused and redundant variables.
2013-01-31 02:15:51 +00:00
J. Tyne
c88846eefb Don't suggest the player can pay fractional gold. 2013-01-30 23:53:20 +00:00
Jérémy Rosen
0562337892 syntax simplification for sounds in animations 2013-01-30 21:52:46 +00:00
Jérémy Rosen
dc02698fa8 change syntax of square bracket animations, ~ is not used for range 2013-01-30 21:37:44 +00:00
Jérémy Rosen
c4308d0b23 fix compilation error du to comparing signed and unsigned
(only on newer gcc)
2013-01-28 20:50:39 +00:00
Alexander van Gessel
0cd7ab7f48 Apply patch #3622: remove old 'empty' leading animation...
...from drake flare and flameheart.
2013-01-28 20:37:04 +01:00
Nils Kneuper
f429b01c6e updated Italian translation 2013-01-28 07:00:07 +00:00
Jérémy Rosen
27f11c3c49 small cleanup on the animation expansion patch 2013-01-27 12:43:27 +00:00
Jérémy Rosen
5662cbcc38 new syntax for animation lines, simplifies mainline WML quite a bit.
patch by Coffee
2013-01-26 22:33:51 +00:00
J. Tyne
70351c6209 Improve the implementation of parenthetical_split()...
...and make it local to wml_actions.remove_unit_overlay().
2013-01-25 22:10:57 +00:00
Boldizsár Lipka
462afa50b4 Reintroduce NN-based scaling in a separate function.
(Was removed in 2013-01-23T11:51:49Z!lipkab@zoho.com)
2013-01-24 16:00:01 +00:00
Mark de Wever
51d837cf65 Adds -Wdocumentation to the CMake pedantic flags. 2013-01-23 19:59:27 +00:00
Mark de Wever
ce8a180548 Add a missing include for clang. 2013-01-23 19:57:24 +00:00
Mark de Wever
05f084ff14 Add a missing include for clang. 2013-01-23 19:57:01 +00:00
Mark de Wever
61e9a1daf8 Add a missing include for clang. 2013-01-23 19:56:40 +00:00
Mark de Wever
d5de7f87b5 Fix a GCC-4.3 compiler warning. 2013-01-23 19:56:11 +00:00
Boldizsár Lipka
906e484833 Removed the dedicated downscaling code from scale_surface(),
...use bilinear interpolation for everything.

It seems to have been intended to be a slower but fancier alternative
to the original nearest neighbour scaling. However, NN was replaced by
BI long ago and the removed algorithm doesn't seem to have any
benefits over BI.

The Pandora code is not affected.
2013-01-23 11:51:49 +00:00
Simon Forsyth
f5a4a83def New experimental CAs to improve village capturing and retreat when injured 2013-01-21 19:54:58 +00:00
Boldizsár Lipka
668445cb6b New scaling and tiling options for story screens. Partially implements bug #20435 2013-01-21 08:59:26 +00:00
J. Tyne
2ca09268c9 Moving some newish functions so the file is again ordered by class being implemented. 2013-01-20 21:50:24 +00:00
J. Tyne
92712c5b64 Small optimization:
unit_type_data::add_advancement() will only have an effect the first
time it is called for a given unit_type. So only call it once per
unit_type (instead of once per unit_type per build status).
2013-01-20 21:39:18 +00:00
Matthias Schoeck
d7176645e4 Update changelog with leader_ignores_keep aspect 2013-01-20 21:09:10 +00:00
Matthias Schoeck
b8f8677238 Fix a typo in the code (accidentally used 'and' instead of '&&') 2013-01-20 21:04:00 +00:00
J. Tyne
7bd9b7a056 Some readability and robustness changes to how unit_types are built.
(No functional changes.)
2013-01-20 18:22:35 +00:00
J. Tyne
d79877c733 Fix variations not being affected by [advancefrom] (in a different unit type). 2013-01-20 17:16:48 +00:00
Nils Kneuper
70b63dac4b updated French translation
fixed changelog to have 80 chars per line for the latest version
2013-01-20 09:01:26 +00:00
J. Tyne
7e3602822b Doxygen-fy a comment. 2013-01-20 04:39:56 +00:00
J. Tyne
a9734ce497 The wiki says that [unit_type]alignment= defaults to "neutral",
...so stop spitting out an error message when WML does not set it.
2013-01-20 04:38:27 +00:00
Matthias Schoeck
40c7046b5a Add new AI aspect leader_ignores_keep.
If set, AI leaders do not move to the closest keep at the beginning of
the turn.  Instead, they participate in the move_to_targets candidate
action (and all other CAs in which they already participated anyway,
of course).  The default value is 'no', which leaves the default
behavior unchanged.
2013-01-20 04:07:08 +00:00
J. Tyne
08925883f9 Changelog entry for 2013-01-20T02:43:38Z!jt_coding@verizon.net. 2013-01-20 03:06:14 +00:00
J. Tyne
d66a950a31 Keep track of the original unit type ID (variations can override it).
Use the original (base) ID when creating units.
2013-01-20 02:43:38 +00:00
J. Tyne
bdffe47578 When logging messages about unit_types, include an indication...
...if the type is a gendered subtype ([male] or [female]; not directly
related to gender=) and/or a [variation].

Gender appears in parentheses; variation name in square brackets.
2013-01-19 18:21:51 +00:00
J. Tyne
d971271d15 Have [unit_type] variations (including [male]/[female])...
...inherit their parent's ID, even if inherit=no.

If a variation is really supposed to have a blank ID, that can still
be accomplished by explicitly setting id="".
2013-01-19 17:01:48 +00:00
J. Tyne
0713c12a3f Add a "const" qualifier to unit_type::cfg_.
This was made possible by 2013-01-19T13:45:47Z!jt_coding@verizon.net, and reduces the number of
blank attributes inserted into the config. (Almost eliminates the
blank attributes in unit_type configs, but variations still get
"inherited=" inserted if it was not specified.)
2013-01-19 15:53:49 +00:00
J. Tyne
81159e7c42 Move processing of child configs from unit_type to unit_type_data::set_config().
It is a bit hacky to have unit_type modify the config passed as a
parameter to its constructor, especially when the modifications are
not done by the constructor.

As for performance, this change has little impact on the net time
taken by set_config(). While it does spend more time processing
configs, it takes less time building unit_types. The net result might
be a small increase in time, but any increase is comparable to the
variations in time seen amongst multiple test runs.
2013-01-19 13:45:47 +00:00
J. Tyne
6f2798d0dd New function: config::inherit_from().
This is a complement to config::merge_with(), as it does a merge
without overwriting.  This has a few uses in unit_types.cpp, and using
this function makes the code a bit easier to understand at a glance.
2013-01-18 16:44:22 +00:00
J. Tyne
fc4c27c8b3 Some tweaks to unit_type_data::set_config().
Most notably, this now checks to see if the insertion was successful
and logs an error if it failed (meaning two [unit_type]s had the same
id).
2013-01-18 14:18:57 +00:00
J. Tyne
7e4bdcd5ad Refactor the implementation of [base_unit].
The previous version could fail if a unit type had multiple base
units, if it was defined before those unit types, and if those unit
types themselves had base units. (The config merge would lose a base
unit's base unit.)
2013-01-18 05:45:07 +00:00