388 Commits

Author SHA1 Message Date
J. Tyne
83958a10fb Use unit_type::race() instead of getting the race id...
...then searching for a matching unit_race.
2013-01-03 05:00:38 +00:00
J. Tyne
239b4e30b4 Rename unit_type::race() to unit_type::race_id().
This is for more consistent naming of functions (this function returns a string,
while unit::race() returns a pointer to unit_race).
2013-01-03 03:07:03 +00:00
Mark de Wever
43b71f2ff0 New year copyright update. 2013-01-01 09:22:03 +00:00
Mark de Wever
c1faa508bc Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:02 +00:00
J. Tyne
a824a260f3 Enhanced formatting for ability / weapon special tooltips.
With this change, there is no longer a need to include the name of the
ability/special as the first line of the description, so this practice
is deprecated.
2012-10-25 21:10:41 +00:00
J. Tyne
15e56212b6 Refactor how abilities and weapon specials are reported...
...so that they can be reported as "active" or "inactive". (Changes to
the reporting will come later.)
2012-10-23 23:51:44 +00:00
Alexander van Gessel
1b8b64608e Remove stray debug messages 2012-09-24 07:40:51 +01:00
Alexander van Gessel
42a4eb44a5 Add help support for unit variations 2012-09-16 21:27:40 +01:00
Mark de Wever
b1604b04a1 Remove an unused variable.
Issue found by cppcheck.
2012-07-29 19:08:45 +00:00
Fabian Müller
b9b015ec86 Support for displaying the costs of vision and jamming...
...in the unit description.
2012-07-09 16:12:46 +00:00
Sergey Popov
6b6eafb213 Use BOOST_FOREACH directly instead of #define foreach BOOST_FOREACH
The define is extremely unreliable, will break compile with boost >=
1.50 and upstream can't fix issues with it, see
https://svn.boost.org/trac/boost/ticket/6131
2012-07-07 00:49:45 +00:00
Fabian Müller
fbbfadfc6b Support for jamming and report for vision and jamming in the unit help.
Changelog follows.
2012-05-08 00:05:33 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Ignacio R. Morelle
b9dd12178b Apply "Setting to ignore encountered_units" (patch #2940 by negusnyul)
The preferences entry name and tooltip are not the same as the patch in
the tracker, as we discussed on IRC that this doesn't exclusively affect
mainline units nor does it need to. I also changed the tooltip wording
to fit as much as possible in my 1280x800 screen without changing the
font size (works on 800x480 with a smaller font size).
2011-10-16 20:59:09 +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
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
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
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
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
Steven Panek
ec37bb0e63 Added a constant for the figure dash. 2011-04-20 17:00:47 +00:00
Alexander van Gessel
f87206a6d2 Add some more constants for unicode dashes 2011-04-20 17:05:16 +01:00
Alexander van Gessel
1b73ab6d87 Fix a reference I missed 2011-04-19 21:56:32 +01:00
Alexander van Gessel
55a83383ef Fix a precedence-order issue 2011-04-19 21:56:26 +01:00
Alexander van Gessel
eb50fbd1b9 Use unicode minus rather than the hyphen-minus snprintf generates 2011-04-19 21:17:10 +01:00
Alexander van Gessel
0a8f0e8cb0 Fix two dashes. Requested by Espreon. 2011-04-19 21:17:04 +01:00
Fabian Müller
f0fb305ad6 Removed race specific topics from the unit section of the ingame help. 2011-04-16 17:34:13 +00:00
Alexander van Gessel
809a85151d Fix translation of attack types in unit description 2011-04-15 22:16:30 +01:00
Mark de Wever
dcc7e4b2de Catch exception by reference.
Issue found by cppcheck.
2011-02-27 15:19:53 +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
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
Nils Kneuper
bc1d7ec1a5 create textdomain wesnoth-help (part3)
load the textdomain ingame

change the textdomain for some relevant files
2010-12-22 11:36:22 +00:00
Guillaume Melquiond
62f77ba8fb Used the image modifier to ensure portraits are always drawn...
...with a black background in the help.
2010-12-19 17:55:12 +00:00
Guillaume Melquiond
993ca0ac66 Added a small_profile= attribute for [unit_type], [unit],
...and [effect]. It is used for unit help and unit reports, while
profile= is now used for message only.

When missing, the backward-compatible way of using profile= is
applied, while profile= itself is set to the transparent version, if
any.
2010-12-19 17:55:03 +00:00
Fabian Müller
605c6e3b59 Implemented the extra topics to a race...
...being listed on the sections main page.
2010-12-11 16:14:58 +00:00
Fabian Müller
8bb8a75a9a Implemented the adding of subtopics to a races description. 2010-12-10 19:27:13 +00:00
Ignacio R. Morelle
d6a3de1938 Apply patch #2213 by stikonas, using file #11274 2010-11-21 01:56:29 +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
Guillaume Melquiond
eeb047de55 Fixed file headers so that they match the content of the COPYING file. 2010-09-01 21:12:38 +00:00
Mark de Wever
b21f23db09 Remove duplicate definitions of string_map.
Issue spotted by cppcheck.
2010-08-29 20:13:31 +00:00
Alexander van Gessel
6ff8ec8748 Make type_error and parse_error inherit from game::error 2010-08-07 02:21:29 +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
Ali El Gariani
f6fab3788f Rename all SDL_Color font::FOO_COLOUR as font::FOO_COLOR 2010-06-02 22:14:44 +00:00
Guillaume Melquiond
e1a7f134ec Avoided costly roundtrip through strings. 2010-05-24 19:21:29 +00:00
Guillaume Melquiond
76c34a23d3 Modified WML attributes so that they are stored with...
...smaller effective types when they are not translatable.

This patch considerably reduces the memory footprint of WML and speeds it up.

It should not change any WML behavior, except for a few corner cases
detailled below:

- "off" is no longer a synonym for "no" (it wasn't used anyway),

- _"42" is no longer an integer,

- untranslatable "true" and "false" are stored as booleans, hence
  displayed as "yes" and "no",

- "042" is now understood as octal notation (hence 34) rather than decimal,

- hexadecimal notation "0x42" is now recognized.
2010-05-24 08:01:31 +00:00
Ali El Gariani
c7f242a04d Add more flexibility to clip_rect_setter:
- Allow to disable previous clipping

- Add a flag for easier toggling
2010-05-18 17:42:43 +00:00
Ali El Gariani
f1f0d96e36 revert 2010-05-16T23:56:47Z!alinkmaze@gmail.com
(hack need too much little details to fix compared to a clean rewrite)
2010-05-18 13:30:50 +00:00