Engine:
* Save screenshots to "Screenshots" sub directory
* Added new ultimate weapon: Perform Beathoven's deadly sonata during the Piano Strike (this time for real! still missing some sounds/assets)
--- a/QTfrontend/hwconsts.cpp.in Fri Apr 16 16:04:21 2010 +0000
+++ b/QTfrontend/hwconsts.cpp.in Fri Apr 16 16:04:41 2010 +0000
@@ -31,10 +31,10 @@
QStringList * mapList;
QString * cDefaultAmmoStore = new QString(
- "939192942219912103223511100120100000021110"
- "040504054160065554655446477657666666615550"
- "000000000000020550000004000700400000000020"
- "131111031211111112311411111111111111121110"
+ "9391929422199121032235111001201000000211190"
+ "0405040541600655546554464776576666666155501"
+ "0000000000000205500000040007004000000000200"
+ "1311110312111111123114111111111111111211101"
);
int cAmmoNumber = cDefaultAmmoStore->size() / 4;
@@ -42,30 +42,30 @@
QList< QPair<QString, QString> >()
<< qMakePair(QString("Default"), *cDefaultAmmoStore)
<< qMakePair(QString("Crazy"), QString(
- "999999999999999999299999999999999929999990"
- "111111011111111111111111111111111111111110"
- "000000000000000000000000000000000000000000"
- "131111031211111112311411111111111111121110"))
+ "9999999999999999992999999999999999299999909" // TODO: Remove Piano's unlimited uses!
+ "1111110111111111111111111111111111111111111"
+ "0000000000000000000000000000000000000000000"
+ "1311110312111111123114111111111111111211100"))
<< qMakePair(QString("Pro mode"), QString(
- "909000900000000000000900000000000000000000"
- "000000000000000000000000000000000000000000"
- "000000000000020550000004000700400000000020"
- "111111111111111111111111111111111111111110"))
+ "9090009000000000000009000000000000000000000"
+ "0000000000000000000000000000000000000000000"
+ "0000000000000205500000040007004000000000200"
+ "1111111111111111111111111111111111111111100"))
<< qMakePair(QString("Shoppa"), QString(
- "000000990000000000000000000000000000000000"
- "444441004424440221011212122242200000000200"
- "000000000000000000000000000000000000000000"
- "111111111111111111111111111111111111111110"))
+ "0000009900000000000000000000000000000000000"
+ "4444410044244402210112121222422000000002000"
+ "0000000000000000000000000000000000000000000"
+ "1111111111111111111111111111111111111111101"))
<< qMakePair(QString("Basketball"),QString(
- "000000900000090000000000000000000000000000"
- "000000000000000000000000000000000000000000"
- "000000000000000550000004000700400000000020"
- "111111111111111111111111111111111111111110"))
+ "0000009000000900000000000000000000000000000"
+ "0000000000000000000000000000000000000000000"
+ "0000000000000005500000040007004000000000200"
+ "1111111111111111111111111111111111111111111"))
<< qMakePair(QString("Minefield"), QString(
- "000000990009000000030000000000000000000000"
- "000000000000000000000000000000000000000000"
- "000000000000020550000004000700400000000020"
- "111111111111111111111111111111111111111110"))
+ "0000009900090000000300000000000000000000000"
+ "0000000000000000000000000000000000000000000"
+ "0000000000000205500000040007004000000000200"
+ "1111111111111111111111111111111111111111111"))
;
QColor * color1 = new QColor(221, 0, 0);
--- a/QTfrontend/main.cpp Fri Apr 16 16:04:21 2010 +0000
+++ b/QTfrontend/main.cpp Fri Apr 16 16:04:41 2010 +0000
@@ -311,6 +311,7 @@
{
checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos");
checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves");
+ checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Screenshots");
checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Teams");
}
cfgdir->cd("Library/Application Support/Hedgewars");
@@ -323,6 +324,7 @@
{
checkForDir(cfgdir->absolutePath() + "/Hedgewars/Demos");
checkForDir(cfgdir->absolutePath() + "/Hedgewars/Saves");
+ checkForDir(cfgdir->absolutePath() + "/Hedgewars/Screenshots");
checkForDir(cfgdir->absolutePath() + "/Hedgewars/Teams");
}
cfgdir->cd("Hedgewars");
@@ -333,6 +335,7 @@
{
checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos");
checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves");
+ checkForDir(cfgdir->absolutePath() + "/.hedgewars/Screenshots");
checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams");
}
cfgdir->cd(".hedgewars");
@@ -342,6 +345,7 @@
{
checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos");
checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves");
+ checkForDir(cfgdir->absolutePath() + "/.hedgewars/Screenshots");
checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams");
}
cfgdir->cd(".hedgewars");
@@ -353,6 +357,7 @@
{
checkForDir(cfgdir->absolutePath() + "/Demos");
checkForDir(cfgdir->absolutePath() + "/Saves");
+ checkForDir(cfgdir->absolutePath() + "/Screenshots");
checkForDir(cfgdir->absolutePath() + "/Teams");
}
}
--- a/hedgewars/GSHandlers.inc Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/GSHandlers.inc Fri Apr 16 16:04:41 2010 +0000
@@ -3048,3 +3048,21 @@
3) On any other shot, delete any existing portals of type X%2, and spawn a new portal of type X%2 oriented at angle 180° from the portal gun. It might possibly be worth linking portals with a Gear reference, to save time on scanning through the Gear list every time we need a portal.
*)
end;
+
+procedure doStepPiano(Gear: PGear);
+var r0, r1: LongInt;
+begin
+AllInactive:= false;
+doStepFallingGear(Gear);
+if (Gear^.State and gstCollision) <> 0 then
+ begin
+ r0:= GetRandom(21);
+ r1:= GetRandom(21);
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 80 + r0, EXPLAutoSound);
+ doMakeExplosion(hwRound(Gear^.X) - 30 - r0, hwRound(Gear^.Y) + 40, 40 + r1, EXPLAutoSound);
+ doMakeExplosion(hwRound(Gear^.X) + 30 + r1, hwRound(Gear^.Y) + 40, 40 + r0, EXPLAutoSound);
+ Gear^.dY:= -_1;
+ end
+else
+ Gear^.dY += cGravity * 2; // let it fall faster so itdoesn't take too long for the whole attack
+end;
\ No newline at end of file
--- a/hedgewars/HHHandlers.inc Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/HHHandlers.inc Fri Apr 16 16:04:41 2010 +0000
@@ -205,6 +205,7 @@
amExtraTime: TurnTimeLeft:= TurnTimeLeft + 30000;
amLaserSight: cLaserSighting:= true;
amVampiric: cVampiric:= true;
+ amPiano: FollowGear:= AddGear(TargetPoint.X, 0, gtPiano, 0, _0, _0, 0);
end;
uStats.AmmoUsed(Ammo^[CurSlot, CurAmmo].AmmoType);
--- a/hedgewars/uAIAmmoTests.pas Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/uAIAmmoTests.pas Fri Apr 16 16:04:41 2010 +0000
@@ -91,8 +91,9 @@
(proc: nil; flags: 0), // amSniperRifle
(proc: nil; flags: 0), // amJetpack
(proc: @TestMolotov; flags: 0), // amMolotov
- (proc: nil; flags: 0), // amBirdy
- (proc: nil; flags: 0) // amPortalGun
+ (proc: nil; flags: 0), // amBirdy
+ (proc: nil; flags: 0), // amPortalGun
+ (proc: nil; flags: 0) // amPiano
);
const BadTurn = Low(LongInt) div 4;
--- a/hedgewars/uConsts.pas Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/uConsts.pas Fri Apr 16 16:04:41 2010 +0000
@@ -72,7 +72,7 @@
sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
- sprFeather);
+ sprFeather, sprPiano);
TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, // 3
gtGrave, gtBee, gtShotgunShot, gtPickHammer, gtRope, // 8
@@ -84,7 +84,7 @@
gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 37
gtHellishBomb, gtEvilTrace, gtWaterUp, gtDrill, gtBallGun, gtBall,gtRCPlane,
gtSniperRifleShot, gtJetpack, gtMolotov, gtExplosives, gtBirdy,
- gtBigExplosion, gtEgg, gtPortal, gtPortalGun);
+ gtBigExplosion, gtEgg, gtPortal, gtPortalGun, gtPiano);
TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
@@ -120,7 +120,8 @@
amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake,
amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun,
amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime,
- amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun);
+ amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun,
+ amPiano);
THWFont = (fnt16, fntBig, fntSmall, CJKfnt16, CJKfntBig, CJKfntSmall);
@@ -734,7 +735,9 @@
(FileName: 'amBee'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprHandBee
(FileName: 'Feather'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 15; Height: 25; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprFeather
+ Width: 15; Height: 25; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprFeather
+ (FileName: 'Piano'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprPiano
);
Wavez: array [TWave] of record
@@ -1797,6 +1800,30 @@
isDamaging: true;
SkipTurns: 0;
PosCount: 1;
+ PosSprite: sprWater),
+ (NameId: sidPiano;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_DontHold or
+ ammoprop_NotBorder;
+ Count: 1;
+ InitialCount: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amPiano;
+ AttackVoice: sndIncoming);
+ Slot: 5;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 7;
+ PosCount: 1;
PosSprite: sprWater)
);
--- a/hedgewars/uGears.pas Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/uGears.pas Fri Apr 16 16:04:41 2010 +0000
@@ -184,7 +184,8 @@
@doStepBigExplosion,
@doStepEggWork,
@doStepPortal,
- @doStepPortalGun
+ @doStepPortalGun,
+ @doStepPiano
);
procedure InsertGearToList(Gear: PGear);
@@ -476,6 +477,9 @@
gear^.AdvBounce:= 0;
gear^.Radius:= 16;
end;
+ gtPiano: begin
+ gear^.Radius:= 32
+ end;
end;
InsertGearToList(gear);
AddGear:= gear;
@@ -1778,6 +1782,16 @@
glColor4f(1, 1, 1, 1);
end;
gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 16, 16, Gear^.DirAngle);
+ gtPiano: begin
+ if (Gear^.State and gstDrowning) = 0 then
+ begin
+ glColor4f(1, 1, 1, 0.0625);
+ for i:= 8 downto 1 do
+ DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128, 0);
+ glColor4f(1, 1, 1, 1)
+ end;
+ DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 128, 128, 0);
+ end;
end;
if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex);
Gear:= Gear^.NextGear
--- a/hedgewars/uLocale.pas Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/uLocale.pas Fri Apr 16 16:04:41 2010 +0000
@@ -28,7 +28,8 @@
sidKamikaze, sidCake, sidSeduction, sidWatermelon,
sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane,
sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
- sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack, sidMolotov, sidBirdy, sidPortalGun);
+ sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
+ sidMolotov, sidBirdy, sidPortalGun, sidPiano);
TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
--- a/hedgewars/uMisc.pas Fri Apr 16 16:04:21 2010 +0000
+++ b/hedgewars/uMisc.pas Fri Apr 16 16:04:41 2010 +0000
@@ -584,12 +584,12 @@
// update header information and file name
{$IFNDEF WIN32}
-filename:= ParamStr(1) + '/' + filename + '.tga';
+filename:= ParamStr(1) + '/Screenshots/' + filename + '.tga';
head[6]:= cScreenWidth;
head[7]:= cScreenHeight;
{$ELSE}
-filename:= ParamStr(1) + '/' + filename + '.bmp';
+filename:= ParamStr(1) + '/Screenshots/' + filename + '.bmp';
head[$02]:= (size + 54) and $ff;
head[$03]:= ((size + 54) shr 8) and $ff;
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed
Binary file share/hedgewars/Data/Graphics/Piano.png has changed
--- a/share/hedgewars/Data/Locale/en.txt Fri Apr 16 16:04:21 2010 +0000
+++ b/share/hedgewars/Data/Locale/en.txt Fri Apr 16 16:04:41 2010 +0000
@@ -42,7 +42,8 @@
00:39=Flying Saucer
00:40=Molotov Cocktail
00:41=Birdy
-00:42=Portal Gun
+00:42=Portable Portal Device
+00:43=Piano Strike
01:00=Let's fight!
01:01=Round draw
@@ -414,6 +415,9 @@
03:39=Transport Utility
03:40=Incinerating Grenade
03:41=Huge fan of Squawks
+03:42=I'm making a note here...
+; the misspelled "Beethoven" is intentional (-> to beat)
+03:43=Performing Beathoven's deadly sonata
; Weapon Descriptions (use | as line breaks)
04:00=Attack your enemies using a simple grenade.|It will explode once its timer reaches zero.|1-5: Set grenade's timer|Attack: Hold to throw with more power
@@ -458,6 +462,8 @@
04:39=Fly to other parts of the map using the flying|saucer. This hard to master utility is able to|take you to almost any position on the battlefield.|Attack: Activate|Up/Left/Right: Apply force in one direction|Long Jump: Drop grenades or similar weapons
04:40=Set some ground on fire using this bottle filled|with (soon to be) burning liquid.|Attack: Hold to shoot with more power
04:41=The evidence nature might even top the flying|saucer. Birdy can carry your hog around and|drop eggs on your enemies!|Attack: Activate and drop eggs|Up/Left/Right: Flap in one direction
+04:42=HUGE SUCCESS| | |(but missing texts!)
+04:43=(missing text)
; Game goal strings
05:00=Game Modes