Files
jak-project/test/decompiler/reference/jak2/engine/process-drawable/focus_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

71 lines
2.0 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type focus
(deftype focus (structure)
((handle handle :offset-assert 0)
(collide-with collide-spec :offset-assert 8)
)
:method-count-assert 13
:size-assert #xc
:flag-assert #xd0000000c
(:methods
(clear-focused (_type_) none 9)
(collide-check? (_type_ process-focusable) object 10)
(reset-to-collide-spec (_type_ collide-spec) none 11)
(try-update-focus (_type_ process-focusable) symbol 12)
)
)
;; definition for method 3 of type focus
(defmethod inspect focus ((this focus))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'focus)
(format #t "~1Thandle: ~D~%" (-> this handle))
(format #t "~1Tcollide-with: ~D~%" (-> this collide-with))
(label cfg-4)
this
)
;; definition for method 11 of type focus
;; WARN: Return type mismatch int vs none.
(defmethod reset-to-collide-spec focus ((this focus) (arg0 collide-spec))
(set! (-> this collide-with) arg0)
(set! (-> this handle) (the-as handle #f))
0
(none)
)
;; definition for method 10 of type focus
(defmethod collide-check? focus ((this focus) (arg0 process-focusable))
(when (and arg0 (not (logtest? (-> arg0 focus-status) (focus-status disable dead))))
(let* ((s5-0 (-> arg0 root))
(v1-2 (if (type? s5-0 collide-shape)
s5-0
)
)
)
(and v1-2 (logtest? (-> this collide-with) (-> v1-2 root-prim prim-core collide-as)))
)
)
)
;; definition for method 12 of type focus
(defmethod try-update-focus focus ((this focus) (arg0 process-focusable))
(when (!= (handle->process (-> this handle)) arg0)
(set! (-> this handle) (process->handle arg0))
#t
)
)
;; definition for method 9 of type focus
;; WARN: Return type mismatch int vs none.
(defmethod clear-focused focus ((this focus))
(set! (-> this handle) (the-as handle #f))
0
(none)
)