--- a/QTfrontend/CMakeLists.txt Mon Jun 30 14:59:11 2008 +0000
+++ b/QTfrontend/CMakeLists.txt Mon Jun 30 17:36:55 2008 +0000
@@ -82,7 +82,7 @@
-o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
else(MINGW)
- set(hwfr_src ${hwfr_src} res/hedgewars.rc)
+ set(hwfr_src ${hwfr_src} /hedgewars.rc)
endif(MINGW)
set(hwfr_moc_hdrs
--- a/hedgewars/uConsts.pas Mon Jun 30 14:59:11 2008 +0000
+++ b/hedgewars/uConsts.pas Mon Jun 30 17:36:55 2008 +0000
@@ -57,7 +57,7 @@
gtTeleport, gtSmallDamage, gtSwitcher, gtTarget, gtMortar,
gtWhip, gtKamikaze);
- TVisualGearType = (vgtFlake, vgtCloud);
+ TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart);
TGearsType = set of TGearType;
--- a/hedgewars/uVisualGears.pas Mon Jun 30 14:59:11 2008 +0000
+++ b/hedgewars/uVisualGears.pas Mon Jun 30 17:36:55 2008 +0000
@@ -41,6 +41,7 @@
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear;
procedure ProcessVisualGears(Steps: Longword);
procedure DrawVisualGears();
+procedure DeleteVisualGear(Gear: PVisualGear);
procedure AddClouds;
var VisualGearsList: PVisualGear = nil;
@@ -85,11 +86,23 @@
if hwRound(Gear^.X) > cScreenWidth + 2048 then Gear^.X:= int2hwFloat(-cScreenWidth - 256)
end;
+procedure doStepExpl(Gear: PVisualGear; Steps: Longword);
+begin
+Gear^.X:= Gear^.X + Gear^.dX;
+
+Gear^.Y:= Gear^.Y + Gear^.dY;
+Gear^.dY:= Gear^.dY + cGravity;
+
+dec(Gear^.FrameTicks);
+if Gear^.FrameTicks = 0 then DeleteVisualGear(Gear)
+end;
+
// ==================================================================
const doStepHandlers: array[TVisualGearType] of TVGearStepProcedure =
(
@doStepFlake,
- @doStepCloud
+ @doStepCloud,
+ @doStepExpl
);
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear;
@@ -123,6 +136,14 @@
dy.QWordValue:= 21474836 + random(64424509);
mdY:= dy.QWordValue
end;
+ vgtExplPart: with Result^ do
+ begin
+ dx.isNegative:= random(2) = 0;
+ dx.QWordValue:= random(300000) + 1000000;
+ dy.isNegative:= random(2) = 0;
+ dy.QWordValue:= random(300000) + 1000000;
+ FrameTicks:= 700
+ end;
end;
if VisualGearsList <> nil then
@@ -135,6 +156,14 @@
AddVisualGear:= Result
end;
+procedure DeleteVisualGear(Gear: PVisualGear);
+begin
+if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
+if Gear^.PrevGear <> nil then Gear^.PrevGear^.NextGear:= Gear^.NextGear
+ else VisualGearsList:= Gear^.NextGear;
+
+Dispose(Gear)
+end;
procedure ProcessVisualGears(Steps: Longword);
var Gear, t: PVisualGear;