comparison clojure/com/aurellem/title.clj @ 89:2f478abe57d0

added sanity check for title
author Robert McIntyre <rlm@mit.edu>
date Sat, 10 Mar 2012 15:55:10 -0600
parents 65c2854c5875
children 613353b7e012
comparison
equal deleted inserted replaced
88:65c2854c5875 89:2f478abe57d0
81 scroll-text 81 scroll-text
82 scroll-text 82 scroll-text
83 scroll-text 83 scroll-text
84 scroll-text)) 84 scroll-text))
85 85
86 (defn write-intro! [] 86 (def title-frames 2323)
87
88 (defn title-checkpoint! []
87 (let [[moves state] (finish-title)] 89 (let [[moves state] (finish-title)]
90 (assert (= title-frames (:frame state)))
88 [(write-moves! moves) (write-state! state)])) 91 [(write-moves! moves) (write-state! state)]))
89
90 (def title-frames 2323)
91 92
92 (defn intro [] 93 (defn intro []
93 [(read-moves title-frames) 94 [(read-moves title-frames)
94 (read-state title-frames)]) 95 (read-state title-frames)])
95 96
96 (defn test-intro [] 97 (defn test-intro []
97 (play-vbm (moves->filename title-frames))) 98 (play-vbm (moves->filename title-frames)))
98 99
99
100
101 ;; TODO might be able to glue these together more elegantly with monads 100 ;; TODO might be able to glue these together more elegantly with monads
102 101