changeset 253:2a969e3445ae

fire bad
author Adrianna Pińska <adrianna.pinska@gmail.com>
date Thu, 15 Sep 2011 01:25:44 +0200
parents 8198492745b1
children 9ec297b50d3b
files data/tiles/lab/fire-0.png data/tiles/lab/fire-1.png data/tiles/lab/fire-2a.png data/tiles/lab/fire.png mamba/level.py mamba/sprites.py source/svg/tiles/lab/fire-0.svg source/svg/tiles/lab/fire-1.svg source/svg/tiles/lab/fire-2a.svg source/svg/tiles/lab/fire.svg
diffstat 10 files changed, 358 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
Binary file data/tiles/lab/fire-0.png has changed
Binary file data/tiles/lab/fire-1.png has changed
Binary file data/tiles/lab/fire-2a.png has changed
Binary file data/tiles/lab/fire.png has changed
--- a/mamba/level.py	Thu Sep 15 01:21:49 2011 +0200
+++ b/mamba/level.py	Thu Sep 15 01:25:44 2011 +0200
@@ -30,6 +30,7 @@
     'e': mktile(sprites.EntrySprite),
     'E': mktile(sprites.ExitSprite),
     '~': mktile(sprites.PuddleSprite),
+    '$': mktile(sprites.FireSprite),
     'r': mktile(sprites.Painter, colour='red', name='paint'),
     'b': mktile(sprites.Painter, colour='blue', name='paint'),
     'y': mktile(sprites.Painter, colour='yellow', name='paint'),
--- a/mamba/sprites.py	Thu Sep 15 01:21:49 2011 +0200
+++ b/mamba/sprites.py	Thu Sep 15 01:25:44 2011 +0200
@@ -259,6 +259,16 @@
         super(PuddleSprite, self).interact(world, segment)
 
 
+class FireSprite(SingleImageTileSprite):
+    image_name = 'fire'
+    name = 'fire'
+    variants_class = SolidSpriteImageVariants
+
+    def __init__(self, variant=(0, 0, 0, 0), **kw):
+        super(FireSprite, self).__init__(**kw)
+        self.image = self.load_image(*self.get_variant(*variant))
+
+
 class EdibleTile(SingleImageTileSprite):
     def interact(self, world, segment):
         if not segment.is_head:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/svg/tiles/lab/fire-0.svg	Thu Sep 15 01:25:44 2011 +0200
