mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
a53c06fe2b
Just missing `target-board-handler` because it errored with `Bad delay slot in clean_up_cond_no_else_final` and I wasn't able to figure out where the asm branch was. Commented out `target-board-clone-anim` because it crashes even after adding `clone-anim` and `clone-anim-once`.
79 lines
2 KiB
Common Lisp
79 lines
2 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: aligner-h.gc
|
|
;; name in dgo: aligner-h
|
|
;; dgos: ENGINE, GAME
|
|
|
|
(defenum align-flags
|
|
:bitfield #t
|
|
:type uint32
|
|
(disabled) ;; keep object velocity
|
|
(af01)
|
|
(af02)
|
|
(af03)
|
|
(af04)
|
|
(af05)
|
|
)
|
|
|
|
(defenum align-opts
|
|
:bitfield #t
|
|
:type uint32
|
|
(adjust-x-vel)
|
|
(adjust-y-vel)
|
|
(adjust-xz-vel)
|
|
(keep-other-velocities)
|
|
(adjust-quat) ;; 16
|
|
(alop0)
|
|
(alop1)
|
|
(alop2)
|
|
(alop3)
|
|
(alop4)
|
|
(alop5)
|
|
(no-gravity)
|
|
(ignore-y-if-zero)
|
|
)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype align-control (basic)
|
|
((flags align-flags :offset-assert 4)
|
|
(process process-drawable :offset-assert 8)
|
|
(frame-group art-joint-anim :offset-assert 12)
|
|
(frame-num float :offset-assert 16)
|
|
(matrix matrix 2 :inline :offset-assert 32)
|
|
(transform transform 2 :inline :offset-assert 160)
|
|
(delta transformq :inline :offset-assert 256)
|
|
(last-speed meters :offset-assert 304)
|
|
(align transformq :inline :offset 160)
|
|
)
|
|
:method-count-assert 14
|
|
:size-assert #x134
|
|
:flag-assert #xe00000134
|
|
(:methods
|
|
(new (symbol type process) _type_ 0)
|
|
(compute-alignment! (_type_) transformq 9)
|
|
(align! (_type_ align-opts float float float) trsqv 10)
|
|
(align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv :behavior process 11)
|
|
(first-transform (_type_) transform 12)
|
|
(second-transform (_type_) transform 13)
|
|
)
|
|
)
|
|
|
|
|
|
;; WARN: Return type mismatch object vs align-control.
|
|
(defmethod new align-control ((allocation symbol) (type-to-make type) (arg0 process))
|
|
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
|
(when (zero? obj)
|
|
(go process-drawable-art-error "memory")
|
|
(return (the-as align-control 0))
|
|
)
|
|
(set! (-> obj process) (the-as process-drawable arg0))
|
|
(the-as align-control obj)
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|