Commit Graph

37614 Commits

Author SHA1 Message Date
Iurii Chernyi
2a904a069a changelog entry and a bugfix for above 2009-12-23 17:59:33 +00:00
Iurii Chernyi
a67855e679 LoW: removed obsolete find_vacant in [unit], replaced it with placement=leader 2009-12-23 17:59:26 +00:00
Iurii Chernyi
aa255d94ce Rewrite of game_state::build_team to ease debugging and maintenance.
Allows an easy fix for 'unit not present or is duplicated' issues
when debug-hopping through campaign scenarios. Enforces uniqueness of
ids (when they're given) of units for the same side while handling
[unit] tags, both in [side][unit], [side] and in [event][unit]. 

Now there's 'if a unit with same id is in recall list, do a recall
instead of creating new unit'. Also, if the hex is occupied, the unit
will be placed in nearby hex. Thus, find_vacant in [unit] tags is now
obsolete.

A new WML attribute "placement" (default value is 'map,recall' for all
units except leader-given-directly-in-side, for which the default is
'map,leader') governs the way unit will be placed. 'map' means 'place
according to X,Y, if they point at a valid on-map location', 'leader'
means 'place next to leader or next to start position, if there's no
leader on map'. 'recall' means 'place to recall list'.  This fixes
(together with fendrin's fixes to WML) bug #14373, bug #14444, bug
#14451, and some of the issues described on forum.

Got rid of many old hacks, including one which will break some UMC:
previously, if there was a leader in recall list, it was used instead
of leader given directly in side. now this behavior happens only if
id's match. Removal of this hack is needed, because, if it had stayed,
it would be not as straightforward to specify multiple leaders per
side when some of them come from previous scenarios, and some of them
come from current scenario.
2009-12-23 17:59:18 +00:00
Guillaume Melquiond
a317fcc93a Converted tips of day to Pango rendering. (Fix for bug #14957.) 2009-12-23 15:24:24 +00:00
Guillaume Melquiond
445eaf6564 Conditionalized usage of deprecated functions. 2009-12-23 13:55:22 +00:00
Guillaume Melquiond
0f42610295 Simplified handling of unit types.
As a side effect, unit animations no longer appear as leaked for Valgrind.
2009-12-23 13:09:53 +00:00
Guillaume Melquiond
4b5806985f Plugged memory leak of Cairo surfaces. 2009-12-23 10:27:47 +00:00
Guillaume Melquiond
7ee4d6a6dd Commented out old fonts,
...since their ranges are overwritten by the shipped ones. In other
words, they will never be used if the new ones are in scope. This also
gets rid of a warning message.
2009-12-23 10:05:41 +00:00
Guillaume Melquiond
0f1b5c78c8 Merged consecutive ranges and the space inbetween.
Combined with the previous patch, the footprint of the character map
has been reduced from 1MB to less than 1kB.
2009-12-23 09:59:07 +00:00
Guillaume Melquiond
c1d8a61821 Reduced memory used for associating characters to font...
...by directly storing character ranges.
2009-12-23 09:59:02 +00:00
Guillaume Melquiond
c2f1a50074 Removed sigpipe ignore code and associated warning message.
The bug in SDL_Net has been fixed in early 2006.
2009-12-23 07:08:26 +00:00
Nils Kneuper
a35c6e002a updated Slovak translation 2009-12-22 20:54:46 +00:00
Guillaume Melquiond
823b0f7767 Fixed wild copy-pasting. 2009-12-22 19:51:26 +00:00
Ali El Gariani
ee467ecfb3 Save unit's waypoints (because we save goto)...
...in [waypoints] x=1,2,... y=1,2,..

Note that if a WML event changes the goto then waypoints are
discarded.  This is done by adding an extra last waypoint equal to
goto for consistency check (removed when loading), so WML can still
edit them if needed.
2009-12-22 17:33:00 +00:00
Guillaume Melquiond
8e0fecf726 Defaulted to warning level in order to catch some issues before 1.8. 2009-12-22 16:33:15 +00:00
Guillaume Melquiond
3f7d0acb57 Removed useless conditional. 2009-12-22 16:24:58 +00:00
Guillaume Melquiond
5394081e46 Initialized with dummy race earlier. 2009-12-22 16:24:54 +00:00
Guillaume Melquiond
1ca957e319 Removed useless conditional. 2009-12-22 16:24:49 +00:00
Guillaume Melquiond
1f878e48ac Removed low-level conversions. 2009-12-22 13:53:17 +00:00
Guillaume Melquiond
b7b00d0114 Removed low-level conversions. 2009-12-22 13:53:13 +00:00
Guillaume Melquiond
1a15d7622e Removed useless initialization. 2009-12-22 13:53:08 +00:00
Guillaume Melquiond
2a52e02844 Removed low-level conversions. 2009-12-22 13:53:04 +00:00
Guillaume Melquiond
07d643dc58 Removed low-level conversions. 2009-12-22 13:53:00 +00:00
Guillaume Melquiond
b79522c866 Removed low-level conversions. 2009-12-22 13:52:55 +00:00
Guillaume Melquiond
030637836b Manipulated unit states as booleans for improved performances.
Flag 'healable' needs some special casing: it is the only state in the
game with a reverted semantic (unset when present).
2009-12-22 13:52:50 +00:00
Ali El Gariani
987536f2c4 store waypoints in usual vector of locations...
...instead of list (was not worth the trouble)
2009-12-22 12:18:00 +00:00
Ali El Gariani
9b76d692e0 remove one unneeded include 2009-12-22 12:12:53 +00:00
Ali El Gariani
8672af2695 remove one unneeded include 2009-12-22 12:11:52 +00:00
Lari Nieminen
463b38ffe6 Used pixelmind's fire dragon portrait for Shek'kahan. 2009-12-22 07:21:46 +00:00
Nils Kneuper
39f3f58911 updated Latvian translation 2009-12-21 23:15:00 +00:00
Steven Panek
67f144c5d5 Added Chantal's missing portrait. 2009-12-21 23:01:29 +00:00
Eric S. Raymond
baa89688df Address bug #14978: Custom Chantal portrait...
...not used in the HttT Elves Besieged scenario.
2009-12-21 22:02:19 +00:00
Eric S. Raymond
ee929c7ef2 Make it easier to exclude directories for VCSes from resource trees. 2009-12-21 21:40:51 +00:00
Eric S. Raymond
64ad6085c0 wmlscope/wmllint cleanup. 2009-12-21 21:08:07 +00:00
Eric S. Raymond
57dd65255d Reindent mainline. Most of these changes are tab expansions. 2009-12-21 20:23:34 +00:00
Nils Kneuper
23f6ae570f remove the "Fireball" from TRoW since it is unused 2009-12-21 12:36:12 +00:00
Ali El Gariani
c544b380cb Temporaroly disable an assert preventing to test campaign's trunk
(problem caused by 2009-12-20T20:46:27Z!koraq@xs4all.nl). Note there is still a small icon glitch.
2009-12-21 12:02:24 +00:00
Steven Panek
f3e09dc178 Ran set-properties on the new portraits;...
...ran wesnoth-optipng on said portraits; saved 23 KiB; 3%.
2009-12-21 00:54:06 +00:00
Eric S. Raymond
7faa45ae12 Portraits of the Four Oracles for DM. 2009-12-21 00:47:07 +00:00
Benoît Timbert
03ca9bee67 French translation update 2009-12-20 20:54:00 +00:00
Mark de Wever
6395eca2a4 Use the new set_row_shown overload. 2009-12-20 20:46:43 +00:00
Mark de Wever
866b6a8844 Add an overload for set_row_shown.
Hiding one row at a time in the game_load dialog, when the filter
resulted in an empty set was slow. Every time a row was hidden the next
row was selected and its callback called. Directly after that the newly
selected row was hidden as well... The speedup is quite noticable.
2009-12-20 20:46:35 +00:00
Mark de Wever
39946e74aa Fix a redraw glitch when hiding a widget.
When hiding the grid in the game_load dialog it wasn't redrawn properly,
this fixes it. (The changes uncovering this problem will be committed
later.)
2009-12-20 20:46:27 +00:00
Mark de Wever
26de717da2 Rename set_row_visible to set_row_shown. 2009-12-20 20:46:20 +00:00
Mark de Wever
229470a84b Let set_row_visible call the selection update.
When the selection changes due to hiding rows the callback for a changed
value should also be called.
2009-12-20 19:35:16 +00:00
Mark de Wever
c636eaf402 Protect against no savegame selected in the list.
The filter can filter out all savegames, then the preview pane shouldn't
try to access an invalid index.
2009-12-20 19:35:13 +00:00
Mark de Wever
1200875a6e set_row_visible() can now properly handle sizing.
Before it always "worked" since set_visible in twidget calls
invalidate_layout(). Now only call invalidate_layout() if we failed to
handle the resize ourselves.
2009-12-20 19:35:09 +00:00
Mark de Wever
c0d4476ef1 Let content_resize_request() return a status.
This allows classes the try to handle the resize know whether suceeded
or not.
2009-12-20 19:35:06 +00:00
Mark de Wever
e45d341f6a Add a blocker for invalidate_layout().
This will be used by classes that can (partly) handle their own resizes.
2009-12-20 19:35:02 +00:00
Mark de Wever
3b69aec985 Comment out some undefined functions. 2009-12-20 19:34:58 +00:00