[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
+2 -12
View File
@@ -718,12 +718,7 @@
;; definition for method 45 of type nav-mesh
(defmethod link-to-other-mesh ((this nav-mesh) (arg0 nav-mesh-link))
(when (not (-> arg0 dest-mesh))
(let* ((s4-0 (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id))))
(v1-1 (if (type? s4-0 entity-nav-mesh)
s4-0
)
)
)
(let ((v1-1 (as-type (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id))) entity-nav-mesh)))
(when v1-1
(let ((a0-3 (-> v1-1 nav-mesh))
(v1-2 (the-as nav-mesh-link #f))
@@ -2600,12 +2595,7 @@
;; definition for function get-nav-mesh
(defun get-nav-mesh ((arg0 actor-id))
(let ((gp-0 (the-as nav-mesh #f)))
(let* ((s5-0 (entity-nav-mesh-by-aid arg0))
(v1-0 (if (type? s5-0 entity-nav-mesh)
s5-0
)
)
)
(let ((v1-0 (as-type (entity-nav-mesh-by-aid arg0) entity-nav-mesh)))
(if v1-0
(set! gp-0 (-> v1-0 nav-mesh))
)