mirror of
https://github.com/open-goal/jak-project
synced 2026-08-03 00:47:12 -04:00
[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.  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
+9
-32
@@ -239,13 +239,9 @@
|
||||
(defmethod link-art-to-master ((this art-group))
|
||||
(when this
|
||||
(countdown (s5-0 (-> this length))
|
||||
(let* ((s3-0 (-> this data s5-0))
|
||||
(s4-0 (if (type? s3-0 art-element)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s2-0 #f)
|
||||
)
|
||||
(let ((s4-0 (as-type (-> this data s5-0) art-element))
|
||||
(s2-0 #f)
|
||||
)
|
||||
(when s4-0
|
||||
(let ((s3-1 11))
|
||||
(while (begin (label cfg-24) (nonzero? s3-1))
|
||||
@@ -292,13 +288,9 @@
|
||||
(defmethod unlink-art-to-master ((this art-group))
|
||||
(when this
|
||||
(countdown (s5-0 (-> this length))
|
||||
(let* ((s3-0 (-> this data s5-0))
|
||||
(s4-0 (if (type? s3-0 art-element)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s3-1 #f)
|
||||
)
|
||||
(let ((s4-0 (as-type (-> this data s5-0) art-element))
|
||||
(s3-1 #f)
|
||||
)
|
||||
(when s4-0
|
||||
(let ((s2-0 11))
|
||||
(while (begin (label cfg-13) (nonzero? s2-0))
|
||||
@@ -2132,12 +2124,7 @@
|
||||
)
|
||||
)
|
||||
(when (= arg5 -99.0)
|
||||
(let ((s2-1 arg0))
|
||||
(set! sv-28 (if (type? s2-1 process-drawable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-28 (as-type arg0 process-drawable))
|
||||
(set! arg5 (if sv-28
|
||||
(vector-vector-distance (target-pos 0) (-> (the-as process-drawable sv-28) root trans))
|
||||
-1.0
|
||||
@@ -2170,12 +2157,7 @@
|
||||
(((gui-action queue) (gui-action play) (gui-action playing) (gui-action fade))
|
||||
(let ((f30-0 (-> arg0 priority)))
|
||||
(when (= f30-0 -99.0)
|
||||
(let* ((s2-0 (get-process arg0))
|
||||
(v1-10 (if (type? s2-0 process-drawable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (as-type (get-process arg0) process-drawable)))
|
||||
(set! f30-0 (cond
|
||||
((= (-> arg0 id) (-> this ids (-> arg0 channel)))
|
||||
-1.0
|
||||
@@ -2257,12 +2239,7 @@
|
||||
(set! (-> gp-0 id) (-> arg0 id))
|
||||
(set! (-> gp-0 params mask) (the-as uint 0))
|
||||
(when (logtest? (-> arg0 flags) (gui-connection-flags gcf1))
|
||||
(let* ((s4-0 (get-process arg0))
|
||||
(v1-8 (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-8 (as-type (get-process arg0) process-drawable)))
|
||||
(when (and v1-8 (nonzero? (-> (the-as process-drawable v1-8) root)))
|
||||
(let ((a1-3 (-> (the-as process-drawable v1-8) root trans)))
|
||||
(let ((s4-1 pp))
|
||||
|
||||
Reference in New Issue
Block a user