fix text rendering bugs (#841)

This commit is contained in:
water111
2021-09-08 22:04:30 -04:00
committed by GitHub
parent bb49790d3d
commit 18df68b1f7
6 changed files with 193 additions and 156 deletions
+16 -2
View File
@@ -62,7 +62,7 @@
"This function draws the debug stuff. You can edit this, then reload this file to play with it."
;; val will increase from 0 to 1, then reset back to 0.
(let* ((frame (the float (mod (* 4 iter) 1600)))
(let* ((frame (the float (mod (* 4 iter) 3200)))
(val (/ frame 1600.0)))
(format *stdcon* "~0kval ~f~%" val)
@@ -102,7 +102,7 @@
)
;; these also work
;; (draw-end-credits (the int frame))
(draw-end-credits (the int frame))
;; (draw-title-credits val)
)
@@ -260,3 +260,17 @@
)
(set! *display-profile* #t)
(defun text-randomizer ()
(dotimes (i 10000)
(let ((idx1 (rand-vu-int-count (-> *common-text* length))))
(dotimes (j 20) (rand-vu))
(let ((idx2 (rand-vu-int-count (-> *common-text* length))))
(let ((temp (-> *common-text* data idx1 text)))
(set! (-> *common-text* data idx1 text) (-> *common-text* data idx2 text))
(set! (-> *common-text* data idx2 text) temp)
)
)
)
)
)