mirror of
https://github.com/open-goal/jak-project
synced 2026-08-20 06:16:35 -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
-19
@@ -256,12 +256,7 @@
|
||||
(init-vf0-vector)
|
||||
(cond
|
||||
((= (-> arg1 position) #t)
|
||||
(let* ((s3-0 (handle->process (-> arg1 handle)))
|
||||
(v1-4 (if (type? s3-0 process-drawable)
|
||||
(the-as process-drawable s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (as-type (handle->process (-> arg1 handle)) process-drawable)))
|
||||
(if (and v1-4 (nonzero? (-> v1-4 root)))
|
||||
(vector-copy! (-> arg1 last-world-pos) (-> v1-4 root trans))
|
||||
)
|
||||
@@ -271,13 +266,12 @@
|
||||
(= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor)
|
||||
)
|
||||
(let* ((v1-14 (the-as entity-actor (-> arg1 position)))
|
||||
(s3-1 (if v1-14
|
||||
(-> v1-14 extra process)
|
||||
)
|
||||
)
|
||||
(a0-13 (if (type? s3-1 process-drawable)
|
||||
(the-as process-drawable s3-1)
|
||||
)
|
||||
(a0-13 (as-type
|
||||
(if v1-14
|
||||
(-> v1-14 extra process)
|
||||
)
|
||||
process-drawable
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-13
|
||||
@@ -667,12 +661,8 @@
|
||||
)
|
||||
)
|
||||
(let ((f30-2 (* 0.0024038462 (the float (- arg3 arg1)))))
|
||||
(let ((v1-138 s3-1))
|
||||
(set! (-> v1-138 scale) f30-2)
|
||||
)
|
||||
(let ((v1-139 s3-1))
|
||||
(set! (-> v1-139 width) (the float (the int (* 400.0 f30-2))))
|
||||
)
|
||||
(set-scale! s3-1 f30-2)
|
||||
(set-width! s3-1 (the int (* 400.0 f30-2)))
|
||||
(let ((a0-100 s3-1))
|
||||
(set! (-> a0-100 flags) (font-flags kerning middle large))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user