merge hedgeroid
authorXeli
Thu, 11 Aug 2011 15:03:21 +0200
branchhedgeroid
changeset 5548 73f2fec65257
parent 5546 d36dac11a9b2 (current diff)
parent 5543 5e597b725316 (diff)
child 5550 50650032c251
merge
hedgewars/uScript.pas
--- a/QTfrontend/hwconsts.h	Thu Aug 11 15:01:05 2011 +0200
+++ b/QTfrontend/hwconsts.h	Thu Aug 11 15:03:21 2011 +0200
@@ -58,41 +58,40 @@
 extern bool isDevBuild;
 #endif
 
-#define AMMOLINE_DEFAULT_QT     "939192942219912103223511100120100000021111010101111991"
-#define AMMOLINE_DEFAULT_PROB   "040504054160065554655446477657666666615551010111541111"
+#define AMMOLINE_DEFAULT_QT     "939192942219912103223511100120100000021111010101111101"
+#define AMMOLINE_DEFAULT_PROB   "040504054160065554655446477657666666615551010111541101"
 #define AMMOLINE_DEFAULT_DELAY  "000000000000020550000004000700400000000022000000060000"
-#define AMMOLINE_DEFAULT_CRATE  "131111031211111112311411111111111111121111110111111111"
+#define AMMOLINE_DEFAULT_CRATE  "131111031211111112311411111111111111121111110111111101"
 
-//TODO: Remove Piano's unlimited uses!
-#define AMMOLINE_CRAZY_QT       "999999999999999999299999999999999929999999990999999229"
-#define AMMOLINE_CRAZY_PROB     "111111011111111111111111111111111111111111110111111111"
+#define AMMOLINE_CRAZY_QT       "999999999999999999299999999999999929999999990999999209"
+#define AMMOLINE_CRAZY_PROB     "111111011111111111111111111111111111111111110111111101"
 #define AMMOLINE_CRAZY_DELAY    "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_CRAZY_CRATE    "131111031211111112311411111111111111121111010111111111"
+#define AMMOLINE_CRAZY_CRATE    "131111031211111112311411111111111111121111010111111101"
 
 #define AMMOLINE_PROMODE_QT     "909000900000000000000900000000000000000000000000000000"
 #define AMMOLINE_PROMODE_PROB   "000000000000000000000000000000000000000000000000000000"
 #define AMMOLINE_PROMODE_DELAY  "000000000000020550000004000700400000000020000000000000"
-#define AMMOLINE_PROMODE_CRATE  "111111111111111111111111111111111111111110010111111111"
+#define AMMOLINE_PROMODE_CRATE  "111111111111111111111111111111111111111110010111111101"
 
 #define AMMOLINE_SHOPPA_QT      "000000990000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPA_PROB    "444441004424440221011212122242200000000200040001001111"
+#define AMMOLINE_SHOPPA_PROB    "444441004424440221011212122242200000000200040001001101"
 #define AMMOLINE_SHOPPA_DELAY   "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPA_CRATE   "111111111111111111111111111111111111111110110111111111"
+#define AMMOLINE_SHOPPA_CRATE   "111111111111111111111111111111111111111110110111111101"
 
 #define AMMOLINE_CLEAN_QT       "101000900001000001100000000000000000000000000000100000"
-#define AMMOLINE_CLEAN_PROB     "040504054160065554655446477657666666615551010111541111"
+#define AMMOLINE_CLEAN_PROB     "040504054160065554655446477657666666615551010111541101"
 #define AMMOLINE_CLEAN_DELAY    "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_CLEAN_CRATE    "131111031211111112311411111111111111121111110111111111"
+#define AMMOLINE_CLEAN_CRATE    "131111031211111112311411111111111111121111110111111101"
 
 #define AMMOLINE_MINES_QT       "000000990009000000030000000000000000000000000000000000"
 #define AMMOLINE_MINES_PROB     "000000000000000000000000000000000000000000000000000000"
 #define AMMOLINE_MINES_DELAY    "000000000000020550000004000700400000000020000000060000"
