summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scenes/intro.scm50
1 files changed, 35 insertions, 15 deletions
diff --git a/scenes/intro.scm b/scenes/intro.scm
index 640bdc8..285f0a3 100644
--- a/scenes/intro.scm
+++ b/scenes/intro.scm
@@ -34,29 +34,49 @@
(load-tile-font "assets/fonts/bubblemad_8x8.png" 8 8
" !\"©_%❤'()*+,-./0123456789:←<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"))
-
(define texts
- '("The void has been suspended for a while.\nYou exist for now."
- "Confusion gave way to a brief burst of consciousness.\nHere you are."
- "The haze clears and you can see that you are here now.\nYou did not ask for this."
- "You rise from deepest waters and take your first breath.\nYou wonder: will this last?"
- "History yields to the present.\nThe present crumbles underfoot,\nso you begin to run."
- "A leaf has turned.\nThe sunshine warms and blinds.\nThe leaf begins to dry."))
+ '("\
+The void has been suspended for
+a little while. You exist now."
+ "\
+Confusion gives way to a brief
+burst of consciousness.
+Here you are. What now?"
+ "\
+The haze clears and you can see
+that you are here now. You did not
+ask for this."
+ "\
+You rise from deepest waters and
+take your first breath. You wonder:
+will this last?"
+ "\
+History yields to the present.
+The present crumbles underfoot.
+You better move."
+ "\
+A leaf has turned. The sunshine
+warms and blinds. The leaf begins
+to dry."))
(set! *random-state* (random-state-from-platform))
(define-method (populate (intro <intro>))
- (list
- (make <label>
- #:name 'welcome
- #:font intro-font
- #:text (list-ref texts (random (length texts)))
- #:position (vec2 16.0 120.0))
+ (cons
(make <label>
#:name 'press-enter
#:font intro-font
- #:text "press enter to start."
- #:position (vec2 72.0 80.0))))
+ #:text "Press enter to start."
+ #:position (vec2 72.0 50.0))
+ (let* ((text (list-ref texts (random (length texts))))
+ (parts (string-split text #\newline)))
+ (map (lambda (part i)
+ (make <label>
+ #:name 'welcome
+ #:font intro-font
+ #:text part
+ #:position (vec2 16.0 (- 150.0 (* 12 i)))))
+ parts (iota (length parts))))))
(define-method (on-key-press (intro <intro>) key mods repeat?)
(when (eq? key 'return)