mirror of
https://github.com/open-goal/jak-project
synced 2026-08-11 03:26:33 -04:00
New Pretty Printer (#994)
* begin work on improved pretty printer * update ref * finish pretty printer * force line break for defstate
This commit is contained in:
+53
-79
@@ -26,58 +26,34 @@
|
||||
(f30-0 1.0)
|
||||
(s4-0 0)
|
||||
)
|
||||
(set-vector! s5-0 0.0 0.0 0.0 1.0)
|
||||
(dotimes (s3-0 10)
|
||||
(let ((f28-0 (* f30-0 (sin (* 3276.8 (the float s3-0)))))
|
||||
(f26-0 (* f30-0 (sin (* 3276.8 (the float (+ s3-0 1))))))
|
||||
(s2-0 (new-stack-vector0))
|
||||
(s1-0 (new-stack-vector0))
|
||||
(s0-0 (new-stack-vector0))
|
||||
(set-vector! s5-0 0.0 0.0 0.0 1.0)
|
||||
(dotimes (s3-0 10)
|
||||
(let ((f28-0 (* f30-0 (sin (* 3276.8 (the float s3-0)))))
|
||||
(f26-0 (* f30-0 (sin (* 3276.8 (the float (+ s3-0 1))))))
|
||||
(s2-0 (new-stack-vector0))
|
||||
(s1-0 (new-stack-vector0))
|
||||
(s0-0 (new-stack-vector0))
|
||||
)
|
||||
(set! (-> s2-0 y) (+ (-> s5-0 y) (* (cos (* 3276.8 (the float s3-0))) f30-0)))
|
||||
(set! (-> s1-0 y) (-> s2-0 y))
|
||||
(set! (-> s0-0 y) (+ (-> s5-0 y) (* (cos (* 3276.8 (the float (+ s3-0 1)))) f30-0)))
|
||||
(set! sv-80 0)
|
||||
(while (< sv-80 10)
|
||||
(set! (-> s2-0 x) (+ (-> s5-0 x) (* (cos (* 6553.6 (the float sv-80))) f28-0)))
|
||||
(set! (-> s2-0 z) (+ (-> s5-0 z) (* (sin (* 6553.6 (the float sv-80))) f28-0)))
|
||||
(set! (-> s1-0 x) (+ (-> s5-0 x) (* (cos (* 6553.6 (the float (+ sv-80 1)))) f28-0)))
|
||||
(set! (-> s1-0 z) (+ (-> s5-0 z) (* (sin (* 6553.6 (the float (+ sv-80 1)))) f28-0)))
|
||||
(set! (-> s0-0 x) (+ (-> s5-0 x) (* (cos (* 6553.6 (the float sv-80))) f26-0)))
|
||||
(set! (-> s0-0 z) (+ (-> s5-0 z) (* (sin (* 6553.6 (the float sv-80))) f26-0)))
|
||||
(set! (-> arg0 point s4-0 quad) (-> s2-0 quad))
|
||||
(set! (-> arg0 point (+ s4-0 1) quad) (-> s1-0 quad))
|
||||
(set! (-> arg0 point (+ s4-0 2) quad) (-> s0-0 quad))
|
||||
(+! s4-0 3)
|
||||
(set! sv-80 (+ sv-80 1))
|
||||
)
|
||||
(set!
|
||||
(-> s2-0 y)
|
||||
(+ (-> s5-0 y) (* (cos (* 3276.8 (the float s3-0))) f30-0))
|
||||
)
|
||||
)
|
||||
(set! (-> s1-0 y) (-> s2-0 y))
|
||||
(set!
|
||||
(-> s0-0 y)
|
||||
(+ (-> s5-0 y) (* (cos (* 3276.8 (the float (+ s3-0 1)))) f30-0))
|
||||
)
|
||||
(set! sv-80 0)
|
||||
(while (< sv-80 10)
|
||||
(set!
|
||||
(-> s2-0 x)
|
||||
(+ (-> s5-0 x) (* (cos (* 6553.6 (the float sv-80))) f28-0))
|
||||
)
|
||||
(set!
|
||||
(-> s2-0 z)
|
||||
(+ (-> s5-0 z) (* (sin (* 6553.6 (the float sv-80))) f28-0))
|
||||
)
|
||||
(set!
|
||||
(-> s1-0 x)
|
||||
(+ (-> s5-0 x) (* (cos (* 6553.6 (the float (+ sv-80 1)))) f28-0))
|
||||
)
|
||||
(set!
|
||||
(-> s1-0 z)
|
||||
(+ (-> s5-0 z) (* (sin (* 6553.6 (the float (+ sv-80 1)))) f28-0))
|
||||
)
|
||||
(set!
|
||||
(-> s0-0 x)
|
||||
(+ (-> s5-0 x) (* (cos (* 6553.6 (the float sv-80))) f26-0))
|
||||
)
|
||||
(set!
|
||||
(-> s0-0 z)
|
||||
(+ (-> s5-0 z) (* (sin (* 6553.6 (the float sv-80))) f26-0))
|
||||
)
|
||||
(set! (-> arg0 point s4-0 quad) (-> s2-0 quad))
|
||||
(set! (-> arg0 point (+ s4-0 1) quad) (-> s1-0 quad))
|
||||
(set! (-> arg0 point (+ s4-0 2) quad) (-> s0-0 quad))
|
||||
(+! s4-0 3)
|
||||
(set! sv-80 (+ sv-80 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -91,41 +67,39 @@
|
||||
;; definition for function add-debug-sphere-from-table
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
;; Used lq/sq
|
||||
(defun
|
||||
add-debug-sphere-from-table
|
||||
((arg0 bucket-id) (arg1 vector) (arg2 float) (arg3 rgba))
|
||||
(defun add-debug-sphere-from-table ((arg0 bucket-id) (arg1 vector) (arg2 float) (arg3 rgba))
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
(vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
)
|
||||
(let ((s4-0 (new-stack-vector0))
|
||||
(s3-0 (new-stack-vector0))
|
||||
(s2-0 (new-stack-vector0))
|
||||
(points (-> *debug-sphere-table* point))
|
||||
)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.mov vf2 arg2)
|
||||
(dotimes (s0-0 100)
|
||||
(.lvf vf3 (&-> points 0 quad))
|
||||
(.lvf vf4 (&-> points 1 quad))
|
||||
(.lvf vf5 (&-> points 2 quad))
|
||||
(set! points (the-as (inline-array vector) (-> points 3)))
|
||||
(.mul.x.vf vf3 vf3 vf2)
|
||||
(.mul.x.vf vf4 vf4 vf2)
|
||||
(.mul.x.vf vf5 vf5 vf2)
|
||||
(.add.vf vf3 vf3 vf1)
|
||||
(.add.vf vf4 vf4 vf1)
|
||||
(.add.vf vf5 vf5 vf1)
|
||||
(.svf (&-> s4-0 quad) vf3)
|
||||
(.svf (&-> s3-0 quad) vf4)
|
||||
(.svf (&-> s2-0 quad) vf5)
|
||||
(add-debug-line #t arg0 s4-0 s3-0 arg3 #f (the-as rgba -1))
|
||||
(add-debug-line #t arg0 s4-0 s2-0 arg3 #f (the-as rgba -1))
|
||||
)
|
||||
(let ((s4-0 (new-stack-vector0))
|
||||
(s3-0 (new-stack-vector0))
|
||||
(s2-0 (new-stack-vector0))
|
||||
(points (-> *debug-sphere-table* point))
|
||||
)
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
(.mov vf2 arg2)
|
||||
(dotimes (s0-0 100)
|
||||
(.lvf vf3 (&-> points 0 quad))
|
||||
(.lvf vf4 (&-> points 1 quad))
|
||||
(.lvf vf5 (&-> points 2 quad))
|
||||
(set! points (the-as (inline-array vector) (-> points 3)))
|
||||
(.mul.x.vf vf3 vf3 vf2)
|
||||
(.mul.x.vf vf4 vf4 vf2)
|
||||
(.mul.x.vf vf5 vf5 vf2)
|
||||
(.add.vf vf3 vf3 vf1)
|
||||
(.add.vf vf4 vf4 vf1)
|
||||
(.add.vf vf5 vf5 vf1)
|
||||
(.svf (&-> s4-0 quad) vf3)
|
||||
(.svf (&-> s3-0 quad) vf4)
|
||||
(.svf (&-> s2-0 quad) vf5)
|
||||
(add-debug-line #t arg0 s4-0 s3-0 arg3 #f (the-as rgba -1))
|
||||
(add-debug-line #t arg0 s4-0 s2-0 arg3 #f (the-as rgba -1))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user