mirror of
https://github.com/open-goal/jak-project
synced 2026-05-24 15:21:12 -04:00
24578b64b9
* hardcode `time-frame`things * Update cam-states_REF.gc * Update level-info_REF.gc * update refs 1 * update refs 2 * update refs 3 * update refs 4 * update refs 5 * update detection and casting * Update FormExpressionAnalysis.cpp * update refs 6 * update mood decomp * update refs 7 * update refs 8 * remove temp entity birth code * update time-frame casts * fix compiler * hardcode stuff and fix some types * fix some bitfield detection being wrong * bug fixes * detect seconds on adds with immediate * update refs 9 * fix casts and rand-vu-int-range bugs (update refs 10) * update refs 11 * update 12 * update 13 * update 14 * Update game-info_REF.gc * improve cpad macros detection * remove unused code * update refs * clang * update source code * Update cam-states.gc * `lavatube-energy` finish * update refs * fix actor bank stuff * Update navigate.gc * reduce entity default stack size * Update transformq-h.gc * oops forgot these * fix code and tests * fix mood sound stuff * Update load-dgo.gc * Update README.md
66 lines
2.2 KiB
Common Lisp
Vendored
Generated
66 lines
2.2 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type dynamics
|
|
(deftype dynamics (basic)
|
|
((name basic :offset-assert 4)
|
|
(gravity-max meters :offset-assert 8)
|
|
(gravity-length meters :offset-assert 12)
|
|
(gravity vector :inline :offset-assert 16)
|
|
(gravity-normal vector :inline :offset-assert 32)
|
|
(walk-distance meters :offset-assert 48)
|
|
(run-distance meters :offset-assert 52)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x38
|
|
:flag-assert #x900000038
|
|
)
|
|
|
|
;; definition for method 3 of type dynamics
|
|
(defmethod inspect dynamics ((obj dynamics))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Tname: ~A~%" (-> obj name))
|
|
(format #t "~Tgravity-max: (meters ~m)~%" (-> obj gravity-max))
|
|
(format #t "~Tgravity-length: (meters ~m)~%" (-> obj gravity-length))
|
|
(format #t "~Tgravity: ~`vector`P~%" (-> obj gravity))
|
|
(format #t "~Tgravity-normal: ~`vector`P~%" (-> obj gravity-normal))
|
|
(format #t "~Twalk-distance: (meters ~m)~%" (-> obj walk-distance))
|
|
(format #t "~Trun-distance: (meters ~m)~%" (-> obj run-distance))
|
|
obj
|
|
)
|
|
|
|
;; definition for function time-to-apex
|
|
(defun time-to-apex ((arg0 float) (arg1 float))
|
|
(the int (/ arg0 (- (* 0.0033333334 arg1))))
|
|
)
|
|
|
|
;; definition for function time-to-ground
|
|
(defun time-to-ground ((arg0 float) (arg1 float) (arg2 float))
|
|
(let ((f0-0 0.0)
|
|
(v0-0 0)
|
|
)
|
|
(while (< (- arg2) f0-0)
|
|
(set! arg0 (- arg0 (* 0.0033333334 arg1)))
|
|
(+! f0-0 (* 0.0033333334 arg0))
|
|
(+! v0-0 1)
|
|
)
|
|
v0-0
|
|
)
|
|
)
|
|
|
|
;; definition for symbol *standard-dynamics*, type dynamics
|
|
(define *standard-dynamics* (new 'static 'dynamics
|
|
:name 'standard
|
|
:gravity-max (meters 40)
|
|
:gravity-length (meters 60)
|
|
:gravity
|
|
(new 'static 'vector :y 245760.0 :w 1.0)
|
|
:gravity-normal (new 'static 'vector :y 1.0 :w 1.0)
|
|
:walk-distance (meters 2)
|
|
:run-distance (meters 5)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|