update themes cmakefiles to use GLOB instead of listing all the files
authorkoda
Thu, 05 Nov 2009 20:47:42 +0000
changeset 2602 3deb9ff104da
parent 2601 21ed7cec1fa2
child 2603 abed6070a669
update themes cmakefiles to use GLOB instead of listing all the files
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
hedgewars/hwengine.pas
hedgewars/tunsetborder.inc
hedgewars/uConsts.pas
hedgewars/uLand.pas
hedgewars/uLandGraphics.pas
hedgewars/uLandObjects.pas
hedgewars/uSound.pas
hedgewars/uStore.pas
share/hedgewars/Data/Themes/Bamboo/CMakeLists.txt
share/hedgewars/Data/Themes/Bath/CMakeLists.txt
share/hedgewars/Data/Themes/Blox/CMakeLists.txt
share/hedgewars/Data/Themes/Cake/CMakeLists.txt
share/hedgewars/Data/Themes/Castle/CMakeLists.txt
share/hedgewars/Data/Themes/City/CMakeLists.txt
share/hedgewars/Data/Themes/Compost/CMakeLists.txt
share/hedgewars/Data/Themes/CrazyMission/CMakeLists.txt
share/hedgewars/Data/Themes/EarthRise/CMakeLists.txt
share/hedgewars/Data/Themes/Eyes/CMakeLists.txt
share/hedgewars/Data/Themes/Freeway/CMakeLists.txt
share/hedgewars/Data/Themes/Halloween/CMakeLists.txt
share/hedgewars/Data/Themes/Island/CMakeLists.txt
share/hedgewars/Data/Themes/Planes/CMakeLists.txt
share/hedgewars/Data/Themes/Sheep/CMakeLists.txt
share/hedgewars/Data/Themes/Snow/CMakeLists.txt
share/hedgewars/Data/Themes/Underwater/CMakeLists.txt
share/hedgewars/Data/Themes/deepspace/CMakeLists.txt
share/hedgewars/Data/Themes/hell/CMakeLists.txt
share/hedgewars/Data/Themes/nature/CMakeLists.txt
--- a/hedgewars/GSHandlers.inc	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Nov 05 20:47:42 2009 +0000
@@ -16,6 +16,32 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+procedure makeHogsWorry(x, y: hwFloat; r: LongInt);
+var gi: PGear;
+     d: LongInt;
+begin
+	gi:= GearsList;
+	while gi <> nil do
+		begin
+		d:= r - hwRound(Distance(gi^.X - x, gi^.Y - y));
+		if (d > 1) and (gi^.Kind = gtHedgehog) and not gi^.Invulnerable then
+			begin
+			if (gi^.State and gstMoving) = 0 then
+				gi^.State:= gi^.State or gstLoser;
+			if (CurrentHedgehog^.Gear = gi) then
+				PlaySound(sndOops, false, PHedgehog(gi^.Hedgehog)^.Team^.voicepack)
+			else
+				begin
+				if d > r div 2 then
+					PlaySound(sndNooo, false, PHedgehog(gi^.Hedgehog)^.Team^.voicepack)
+				else
+					PlaySound(sndUhOh, false, PHedgehog(gi^.Hedgehog)^.Team^.voicepack);
+				end;
+			end;
+		gi:= gi^.NextGear
+		end;
+end;
+////////////////////////////////////////////////////////////////////////////////
 procedure doStepDrowningGear(Gear: PGear); forward;
 
 function CheckGearDrowning(Gear: PGear): boolean;
@@ -161,6 +187,13 @@
 doStepFallingGear(Gear);
 
 dec(Gear^.Timer);
+if Gear^.Timer = 1000 then // might need adjustments
+	case Gear^.Kind of
+		gtAmmo_Bomb: makeHogsWorry(Gear^.X, Gear^.Y, 50);
+		gtClusterBomb: makeHogsWorry(Gear^.X, Gear^.Y, 20);
+		gtWatermelon: makeHogsWorry(Gear^.X, Gear^.Y, 75);
+		gtHellishBomb: makeHogsWorry(Gear^.X, Gear^.Y, 90);
+	end;
 if Gear^.Timer = 0 then
 	begin
 	case Gear^.Kind of
@@ -251,7 +284,6 @@
 procedure doStepWatermelon(Gear: PGear);
 begin
 AllInactive:= false;
-PlaySound(sndMelon, false, nil);
 Gear^.doStep:= @doStepBomb
 end;
 
@@ -1159,6 +1191,8 @@
 doStepFallingGear(Gear);
 AllInactive:= false;
 if Gear^.Timer mod 166 = 0 then inc(Gear^.Tag);
+if Gear^.Timer = 1000 then // might need better timing
+	makeHogsWorry(Gear^.X, Gear^.Y, 75);
 if Gear^.Timer = 0 then
 	begin
 	doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 75, EXPLAutoSound);
@@ -1324,10 +1358,8 @@
 	if (hwRound(Gear^.Y) > cWaterLine) then
 		begin
 		for i:= 0 to 3 do
-			begin
 			AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 16 + Random(16), vgtSteam);
