Changed gray and tropical water to work by overlays, not color-shift

This heavily decreases memory use, with relatively little impact on visuals, which can be refined further still.
This commit is contained in:
ln-zookeeper 2016-02-15 23:38:49 +02:00
parent 644f5e7386
commit df9cecd558
6 changed files with 102 additions and 14 deletions

View file

@ -60,6 +60,7 @@ Version 1.13.2+dev:
in a couple of places so Wesnoth does not quit on startup when trying to
relocate the log file to a path with Unicode characters (bug #22897,
definitely fixed this time).
* Decreased high memory consumption caused by the animated water.
* Fix bug #23108: exclude aborted attacks from statistics
* imgcheck now runs on Python 3
* Fix bug #15259: Secondary click uses control-click instead of command-click in OS X

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

View file

@ -528,13 +528,11 @@
{NEW:WATER_342_180_TILE_FLAGS}
{NEW:WATER_342_180 Wog "~CS(20,0,-10)" water/ocean 21}
{NEW:WATER_342_180 Wo "" water/ocean 21}
{NEW:WATER_342_180 Wot "~CS(-5,15,10)" water/ocean 21}
{NEW:WATER_342_180 Wo,Wog,Wot water/ocean 21}
{NEW:WATER_342_180 Ww,Wwr,Wwf,Wwg,Wwrg,Wwt,Wwrt water/water 17}
{NEW:WATER_342_180 Wwg,Wwrg "~CS(10,-5,-10)" water/water 17}
{NEW:WATER_342_180 Ww,Wwr,Wwf "" water/water 17}
{NEW:WATER_342_180 Wwt,Wwrt "~CS(5,20,10)" water/water 17}
{NEW:WATER_342_180_OVERLAY Wog,Wwg,Wwrg water/overlay-gray -502}
{NEW:WATER_342_180_OVERLAY Wot,Wwt,Wwrt water/overlay-tropical -504}
# Castle base terrains
@ -841,13 +839,11 @@
# Double-sided animated transitions for water-to-water and sand-to-water
{TRANSITION_COMPLETE_LF Sm (!,Sm,!,W*,D*) -556 transition3 swamp/mud-long}
{NEW:WATER_342_180_TRANSITION Wog (!,Wog,!,W*,Sm) -550 "~CS(20,0,-10)~O(50%)" water/ocean 21}
{NEW:WATER_342_180_TRANSITION Wo (!,Wo,!,W*,Sm) -551 "~O(50%)" water/ocean 21}
{NEW:WATER_342_180_TRANSITION Wot (!,Wot,!,W*,Sm) -552 "~CS(-5,15,10)~O(50%)" water/ocean 21}
{NEW:WATER_342_180_TRANSITION Wo* (!,Wo*,!,W*,Sm) -550 "~O(50%)" water/ocean 21}
{NEW:WATER_342_180_TRANSITION Ww* (!,Ww*,!,W*,Sm) -551 "~O(50%)" water/water 17}
{NEW:WATER_342_180_TRANSITION Wwg,Wwrg (!,Wwg,Wwrg,!,W*,Sm) -553 "~CS(10,-5,-10)~O(50%)" water/water 17}
{NEW:WATER_342_180_TRANSITION Ww,Wwf,Wwr (!,Ww,Wwf,Wwr,!,W*,Sm) -554 "~O(50%)" water/water 17}
{NEW:WATER_342_180_TRANSITION Wwt,Wwrt (!,Wwt,Wwrt,!,W*,Sm) -555 "~CS(5,20,10)~O(50%)" water/water 17}
{NEW:WATER_342_180_OVERLAY_TRANSITION Wog,Wwg,Wwrg (!,Wog,Wwg,Wwrg,!,W*,Sm) -503 water/overlay-gray 0.20}
{NEW:WATER_342_180_OVERLAY_TRANSITION Wot,Wwt,Wwrt (!,Wot,Wwt,Wwrt,!,W*,Sm) -505 water/overlay-tropical 0.16}
# We currently can't afford these extra rules to make the water transition nicely onto void and off-map, so
# instead we make void and off-map transition over water.

View file

@ -1313,18 +1313,108 @@
[/image]
#enddef
#define NEW:WATER_342_180 TERRAINLIST IPF IMAGESTEM FRAMES
#define NEW:WATER_342_180 TERRAINLIST IMAGESTEM FRAMES
[terrain_graphics]
[tile]
x,y=0,0
type={TERRAINLIST}
set_no_flag=base
{WATER_342_180_TILE_VARIANTS "" -1000 {IPF} {IMAGESTEM} {FRAMES}}
{WATER_342_180_TILE_VARIANTS "" -1000 "" {IMAGESTEM} {FRAMES}}
[/tile]
[/terrain_graphics]
#enddef
#define NEW:WATER_342_180_OVERLAY TERRAINLIST COLOROVERLAY LAYER
[terrain_graphics]
[tile]
x,y=0,0
type={TERRAINLIST}
[image]
name={COLOROVERLAY}.png
layer={LAYER}
[/image]
[/tile]
[/terrain_graphics]
#enddef
#define NEW:WATER_342_180_OVERLAY_TRANSITION TERRAINLIST ADJACENT LAYER IMAGESTEM OPACITY
[terrain_graphics]
map="
, 2
., 2
, 1
., .
, ."
[tile]
pos=1
type={ADJACENT}
[image]
name={IMAGESTEM}.png~MASK(terrain/masks/concave-long-2-@R0.png~O({OPACITY}))
layer={LAYER}
[/image]
[/tile]
[tile]
pos=2
type={TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type={ADJACENT}
[image]
name={IMAGESTEM}.png~MASK(terrain/masks/convex-long-@R0-@R5.png~O({OPACITY}))
layer={LAYER}
[/image]
[/tile]
[tile]
pos=3
type=!,{TERRAINLIST}
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
[terrain_graphics]
map="
, 2
., 3
, 1
., .
, ."
[tile]
pos=1
type={TERRAINLIST}
[/tile]
[tile]
pos=2
type=!,{TERRAINLIST}
[/tile]
[tile]
pos=3
type={ADJACENT}
[image]
name={IMAGESTEM}.png~MASK(terrain/masks/convex-long-@R0-@R1.png~O({OPACITY}))
layer={LAYER}
[/image]
[/tile]
rotations=tr,r,br,bl,l,tl
[/terrain_graphics]
#enddef
#define NEW:WATER_342_180_TRANSITION TERRAINLIST ADJACENT LAYER IPF IMAGESTEM FRAMES
[terrain_graphics]
map="

View file

@ -22,6 +22,7 @@ Version 1.13.2+dev:
in a couple of places so Wesnoth does not quit on startup when trying to
relocate the log file to a path with Unicode characters (bug #22897,
definitely fixed this time).
* Decreased high memory consumption caused by the animated water.
Version 1.13.2: