Files
jak-project/test/decompiler/reference/jak2/engine/math/quaternion-h_REF.gc
T
Hat Kid fc43870d85 decompiler: obj -> this, set-time! and time-elapsed? macros (#3026)
This renames the method object in `defmethod`s to `this` and adds
detection for the `set-time!` and `time-elapsed?` macros.

Definitely my biggest PR yet...
2023-09-26 15:17:00 +01:00

44 lines
1.3 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type quaternion
(deftype quaternion (structure)
((data float 4 :offset-assert 0)
(x float :offset 0)
(y float :offset 4)
(z float :offset 8)
(w float :offset 12)
(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
;; INFO: Used lq/sq
(defmethod inspect quaternion ((this quaternion))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'quaternion)
(format #t "~1Tdata[4] @ #x~X~%" (&-> this x))
(format #t "~1Tx: ~f~%" (-> this x))
(format #t "~1Ty: ~f~%" (-> this y))
(format #t "~1Tz: ~f~%" (-> this z))
(format #t "~1Tw: ~f~%" (-> this w))
(format #t "~1Tvec: #<vector @ #x~X>~%" (&-> this x))
(format #t "~1Tquad: ~D~%" (-> this quad))
(label cfg-4)
this
)
;; definition for symbol *unity-quaternion*, type quaternion
(define *unity-quaternion* (new 'static 'quaternion :w 1.0))
;; failed to figure out what this is:
0