-			PlaySound(sndVaporize, false, nil);
-			end;
+		PlaySound(sndVaporize, false, nil);
 		DeleteGear(Gear);
 		exit
 		end
@@ -1530,7 +1562,6 @@
 
 Gear^.Health:= 6;
 Gear^.doStep:= @doStepAirAttackWork;
-PlaySound(sndIncoming, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -2423,6 +2454,7 @@
 	end
 end;
 
+////////////////////////////////////////////////////////////////////////////////
 procedure doStepJetpack(Gear: PGear);
 var HHGear: PGear;
 begin
--- a/hedgewars/HHHandlers.inc	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Thu Nov 05 20:47:42 2009 +0000
@@ -136,6 +136,8 @@
         yy:= -AngleCos(Angle);
 
         if ((Gear^.State and gstHHHJump) <> 0) then xx:= - xx;
+        if Ammo^[CurSlot, CurAmmo].AttackVoice <> sndNone then
+           PlaySound(Ammo^[CurSlot, CurAmmo].AttackVoice, false, CurrentTeam^.voicepack);
              case Ammo^[CurSlot, CurAmmo].AmmoType of
                       amGrenade: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtAmmo_Bomb,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer);
                       amMolotov: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtMolotov,      0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
@@ -149,16 +151,10 @@
                    amPickHammer: CurAmmoGear:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + cHHRadius, gtPickHammer, 0, _0, _0, 0);
                          amSkip: ParseCommand('/skip', true);
                          amRope: CurAmmoGear:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtRope, 0, xx, yy, 0);
-                         amMine: begin
-                                 AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtMine, 0, SignAs(_0_02, dX), _0, 3000);
-                                 PlaySound(sndLaugh, false, CurrentTeam^.voicepack)
-                                 end;
+                         amMine: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtMine, 0, SignAs(_0_02, dX), _0, 3000);
                        amDEagle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0);
                   amSniperRifle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
-                     amDynamite: begin
-                                 AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
-                                 PlaySound(sndLaugh, false, CurrentTeam^.voicepack)
-                                 end;
+                     amDynamite: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
                     amFirePunch: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtFirePunch, 0, xx, _0, 0);
                          amWhip: begin
                                  CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtWhip, 0, SignAs(_1, dX), - _0_8, 0);
@@ -184,10 +180,7 @@
                                  PlaySound(sndRCPlane, true, nil)
                                  end;
                        amKamikaze: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtKamikaze, 0, xx * _0_5, yy * _0_5, 0);
-                         amCake: begin
-                                 CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 3, hwRound(Y), gtCake, 0, xx, _0, 0);
-                                 PlaySound(sndLaugh, false, CurrentTeam^.voicepack)
-                                 end;
+                         amCake: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 3, hwRound(Y), gtCake, 0, xx, _0, 0);
                     amSeduction: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius * 2), hwRound(Y + yy * cHHRadius * 2), gtSeduction, 0, xx * _0_4, yy * _0_4, 0);
                    amWatermelon: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtWatermelon,  0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer);
                   amHellishBomb: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtHellishBomb,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
@@ -403,8 +396,13 @@
       end;
 
    PrevdX:= hwSign(Gear^.dX);
-   if (Gear^.Message and gm_Left  )<>0 then Gear^.dX:= -cLittle else
-   if (Gear^.Message and gm_Right )<>0 then Gear^.dX:=  cLittle else exit;
+    
+   if (Gear^.Message and gm_Left) <> 0 then
+      Gear^.dX:= -cLittle
+   else if (Gear^.Message and gm_Right) <> 0 then
+      Gear^.dX:=  cLittle
+   else
+      exit;
 
    StepTicks:= cHHStepTicks;
    if PrevdX <> hwSign(Gear^.dX) then
@@ -593,6 +591,7 @@
 
 if (TurnTimeLeft = 0) or (Gear^.Damage > 0) then
 	begin
+	StopSound(sndWalking);
 	TurnTimeLeft:= 0;
 	isCursorVisible:= false;
 	Gear^.State:= Gear^.State and not (gstHHDriven or gstAnimation or gstAttacking);
@@ -604,7 +603,9 @@
 
 if (Gear^.State and gstAnimation) <> 0 then
 	begin
+	StopSound(sndWalking);
 	Gear^.Message:= 0;