@@ -0,0 +1,86 @@
+<?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://creativecommons.org/ns#"
+   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="200"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="fire.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3765">
+      <stop
+         style="stop-color:#0000ff;stop-opacity:1;"
+         offset="0"
+         id="stop3781" />
+      <stop
+         id="stop3783"
+         offset="0.5"
+         style="stop-color:#0000ff;stop-opacity:0;" />
+      <stop
+         id="stop3769"
+         offset="1"
+         style="stop-color:#0000ff;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.915"
+     inkscape:cx="99.520459"
+     inkscape:cy="99.432403"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1172"
+     inkscape:window-height="752"
+     inkscape:window-x="108"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-852.36218)">
+    <path
+       sodipodi:nodetypes="scccccs"
+       inkscape:connector-curvature="0"
+       id="path3862"
+       d="m 64.144395,1042.977 c 82.679275,33.6585 152.635035,-52.85858 128.644935,-130.36027 -44.30439,3.2133 -36.94747,36.65736 -53.17323,33.96225 20.83749,-49.80629 -32.77254,-66.50669 -46.998289,-92.2813 -23.072295,25.30074 -38.1349,36.6836 -38.078901,69.63979 C 33.729078,927.3617 49.868675,902.34831 7.5406229,901.63902 -3.5515147,970.6794 1.9103453,1017.6416 64.144395,1042.977 z"
+       style="fill:#ff7d00;fill-opacity:0.78431373;stroke:none" />
+    <path
+       style="fill:#ff0000;fill-opacity:0.78431373;stroke:none"
+       d="m 109.79046,1031.6562 c -61.436259,4.806 -97.901181,-62.24996 -96.741001,-84.3911 35.924218,-14.3851 49.206608,26.86124 65.523157,24.35676 -27.012457,-36.08416 4.299124,-73.0247 18.524871,-98.79931 20.077793,26.38965 46.898423,47.40611 32.933103,85.42024 20.58129,2.96714 10.79168,-26.49893 56.94683,-19.55403 -7.32647,44.72892 -13.17011,87.95964 -77.18696,92.96744 z"
+       id="path3812"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="scccccs" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/svg/tiles/lab/fire-1.svg	Thu Sep 15 01:25:44 2011 +0200
@@ -0,0 +1,87 @@
+<?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://creativecommons.org/ns#"
+   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="200"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="fire-0.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3765">
+      <stop
+         style="stop-color:#0000ff;stop-opacity:1;"
+         offset="0"
+         id="stop3781" />
+      <stop
+         id="stop3783"
+         offset="0.5"
+         style="stop-color:#0000ff;stop-opacity:0;" />
+      <stop
+         id="stop3769"
+         offset="1"
+         style="stop-color:#0000ff;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.915"
+     inkscape:cx="100"
+     inkscape:cy="100"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1172"
+     inkscape:window-height="752"
+     inkscape:window-x="108"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-852.36218)">
+    <path
+       style="fill:#ff7d00;fill-opacity:0.78431373;stroke:none"
+       d="m 0,0 0,200 94,0 C 162.77935,205.45352 214.08931,130.49828 193.03125,62.46875 148.98307,64.315581 161.73197,84.682824 143.3125,93.6875 174.76429,44.663248 97.09375,30.07999 97.09375,0 z"
+       transform="translate(0,852.36218)"
+       id="rect3042"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="fill:#ff0000;fill-opacity:0.78431373;stroke:none"
+       d="m 109.79046,1031.6562 c -61.436259,4.806 -97.901181,-62.24996 -96.741001,-84.3911 35.924218,-14.3851 49.206608,26.86124 65.523157,24.35676 -27.012457,-36.08416 4.299124,-73.0247 18.524871,-98.79931 20.077793,26.38965 46.898423,47.40611 32.933103,85.42024 20.58129,2.96714 10.79168,-26.49893 56.94683,-19.55403 -7.32647,44.72892 -13.17011,87.95964 -77.18696,92.96744 z"
+       id="path3812"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="scccccs" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/svg/tiles/lab/fire-2a.svg	Thu Sep 15 01:25:44 2011 +0200
@@ -0,0 +1,87 @@
+<?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://creativecommons.org/ns#"
+   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="200"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="fire-1.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3765">
+      <stop
+         style="stop-color:#0000ff;stop-opacity:1;"
+         offset="0"
+         id="stop3781" />
+      <stop
+         id="stop3783"
+         offset="0.5"
+         style="stop-color:#0000ff;stop-opacity:0;" />
+      <stop
+         id="stop3769"
+         offset="1"
+         style="stop-color:#0000ff;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.915"
+     inkscape:cx="100"
+     inkscape:cy="100"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1172"
+     inkscape:window-height="752"
+     inkscape:window-x="108"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-852.36218)">
+    <path
+       style="fill:#ff7d00;fill-opacity:0.78431373;stroke:none"
+       d="M 200,0 C 157.58549,3.4830132 113.80354,16.497267 93.15625,4.625 93.064684,4.46527 92.963542,4.3166729 92.875,4.15625 69.802705,29.45699 54.725251,40.82506 54.78125,73.78125 33.971418,77.20548 50.109302,52.20929 7.78125,51.5 0.96006304,92.943305 1.6568125,148.53347 0,200 l 94,0 c 4.811789,0.38153 9.53411,0.37586 14.15625,0 L 200,200 z"
+       transform="translate(0,852.36218)"
+       id="rect3042"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccccc" />
+    <path
+       style="fill:#ff0000;fill-opacity:0.78431373;stroke:none"
+       d="m 109.79046,1031.6562 c -61.436259,4.806 -97.901181,-62.24996 -96.741001,-84.3911 35.924218,-14.3851 49.206608,26.86124 65.523157,24.35676 -27.012457,-36.08416 4.299124,-73.0247 18.524871,-98.79931 20.077793,26.38965 46.898423,47.40611 32.933103,85.42024 20.58129,2.96714 10.79168,-26.49893 56.94683,-19.55403 -7.32647,44.72892 -13.17011,87.95964 -77.18696,92.96744 z"
+       id="path3812"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="scccccs" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/svg/tiles/lab/fire.svg	Thu Sep 15 01:25:44 2011 +0200
@@ -0,0 +1,87 @@
+<?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://creativecommons.org/ns#"
+   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="200"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="fire.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3765">
+      <stop
+         style="stop-color:#0000ff;stop-opacity:1;"
+         offset="0"
+         id="stop3781" />
+      <stop
+         id="stop3783"
+         offset="0.5"
+         style="stop-color:#0000ff;stop-opacity:0;" />
+      <stop
+         id="stop3769"
+         offset="1"
+         style="stop-color:#0000ff;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.915"
+     inkscape:cx="99.520459"
+     inkscape:cy="99.432403"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1172"
+     inkscape:window-height="752"
+     inkscape:window-x="108"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-852.36218)">
+    <rect
+       style="fill:#ff7d00;fill-opacity:0.78431374;stroke:none"
+       id="rect3042"
+       width="200"
+       height="200"
+       x="0"
+       y="852.36218" />
+    <path
+       style="fill:#ff0000;fill-opacity:0.78431373;stroke:none"
+       d="m 109.79046,1031.6562 c -61.436259,4.806 -97.901181,-62.24996 -96.741001,-84.3911 35.924218,-14.3851 49.206608,26.86124 65.523157,24.35676 -27.012457,-36.08416 4.299124,-73.0247 18.524871,-98.79931 20.077793,26.38965 46.898423,47.40611 32.933103,85.42024 20.58129,2.96714 10.79168,-26.49893 56.94683,-19.55403 -7.32647,44.72892 -13.17011,87.95964 -77.18696,92.96744 z"
+       id="path3812"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="scccccs" />
+  </g>
+</svg>