# HG changeset patch
# User nemo
# Date 1255629721 0
# Node ID ac0c497fb84276296bdb1662e9cf066cc196f47d
# Parent a4176afd61e1e126a243eee5b88c6aeab48bd4f3
Adjustments to training mode and credits by Smaxx
diff -r a4176afd61e1 -r ac0c497fb842 QTfrontend/about.cpp
--- a/QTfrontend/about.cpp Thu Oct 15 17:51:54 2009 +0000
+++ b/QTfrontend/about.cpp Thu Oct 15 18:02:01 2009 +0000
@@ -66,7 +66,8 @@
"Mine number and time game settings: David A. Cuadrado <krawek@gmail.com>
"
"Frontend improvements: Martin Minarik <ttsmj@pokec.sk>
"
"Frontend improvements: Kristian Lehmann <email@thexception.net>
"
- "Mac OS X port: Vittorio Giovara <vittorio.giovara@gmail.com>"
+ "Mac OS X port, OpenAL wrapper library: Vittorio Giovara <vittorio.giovara@gmail.com>
"
+ "Gamepad support and additional effects: Mario Liebisch <mario.liebisch+hw@googlemail.com>"
"
" +
QLabel::tr("Art:") + "
"
@@ -106,7 +107,7 @@
"French: Antoine Turmel <geekshadow@gmail.com>
"
"German: Peter Hüwe <PeterHuewe@gmx.de>
"
"Italian: Luca Bonora <bonora.luca@gmail.com>
"
- "Japanese: ADAM Etienne <etienne.adam@gmail.com>>
"
+ "Japanese: ADAM Etienne <etienne.adam@gmail.com>
"
"Polish: Maciej Mroziński <mynick2@o2.pl>, Wojciech Latkowski <magik_15l@poczta.fm>, Maciej Górny
"
"Russian: Andrey Korotaev <unC0Rr@gmail.com>
"
"Slovak: Jose Riha
"
diff -r a4176afd61e1 -r ac0c497fb842 hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc Thu Oct 15 17:51:54 2009 +0000
+++ b/hedgewars/GSHandlers.inc Thu Oct 15 18:02:01 2009 +0000
@@ -1206,6 +1206,36 @@
end;
////////////////////////////////////////////////////////////////////////////////
+
+procedure doStepTarget(Gear: PGear);
+begin
+if (Gear^.Timer = 0) and (Gear^.Tag = 0) then
+ PlaySound(sndWarp, false, nil);
+
+if (Gear^.Tag = 0) and (Gear^.Timer < 1000) then
+ inc(Gear^.Timer)
+else if Gear^.Tag = 1 then
+ if Gear^.Timer > 0 then
+ dec(Gear^.Timer)
+ else
+ begin
+ TrainingTargetGear:= AddGear(0, 0, gtTarget, 0, _0, _0, 0);
+ FindPlace(TrainingTargetGear, false, 0, LAND_WIDTH);
+ inc(TurnTimeLeft, TrainingTimeInc);
+
+ if TrainingTimeInc > TrainingTimeInM then
+ dec(TrainingTimeInc, TrainingTimeInD);
+ if TurnTimeLeft > TrainingTimeMax then
+ TurnTimeLeft:= TrainingTimeMax;
+
+ DeleteGear(Gear);
+ exit;
+ end;
+
+doStepCase(Gear)
+end;
+
+////////////////////////////////////////////////////////////////////////////////
procedure doStepIdle(Gear: PGear);
begin
AllInactive:= false;
@@ -2219,17 +2249,13 @@
// pickup targets
t:= CheckGearNear(Gear, gtTarget, 36, 36);
if t <> nil then
- begin;
- // TODO: Sound!
- PlaySound(sndGraveImpact, false, nil);
- DeleteGear(t);
- TrainingTargetGear:= AddGear(0, 0, gtTarget, 0, _0, _0, 0);
- FindPlace(TrainingTargetGear, false, 0, LAND_WIDTH);
- inc(TurnTimeLeft, TrainingTimeInc);
-
- if TrainingTimeInc > TrainingTimeInM then
- dec(TrainingTimeInc, TrainingTimeInD);
- if TurnTimeLeft > TrainingTimeMax then TurnTimeLeft:= TrainingTimeMax;
+ begin
+ if t^.Tag = 1 then // collect it only once
+ exit;
+ PlaySound(sndShotgunReload, false, nil);
+ t^.Tag:= 1;
+ TrainingTargetGear:= nil; // remove target cursor
+ exit;
end;
if (TurnTimeLeft > 0) then
diff -r a4176afd61e1 -r ac0c497fb842 hedgewars/uGears.pas
--- a/hedgewars/uGears.pas Thu Oct 15 17:51:54 2009 +0000
+++ b/hedgewars/uGears.pas Thu Oct 15 18:02:01 2009 +0000
@@ -151,7 +151,7 @@
@doStepGirder,
@doStepTeleport,
@doStepSwitcher,
- @doStepCase,
+ @doStepTarget,
@doStepMortar,
@doStepWhip,
@doStepKamikaze,
@@ -358,8 +358,9 @@
Result^.Z:= cCurrHHZ
end;
gtTarget: begin
- Result^.Radius:= 16;
- Result^.Elasticity:= _0_3
+ Result^.Radius:= 10;
+ Result^.Elasticity:= _0_3;
+ Result^.Timer:= 0
end;
gtMortar: begin
Result^.Radius:= 4;
@@ -1481,7 +1482,11 @@
DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
end;
gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, (GameTicks shr 6) mod 12);
- gtTarget: DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
+ gtTarget: begin
+ glColor4f(1, 1, 1, Gear^.Timer / 1000);
+ DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
+ glColor4f(1, 1, 1, 1);
+ end;
gtMortar: DrawRotated(sprMortar, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
gtCake: if Gear^.Pos = 6 then
DrawRotatedf(sprCakeWalk, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90)
diff -r a4176afd61e1 -r ac0c497fb842 hedgewars/uMisc.pas
--- a/hedgewars/uMisc.pas Thu Oct 15 17:51:54 2009 +0000
+++ b/hedgewars/uMisc.pas Thu Oct 15 18:02:01 2009 +0000
@@ -73,9 +73,9 @@
GameTicks : LongWord = 0;
TrainingTimeInc: Longword = 10000;
- TrainingTimeInD: Longword = 250;
+ TrainingTimeInD: Longword = 500;
TrainingTimeInM: Longword = 5000;
- TrainingTimeMax: Longword = 90000;
+ TrainingTimeMax: Longword = 60000;
TimeTrialStartTime: Longword = 0;
TimeTrialStopTime: Longword = 0;
diff -r a4176afd61e1 -r ac0c497fb842 share/hedgewars/Data/Trainings/003_RCPlane.txt
--- a/share/hedgewars/Data/Trainings/003_RCPlane.txt Thu Oct 15 17:51:54 2009 +0000
+++ b/share/hedgewars/Data/Trainings/003_RCPlane.txt Thu Oct 15 18:02:01 2009 +0000
@@ -6,7 +6,7 @@
$landadds 0
$delay 0
map EarthRise
-theme EarthRise
-ammstore 000000100000000000000000000000100000000000000000000000000000000000000000000000
+theme nature
+ammstore 000000000000000000000000000000100000000000000000000000000000000000000000000000
addtrig C7 1 1
addtrig F2147483649 2 1