set translucency on fruit theme water, clamp size to even number (same sdl window resize) and honouring min size, reduce calls to dmgmod a bit
--- a/hedgewars/ArgParsers.inc Sat Apr 06 02:11:02 2013 +0200
+++ b/hedgewars/ArgParsers.inc Sun Apr 07 16:35:48 2013 -0400
@@ -191,8 +191,8 @@
{--locale} 2 : cLocaleFName := getStringParameter (arg, paramIndex, parseParameter);
{--fullscreen-width} 3 : cFullscreenWidth := getLongIntParameter(arg, paramIndex, parseParameter);
{--fullscreen-height} 4 : cFullscreenHeight := getLongIntParameter(arg, paramIndex, parseParameter);
- {--width} 5 : cWindowedWidth := getLongIntParameter(arg, paramIndex, parseParameter);
- {--height} 6 : cWindowedHeight := getLongIntParameter(arg, paramIndex, parseParameter);
+ {--width} 5 : cWindowedWidth := max(2 * (getLongIntParameter(arg, paramIndex, parseParameter) div 2), cMinScreenWidth);
+ {--height} 6 : cWindowedHeight := max(2 * (getLongIntParameter(arg, paramIndex, parseParameter) div 2), cMinScreenHeight);
{--frame-interval} 7 : cTimerInterval := getLongIntParameter(arg, paramIndex, parseParameter);
{--volume} 8 : SetVolume ( getLongIntParameter(arg, paramIndex, parseParameter) );
{--nomusic} 9 : SetMusic ( false );
--- a/hedgewars/uAI.pas Sat Apr 06 02:11:02 2013 +0200
+++ b/hedgewars/uAI.pas Sun Apr 07 16:35:48 2013 -0400
@@ -361,6 +361,7 @@
Actions: TActions;
begin
AddFileLog('Thread started');
+dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent;
StartTicks:= GameTicks;
currHedgehogIndex:= CurrentTeam^.CurrHedgehog;
itHedgehog:= currHedgehogIndex;
--- a/hedgewars/uAIMisc.pas Sat Apr 06 02:11:02 2013 +0200
+++ b/hedgewars/uAIMisc.pas Sun Apr 07 16:35:48 2013 -0400
@@ -64,7 +64,7 @@
function TestCollExcludingObjects(x, y, r: LongInt): boolean; inline;
function TestCollExcludingMe(Me: PGear; x, y, r: LongInt): boolean; inline;
function TraceShoveFall(x, y, dX, dY: Real): LongInt;
-function TestCollWithLand(x, y, r: LongInt): boolean; inline;
+function TestCollWithLand(x, y, r: LongInt): boolean; inline;
function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline;
function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt;
@@ -90,6 +90,7 @@
const KillScore = 200;
var friendlyfactor: LongInt = 300;
+var dmgMod: real = 1.0;
implementation
uses uCollisions, uVariables, uUtils, uLandTexture, uGearsUtils;
@@ -412,11 +413,10 @@
function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt;
var i, fallDmg, dmg, dmgBase, rate, erasure: LongInt;
- dX, dY, dmgMod: real;
+ dX, dY: real;
hadSkips: boolean;
begin
fallDmg:= 0;
-dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent;
rate:= 0;
// add our virtual position
with Targets.ar[Targets.Count] do
@@ -480,12 +480,11 @@
function RateShove(x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt;
var i, fallDmg, dmg, rate: LongInt;
- dX, dY, dmgMod: real;
+ dX, dY: real;
begin
fallDmg:= 0;
dX:= gdX * 0.01 * kick;
dY:= gdY * 0.01 * kick;
-dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent;
rate:= 0;
for i:= 0 to Pred(Targets.Count) do
with Targets.ar[i] do
@@ -524,10 +523,9 @@
function RateShotgun(Me: PGear; gdX, gdY: real; x, y: LongInt): LongInt;
var i, dmg, fallDmg, baseDmg, rate, erasure: LongInt;
- dX, dY, dmgMod: real;
+ dX, dY: real;
hadSkips: boolean;
begin
-dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent;
rate:= 0;
gdX:= gdX * 0.01;
gdY:= gdX * 0.01;
--- a/share/hedgewars/Data/Themes/Fruit/theme.cfg Sat Apr 06 02:11:02 2013 +0200
+++ b/share/hedgewars/Data/Themes/Fruit/theme.cfg Sun Apr 07 16:35:48 2013 -0400
@@ -2,7 +2,7 @@
border = 0, 128, 0
water-top = 255, 98, 0
water-bottom = 255, 68, 0
-water-opacity = 255
+water-opacity = 125
music = oriental.ogg
clouds = 20
object = Orange1, 1, 50, 84, 15, 3, 1, 8, 2, 90, 73