Files
Hat Kid 5a8b4e81f9 decomp3: more engine stuff, support boxed stack arrays in compiler (#3424)
- `sync-info`
- `trajectory`
- `camera`
- `cam-update`
- `cam-states`
- `cam-states-dbg`
- `cam-master`
- `cam-layout`
- `cam-interface`
- `cam-combiner`

Closes #2016
2024-03-15 20:28:26 -04:00

131 lines
3.7 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: trajectory-h.gc
;; name in dgo: trajectory-h
;; dgos: GAME
;; DECOMP BEGINS
(deftype trajectory (structure)
((initial-position vector :inline)
(initial-velocity vector :inline)
(time float)
(gravity meters)
)
(:methods
(compute-trans-at-time (_type_ float vector) vector)
(compute-transv-at-time (_type_ float vector) vector)
(compute-time-until-apex (_type_) float)
(setup-from-to-duration! (_type_ vector vector float float) none)
(setup-from-to-xz-vel! (_type_ vector vector float float) none)
(setup-from-to-y-vel! (_type_ vector vector float float) none)
(setup-from-to-height! (_type_ vector vector float float) none)
(setup-from-to-duration-and-height! (_type_ vector vector float float) none)
(debug-draw (_type_) none)
)
)
(deftype impact-control (structure)
((process (pointer process-drawable))
(radius meters)
(joint int32)
(collide-with collide-spec)
(start-time uint64)
(trans vector 2 :inline)
(dir vector :inline)
)
(:methods
(new (symbol type process-drawable int float collide-spec) _type_)
(initialize (_type_ process-drawable int float collide-spec) impact-control)
(update-from-cspace (_type_) none)
(impact-control-method-11 (_type_ collide-query process pat-surface) float)
)
)
(defmethod new impact-control ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 int) (arg2 float) (arg3 collide-spec))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
((method-of-type impact-control initialize)
(the-as impact-control (t9-0 allocation v1-1))
arg0
arg1
arg2
arg3
)
)
)
(deftype point-tracker (structure)
((trans vector 2 :inline)
)
(:methods
(new (symbol type vector vector) _type_)
(initialize (_type_ vector vector) point-tracker)
(point-tracker-method-10 (_type_ vector vector vector float) vector)
(point-tracker-method-11 (_type_ vector vector vector float) vector)
)
)
(defmethod new point-tracker ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 vector))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
((method-of-type point-tracker initialize) (the-as point-tracker (t9-0 allocation v1-1)) arg0 arg1)
)
)
(deftype combo-tracker (point-tracker)
((target handle)
(move-start-time time-frame)
)
(:methods
(combo-tracker-method-12 (_type_ vector vector process time-frame) combo-tracker)
(combo-tracker-method-13 (_type_ handle vector float vector float) process-focusable)
)
)
(deftype traj2d-params (structure)
((x float)
(y float)
(gravity float)
(initial-tilt float)
(initial-speed float)
(time float)
)
)
(deftype traj3d-params (structure)
((gravity float)
(initial-tilt float)
(initial-speed float)
(time float)
(src vector :inline)
(dest vector :inline)
(diff vector :inline)
(initial-velocity vector :inline)
)
)
(deftype cubic-curve (structure)
((mat matrix :inline)
(vec vector 4 :inline :overlay-at (-> mat data 0))
)
(:methods
(cubic-curve-method-9 (_type_ vector vector vector vector) none)
(cubic-curve-method-10 (_type_ vector float) vector)
(cubic-curve-method-11 (_type_ vector float) vector)
(cubic-curve-method-12 (_type_ vector float) vector)
(debug-draw-curve (_type_) none)
)
)