Files
jak-project/test/decompiler/reference/jak2/engine/game/effect-control-h_REF.gc
T
Hat Kid fc43870d85 decompiler: obj -> this, set-time! and time-elapsed? macros (#3026)
This renames the method object in `defmethod`s to `this` and adds
detection for the `set-time!` and `time-elapsed?` macros.

Definitely my biggest PR yet...
2023-09-26 15:17:00 +01:00

74 lines
2.5 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type effect-control
(deftype effect-control (basic)
((process process-drawable :offset-assert 4)
(flags effect-control-flag :offset-assert 8)
(last-frame-group art-joint-anim :offset-assert 12)
(last-frame-num float :offset-assert 16)
(channel-offset int32 :offset-assert 20)
(res res-lump :offset-assert 24)
(name (pointer res-tag) :offset-assert 28)
(param uint32 :offset-assert 32)
)
:method-count-assert 15
:size-assert #x24
:flag-assert #xf00000024
(:methods
(new (symbol type process-drawable) _type_ 0)
(update-effects (_type_) none 9)
(do-effect (_type_ symbol float int) none 10)
(do-effect-for-surface (_type_ symbol float int basic pat-surface) none 11)
(play-effect-sound (_type_ symbol float int basic sound-name) int 12)
(set-channel-offset! (_type_ int) none 13)
(play-effects-from-res-lump (_type_ float float float) none 14)
)
)
;; definition for method 3 of type effect-control
(defmethod inspect effect-control ((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) (arg0 process-drawable))
(cond
((res-lump-struct (-> arg0 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) arg0)
(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! effect-control ((this effect-control) (arg0 int))
(set! (-> this channel-offset) arg0)
0
(none)
)
;; failed to figure out what this is:
0