Files
jak-project/test/decompiler/reference/engine/math/quaternion-h_REF.gc
T
water111 a6d5c4eda3 [decompiler] clean up vector detection and add vector float product detection (#638)
* change

* recognize vector float product and update tests
2021-06-27 17:24:35 -04:00

39 lines
1.2 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type quaternion
(deftype quaternion (structure)
((x float :offset-assert 0)
(y float :offset-assert 4)
(z float :offset-assert 8)
(w float :offset-assert 12)
(data float 4 :offset 0)
(vec vector :inline :offset 0)
(quad uint128 :offset 0)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type quaternion
;; INFO: this function exists in multiple non-identical object files
;; Used lq/sq
(defmethod inspect quaternion ((obj quaternion))
(format #t "[~8x] ~A~%" obj 'quaternion)
(format #t "~Tdata[4] @ #x~X~%" (&-> obj x))
(format #t "~Tx: ~f~%" (-> obj x))
(format #t "~Ty: ~f~%" (-> obj y))
(format #t "~Tz: ~f~%" (-> obj z))
(format #t "~Tw: ~f~%" (-> obj w))
(format #t "~Tvec: #<vector @ #x~X>~%" (&-> obj x))
(format #t "~Tquad: ~D~%" (-> obj vec quad))
obj
)
;; definition for symbol *unity-quaternion*, type quaternion
(define *unity-quaternion* (new 'static 'quaternion :w 1.0))
;; failed to figure out what this is:
0