URL: http://bugs.freeciv.org/Ticket/Display.html?id=34265
This patch 'fixes' the drawing problems for amplio with deep ocean.
These problems were several. First, as the comment says in
amplio.tilespec, drawing it like this is a hack. We basically overlay
coast on top of the actual ocean drawing, so that in the bottom layer
ocean and deep-ocean are drawn (with an appropriate border tile) and in
the next layer up coast and deep-ocean are drawn (with an appropriate
border tile).
Two bugs kept this from working. The first is that there is no way to
have 2 layers use the same match style for the same terrain, because the
layer number isn't a part of the sprite name. This patch fixes that by
adding the layer number (only for these boolean-matched corner cells
though).
The second is that the layers were being reversed! The coast has to be
drawn on *top* of the deep-ocean graphics or we always get ocean
overwriting the pretty coastlines. To work around this (and it too is
UGLY) I added a new terrain parameter, is_reversed. If this is set then
the 2 (or however many) layers are simply drawn in reverse order for
that terrain.
This patch has to be used with Daniel's terrain2.png (attached earlier
in the patch). Even so there are still problems. Because the ocean
encroaches onto the deep-ocean tiles (since ocean is only matched
against coastline, NOT against deep ocean), narrow areas of deep ocean
(often seen along the poles) look VERY bad.
Also, as a final comment, I think that ocean isn't deep enough on
average. With a trireme in an average map you can go pretty much anywhere.
-jason
Index: data/amplio/terrain2.spec
===
--- data/amplio/terrain2.spec (revision 12631)
+++ data/amplio/terrain2.spec (working copy)
@@ -144,76 +144,113 @@
tiles = { row, column,tag
; ocean cell sprites. See doc/README.graphics
- 0, 0, t.ocean_cell_u000
- 0, 2, t.ocean_cell_u100
- 0, 4, t.ocean_cell_u010
- 0, 6, t.ocean_cell_u110
- 0, 8, t.ocean_cell_u001
- 0, 10, t.ocean_cell_u101
- 0, 12, t.ocean_cell_u011
- 0, 14, t.ocean_cell_u111
+ 0, 0, t.l0.ocean_cell_u000
+ 0, 2, t.l0.ocean_cell_u100
+ 0, 4, t.l0.ocean_cell_u010
+ 0, 6, t.l0.ocean_cell_u110
+ 0, 8, t.l0.ocean_cell_u001
+ 0, 10, t.l0.ocean_cell_u101
+ 0, 12, t.l0.ocean_cell_u011
+ 0, 14, t.l0.ocean_cell_u111
- 1, 0, t.ocean_cell_d000
- 1, 2, t.ocean_cell_d100
- 1, 4, t.ocean_cell_d010
- 1, 6, t.ocean_cell_d110
- 1, 8, t.ocean_cell_d001
- 1, 10, t.ocean_cell_d101
- 1, 12, t.ocean_cell_d011
- 1, 14, t.ocean_cell_d111
+ 1, 0, t.l0.ocean_cell_d000
+ 1, 2, t.l0.ocean_cell_d100
+ 1, 4, t.l0.ocean_cell_d010
+ 1, 6, t.l0.ocean_cell_d110
+ 1, 8, t.l0.ocean_cell_d001
+ 1, 10, t.l0.ocean_cell_d101
+ 1, 12, t.l0.ocean_cell_d011
+ 1, 14, t.l0.ocean_cell_d111
- 2, 0, t.ocean_cell_l000
- 2, 2, t.ocean_cell_l100
- 2, 4, t.ocean_cell_l010
- 2, 6, t.ocean_cell_l110
- 2, 8, t.ocean_cell_l001
- 2, 10, t.ocean_cell_l101
- 2, 12, t.ocean_cell_l011
- 2, 14, t.ocean_cell_l111
+ 2, 0, t.l0.ocean_cell_l000
+ 2, 2, t.l0.ocean_cell_l100
+ 2, 4, t.l0.ocean_cell_l010
+ 2, 6, t.l0.ocean_cell_l110
+ 2, 8, t.l0.ocean_cell_l001
+ 2, 10, t.l0.ocean_cell_l101
+ 2, 12, t.l0.ocean_cell_l011
+ 2, 14, t.l0.ocean_cell_l111
- 2, 1, t.ocean_cell_r000
- 2, 3, t.ocean_cell_r100
- 2, 5, t.ocean_cell_r010
- 2, 7, t.ocean_cell_r110
- 2, 9, t.ocean_cell_r001
- 2, 11, t.ocean_cell_r101
- 2, 13, t.ocean_cell_r011
- 2, 15, t.ocean_cell_r111
+ 2, 1, t.l0.ocean_cell_r000
+ 2, 3, t.l0.ocean_cell_r100
+ 2, 5, t.l0.ocean_cell_r010
+ 2, 7, t.l0.ocean_cell_r110
+ 2, 9, t.l0.ocean_cell_r001
+ 2, 11, t.l0.ocean_cell_r101
+ 2, 13, t.l0.ocean_cell_r011
+ 2, 15, t.l0.ocean_cell_r111
+; deep ocean coasts.
+ 0, 1, t.l0.deep_cell_u000
+ 6, 2, t.l0.deep_cell_u100
+ 6, 4, t.l0.deep_cell_u010
+ 6, 6, t.l0.deep_cell_u110
+ 6, 8, t.l0.deep_cell_u001
+ 6, 10, t.l0.deep_cell_u101
+ 6, 12, t.l0.deep_cell_u011
+ 6, 14, t.l0.deep_cell_u111
+
+ 0, 1, t.l0.deep_cell_d000
+ 7, 2, t.l0.deep_cell_d100
+ 7, 4, t.l0.deep_cell_d010
+ 7, 6, t.l0.deep_cell_d110
+ 7, 8, t.l0.deep_cell_d001
+ 7, 10, t.l0.deep_cell_d101
+ 7, 12, t.l0.deep_cell_d011
+ 7, 14, t.l0.deep_cell_d111
+
+ 0, 1, t.l0.deep_cell_l000
+ 8, 2, t.l0.deep_cell_l100
+ 8, 4, t.l0.deep_cell_l010
+ 8, 6, t.l0.deep_cell_l110
+ 8, 8, t.l0.deep_cell_l001
+ 8, 10, t.l0.deep_cell_l101
+ 8, 12, t.l0.deep_cell_l011
+ 8, 14, t.l0.deep_cell_l111
+
+ 0, 1, t.l0.deep_cell_r000
+ 8, 3, t.l0.deep_cell_r100
+ 8, 5, t.l0.deep_cell_r010
+ 8, 7, t.l0.deep_cell_r110
+ 8, 9, t.l0.deep_cell_r001
+ 8, 11, t.l0.deep_cell_r101
+ 8, 13, t.l0.deep_cell_r011
+ 8, 15, t.l0.deep_cell_r111
+
; Deep Ocean sprites.
- 3, 0, t.deep_cell_u000
- 3, 2, t.deep_cell_u100
- 3, 4, t.deep_cell_u010
- 3, 6, t.deep_cell_u110
- 3, 8, t.deep_cell_u001
- 3, 10, t.deep_cell_u101
- 3, 12, t.deep_cell_u011
- 3, 14, t.deep_cell_u111
+ 3, 0, t.l1.deep_cell_u000
+ 3, 2, t.l1.deep_cell_u100
+