mirror of
https://github.com/open-goal/jak-project
synced 2026-06-26 02:24:34 -04:00
190fa4bbe8
Where applicable, of course. My system language is set to English so I actually can't test this. If anyone has their Windows language (NOT LOCALE) set to Spanish, German, French, Italian or Japanese please test this. Fixes #1734 Also fixes the opengoal debugger on Windows and fixes the decomp for `menu` which was causing some crashes related to input handling.
56 lines
2.4 KiB
Common Lisp
56 lines
2.4 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
#|
|
|
Various debugging displays made for the pc port. This file includes overrides or game-specific implementations.
|
|
|#
|
|
|
|
;; debug-only file!
|
|
(declare-file (debug))
|
|
|
|
(defmethod print-debug-misc pc-settings-jak2 ((obj pc-settings-jak2))
|
|
"prints various miscellaneous debug text to the game console, according to what's enabled in this object."
|
|
|
|
(when (-> obj display-bug-report)
|
|
#f)
|
|
)
|
|
|
|
(defconstant MEM_BAR_HEIGHT 14) ;; total height of the bar
|
|
(defconstant MEM_BAR_BOTTOM 416) ;; x coord for the bottom side of the bar list
|
|
(defconstant MEM_BAR_NUM 11) ;; amount of memory usage bars (override later if wanted)
|
|
(defmethod draw-memory pc-settings-jak2 ((obj pc-settings-jak2) (buf dma-buffer))
|
|
"draw the memory heap status in the bottom right corner"
|
|
|
|
(when (-> obj display-heap-status)
|
|
(let ((idx 0)
|
|
(level-heap-colors (new 'static 'array rgba 6 (static-rgba 32 255 255 64)
|
|
(static-rgba 255 32 255 64)
|
|
(static-rgba 255 255 32 64)
|
|
(static-rgba 32 255 255 64)
|
|
(static-rgba 255 32 255 64)
|
|
(static-rgba 255 255 32 64)
|
|
)))
|
|
(draw-memory-bar-kheap buf global :idx idx :color (static-rgba 32 32 255 64))
|
|
(draw-memory-bar-kheap buf debug :idx (1+! idx) :color (static-rgba 255 32 32 64))
|
|
(dotimes (i (-> *level* length))
|
|
(draw-memory-bar-kheap buf (-> *level* level i heap)
|
|
:name (aif (-> *level* level i borrow-from-level)
|
|
(string-format "(~A)l~D<-l~D" (-> *level* level i name) i (-> it index))
|
|
(string-format "(~A)l~D" (-> *level* level i name) i))
|
|
:idx (1+! idx) :color (-> level-heap-colors i))
|
|
)
|
|
(draw-memory-bar-dead-pool-heap buf *nk-dead-pool* :name "actor" :idx (1+! idx) :color (static-rgba 32 255 32 64))
|
|
(draw-memory-bar-generic buf
|
|
:remain (* 16 (dma-buffer-free (-> *display* frames (-> *display* on-screen) global-buf)))
|
|
:total (length (-> *display* frames (-> *display* on-screen) global-buf))
|
|
:name "dma-global" :idx (1+! idx) :color (static-rgba 32 32 255 64))
|
|
(draw-memory-bar-generic buf
|
|
:remain (* 16 (dma-buffer-free (-> *display* frames (-> *display* on-screen) debug-buf)))
|
|
:total (length (-> *display* frames (-> *display* on-screen) debug-buf))
|
|
:name "dma-debug" :idx (1+! idx) :color (static-rgba 255 32 32 64))
|
|
)
|
|
#t)
|
|
)
|
|
|
|
|