+	if (Gear^.Pos = Wavez[TWave(Gear^.Tag)].VoiceDelay) and (Gear^.Timer = 0) then PlaySound(Wavez[TWave(Gear^.Tag)].Voice, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
 	inc(Gear^.Timer);
 	if Gear^.Timer = Wavez[TWave(Gear^.Tag)].Interval then
 		begin
@@ -616,6 +617,13 @@
 	exit
 	end;
 
+	// HACK? "StepTicks < 100" - any better way to detect the jump delay?
+if not cArtillery and (StepTicks < 100) and ((Gear^.State and (gstMoving or gstDrowning)) = 0) and ((Gear^.Message and (gm_Left or gm_Right)) <> 0) then
+   LoopSound(sndWalking, nil)
+else
+   StopSound(sndWalking);
+
+	
 if ((Gear^.State and gstMoving) <> 0)
     or (StepTicks = cHHStepTicks)
 	or (CurAmmoGear <> nil) then // we are moving
--- a/hedgewars/hwengine.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/hwengine.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -628,7 +628,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 begin
-WriteLnToConsole('Hedgewars ' + cVersionString + ' engine');
+WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (protocol version ' + inttostr(cNetProtoVersion) + ')');
 GetParams;
 // FIXME -  hack in font with support for CJK
 if (cLocaleFName = 'zh_CN.txt') or (cLocaleFName = 'zh_TW.txt') or (cLocaleFName = 'ja.txt') then
--- a/hedgewars/tunsetborder.inc	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/tunsetborder.inc	Thu Nov 05 20:47:42 2009 +0000
@@ -23,5 +23,5 @@
         ty:= hwRound(Y);
         if ((ty and LAND_HEIGHT_MASK) = 0) and
            ((tx and LAND_WIDTH_MASK) = 0) and
-           (Land[ty, tx] = COLOR_LAND) then LandPixels[ty, tx]:= cExplosionBorderColor
+           ((Land[ty, tx] = COLOR_LAND) or (Land[ty, tx] = COLOR_OBJECT)) then LandPixels[ty, tx]:= cExplosionBorderColor
 	end;
--- a/hedgewars/uConsts.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uConsts.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -84,7 +84,8 @@
 
 	TGearsType = set of TGearType;
 
-	TSound = (sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
+	TSound = (sndNone,
+			sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
 			sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
 			sndMineTick, sndPickhammer, sndGun, sndUFO, sndJump1, sndJump2,
 			sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming,
@@ -96,7 +97,8 @@
 			sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
 			sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
 			sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
-			sndHomerun, sndMolotov);
+			sndHomerun, sndMolotov, sndWalking, sndCover, sndUhOh,
+			sndOops, sndNooo, sndHello);
 
 	TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
 			amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
@@ -131,6 +133,7 @@
 			Timer: LongWord;
 			Pos: LongWord;
 			AmmoType: TAmmoType;
+			AttackVoice: TSound;
 			end;
 
 	TVertex2f = record
@@ -207,6 +210,7 @@
 
     COLOR_LAND           = $FFFF;  // white
     COLOR_INDESTRUCTIBLE = $88FF;  // red
+	COLOR_OBJECT         = $44FF;
 
     //some opengl headers do not have these macros
     GL_BGR  = $80E0;
@@ -647,20 +651,23 @@
 			FramesCount: Longword;
 			Interval: Longword;
 			cmd: String[20];
+			Voice: TSound;
+			VoiceDelay: ShortInt;
 			end = (
-			(Sprite:   sprKowtow; FramesCount: 12; Interval: 125; cmd: '/rollup'),
-			(Sprite:      sprSad; FramesCount: 14; Interval: 125; cmd: '/sad'),
-			(Sprite:     sprWave; FramesCount: 16; Interval: 125; cmd: '/wave'),
-			(Sprite:   sprHurrah; FramesCount: 14; Interval: 125; cmd: '/hurrah'),
-			(Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'),
-			(Sprite:    sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'),
-			(Sprite:   sprJuggle; FramesCount: 49; Interval:  38; cmd: '/juggle')
+			(Sprite:   sprKowtow; FramesCount: 12; Interval: 125; cmd: '/rollup'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:      sprSad; FramesCount: 14; Interval: 125; cmd: '/sad'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:     sprWave; FramesCount: 16; Interval: 125; cmd: '/wave'; Voice: sndHello; VoiceDelay: 5),
+			(Sprite:   sprHurrah; FramesCount: 14; Interval: 125; cmd: '/hurrah'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:    sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:   sprJuggle; FramesCount: 49; Interval:  38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0)
 			);
 
 	Soundz: array[TSound] of record
 			FileName: String[25];
 			Path    : TPathType;
 			end = (
+			(FileName:                         ''; Path: ptSounds),// sndNone
 			(FileName:        'grenadeimpact.ogg'; Path: ptSounds),// sndGrenadeImpact
 			(FileName:            'explosion.ogg'; Path: ptSounds),// sndExplosion
 			(FileName:         'throwpowerup.ogg'; Path: ptSounds),// sndThrowPowerUp
@@ -719,7 +726,13 @@
 			(FileName:               'mortar.ogg'; Path: ptSounds),// sndMortar
 			(FileName:         'shutterclick.ogg'; Path: ptSounds),// sndShutter
 			(FileName:              'homerun.ogg'; Path: ptSounds),// sndHomerun
-			(FileName:              'molotov.ogg'; Path: ptSounds) // sndMolotov
+			(FileName:              'molotov.ogg'; Path: ptSounds),// sndMolotov
+			(FileName:              'walking.ogg'; Path: ptSounds),// sndWalking
+			(FileName:            'Takecover.ogg'; Path: ptVoices),// sndCover
+			(FileName:                'Uh-oh.ogg'; Path: ptVoices),// sndUhOh
+			(FileName:                 'Oops.ogg'; Path: ptVoices),// sndOops
+			(FileName:                 'Nooo.ogg'; Path: ptVoices),// sndNooo
+			(FileName:                'Hello.ogg'; Path: ptVoices) // sndHello
 			);
 
 	Ammoz: array [TAmmoType] of record
@@ -746,7 +759,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amNothing);
+					AmmoType: amNothing;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -766,7 +780,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amGrenade);
+					AmmoType: amGrenade;
+					AttackVoice: sndCover);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -786,7 +801,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amClusterBomb);
+					AmmoType: amClusterBomb;
+					AttackVoice: sndCover);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -805,7 +821,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amBazooka);
+					AmmoType: amBazooka;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -825,7 +842,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amUFO);
+					AmmoType: amUFO;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -843,7 +861,8 @@
 					NumPerTurn: 1;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amShotgun);
