Files
jak-project/test/decompiler/reference/jak2/engine/process-drawable/simple-focus_REF.gc
T
2022-10-08 12:42:52 -04:00

77 lines
2.2 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type simple-focus
(deftype simple-focus (process-focusable)
((first-time? symbol :offset-assert 204)
)
:heap-base #x50
:method-count-assert 28
:size-assert #xd0
:flag-assert #x1c005000d0
(:methods
(idle () _type_ :state 27)
)
)
;; definition for method 3 of type simple-focus
(defmethod inspect simple-focus ((obj simple-focus))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 obj)
)
(format #t "~2Tfirst-time?: ~A~%" (-> obj first-time?))
(label cfg-4)
obj
)
;; definition for method 20 of type simple-focus
(defmethod get-trans simple-focus ((obj simple-focus) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
(-> obj root trans)
)
;; definition for method 12 of type simple-focus
(defmethod run-logic? simple-focus ((obj simple-focus))
(when (-> obj first-time?)
(set! (-> obj first-time?) #f)
#t
)
)
;; failed to figure out what this is:
(defstate idle (simple-focus)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(let ((v1-0 event-type))
(the-as object (when (= v1-0 'move-trans)
(let ((v0-0 (-> self root trans)))
(set! (-> v0-0 quad) (-> (the-as vector (-> event param 0)) quad))
v0-0
)
)
)
)
)
:code (the-as (function none :behavior simple-focus) sleep-code)
)
;; definition for function simple-focus-init-by-other
;; WARN: Return type mismatch object vs none.
(defbehavior simple-focus-init-by-other simple-focus ()
"Initializes the new [[simple-focus]]. `first-time?` will be set to [[#t]]"
(let ((root (new 'process 'trsqv)))
(set! (-> self root) root)
(vector-identity! (-> root scale))
(quaternion-identity! (-> root quat))
)
(logclear! (-> self mask) (process-mask enemy))
(set! (-> self first-time?) #t)
(set! (-> self event-hook) (-> (method-of-object self idle) event))
(go-virtual idle)
(none)
)