mirror of
https://github.com/open-goal/jak-project
synced 2026-08-07 02:06:59 -04:00
3ee2b4423c
This PR does a few cleanups: - improve method names/comments/flags for `enemy.gc` and a few other files - fix `new-stack-matrix0` not working for jak 3 - add `matrix-copy!` detection for jak 3 - add `vector-copy!` detection --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
74 lines
1.6 KiB
Common Lisp
74 lines
1.6 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: geometry-h.gc
|
|
;; name in dgo: geometry-h
|
|
;; dgos: GAME
|
|
|
|
(define-extern quaternion-from-two-vectors-max-angle! (function quaternion vector vector float quaternion))
|
|
(define-extern vector-orient-by-quat! (function vector vector quaternion vector))
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype curve (structure)
|
|
((cverts (inline-array vector))
|
|
(num-cverts int32)
|
|
(knots (pointer float))
|
|
(num-knots int32)
|
|
(length float)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype line-intersection-val (structure)
|
|
((tt0 float)
|
|
(tt1 float)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype border-plane (basic)
|
|
((name symbol)
|
|
(action basic)
|
|
(slot int8)
|
|
(trans vector :inline)
|
|
(normal vector :inline)
|
|
)
|
|
(:methods
|
|
(debug-draw (_type_) int)
|
|
(point-past-plane? (_type_ vector) symbol)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype lissajous (structure)
|
|
"A curve where the x and y position are set by two different sinusoids.
|
|
This stores the parameters and state for evaluating this curve."
|
|
((x-mag float)
|
|
(y-mag float)
|
|
(theta float)
|
|
(wx float)
|
|
(wy float)
|
|
(period-shift float)
|
|
(theta-rate float)
|
|
)
|
|
:pack-me
|
|
(:methods
|
|
(evaluate! (_type_ vector) vector)
|
|
)
|
|
)
|
|
|
|
|
|
(deftype lissajous-interp (structure)
|
|
"Handles interpolating between two different lissajous parameters, and also
|
|
stepping forward the dynamics."
|
|
((current lissajous :inline)
|
|
(dest lissajous :inline)
|
|
(rate lissajous :inline)
|
|
)
|
|
(:methods
|
|
(evaluate! (_type_ vector) vector)
|
|
(update! (_type_) float)
|
|
)
|
|
)
|