some final work and buggfix for Tag Team, it is now playable
authorHenek
Sat, 19 Mar 2011 16:19:50 +0100
changeset 5022 d2a2f6c9b236
parent 5021 ca09bfa0414c
child 5023 8c16c0534b3c
some final work and buggfix for Tag Team, it is now playable
QTfrontend/hedgewars.qrc
QTfrontend/pages.cpp
QTfrontend/res/btnTagTeam.png
hedgewars/uTeams.pas
hedgewars/uTypes.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Locale/en.txt
--- a/QTfrontend/hedgewars.qrc	Sat Mar 19 14:38:49 2011 +0100
+++ b/QTfrontend/hedgewars.qrc	Sat Mar 19 16:19:50 2011 +0100
@@ -1,132 +1,133 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
-    <file alias="Ammos.png">../share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png</file>
-    <file>res/hh25x25.png</file>
-    <file>res/hh25x25grey.png</file>
-    <file>res/ammopic.png</file>
-    <file>res/ammopicgrey.png</file>
-    <file>res/ammopicbox.png</file>
-    <file>res/ammopicboxgrey.png</file>
-    <file>res/ammopicdelay.png</file>
-    <file>res/ammopicdelaygrey.png</file>
-    <file>res/infinity.png</file>
-    <file>res/infinitygrey.png</file>
-    <file>res/botlevels/0.png</file>
-    <file>res/botlevels/1.png</file>
-    <file>res/botlevels/2.png</file>
-    <file>res/botlevels/3.png</file>
-    <file>res/botlevels/4.png</file>
-    <file>res/botlevels/5.png</file>
-    <file>res/botlevels/net0.png</file>
-    <file>res/botlevels/net1.png</file>
-    <file>res/botlevels/net2.png</file>
-    <file>res/botlevels/net3.png</file>
-    <file>res/botlevels/net4.png</file>
-    <file>res/botlevels/net5.png</file>
-    <file>res/bonus.png</file>
-    <file>res/Hedgehog.png</file>
-    <file>res/net.png</file>
-    <file>res/About.png</file>
-    <file>res/SimpleGame.png</file>
-    <file>res/Campaign.png</file>
-    <file>res/Multiplayer.png</file>
-    <file>res/Trainings.png</file>
-    <file>res/Background.png</file>
-    <file>res/Exit.png</file>
-    <file>res/HedgewarsTitle.png</file>
-    <file>res/LocalPlay.png</file>
-    <file>res/NetworkPlay.png</file>
-    <file>res/Settings.png</file>
-    <file>res/dropdown.png</file>
-    <file>res/new.png</file>
-    <file>res/edit.png</file>
-    <file>res/delete.png</file>
-    <file>res/checked.png</file>
-    <file>res/unchecked.png</file>
-    <file>res/graphicsicon.png</file>
-    <file>res/miscicon.png</file>
-    <file>res/Save.png</file>
-    <file>res/Record.png</file>
-    <file>res/weaponsicon.png</file>
-    <file>res/teamicon.png</file>
-    <file>res/panelbg.png</file>
-    <file>res/lightbulb_on.png</file>
-    <file>res/lightbulb_off.png</file>
-    <file>res/spin_up.png</file>
-    <file>res/spin_down.png</file>
-    <file>res/PlaySound.png</file>
-    <file>res/hh_small.png</file>
-    <file>res/btnDisabled.png</file>
-    <file>res/btnForts.png</file>
-    <file>res/btnBorder.png</file>
-    <file>res/btnInvulnerable.png</file>
-    <file>res/btnLaserSight.png</file>
-    <file>res/btnLowGravity.png</file>
-    <file>res/btnResetHealth.png</file>
-    <file>res/btnTeamsDivide.png</file>
-    <file>res/btnSolid.png</file>
-    <file>res/btnVampiric.png</file>
-    <file>res/btnKarma.png</file>
-    <file>res/btnArtillery.png</file>
-    <file>res/btnRandomOrder.png</file>
-    <file>res/btnKing.png</file>
-    <file>res/btnPlaceHog.png</file>
-    <file>res/btnSharedAmmo.png</file>
-    <file>res/btnDisableGirders.png</file>
-    <file>res/btnDisableLandObjects.png</file>
-    <file>res/btnAISurvival.png</file>
-    <file>res/btnInfAttack.png</file>
-    <file>res/btnResetWeps.png</file>
-    <file>res/btnPerHogAmmo.png</file>
-    <file>res/btnNoWind.png</file>
-    <file>res/btnMoreWind.png</file>
-    <file>res/iconBox.png</file>
-    <file>res/iconHealth.png</file>
-    <file>res/iconSuddenDeath.png</file>
-    <file>res/iconDamage.png</file>
-    <file>res/iconTime.png</file>
-    <file>res/iconMine.png</file>
-    <file>res/iconDud.png</file>
-    <file>res/iconRope.png</file>
-    <file>res/dice.png</file>
-    <file>res/Star.png</file>
-    <file>res/file_save.png</file>
-    <file>res/file_demo.png</file>
-    <file>res/chat_default.png</file>
-    <file>res/chat_ignore.png</file>
-    <file>res/chat_friend.png</file>
-    <file>res/chat_default_on.png</file>
-    <file>res/chat_ignore_on.png</file>
-    <file>res/chat_friend_on.png</file>
-    <file>res/chat_default_off.png</file>
-    <file>res/chat_ignore_off.png</file>
-    <file>res/chat_friend_off.png</file>
-    <file>res/addfriend.png</file>
-    <file>res/remfriend.png</file>
-    <file>res/ignore.png</file>
-    <file>res/unignore.png</file>
-    <file>res/follow.png</file>
-    <file>res/info.png</file>
-    <file>res/kick.png</file>
-    <file>res/lock.png</file>
-    <file>res/unlock.png</file>
-    <file>res/StatsMedal1.png</file>
-    <file>res/StatsMedal2.png</file>
-    <file>res/StatsMedal3.png</file>
-    <file>res/StatsMedal4.png</file>
-    <file>res/StatsR.png</file>
-    <file>res/StatsH.png</file>
-    <file>res/StatsD.png</file>
-    <file>res/StatsBestKiller.png</file>
-    <file>res/StatsBestShot.png</file>
-    <file>res/StatsHedgehogsKilled.png</file>
-    <file>res/StatsMostSelfDamage.png</file>
-    <file>res/StatsSelfKilled.png</file>
-    <file>res/StatsSkipped.png</file>
-    <file>res/mapRandom.png</file>
-    <file>res/mapMaze.png</file>
-    <file>res/mapMissing.png</file>
-    <file>res/mapCustom.png</file>
-    <file>res/mapMission.png</file>
-</qresource>
+<RCC>
+    <qresource prefix="/">
+        <file alias="Ammos.png">../share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png</file>
+        <file>res/hh25x25.png</file>
+        <file>res/hh25x25grey.png</file>
+        <file>res/ammopic.png</file>
+        <file>res/ammopicgrey.png</file>
+        <file>res/ammopicbox.png</file>
+        <file>res/ammopicboxgrey.png</file>
+        <file>res/ammopicdelay.png</file>
+        <file>res/ammopicdelaygrey.png</file>
+        <file>res/infinity.png</file>
+        <file>res/infinitygrey.png</file>
+        <file>res/botlevels/0.png</file>
+        <file>res/botlevels/1.png</file>
+        <file>res/botlevels/2.png</file>
+        <file>res/botlevels/3.png</file>
+        <file>res/botlevels/4.png</file>
+        <file>res/botlevels/5.png</file>
+        <file>res/botlevels/net0.png</file>
+        <file>res/botlevels/net1.png</file>
+        <file>res/botlevels/net2.png</file>
+        <file>res/botlevels/net3.png</file>
+        <file>res/botlevels/net4.png</file>
+        <file>res/botlevels/net5.png</file>
+        <file>res/bonus.png</file>
+        <file>res/Hedgehog.png</file>
+        <file>res/net.png</file>
+        <file>res/About.png</file>
+        <file>res/SimpleGame.png</file>
+        <file>res/Campaign.png</file>
+        <file>res/Multiplayer.png</file>
+        <file>res/Trainings.png</file>
+        <file>res/Background.png</file>
+        <file>res/Exit.png</file>
+        <file>res/HedgewarsTitle.png</file>
+        <file>res/LocalPlay.png</file>
+        <file>res/NetworkPlay.png</file>
+        <file>res/Settings.png</file>
+        <file>res/dropdown.png</file>
+        <file>res/new.png</file>
+        <file>res/edit.png</file>
+        <file>res/delete.png</file>
+        <file>res/checked.png</file>
+        <file>res/unchecked.png</file>
+        <file>res/graphicsicon.png</file>
+        <file>res/miscicon.png</file>
+        <file>res/Save.png</file>
+        <file>res/Record.png</file>
+        <file>res/weaponsicon.png</file>
+        <file>res/teamicon.png</file>
+        <file>res/panelbg.png</file>
+        <file>res/lightbulb_on.png</file>
+        <file>res/lightbulb_off.png</file>
+        <file>res/spin_up.png</file>
+        <file>res/spin_down.png</file>
+        <file>res/PlaySound.png</file>
+        <file>res/hh_small.png</file>
+        <file>res/btnDisabled.png</file>
+        <file>res/btnForts.png</file>
+        <file>res/btnBorder.png</file>
+        <file>res/btnInvulnerable.png</file>
+        <file>res/btnLaserSight.png</file>
+        <file>res/btnLowGravity.png</file>
+        <file>res/btnResetHealth.png</file>
+        <file>res/btnTeamsDivide.png</file>
+        <file>res/btnSolid.png</file>
+        <file>res/btnVampiric.png</file>
+        <file>res/btnKarma.png</file>
+        <file>res/btnArtillery.png</file>
+        <file>res/btnRandomOrder.png</file>
+        <file>res/btnKing.png</file>
+        <file>res/btnPlaceHog.png</file>
+        <file>res/btnSharedAmmo.png</file>
+        <file>res/btnDisableGirders.png</file>
+        <file>res/btnDisableLandObjects.png</file>
+        <file>res/btnAISurvival.png</file>
+        <file>res/btnInfAttack.png</file>
+        <file>res/btnResetWeps.png</file>
+        <file>res/btnPerHogAmmo.png</file>
+        <file>res/btnNoWind.png</file>
+        <file>res/btnMoreWind.png</file>
+        <file>res/btnTagTeam.png</file>
+        <file>res/iconBox.png</file>
+        <file>res/iconHealth.png</file>
+        <file>res/iconSuddenDeath.png</file>
+        <file>res/iconDamage.png</file>
+        <file>res/iconTime.png</file>
+        <file>res/iconMine.png</file>
+        <file>res/iconDud.png</file>
+        <file>res/iconRope.png</file>
+        <file>res/dice.png</file>
+        <file>res/Star.png</file>
+        <file>res/file_save.png</file>
+        <file>res/file_demo.png</file>
+        <file>res/chat_default.png</file>
+        <file>res/chat_ignore.png</file>
+        <file>res/chat_friend.png</file>
+        <file>res/chat_default_on.png</file>
+        <file>res/chat_ignore_on.png</file>
+        <file>res/chat_friend_on.png</file>
+        <file>res/chat_default_off.png</file>
+        <file>res/chat_ignore_off.png</file>
+        <file>res/chat_friend_off.png</file>
+        <file>res/addfriend.png</file>
+        <file>res/remfriend.png</file>
+        <file>res/ignore.png</file>
+        <file>res/unignore.png</file>
+        <file>res/follow.png</file>
+        <file>res/info.png</file>
+        <file>res/kick.png</file>
+        <file>res/lock.png</file>
+        <file>res/unlock.png</file>
+        <file>res/StatsMedal1.png</file>
+        <file>res/StatsMedal2.png</file>
+        <file>res/StatsMedal3.png</file>
+        <file>res/StatsMedal4.png</file>
+        <file>res/StatsR.png</file>
+        <file>res/StatsH.png</file>
+        <file>res/StatsD.png</file>
+        <file>res/StatsBestKiller.png</file>
+        <file>res/StatsBestShot.png</file>
+        <file>res/StatsHedgehogsKilled.png</file>
+        <file>res/StatsMostSelfDamage.png</file>
+        <file>res/StatsSelfKilled.png</file>
+        <file>res/StatsSkipped.png</file>
+        <file>res/mapRandom.png</file>
+        <file>res/mapMaze.png</file>
+        <file>res/mapMissing.png</file>
+        <file>res/mapCustom.png</file>
+        <file>res/mapMission.png</file>
+    </qresource>
 </RCC>