-#define AMMOLINE_MINES_CRATE    "111111111111111111111111111111111111111111110111111111"
+#define AMMOLINE_MINES_CRATE    "111111111111111111111111111111111111111111110111111101"
 
 #define AMMOLINE_PORTALS_QT     "900000900200000000210000000000000011000009000000000000"
-#define AMMOLINE_PORTALS_PROB   "040504054160065554655446477657666666615551010111541111"
+#define AMMOLINE_PORTALS_PROB   "040504054160065554655446477657666666615551010111541101"
 #define AMMOLINE_PORTALS_DELAY  "000000000000020550000004000700400000000020000000060000"
-#define AMMOLINE_PORTALS_CRATE  "131111031211111112311411111111111111121111110111111111"
+#define AMMOLINE_PORTALS_CRATE  "131111031211111112311411111111111111121111110111111101"
 
 
 #define NETGAME_DEFAULT_PORT 46631
--- a/QTfrontend/pagesingleplayer.cpp	Thu Aug 11 15:01:05 2011 +0200
+++ b/QTfrontend/pagesingleplayer.cpp	Thu Aug 11 15:03:21 2011 +0200
@@ -46,7 +46,7 @@
 
     BtnCampaignPage = addButton(":/res/Campaign.png", middleLine, 0, true);
     BtnCampaignPage->setToolTip(tr("Campaign Mode (...). IN DEVELOPMENT"));
-    //BtnCampaignPage->setVisible(false);
+    BtnCampaignPage->setVisible(false);
 
     BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true);
     BtnTrainPage->setToolTip(tr("Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT"));
