[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
+5 -15
View File
@@ -729,9 +729,7 @@
s3-0
s4-0
self
(if (type? arg0 process-drawable)
arg0
)
(as-type arg0 process-drawable)
(the-as touching-shapes-entry (-> arg3 param 0))
)
(when (logtest? (-> s3-0 mask) (attack-mask intersection))
@@ -881,15 +879,9 @@
)
(send-event (ppointer->process (-> self parent)) 'stop-hint)
(set! (-> gp-0 flags) (font-flags shadow kerning large))
(let ((v1-9 gp-0))
(set! (-> v1-9 width) (the float 340))
)
(let ((v1-10 gp-0))
(set! (-> v1-10 height) (the float 80))
)
(let ((v1-11 gp-0))
(set! (-> v1-11 scale) 0.9)
)
(set-width! gp-0 340)
(set-height! gp-0 80)
(set-scale! gp-0 0.9)
(let ((s5-0 print-game-text))
(format (clear *temp-string*) (lookup-text! *common-text* (text-id press-to-throw-held-objects) #f))
(s5-0 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha))
@@ -1348,9 +1340,7 @@
s3-0
s4-0
self
(if (type? proc process-drawable)
proc
)
(as-type proc process-drawable)
(the-as touching-shapes-entry (-> block param 0))
)
(when (logtest? (-> s3-0 mask) (attack-mask intersection))
+1 -3
View File
@@ -2190,9 +2190,7 @@
s3-0
s4-0
self
(if (type? proc process-drawable)
proc
)
(as-type proc process-drawable)
(the-as touching-shapes-entry (-> block param 0))
)
(if (logtest? (-> s3-0 mask) (attack-mask intersection))