summaryrefslogtreecommitdiff
path: root/strigoform/game-area.scm
blob: 715581304d473515c1aa7c688dad98c356628328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)))))))