Bulk non-functional-change commit

Some minor edits that I’ve yet to shove into a
bigger commit. No functional changes, I promise!
Just shoving some stuff around, is all.
Seriously, this is a meaningless commit. Nothing
suspicious or worthy of scrutiny going on here!
Ha ha. Ha. <w<"
(Seriously though, nothing’s effectively chagned.)
This commit is contained in:
Jaidyn Ann 2023-07-07 19:31:18 -05:00
parent 63e31ef4f8
commit 262ba039b1
4 changed files with 7 additions and 14 deletions

View File

@ -1,4 +1,5 @@
# Flora Search Aurora
_Flora Search Aurora_ is a game about destiny-making, peace-making, and (most importantly) bouquet-making.
## Installation

View File

@ -334,11 +334,11 @@ make it pretty, dang it! >O<
(optimal-layout (getf dialogue :layout))
(coords (car optimal-layout)))
(when (and text optimal-layout)
(:render-fill-rectangle matrix #\space
(list :x (- (getf coords :x) 1)
:y (- (getf coords :y) 1))
(+ (second optimal-layout) 2) ;; Width
(+ (third optimal-layout) 1)) ;; Height
;; (✎:render-fill-rectangle matrix #\space
;; (list :x (- (getf coords :x) 1)
;; :y (- (getf coords :y) 1)
;; (+ (second optimal-layout) 2) ;; Width
;; (+ (third optimal-layout) 1)) ;; Height
(:render-string
matrix text (first optimal-layout)
:width (second optimal-layout)

View File

@ -53,6 +53,7 @@ If no number is parsed out, return NIL."
(str:unlines (remove-if-not #'stringp strings)))
;; TODO: Use MISMATCH in this function, instead of whatever I did!
(defun count-in-a-row (item seq &key (count 0) (test #'eql) (from-end nil))
"How many times the given ITEM is found in SEQ in-a-row. Starts from the head
of the list, unless FROM-END is specified. The TEST defaults to #'eql."

View File

@ -40,15 +40,6 @@ SUBSEQ in SEQUENCE."
#'>))
(defun string-dimensions (string)
"Given a linewrapped STRING, return the minimum width and minimum height (in
characters) for a rectangle that might contain the entirety of the string.
(WIDTH HEIGHT)"
(let ((lines (str:lines string)))
(list (sort (mapcar #'length lines) #'<) ;; Width
(count lines)))) ;; Height
(defun fit-lines (string width &key (alignment :center))
"Fit each line of a STING into a specific WIDTH, with ALIGNMENT to a specific
side (either :CENTER, :LEFT, or :RIGHT)."