Files
jak-project/test/goalc/source_templates/with_game/test-vector-int-float-conversions.gc
T
ManDude 25b0e1be7d [decomp] collectables + works ingame! (#971)
* 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
2021-11-23 18:25:57 -05:00

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