+					AmmoType: amShotgun;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -864,7 +883,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amPickHammer);
+					AmmoType: amPickHammer;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -883,7 +903,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSkip);
+					AmmoType: amSkip;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -903,7 +924,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amRope);
+					AmmoType: amRope;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -924,7 +946,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amMine);
+					AmmoType: amMine;
+					AttackVoice: sndLaugh);
 			Slot: 4;
 			TimeAfterTurn: 5000;
 			minAngle: 0;
@@ -942,7 +965,8 @@
 					NumPerTurn: 3;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amDEagle);
+					AmmoType: amDEagle;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -963,7 +987,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amDynamite);
+					AmmoType: amDynamite;
+					AttackVoice: sndLaugh);
 			Slot: 4;
 			TimeAfterTurn: 5000;
 			minAngle: 0;
@@ -983,7 +1008,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amFirePunch);
+					AmmoType: amFirePunch;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 3000;
 			MinAngle: 0;
@@ -1001,7 +1027,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amWhip);
+					AmmoType: amWhip;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 3000;
 			MinAngle: 0;
@@ -1019,7 +1046,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amBaseballBat);
+					AmmoType: amBaseballBat;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 5000;
 			minAngle: 0;
@@ -1041,7 +1069,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amParachute);
+					AmmoType: amParachute;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1063,7 +1092,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amAirAttack);
+					AmmoType: amAirAttack;
+					AttackVoice: sndIncoming);
 			Slot: 5;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1085,7 +1115,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amMineStrike);
+					AmmoType: amMineStrike;
+					AttackVoice: sndNone);
 			Slot: 5;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1103,7 +1134,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amBlowTorch);
+					AmmoType: amBlowTorch;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 3000;
 			minAngle: 768;
@@ -1123,7 +1155,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amGirder);
+					AmmoType: amGirder;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1145,7 +1178,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amTeleport);
+					AmmoType: amTeleport;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1165,7 +1199,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSwitch);
+					AmmoType: amSwitch;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1183,7 +1218,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amMortar);
+					AmmoType: amMortar;
+					AttackVoice: sndNone);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1203,7 +1239,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amKamikaze);
+					AmmoType: amKamikaze;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1223,7 +1260,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amCake);
+					AmmoType: amCake;
+					AttackVoice: sndLaugh);
 			Slot: 4;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1241,7 +1279,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSeduction);
+					AmmoType: amSeduction;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1261,7 +1300,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amWatermelon);
+					AmmoType: amWatermelon;
+					AttackVoice: sndMelon);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1280,7 +1320,8 @@
 					NumPerTurn: 0;
 					Timer: 5000;
 					Pos: 0;
-					AmmoType: amHellishBomb);
+					AmmoType: amHellishBomb;
+					AttackVoice: sndNone);
 			Slot: 4;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1302,7 +1343,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amNapalm);
+					AmmoType: amNapalm;
+					AttackVoice: sndNone);
 			Slot: 5;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1321,7 +1363,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amDrill);
+					AmmoType: amDrill;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1340,7 +1383,8 @@
 					NumPerTurn: 0;
 					Timer: 5001;
 					Pos: 0;
-					AmmoType: amBallgun);
+					AmmoType: amBallgun;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1360,7 +1404,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amRCPlane);
+					AmmoType: amRCPlane;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1381,7 +1426,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amLowGravity);
+					AmmoType: amLowGravity;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1402,7 +1448,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amExtraDamage);
+					AmmoType: amExtraDamage;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1423,7 +1470,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amInvulnerable);
+					AmmoType: amInvulnerable;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1444,7 +1492,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amExtraTime);
+					AmmoType: amExtraTime;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1465,7 +1514,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amLaserSight);
+					AmmoType: amLaserSight;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1486,7 +1536,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amVampiric);
+					AmmoType: amVampiric;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1504,7 +1555,8 @@
 					NumPerTurn: 1;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSniperRifle);
+					AmmoType: amSniperRifle;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1526,7 +1578,8 @@
 					NumPerTurn: 1;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amJetpack);
+					AmmoType: amJetpack;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1546,7 +1599,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amMolotov);
+					AmmoType: amMolotov;
+					AttackVoice: sndNone);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
--- a/hedgewars/uLand.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uLand.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -38,12 +38,14 @@
      hasBorder: boolean; // I'm putting this here for now.  I'd like it to be toggleable by user (so user can set a border on a non-cave map) - will turn off air attacks
      hasGirders: boolean;  // I think should be on template by template basis. some caverns might have open water and large spaces.  Some islands do not need? It might be better to tweak the girder code based upon space above.  dunno.
      playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword;  // idea is that a template can specify height/width.  Or, a map, a height/width by the dimensions of the image.  If the map has pixels near top of image, it triggers border.  Maybe not a good idea, but, for now?  Could also be used to prevent placing a girder outside play area on maps with hasBorder = true
