summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-07-21 23:02:12 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-07-27 17:15:47 +0200
commitd9765a2508aacb3dd3aac6f02b6185302adba7d3 (patch)
tree49d7692f7b7e4f7d4c155d7a2e50fbabaf9d3407
parente91534edd288c7e34afc5e45844f32b85c6db3c1 (diff)
Move globals to config module.
-rw-r--r--config.scm28
-rw-r--r--scenes/game.scm8
2 files changed, 30 insertions, 6 deletions
diff --git a/config.scm b/config.scm
new file mode 100644
index 0000000..1895202
--- /dev/null
+++ b/config.scm
@@ -0,0 +1,28 @@
+;;; The Inevitable Game
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; This program is free software: you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation, either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+(define-module (config)
+ #:export (%width
+ %height
+ %line-height
+ %message-margin))
+
+
+(define %width 320)
+(define %height 240)
+(define %line-height 10.0)
+(define %message-margin 3.0)
diff --git a/scenes/game.scm b/scenes/game.scm
index 7182beb..a51fd18 100644
--- a/scenes/game.scm
+++ b/scenes/game.scm
@@ -33,21 +33,17 @@
#:use-module (engine node-2d)
#:use-module (engine scene)
#:use-module (oop goops)
+ ;; Game modules
#:use-module (characters)
#:use-module (characters lorenzo)
#:use-module (characters reaper)
+ #:use-module (config)
#:export (game))
(use-modules (chickadee)
(chickadee scripting))
-(define %width 320)
-(define %height 240)
-(define %line-height 10.0)
-(define %message-margin 3.0)
-
-
(define-class <stats> (<node-2d>)
(object #:accessor object #:init-form #f #:init-keyword #:object))