Files
jak-project/test/decompiler/reference/jak3/engine/common-obs/projectile-h_REF.gc
T
Hat Kid dacb704ef6 decomp3: more engine stuff, fix ja macro detection for jak 2/3, unmerged let matcher, part-tracker-spawn macro (#3436)
- `aligner`
- `effect-control`
- `pov-camera`
- `powerups`
- `los-control-h`
- `airlock`
- `water-anim`
- `blocking-plane`
- `proc-focusable-spawner`
- `idle-control`
- `enemy-h`
- `nav-enemy-h`
- `enemy`
- `enemy-states`
- `particle-curves`
- `base-plat`
- `plat`
- `bouncer`
- `elevator`
- `rigid-body`
- `rigid-body-queue`
- `process-taskable`
- `scene-actor`
- `warp-gate`
- `guard-projectile`
- `metalhead-projectile`
- `los-control`
- `joint-exploder`
- `ragdoll-test`
- `debris`
- `shield-sphere`
- `text`
- `target-launch`
2024-03-30 10:28:02 -04:00

206 lines
7.9 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type projectile
(deftype projectile (process-drawable)
((parent (pointer process-drawable) :override)
(root collide-shape-moving :override)
(starting-pos vector :inline)
(starting-dir vector :inline)
(target-pos vector :inline)
(base-target-pos vector :inline)
(pre-move-transv vector :inline)
(timeout time-frame)
(spawn-time time-frame)
(options projectile-options)
(last-target handle)
(notify-handle handle)
(owner-handle handle)
(ignore-handle handle)
(update-velocity (function projectile none))
(move (function projectile none))
(pick-target (function projectile none))
(max-speed float)
(old-dist float 16)
(old-dist-count int32)
(hits int32)
(max-hits int32)
(tween float)
(attack-mode symbol)
(attack-id uint32)
(damage float)
(vehicle-damage-factor float)
(vehicle-impulse-factor float)
(charge-level float)
(sound-id sound-id)
(stop-speed meters)
(invinc-time time-frame)
(desired-target handle)
(desired-target-pos vector :inline)
)
(:state-methods
die
dissipate
impact
moving
)
(:methods
(projectile-method-24 (_type_) none)
(projectile-method-25 (_type_) none)
(projectile-method-26 (_type_) none)
(projectile-method-27 (_type_) none)
(play-impact-sound (_type_ projectile-options) none)
(projectile-method-29 (_type_) none)
(setup-collision! (_type_) none)
(init-proj-settings! (_type_) none)
(projectile-method-32 (_type_) none)
(go-impact! (_type_) none)
(projectile-method-34 (_type_) none)
(proj-event-handler (_type_ process int symbol event-message-block) object)
(handle-proj-hit! (_type_ process event-message-block) object)
(deal-damage! (_type_ process event-message-block) symbol)
(made-impact? (_type_) symbol)
(projectile-method-39 (_type_) none)
(projectile-method-40 (_type_) int)
)
)
;; definition for method 3 of type projectile
(defmethod inspect ((this projectile))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tstarting-pos: ~`vector`P~%" (-> this starting-pos))
(format #t "~2Tstarting-dir: ~`vector`P~%" (-> this starting-dir))
(format #t "~2Ttarget-pos: ~`vector`P~%" (-> this target-pos))
(format #t "~2Tbase-target-pos: ~`vector`P~%" (-> this base-target-pos))
(format #t "~2Tpre-move-transv: ~`vector`P~%" (-> this pre-move-transv))
(format #t "~2Ttimeout: ~D~%" (-> this timeout))
(format #t "~2Tspawn-time: ~D~%" (-> this spawn-time))
(format #t "~2Toptions: ~D~%" (-> this options))
(format #t "~2Tlast-target: ~D~%" (-> this last-target))
(format #t "~2Tnotify-handle: ~D~%" (-> this notify-handle))
(format #t "~2Towner-handle: ~D~%" (-> this owner-handle))
(format #t "~2Tignore-handle: ~D~%" (-> this ignore-handle))
(format #t "~2Tupdate-velocity: ~A~%" (-> this update-velocity))
(format #t "~2Tmove: ~A~%" (-> this move))
(format #t "~2Tpick-target: ~A~%" (-> this pick-target))
(format #t "~2Tmax-speed: ~f~%" (-> this max-speed))
(format #t "~2Told-dist[16] @ #x~X~%" (-> this old-dist))
(format #t "~2Told-dist-count: ~D~%" (-> this old-dist-count))
(format #t "~2Thits: ~D~%" (-> this hits))
(format #t "~2Tmax-hits: ~D~%" (-> this max-hits))
(format #t "~2Ttween: ~f~%" (-> this tween))
(format #t "~2Tattack-mode: ~A~%" (-> this attack-mode))
(format #t "~2Tattack-id: ~D~%" (-> this attack-id))
(format #t "~2Tdamage: ~f~%" (-> this damage))
(format #t "~2Tvehicle-damage-factor: ~f~%" (-> this vehicle-damage-factor))
(format #t "~2Tvehicle-impulse-factor: ~f~%" (-> this vehicle-impulse-factor))
(format #t "~2Tcharge-level: ~f~%" (-> this charge-level))
(format #t "~2Tsound-id: ~D~%" (-> this sound-id))
(format #t "~2Tstop-speed: (meters ~m)~%" (-> this stop-speed))
(format #t "~2Tinvinc-time: ~D~%" (-> this invinc-time))
(format #t "~2Tdesired-target: ~D~%" (-> this desired-target))
(format #t "~2Tdesired-target-pos: #<vector @ #x~X>~%" (-> this desired-target-pos))
(label cfg-4)
this
)
;; definition of type projectile-init-by-other-params
(deftype projectile-init-by-other-params (structure)
((pos vector :inline)
(vel vector :inline)
(target-pos vector :inline)
(target-handle handle)
(ent entity)
(charge float)
(attack-id uint32)
(options projectile-options)
(notify-handle handle)
(owner-handle handle)
(ignore-handle handle)
(timeout time-frame)
(damage float)
(vehicle-damage-factor float)
(vehicle-impulse-factor float)
)
)
;; definition for method 3 of type projectile-init-by-other-params
(defmethod inspect ((this projectile-init-by-other-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'projectile-init-by-other-params)
(format #t "~1Tpos: #<vector @ #x~X>~%" (-> this pos))
(format #t "~1Tvel: #<vector @ #x~X>~%" (-> this vel))
(format #t "~1Ttarget-pos: #<vector @ #x~X>~%" (-> this target-pos))
(format #t "~1Ttarget-handle: ~D~%" (-> this target-handle))
(format #t "~1Tent: ~A~%" (-> this ent))
(format #t "~1Tcharge: ~f~%" (-> this charge))
(format #t "~1Tattack-id: ~D~%" (-> this attack-id))
(format #t "~1Toptions: ~D~%" (-> this options))
(format #t "~1Tnotify-handle: ~D~%" (-> this notify-handle))
(format #t "~1Towner-handle: ~D~%" (-> this owner-handle))
(format #t "~1Tignore-handle: ~D~%" (-> this ignore-handle))
(format #t "~1Ttimeout: ~D~%" (-> this timeout))
(format #t "~1Tdamage: ~f~%" (-> this damage))
(format #t "~1Tvehicle-damage-factor: ~f~%" (-> this vehicle-damage-factor))
(format #t "~1Tvehicle-impulse-factor: ~f~%" (-> this vehicle-impulse-factor))
(label cfg-4)
this
)
;; definition for function spawn-projectile
(defun spawn-projectile ((proj-type type) (params projectile-init-by-other-params) (parent-proc-tree process-tree) (pool dead-pool))
"Create a new process for a projectile of the given type."
(let ((s4-0 (get-process pool proj-type #x4000 1)))
(when s4-0
(let ((t9-1 (method-of-type process activate)))
(t9-1 s4-0 parent-proc-tree "projectile" (the-as pointer #x70004000))
)
(run-now-in-process s4-0 projectile-init-by-other params)
(-> s4-0 ppointer)
)
)
)
;; definition of type projectile-bounce
(deftype projectile-bounce (projectile)
((played-bounce-time time-frame)
(tumble-quat quaternion :inline)
(gravity float)
)
(:state-methods
sitting
)
(:methods
(projectile-bounce-method-42 (_type_) none)
(projectile-bounce-method-43 (_type_) none)
)
)
;; definition for method 3 of type projectile-bounce
(defmethod inspect ((this projectile-bounce))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type projectile inspect)))
(t9-0 this)
)
(format #t "~2Tplayed-bounce-time: ~D~%" (-> this played-bounce-time))
(format #t "~2Ttumble-quat: #<quaternion @ #x~X>~%" (-> this tumble-quat))
(format #t "~2Tgravity: ~f~%" (-> this gravity))
(label cfg-4)
this
)
;; failed to figure out what this is:
0