165 Commits

Author SHA1 Message Date
Moritz Göbelbecker
1f9b17b954 Add support for centering multihex terrain images...
...using the center=(x,y) attribute.
2008-04-28 16:54:29 +00:00
Ali El Gariani
b9ff50c5cc Fix some bugs with the undocumented location-specific terrain rules:
- x and y values were shifted by 1

- other [tile] requirements were ignored
2008-04-28 16:25:23 +00:00
Moritz Göbelbecker
f88efeb810 Add support for overlay terrains.
Converted bridges to use the new feature.
2008-04-04 18:43:57 +00:00
Eric S. Raymond
9e2e1829f7 Code cleanup. Fix a type-conversion warning in the display code,
...banish 'letter' for terrain codes in favor of 'tcode'.
2008-02-20 00:16:11 +00:00
Ali El Gariani
de5671f759 Also use the improved noise function for the terrain builder engine.
The old one had some patterns (this is why it was improved for road
placing) Thanks to SynErr to notice it and remind me to port the
change there too (I will probably move both usages in one function,
just need to find a place)
2008-02-17 04:32:26 +00:00
Mark de Wever
001af46e6e Updated all headers to 2008. 2008-02-16 08:47:16 +00:00
Eric S. Raymond
c7dac51c3d Change the t_letter type to t_terrain. They aren't single letters any more. 2008-02-12 13:36:23 +00:00
Mark de Wever
7e035c9409 Avoid padding withing the structure. 2008-01-05 17:57:31 +00:00
Mark de Wever
bcf51e964e Overlays are properly drawn at the top row (eg forrest) (bug #10238).
Mountains no longer have a hill as base.
2008-01-01 15:07:47 +00:00
Mark de Wever
5e4c475b56 wassert -> assert 2007-12-10 17:35:29 +00:00
Ali El Gariani
260b0482a5 Add a little comment to explain a not obvious code assumption...
...spotted by patch #848: "min_constraint should be a 'valid'
iterator" (also to remind me to change and clarify the code after
1.3.11)
2007-11-14 05:13:49 +00:00
Mark de Wever
1661269699 Make sure all members are initialized in the constructor. 2007-10-28 21:26:41 +00:00
Ali El Gariani
d27c7c9dfd Big optimization of the builder (huge simple map are now immediately builded).
The main idea is to be more precise about which rules is possibly
valid on the map (the previous system was a bit short-sighted and
tested most of the rules on all hexes at the first wildcard spotted)
2007-10-02 17:23:35 +00:00
Ali El Gariani
aae5dbd4c4 Clean the builder from all code using adjacent-functions.
Seemed useless since terrain constraints are not bound to adjacent
relations and it didn't optimize anything.

It seems to also fix some "terrain contamination" in the generated half-hexes.
e.g. the north mountains behind the villages on test-scenario
2007-10-02 17:15:22 +00:00
Gunter Labes
ae9e10f260 codeclean run
set svn:eol-style to native where missing
2007-08-31 19:09:40 +00:00
Mark de Wever
732fbac8ba Used two wrong casts, thanks uso for spotting it. 2007-08-26 21:47:59 +00:00
Mark de Wever
8b08cf6bdf C-style cast cleanup. 2007-08-26 17:12:41 +00:00
Ali El Gariani
de8fb5fb3e Remove the flush of the image cache when reloading game
(cost a lot of files reloading when just reloading a savegame)

But we still need some smarter flush for this cache.
2007-08-23 19:18:17 +00:00
Mark de Wever
6c309aa7db Tiles can now have their own image in the editor,
...defaults to the minimap image. 

Added some placeholder art.
Renamed symbol_image to minimap_image.
2007-08-18 08:42:44 +00:00
Hans Joachim Gurt
061aa9840a doxygen, comments 2007-08-18 05:10:04 +00:00
Mark de Wever
080eb69f60 Updated the headers to state GPL 2+ and a few changelog cleanups. 2007-08-15 13:41:56 +00:00
Mark de Wever
60bb1b1b71 Made the offmap tiles themable in the map, the minimap stays as is. 2007-08-12 14:22:41 +00:00
Mark de Wever
b4c9f875fe Make sure the image cache is flushed when a new builder object is created,
also make sure the existance cache is flushed. The previous behaviour
caused the upcomming themable offmap tile to fail.
2007-08-12 14:09:37 +00:00
Mark de Wever
745a49d8e8 Fixed the debug code,
the error wasn't noticed before since to code is commented out.
2007-08-12 11:07:28 +00:00
Mark de Wever
4bac696917 rename map.x() to map.w() and map.y() to map.h().
remove the duplicates named map.xsize() and map.ysize().
2007-08-09 16:37:08 +00:00
Moritz Göbelbecker
5a4b7663c2 Fix bug in terrain matching
Remove (unused and unneccessary) support for wildcards in source terrain
2007-07-23 21:08:54 +00:00
Mark de Wever
bb01934b85 A rather large update which updates the copyright info
* Wesnoth is distributed under the terms of the GPL version 2, made
  that more explicit

