summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--assets/images/README4
-rw-r--r--scenes/death.scm2
-rw-r--r--scenes/intro.scm24
4 files changed, 30 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 5c8f7cb..fb4eddf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,6 +70,7 @@ ASSETS = \
assets/images/lorenzo.png \
assets/images/Food Pack.png \
assets/images/reaper.png \
+ assets/images/intro-bg.png \
assets/images/README \
assets/maps/inner.tsx \
assets/maps/cave.tsx \
diff --git a/assets/images/README b/assets/images/README
index e745940..5847096 100644
--- a/assets/images/README
+++ b/assets/images/README
@@ -1,3 +1,7 @@
+* intro-bg.png
+
+Based on "Sky background" by Paulina Riva; licensed under CC-BY 3.0
+
* lorenzo.png + src/lorenzo.xcf
Author: Ricardo Wurmus
License: CC-BY-SA 3.0
diff --git a/scenes/death.scm b/scenes/death.scm
index 34a8af8..a2b6921 100644
--- a/scenes/death.scm
+++ b/scenes/death.scm
@@ -93,6 +93,8 @@ quite short."))
'(("The Inevitable Game"
"Made by Ricardo Wurmus"
"For Lorenzo")
+ ("Sky background"
+ "by Paulina Riva (CC-BY 3.0)")
("Reaper character graphics"
"based on \"Lil Reaper Pet\" by Tracy")
("Lorenzo character graphics"
diff --git a/scenes/intro.scm b/scenes/intro.scm
index cc6c5a0..4fb4b69 100644
--- a/scenes/intro.scm
+++ b/scenes/intro.scm
@@ -19,7 +19,10 @@
#:use-module (chickadee audio)
#:use-module (chickadee math rect)
#:use-module (chickadee math vector)
+ #:use-module (chickadee render color)
#:use-module (chickadee render font)
+ #:use-module (chickadee render texture)
+ #:use-module (chickadee scripting)
#:use-module (engine assets)
#:use-module (engine node)
#:use-module (engine node-2d)
@@ -93,4 +96,23 @@ to dry."))
(define (intro)
(set-music-volume! 1.0)
(play-music (load-music "assets/music/intro.ogg") #:loop? #f)
- (make <intro>))
+ (let ((container (make <node-2d>
+ #:children
+ (list
+ (make <sprite>
+ #:name 'bg
+ #:texture (load-image "assets/images/intro-bg.png"))
+ (make <intro>)
+ (make <filled-rect>
+ #:name 'fade-all
+ #:region (make-rect 0.0 0.0 %width %height)
+ #:color (make-color 1 1 1 1.0))))))
+ ;; Fade in
+ (with-agenda
+ (agenda container)
+ (script
+ (tween 240 1.0 0.0
+ (lambda (alpha)
+ (set! (color (child-ref container 'fade-all))
+ (make-color 1 1 1 alpha))))))
+ container))