d/jak2: finish more of cam-master which allows the game to start it's settings routine

This commit is contained in:
Tyler Wilding
2022-10-06 23:12:34 -04:00
parent 362e6b69b4
commit 2e45e11f41
13 changed files with 2590 additions and 252 deletions
File diff suppressed because it is too large Load Diff
+7 -9
View File
@@ -48,6 +48,11 @@
(declare-type camera-master process)
(define-extern cam-master-init (function none :behavior camera-master))
;; NOTE - for cam-master
(define-extern cam-master-effect (function none :behavior camera-master))
(define-extern camera-master-debug (function camera-master none))
(define-extern group-rain-screend-drop sparticle-launch-group)
(define-extern parameter-ease-sin-clamp (function float float))
;; DECOMP BEGINS
@@ -122,7 +127,7 @@
(tracking-spline-method-19 (_type_ float vector tracking-spline-sampler) vector 19)
(tracking-spline-method-20 (_type_ vector int) none 20)
(tracking-spline-method-21 (_type_ vector float float float) vector 21)
(tracking-spline-method-22 (_type_ float) none 22)
(tracking-spline-method-22 (_type_ float) symbol 22)
(debug-draw-spline (_type_) none 23)
)
)
@@ -448,13 +453,6 @@
(:methods
(camera-master-method-14 (_type_ vector) vector 14)
(camera-master-method-15 (_type_ vector) vector 15)
(camera-master-method-16 (_type_ symbol) none 16)
(camera-master-method-16 (_type_ symbol) int 16)
)
)
0
+23 -141
View File
@@ -52,6 +52,7 @@
)
)
;; WARN: Return type mismatch uint128 vs uint.
(defun cam-slave-get-flags ((arg0 entity) (arg1 symbol))
(let ((s5-0 (res-lump-value arg0 arg1 uint128 :time -1000000000.0))
(s3-0 (method-of-type res-lump get-property-value))
@@ -854,6 +855,7 @@
)
)
;; WARN: Return type mismatch int vs symbol.
(defmethod tracking-spline-method-22 tracking-spline ((obj tracking-spline) (arg0 float))
(when (< arg0 (-> obj summed-len))
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
@@ -865,8 +867,7 @@
(tracking-spline-method-14 obj s5-0)
)
)
0
(none)
(the-as symbol 0)
)
(defmethod tracking-spline-method-9 tracking-spline ((obj tracking-spline))
@@ -1545,11 +1546,7 @@
(sv-272 matrix)
(sv-288 vector)
)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
@@ -1582,21 +1579,11 @@
(vector-normalize! s0-0 f28-0)
)
(vector-! (-> arg0 looking-interesting) (-> *camera* settings point-of-interest) (-> arg0 follow-pt))
(let ((v1-15 (-> arg0 looking-interesting)))
(let ((a0-16 (-> arg0 follow-pt))
(a1-7 (-> arg0 looking-interesting))
(f0-4 (-> arg0 point-of-interest-blend value))
)
(.lvf vf2 (&-> a1-7 quad))
(.lvf vf1 (&-> a0-16 quad))
(let ((a0-17 f0-4))
(.mov vf3 a0-17)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-15 quad) vf4)
(vector+float*!
(-> arg0 looking-interesting)
(-> arg0 follow-pt)
(-> arg0 looking-interesting)
(-> arg0 point-of-interest-blend value)
)
)
(else
@@ -1637,10 +1624,10 @@
)
(matrix-rotate-x! sv-240 f30-0)
(let ((t9-6 matrix*!)
(a0-29 s1-0)
(a0-28 s1-0)
(a2-3 s1-0)
)
(t9-6 a0-29 sv-240 a2-3)
(t9-6 a0-28 sv-240 a2-3)
)
)
)
@@ -1664,17 +1651,17 @@
(slave-matrix-blend-2 (-> arg0 inv-mat) arg2 s0-0 s1-0)
)
(else
(let* ((v1-59 (-> arg0 inv-mat))
(let* ((v1-60 (-> arg0 inv-mat))
(a3-2 s1-0)
(a0-35 (-> a3-2 vector 0 quad))
(a0-34 (-> a3-2 vector 0 quad))
(a1-19 (-> a3-2 vector 1 quad))
(a2-7 (-> a3-2 vector 2 quad))
(a3-3 (-> a3-2 trans quad))
)
(set! (-> v1-59 vector 0 quad) a0-35)
(set! (-> v1-59 vector 1 quad) a1-19)
(set! (-> v1-59 vector 2 quad) a2-7)
(set! (-> v1-59 trans quad) a3-3)
(set! (-> v1-60 vector 0 quad) a0-34)
(set! (-> v1-60 vector 1 quad) a1-19)
(set! (-> v1-60 vector 2 quad) a2-7)
(set! (-> v1-60 trans quad) a3-3)
)
)
)
@@ -1710,16 +1697,6 @@
)
)
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
@@ -1733,14 +1710,6 @@
(sv-176 matrix)
(sv-192 vector)
)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(init-vf0-vector)
(set! sv-144 arg5)
(let ((s0-0 (new-stack-vector0)))
(set! sv-160 (new 'stack-no-clear 'vector))
@@ -1815,71 +1784,19 @@
)
)
(when arg4
(let ((v1-33 arg0))
(let ((a0-24 arg0)
(a1-17 s3-0)
(f0-15 (vector-dot arg1 s3-0))
)
(.lvf vf2 (&-> a1-17 quad))
(.lvf vf1 (&-> a0-24 quad))
(let ((a0-25 f0-15))
(.mov vf3 a0-25)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-33 quad) vf4)
)
(let ((v1-34 arg0))
(let ((a0-26 arg0)
(a1-18 s3-0)
(f0-17 (* arg3 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
(.lvf vf2 (&-> a1-18 quad))
(.lvf vf1 (&-> a0-26 quad))
(let ((a0-27 f0-17))
(.mov vf3 a0-27)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-34 quad) vf4)
)
)
(vector+float*! arg0 arg0 s3-0 (vector-dot arg1 s3-0))
(vector+float*! arg0 arg0 s3-0 (* arg3 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
)
arg0
)
arg0
)
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
(defun v-slrp3! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
(local-vars (f0-7 float) (f26-0 float) (f28-0 float) (sv-144 float) (sv-160 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(init-vf0-vector)
(set! sv-144 arg4)
(let ((s1-0 (new-stack-vector0)))
(set! sv-160 (new 'stack-no-clear 'vector))
@@ -1937,45 +1854,10 @@
)
(vector-normalize! arg0 (lerp f28-0 f26-0 f30-0))
(when arg3
(let ((v1-21 arg0))
(let ((a0-24 arg0)
(a1-17 s3-0)
(f0-11 (vector-dot arg1 s3-0))
)
(.lvf vf2 (&-> a1-17 quad))
(.lvf vf1 (&-> a0-24 quad))
(let ((a0-25 f0-11))
(.mov vf3 a0-25)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-21 quad) vf4)
)
(let ((v1-22 arg0))
(let ((a0-26 arg0)
(a1-18 s3-0)
(f0-14 (* f30-0 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
(.lvf vf2 (&-> a1-18 quad))
(.lvf vf1 (&-> a0-26 quad))
(let ((a0-27 f0-14))
(.mov vf3 a0-27)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-22 quad) vf4)
)
)
(vector+float*! arg0 arg0 s3-0 (vector-dot arg1 s3-0))
(vector+float*! arg0 arg0 s3-0 (* f30-0 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
)
arg0
)
arg0
)
+1 -1
View File
@@ -719,7 +719,7 @@
; )
(let ((gp-1 *display*))
(set! *teleport* #t)
; (update *setting-control*)
(update *setting-control*)
; (init-time-of-day-context *time-of-day-context*)
(format 0 "about to display-sync~%")
(display-sync gp-1)
@@ -56,13 +56,14 @@
(get-quat (_type_) quaternion 21)
(get-transv (_type_) vector 22)
(process-focusable-method-23 (_type_) none 23)
(process-focusable-method-24 (_type_) none 24)
(process-focusable-method-25 (_type_) int 25)
(process-focusable-method-24 (_type_) float 24)
(process-focusable-method-25 (_type_) time-frame 25)
(process-focusable-method-26 (_type_) none 26)
)
)
;; WARN: Return type mismatch structure vs vector.
(defmethod get-trans process-focusable ((obj process-focusable) (arg0 int))
(let ((gp-0 (-> obj root)))
(the-as vector (cond
@@ -97,8 +98,7 @@
)
(defmethod process-focusable-method-24 process-focusable ((obj process-focusable))
0
(none)
0.0
)
(defmethod process-focusable-method-26 process-focusable ((obj process-focusable))
@@ -106,12 +106,7 @@
(none)
)
;; WARN: Return type mismatch int vs time-frame.
(defmethod process-focusable-method-25 process-focusable ((obj process-focusable))
0
(the-as time-frame 0)
)
0
+1 -1
View File
@@ -11,7 +11,7 @@
(define-extern load-game-text-info
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
the game-text-info, and heap is the heap to load to. The heap will be cleared."
(function string (pointer game-text-info) kheap int))
(function string symbol kheap int))
(define-extern print-game-text-scaled "Print text, with a given scaling" (function string float font-context int none))
(define-extern print-game-text "Print text." (function string font-context symbol int int float))
+6 -7
View File
@@ -168,7 +168,6 @@
)
(defmethod lookup-text! game-text-info ((obj game-text-info) (arg0 game-text-id) (arg1 symbol))
(format 0 "hello world")
(cond
((= obj #f)
(cond
@@ -234,11 +233,11 @@
(define text-is-loading #f)
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
(defun load-game-text-info ((arg0 string) (arg1 (pointer game-text-info)) (arg2 kheap))
(defun load-game-text-info ((arg0 string) (arg1 symbol) (arg2 kheap))
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
the game-text-info, and heap is the heap to load to. The heap will be cleared."
(local-vars (v0-3 int) (sv-16 game-text-info) (sv-24 int) (sv-32 int) (sv-40 int))
(set! sv-16 (-> arg1 0))
(set! sv-16 (the-as game-text-info (-> arg1 value)))
(set! sv-24 (the-as int (-> *setting-control* user-current language)))
(set! sv-32 0)
(set! sv-40 (&- (-> arg2 top) (the-as uint (-> arg2 base))))
@@ -298,11 +297,11 @@
(flush-cache 0)
(let ((s3-1 link))
(format (clear *temp-string*) "~D~S.TXT" sv-24 arg0)
(set! (-> arg1 0) (the-as game-text-info (s3-1 s2-1 (-> *temp-string* data) sv-32 arg2 0)))
(set! (-> arg1 value) (s3-1 s2-1 (-> *temp-string* data) sv-32 arg2 0))
)
)
(if (<= (the-as int (-> arg1 0)) 0)
(set! (-> arg1 0) #f)
(if (<= (the-as int (-> arg1 value)) 0)
(set! (-> arg1 value) (the-as object #f))
)
)
(set! v0-3 0)
@@ -315,7 +314,7 @@
This function made more sense back when text files were split up, but in the end they put everything
in a single text group and file."
(if (or *level-text-file-load-flag* (>= arg0 0))
(load-game-text-info "common" (the-as (pointer game-text-info) '*common-text*) *common-text-heap*)
(load-game-text-info "common" '*common-text* *common-text-heap*)
)
0
(none)
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -114,7 +114,7 @@
(tracking-spline-method-19 (_type_ float vector tracking-spline-sampler) vector 19)
(tracking-spline-method-20 (_type_ vector int) none 20)
(tracking-spline-method-21 (_type_ vector float float float) vector 21)
(tracking-spline-method-22 (_type_ float) none 22)
(tracking-spline-method-22 (_type_ float) symbol 22)
(debug-draw-spline (_type_) none 23)
)
)
@@ -628,7 +628,7 @@
(:methods
(camera-master-method-14 (_type_ vector) vector 14)
(camera-master-method-15 (_type_ vector) vector 15)
(camera-master-method-16 (_type_ symbol) none 16)
(camera-master-method-16 (_type_ symbol) int 16)
)
)
+2 -3
View File
@@ -892,7 +892,7 @@
)
;; definition for method 22 of type tracking-spline
;; WARN: Return type mismatch int vs none.
;; WARN: Return type mismatch int vs symbol.
(defmethod tracking-spline-method-22 tracking-spline ((obj tracking-spline) (arg0 float))
(when (< arg0 (-> obj summed-len))
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
@@ -904,8 +904,7 @@
(tracking-spline-method-14 obj s5-0)
)
)
0
(none)
(the-as symbol 0)
)
;; definition for method 9 of type tracking-spline
@@ -14,8 +14,8 @@
(get-quat (_type_) quaternion 21)
(get-transv (_type_) vector 22)
(process-focusable-method-23 (_type_) none 23)
(process-focusable-method-24 (_type_) none 24)
(process-focusable-method-25 (_type_) int 25)
(process-focusable-method-24 (_type_) float 24)
(process-focusable-method-25 (_type_) time-frame 25)
(process-focusable-method-26 (_type_) none 26)
)
)
@@ -74,10 +74,8 @@
)
;; definition for method 24 of type process-focusable
;; WARN: Return type mismatch int vs none.
(defmethod process-focusable-method-24 process-focusable ((obj process-focusable))
0
(none)
0.0
)
;; definition for method 26 of type process-focusable
@@ -88,8 +86,9 @@
)
;; definition for method 25 of type process-focusable
;; WARN: Return type mismatch int vs time-frame.
(defmethod process-focusable-method-25 process-focusable ((obj process-focusable))
0
(the-as time-frame 0)
)
;; failed to figure out what this is:
+248 -68
View File
@@ -58,6 +58,7 @@
)
;; definition for method 3 of type game-text-info
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect game-text-info ((obj game-text-info))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
@@ -257,80 +258,259 @@
;; definition for function load-game-text-info
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
(defun load-game-text-info ((arg0 string) (arg1 (pointer game-text-info)) (arg2 kheap))
;; ERROR: failed type prop at 3: Could not figure out load: (set! v1 (l.wu gp))
;; WARN: Return type mismatch none vs int.
(defun load-game-text-info ((a0-0 string) (a1-0 symbol) (a2-0 kheap))
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
the game-text-info, and heap is the heap to load to. The heap will be cleared."
(local-vars (v0-3 int) (sv-16 game-text-info) (sv-24 int) (sv-32 int) (sv-40 int))
(set! sv-16 (-> arg1 0))
(set! sv-24 (the-as int (-> *setting-control* user-current language)))
(set! sv-32 0)
(set! sv-40 (&- (-> arg2 top) (the-as uint (-> arg2 base))))
(if (and (= (scf-get-territory) 1) (= sv-24 (language-enum english)) (not (demo?)))
(set! sv-24 7)
)
(when (or (= sv-16 #f) (!= (-> sv-16 language-id) sv-24) (not (string= (-> sv-16 group-name) arg0)))
(let ((v1-16 arg2))
(set! (-> v1-16 current) (-> v1-16 base))
)
(b! #t cfg-17 :delay (nop!))
(label cfg-16)
(set! v0-3 0)
(b! #t cfg-30 :delay (nop!))
(label cfg-17)
(let ((s3-0 str-load))
(format (clear *temp-string*) "~D~S.TXT" sv-24 arg0)
(b!
(not (s3-0
*temp-string*
-1
(logand -64 (&+ (-> arg2 current) 63))
(&- (-> arg2 top) (the-as uint (-> arg2 current)))
(local-vars
(v0-0 none)
(v0-1 none)
(v0-2 none)
(v0-3 none)
(v0-4 none)
(v0-5 none)
(v0-6 none)
(v0-7 none)
(v0-8 none)
(v0-9 none)
(v0-10 none)
(v0-11 none)
(v0-12 none)
(v0-13 none)
(v1-0 game-text-info)
(v1-1 none)
(v1-2 none)
(v1-3 none)
(v1-4 none)
(v1-5 none)
(v1-6 none)
(v1-7 none)
(v1-9 none)
(v1-10 none)
(v1-11 none)
(v1-12 none)
(v1-13 none)
(v1-14 none)
(v1-16 none)
(v1-17 none)
(v1-18 none)
(v1-20 none)
(v1-21 none)
(v1-24 none)
(v1-25 none)
(v1-26 none)
(a0-1 none)
(a0-2 none)
(a0-3 none)
(a0-4 none)
(a0-5 none)
(a0-6 none)
(a0-7 none)
(a0-8 none)
(a0-10 none)
(a0-11 none)
(a0-12 none)
(a0-13 none)
(a0-14 none)
(a0-15 none)
(a0-17 none)
(a0-18 none)
(a0-19 none)
(a0-20 none)
(a0-21 none)
(a0-22 none)
(a1-2 none)
(a1-3 none)
(a1-4 none)
(a1-5 none)
(a1-6 none)
(a1-7 none)
(a1-8 none)
(a1-9 none)
(a2-1 none)
(a2-2 none)
(a2-3 none)
(a2-4 none)
(a2-5 none)
(a2-6 none)
(a3-1 none)
(a3-2 none)
(t0-0 none)
(s1-0 none)
(s2-0 none)
(s2-1 none)
(s3-0 none)
(s3-1 none)
(t9-0 none)
(t9-1 none)
(t9-2 none)
(t9-3 none)
(t9-4 none)
(t9-5 none)
(t9-6 none)
(t9-7 none)
(t9-8 none)
(t9-9 none)
(t9-10 none)
(t9-11 none)
(t9-12 none)
(sv-16 none)
(sv-24 none)
(sv-32 none)
(sv-40 none)
)
(when (begin
(when (begin
(and (begin
(set! v1-0 (the-as game-text-info (l.wu a1-0)))
(set! sv-16 v1-0)
(set! v1-1 (the-as none *setting-control*))
(set! v1-2 (the-as none (l.d (+ v1-1 28))))
(set! sv-24 v1-2)
(set! sv-32 0)
(set! v1-3 (the-as none (-> a2-0 top)))
(set! a0-1 (the-as none (-> a2-0 base)))
(set! v1-4 (the-as none (- v1-3 a0-1)))
(set! sv-40 v1-4)
(set! t9-0 (the-as none scf-get-territory))
(set! v0-0 (the-as none (call!)))
(set! v1-5 (the-as none (+ v0-0 -1)))
(set! a0-2 (the-as none (zero? v1-5)))
a0-2
)
(begin (set! v1-7 sv-24) (zero? v1-7))
(begin (set! t9-1 (the-as none demo?)) (set! v0-1 (the-as none (call!))) (set! v1-6 (the-as none (not v0-1))))
)
v1-6
)
(set! v1-9 (the-as none 7))
(set! sv-24 v1-9)
)
(or (begin (set! v1-10 sv-16) (set! a0-3 (the-as none (= v1-10 #f))) a0-3)
(begin
(set! v1-12 sv-16)
(set! v1-13 (the-as none (l.w (+ v1-12 4))))
(set! a0-4 sv-24)
(set! a0-5 (the-as none (!= v1-13 a0-4)))
a0-5
)
(begin
(set! t9-2 (the-as none string=))
(set! v1-14 sv-16)
(set! a0-6 (the-as none (l.wu (+ v1-14 8))))
(set! a1-1 (the-as none a0-0))
(set! v0-2 (the-as none (call!)))
(set! v1-11 (the-as none (not v0-2)))
)
)
v1-11
)
(cond
((begin
(set! v1-16 (the-as none a2-0))
(set! a0-7 (the-as none (l.wu v1-16)))
(s.w! (+ v1-16 8) a0-7)
((b! #t L50 (nop!)) (nop!))
(label cfg-16)
(set! v0-3 (the-as none 0))
((b! #t L56 (nop!)) (nop!))
(label cfg-17)
(set! s3-0 (the-as none str-load))
(set! s2-0 (the-as none format))
(set! t9-3 (the-as none clear))
(set! a0-8 (the-as none *temp-string*))
(call!)
(set! a0-9 (the-as none v0-4))
(set! a1-2 (the-as none L100))
(set! a2-1 sv-24)
(set! a3-0 (the-as none a0-0))
(set! t9-4 (the-as none s2-0))
(call!)
(set! a0-10 (the-as none *temp-string*))
(set! a1-3 (the-as none -1))
(set! v1-17 (the-as none -64))
(set! a2-2 (the-as none (l.wu (+ a2-0 8))))
(set! a2-3 (the-as none (+ a2-2 63)))
(set! a2-4 (the-as none (logand v1-17 a2-3)))
(set! v1-18 (the-as none (l.wu (+ a2-0 4))))
(set! a3-1 (the-as none (l.wu (+ a2-0 8))))
(set! a3-2 (the-as none (- v1-18 a3-1)))
(set! t9-5 (the-as none s3-0))
(set! v0-6 (the-as none (call!)))
((b! (not v0-6) L49 (nop!)) (nop!))
(label cfg-19)
(set! t9-6 (the-as none str-load-status))
(set! a0-11 (& sv-32))
(set! v0-7 (the-as none (call!)))
(set! v1-20 (the-as none v0-7))
(set! a0-12 (the-as none 'error))
((b! (!= v1-20 a0-12) L52 (set! a0-13 #f)) (empty-form))
(set! t9-7 (the-as none format))
(set! a0-14 (the-as none 0))
(set! a1-4 (the-as none L99))
(call!)
(set! v0-3 (the-as none 0))
((b! #t L56 (nop!)) (nop!))
(set! v1-21 (the-as none 0))
((b! #t L54 (nop!)) (nop!))
(label cfg-22)
(set! a0-15 sv-32)
(set! a1-5 sv-40)
(set! a1-6 (the-as none (+ a1-5 -300)))
(>=.si a0-15 a1-6)
)
(return (begin
(set! t9-8 (the-as none format))
(set! a0-17 (the-as none 0))
(set! a1-7 (the-as none L98))
(call!)
(set! v0-3 (the-as none 0))
)
)
)
cfg-16
:delay (nop!)
)
)
((begin (set! a0-18 (the-as none 'busy)) (= v1-20 a0-18))
(begin (nop!) (nop!) (nop!) (nop!) (nop!) (nop!) (goto cfg-19))
)
)
(label cfg-19)
(let ((v1-20 (str-load-status (the-as (pointer int32) (& sv-32)))))
(b! (!= v1-20 'error) cfg-22 :delay (empty-form))
(format 0 "Error loading text~%")
(set! v0-3 0)
(b! #t cfg-30 :delay (nop!))
(the-as none 0)
(b! #t cfg-27 :delay (nop!))
(label cfg-22)
(cond
((>= sv-32 (+ sv-40 -300))
(format 0 "Game text heap overrun!~%")
(return 0)
)
((= v1-20 'busy)
(nop!)
(nop!)
(nop!)
(nop!)
(nop!)
(nop!)
(goto cfg-19)
)
)
)
(label cfg-27)
(let ((s2-1 (logand -64 (&+ (-> arg2 current) 63))))
(flush-cache 0)
(let ((s3-1 link))
(format (clear *temp-string*) "~D~S.TXT" sv-24 arg0)
(set! (-> arg1 0) (the-as game-text-info (s3-1 s2-1 (-> *temp-string* data) sv-32 arg2 0)))
)
)
(if (<= (the-as int (-> arg1 0)) 0)
(set! (-> arg1 0) #f)
(if (begin
(label cfg-27)
(set! v1-24 (the-as none -64))
(set! a0-19 (the-as none (l.wu (+ a2-0 8))))
(set! a0-20 (the-as none (+ a0-19 63)))
(set! s2-1 (the-as none (logand v1-24 a0-20)))
(set! t9-9 (the-as none flush-cache))
(set! a0-21 (the-as none 0))
(call!)
(set! s3-1 (the-as none link))
(set! s1-0 (the-as none format))
(set! t9-10 (the-as none clear))
(set! a0-22 (the-as none *temp-string*))
(call!)
(set! a0-23 (the-as none v0-11))
(set! a1-8 (the-as none L100))
(set! a2-5 sv-24)
(set! t9-11 (the-as none s1-0))
(set! a3-3 (the-as none a0-0))
(call!)
(set! v1-25 (the-as none *temp-string*))
(set! a1-9 (the-as none (+ v1-25 4)))
(set! a2-6 sv-32)
(set! t0-0 (the-as none 0))
(set! t9-12 (the-as none s3-1))
(set! a0-24 (the-as none s2-1))
(set! a3-4 (the-as none a2-0))
(set! v0-13 (the-as none (call!)))
(s.w! a1-0 v0-13)
(set! v1-26 (the-as none (l.wu a1-0)))
(<=0.si v1-26)
)
(s.w! a1-0 #f)
)
)
(set! v0-3 0)
(set! v0-3 (the-as none 0))
(label cfg-30)
v0-3
(ret-value v0-3)
)
;; definition for function load-level-text-files
@@ -340,7 +520,7 @@
This function made more sense back when text files were split up, but in the end they put everything
in a single text group and file."
(if (or *level-text-file-load-flag* (>= arg0 0))
(load-game-text-info "common" (the-as (pointer game-text-info) '*common-text*) *common-text-heap*)
(load-game-text-info "common" '*common-text* *common-text-heap*)
)
0
(none)
+3 -3
View File
@@ -27,6 +27,8 @@
"rand-vu-init",
"rand-vu",
"rand-vu-nostep",
// text - TODO - https://github.com/open-goal/jak-project/issues/1939
"load-game-text-info",
// MATRIX
"matrix-axis-sin-cos-vu!",
"matrix-axis-sin-cos!",
@@ -85,10 +87,8 @@
"v-slrp2!",
"v-slrp3!",
// cam-master
// - focus understanding / decomp crashes
"reset-target-tracking",
// - incomplete bitfield?
"(method 16 camera-master)",
"master-track-target",
// cam-states
// - mostly decompiler crashes/hangs
"cam-bike-code",