mirror of
https://github.com/open-goal/jak-project
synced 2026-08-02 00:34:13 -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
@@ -93,12 +93,7 @@
|
||||
;; definition for function camera-teleport-to-entity-named
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun camera-teleport-to-entity-named ((arg0 string))
|
||||
(let* ((gp-0 (entity-by-name arg0))
|
||||
(a0-3 (if (type? gp-0 entity-actor)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-3 (as-type (entity-by-name arg0) entity-actor)))
|
||||
(if a0-3
|
||||
(camera-teleport-to-entity (the-as entity-actor a0-3))
|
||||
(format #t "sorry, couldn't find an actor named '~S'~%" arg0)
|
||||
|
||||
+1
-7
@@ -499,13 +499,7 @@
|
||||
#f
|
||||
)
|
||||
((-> arg0 mode-name)
|
||||
(let ((s5-1 (-> arg0 mode-name value)))
|
||||
(set! (-> arg0 cam-mode) (the-as symbol (if (type? s5-1 state)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 cam-mode) (the-as symbol (as-type (-> arg0 mode-name value) state)))
|
||||
(set! (-> arg0 real-entity-name) #f)
|
||||
#f
|
||||
)
|
||||
|
||||
+1
-5
@@ -2786,11 +2786,7 @@
|
||||
)
|
||||
)
|
||||
((or (logtest? (-> self options) (cam-slave-options-u32 BUTT_CAM))
|
||||
(let ((s3-0 (handle->process (-> *camera* settings butt-handle))))
|
||||
(if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(as-type (handle->process (-> *camera* settings butt-handle)) process-drawable)
|
||||
)
|
||||
(vector-normalize-copy! gp-3 (-> self view-flat) 1.0)
|
||||
(let ((v1-303 (handle->process (-> *camera* settings butt-handle))))
|
||||
|
||||
+1
-5
@@ -200,11 +200,7 @@
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(when (and (logtest? (-> self flags) (pov-camera-flag inherit-orientation)) arg4)
|
||||
(let ((v1-22 (if (type? arg4 process-drawable)
|
||||
arg4
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-22 (as-type arg4 process-drawable)))
|
||||
(quaternion-copy! (-> self root quat) (-> v1-22 root quat))
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user