mirror of
https://github.com/open-goal/jak-project
synced 2026-08-14 20:43:54 -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
-40
@@ -285,57 +285,31 @@
|
||||
)
|
||||
)
|
||||
(let ((f0-0 320.0))
|
||||
(let ((v1-2 gp-0))
|
||||
(set! (-> v1-2 scale) 0.75)
|
||||
)
|
||||
(set-scale! gp-0 0.75)
|
||||
(case (-> this message channel)
|
||||
(((gui-channel notice))
|
||||
(cond
|
||||
((logtest? (-> this message flags) 128)
|
||||
(let ((v1-9 gp-0)
|
||||
(a1-1 36)
|
||||
(a0-4 140)
|
||||
)
|
||||
(set! (-> v1-9 origin x) (the float a1-1))
|
||||
(set! (-> v1-9 origin y) (the float a0-4))
|
||||
)
|
||||
(set-origin! gp-0 36 140)
|
||||
)
|
||||
(else
|
||||
(let ((v1-10 gp-0))
|
||||
(set! (-> v1-10 scale) 0.6)
|
||||
)
|
||||
(let ((v1-11 gp-0)
|
||||
(a1-2 36)
|
||||
(a0-6 160)
|
||||
)
|
||||
(set! (-> v1-11 origin x) (the float a1-2))
|
||||
(set! (-> v1-11 origin y) (the float a0-6))
|
||||
)
|
||||
(set-scale! gp-0 0.6)
|
||||
(set-origin! gp-0 36 160)
|
||||
)
|
||||
)
|
||||
(set! f0-0 160.0)
|
||||
)
|
||||
)
|
||||
(let ((v1-14 gp-0))
|
||||
(set! (-> v1-14 width) (the float 440))
|
||||
)
|
||||
(let ((v1-15 gp-0))
|
||||
(set! (-> v1-15 height) (the float 140))
|
||||
)
|
||||
(set-width! gp-0 440)
|
||||
(set-height! gp-0 140)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning middle large))
|
||||
(if (logtest? (-> this message flags) 32)
|
||||
(set! (-> gp-0 alpha) (-> this interp))
|
||||
(set! (-> gp-0 alpha) 1.0)
|
||||
)
|
||||
(when (logtest? (-> this message flags) 64)
|
||||
(let ((s4-0 gp-0)
|
||||
(s3-0 36)
|
||||
(v1-27 (the int (lerp-scale 400.0 f0-0 (-> this interp) 0.0 1.0)))
|
||||
)
|
||||
(set! (-> s4-0 origin x) (the float s3-0))
|
||||
(set! (-> s4-0 origin y) (the float v1-27))
|
||||
(if (logtest? (-> this message flags) 64)
|
||||
(set-origin! gp-0 36 (the int (lerp-scale 400.0 f0-0 (-> this interp) 0.0 1.0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 print-game-text)
|
||||
(a0-11 (lookup-text! *common-text* (-> this message text-message) #f))
|
||||
@@ -419,12 +393,7 @@
|
||||
:exit (behavior ()
|
||||
(let ((gp-0 (-> self message on-close)))
|
||||
(when gp-0
|
||||
(let* ((s5-0 (handle->process (-> self voicebox)))
|
||||
(v1-5 (if (type? s5-0 process-drawable)
|
||||
(the-as process-drawable s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (as-type (handle->process (-> self voicebox)) process-drawable)))
|
||||
(script-eval gp-0 :vector (if v1-5
|
||||
(-> v1-5 root trans)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user