New animated switching sign
authorunc0rr
Fri, 18 Jan 2008 16:40:26 +0000
changeset 708 6ee55ba9c8fe
parent 707 0a00c16022ca
child 709 893843edb621
New animated switching sign
hedgewars/uConsts.pas
hedgewars/uGears.pas
misc/switch.svg
share/hedgewars/Data/Graphics/Switch.png
--- a/hedgewars/uConsts.pas	Thu Jan 17 11:23:37 2008 +0000
+++ b/hedgewars/uConsts.pas	Fri Jan 18 16:40:26 2008 +0000
@@ -310,25 +310,25 @@
                      (FileName:     'hhMask'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
                       Width:  32; Height: 32; hasAlpha: false),// sprHHTelepMask
                      (FileName:     'Switch'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:  32; Height: 32; hasAlpha: false),// sprSwitch
+                      Width:  32; Height: 32; hasAlpha:  true),// sprSwitch
                      (FileName:  'Parachute'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:  48; Height: 48; hasAlpha: true),// sprParachute
+                      Width:  48; Height: 48; hasAlpha:  true),// sprParachute
                      (FileName:     'Target'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:  32; Height: 32; hasAlpha:false),// sprTarget
+                      Width:  32; Height: 32; hasAlpha: false),// sprTarget
                      (FileName:   'RopeNode'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:   6; Height:  6; hasAlpha:false),// sprRopeNode
+                      Width:   6; Height:  6; hasAlpha: false),// sprRopeNode
                      (FileName:    'Console'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width: 256; Height:256; hasAlpha:false),// sprConsoleBG
+                      Width: 256; Height:256; hasAlpha: false),// sprConsoleBG
                      (FileName:   'thinking'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:  32; Height: 32; hasAlpha:false),// sprQuestion
+                      Width:  32; Height: 32; hasAlpha: false),// sprQuestion
                      (FileName:   'PowerBar'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width: 256; Height: 32; hasAlpha:false),// sprPowerBar
+                      Width: 256; Height: 32; hasAlpha: false),// sprPowerBar
                      (FileName:    'WindBar'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width: 151; Height: 17; hasAlpha:false),// sprWindBar
+                      Width: 151; Height: 17; hasAlpha: false),// sprWindBar
                      (FileName:      'WindL'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:  80; Height: 13; hasAlpha:false),// sprWindL
+                      Width:  80; Height: 13; hasAlpha: false),// sprWindL
                      (FileName:      'WindR'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                      Width:  80; Height: 13; hasAlpha:false) // sprWindR
+                      Width:  80; Height: 13; hasAlpha: false) // sprWindR
                      );
 
       Soundz: array[TSound] of record
--- a/hedgewars/uGears.pas	Thu Jan 17 11:23:37 2008 +0000
+++ b/hedgewars/uGears.pas	Fri Jan 18 16:40:26 2008 +0000
@@ -620,7 +620,7 @@
        gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 0, Surface)
                                      else DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 1, Surface);
          gtAirBomb: DrawSprite(sprAirBomb , hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, DxDy2Angle32(Gear^.dY, Gear^.dX), Surface);
-        gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, 0, Surface);
+        gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, (GameTicks shr 6) mod 12, Surface);
           gtTarget: DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0, Surface);
               end;
       Gear:= Gear^.NextGear
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/switch.svg	Fri Jan 18 16:40:26 2008 +0000
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32px"
+   height="32px"
+   id="svg2160"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="/home/unC0Rr/Sources/Hedgewars/Hedgewars-GNA/misc"
+   sodipodi:docname="switch.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/unC0Rr/Sources/Hedgewars/Hedgewars-GNA/misc/switch165.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs2162" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="23.826304"
+     inkscape:cy="15.578141"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1280"
+     inkscape:window-height="954"
+     inkscape:window-x="0"
+     inkscape:window-y="46" />
+  <metadata
+     id="metadata2165">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g2228"
+       transform="matrix(-0.9999999,8.5712909e-8,-8.5712909e-8,-0.9999999,32.000001,31.999995)">
+      <path
+         id="path2168"
+         d="M 16,4 C 9.3770913,4 4.0000001,9.3770911 4,16 C 4,22.622909 9.3770922,28.000001 16,28 C 22.622909,28 28,22.622909 28,16 C 28,9.3770913 22.62291,4 16,4 z M 16,8.1550388 C 20.331511,8.1550387 23.844961,11.66849 23.844961,16 C 23.844961,20.33151 20.331511,23.844961 16,23.844961 C 11.66849,23.844962 8.1550388,20.33151 8.1550388,16 C 8.1550385,11.66849 11.668489,8.1550388 16,8.1550388 z "
+         style="fill:#ff7f00;fill-opacity:1;stroke:none" />
+      <path
+         transform="matrix(1.5583282,0,0,1.499502,-23.015644,-5.5396473)"
+         d="M 22.470006,17.032086 L 18.619726,17.032086 L 14.769446,17.032086 L 16.694586,13.697646 L 18.619726,10.363205 L 20.544866,13.697646 L 22.470006,17.032086 z "
+         inkscape:randomized="0"
+         inkscape:rounded="0"
+         inkscape:flatsided="false"
+         sodipodi:arg2="1.5707963"
+         sodipodi:arg1="0.52359878"
+         sodipodi:r2="2.2229602"
+         sodipodi:r1="4.4459205"
+         sodipodi:cy="14.809126"
+         sodipodi:cx="18.619726"
+         sodipodi:sides="3"
+         id="path2194"
+         style="fill:#ff7f00;fill-opacity:1;stroke:none"
+         sodipodi:type="star" />
+      <path
+         sodipodi:type="star"
+         style="fill:#ff7f00;fill-opacity:1;stroke:none"
+         id="path2196"
+         sodipodi:sides="3"
+         sodipodi:cx="18.619726"
+         sodipodi:cy="14.809126"
+         sodipodi:r1="4.4459205"
+         sodipodi:r2="2.2229602"
+         sodipodi:arg1="0.52359878"
+         sodipodi:arg2="1.5707963"
+         inkscape:flatsided="false"
+         inkscape:rounded="0"
+         inkscape:randomized="0"
+         d="M 22.470006,17.032086 L 18.619726,17.032086 L 14.769446,17.032086 L 16.694586,13.697646 L 18.619726,10.363205 L 20.544866,13.697646 L 22.470006,17.032086 z "
+         transform="matrix(1.5583282,0,0,-1.499502,-3.0156444,37.539647)" />
+    </g>
+  </g>
+</svg>
Binary file share/hedgewars/Data/Graphics/Switch.png has changed