mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
93 lines
2.5 KiB
Common Lisp
93 lines
2.5 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: tfrag-near.gc
|
|
;; name in dgo: tfrag-near
|
|
;; dgos: GAME, ENGINE
|
|
|
|
(define tnear-vu1-block (new 'static 'vu-function :length #x0 :qlength #x0))
|
|
|
|
(defun-debug tfrag-details ((arg0 tfragment))
|
|
"Print some stats about tfrag. It accessest past the end of the dma chain array,
|
|
so I think this is from a slightly older tfrag format"
|
|
(format 0 "id = ~d~%" (-> arg0 id))
|
|
(format 0 "common:~%")
|
|
(let ((s5-0 (-> arg0 dma-qwc 0))
|
|
(s4-0 (-> arg0 dma-common))
|
|
)
|
|
(format 0 "qwc = ~d, ref = ~x~%" s5-0 s4-0)
|
|
(disasm-vif-tag
|
|
(the-as (pointer vif-tag) s4-0)
|
|
(the-as int (* s5-0 4))
|
|
(the-as symbol 0)
|
|
#t
|
|
)
|
|
)
|
|
(format 0 "base:~%")
|
|
(let ((s5-1 (-> arg0 dma-qwc 1))
|
|
(s4-1 (-> arg0 dma-base))
|
|
)
|
|
(format 0 "qwc = ~d, ref = ~x~%" s5-1 s4-1)
|
|
(disasm-vif-tag
|
|
(the-as (pointer vif-tag) s4-1)
|
|
(the-as int (* s5-1 4))
|
|
(the-as symbol 0)
|
|
#t
|
|
)
|
|
)
|
|
(format 0 "level-0:~%")
|
|
(let ((s5-2 (-> arg0 dma-qwc 3))
|
|
(s4-2 (-> (the-as (pointer uint32) arg0) 10))
|
|
)
|
|
(format 0 "qwc = ~d, ref = ~x~%" s5-2 s4-2)
|
|
(disasm-vif-tag
|
|
(the-as (pointer vif-tag) s4-2)
|
|
(the-as int (* s5-2 4))
|
|
(the-as symbol 0)
|
|
#t
|
|
)
|
|
)
|
|
(format 0 "level-1:~%")
|
|
(let ((s5-3 (-> arg0 dma-qwc 2))
|
|
(gp-1 (-> arg0 dma-level-1))
|
|
)
|
|
(format 0 "qwc = ~d, ref = ~x~%" s5-3 gp-1)
|
|
(disasm-vif-tag
|
|
(the-as (pointer vif-tag) gp-1)
|
|
(the-as int (* s5-3 4))
|
|
(the-as symbol 0)
|
|
#t
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun-debug clip-restore ()
|
|
"Move the camera to a place in sandover"
|
|
(let ((a0-0 (new-stack-vector0))
|
|
(a1-0 (new-stack-matrix0))
|
|
)
|
|
(set! (-> a0-0 x) 92648.22)
|
|
(set! (-> a0-0 y) 238025.03)
|
|
(set! (-> a0-0 z) 199836.31)
|
|
(set! (-> a0-0 w) 1.0)
|
|
(set! (-> a1-0 vector 0 x) -0.9283)
|
|
(set! (-> a1-0 vector 0 y) 0.0)
|
|
(set! (-> a1-0 vector 0 z) 0.3716)
|
|
(set! (-> a1-0 vector 0 w) 0.0)
|
|
(set! (-> a1-0 vector 1 x) -0.2257)
|
|
(set! (-> a1-0 vector 1 y) 0.7945)
|
|
(set! (-> a1-0 vector 1 z) -0.5637)
|
|
(set! (-> a1-0 vector 1 w) 0.0)
|
|
(set! (-> a1-0 vector 2 x) -0.2952)
|
|
(set! (-> a1-0 vector 2 y) -0.6072)
|
|
(set! (-> a1-0 vector 2 z) -0.7375)
|
|
(set! (-> a1-0 vector 2 w) 0.0)
|
|
(set! (-> a1-0 vector 3 x) 0.0)
|
|
(set! (-> a1-0 vector 3 y) 0.0)
|
|
(set! (-> a1-0 vector 3 z) 0.0)
|
|
(set! (-> a1-0 vector 3 w) 1.0)
|
|
(debug-set-camera-pos-rot! a0-0 a1-0)
|
|
)
|
|
(none)
|
|
) |