--- a/QTfrontend/selectWeapon.cpp	Thu Aug 11 15:01:05 2011 +0200
+++ b/QTfrontend/selectWeapon.cpp	Thu Aug 11 15:03:21 2011 +0200
@@ -129,6 +129,7 @@
     int i = 0, k = 0;
     for(; i < m_numItems; ++i) {
         if (i == 6) continue;
+        if (i == 52) continue; // Disable structures for now
         if (k % 4 == 0) ++j;
         SelWeaponItem * swi = new SelWeaponItem(true, i, currentState[i].digitValue(), QImage(":/res/ammopic.png"), QImage(":/res/ammopicgrey.png"), this);
         weaponItems[i].append(swi);
--- a/hedgewars/GSHandlers.inc	Thu Aug 11 15:01:05 2011 +0200
+++ b/hedgewars/GSHandlers.inc	Thu Aug 11 15:03:21 2011 +0200
@@ -1366,7 +1366,7 @@
     DeleteGear(Gear)
 end;
 
-(*procedure WaitCollision;
+procedure WaitCollision;
 begin
     with HHGear^ do
     begin
@@ -1376,7 +1376,7 @@
     RopePoints.Count := 0;
     Gear^.Elasticity := _0;
     Gear^.doStep := @doStepRopeAfterAttack
-end;*)
+end;
 
 begin
     HHGear := Gear^.Hedgehog^.Gear;
@@ -1582,9 +1582,9 @@
             with Gear^.Hedgehog^ do
                 begin
                 PlaySound(sndRopeRelease);
-                //if CurAmmoType <> amParachute then
-                //    WaitCollision
-                //else
+                if CurAmmoType <> amParachute then
+                    WaitCollision
+                else
                     DeleteMe
                 end
         end
@@ -2952,11 +2952,14 @@
         begin
         for i:= 0 to High(hogs) do
             begin
-            //d:= Distance(Gear^.X - hogs[i]^.X, Gear^.Y - hogs[i]^.Y);
-            hogs[i]^.dX:= _0_25 * (Gear^.X - hogs[i]^.X) / _250;
-            //if Gear^.X < hogs[i]^.X then hogs[i]^.dX.isNegative:= true;
-            hogs[i]^.dY:= -_0_25;
-            hogs[i]^.Active:= true;
+            if hogs[i] <> CurrentHedgehog^.Gear then
+                begin
+                //d:= Distance(Gear^.X - hogs[i]^.X, Gear^.Y - hogs[i]^.Y);
+                hogs[i]^.dX:= _0_25 * (Gear^.X - hogs[i]^.X) / _250;
+                //if Gear^.X < hogs[i]^.X then hogs[i]^.dX.isNegative:= true;
+                hogs[i]^.dY:= -_0_25;
+                hogs[i]^.Active:= true;
+                end
             end;
         end ;
         AfterAttack;
--- a/hedgewars/uScript.pas	Thu Aug 11 15:01:05 2011 +0200
+++ b/hedgewars/uScript.pas	Thu Aug 11 15:03:21 2011 +0200
@@ -861,11 +861,13 @@
                vgear^.Hedgehog:= gear^.Hedgehog;
                vgear^.FrameTicks:= lua_tointeger(L, 3);
                if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1;
-               end;
+               lua_pushinteger(L, vgear^.Uid)
+               end
             end
+            else lua_pushnil(L)
         end
     else LuaError('Lua: Wrong number of parameters passed to HogSay!');
-    lc_hogsay:= 0
+    lc_hogsay:= 1
 end;
 
 function lc_switchhog(L : Plua_State) : LongInt; Cdecl;
--- a/hedgewars/uVariables.pas	Thu Aug 11 15:01:05 2011 +0200
+++ b/hedgewars/uVariables.pas	Thu Aug 11 15:03:21 2011 +0200
@@ -727,7 +727,7 @@
             (FileName:                   '8C.ogg'; Path: ptSounds),// sndPiano7
             (FileName:                   '9D.ogg'; Path: ptSounds),// sndPiano8
             (FileName:                 'skip.ogg'; Path: ptSounds),// sndSkip
-            (FileName:          'shotgunfire.ogg'; Path: ptSounds),// sndSineGun
+            (FileName:              'sinegun.ogg'; Path: ptSounds),// sndSineGun
             (FileName:                'Ooff1.ogg'; Path: ptVoices),// sndOoff1
             (FileName:                'Ooff2.ogg'; Path: ptVoices),// sndOoff2
             (FileName:                'Ooff3.ogg'; Path: ptVoices),// sndOoff3
@@ -2409,7 +2409,7 @@
     SDWaterColorArray[1]:= SDWaterColorArray[0];
     SDWaterColorArray[3]:= SDWaterColorArray[2];
 
-    SDMusic:= 'main_theme.ogg';
+    SDMusic:= 'hell.ogg';
     SDTint:= $80;
 
     cDrownSpeed.QWordValue  := 257698038;       // 0.06
--- a/misc/theme_editor.html	Thu Aug 11 15:01:05 2011 +0200
+++ b/misc/theme_editor.html	Thu Aug 11 15:03:21 2011 +0200
@@ -125,7 +125,7 @@
     </head>
     <body onload="load();">
         <h1>Hedgewars Theme editor</h1>
-        <canvas id="preview" width="512" height="384"></canvas><br>
+        <canvas id="preview" width="512" height="384">Sorry, your browser does not support Canvas.</canvas><br>
         <table>
         <tr><td>Sky:</td><td>
         <input id="sky" type="file" accept="image/png" onchange="sky.src = window.URL.createObjectURL(this.files[0])"></input>
Binary file share/hedgewars/Data/Music/Golf.ogg has changed
Binary file share/hedgewars/Data/Sounds/hammer.ogg has changed
Binary file share/hedgewars/Data/Sounds/hell_growl.ogg has changed
Binary file share/hedgewars/Data/Sounds/hell_ooff.ogg has changed
Binary file share/hedgewars/Data/Sounds/hell_ow.ogg has changed
Binary file share/hedgewars/Data/Sounds/hell_ugh.ogg has changed
Binary file share/hedgewars/Data/Sounds/mineimpact.ogg has changed
Binary file share/hedgewars/Data/Sounds/sinegun.ogg has changed
--- a/share/hedgewars/Data/Themes/CMakeLists.txt	Thu Aug 11 15:01:05 2011 +0200
+++ b/share/hedgewars/Data/Themes/CMakeLists.txt	Thu Aug 11 15:03:21 2011 +0200
@@ -16,6 +16,7 @@
 	EarthRise
 	Eyes
 	Freeway
+	Golf
 	Halloween
 	Hell
 	Island
Binary file share/hedgewars/Data/Themes/Golf/Bag.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Ball.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Balldirt.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Border.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Golf/CMakeLists.txt	Thu Aug 11 15:03:21 2011 +0200
@@ -0,0 +1,6 @@
+file(GLOB images *.png)
+
+install(FILES
+    theme.cfg
+    ${images}
+    DESTINATION ${SHAREPATH}Data/Themes/Golf)
Binary file share/hedgewars/Data/Themes/Golf/Car.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Flag1.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Flag2.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Flag3.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Flag4.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Hole.png has changed
Binary file share/hedgewars/Data/Themes/Golf/LandTex.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Sky.png has changed
Binary file share/hedgewars/Data/Themes/Golf/SkyL.png has changed
Binary file share/hedgewars/Data/Themes/Golf/SkyR.png has changed
Binary file share/hedgewars/Data/Themes/Golf/Tee.png has changed
Binary file share/hedgewars/Data/Themes/Golf/horizont.png has changed
--- a/share/hedgewars/Data/Themes/Golf/theme.cfg	Thu Aug 11 15:01:05 2011 +0200
+++ b/share/hedgewars/Data/Themes/Golf/theme.cfg	Thu Aug 11 15:03:21 2011 +0200
@@ -1,15 +1,22 @@
-sky = 117, 141, 186
+sky = 34, 67, 135
 border = 38, 114, 35
 water-top = $54, $5C, $9D
 water-bottom = $34, $3C, $7D
 water-opacity = $80
-music = nature.ogg
+music = Golf.ogg
 clouds = 9
-object = Ball, 3, 0, 18, 24, 6, 1, 0, 0, 24, 13
-object = Tee, 1, 6, 22, 5, 4, 1, 0, 0, 16, 20
-object = Car, 1, 65, 258, 80, 2, 1, 0, 0, 240, 215
-object = Hole, 5, 0, 44, 100, 4, 1, 19, 0, 54, 41
-object = Flag1, 1, 65, 258, 80, 2, 1, 0, 0, 240, 215
-object = Flag2, 1, 65, 258, 80, 2, 1, 0, 0, 240, 215
-object = Club, 2, 162, 254, 21, 6, 1, 0, 0, 240, 245
-flakes = 100, 1, 1000, 50, 50
+object = Hole, 2, 0, 31, 123, 1, 1, 31, 0, 40, 27
+object = Car, 1, 78, 320, 80, 30, 1, 0, 0, 330, 220
+object = Club, 2, 180, 175, 5, 1, 2, 189, 155, 15, 20, 0, 0, 100, 100
+object = Flag1, 1, 0, 305, 15, 5, 1, 20, 0, 103, 260
+object = Flag2, 1, 40, 305, 10, 4, 1, 0, 0, 53, 270
+object = Flag3, 1, 0, 280, 12, 7, 1, 30, 0, 112, 260
+object = Flag4, 1, 275, 145, 8, 12, 1, 0, 0, 250, 158
+object = Tee, 2, 6, 20, 2, 2, 1, 0, 0, 12, 15
+object = Ball, 4, 8, 15, 2, 1, 1, 0, 0, 16, 8
+object = Ball, 3, 0, 0, 6, 16, 1, 10, 0, 6, 16
+object = Ball, 3, 10, 0, 6, 16, 1, 0, 0, 6, 16
+object = Bag, 1, 65, 0, 129, 44, 1, 0, 71, 234, 81
+spray = Balldirt, 5
+flakes = 55, 40, 99999999, 30, 200
+