--- a/QTfrontend/pages.cpp	Sat Mar 19 14:38:49 2011 +0100
+++ b/QTfrontend/pages.cpp	Sat Mar 19 16:19:50 2011 +0100
@@ -1678,7 +1678,7 @@
     TBW_morewind->setToolTip("<b>" + ToggleButtonWidget::tr("More Wind") + "</b>:<br />" + tr("Wind will affect almost everything."));
     glGMLayout->addWidget(TBW_morewind,4,2,1,1);
 
-    TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind.png");
+    TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnTagTeam.png");
     TBW_tagteam->setToolTip("<b>" + ToggleButtonWidget::tr("Tag Team") + "</b>:<br />" + tr("Teams in each clan takes successive turns but have to share turn time."));
     glGMLayout->addWidget(TBW_tagteam,4,3,1,1);
 
Binary file QTfrontend/res/btnTagTeam.png has changed
--- a/hedgewars/uTeams.pas	Sat Mar 19 14:38:49 2011 +0100
+++ b/hedgewars/uTeams.pas	Sat Mar 19 16:19:50 2011 +0100
@@ -246,7 +246,7 @@
     end
 else if ((GameFlags And gfTagTeam) <> 0) and not NextClan then
     begin
-    TurnTimeLeft:= TagTurnTimeLeft;
+    if TagTurnTimeLeft <> 0 then TurnTimeLeft:= TagTurnTimeLeft;
     TagTurnTimeLeft:= 0;
     end
 else
