mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
cd68cb671e
Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
555 lines
23 KiB
Common Lisp
Vendored
Generated
555 lines
23 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type rigid-body-info
|
|
(deftype rigid-body-info (structure)
|
|
((mass float)
|
|
(inv-mass float)
|
|
(linear-damping float)
|
|
(angular-damping float)
|
|
(bounce-factor float)
|
|
(friction-factor float)
|
|
(bounce-mult-factor float)
|
|
(unknown-k1hbn23 float)
|
|
(cm-offset-joint vector :inline)
|
|
(inv-inertial-tensor matrix :inline)
|
|
(inertial-tensor matrix :inline)
|
|
(inertial-tensor-box meters 3)
|
|
)
|
|
(:methods
|
|
(rigid-body-info-method-9 (_type_) none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-info
|
|
(defmethod inspect ((this rigid-body-info))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'rigid-body-info)
|
|
(format #t "~1Tmass: ~f~%" (-> this mass))
|
|
(format #t "~1Tinv-mass: ~f~%" (-> this inv-mass))
|
|
(format #t "~1Tlinear-damping: ~f~%" (-> this linear-damping))
|
|
(format #t "~1Tangular-damping: ~f~%" (-> this angular-damping))
|
|
(format #t "~1Tbounce-factor: ~f~%" (-> this bounce-factor))
|
|
(format #t "~1Tfriction-factor: ~f~%" (-> this friction-factor))
|
|
(format #t "~1Tbounce-mult-factor: ~f~%" (-> this bounce-mult-factor))
|
|
(format #t "~1Tcm-offset-joint: ~`vector`P~%" (-> this cm-offset-joint))
|
|
(format #t "~1Tinv-inertial-tensor: #<matrix @ #x~X>~%" (-> this inv-inertial-tensor))
|
|
(format #t "~1Tinertial-tensor: #<matrix @ #x~X>~%" (-> this inertial-tensor))
|
|
(format #t "~1Tinertial-tensor-box[3] @ #x~X~%" (-> this inertial-tensor-box))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type rigid-body-object-extra-info
|
|
(deftype rigid-body-object-extra-info (structure)
|
|
((max-time-step float)
|
|
(gravity meters)
|
|
(idle-distance meters)
|
|
(attack-force-scale float)
|
|
)
|
|
:pack-me
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-object-extra-info
|
|
(defmethod inspect ((this rigid-body-object-extra-info))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'rigid-body-object-extra-info)
|
|
(format #t "~1Tmax-time-step: ~f~%" (-> this max-time-step))
|
|
(format #t "~1Tgravity: (meters ~m)~%" (-> this gravity))
|
|
(format #t "~1Tidle-distance: (meters ~m)~%" (-> this idle-distance))
|
|
(format #t "~1Tattack-force-scale: ~f~%" (-> this attack-force-scale))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type rigid-body-object-constants
|
|
(deftype rigid-body-object-constants (structure)
|
|
((info rigid-body-info :inline)
|
|
(cm-joint vector :inline :overlay-at (-> info cm-offset-joint))
|
|
(cm-joint-x meters :overlay-at (-> info cm-offset-joint data 0))
|
|
(cm-joint-y meters :overlay-at (-> info cm-offset-joint data 1))
|
|
(cm-joint-z meters :overlay-at (-> info cm-offset-joint data 2))
|
|
(cm-joint-w meters :overlay-at (-> info cm-offset-joint data 3))
|
|
(linear-damping float :overlay-at (-> info linear-damping))
|
|
(angular-damping float :overlay-at (-> info angular-damping))
|
|
(bounce-factor float :overlay-at (-> info bounce-factor))
|
|
(friction-factor float :overlay-at (-> info friction-factor))
|
|
(inertial-tensor-x meters :overlay-at (-> info inertial-tensor-box 0))
|
|
(inertial-tensor-y meters :overlay-at (-> info inertial-tensor-box 1))
|
|
(inertial-tensor-z meters :overlay-at (-> info inertial-tensor-box 2))
|
|
(extra rigid-body-object-extra-info :inline)
|
|
(name symbol)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-object-constants
|
|
(defmethod inspect ((this rigid-body-object-constants))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'rigid-body-object-constants)
|
|
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (-> this info))
|
|
(format #t "~1Tmass: ~f~%" (-> this info mass))
|
|
(format #t "~1Tinv-mass: ~f~%" (-> this info inv-mass))
|
|
(format #t "~1Tcm-joint-x: (meters ~m)~%" (-> this info cm-offset-joint x))
|
|
(format #t "~1Tcm-joint-y: (meters ~m)~%" (-> this info cm-offset-joint y))
|
|
(format #t "~1Tcm-joint-z: (meters ~m)~%" (-> this info cm-offset-joint z))
|
|
(format #t "~1Tlinear-damping: ~f~%" (-> this info linear-damping))
|
|
(format #t "~1Tangular-damping: ~f~%" (-> this info angular-damping))
|
|
(format #t "~1Tbounce-factor: ~f~%" (-> this info bounce-factor))
|
|
(format #t "~1Tfriction-factor: ~f~%" (-> this info friction-factor))
|
|
(format #t "~1Tinertial-tensor-x: (meters ~m)~%" (-> this inertial-tensor-x))
|
|
(format #t "~1Tinertial-tensor-y: (meters ~m)~%" (-> this inertial-tensor-y))
|
|
(format #t "~1Tinertial-tensor-z: (meters ~m)~%" (-> this inertial-tensor-z))
|
|
(format #t "~1Textra: #<rigid-body-object-extra-info @ #x~X>~%" (-> this extra))
|
|
(format #t "~1Tmax-time-step: ~f~%" (-> this extra max-time-step))
|
|
(format #t "~1Tgravity: (meters ~m)~%" (-> this extra gravity))
|
|
(format #t "~1Tidle-distance: (meters ~m)~%" (-> this extra idle-distance))
|
|
(format #t "~1Tattack-force-scale: ~f~%" (-> this extra attack-force-scale))
|
|
(format #t "~1Tname: ~A~%" (-> this name))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type rigid-body-impact
|
|
(deftype rigid-body-impact (structure)
|
|
((point vector :inline)
|
|
(normal vector :inline)
|
|
(velocity vector :inline)
|
|
(impulse float)
|
|
(pat pat-surface)
|
|
(rbody basic)
|
|
(prim-id uint32)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-impact
|
|
(defmethod inspect ((this rigid-body-impact))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'rigid-body-impact)
|
|
(format #t "~1Tpoint: ~`vector`P~%" (-> this point))
|
|
(format #t "~1Tnormal: ~`vector`P~%" (-> this normal))
|
|
(format #t "~1Tvelocity: ~`vector`P~%" (-> this velocity))
|
|
(format #t "~1Timpulse: ~f~%" (-> this impulse))
|
|
(format #t "~1Tpat: ~D~%" (-> this pat))
|
|
(format #t "~1Trbody: ~A~%" (-> this rbody))
|
|
(format #t "~1Tprim-id: ~D~%" (-> this prim-id))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type rigid-body
|
|
(deftype rigid-body (structure)
|
|
((work rigid-body-work)
|
|
(info rigid-body-info)
|
|
(flags rigid-body-flag)
|
|
(force-callback (function object float none))
|
|
(blocked-by rigid-body-object)
|
|
(time-remaining float)
|
|
(step-count int16)
|
|
(position vector :inline)
|
|
(rot vector :inline)
|
|
(rotation quaternion :inline :overlay-at (-> rot data 0))
|
|
(lin-momentum vector :inline)
|
|
(ang-momentum vector :inline)
|
|
(force vector :inline)
|
|
(torque vector :inline)
|
|
(lin-velocity vector :inline)
|
|
(ang-velocity vector :inline)
|
|
(matrix matrix :inline)
|
|
(inv-i-world matrix :inline)
|
|
)
|
|
(:methods
|
|
(rigid-body-method-9 (_type_ collide-shape-moving float) none)
|
|
(rigid-body-method-10 (_type_) none)
|
|
(rigid-body-method-11 (_type_ collide-shape-moving) none)
|
|
(rigid-body-method-12 (_type_ float) none)
|
|
(rigid-body-method-13 (_type_) none)
|
|
(rigid-body-method-14 (_type_ float) none)
|
|
(rigid-body-method-15 (_type_ collide-shape-moving float) none)
|
|
(clear-force-torque! (_type_) none)
|
|
(clear-momentum! (_type_) none)
|
|
(rigid-body-method-18 (_type_ vector vector) none)
|
|
(rigid-body-method-19 (_type_ vector vector) none)
|
|
(rigid-body-method-20 (_type_ vector) none)
|
|
(rigid-body-method-21 (_type_ vector vector float) none)
|
|
(rigid-body-method-22 (_type_ vector vector) vector)
|
|
(rigid-body-method-23 (_type_ vector) vector)
|
|
(rigid-body-method-24 (_type_) none)
|
|
(rigid-body-method-25 (_type_ rigid-body-info vector quaternion function) none)
|
|
(rigid-body-method-26 (_type_ vector quaternion) none)
|
|
(print-physics (_type_ object) none)
|
|
(print-force-torque (_type_ object) none)
|
|
(print-position-rotation (_type_ object) none)
|
|
(print-momentum (_type_ object) none)
|
|
(print-velocity (_type_ object) none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body
|
|
(defmethod inspect ((this rigid-body))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-16)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'rigid-body)
|
|
(format #t "~1Twork: ~A~%" (-> this work))
|
|
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (-> this info))
|
|
(format #t "~1Tflags: #x~X : (rigid-body-flag " (-> this flags))
|
|
(let ((s5-0 (-> this flags)))
|
|
(if (= (logand s5-0 (rigid-body-flag active)) (rigid-body-flag active))
|
|
(format #t "active ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag blocker)) (rigid-body-flag blocker))
|
|
(format #t "blocker ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag enable-physics)) (rigid-body-flag enable-physics))
|
|
(format #t "enable-physics ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag display-marks)) (rigid-body-flag display-marks))
|
|
(format #t "display-marks ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag enable-collision)) (rigid-body-flag enable-collision))
|
|
(format #t "enable-collision ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag debug)) (rigid-body-flag debug))
|
|
(format #t "debug ")
|
|
)
|
|
)
|
|
(format #t ")~%")
|
|
(format #t "~1Tforce-callback: ~A~%" (-> this force-callback))
|
|
(format #t "~1Tblocked-by: ~A~%" (-> this blocked-by))
|
|
(format #t "~1Ttime-remaining: ~f~%" (-> this time-remaining))
|
|
(format #t "~1Tstep-count: ~D~%" (-> this step-count))
|
|
(format #t "~1Tposition: ~`vector`P~%" (-> this position))
|
|
(format #t "~1Trot: ~`vector`P~%" (-> this rotation))
|
|
(format #t "~1Trotation: #<quaternion @ #x~X>~%" (-> this rotation))
|
|
(format #t "~1Tlin-momentum: ~`vector`P~%" (-> this lin-momentum))
|
|
(format #t "~1Tang-momentum: ~`vector`P~%" (-> this ang-momentum))
|
|
(format #t "~1Tforce: ~`vector`P~%" (-> this force))
|
|
(format #t "~1Ttorque: ~`vector`P~%" (-> this torque))
|
|
(format #t "~1Tlin-velocity: ~`vector`P~%" (-> this lin-velocity))
|
|
(format #t "~1Tang-velocity: ~`vector`P~%" (-> this ang-velocity))
|
|
(format #t "~1Tmatrix: #<matrix @ #x~X>~%" (-> this matrix))
|
|
(format #t "~1Tinv-i-world: #<matrix @ #x~X>~%" (-> this inv-i-world))
|
|
(label cfg-16)
|
|
this
|
|
)
|
|
|
|
;; definition of type rigid-body-control
|
|
(deftype rigid-body-control (basic)
|
|
((process process)
|
|
(state rigid-body :inline)
|
|
)
|
|
(:methods
|
|
(new (symbol type process) _type_)
|
|
(rigid-body-control-method-9 (_type_ collide-shape-moving float) none)
|
|
(rigid-body-control-method-10 (_type_ rigid-body-object float float) object)
|
|
(rigid-body-control-method-11 (_type_ collide-shape-moving) none)
|
|
(rigid-body-control-method-12 (_type_ float) none)
|
|
(rigid-body-control-method-13 (_type_) none)
|
|
(rigid-body-control-method-14 (_type_ float) none)
|
|
(clear-force-torque! (_type_) none)
|
|
(clear-momentum! (_type_) none)
|
|
(rigid-body-control-method-17 (_type_ vector vector) none)
|
|
(rigid-body-control-method-18 (_type_ vector vector) none)
|
|
(rigid-body-control-method-19 (_type_ vector) none)
|
|
(rigid-body-control-method-20 (_type_ vector vector float) none)
|
|
(rigid-body-control-method-21 (_type_ vector vector) vector)
|
|
(rigid-body-control-method-22 (_type_ vector) vector)
|
|
(rigid-body-control-method-23 (_type_) none)
|
|
(rigid-body-control-method-24 (_type_ rigid-body-info vector quaternion basic) none)
|
|
(rigid-body-control-method-25 (_type_ vector quaternion) none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-control
|
|
(defmethod inspect ((this rigid-body-control))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-16)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Tprocess: ~A~%" (-> this process))
|
|
(format #t "~1Tstate: #<rigid-body @ #x~X>~%" (-> this state))
|
|
(format #t "~1Twork: ~A~%" (-> this state work))
|
|
(format #t "~1Tinfo: #<rigid-body-info @ #x~X>~%" (-> this state info))
|
|
(format #t "~1Tflags: #x~X : (rigid-body-flag " (-> this state flags))
|
|
(let ((s5-0 (-> this state flags)))
|
|
(if (= (logand s5-0 (rigid-body-flag active)) (rigid-body-flag active))
|
|
(format #t "active ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag blocker)) (rigid-body-flag blocker))
|
|
(format #t "blocker ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag enable-physics)) (rigid-body-flag enable-physics))
|
|
(format #t "enable-physics ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag display-marks)) (rigid-body-flag display-marks))
|
|
(format #t "display-marks ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag enable-collision)) (rigid-body-flag enable-collision))
|
|
(format #t "enable-collision ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-flag debug)) (rigid-body-flag debug))
|
|
(format #t "debug ")
|
|
)
|
|
)
|
|
(format #t ")~%")
|
|
(format #t "~1Tforce-callback: ~A~%" (-> this state force-callback))
|
|
(format #t "~1Tblocked-by: ~A~%" (-> this state blocked-by))
|
|
(format #t "~1Ttime-remaining: ~f~%" (-> this state time-remaining))
|
|
(format #t "~1Tstep-count: ~D~%" (-> this state step-count))
|
|
(format #t "~1Tposition: ~`vector`P~%" (-> this state position))
|
|
(format #t "~1Trot: ~`vector`P~%" (-> this state rotation))
|
|
(format #t "~1Trotation: #<quaternion @ #x~X>~%" (-> this state rotation))
|
|
(format #t "~1Tlin-momentum: ~`vector`P~%" (-> this state lin-momentum))
|
|
(format #t "~1Tang-momentum: ~`vector`P~%" (-> this state ang-momentum))
|
|
(format #t "~1Tforce: ~`vector`P~%" (-> this state force))
|
|
(format #t "~1Ttorque: ~`vector`P~%" (-> this state torque))
|
|
(format #t "~1Tlin-velocity: ~`vector`P~%" (-> this state lin-velocity))
|
|
(format #t "~1Tang-velocity: ~`vector`P~%" (-> this state ang-velocity))
|
|
(format #t "~1Tmatrix: #<matrix @ #x~X>~%" (-> this state matrix))
|
|
(format #t "~1Tinv-i-world: #<matrix @ #x~X>~%" (-> this state inv-i-world))
|
|
(label cfg-16)
|
|
this
|
|
)
|
|
|
|
;; definition for method 9 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-9 ((this rigid-body-control) (arg0 collide-shape-moving) (arg1 float))
|
|
(rigid-body-method-9 (-> this state) arg0 arg1)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 10 of type rigid-body-control
|
|
;; WARN: Return type mismatch none vs object.
|
|
(defmethod rigid-body-control-method-10 ((this rigid-body-control) (arg0 rigid-body-object) (arg1 float) (arg2 float))
|
|
(rigid-body-method-10 (-> this state))
|
|
)
|
|
|
|
;; definition for method 11 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-11 ((this rigid-body-control) (arg0 collide-shape-moving))
|
|
(rigid-body-method-11 (-> this state) arg0)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 12 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-12 ((this rigid-body-control) (arg0 float))
|
|
(rigid-body-method-12 (-> this state) arg0)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 13 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-13 ((this rigid-body-control))
|
|
(rigid-body-method-13 (-> this state))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 14 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-14 ((this rigid-body-control) (arg0 float))
|
|
(rigid-body-method-14 (-> this state) arg0)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 15 of type rigid-body-control
|
|
(defmethod clear-force-torque! ((this rigid-body-control))
|
|
(clear-force-torque! (-> this state))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 16 of type rigid-body-control
|
|
(defmethod clear-momentum! ((this rigid-body-control))
|
|
(clear-momentum! (-> this state))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 17 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-17 ((this rigid-body-control) (arg0 vector) (arg1 vector))
|
|
(rigid-body-method-18 (-> this state) arg0 arg1)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 18 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-18 ((this rigid-body-control) (arg0 vector) (arg1 vector))
|
|
(rigid-body-method-19 (-> this state) arg0 arg1)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 19 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-19 ((this rigid-body-control) (arg0 vector))
|
|
(rigid-body-method-20 (-> this state) arg0)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 20 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-20 ((this rigid-body-control) (arg0 vector) (arg1 vector) (arg2 float))
|
|
(rigid-body-method-21 (-> this state) arg0 arg1 arg2)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-21 ((this rigid-body-control) (arg0 vector) (arg1 vector))
|
|
(rigid-body-method-22 (-> this state) arg0 arg1)
|
|
)
|
|
|
|
;; definition for method 22 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-22 ((this rigid-body-control) (arg0 vector))
|
|
(rigid-body-method-23 (-> this state) arg0)
|
|
)
|
|
|
|
;; definition for method 23 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-23 ((this rigid-body-control))
|
|
(rigid-body-method-24 (-> this state))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 24 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-24 ((this rigid-body-control) (arg0 rigid-body-info) (arg1 vector) (arg2 quaternion) (arg3 basic))
|
|
(rigid-body-method-25 (-> this state) arg0 arg1 arg2 (the-as function arg3))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 25 of type rigid-body-control
|
|
(defmethod rigid-body-control-method-25 ((this rigid-body-control) (arg0 vector) (arg1 quaternion))
|
|
(rigid-body-method-26 (-> this state) arg0 arg1)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type rigid-body-object
|
|
(deftype rigid-body-object (process-focusable)
|
|
((root collide-shape-moving :override)
|
|
(info rigid-body-object-constants)
|
|
(flags rigid-body-object-flag)
|
|
(max-time-step float)
|
|
(incoming-attack-id uint32)
|
|
(player-touch-time time-frame)
|
|
(disturbed-time time-frame)
|
|
(player-force-position vector :inline)
|
|
(player-force vector :inline)
|
|
)
|
|
(:state-methods
|
|
idle
|
|
active
|
|
)
|
|
(:methods
|
|
(rigid-body-object-method-29 (_type_ float) none)
|
|
(rigid-body-object-method-30 (_type_) none)
|
|
(alloc-and-init-rigid-body-control (_type_ rigid-body-object-constants) none)
|
|
(allocate-and-init-cshape (_type_) none)
|
|
(init-skel-and-rigid-body (_type_) none)
|
|
(rigid-body-object-method-34 (_type_) none)
|
|
(rigid-body-object-method-35 (_type_) none)
|
|
(do-engine-sounds (_type_) none)
|
|
(rigid-body-object-method-37 (_type_) none)
|
|
(rigid-body-object-method-38 (_type_) none)
|
|
(rigid-body-object-method-39 (_type_) none)
|
|
(rigid-body-object-method-40 (_type_) none)
|
|
(rigid-body-object-method-41 (_type_) none)
|
|
(rigid-body-object-method-42 (_type_) none :behavior rigid-body-object)
|
|
(rigid-body-object-method-43 (_type_) none)
|
|
(apply-damage (_type_ float rigid-body-impact) none)
|
|
(rigid-body-object-method-45 (_type_ rigid-body-impact) none)
|
|
(rigid-body-object-method-46 (_type_ process-drawable int symbol event-message-block) object :behavior rigid-body-object)
|
|
(rigid-body-object-method-47 (_type_ process-drawable attack-info touching-shapes-entry penetrate) symbol)
|
|
(rigid-body-object-method-48 (_type_ process-focusable touching-shapes-entry) symbol)
|
|
(rigid-body-object-method-49 (_type_ rigid-body-impact touching-shapes-entry) none)
|
|
(rigid-body-object-method-50 (_type_ float) none)
|
|
(rigid-body-object-method-51 (_type_) none)
|
|
(rigid-body-object-method-52 (_type_) none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-object
|
|
(defmethod inspect ((this rigid-body-object))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-22)
|
|
)
|
|
(let ((t9-0 (method-of-type process-focusable inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Tinfo: #<rigid-body-object-constants @ #x~X>~%" (-> this info))
|
|
(format #t "~2Tflags: #x~X : (rigid-body-object-flag " (-> this flags))
|
|
(let ((s5-0 (-> this flags)))
|
|
(if (= (logand s5-0 (rigid-body-object-flag dead)) (rigid-body-object-flag dead))
|
|
(format #t "dead ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag damaged)) (rigid-body-object-flag damaged))
|
|
(format #t "damaged ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag player-contact-force)) (rigid-body-object-flag player-contact-force))
|
|
(format #t "player-contact-force ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag disturbed)) (rigid-body-object-flag disturbed))
|
|
(format #t "disturbed ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag enable-collision)) (rigid-body-object-flag enable-collision))
|
|
(format #t "enable-collision ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag player-edge-grabbing)) (rigid-body-object-flag player-edge-grabbing))
|
|
(format #t "player-edge-grabbing ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag player-touching)) (rigid-body-object-flag player-touching))
|
|
(format #t "player-touching ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag player-standing-on)) (rigid-body-object-flag player-standing-on))
|
|
(format #t "player-standing-on ")
|
|
)
|
|
(if (= (logand s5-0 (rigid-body-object-flag player-impulse-force)) (rigid-body-object-flag player-impulse-force))
|
|
(format #t "player-impulse-force ")
|
|
)
|
|
)
|
|
(format #t ")~%")
|
|
(format #t "~2Tmax-time-step: ~f~%" (-> this max-time-step))
|
|
(format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id))
|
|
(format #t "~2Tplayer-touch-time: ~D~%" (-> this player-touch-time))
|
|
(format #t "~2Tdisturbed-time: ~D~%" (-> this disturbed-time))
|
|
(format #t "~2Tplayer-force-position: #<vector @ #x~X>~%" (-> this player-force-position))
|
|
(format #t "~2Tplayer-force: #<vector @ #x~X>~%" (-> this player-force))
|
|
(label cfg-22)
|
|
this
|
|
)
|
|
|
|
;; definition of type rigid-body-queue
|
|
(deftype rigid-body-queue (structure)
|
|
((count int8)
|
|
(array handle 128 :offset 8)
|
|
)
|
|
(:methods
|
|
(rigid-body-queue-method-9 (_type_) none)
|
|
(rigid-body-queue-method-10 (_type_) none)
|
|
(rigid-body-queue-method-11 (_type_ rigid-body-object) none)
|
|
(rigid-body-queue-method-12 (_type_ int int) none)
|
|
(rigid-body-queue-method-13 (_type_ int rigid-body-object) none)
|
|
(rigid-body-queue-method-14 (_type_ int) none)
|
|
(rigid-body-queue-method-15 (_type_ rigid-body-object) none)
|
|
(validate (_type_) symbol)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type rigid-body-queue
|
|
(defmethod inspect ((this rigid-body-queue))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this 'rigid-body-queue)
|
|
(format #t "~1Tcount: ~D~%" (-> this count))
|
|
(format #t "~1Tarray[128] @ #x~X~%" (-> this array))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|