[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
+7 -21
View File
@@ -1248,12 +1248,8 @@
(new 'stack 'font-context *font-default-matrix* 32 160 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-5 gp-0))
(set! (-> v1-5 width) (the float 440))
)
(let ((v1-6 gp-0))
(set! (-> v1-6 height) (the float 80))
)
(set-width! gp-0 440)
(set-height! gp-0 80)
(set! (-> gp-0 flags) (font-flags shadow kerning))
(format (clear *temp-string*) "~S / ~S ~D~%" (-> self mode) (-> self state name) (-> self which))
(print-game-text *temp-string* gp-0 #f 128 22)
@@ -1264,26 +1260,16 @@
(new 'stack 'font-context *font-default-matrix* 20 40 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-15 gp-1))
(set! (-> v1-15 scale) 0.8)
)
(let ((v1-16 gp-1))
(set! (-> v1-16 width) (the float 472))
)
(let ((v1-17 gp-1))
(set! (-> v1-17 height) (the float 20))
)
(set-scale! gp-1 0.8)
(set-width! gp-1 472)
(set-height! gp-1 20)
(set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large))
(when (zero? (-> *game-info* auto-save-count))
(print-game-text (lookup-text! *common-text* (text-id saving-data) #f) gp-1 #f 128 22)
(set! (-> gp-1 origin x) 20.0)
(set! (-> gp-1 origin y) 130.0)
(let ((v1-23 gp-1))
(set! (-> v1-23 scale) 0.7)
)
(let ((v1-24 gp-1))
(set! (-> v1-24 height) (the float 40))
)
(set-scale! gp-1 0.7)
(set-height! gp-1 40)
(let ((s5-2 print-game-text))
((the-as (function object string object none) format)
(clear *temp-string*)