443 Commits

Author SHA1 Message Date
Ignacio R. Morelle
59a198a6e8 Added tooltips to Load Game dialog (feature/bug #18249) 2012-02-07 19:06:27 +00:00
Fabian Müller
bbe14565f6 Enabled difficulty reselection with the gui1 dialog. 2012-02-07 13:35:22 +00:00
Ignacio R. Morelle
394c77f3d4 Restore leader unit image in Load Game dialog (bug #18683)
(Candidate for 1.10 branch.)

This functionality is back with a slight change to 2010-11-29T19:46:11Z!shadowm@wesnoth.org in order to
left-align the map snapshot only when the leader image cannot be loaded.
We also no longer spam stderr with errors about missing leader images
(which can be caused by unloaded campaigns or eras).

Anonymissimus pointed out this functionality was still found in the GUI2
version of the dialog (--new-widgets). Whoever last changed the saved
games summary code probably only bothered to update this experimental
code without fixing the normal GUI1 dialog. As I pointed out in the
tracker, the layout code was still in place.

As a compromise for the time being, we always assume the "magenta"
palette for TC recoloring now. This doesn't seem to be a problem since
the old code already made an annoying assumption of side 1 using the 1
(red) color range instead of permiting the use of the side.color value,
or reflecting the currently playing side number at the time of the save
generation.

I may later extend the saved games summary to include additional
information to get rid of the magenta and side 1 limitations.
2012-02-04 20:45:05 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Anonymissimus
87e5d3d790 Revert revisions of mine: 2011-11-09T00:22:25Z!anonymissimus@arcor.de, 2011-11-10T21:18:53Z!anonymissimus@arcor.de
These were the variable substitution delaying in the [object] code. It is
no longer needed due to the workaround [object]delayed_...=yes|no.

Removes repeated WML parsing. Reverts behavior to mostly what was in 1.8
If ABILITY_TELEPORT is added by an [object], or [object][effect][filter]
contains $this_unit, delayed_...=yes is required for the modifications
to work as expected.

However, if the same object wants to get variables substituted and
add ABILITY_TELEPORT to a unit, the code would have worked in 1.8
but doesn't in 1.9.
(bug #18893, bug #19225)
2012-01-02 22:12:02 +00:00
Alexander van Gessel
28a740309d Fix help-links from sidebar for female abilities. (bug #18745) 2011-12-11 21:46:30 +01:00
Anonymissimus
1f539b39c8 delay/add variable substitution in unit::add_modification (fix for bug #18893) 2011-11-09 00:22:25 +00:00
Ignacio R. Morelle
666a29ab49 Load Game: convert "Scenario start"...
...savegame designation to use Sentence case as the recently
introduced "Test scenario" already does

Also added pofix rule for the two textdomains where this appears.
2011-10-30 21:35:24 +00:00
Ignacio R. Morelle
077803dfa8 Give test scenario saves a proper internationalized...
...(and properly capitalized) campaign type label
2011-10-18 00:32:05 +00:00
Ignacio R. Morelle
a7b8a743f0 Fix inconsistent capitalization of "replay" in the Load Game dialog sidebar 2011-10-18 00:27:23 +00:00
Alexander van Gessel
328ab64d6f Partially restore 2011-09-29T15:55:30Z!thonsew@yahoo.com, which fixes bug #18745.
This version is flawed though, and does not yet work for female units.
2011-10-12 17:41:16 +01:00
Alexander van Gessel
81e0a2007f Revert token t_token commits from 2011-09-08T19:15:40Z!thonsew@yahoo.com on. 2011-10-10 03:43:29 +01:00
Steven Panek
e3a8810756 Added an option in advanced preferences
that allows the twelve-hour clock format to be used.
2011-10-03 11:56:40 +00:00
Thonsew
befbcc93a7 Fix for bug #18745:
(It is now impossible to jump to ability topics from the sidebar in
most translations)

Changed all vectors of ability_tooltip objects to be vectors of
t_strings.  Previously, sometimes they passed std:string and sometimes
t_strings. This meant that the help index was a t_string->translated
string ->t_string ->base_str(), where the base string was actually a
translated string.  The tooltip was passing
t_string->translated_string as index which, although inconsitent
worked.

Now when the tooltip is created it uses the translated string as the
visible string and the base_str() as the index into the help, as
intended but not done in the original code.
2011-09-29 15:55:30 +00:00
Mark de Wever
b4d927e967 Strip trailing whitespace. 2011-09-26 20:27:15 +00:00
Thonsew
786d6c0d67 Fix for bug #18665, bug load index not being rebuilt.
Restored correct behavior of inserting configs for saves that are
missing index enties.
2011-09-24 19:03:28 +00:00
Thonsew
88b5546118 Attempt to fix static de-initialization problems.
Some compilers are calling destructors for static objects before other
static objects use them in their destructors.  This patch initializes
static t_interned objects with new and intentionally doesn't call
delete in order to guarrantee their existence throughout the static
de-initialization phase.  It creates a new function
generate_safe_static_const_t_interned for this purpose.  It might
address bug #18666, although I can not duplicate the crash with gcc on
fedora 15.
2011-09-20 21:21:31 +00:00
Thonsew
eb46598888 Fixed bug #18682 load dialog bug where all times were 1969,
...by changing incorrect iterator from i to j on line 624.  Bug #18683
is not fixed by this patch.  Other bug in the series are bug #18665,
bug #18649
2011-09-20 21:20:42 +00:00
Thonsew
64e01de038 Fixed loading saved games without replays, which were being ignored 2011-09-16 19:30:01 +00:00
Thonsew
b60f39b0ec Fixed bug #18649 Trying to load game causes segfault.
The game and their summaries were de-coupled.  I placed them in a
single structure to guarantee correspondence.
2011-09-16 12:28:43 +00:00
Thonsew
d2690e0cc6 Move anonymous namespace static const t_token...
...into function local scope in order make sure control flows over
them and initializes in the correct order.
2011-09-11 18:21:49 +00:00
Mark de Wever
24c055cd44 Strip trailing whitespace. 2011-09-10 11:52:18 +00:00
Mark de Wever
6fab2f4a24 Fix compilation with -DLOW_MEM. 2011-09-10 11:24:16 +00:00
Thonsew
d56fbf14fe Upgraded unit_animation and unit_frame to use t_token and t_interned.
1. Changed std::strings to t_token when used as indices.

2. Made a frame_parsed_parameters token resulting in upto 25% memory
savings if unit animations are on for a large variety of units.
2011-09-08 19:17:48 +00:00
Thonsew
3a41db7acd Updated unit_types to use t_token...
...in place of std::string and to replace std::map with
boost::unordered_map in the t_move_cost_cache, both to increase speed.
2011-09-08 19:17:31 +00:00
Thonsew
82e7d2c6f8 Made load dialog faster when there are many saved games.
1. Added a child_range_index member function to config to generate an index

2. Changed the load dialog from the O(N^2) search for saved games to a
O(N) listing.
2011-09-08 19:17:20 +00:00
Thonsew
9ce82aec1a Upgraded game_events.cpp...
...and files that interacted with game_events to use t_token in place
of std::string for config objects
2011-09-08 19:16:49 +00:00
Thonsew
576a3feab1 Updated parts of unit class to use t_token...
...in place of std:string in order to speed up comparisons, copies and
hashing which are 1 cycle operations.

Added z_sub t_token.

Added lru_cache unit test
2011-09-08 19:16:26 +00:00
Mark de Wever
5160664c4c Add another user of tgame_delete class.
This also fixes the behaviour that closing the dialog with 'no' still
stored the status of the preference.
2011-03-13 07:49:21 +00:00
Anonymissimus
8692f22dc5 add fire_event=yes|no key to [unstore_unit]...
...for advance/post advance events if there is an advancement
2011-02-25 18:57:01 +00:00
Nils Kneuper
42a2ff7e85 use the smallgui load dialog as default,
...otherwise with <600px vertically there will be glitches

the load dialog is a mess anyway and waiting for a rework done in GUI2
once stuff like treeview and such is available
2011-02-14 11:32:48 +00:00
Nils Kneuper
a9c341e278 "tiny gui support"-removal part 1:
removed all the if(n)defs from the sources (please review that I got
everything right!)

TODO: remove from build systems and data/
2011-02-12 16:20:24 +00:00
Guillaume Melquiond
0c6e23f53b Fixed unit experience being reset when advancing. 2011-01-22 13:16:08 +00:00
Guillaume Melquiond
4c92fe070a Replaced unit::get_experience by unit::set_experience. 2011-01-15 10:19:12 +00:00
Mark de Wever
ecbabea838 New year copyright update. 2011-01-01 15:57:50 +00:00
Alexander van Gessel
20d10a972a Read names of attack types from data/hardwired/english.cfg 2010-12-27 06:11:14 +01:00
Alexander van Gessel
b1ab958254 Read names of attack ranges from data/hardwired/english.cfg (feature #17395) 2010-12-27 05:15:53 +01:00
Ignacio R. Morelle
d2e8a145d7 GUI1: left-align the minimap in the Load Game dialog, left panel
Solves item 3 in the "Load dialog" section of the following post:
[http://www.wesnoth.org/forum/viewtopic.php?t=29640]
2010-11-29 19:46:11 +00:00
Ignacio R. Morelle
b63bdf39a9 Add support for an optional image to transient_message objects
(Part of a forthcoming fix for bug #16859.)
2010-10-27 20:02:25 +00:00
Ali El Gariani
c63a7d97ae Improving constness of surface: forbid to blit on a const surface. 2010-10-01 01:43:16 +00:00
Ali El Gariani
d0bb4ad22f Move all calls of SDL_BlitSurface into one place (sdl_blit) 2010-09-24 18:45:02 +00:00
Steven Panek
d784c34fd2 Applied file #10184 from patch #1926 with modifications. 2010-09-12 04:20:34 +00:00
Guillaume Melquiond
eeb047de55 Fixed file headers so that they match the content of the COPYING file. 2010-09-01 21:12:38 +00:00
Guillaume Melquiond
f2270fb386 Fixed random AMLAs causing a division by zero. 2010-08-29 13:01:58 +00:00
Guillaume Melquiond
0fc601d657 Avoided copying and destroying temporary units when displaying them in dialogs. 2010-08-07 08:44:31 +00:00
Alexander van Gessel
be1db44f10 Rename incorrect_map_format_exception to incorrect_map_format_error 2010-08-03 15:58:46 +01:00
Alexander van Gessel
f876d1705c Make t_translation::error and incorrect_map_format_exception...
...inherit from game::error
2010-08-03 15:36:08 +01:00
Mark de Wever
a99c78e0d8 Update doxygen comment.
The filename after the @file comment is optional (spotted by alink).
2010-07-26 21:32:18 +00:00
Guillaume Melquiond
9e2b470598 Generalized user input synchronization further. 2010-07-26 09:52:29 +00:00
Guillaume Melquiond
d59e039aac Fixed handling of advance=true in [unstore_unit].
(Fix for bug #15560, patch #1610 by Icelus.)

The patch introduces several contexts describing which kind of RNG at
a given point of a game.
2010-07-25 16:33:50 +00:00