209 Commits

Author SHA1 Message Date
Mark de Wever
d88d1d4ae4 Changed terrain translation from a class to a namespace
no real reason for a class in the new system
fixed all callers 
added some comment and cleanup unused code
2006-11-15 18:25:24 +00:00
Mark de Wever
744f45f68d Sync of random changes, adding of debug code and minor documentation changes. 2006-10-28 10:12:16 +00:00
Mark de Wever
b62b882744 Two fixes for the terrain transition.
It seems to work good again, but more testing is still required.
2006-10-25 16:43:51 +00:00
Mark de Wever
5ca6c40f43 Some minor changes, mostly cleanup of old unused code. 2006-10-22 15:58:18 +00:00
Mark de Wever
be45f4f1e6 Lot of changes all over the map.
The help systems seems to work again for terrains.
Fixed some problems with terrain transitions but still not done.
2006-10-21 17:42:08 +00:00
Mark de Wever
f3fcdf4742 Merged commit 2006-10-10T18:52:47Z!koraq@xs4all.nl to 2006-10-20T17:19:30Z!crazy-ivanovic@gmx.net from the trunk...
...and fixed the conficts.
2006-10-20 19:29:08 +00:00
Mark de Wever
e7a77f8ddf Did some changes to the terrain system but still broken,
...some transitions fail and villages and forrest are not drawn.

The new terrain_graphics map parser doesn't like blank trailing lines
so removed them from the terrain cfg files.

Commit 2006-10-13T16:53:08Z!koraq@xs4all.nl and 2006-10-19T19:23:32Z!koraq@xs4all.nl will give conflicts here so did the
change here again.
2006-10-19 20:44:08 +00:00
Mark de Wever
7ad017f6f3 A big merge with the local changes so far.
Removed most of the terrain char assumptions but not ready yet. Also a
lot of bugs are left.
2006-10-10 18:52:47 +00:00
John W. C. McNabb
edab950bff fixed bug #7274, terrain probabilites when using rotations 2006-10-09 21:38:45 +00:00
Jon Daniel
e1096a0e0c fix alot of warnings 2006-01-15 13:03:14 +00:00
András Salamon
8bd9bc98a5 ran codeclean against files 2005-06-04 19:16:06 +00:00
Guillaume Melquiond
488aff5cb0 Fix a lot of off-by-one gamemap::location logging errors.
Also force the correct ones to go through the appropriate functions.
2005-05-02 19:42:04 +00:00
Philippe Plantier
5b570f0f6a Fixed bug #12658 : new forest being drawn on top of units. 2005-04-13 20:36:59 +00:00
Guillaume Melquiond
d501297a65 Switch to the new logging macro. 2005-03-26 17:10:32 +00:00
Guillaume Melquiond
6c5e990813 Please verify that headers are still self-contained after removing a dependency. 2005-03-23 08:52:10 +00:00
Yann Dirson
33cec75d2f cleanup of deps against display: builder does not need a display 2005-03-20 16:20:28 +00:00
Guillaume Melquiond
8396362665 Let's write correct C++. 2005-03-10 13:46:22 +00:00
Philippe Plantier
1949375acf Replaced split_utf8_string by a new "utf8_iterator" class
Moved all utf8 encoding / decoding-related code to
serialization/string_utils.hpp
2005-03-03 21:52:40 +00:00
Philippe Plantier
18ddb68c3c Fixed some translatable strings
* Included the colons in colon-terminated strings.

* Used vgettext for some composed string.
2005-02-27 17:15:38 +00:00
Philippe Plantier
5360c8b5a7 Documenting the "terrain_graphics" builder code 2005-02-27 14:09:10 +00:00
Guillaume Melquiond
fa1f3f6444 Remove the template code from animated.hpp and put it into animated.cpp.
This code was indirectly included in at least 25 files: the 25 files
for which a dependency on string_utils.hpp has been added by a
consequence of its removal from animated.hpp. It should induce a small
compile time improvement.
2005-02-21 09:05:51 +00:00
Guillaume Melquiond
2ab05941b5 Completely remove string functions from config.cpp. 2005-02-20 21:45:22 +00:00
Isaac Clerencia Perez
a1214b626d Added wassert(), a assert()-like function forcing a crash.
Replaced every assert() with wassert()
2004-12-31 21:01:38 +00:00
Dave White
c661b3043a reduced warnings to 0 on VC++ 2004-11-18 04:08:33 +00:00
Philippe Plantier
b65c3b9485 Cleaned the terrain.cfg, removing obsolete entries
Added the translated terrain name in terrain.cfg
Changed "image" elements in [terrain] tags into "symbol_image"
Removed dead code
2004-10-19 20:49:09 +00:00
Guillaume Melquiond
b353486bd9 Switched to new logging system 2004-10-05 21:28:12 +00:00
Guillaume Melquiond
8981568b80 Fix constructor initialization lists and variable initializations 2004-09-19 07:24:59 +00:00
Philippe Plantier
0598787322 Made it possible to have [terrain_graphics] rule as childs of [scenario]s.
Fixed a bug where tiles from terrain_graphics rule did not have the per-rule
image when only defined through [map].
2004-09-11 21:22:57 +00:00
Philippe Plantier
b5f4e42467 Added a way to specify the actual position of multi-hex tiles,
to fix several graphic glitches. Fixed several graphic clitches.
2004-09-11 17:17:20 +00:00
Dave White
0172e51f45 removed some unnecessary diagnostics (CVS internal) 2004-08-25 02:59:51 +00:00
Dave White
1eb02e3bef made Windows version compile again 2004-08-22 01:30:07 +00:00
Philippe Plantier
906845dc4d [[Editor optimization]]
* Minor speed optimizations (TODO: test whether these are actually
  worth something)