+	 LandBackSurface: PSDL_Surface;
 
 // in your coding style, it appears to be "isXXXX" for a verb, and "FooBar" for everything else - should be PlayHeight ?
 
 procedure GenMap;
 function  GenPreview: TPreview;
 procedure CheckLandDigest(s: shortstring);
+function LandBackPixel(x, y: LongInt): LongWord;
 
 implementation
 uses uConsole, uStore, uMisc, uRandom, uTeams, uLandObjects, uSHA, uIO, uAmmos, uLandTexture;
@@ -309,6 +311,18 @@
       end;
 end;
 
+function LandBackPixel(x, y: LongInt): LongWord;
+var p: PLongWordArray;
+begin
+	if LandBackSurface = nil then
+		begin
+		LandBackPixel:= 0;
+		exit;
+		end;
+	p:= LandBackSurface^.pixels;
+	LandBackPixel:= p^[(LandBackSurface^.w) * (y mod LandBackSurface^.h) + (x mod LandBackSurface^.w)];// or $FF000000;
+end;
+
 procedure ColorizeLand(Surface: PSDL_Surface);
 var tmpsurf: PSDL_Surface;
     r, rr: TSDL_Rect;
@@ -328,6 +342,8 @@
 	end;
 SDL_FreeSurface(tmpsurf);
 
+LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent);
+
 tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Border', ifCritical or ifIgnoreCaps or ifTransparent);
 for x:= 0 to LAND_WIDTH - 1 do
 	begin
@@ -836,5 +852,9 @@
 end;
 
 initialization
+LandBackSurface:= nil;
 
+finalization
+if LandBackSurface <> nil then
+	SDL_FreeSurface(LandBackSurface);
 end.
--- a/hedgewars/uLandGraphics.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uLandGraphics.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -139,25 +139,38 @@
   if (dx = dy) then ChangeCircleLines(x, y, dx, dy, doSet)
 end;
 
-procedure FillLandCircleLines0(x, y, dx, dy: LongInt);
+procedure FillLandCircleLines0(x, y, dx, dy, cr: LongInt);
 var i: LongInt;
 begin
+cr:= cr * cr; // avoid sqrt() to compare lengths/distances
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-        if Land[y + dy, i] = COLOR_LAND then
-            LandPixels[y + dy, i]:= 0;
+        if (LandPixels[y + dy, i] and $FF000000) <> 0 then
+            if (dy * dy + (i - x) * (i - x) < cr) or (Land[y + dy, i] = COLOR_OBJECT) then
+                LandPixels[y + dy, i]:= 0
+            else
+                LandPixels[y + dy, i]:= LandBackPixel(i, y + dy);
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-        if Land[y - dy, i] = COLOR_LAND then
-             LandPixels[y - dy, i]:= 0;
+        if (LandPixels[y - dy, i] and $FF000000) <> 0 then
+            if (dy * dy + (i - x) * (i - x) < cr) or (Land[y - dy, i] = COLOR_OBJECT) then
+                LandPixels[y - dy, i]:= 0
+            else
+                LandPixels[y - dy, i]:= LandBackPixel(i, y - dy);
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-        if Land[y + dx, i] = COLOR_LAND then
-            LandPixels[y + dx, i]:= 0;
+        if (LandPixels[y + dx, i] and $FF000000) <> 0 then
+            if (dx * dx + (i - x) * (i - x) < cr) or (Land[y + dx, i] = COLOR_OBJECT) then
+                LandPixels[y + dx, i]:= 0
+            else
+                LandPixels[y + dx, i]:= LandBackPixel(i, y + dx);
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-        if Land[y - dx, i] = COLOR_LAND then
-             LandPixels[y - dx, i]:= 0;
+        if (LandPixels[y - dx, i] and $FF000000) <> 0 then
+            if (dx * dx + (i - x) * (i - x) < cr) or (Land[y - dx, i] = COLOR_OBJECT) then
+                LandPixels[y - dx, i]:= 0
+            else
+                LandPixels[y - dx, i]:= LandBackPixel(i, y - dx);
 end;
 
 procedure FillLandCircleLinesEBC(x, y, dx, dy: LongInt);
@@ -165,7 +178,7 @@
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if Land[y + dy, i] = COLOR_LAND then
+       if (Land[y + dy, i] = COLOR_LAND) or (Land[y + dy, i] = COLOR_OBJECT) then
           begin
           LandPixels[y + dy, i]:= cExplosionBorderColor;
 //          Despeckle(y + dy, i);
@@ -173,7 +186,7 @@
           end;
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if Land[y - dy, i] = COLOR_LAND then
+       if (Land[y - dy, i] = COLOR_LAND) or (Land[y - dy, i] = COLOR_OBJECT) then
           begin
           LandPixels[y - dy, i]:= cExplosionBorderColor;
 //          Despeckle(y - dy, i);
