Files
jak-project/test/decompiler/reference/jak3/engine/game/effect-control-h_REF.gc
T
Hat Kid 2969833b2d decomp3: more engine stuff, detect non-virtual state inheritance (#3377)
- `speech`
- `ambient`
- `water-h`
- `vol-h`
- `generic-obs`
- `carry-h`
- `pilot-h`
- `board-h`
- `gun-h`
- `flut-h`
- `indax-h`
- `lightjak-h`
- `darkjak-h`
- `target-util`
- `history`
- `collide-reaction-target`
- `logic-target`
- `sidekick`
- `projectile`
- `voicebox`
- `ragdoll-edit`
- most of `ragdoll` (not added to gsrc yet)
- `curves`
- `find-nearest`
- `lightjak-wings`
- `target-handler`
- `target-anim`
- `target`
- `target2`
- `target-swim`
- `target-lightjak`
- `target-invisible`
- `target-death`
- `target-gun`
- `gun-util`
- `board-util`
- `target-board`
- `board-states`
- `mech-h`
- `vol`
- `vent`
- `viewer`
- `gem-pool`
- `collectables`
- `crates`
- `secrets-menu`

Additionally:

- Detection of non-virtual state inheritance
- Added a config file that allows overriding the process stack size set
by `stack-size-set!` calls
- Fix for integer multiplication with `r0`
- Fixed detection for the following macros:
	- `static-attack-info`
- `defpart` and `defpartgroup` (probably still needs adjustments, uses
Jak 2 implementation at the moment)
- `sound-play` (Jak 3 seems to always call `sound-play-by-name` with a
`sound-group` of 0, so the macro has been temporarily defaulted to use
that)

One somewhat significant change made here that should be noted is that
the return type of `process::init-from-entity!` was changed to `object`.
I've been thinking about this for a while, since it looks a bit nicer
without the `(none)` at the end and I have recently encountered init
methods that early return `0`.
2024-03-03 15:15:27 -05:00

72 lines
2.2 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type effect-control
(deftype effect-control (basic)
"An effect such as a particle with sound effects that plays during an animation."
((process process-drawable)
(flags effect-control-flag)
(last-frame-group art-joint-anim)
(last-frame-num float)
(channel-offset int32)
(res res-lump)
(name (pointer res-tag))
(param uint32)
)
(:methods
(new (symbol type process-drawable) _type_)
(effect-control-method-9 (_type_) none)
(do-effect (_type_ symbol float int) none)
(effect-control-method-11 () none)
(play-effect-sound (_type_ symbol float int basic sound-name) int)
(set-channel-offset! (_type_ int) none)
(effect-control-method-14 () none)
)
)
;; definition for method 3 of type effect-control
(defmethod inspect ((this effect-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tprocess: ~A~%" (-> this process))
(format #t "~1Tflags: #x~X~%" (-> this flags))
(format #t "~1Tlast-frame-group: ~A~%" (-> this last-frame-group))
(format #t "~1Tlast-frame-num: ~f~%" (-> this last-frame-num))
(format #t "~1Tchannel-offset: ~D~%" (-> this channel-offset))
(format #t "~1Tres: ~A~%" (-> this res))
(format #t "~1Tname: #x~X~%" (-> this name))
(format #t "~1Tparam: #x~X~%" (-> this param))
(label cfg-4)
this
)
;; definition for method 0 of type effect-control
(defmethod new effect-control ((allocation symbol) (type-to-make type) (proc process-drawable))
(cond
((res-lump-struct (-> proc draw jgeo extra) 'effect-name structure)
(let ((v0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> v0-1 process) proc)
(set! (-> v0-1 last-frame-group) #f)
v0-1
)
)
(else
(the-as effect-control #f)
)
)
)
;; definition for method 13 of type effect-control
;; WARN: Return type mismatch int vs none.
(defmethod set-channel-offset! ((this effect-control) (offset int))
(set! (-> this channel-offset) offset)
0
(none)
)
;; failed to figure out what this is:
0