--- a/hedgewars/uTypes.pas	Sat Mar 19 14:38:49 2011 +0100
+++ b/hedgewars/uTypes.pas	Sat Mar 19 16:19:50 2011 +0100
@@ -384,7 +384,7 @@
     TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable,
             gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery,
             gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, gidRandomMineTimer,
-            gidDamageModifier, gidResetHealth, gidAISurvival, gidInfAttack, gidResetWeps, gidPerHogAmmo);
+            gidDamageModifier, gidResetHealth, gidAISurvival, gidInfAttack, gidResetWeps, gidPerHogAmmo, gidTagTeam);
 
     TLandArray = packed array of array of LongWord;
     TCollisionArray = packed array of array of Word;
--- a/hedgewars/uWorld.pas	Sat Mar 19 14:38:49 2011 +0100
+++ b/hedgewars/uWorld.pas	Sat Mar 19 16:19:50 2011 +0100
@@ -127,6 +127,7 @@
 
 // check different game flags (goals/game modes first for now)
 g:= AddGoal(g, gfKing, gidKing); // king?
+g:= AddGoal(g, gfTagTeam, gidTagTeam); // tag team mode?
 
 // other important flags
 g:= AddGoal(g, gfForts, gidForts); // forts?
--- a/share/hedgewars/Data/Locale/en.txt	Sat Mar 19 14:38:49 2011 +0100
+++ b/share/hedgewars/Data/Locale/en.txt	Sat Mar 19 16:19:50 2011 +0100
@@ -516,3 +516,4 @@
 05:18=Unlimited Attacks
 05:19=Weapons are reset on end of turn
 05:20=Weapons are not shared between hogs
+05:21=Tag Team: Teams in a clan takes successive turns|Shared Time: Teams within a clan share turn time