[decompiler] as-type and font method support (#3855)

Add support for `as-type` macro, and detecting inline font methods. This
works in all three games but I've only updated jak 3's goal_src for now.
Eventually I will go back and work through the others, but I want to get
more decompiler features in first.


![image](https://github.com/user-attachments/assets/5c31bf85-97b4-437c-bc4b-dc054e60551e)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
water111
2025-02-01 21:23:11 -05:00
committed by GitHub
parent d5590ab638
commit 48cb9bb787
645 changed files with 5391 additions and 16694 deletions
+2 -12
View File
@@ -740,19 +740,9 @@
;; WARN: Return type mismatch int vs none.
(defmethod look-at! ((this joint-mod) (arg0 vector) (arg1 symbol) (arg2 process))
(when (= arg1 'attacking)
(let* ((s2-0 arg2)
(s1-0 (if (type? s2-0 process-drawable)
(the-as process-drawable s2-0)
)
)
)
(let ((s1-0 (as-type arg2 process-drawable)))
(when s1-0
(let* ((s0-0 (-> s1-0 fact))
(s2-1 (if (type? s0-0 fact-info-enemy)
(the-as fact-info-enemy s0-0)
)
)
)
(let ((s2-1 (as-type (-> s1-0 fact) fact-info-enemy)))
(when s2-1
(when (< (vector-vector-distance (-> this process root trans) (-> s1-0 root trans)) (-> s2-1 cam-notice-dist))
(set-time! (-> this notice-time))