2022-06-30 01:22:51 -04:00
|
|
|
;;-*-Lisp-*-
|
|
|
|
(in-package goal)
|
|
|
|
|
|
|
|
;; name: chain-physics-h.gc
|
|
|
|
;; name in dgo: chain-physics-h
|
|
|
|
;; dgos: ENGINE, GAME
|
|
|
|
|
2022-08-05 16:12:54 -04:00
|
|
|
;; DECOMP BEGINS
|
|
|
|
|
2022-08-24 00:29:51 -04:00
|
|
|
(deftype chain-physics-setup (structure)
|
2023-10-29 23:20:02 -04:00
|
|
|
((joint-index int32)
|
2022-08-24 00:29:51 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2022-09-02 18:13:38 -04:00
|
|
|
|
2022-08-24 00:29:51 -04:00
|
|
|
(deftype chain-physics-joint (structure)
|
2023-10-29 23:20:02 -04:00
|
|
|
((position vector :inline)
|
|
|
|
(velocity vector :inline)
|
|
|
|
(old-x vector :inline)
|
|
|
|
(joint-mod joint-mod)
|
2022-08-24 00:29:51 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2022-09-02 18:13:38 -04:00
|
|
|
|
2022-08-24 00:29:51 -04:00
|
|
|
(deftype chain-physics (basic)
|
2023-10-29 23:20:02 -04:00
|
|
|
((chain-joints chain-physics-joint 20 :inline)
|
|
|
|
(num-joints uint8)
|
|
|
|
(root-joint-index uint8)
|
|
|
|
(joint-length float)
|
|
|
|
(gravity vector :inline)
|
|
|
|
(gravity-target vector :inline)
|
|
|
|
(stretch-vel float)
|
|
|
|
(stretch-vel-parallel float)
|
|
|
|
(compress-vel float)
|
|
|
|
(compress-vel-parallel float)
|
|
|
|
(negate-y symbol)
|
|
|
|
(axial-slop float)
|
|
|
|
(maximum-stretch float)
|
|
|
|
(turn-off-start time-frame)
|
|
|
|
(turn-off-duration time-frame)
|
2022-08-24 00:29:51 -04:00
|
|
|
)
|
|
|
|
(:methods
|
2023-10-29 23:20:02 -04:00
|
|
|
(initialize-chain-joints (_type_) symbol)
|
|
|
|
(turn-off (_type_ time-frame) none :behavior process)
|
|
|
|
(update (_type_ process-drawable) none :behavior process)
|
|
|
|
(gravity-update (_type_ process-drawable) none)
|
|
|
|
(apply-gravity (_type_ vector int process-drawable) none :behavior process)
|
|
|
|
(chain-physics-method-14 (_type_ vector int) none)
|
|
|
|
(clamp-length (_type_ vector vector object process-drawable) vector)
|
|
|
|
(chain-physics-method-16 (_type_ int) float)
|
|
|
|
(chain-physics-method-17 (_type_ vector int) none)
|
2022-08-24 00:29:51 -04:00
|
|
|
)
|
|
|
|
)
|