mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 13:53:01 -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:
+14
-26
@@ -168,23 +168,15 @@
|
||||
(a0-2
|
||||
(hover-formation-method-15 a0-2 gp-0 (-> self offset))
|
||||
)
|
||||
(else
|
||||
(let ((s5-0 (handle->process (-> self focus handle))))
|
||||
(cond
|
||||
((if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
(let* ((s5-1 (-> self focus-pos))
|
||||
(a0-8 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-1))
|
||||
)
|
||||
(vector+! gp-0 s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> self offset) (vector-y-angle a0-8)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(vector-copy! gp-0 (-> self root trans))
|
||||
((as-type (handle->process (-> self focus handle)) process-focusable)
|
||||
(let* ((s5-1 (-> self focus-pos))
|
||||
(a0-8 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector+! gp-0 s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> self offset) (vector-y-angle a0-8)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(vector-copy! gp-0 (-> self root trans))
|
||||
)
|
||||
)
|
||||
(hover-nav-control-method-12 (-> self hover) gp-0)
|
||||
@@ -505,16 +497,12 @@
|
||||
(go process-drawable-art-error "no path")
|
||||
)
|
||||
(set-time! (-> self scale-timer))
|
||||
(let* ((gp-0 *target*)
|
||||
(s1-0 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (-> self root))
|
||||
(s5-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp))
|
||||
)
|
||||
(let ((s1-0 (the-as target (as-type *target* process-focusable)))
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (-> self root))
|
||||
(s5-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp))
|
||||
)
|
||||
(let ((s0-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 1.0 'interp))
|
||||
(s3-1
|
||||
(-> (the-as collide-shape-prim-group (-> self root root-prim))
|
||||
|
||||
+7
-37
@@ -16,18 +16,10 @@
|
||||
;; definition for method 16 of type hover-formation-control
|
||||
(defmethod hover-formation-control-method-16 ((this hover-formation-control))
|
||||
(let ((gp-0 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)))
|
||||
(s4-0 (cond
|
||||
((-> this anchor-proc)
|
||||
(let ((s3-0 (handle->process (-> this anchor-proc))))
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(s4-0 (if (-> this anchor-proc)
|
||||
(as-type (handle->process (-> this anchor-proc)) process-focusable)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(and s4-0
|
||||
@@ -63,18 +55,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(s1-0 (cond
|
||||
((-> this anchor-proc)
|
||||
(let ((s3-0 (handle->process (-> this anchor-proc))))
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(s1-0 (if (-> this anchor-proc)
|
||||
(as-type (handle->process (-> this anchor-proc)) process-focusable)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
@@ -139,18 +123,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(a0-7 (cond
|
||||
((-> this anchor-proc)
|
||||
(let ((s4-0 (handle->process (-> this anchor-proc))))
|
||||
(if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(a0-7 (if (-> this anchor-proc)
|
||||
(as-type (handle->process (-> this anchor-proc)) process-focusable)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
@@ -437,12 +413,7 @@
|
||||
(set! (-> s5-0 best-cost) -1.0)
|
||||
(set! (-> s5-0 count) 0)
|
||||
(dotimes (s4-0 16)
|
||||
(let* ((s3-0 (handle->process (-> this actor-table s4-0)))
|
||||
(a0-8 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-8 (as-type (handle->process (-> this actor-table s4-0)) process-focusable)))
|
||||
(cond
|
||||
(a0-8
|
||||
(vector-copy! (-> s5-0 actor-position s4-0) (get-trans (the-as process-focusable a0-8) 3))
|
||||
@@ -833,7 +804,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 3 of type flying-formation
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this flying-formation))
|
||||
(when (not this)
|
||||
(set! this this)
|
||||
|
||||
+1
-6
@@ -929,12 +929,7 @@
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (-> self dest-pos)))
|
||||
(let* ((s5-0 (handle->process (-> self focus handle)))
|
||||
(a0-6 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-6 (as-type (handle->process (-> self focus handle)) process-focusable)))
|
||||
(vector-copy! gp-0 (get-trans (the-as process-focusable a0-6) 0))
|
||||
)
|
||||
(+! (-> gp-0 y) -20480.0)
|
||||
|
||||
Reference in New Issue
Block a user