]> git.jsancho.org Git - dungeon-master.git/blob - modules/dungeon-master/dialogue.scm
Modules reorganization
[dungeon-master.git] / modules / dungeon-master / dialogue.scm
1 ;;; Dungeon Master --- RPG Adventure Generator
2 ;;; Copyright © 2020 Javier Sancho <jsf@jsancho.org>
3 ;;;
4 ;;; Dungeon Master is free software; you can redistribute it and/or modify it
5 ;;; under the terms of the GNU General Public License as published by
6 ;;; the Free Software Foundation; either version 3 of the License, or
7 ;;; (at your option) any later version.
8 ;;;
9 ;;; Dungeon Master is distributed in the hope that it will be useful, but
10 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 ;;; General Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with Dungeon Master. If not, see <http://www.gnu.org/licenses/>.
16
17
18 (define-module (dungeon-master dialogue)
19   #:use-module (ice-9 optargs)
20   #:export (run-dialogue))
21
22
23 (define* (run-dialogue dialogue #:optional initial-scene)
24   (let ((scene (if initial-scene
25                    (assoc-ref dialogue initial-scene)
26                    (cdar dialogue))))
27     (let-keywords scene #t (text)
28                   (display text)
29                   (newline))))