c5bf423d48dc

Fancy chars
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 05 Aug 2016 11:56:23 +0000
parents e3998c357100
children d06600b8e127
branches/tags (none)
files src/main.lisp

Changes

--- a/src/main.lisp	Fri Aug 05 11:48:42 2016 +0000
+++ b/src/main.lisp	Fri Aug 05 11:56:23 2016 +0000
@@ -369,7 +369,7 @@
   x y)
 
 (define-component visible
-  (glyph :type char)
+  (glyph :type string)
   color)
 
 (define-component edible
@@ -388,7 +388,7 @@
   (make-instance 'tree
                  :coords/x x
                  :coords/y y
-                 :visible/glyph #\T
+                 :visible/glyph "T"
                  :visible/color +color-green+
                  :fruiting/chance 0.001))
 
@@ -396,7 +396,7 @@
   (make-instance 'fruit
                  :coords/x x
                  :coords/y y
-                 :visible/glyph #\o
+                 :visible/glyph "รณ"
                  :visible/color +color-pink+
                  :edible/energy (random-around 10 3)))
 
@@ -404,7 +404,7 @@
   (make-instance 'algae
                  :coords/x x
                  :coords/y y
-                 :visible/glyph #\`
+                 :visible/glyph "`"
                  :visible/color +color-green+))
 
 
@@ -414,7 +414,7 @@
       (world-to-screen (coords/x entity) (coords/y entity))
     (when (onscreenp sx sy)
       (with-color (visible/color entity)
-        (charms:write-char-at-point
+        (charms:write-string-at-point
           charms:*standard-window*
           (visible/glyph entity)
           sx sy)))))
@@ -527,10 +527,12 @@
           sx sy)))))
 
 (defun draw-ui ()
-  (write-right (list
-                 (format nil "[~D, ~D]" *view-x* *view-y*)
-                 (format nil "~D entities" (hash-table-count *entity-index*)))
-               (1- *screen-width*) 0))
+  (write-right
+    (list
+      (format nil "[~D, ~D]" *view-x* *view-y*)
+      (format nil "~D entities" (hash-table-count *entity-index*)))
+    (1- *screen-width*)
+    0))
 
 
 (defun render-map ()