diff options
author | Gene Pasquet <gene@pacerevenue.com> | 2025-05-15 13:46:26 +0200 |
---|---|---|
committer | Gene Pasquet <gene@pacerevenue.com> | 2025-05-15 13:46:26 +0200 |
commit | cee75e57560b77e8ec0a394c1d3c98b9839be80e (patch) | |
tree | 8bd29322dc951ad827435e0c4ab162ed13ff911e /src/macroknight/text.hy | |
parent | b8580d616831213934eb424d9284621aadc4c544 (diff) |
Refactor!!
Diffstat (limited to 'src/macroknight/text.hy')
-rw-r--r-- | src/macroknight/text.hy | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/macroknight/text.hy b/src/macroknight/text.hy new file mode 100644 index 0000000..1b631c1 --- /dev/null +++ b/src/macroknight/text.hy @@ -0,0 +1,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))))) |