@@ -181,7 +194,7 @@
           end;
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-       if Land[y + dx, i] = COLOR_LAND then
+       if (Land[y + dx, i] = COLOR_LAND) or (Land[y + dx, i] = COLOR_OBJECT) then
            begin
            LandPixels[y + dx, i]:= cExplosionBorderColor;
 //           Despeckle(y + dx, i);
@@ -189,7 +202,7 @@
            end;
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-       if Land[y - dx, i] = COLOR_LAND then
+       if (Land[y - dx, i] = COLOR_LAND) or (Land[y - dx, i] = COLOR_OBJECT) then
           begin
           LandPixels[y - dx, i]:= cExplosionBorderColor;
 //          Despeckle(y - dx, i);
@@ -198,14 +211,17 @@
 end;
 
 procedure DrawExplosion(X, Y, Radius: LongInt);
-var dx, dy, ty, tx, d: LongInt;
+var dx, dy, ty, tx, d, cr: LongInt;
 begin
   dx:= 0;
   dy:= Radius;
   d:= 3 - 2 * Radius;
+  cr:= Radius * 3 div 4;
+  if cr < 10 then cr:= 0;
+  
   while (dx < dy) do
      begin
-     FillLandCircleLines0(x, y, dx, dy);
+     FillLandCircleLines0(x, y, dx, dy, cr);
      if (d < 0)
      then d:= d + 4 * dx + 6
      else begin
@@ -214,7 +230,7 @@
           end;
      inc(dx)
      end;
-  if (dx = dy) then FillLandCircleLines0(x, y, dx, dy);
+  if (dx = dy) then FillLandCircleLines0(x, y, dx, dy, cr);
   // FillRoundInLand after erasing land pixels to allow Land 0 check for mask.png to function
   FillRoundInLand(X, Y, Radius, 0);
   inc(Radius, 4);
@@ -249,7 +265,9 @@
     for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do
         for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do
             if Land[ty, tx] = COLOR_LAND then
-                LandPixels[ty, tx]:= 0;
+                LandPixels[ty, tx]:= LandBackPixel(tx, ty)
+			else if Land[ty, tx] = COLOR_OBJECT then
+				LandPixels[ty, tx]:= 0;
     inc(y, dY)
     end;
 
@@ -260,7 +278,7 @@
     begin
     for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do
         for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do
-            if Land[ty, tx] = COLOR_LAND then
+            if (Land[ty, tx] = COLOR_LAND) or (Land[ty, tx] = COLOR_OBJECT) then
                 begin
                 LandPixels[ty, tx]:= cExplosionBorderColor;
                 LandDirty[trunc((y + dy)/32), trunc(i/32)]:= 1;
@@ -312,11 +330,13 @@
         tx:= hwRound(X);
         ty:= hwRound(Y);
         if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) then
-         if Land[ty, tx] = COLOR_LAND then
-           begin
-           Land[ty, tx]:= 0;
-           LandPixels[ty, tx]:= 0;
-           end
+            begin
+            if Land[ty, tx] = COLOR_LAND then
+                LandPixels[ty, tx]:= LandBackPixel(tx, ty)
+            else if Land[ty, tx] = COLOR_OBJECT then
+                LandPixels[ty, tx]:= 0;
+            Land[ty, tx]:= 0;
+            end
         end;
     for t:= 0 to 7 do
         {$INCLUDE "tunsetborder.inc"}
@@ -398,7 +418,7 @@
             for x:= 0 to Pred(w) do
                 if PLongword(@(p^[x * 4]))^ <> 0 then
                    begin
-                   Land[cpY + y, cpX + x]:= COLOR_LAND;
+                   Land[cpY + y, cpX + x]:= COLOR_OBJECT;
                    LandPixels[cpY + y, cpX + x]:= PLongword(@(p^[x * 4]))^
                    end;
             p:= @(p^[Image^.pitch]);
@@ -434,7 +454,10 @@
 
 	if c < 4 then // 0-3 neighbours
 		begin
-		LandPixels[Y, X]:= 0;
+        if Land[Y, X] = COLOR_LAND then
+            LandPixels[Y, X]:= LandBackPixel(X, Y)
+        else if Land[Y, X] = COLOR_OBJECT then
+            LandPixels[Y, X]:= 0;
 		Land[Y, X]:= 0;
 		exit(true);
 		end;
--- a/hedgewars/uLandObjects.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uLandObjects.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -90,7 +90,7 @@
 		if LandPixels[cpY + y, cpX + x] = 0 then
 			begin
 			LandPixels[cpY + y, cpX + x]:= p^[x];
-			if (p^[x] and AMask) <> 0 then Land[cpY + y, cpX + x]:= COLOR_LAND;
+			if (p^[x] and AMask) <> 0 then Land[cpY + y, cpX + x]:= COLOR_OBJECT;
 			end;
 	p:= @(p^[Image^.pitch shr 2]);
 	end;
--- a/hedgewars/uSound.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uSound.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -31,6 +31,7 @@
 procedure ReleaseSound;
 procedure SoundLoad;
 procedure PlaySound(snd: TSound; infinite: boolean; voicepack: PVoicepack);
