Add back sheepluva's 45° patch for some weapons. Rescale Tiy's latest icons to his specifications.
--- a/hedgewars/GSHandlers.inc Sun Mar 14 16:56:02 2010 +0000
+++ b/hedgewars/GSHandlers.inc Sun Mar 14 17:04:36 2010 +0000
@@ -164,15 +164,19 @@
////////////////////////////////////////////////////////////////////////////////
procedure doStepFallingGear(Gear: PGear);
-var isFalling: boolean;
+var isFalling, isCollV, isCollH: boolean;
+ tmp: QWord;
begin
Gear^.State:= Gear^.State and not gstCollision;
+isCollV:= false;
+isCollH:= false;
if Gear^.dY.isNegative then
begin
isFalling:= true;
if TestCollisionYwithGear(Gear, -1) then
begin
+ isCollV:= true;
Gear^.dX:= Gear^.dX * Gear^.Friction;
Gear^.dY:= - Gear^.dY * Gear^.Elasticity;
Gear^.State:= Gear^.State or gstCollision
@@ -180,18 +184,29 @@
end else
if TestCollisionYwithGear(Gear, 1) then
begin
+ isCollV:= true;
isFalling:= false;
Gear^.dX:= Gear^.dX * Gear^.Friction;
Gear^.dY:= - Gear^.dY * Gear^.Elasticity;
Gear^.State:= Gear^.State or gstCollision
end else isFalling:= true;
+
if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
begin
+ isCollH:= true;
Gear^.dX:= - Gear^.dX * Gear^.Elasticity;
Gear^.dY:= Gear^.dY * Gear^.Elasticity;
Gear^.State:= Gear^.State or gstCollision
- end;
+ end
+else if Gear^.AdvBounce and TestCollisionXwithGear(Gear, -hwSign(Gear^.dX)) then isCollH:= true;
+
+if isCollV and isCollH and Gear^.AdvBounce then
+ begin
+ tmp:= Gear^.dX.QWordValue;
+ Gear^.dX.QWordValue:= Gear^.dY.QWordValue;
+ Gear^.dY.QWordValue:= tmp;
+ end;
if isFalling then Gear^.dY:= Gear^.dY + cGravity;
--- a/hedgewars/uConsts.pas Sun Mar 14 16:56:02 2010 +0000
+++ b/hedgewars/uConsts.pas Sun Mar 14 17:04:36 2010 +0000
@@ -687,29 +687,29 @@
(FileName: 'Birdy'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 75; Height: 75; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprBirdy
(FileName: 'amCake'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandCake
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandCake
(FileName: 'amConstruction'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandConstruction
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandConstruction
(FileName: 'amGrenade'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandGrenade
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandGrenade
(FileName: 'amMelon'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandMelon
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandMelon
(FileName: 'amMortar'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandMortar
(FileName: 'amSkip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandSkip
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandSkip
(FileName: 'amCluster'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandCluster
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandCluster
(FileName: 'amDynamite'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandDynamite
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandDynamite
(FileName: 'amHellish'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandHellish
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandHellish
(FileName: 'amMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandMine
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandMine
(FileName: 'amSeduction'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandSeduction
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprHandSeduction
(FileName: 'amVamp'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false)// sprHandVamp
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false)// sprHandVamp
);
Wavez: array [TWave] of record
--- a/hedgewars/uGears.pas Sun Mar 14 16:56:02 2010 +0000
+++ b/hedgewars/uGears.pas Sun Mar 14 17:04:36 2010 +0000
@@ -29,6 +29,7 @@
TGear = record
NextGear, PrevGear: PGear;
Active: Boolean;
+ AdvBounce: Boolean;
Invulnerable: Boolean;
RenderTimer: Boolean;
Ammo : PAmmo;
@@ -254,6 +255,7 @@
case Kind of
gtAmmo_Bomb,
gtClusterBomb: begin
+ gear^.AdvBounce:= true;
gear^.Radius:= 4;
gear^.Elasticity:= _0_6;
gear^.Friction:= _0_96;
@@ -261,6 +263,7 @@
if gear^.Timer = 0 then gear^.Timer:= 3000
end;
gtWatermelon: begin
+ gear^.AdvBounce:= true;
gear^.Radius:= 4;
gear^.Elasticity:= _0_8;
gear^.Friction:= _0_995;
@@ -268,6 +271,7 @@
if gear^.Timer = 0 then gear^.Timer:= 3000
end;
gtHedgehog: begin
+ gear^.AdvBounce:= true;
gear^.Radius:= cHHRadius;
gear^.Elasticity:= _0_35;
gear^.Friction:= _0_999;
@@ -402,6 +406,7 @@
if not dX.isNegative then gear^.Angle:= 1 else gear^.Angle:= 3
end;
gtHellishBomb: begin
+ gear^.AdvBounce:= true;
gear^.Radius:= 4;
gear^.Elasticity:= _0_5;
gear^.Friction:= _0_96;
@@ -413,6 +418,7 @@
gear^.Radius:= 4
end;
gtBall: begin
+ gear^.AdvBounce:= true;
gear^.Radius:= 5;
gear^.Tag:= random(8);
gear^.Timer:= 5000;