summaryrefslogtreecommitdiff
path: root/strigoform/game-area.scm
diff options
context:
space:
mode:
Diffstat (limited to 'strigoform/game-area.scm')
-rw-r--r--strigoform/game-area.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/strigoform/game-area.scm b/strigoform/game-area.scm
new file mode 100644
index 0000000..7155813
--- /dev/null
+++ b/strigoform/game-area.scm
@@ -0,0 +1,15 @@
+(library (strigoform game-area)
+ (export game-width
+ game-height
+ out-of-bounds?)
+ (import (scheme base)
+ (strigoform math))
+
+ (define game-width 240.0)
+ (define game-height 320.0)
+
+ (define (out-of-bounds? x y w h)
+ (let ((padding 32.0))
+ (not (rect-within? x y w h (- padding) (- padding)
+ (+ game-width (* padding 2.0))
+ (+ game-height (* padding 2.0)))))))