[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
+3 -17
View File
@@ -97,12 +97,7 @@
((25)
(logior! (-> arg0 mask) (sound-mask reg0))
(set! (-> arg0 reg 0) (the-as uint (-> *footstep-surface* material)))
(let* ((s2-3 arg3)
(v1-33 (if (type? s2-3 process-focusable)
s2-3
)
)
)
(let ((v1-33 (as-type arg3 process-focusable)))
(when v1-33
(cond
((focus-test? v1-33 in-air)
@@ -112,12 +107,7 @@
(set! (-> arg0 reg 0) (the-as uint 127))
)
(else
(let* ((s2-4 (-> v1-33 root))
(v1-34 (if (type? s2-4 collide-shape-moving)
s2-4
)
)
)
(let ((v1-34 (the-as collide-shape (as-type (-> v1-33 root) collide-shape-moving))))
(if v1-34
(set! (-> arg0 reg 0) (the-as uint (-> (the-as collide-shape-moving v1-34) ground-pat material)))
)
@@ -362,11 +352,7 @@
(= (-> v1-23 data 5) 116)
(= (-> v1-23 data 6) 45)
)
(let* ((s3-1 (-> this process root))
(v1-27 (if (type? s3-1 collide-shape-moving)
s3-1
)
)
(let* ((v1-27 (the-as trsqv (as-type (-> this process root) collide-shape-moving)))
(t1-2 (if v1-27
(-> (the-as collide-shape-moving v1-27) ground-pat)
*footstep-surface*