* updated the copyright range to 2007

* updated Dave's email adress
2007-07-21 07:28:04 +00:00
Mark de Wever
44372c8946 added some extra headers for the upcomming gcc 4.3 (debian bug #417764) 2007-07-02 16:48:24 +00:00
Eric S. Raymond
f83e36e20f The "Everything should be a method" assumption has led us astray.
There's a better solution, it will be in my next commit.
2007-07-01 16:33:03 +00:00
Eric S. Raymond
9feb3c2dcc Lift some code to use the basemap type rather than the derived gamemap type. 2007-07-01 06:49:31 +00:00
Jérémy Rosen
83624d76b6 no more frame skipping on accelerated animations 2007-06-27 18:18:16 +00:00
Mark de Wever
8b4c2fd112 fixed some drawing glitches in the top row (bug #8739 and #8071) 2007-05-13 14:12:11 +00:00
Mark de Wever
2506dc9e97 remove support for 1.2 map format and allow wildcards on some places,
the latter isn't finished yet
2007-04-29 16:57:56 +00:00
Mark de Wever
bf74c11bc3 In the spirit of realease early a quick fix for the terrain system.
This might fix bug #8942 but still needs some cleanups
2007-04-18 21:12:04 +00:00
Eric S. Raymond
c058f0034a Merge back in most of mog's commit, Mordante thinks he can fix it. 2007-04-18 11:28:40 +00:00
Eric S. Raymond
253228c67b Back out mog's commit 16648, it caused bug #8739.
Some bits of this commit can and should be saved.
2007-04-18 10:55:11 +00:00
Mark de Wever
723b21389d Cleaned up the sources and added automatic wildcard extension to the terrains.
This is not 100% finished, still needs some tuning but this version works.
2007-04-06 17:20:35 +00:00
David Philippi
f231fb12e0 merged patch #714 by silene
- removal of dead stuff and static linkage marking for internal functions
2007-04-06 12:26:02 +00:00
Mark de Wever
c407cfb190 adds layer support for the terrain system again,
...this time using 2 32 bit values instead of 1 64 bit value tested
more than the previous version and also tested the speed
regression. The speed regression is much lower than with the 64 bit
version.
2007-03-03 15:31:22 +00:00
Mark de Wever
b81ecb9432 marked some functions for inlining 2007-02-09 18:02:44 +00:00
Mark de Wever
65b8978065 merge trunk 2007-01-06T11:38:54Z!koraq@xs4all.nl..2007-01-12T23:09:05Z!jeremy.rosen@enst-bretagne.fr 2007-01-12 23:41:30 +00:00
Mark de Wever
e8c63b14ef merge trunk 2007-01-03T22:00:18Z!koraq@xs4all.nl..2007-01-05T19:19:37Z!koraq@xs4all.nl
(with small change due to missing header after the header cleanup in trunk)
2007-01-05 19:53:12 +00:00
Mark de Wever
79678dc770 merge trunk 2007-01-02T20:21:22Z!david@torangan.de..2007-01-02T20:37:30Z!david@torangan.de (manual merge due to conflicts) 2007-01-03 22:00:18 +00:00
Mark de Wever
8deb5eab53 A lot of small changes
* code cleanups

 * src/play_controller.cpp had an terrain user which avoided detection
   so far

 * no longer initialize things like t_list x = t_list(); since seems
   to be a bug on my system
2007-01-03 20:46:57 +00:00
Mark de Wever
f7f25037e8 Fixed a bug in some transitions...
...due to the fact that an empty string should match.
Added some consts to items which are const.
2006-12-15 16:40:37 +00:00
Mark de Wever
2e057bb986 A lot of cleanups by removing debug code
Speed improvements

* get_mask_ is rewritten, looks better and is about twice as fast

* the terrain matching code now has a cache structure defined
  this is used in the builder since it does a lot of matching
  the speed increase is noticable.
2006-12-13 17:59:49 +00:00
Mark de Wever
d22e4cbb68 [[debug and test code]]
* Commented out the debug code in builder don't want to remove it yet
  but hope it speeds things up a tiny bit.

* Added some testing code to measure the overhead of the many resize operations 
  in vectors, the overhead seems to be low.

* Some updates in the todo lists
2006-12-11 19:30:35 +00:00
Mark de Wever
4735f26d02 a few small code cleanups 2006-12-09 18:05:42 +00:00
Mark de Wever
061477b218 Fixed the wildcard matching for the terrains,
...this comes with a big performance loss. So there might be the need
to improve the code a bit. Also a lot of terrain graphics look bad,
have to see whether the wml has problems or the code fails.
2006-12-09 17:09:10 +00:00
Mark de Wever
c347e9790b Added some typedefs for the terrain_translations and shorted the names a little.
Added some extra comment to terrain_translation.hpp.

Applied these changes to all users and did some whitespace enhancement.

Various minor code cleanups while busy.
2006-12-03 11:48:45 +00:00