aboutsummaryrefslogtreecommitdiff
path: root/src/macroknight/text.hy
blob: 1b631c1c6119f5e096a2fd254c7fa06ad11bcf2e (plain)
1
2
3
4
5
6
7
8
(import tiles [draw-tile])

(defn render-text [surf tileset text x y]
  (for [#(char-num char) (enumerate text)]
    (when (> (ord char) 32)
      (let [sprite-num (+ (ord char)
                          (if (> (ord char) 77) 888 852))]
        (draw-tile surf tileset sprite-num (+ x char-num) y)))))