merge Wuzzy's frontend tweaks
authorsheepluva
Sun, 15 May 2016 11:37:07 +0200
changeset 11820 fe339879cf75
parent 11807 93621207563b (diff)
parent 11819 7642955690bc (current diff)
child 11821 d8844d4c67de
merge Wuzzy's frontend tweaks
--- a/.travis.yml	Fri May 06 20:12:27 2016 +0200
+++ b/.travis.yml	Sun May 15 11:37:07 2016 +0200
@@ -1,5 +1,5 @@
 language: c
-sudo: false
+sudo: true
 os:
   - linux
   - osx
--- a/hedgewars/avwrapper/avwrapper.c	Fri May 06 20:12:27 2016 +0200
+++ b/hedgewars/avwrapper/avwrapper.c	Sun May 15 11:37:07 2016 +0200
@@ -447,11 +447,11 @@
 
             if (!(x & 1) && !(y & 1)) {
                 int r = (buf[x * 4 + 0]          + buf[(x + 1) * 4 + 0] +
-                         buf[x * 4 + 0 + stride] + buf[(x + 1) * 4 + 0 + stride]) / 4;
+                         buf[x * 4 + 0 - stride] + buf[(x + 1) * 4 + 0 - stride]) / 4;
                 int g = (buf[x * 4 + 1]          + buf[(x + 1) * 4 + 1] +
-                         buf[x * 4 + 1 + stride] + buf[(x + 1) * 4 + 1 + stride]) / 4;
+                         buf[x * 4 + 1 - stride] + buf[(x + 1) * 4 + 1 - stride]) / 4;
                 int b = (buf[x * 4 + 2]          + buf[(x + 1) * 4 + 2] +
-                         buf[x * 4 + 2 + stride] + buf[(x + 1) * 4 + 2 + stride]) / 4;
+                         buf[x * 4 + 2 - stride] + buf[(x + 1) * 4 + 2 - stride]) / 4;
 
                 int cr = (int)(-0.14713f * r - 0.28886f * g + 0.436f   * b);
                 int cb = (int)( 0.615f   * r - 0.51499f * g - 0.10001f * b);
--- a/hedgewars/uGears.pas	Fri May 06 20:12:27 2016 +0200
+++ b/hedgewars/uGears.pas	Sun May 15 11:37:07 2016 +0200
@@ -876,7 +876,7 @@
         if PlacingHogs then
             ar[i]^.Unplaced:= true
         else
-            FindPlace(ar[i]^.Gear, false, leftX, playWidth, true);
+            FindPlace(ar[i]^.Gear, false, leftX, rightX, true);
         if ar[i]^.Gear <> nil then
             begin
             ar[i]^.Gear^.dX.isNegative:= hwRound(ar[i]^.Gear^.X) > leftX + playWidth div 2;
--- a/hedgewars/uGearsRender.pas	Fri May 06 20:12:27 2016 +0200
+++ b/hedgewars/uGearsRender.pas	Sun May 15 11:37:07 2016 +0200
@@ -1270,7 +1270,7 @@
                     end;
         gtDynamite: begin
                     DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
-                    if (random(3) = 0) then
+                    if (random(3) = 0) and ((Gear^.State and gstDrowning) = 0) then
                         begin
                         vg:= AddVisualGear(hwRound(Gear^.X)+12-(Gear^.Tag shr 1), hwRound(Gear^.Y)-16, vgtStraightShot);
                         if vg <> nil then