+procedure LoopSound(snd: TSound; voicepack: PVoicepack);
 procedure PlayMusic;
 procedure PauseMusic;
 procedure ResumeMusic;
@@ -66,6 +67,7 @@
 end;
 
 procedure InitSound;
+var i: TSound;
 begin
 if not isSoundEnabled then exit;
 WriteToConsole('Init sound...');
@@ -77,6 +79,9 @@
 Mix_AllocateChannels(Succ(chanTPU));
 if isMusicEnabled then Mix_VolumeMusic(50);
 
+for i:= Low(TSound) to High(TSound) do
+	lastChan[i]:= -1;
+
 Volume:= 0;
 ChangeVolume(cInitVolume)
 end;
@@ -105,7 +110,7 @@
 defVoicepack:= AskForVoicepack('Default');
 
 for i:= Low(TSound) to High(TSound) do
-	if Soundz[i].Path <> ptVoices then
+	if (Soundz[i].Path <> ptVoices) and (Soundz[i].FileName <> '') then
 		begin
 		s:= Pathz[Soundz[i].Path] + '/' + Soundz[i].FileName;
 		WriteToConsole(msgLoading + s + ' ');
@@ -117,7 +122,7 @@
 for t:= 0 to cMaxTeams do
 	if voicepacks[t].name <> '' then
 		for i:= Low(TSound) to High(TSound) do
-			if Soundz[i].Path = ptVoices then
+			if (Soundz[i].Path = ptVoices) and (Soundz[i].FileName <> '') then
 				begin
 				s:= Pathz[Soundz[i].Path] + '/' + voicepacks[t].name + '/' + Soundz[i].FileName;
 				WriteToConsole(msgLoading + s + ' ');
@@ -144,11 +149,25 @@
 	lastChan[snd]:= Mix_PlayChannelTimed(-1, defVoicepack^.chunks[snd], loops, -1)
 end;
 
+procedure LoopSound(snd: TSound; voicepack: PVoicepack);
+begin
+if (not isSoundEnabled) or fastUntilLag then exit;
+if lastChan[snd] <> -1 then exit;
+
+if (voicepack <> nil) and (voicepack^.chunks[snd] <> nil) then
+	lastChan[snd]:= Mix_PlayChannelTimed(-1, voicepack^.chunks[snd], -1, -1)
+else
+	lastChan[snd]:= Mix_PlayChannelTimed(-1, defVoicepack^.chunks[snd], -1, -1)
+end;
+
 procedure StopSound(snd: TSound);
 begin
 if not isSoundEnabled then exit;
-if Mix_Playing(lastChan[snd]) <> 0 then
-	Mix_HaltChannel(lastChan[snd])
+if (lastChan[snd] <> -1) and (Mix_Playing(lastChan[snd]) <> 0) then
+	begin
+	Mix_HaltChannel(lastChan[snd]);
+	lastChan[snd]:= -1;
+	end;
 end;
 
 procedure PlayMusic;
--- a/hedgewars/uStore.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uStore.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -1100,20 +1100,7 @@
 
 	
 {$IFNDEF IPHONEOS}
-// since ATI seems to be unable to provide proper texture filtering/quality,
-// do not even try to load the extension on ATI cards
-
-{$IFDEF DARWIN}
-if true then
-{$ELSE}
-if cGPUVendor <> gvATI then
-{$ENDIF}
-	SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two')
-{$IFDEF DEBUGFILE}
-else
-	AddFileLog('OpenGL: Skipped extension GL_ARB_texture_non_power_of_two due to ATI card')
-{$ENDIF}
-; // do not touch this line! :)
+//SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
 {$ENDIF}
 
 // set view port to whole window
--- a/share/hedgewars/Data/Themes/Bamboo/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Bamboo/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,19 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Bamboo2.png
-    Bamboo3.png
-    Bamboo.png
-    Border.png
-    Clouds.png
-    Flake.png
-    Flower.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    SkyL.png
-    Sky.png
-    SkyR.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Bamboo)
--- a/share/hedgewars/Data/Themes/Bath/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Bath/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,21 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Border.png
-    Bubble.png
-    Clouds.png
-    Duck2.png
-    Duck.png
-    Flake.png
-    Girder.png
-    horizontL.png
-    horizont.png
-    horizontR.png
-    icon.png
-    LandTex.png
-    Sky.png
-    Toothbrush_b.png
-    Toothbrush_g.png
-    Toothbrush.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Bath)
--- a/share/hedgewars/Data/Themes/Blox/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Blox/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,14 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Border.png
-    Flake.png
-    LandTex.png
-    Sky.png
-    horizont.png
-    icon.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
     theme.cfg
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Blox)
--- a/share/hedgewars/Data/Themes/Cake/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Cake/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,16 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Border.png
-    Cherry.png
-    Clouds.png
-    Flake.png
-    LandTex.png
-    Sky.png
-    horizont.png
-    icon.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
     theme.cfg
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Cake)
--- a/share/hedgewars/Data/Themes/Castle/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Castle/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,20 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Axe.png
-    BlueWater.png
-    Border.png
-    Clouds.png
-    Flake.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    Shield.png
-    SkyL.png
-    Sky.png
-    SkyR.png
-    Spear.png
-    Sword.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Castle)
--- a/share/hedgewars/Data/Themes/City/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/City/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,16 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Border.png
-    Flake.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
-    Sky.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/City)
--- a/share/hedgewars/Data/Themes/Compost/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Compost/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,26 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Border.png
-    Carrot1.png
-    Carrot2.png
-    Carrot3.png
-    Carrot4.png
-    Clouds.png
-    Cucumber1.png
-    Cucumber2.png
-    Cucumber3.png
-    Cucumber4.png
-    Eggshell1.png
-    Eggshell2.png
-    Flake.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    Onion1.png
-    Onion2.png
-    Sky.png
     theme.cfg
