Add water opacity to theme - defaulting to 50% opaque on all themes but Eyes (80%) and Underwater (100%)
--- a/hedgewars/uLandObjects.pas Fri Jul 24 16:43:19 2009 +0000
+++ b/hedgewars/uLandObjects.pas Fri Jul 24 19:42:06 2009 +0000
@@ -372,7 +372,7 @@
Readln(f, c2.r, c2.g, c2. b);
// read water gradient colors
Readln(f, WaterColorArray[0].r, WaterColorArray[0].g, WaterColorArray[0].b);
-Readln(f, WaterColorArray[2].r, WaterColorArray[2].g, WaterColorArray[2].b);
+Readln(f, WaterColorArray[2].r, WaterColorArray[2].g, WaterColorArray[2].b, cWaterOpacity);
WaterColorArray[0].a := 255;
WaterColorArray[2].a := 255;
WaterColorArray[1]:= WaterColorArray[0];
--- a/hedgewars/uMisc.pas Fri Jul 24 16:43:19 2009 +0000
+++ b/hedgewars/uMisc.pas Fri Jul 24 19:42:06 2009 +0000
@@ -122,6 +122,8 @@
r, g, b, a: byte
end;
+var cWaterOpacity: byte = $80;
+
var WaterColorArray: array[0..3] of HwColor4f;
function hwSign(r: hwFloat): LongInt;
--- a/hedgewars/uWorld.pas Fri Jul 24 16:43:19 2009 +0000
+++ b/hedgewars/uWorld.pas Fri Jul 24 19:42:06 2009 +0000
@@ -301,7 +301,7 @@
DrawVisualGears(1);
-if not cReducedQuality then DrawWater(128);
+if not cReducedQuality then DrawWater(cWaterOpacity);
// Waves
{$WARNINGS OFF}
--- a/share/hedgewars/Data/Themes/Bamboo/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Bamboo/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
117 141 186
86 106 33
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
oriental.ogg
9
4
--- a/share/hedgewars/Data/Themes/Bath/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Bath/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
255 255 237
203 209 250
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
bath.ogg
15
6
--- a/share/hedgewars/Data/Themes/Blox/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Blox/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
179 243 243
128 128 128
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
Nature.ogg
0
0
--- a/share/hedgewars/Data/Themes/Cake/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Cake/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
0 0 51
255 200 90
$FF $DF $E1
-$FF $DF $E1
+$FF $DF $E1 $80
snow.ogg
9
4
--- a/share/hedgewars/Data/Themes/Castle/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Castle/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
45 53 57
52 52 52
81 91 96
-81 91 96
+81 91 96 $80
city.ogg
5
4
--- a/share/hedgewars/Data/Themes/City/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/City/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
21 20 38
128 0 0
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
city.ogg
45
4
--- a/share/hedgewars/Data/Themes/CrazyMission/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/CrazyMission/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
20 23 24
20 23 24
21 57 76
-21 57 76
+21 57 76 $80
snow.ogg
4
0
--- a/share/hedgewars/Data/Themes/EarthRise/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/EarthRise/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
0 0 0
106 106 106
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
city.ogg
0
2
--- a/share/hedgewars/Data/Themes/Eyes/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Eyes/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
0 0 0
175 177 75
$2B $2B $2B
-$11 $11 $11
+$11 $11 $11 $CC
hell.ogg
9
0
--- a/share/hedgewars/Data/Themes/Freeway/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Freeway/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
99 51 43
22 10 7
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
Freeway.ogg
9
2
--- a/share/hedgewars/Data/Themes/Halloween/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Halloween/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
16 3 8
116 0 100
37 91 31
-27 67 23
+27 67 23 $80
Halloween.ogg
9
2
--- a/share/hedgewars/Data/Themes/Island/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Island/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
21 20 38
128 0 0
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
pirate.ogg
9
5
--- a/share/hedgewars/Data/Themes/Planes/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Planes/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
21 20 38
177 175 49
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
city.ogg
9
0
--- a/share/hedgewars/Data/Themes/Sheep/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Sheep/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
66 71 141
51 51 51
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
Sheep.ogg
4
7
--- a/share/hedgewars/Data/Themes/Snow/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Snow/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
21 20 38
128 0 0
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
snow.ogg
9
4
--- a/share/hedgewars/Data/Themes/Underwater/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/Underwater/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
255 255 255
43 64 116
0 0 0
-0 0 0
+0 0 0 $FF
underwater.ogg
9
5
--- a/share/hedgewars/Data/Themes/cheese/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/cheese/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
16 5 27
92 60 26
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
city.ogg
9
5
--- a/share/hedgewars/Data/Themes/hell/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/hell/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
10 10 10
100 0 0
$A7 $0B $0C
-$91 $0A $0A
+$91 $0A $0A $80
hell.ogg
9
4
--- a/share/hedgewars/Data/Themes/nature/theme.cfg Fri Jul 24 16:43:19 2009 +0000
+++ b/share/hedgewars/Data/Themes/nature/theme.cfg Fri Jul 24 19:42:06 2009 +0000
@@ -1,7 +1,7 @@
19 18 82
128 0 0
$54 $5C $9D
-$34 $3C $7D
+$34 $3C $7D $80
Nature.ogg
9
4