added soil background for day and night; recoloured seed
authoradrianna <adrianna.pinska@gmail.com>
Fri, 9 Sep 2016 17:53:10 +0000 (19:53 +0200)
committeradrianna <adrianna.pinska@gmail.com>
Fri, 9 Sep 2016 17:53:10 +0000 (19:53 +0200)
data/images/32/seed.png
data/images/Makefile
data/images/cursors/seed.png
sources/vector/seed.svg
tabakrolletjie/scenes/day.py
tabakrolletjie/scenes/night.py

index 2f11b2299fc535a1aa61b07cfe12e364e703683c..e559556faf5dfd095faf05e20fe62afa10418b46 100644 (file)
Binary files a/data/images/32/seed.png and b/data/images/32/seed.png differ
index 1e5f8623bfd09c686abb387079f5866d6dcfeb85..b1a7f01fc4ffa7ffddaf81e3b4c728afaff003d4 100644 (file)
@@ -9,11 +9,14 @@ IMG16=$(MOULD_BODY)
 IMG32=$(TURNIP) $(MOULD_BODY) $(MOULD)
 IMG64=$(MOULD_BODY) $(LIGHT)
 
+CURSORS=seed
+
 PNG16=$(patsubst %, 16/%.png, $(IMG16))
 PNG32=$(patsubst %, 32/%.png, $(IMG32))
 PNG64=$(patsubst %, 64/%.png, $(IMG64))
+PNG_CURSORS=$(patsubst %, cursors/%.png, $(CURSORS))
 
-all: $(PNG16) $(PNG32) $(PNG64)
+all: $(PNG16) $(PNG32) $(PNG64) $(PNG_CURSORS)
 
 16/%.png: %.svg
        @mkdir -p `dirname $@`
@@ -27,3 +30,5 @@ all: $(PNG16) $(PNG32) $(PNG64)
        @mkdir -p `dirname $@`
        @inkscape -z -e $@ -w 64 -h 64 $<
 
+cursors/%.png: 32/%.png
+       @cp $< $@
index 2f11b2299fc535a1aa61b07cfe12e364e703683c..e559556faf5dfd095faf05e20fe62afa10418b46 100644 (file)
Binary files a/data/images/cursors/seed.png and b/data/images/cursors/seed.png differ
index 76bc205b1f0dc3d0d46fb61fa1897189751006dc..1f484b6d5663b47eb94219e76783770a5f907f3a 100644 (file)
@@ -31,9 +31,9 @@
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showgrid="false"
-     inkscape:window-width="1264"
+     inkscape:window-width="1366"
      inkscape:window-height="720"
-     inkscape:window-x="102"
+     inkscape:window-x="1920"
      inkscape:window-y="0"
      inkscape:window-maximized="1" />
   <metadata
@@ -44,7 +44,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
   </metadata>
      inkscape:groupmode="layer"
      id="layer1"
      transform="translate(0,-698.0315)">
-    <g
-       id="g4144"
-       transform="translate(0.02251533,17.209779)">
-      <path
-         sodipodi:nodetypes="sssss"
-         inkscape:connector-curvature="0"
-         id="path4136"
-         d="m 302.14284,870.2193 c 0,53.25603 -56.71062,106.55148 -125,96.42857 C 99.47207,955.1343 52.142841,923.47533 52.142838,870.2193 c -3e-6,-53.25603 75.250122,-122.14286 144.285712,-122.14286 69.0356,0 105.71429,68.88683 105.71429,122.14286 z"
-         style="opacity:0.98000004;fill:#552200;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
-      <path
-         sodipodi:nodetypes="sssss"
-         inkscape:connector-curvature="0"
-         id="path4141"
-         d="m 277.85714,822.00509 c 2.34061,26.45347 -15.00264,35.353 -40.35715,33.21428 -19.02523,-1.60483 -45.25008,-19.65903 -60.35714,-39.64285 -16.6767,-22.06016 -0.60652,-48.69986 46.07143,-41.78571 37.337,5.53053 52.61984,25.35028 54.64286,48.21428 z"
-         style="opacity:0.98000004;fill:#a05a2c;fill-opacity:1;stroke:none;stroke-width:5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
-    </g>
+    <path
+       style="opacity:0.98000004;fill:#800080;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 302.16536,887.42908 c 0,53.25603 -56.71062,106.55148 -125,96.42857 C 99.494585,972.34408 52.165356,940.68511 52.165353,887.42908 c -3e-6,-53.25603 75.250127,-122.14286 144.285717,-122.14286 69.0356,0 105.71429,68.88683 105.71429,122.14286 z"
+       id="path4136"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="sssss" />
+    <path
+       style="opacity:0.98000004;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 277.87966,839.21487 c 2.34061,26.45347 -15.00264,35.353 -40.35715,33.21428 -19.02523,-1.60483 -45.25008,-19.65903 -60.35714,-39.64285 -16.6767,-22.06016 -0.60652,-48.69986 46.07143,-41.78571 37.337,5.53053 52.61984,25.35028 54.64286,48.21428 z"
+       id="path4141"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="sssss" />
   </g>
 </svg>
index c2dee9488f6379188abb3e045edccaad36de5c9a..c28070203c20d6dd7b872af17807988844e1d716 100644 (file)
@@ -1,6 +1,7 @@
 """ Be prepared. """
 
 import pygame.locals as pgl
+import pygame.surface
 
 import pymunk
 import pymunk.pygame_util
@@ -55,7 +56,12 @@ class DayScene(BaseScene):
 
     @debug_timer("day.render")
     def render(self, surface, gamestate):
-        surface.fill((0, 0, 155))
+        surface.blit(loader.load_image("textures", "soil.png"), (0, 0))
+        brightness = pygame.surface.Surface(surface.get_size())
+        brightness = brightness.convert_alpha()
+        brightness.fill((255, 255, 255, 50))
+        surface.blit(brightness, (0, 0))
+        
         for turnip in self._turnips:
             turnip.render(surface)
         self._lights.render_light(surface)
index c532c77159c623f9cedb0a8000f69ef72da1cd16..fe1fae3860d1d87bcb2b8a77d2ff895afff904ed 100644 (file)
@@ -1,6 +1,7 @@
 """ In the night, the mould attacks. """
 
 import pygame.locals as pgl
+import pygame.surface
 
 import pymunk
 
@@ -10,6 +11,7 @@ from ..obstacles import ObstacleManager
 from ..enemies import Boyd
 from ..events import SceneChangeEvent
 from ..utils import debug_timer
+from ..loader import loader
 from ..turnip import Turnip
 
 
@@ -26,8 +28,14 @@ class NightScene(BaseScene):
 
     @debug_timer("night.render")
     def render(self, surface, gamestate):
-        surface.fill((0, 0, 155))
+        surface.blit(loader.load_image("textures", "soil.png"), (0, 0))
+        darkness = pygame.surface.Surface(surface.get_size())
+        darkness = darkness.convert_alpha()
+        darkness.fill((0, 0, 0, 150))
+        surface.blit(darkness, (0, 0))
+        
         self._mould.render(surface)
+
         for turnip in self._turnips[:]:
             if turnip.eaten:
                 self._turnips.remove(turnip)