[decomp] game-info (#779)

* support more process stuff

* more of game info

* add ref file

* progress on save
This commit is contained in:
water111
2021-08-22 20:12:47 -04:00
committed by GitHub
parent 30d1e1d6c9
commit 403bb5f4de
117 changed files with 6234 additions and 2243 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
(rotv vector :inline :offset-assert 80)
(scalev vector :inline :offset-assert 96)
(dir-targ quaternion :inline :offset-assert 112)
(angle-change-time uint64 :offset-assert 128)
(angle-change-time int64 :offset-assert 128)
(old-y-angle-diff float :offset-assert 136)
)
:method-count-assert 28
+10 -11
View File
@@ -51,15 +51,15 @@
(defmethod seek-toward-heading-vec! trsqv ((obj trsqv) (dir vector) (vel float) (frame-count int))
"Adjust the orientation to point along dir, only changing our yaw.
The vel is a maximum velocity limit.
The frame count is the time constant (first order).
There's some logic to avoid rapidly changing directions"
The vel is a maximum velocity limit.
The frame count is the time constant (first order).
There's some logic to avoid rapidly changing directions"
(let* ((yaw-error (deg-diff (quaternion-y-angle (-> obj quat)) (vector-y-angle dir)))
;; limit both on a max velocity, and a proportional to error term.
(yaw-limit (fmin (* vel (-> *display* seconds-per-frame))
(/ (* 5.0 (fabs yaw-error)) (the float frame-count))
)
)
)
;; saturate the yaw error
(saturated-yaw (fmax (fmin yaw-error yaw-limit) (- yaw-limit)))
)
@@ -71,10 +71,9 @@
((or (= old-diff 0.0)
(and (< 0.0 saturated-yaw) (< 0.0 old-diff))
(or (and (< saturated-yaw 0.0) (< old-diff 0.0))
(>= (the-as int (- (-> *display* base-frame-counter)
(-> obj angle-change-time)
)
)
(>= (- (-> *display* base-frame-counter)
(-> obj angle-change-time)
)
60
)
)
@@ -83,9 +82,9 @@
saturated-yaw
)
(else
;; not sure why this isn't 0.
(* 0.000000001 saturated-yaw)
)
;; not sure why this isn't 0.
(* 0.000000001 saturated-yaw)
)
)
)
)