Files
jak-project/goal_src/jak2/engine/process-drawable/process-focusable.gc
T
Hat Kid 24590ec670 decomp: water-h, pilot-h, gun-h and board-h types (#1801)
* decomp: `water-h`, `pilot-h`, `gun-h` and `board-h` types

* update ref test

* fix arg type

* address changes
2022-08-26 14:57:32 -04:00

125 lines
2.7 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: process-focusable.gc
;; name in dgo: process-focusable
;; dgos: ENGINE, GAME
(defenum focus-status
:bitfield #t
:type uint32
(fs0 0) ;; if set, all collide checks fail
(fs1 1) ;; if set, all collide checks fail
(fs2 2)
(fs3 3)
(fs4 4)
(fs5 5)
(fs6 6)
(fs7 7)
(fs8 8)
(fs9 9)
(fs10 10)
(fs11 11)
(fs12 12)
(fs13 13)
(fs14 14)
(fs15 15)
(fs16 16)
(fs17 17)
(fs18 18)
(fs19 19)
(fs20 20)
(fs21 21)
(fs22 22)
(fs23 23)
(fs24 24)
(fs25 25)
(fs26 26)
(fs27 27)
(fs28 28)
(fs29 29)
(fs30 30)
(fs31 31)
)
;; DECOMP BEGINS
(deftype process-focusable (process-drawable)
((focus-status focus-status :offset-assert 200)
)
:heap-base #x50
:method-count-assert 27
:size-assert #xcc
:flag-assert #x1b005000cc
(:methods
(get-trans (_type_ int) vector 20)
(get-quat (_type_) quaternion 21)
(get-transv (_type_) vector 22)
(process-focusable-method-23 (_type_) none 23)
(process-focusable-method-24 (_type_) none 24)
(process-focusable-method-25 (_type_) none 25)
(process-focusable-method-26 (_type_) none 26)
)
)
(defmethod inspect process-focusable ((obj process-focusable))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tfocus-status: ~D~%" (-> obj focus-status))
(label cfg-4)
obj
)
(defmethod get-trans process-focusable ((obj process-focusable) (arg0 int))
(let ((gp-0 (-> obj root)))
(the-as vector (cond
((zero? arg0)
(-> gp-0 trans)
)
((and (= arg0 1) (type? gp-0 collide-shape-moving))
(-> (the-as collide-shape-moving gp-0) gspot-pos)
)
((and (or (= arg0 2) (= arg0 3)) (type? gp-0 collide-shape))
(-> (the-as collide-shape gp-0) root-prim prim-core)
)
(else
(-> gp-0 trans)
)
)
)
)
)
(defmethod get-transv process-focusable ((obj process-focusable))
(-> obj root transv)
)
(defmethod get-quat process-focusable ((obj process-focusable))
(-> obj root quat)
)
(defmethod process-focusable-method-23 process-focusable ((obj process-focusable))
0
(none)
)
(defmethod process-focusable-method-24 process-focusable ((obj process-focusable))
0
(none)
)
(defmethod process-focusable-method-26 process-focusable ((obj process-focusable))
0
(none)
)
(defmethod process-focusable-method-25 process-focusable ((obj process-focusable))
0
(none)
)