mirror of
https://github.com/open-goal/jak-project
synced 2026-07-01 20:20:35 -04:00
25b0e1be7d
* decomp: `collectables` * fix types * `powerups` and fixes * fixes * Merge branch 'pr/929' into d/temp/collectables * fix collide stuff * update things... * update * update * temp bump global heap mem * fix `defstate` hooks wrong/unnecessary sets & collide stuff for collectables * dumb mistakes :) * stub out broken process-drawable stuff * update refs * add `:no-inspect` key and save some memory & remove birth logs * Update kmachine.h * clang * add citadel * fix no-inspect key * fix tests!! * fix stupid mistake in `collide-shape-prim-sphere` alloc * comment annoying print * feedback * fix edge-case probably * remove `:no-inspect`s
29 lines
627 B
Common Lisp
29 lines
627 B
Common Lisp
(defmacro print-vf (vf)
|
|
`(let ((temp (new 'stack 'vector)))
|
|
(.svf temp ,vf)
|
|
(format #t "~f ~f ~f ~f~%" (-> temp x) (-> temp y) (-> temp z) (-> temp w))
|
|
)
|
|
)
|
|
|
|
(defmacro print-vf-hex (vf)
|
|
`(let ((temp (new 'stack 'vector4w)))
|
|
(.svf temp ,vf)
|
|
(format #t "~d ~d ~d ~d~%" (-> temp x) (-> temp y) (-> temp z) (-> temp w))
|
|
)
|
|
)
|
|
|
|
|
|
(defun itof-test ()
|
|
(rlet ((vf1 :class vf)
|
|
(vf2 :class vf))
|
|
(.lvf vf1 (new 'static 'vector :x 1.0 :y -2.0 :z 3.0 :w 4.0))
|
|
(.ftoi.vf vf2 vf1)
|
|
(print-vf vf1)
|
|
(print-vf-hex vf2)
|
|
(.itof.vf vf2 vf2)
|
|
(print-vf vf2)
|
|
)
|
|
)
|
|
|
|
(itof-test)
|
|
0 |