* Fixed editor where nothing was displayed until terrains were rebuilt.
2004-08-15 19:42:44 +00:00
Philippe Plantier
091ae28192 Adding christophe33's canyons (terrain letter: X). Those still need to be fixed. 2004-08-07 15:15:36 +00:00
Philippe Plantier
b8c8434adb [[Graphics fixes]]
* Fixed some graphical glitches

* Cleaned the terrain-graphics.cfg file. Terrain graphics rule
  precedence is now deprecated, use terrain layers.
2004-07-25 18:31:45 +00:00
Philippe Plantier
47dd717978 [[Animation and layering fixes]]
* Added proper support for animated time-of-day alternative images

* Fixed 'layers' not working as intended in built terrains

* Added sample (read: ugly) animated villages as an illustration.
2004-07-24 23:42:23 +00:00
Philippe Plantier
ac441889d9 [[Animation refactoring]]
* Refactoring of all animation code in unit_display and halo.

* Adding animated.hpp, and the animated<T> template.

* Partial rewrite of image.?pp for speed: looking up images was what
  was slowing the game

* Replacing all SDL_Surface*, and scoped_sdl_surface, with
  shared_sdl_surface, which was renamed surface.

* Optimizing halo movement when unit moves

* Inlining some stuff for performance reasons

* Optimizing invalide_all redraws

* Adding support for animated terrain images
2004-07-18 19:02:25 +00:00
Kristoffer Erlandsson
5101bd5491 Fixed a problem where the editor would go slower and slower...
...the more it was used.
2004-07-12 18:52:53 +00:00
Philippe Plantier
825846796c Adding a limit to number of characters in a textbox.
Cleaned a bit the textbox code.

Adding a maximal line width for text to be drawn, to circumvent a SDL / SDL_ttf
bug.
2004-07-10 18:45:19 +00:00
Philippe Plantier
aec80713f3 Changed, under the [terrain-graphics] element, the rather verbose syntax below:
[set_flag]
    name=blah
[/set_flag]
[set_flag]
    name=foo
[/set_flag]
[set_flag]
    name=bar
[/set_flag]

Now, it must be written:

set_flag=blah,foo,bar
2004-06-30 18:25:21 +00:00
Philippe Plantier
2ec64567c0 Removing an obsolete feature,
that never was used, in the terrain graphics engine.
2004-06-30 18:07:43 +00:00
Philippe Plantier
1f7b6ef0b5 Fixed "bug" 9168: builder code failing when asked for hexed outside the map. 2004-06-08 20:52:34 +00:00
Dave White
8e79c1abbe rebalancing, made saved games smaller, right-aligned 'tip of the day' 2004-06-08 18:21:33 +00:00
Philippe Plantier
1514ef0dc9 Fixed the "random probability" in "terrain-graphics" rules...
...not being random enough
2004-06-07 21:27:52 +00:00
Dave White
a65fc1ea97 fixed compile error 2004-06-07 20:37:30 +00:00
Philippe Plantier
0deb7786bc Fixed a bug in builder optimizations, ...
...where large multi-hex tiles should be erroneously placed.
2004-06-07 19:41:15 +00:00
Philippe Plantier
b98af7489a Optimizing the terrain builder code.
Made it much faster, but also much more complex.
2004-06-07 19:18:27 +00:00
Kristoffer Erlandsson
33681e609a Made the editor use the default image for the terrains...
...while drawing them so that updates are visible immediately, but
things do not have to be rebuilt. (Fixes some CVS-only issues)

Changed rebuild_terrain() to set the image for that location to the
default image of the terrain. It would still be nice to be able to
rebuild locations on the fly, but if it really is too complicated,
this solution is not that bad.
2004-06-06 12:49:27 +00:00
Dave White
1c319625bc fixed file chooser dialog to work in Windows 2004-06-01 20:33:46 +00:00
Philippe Plantier
bd2866fb61 Replacing the terrain transition code by something entirely in WML.
Made forests and hills always overlay terrain on their northern (top)
side.  [building_rule] tag is now called [terrain_graphics] A few
changes in the terrain graphics WML element
2004-05-31 22:25:37 +00:00
Philippe Plantier
15f9b8d22c Fixed multi-hex tiles not working near map borders. 2004-05-18 19:48:39 +00:00