mirror of
https://github.com/open-goal/jak-project
synced 2026-08-12 20:03:14 -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:
+6
-20
@@ -100,11 +100,7 @@
|
||||
(s5-0 (/ (the-as int (car (cdr a0-1))) 8))
|
||||
(s4-0 (car (cdr (cdr a0-1))))
|
||||
(s3-0 (car (cdr (cdr (cdr a0-1)))))
|
||||
(s2-0 (-> (the-as symbol v1-0) value))
|
||||
(v1-1 (if (type? s2-0 level-load-info)
|
||||
(the-as level-load-info s2-0)
|
||||
)
|
||||
)
|
||||
(v1-1 (as-type (-> (the-as symbol v1-0) value) level-load-info))
|
||||
)
|
||||
(when v1-1
|
||||
(set! (-> v1-1 borrow-level s5-0) (the-as symbol s4-0))
|
||||
@@ -1456,15 +1452,9 @@
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 origin x) 120.0)
|
||||
(let ((v1-7 gp-0))
|
||||
(set! (-> v1-7 scale) 0.7)
|
||||
)
|
||||
(let ((v1-8 gp-0))
|
||||
(set! (-> v1-8 width) (the float 300))
|
||||
)
|
||||
(let ((v1-9 gp-0))
|
||||
(set! (-> v1-9 height) (the float 35))
|
||||
)
|
||||
(set-scale! gp-0 0.7)
|
||||
(set-width! gp-0 300)
|
||||
(set-height! gp-0 35)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning middle middle-vert large))
|
||||
(let ((s4-0 (if (logtest? (-> this flags) (fail-mission-flags famflags-2))
|
||||
(the-as int (-> this fail-message))
|
||||
@@ -1480,16 +1470,12 @@
|
||||
)
|
||||
)
|
||||
(when (= (-> this message) (fail-mission-message fammsg-1))
|
||||
(let ((v1-17 gp-0))
|
||||
(set! (-> v1-17 height) (the float 95))
|
||||
)
|
||||
(set-height! gp-0 95)
|
||||
(let ((s5-1 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id try-again?) #f) 1)
|
||||
(s5-1 *temp-string* gp-0 #f 44 (bucket-id progress))
|
||||
)
|
||||
(let ((v1-19 gp-0))
|
||||
(set! (-> v1-19 height) (the float 155))
|
||||
)
|
||||
(set-height! gp-0 155)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id yes-no-prompt) #f) 1)
|
||||
(s5-2 *temp-string* gp-0 #f 44 (bucket-id progress))
|
||||
|
||||
Reference in New Issue
Block a user