mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 21:28:00 -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:
+1
-6
@@ -802,12 +802,7 @@
|
||||
(set! (-> this surf) *gravel-surface*)
|
||||
)
|
||||
(((pat-event rail))
|
||||
(let* ((s4-0 (-> this process))
|
||||
(a0-15 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-15 (as-type (-> this process) process-focusable)))
|
||||
(if (and a0-15 (not (logtest? (focus-status rail) (-> (the-as process-focusable a0-15) focus-status))))
|
||||
(set! (-> this surf) *rail-surface*)
|
||||
)
|
||||
|
||||
+1
-5
@@ -292,11 +292,7 @@
|
||||
(while (begin (label cfg-104) (nonzero? s4-0))
|
||||
(+! s4-0 -1)
|
||||
(let* ((s0-0 (-> arg0 s4-0))
|
||||
(s2-0 (-> s0-0 process))
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
(s3-0 (as-type (-> s0-0 process) process-focusable))
|
||||
)
|
||||
(when s3-0
|
||||
(let ((s1-0 (get-search-info-flag (the-as process-focusable s3-0))))
|
||||
|
||||
+3
-13
@@ -60,21 +60,11 @@
|
||||
(-> this src-proc)
|
||||
(or arg0 (-> this dst-proc))
|
||||
)
|
||||
(let* ((s0-0 (handle->process (-> this src-proc)))
|
||||
(s1-0 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-0 (as-type (handle->process (-> this src-proc)) process-focusable)))
|
||||
(when s1-0
|
||||
(when (and (not arg0) (not arg1))
|
||||
(let ((s0-1 (handle->process (-> this dst-proc))))
|
||||
(set! arg0 (if (type? s0-1 process-focusable)
|
||||
(the-as process-focusable s0-1)
|
||||
)
|
||||
)
|
||||
(if (and (not arg0) (not arg1))
|
||||
(set! arg0 (as-type (handle->process (-> this dst-proc)) process-focusable))
|
||||
)
|
||||
)
|
||||
(when (or (the-as process arg0) arg1)
|
||||
(set! sv-592 (new 'stack-no-clear 'vector))
|
||||
(let ((v1-24 (-> (get-trans (the-as process-focusable s1-0) 10) quad)))
|
||||
|
||||
Reference in New Issue
Block a user