mirror of
https://github.com/open-goal/jak-project
synced 2026-09-06 11:20:54 -04:00
[decompiler] Fix rlet in top level and detect matrix and stack inline construction (#547)
* top level in rlet * detect matrix and vector inline 0 * pretty print the symbol map
This commit is contained in:
@@ -48,27 +48,19 @@
|
||||
;; definition for function transform-matrix-calc!
|
||||
;; Used lq/sq
|
||||
(defun transform-matrix-calc! ((tf transform) (dst-mat matrix))
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s4-0 vector 0 quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 vector 1 quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 vector 2 quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 vector 3 quad) (the-as uint128 0))
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s3-0 vector 0 quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 vector 1 quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 vector 2 quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 vector 3 quad) (the-as uint128 0))
|
||||
(matrix-identity! dst-mat)
|
||||
(matrix-translate! dst-mat (-> tf trans))
|
||||
(matrix-rotate-y! s4-0 (-> tf rot y))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-rotate-x! s4-0 (-> tf rot x))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
(matrix-rotate-z! s4-0 (-> tf rot z))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-scale! s4-0 (-> tf scale))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
)
|
||||
(let ((s4-0 (new-stack-matrix0))
|
||||
(s3-0 (new-stack-matrix0))
|
||||
)
|
||||
(matrix-identity! dst-mat)
|
||||
(matrix-translate! dst-mat (-> tf trans))
|
||||
(matrix-rotate-y! s4-0 (-> tf rot y))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-rotate-x! s4-0 (-> tf rot x))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
(matrix-rotate-z! s4-0 (-> tf rot z))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-scale! s4-0 (-> tf scale))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -77,29 +69,21 @@
|
||||
(defun
|
||||
transform-matrix-parent-calc!
|
||||
((tf transform) (dst-mat matrix) (inv-scale vector))
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s4-0 vector 0 quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 vector 1 quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 vector 2 quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 vector 3 quad) (the-as uint128 0))
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s3-0 vector 0 quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 vector 1 quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 vector 2 quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 vector 3 quad) (the-as uint128 0))
|
||||
(matrix-identity! s3-0)
|
||||
(matrix-translate! s3-0 (-> tf trans))
|
||||
(matrix-inv-scale! s4-0 inv-scale)
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
(matrix-rotate-y! s4-0 (-> tf rot y))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-rotate-x! s4-0 (-> tf rot x))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
(matrix-rotate-z! s4-0 (-> tf rot z))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-scale! s4-0 (-> tf scale))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
)
|
||||
(let ((s4-0 (new-stack-matrix0))
|
||||
(s3-0 (new-stack-matrix0))
|
||||
)
|
||||
(matrix-identity! s3-0)
|
||||
(matrix-translate! s3-0 (-> tf trans))
|
||||
(matrix-inv-scale! s4-0 inv-scale)
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
(matrix-rotate-y! s4-0 (-> tf rot y))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-rotate-x! s4-0 (-> tf rot x))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
(matrix-rotate-z! s4-0 (-> tf rot z))
|
||||
(matrix*! s3-0 s4-0 dst-mat)
|
||||
(matrix-scale! s4-0 (-> tf scale))
|
||||
(matrix*! dst-mat s4-0 s3-0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -107,7 +91,3 @@
|
||||
(defun trs-matrix-calc! ((tf trs) (dst-mat matrix))
|
||||
(transform-matrix-calc! (the-as transform (-> tf trans)) dst-mat)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user