From: adrianna Date: Fri, 9 Sep 2016 17:53:10 +0000 (+0200) Subject: added soil background for day and night; recoloured seed X-Git-Tag: tabakrolletjie-v1.0.0~163^2 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=5cfb0b7b438b7cfe15c1e481883b3a95bf9c7c44;p=tabakrolletjie.git added soil background for day and night; recoloured seed --- diff --git a/data/images/32/seed.png b/data/images/32/seed.png index 2f11b22..e559556 100644 Binary files a/data/images/32/seed.png and b/data/images/32/seed.png differ diff --git a/data/images/Makefile b/data/images/Makefile index 1e5f862..b1a7f01 100644 --- a/data/images/Makefile +++ b/data/images/Makefile @@ -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 $< $@ diff --git a/data/images/cursors/seed.png b/data/images/cursors/seed.png index 2f11b22..e559556 100644 Binary files a/data/images/cursors/seed.png and b/data/images/cursors/seed.png differ diff --git a/sources/vector/seed.svg b/sources/vector/seed.svg index 76bc205..1f484b6 100644 --- a/sources/vector/seed.svg +++ b/sources/vector/seed.svg @@ -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" /> image/svg+xml - + @@ -53,21 +53,17 @@ inkscape:groupmode="layer" id="layer1" transform="translate(0,-698.0315)"> - - - - + + diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index c2dee94..c280702 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -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) diff --git a/tabakrolletjie/scenes/night.py b/tabakrolletjie/scenes/night.py index c532c77..fe1fae3 100644 --- a/tabakrolletjie/scenes/night.py +++ b/tabakrolletjie/scenes/night.py @@ -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)