-    Sky-lowres.png
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Compost)
--- a/share/hedgewars/Data/Themes/CrazyMission/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/CrazyMission/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,11 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Flake.png
-    horizont.png
-    SkyL.png
-    Sky.png
-    SkyR.png
     theme.cfg
-    Sky-lowres.png
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/CrazyMission)
--- a/share/hedgewars/Data/Themes/EarthRise/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/EarthRise/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,18 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Border.png
-    Clouds.png
-    Flake.png
-    horizontL.png
-    horizont.png
-    horizontR.png
-    icon.png
-    LandTex.png
-    Rock.png
-    RockShort.png
-    SkyL.png
-    Sky.png
-    SkyR.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/EarthRise)
--- a/share/hedgewars/Data/Themes/Eyes/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Eyes/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,10 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Clouds.png
-    Flake.png
-    Sky.png
-    horizont.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Eyes)
--- a/share/hedgewars/Data/Themes/Freeway/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Freeway/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,18 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    AppleDirt.png
-    AppleSmall.png
-    Border.png
-    BottleDirt.png
-    Clouds.png
-    FishDirt.png
-    Flake.png
-    icon.png
-    LandTex.png
-    Sky.png
-    Tire.png
-    TireDirt.png
-    horizont.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Freeway)
--- a/share/hedgewars/Data/Themes/Halloween/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Halloween/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,17 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Border.png
-    Clouds.png
-    Flake.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    Rock.png
-    RockShort.png
-    Sky-lowres.png
-    SkyL.png
-    Sky.png
-    SkyR.png
     theme.cfg
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Halloween)
--- a/share/hedgewars/Data/Themes/Island/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Island/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,15 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    anchor.png
-    Border.png
-    Flake.png
-    horizont.png
-    icon.png
-    LandTex.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
-    Sky.png
     theme.cfg
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Island)
--- a/share/hedgewars/Data/Themes/Planes/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Planes/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,7 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Flake.png
-    horizont.png
-    Sky.png
     theme.cfg
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Planes)
--- a/share/hedgewars/Data/Themes/Sheep/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Sheep/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,28 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    icon.png
-    mouton2.png
-    Border.png
-    mouton3.png
-    mouton4.png
-    fleurland2.png
-    grassp.png
-    grass.png
     theme.cfg
-    fleurland3.png
-    grass2.png
-    fleurland4.png
-    Girder.png
-    mouton1.png
-    barriere.png
-    rocher.png
-    Flake.png
-    horizont.png
-    Sky.png
-    LandTex.png
-    grassp2.png
-    fleurland.png
-    fleur.png
-    Clouds.png
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Sheep)
--- a/share/hedgewars/Data/Themes/Snow/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Snow/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,15 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Border.png
-    Flake.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
-    Sky.png
     theme.cfg
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Snow)
--- a/share/hedgewars/Data/Themes/Underwater/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/Underwater/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,19 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Border.png
-    Clouds.png
-    Flake.png
-    Girder.png
-    LandTex.png
-    Sky.png
-    anchor.png
-    clam.png
-    coral.png
-    coral2.png
-    crab.png
-    horizont.png
-    icon.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/Underwater)
--- a/share/hedgewars/Data/Themes/deepspace/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/deepspace/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,9 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Border.png
-    Clouds.png
-    Flake.png
-    horizont.png
-    Sky.png
     theme.cfg
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/deepspace)
--- a/share/hedgewars/Data/Themes/hell/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/hell/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,16 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    BlueWater.png
-    Border.png
-    Clouds.png
-    Flake.png
-    horizont.png
-    icon.png
-    LandTex.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
-    Sky.png
     theme.cfg
-    horizont-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/hell)
--- a/share/hedgewars/Data/Themes/nature/CMakeLists.txt	Thu Nov 05 20:40:31 2009 +0000
+++ b/share/hedgewars/Data/Themes/nature/CMakeLists.txt	Thu Nov 05 20:47:42 2009 +0000
@@ -1,16 +1,6 @@
+file(GLOB images *.png)
+
 install(FILES
-    Border.png
-    Flake.png
-    Girder.png
-    horizont.png
-    icon.png
-    LandTex.png
-    plant1.png
-    plant2.png
-    plant3.png
-    plant4.png
-    Sky.png
     theme.cfg
-    horizont-lowres.png
-    Sky-lowres.png
+    ${images}
     DESTINATION ${SHAREPATH}Data/Themes/nature)