[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
+4 -12
View File
@@ -914,13 +914,9 @@
(defmethod dig-tether-method-22 ((this dig-tether))
(with-pp
(when (-> this clasp)
(let* ((s4-0 (-> this clasp extra process))
(s5-0 (if (type? s4-0 dig-clasp)
s4-0
)
)
(a1-1 (new 'stack-no-clear 'event-message-block))
)
(let ((s5-0 (the-as process (as-type (-> this clasp extra process) dig-clasp)))
(a1-1 (new 'stack-no-clear 'event-message-block))
)
(set! (-> a1-1 from) (process->ppointer pp))
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'broken?)
@@ -1392,11 +1388,7 @@
(the-as collide-shape (-> self root))
(the-as uint 1)
)
(let ((a0-7 (if (type? proc process-focusable)
proc
)
)
)
(let ((a0-7 (the-as process (as-type proc process-focusable))))
(when a0-7
(if (send-event a0-7 'attack (-> block param 0) (static-attack-info ((id (new-attack-id)))))
#f
+2 -12
View File
@@ -918,12 +918,7 @@
)
0
(logclear! (-> self mask) (process-mask actor-pause))
(let* ((gp-0 *target*)
(a0-4 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a0-4 (the-as target (as-type *target* process-focusable))))
(if a0-4
(dig-bomb-crate-method-29 self (get-trans a0-4 0))
)
@@ -934,12 +929,7 @@
(logior! (-> self draw status) (draw-control-status no-draw))
(sound-play "bomb-rack-break")
(let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
(let* ((s5-1 *target*)
(a0-5 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(let ((a0-5 (the-as target (as-type *target* process-focusable))))
(when a0-5
(set! (-> gp-1 fountain-rand-transv-lo quad) (-> (get-trans a0-5 0) quad))
(+! (-> gp-1 fountain-rand-transv-lo y) -16384.0)