238 Commits

Author SHA1 Message Date
J. Tyne
e066bac97e Pass the t_translation::t_terrain struct by (const) reference instead of value. 2013-02-12 23:16:43 +00:00
Mark de Wever
43b71f2ff0 New year copyright update. 2013-01-01 09:22:03 +00:00
J. Tyne
b12e67291f Have on_board_with_border() detect a newly initialized tiles_ as empty.
(It gets initialized to a size 1 vector for some reason.)
2012-09-05 23:53:55 +00:00
Fabian Müller
84b8dbafd2 Brings back the old map format. 2012-08-24 18:49:30 +00:00
J. Tyne
1364d77914 Skip some unneeded processing when a parameter is the null location. 2012-08-23 03:51:35 +00:00
J. Tyne
592e1fff6e Simplify a conditional. 2012-08-21 22:52:17 +00:00
Mark de Wever
2a5f0e1b62 Don't use string::c_str() to create a string.
Issue found by cppcheck.
2012-03-10 13:29:36 +00:00
Fabian Müller
177b197a5e Removed extra quoting for map strings. 2012-02-23 20:58:10 +00:00
Fabian Müller
a8aa81f338 Now realy introduced the new map format. 2012-02-23 02:39:58 +00:00
Anonymissimus
8888752389 disable the size check I added (workaround for regression found by Ivanovic) 2012-01-20 14:02:12 +00:00
Anonymissimus
242605e006 replace translatable blargh error message with untranslatable blargh one 2012-01-17 22:59:47 +00:00
Anonymissimus
7c2f93d060 Require loaded maps to have at least 1 (non-border) hex (bug #19018)
(This new translatable string is only visible/useful for wml authors,
and we have lots on untranslated wml error messages anyway; also
they really don't need to be translatable)
2012-01-17 22:28:08 +00:00
Anonymissimus
06238ae4fd Set total_width, *height to 0 in case of an empty map.
Seems like an oversight from the times when there was no border.
2012-01-17 22:27:38 +00:00
Anonymissimus
d75e320e5a Introduce parameter allow_invalid in gamemap::read (fix for bug #19018) 2012-01-17 22:26:33 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Mark de Wever
ffe42f4ca1 Fix a compilation issue in c++0x mode.
Adds extra constructors to the coordinate class to avoid narrowing
conversions, which are no longer allowed in c++0x.
2011-09-26 20:27:09 +00:00
Iurii Chernyi
ecc1782c03 Fixed bug #17150: fix naming conflict with OpenBSD macro by renaming 2011-08-11 23:30:38 +00:00
Mark de Wever
ecbabea838 New year copyright update. 2011-01-01 15:57:50 +00:00
Ignacio R. Morelle
c7c4e0d5d0 Fix the lack of whitespace after a comma in a string 2010-10-22 21:11:48 +00:00
Ignacio R. Morelle
b83b8deed2 Fix insertion of gratuitous whitespace with non-aliased terrain combinations 2010-10-22 21:10:40 +00:00
Ignacio R. Morelle
4620c4b784 const is good 2010-10-18 02:03:15 +00:00
Ignacio R. Morelle
76ee36d721 Fix duplicate terrain names NAME/NAME in editor caused by t_string's...
...design -- polishes 2010-10-18T00:44:43Z!shadowm@wesnoth.org.
2010-10-18 02:01:34 +00:00
Ignacio R. Morelle
e30195e1a6 Verbose terrain names can be specified using terrain.editor_name...
...to be displayed in the editor as "<verbose name>/<common name>
(<underlying>)" (bug #16450)
2010-10-18 00:44:43 +00:00
Ignacio R. Morelle
44c0c283d7 Replace "Illegal character in map" with "Illegal tile in map" 2010-10-18 00:43:52 +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
Alexander van Gessel
be1db44f10 Rename incorrect_map_format_exception to incorrect_map_format_error 2010-08-03 15:58:46 +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
1376bd1e9d Avoided costly roundtrip through strings. 2010-06-02 19:20:45 +00:00
Mark de Wever
eff514d4aa Remove a MSVC 6.0 work-around. 2010-04-02 12:12:57 +00:00
Mark de Wever
13b70e57d9 Revert 2010-01-26T06:34:20Z!esr@thyrsus.com for map.cpp, only adds an #include. 2010-01-26 20:33:20 +00:00
Eric S. Raymond
75925deb82 Merge of fendrin's new teleport and tunnel code.
The changes are guarded by the C++ and WML conditional symbol
"EXPERIMENTAL".

The experimental flag is temporarily defaulted off, so those patches
should have no effect on people doing ordinary builds. This may change
once fendrin has the tunnel code fixed and polished.
2010-01-26 06:34:20 +00:00
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Mark de Wever
4145e09e1f Remove an unneeded include. 2009-11-27 23:00:48 +00:00
Iurii Chernyi
cbd72b6656 revert part of 2009-04-14T20:17:41Z!esr@thyrsus.com
change 'terrain_type' attribute in [rule] back to 'terrain', as it
should be, according to the documentation. This fixes bug #14197
2009-09-01 20:20:30 +00:00
Ali El Gariani
0984328cb0 Move some simple common map_location functions from pathutils.hpp...
...to map_location.hpp where they more clearly belongs. Allow to
simplify some includes.
2009-08-31 12:59:22 +00:00
Gunter Labes
4556655a06 made GUI map error messages more useful 2009-07-02 10:18:18 +00:00
Guillaume Melquiond
789736ac91 Removed specialized domains from log.hpp,
...so that adding a new domain no longer forces to recompile the whole
game.
2009-04-24 23:18:31 +00:00
Eric S. Raymond
89bd5dff5a Terrain types can now have description attributes.
If present, these override the name attribute for the "outside"
portion of the human-readable terrain description, e.g.  the part not
in parentheses.

The main use for this is editor palette tooltips; they now say, for
example, "Summer Deciduous Forest (Forest)".  I've also wired things
so that the normal in-game terrain report uses description rather than
name when it's available, as a demonstration (that's the diff to
generate.report.cpp) but it might be that level of detail is not
actually desirable in the game itself.
2009-04-15 07:55:31 +00:00
Eric S. Raymond
25e9e53cb6 Change the terrain definition tag from [terrain] to [terrain_type].
This is paraallel to the change from [unit] to [unit_type], and for
similar reasons - reduces ambiguity, enables better WML sanity
checking.
2009-04-14 20:17:41 +00:00
Guillaume Melquiond
336f24157d Removed config::child_list from map.cpp. 2009-03-20 07:07:20 +00:00
Tomasz Śniatowski
d895538c04 use const char* instead of a std::string in t_translation::error 2009-02-21 21:48:26 +01:00
Guillaume Melquiond
0e0177d32c Add missing include. 2009-02-08 13:20:29 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Sergey Popov
495f481fdf Split off formula_string_utils from string_utils.
Break the dependency of string_utils.cpp on formula ai since it pulls
in practically everything else as result. Since servers use
string_utils.cpp this is unacceptable.
2008-12-21 15:26:11 +00:00
Eric S. Raymond
9223460daa Remove unused headers. 2008-11-09 04:35:13 +00:00
Tomasz Śniatowski
01e504ede6 remove some map.hpp dependencies,
...also separated viewpoint and map_exception classes from map.hpp
into separate headers (no cpp files)
2008-10-17 17:53:08 +01:00
Tomasz Śniatowski
c54a538139 Refactor gamemap::location -- rename to map_location,
...move into separate cpp/hpp pair. The code under src/ was modified
mainly using a global search-and-replace. This change allows reducing
code dependencies and gets rid of inner-class confusion (parts of the
code had to use "location" when referring to gamemap::location, it is
now consistent across the codebase.)
2008-10-15 17:38:51 +01:00
Tomasz Śniatowski
7107c0b8f3 add border overlaying to [terrain_mask].
Active only if the mask is in fact a map (has border_size=1) and
border=yes is supplied in the [terrain_mask] tag (to avoid changing
the behaviour of existing WML).
2008-10-14 21:37:25 +01:00
Mark de Wever
01e10b584f Update doxygen comment style. 2008-09-13 17:13:53 +00:00
Mark de Wever
81c6a850ab MSVC 6 cleanup.
Now that MSVC 6 is no longer supported start to remove some helper code
to work around problems in that compiler. The first step is to comment
out the code and replace it with new helper code that uses the standard.
The second step is to remove the helper code and fix all callers.

Patch 2/3 for step 2: Remove minimum and maximum and fix all callers.
2008-08-24 16:12:13 +00:00