[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
+9 -32
View File
@@ -239,13 +239,9 @@
(defmethod link-art-to-master ((this art-group))
(when this
(countdown (s5-0 (-> this length))
(let* ((s3-0 (-> this data s5-0))
(s4-0 (if (type? s3-0 art-element)
s3-0
)
)
(s2-0 #f)
)
(let ((s4-0 (as-type (-> this data s5-0) art-element))
(s2-0 #f)
)
(when s4-0
(let ((s3-1 11))
(while (begin (label cfg-24) (nonzero? s3-1))
@@ -292,13 +288,9 @@
(defmethod unlink-art-to-master ((this art-group))
(when this
(countdown (s5-0 (-> this length))
(let* ((s3-0 (-> this data s5-0))
(s4-0 (if (type? s3-0 art-element)
s3-0
)
)
(s3-1 #f)
)
(let ((s4-0 (as-type (-> this data s5-0) art-element))
(s3-1 #f)
)
(when s4-0
(let ((s2-0 11))
(while (begin (label cfg-13) (nonzero? s2-0))
@@ -2132,12 +2124,7 @@
)
)
(when (= arg5 -99.0)
(let ((s2-1 arg0))
(set! sv-28 (if (type? s2-1 process-drawable)
s2-1
)
)
)
(set! sv-28 (as-type arg0 process-drawable))
(set! arg5 (if sv-28
(vector-vector-distance (target-pos 0) (-> (the-as process-drawable sv-28) root trans))
-1.0
@@ -2170,12 +2157,7 @@
(((gui-action queue) (gui-action play) (gui-action playing) (gui-action fade))
(let ((f30-0 (-> arg0 priority)))
(when (= f30-0 -99.0)
(let* ((s2-0 (get-process arg0))
(v1-10 (if (type? s2-0 process-drawable)
s2-0
)
)
)
(let ((v1-10 (as-type (get-process arg0) process-drawable)))
(set! f30-0 (cond
((= (-> arg0 id) (-> this ids (-> arg0 channel)))
-1.0
@@ -2257,12 +2239,7 @@
(set! (-> gp-0 id) (-> arg0 id))
(set! (-> gp-0 params mask) (the-as uint 0))
(when (logtest? (-> arg0 flags) (gui-connection-flags gcf1))
(let* ((s4-0 (get-process arg0))
(v1-8 (if (type? s4-0 process-drawable)
s4-0
)
)
)
(let ((v1-8 (as-type (get-process arg0) process-drawable)))
(when (and v1-8 (nonzero? (-> (the-as process-drawable v1-8) root)))
(let ((a1-3 (-> (the-as process-drawable v1-8) root trans)))
(let ((s4-1 pp))