Fix a few errors in the entity debugger (#2166)

This commit is contained in:
ManDude
2023-01-27 22:50:54 +00:00
committed by GitHub
parent 213f3bad20
commit 42780e8f8c
3 changed files with 13 additions and 6 deletions
+7 -5
View File
@@ -1941,26 +1941,28 @@
(cond
;; some water-height info
((and (= (-> e tag i name) 'water-height) (= (-> e tag i elt-count) 4) (= (-> e tag i elt-type) float))
(format *debug-temp-string* " ~mm ~mm ~mm #x~X"
(+! y-adv (* 8 1))
(format *debug-temp-string* " ~mm ~mm ~mm~%(~S)"
(-> (the (pointer float) data) 0)
(-> (the (pointer float) data) 1)
(-> (the (pointer float) data) 2)
(-> (the (pointer uint32) data) 3)
(begin (bit-enum->string water-flags (the int (-> (the (pointer float) data) 3)) (clear *temp-string*)) *temp-string*)
)
)
;; some water-height info but with 5 elts
((and (= (-> e tag i name) 'water-height) (= (-> e tag i elt-count) 4) (= (-> e tag i elt-type) float))
(format *debug-temp-string* " ~mm ~mm ~mm #x~X ~mm"
(+! y-adv (* 8 2))
(format *debug-temp-string* " ~mm ~mm ~mm~%(~S)~%~mm"
(-> (the (pointer float) data) 0)
(-> (the (pointer float) data) 1)
(-> (the (pointer float) data) 2)
(-> (the (pointer uint32) data) 3)
(begin (bit-enum->string water-flags (the int (-> (the (pointer float) data) 3)) (clear *temp-string*)) *temp-string*)
(-> (the (pointer float) data) 4)
)
)
;; music flava (music ambients)
((and (= (-> e tag i name) 'flava) (= (-> e tag i elt-count) 1) (= (-> e tag i elt-type) int32))
(format *debug-temp-string* " (music-flava ~S)" (enum->string music-flava (-> (the (pointer int32) data) 0)))
(format *debug-temp-string* " (music-flava ~S)" (music-flava->string (-> (the (pointer music-flava) data) 0)))
)
;; text id (can be hint ambient)
((and (= (-> e tag i name) 'text-id) (= (-> e tag i elt-count) 1) (= (-> e tag i elt-type) int32))
+1 -1
View File
@@ -820,7 +820,7 @@
(dotimes (i LEVEL_COUNT)
(format *stdcon* "level ~D ~12A ~A~%" i (-> *level* level i name) (-> *level* level i display?))
)
(format *stdcon* "music ~A (f: ~D/~S)~%" (-> *setting-control* current music) (-> *setting-control* current sound-flava) (enum->string music-flava (-> *setting-control* default sound-flava)))
(format *stdcon* "music ~A (f: ~D/~S)~%" (-> *setting-control* current music) (-> *setting-control* current sound-flava) (music-flava->string (the-as music-flava (-> *setting-control* default sound-flava))))
(format *stdcon* "sound ~A ~A~%" *sound-bank-1* *sound-bank-2*)
(let ((pos (target-pos 0)))
(format *stdcon* "target ~m ~m ~m~%" (-> pos x) (-> pos y) (-> pos z))
+5
View File
@@ -551,6 +551,11 @@
(define *sound-bank-1* #f)
(define *sound-bank-2* #f)
;; added for PC port
(defun-debug music-flava->string ((f music-flava))
"print the name of a music-flava"
(enum->string music-flava f))
(defun-extern string->sound-name string sound-name)
(defun-extern sound-set-ear-trans vector vector float int)
(defun-extern ear-trans vector)