mirror of
https://github.com/open-goal/jak-project
synced 2026-08-07 18:23:13 -04:00
ad9a532ff9
Fixes the aspect ratio of the font renderer (Jak 2 does not need the same hacks as Jak 1), the custom letterbox/pillarbox sizes and fixes the heap display. --------- Co-authored-by: water <awaterford111445@gmail.com>
52 lines
2.2 KiB
Common Lisp
52 lines
2.2 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 (string-format "l~D" 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)
|
|
)
|
|
|
|
|