Can i specify in tileset to draw river first, then forest ?
Otherwise I get something like this.
River under forest
River under forest
- Attachments
-
- t3.png (8.78 KiB) Viewed 8057 times
Re: River under forest
Untested theory: Rivers are natural roads, natural roads are roads, roads are extras, and extras are drawn on top of the terrain. There are still lots of gaps in what I understand, including "what is a darkness layer" and "what is a blend layer", but I guess that both won't help for your problem.mir3x wrote:Can i specify in tileset to draw river first, then forest ?
Re: River under forest
tilespec.h:115
tilespec.h:147
Any extra with style "river" is drawn on layer "LAYER_RIVER", above the three terrain layers. There is no way to change this, but adding configuration of the layer drawing order would be feasible (if the three terrain layers can be separated).
Louis
Code: Select all
/* Items on the mapview are drawn in layers. Each entry below represents
* one layer. The names are basically arbitrary and just correspond to
* groups of elements in fill_sprite_array(). Callers of fill_sprite_array
* must call it once for each layer. */
enum mapview_layer {
LAYER_BACKGROUND,
LAYER_TERRAIN1,
LAYER_TERRAIN2,
LAYER_TERRAIN3,
LAYER_WATER,
LAYER_ROADS,
LAYER_SPECIAL1,
LAYER_GRID1,
LAYER_CITY1,
LAYER_SPECIAL2,
LAYER_FOG,
LAYER_UNIT,
LAYER_SPECIAL3,
LAYER_CITY2,
LAYER_GRID2,
LAYER_OVERLAYS,
LAYER_TILELABEL,
LAYER_CITYBAR,
LAYER_FOCUS_UNIT,
LAYER_GOTO,
LAYER_WORKERTASK,
LAYER_EDITOR,
LAYER_COUNT
};
Code: Select all
#define mapview_layer_iterate(layer) \
{ \
enum mapview_layer layer; \
\
for (layer = 0; layer < LAYER_COUNT; layer++) { \
Louis
Re: River under forest
I just added the layer configuration stuff to my TODO a week ago (mainly for alio forest/river in 3.0). Feel free to submit patch if you beat me to it.
Re: River under forest
Drawing only the first 10 layers (hardcoded) was very straightforward. In fact, I can use any given order -- what's missing is loading.
Edit:
In Amplio, hills are drawn on the same layer as forests. So both of them rivers are either above or below rivers. But it can be changed Louis
I wonder if the layer order should be fully configurable, or if some layers should be locked (background, goto, editor, …).Edit:
In Amplio, hills are drawn on the same layer as forests. So both of them rivers are either above or below rivers. But it can be changed Louis
- GriffonSpade
- Elite
- Posts: 578
- Joined: Mon Apr 29, 2013 4:41 pm
Re: River under forest
Darkness Layer is drawn on explored tiles next to unexplored tiles. It's what creates the 'spillover' look. In 2.4 it was always drawn over layer0, so anything on layer1 or layer2 (mountains, hills, trees, etc.) would wind up being drawn over top the darkness. In 2.5 it was changed to allow it to be drawn over any of the layers desirable, and in A6B 2.5 I chose to draw it over layer2 (With a gradient, of course).dunnoob wrote:Untested theory: Rivers are natural roads, natural roads are roads, roads are extras, and extras are drawn on top of the terrain. There are still lots of gaps in what I understand, including "what is a darkness layer" and "what is a blend layer", but I guess that both won't help for your problem.mir3x wrote:Can i specify in tileset to draw river first, then forest ?
Blend Layer is that dithering effect where the adjacent tile is dithered over its neighbors, which gives tiles their 'speckled' borders instead of clean ones. I do believe by default it uses the other terrain's own tiles for it, but can be set to alternate tiles. For example, ocean tiles might have sandy-colored blending tiles set so that the grassland next to it gets sand on it rather than water.
Re: River under forest
This will be possible in Freeciv 3.0 See patch #7667
By adding a new key to the tileset,
one will be able to configure the drawing order of map layers. See here for an example of how it might look like. You'll also find there a brief explanation of what's drawn on each layer.
Louis
By adding a new key to the tileset,
Code: Select all
layer_order = <comma-separated string list>
Louis