mirror of
https://github.com/open-goal/jak-project
synced 2026-06-21 08:41:48 -04:00
d/jak2: finish more of cam-master which allows the game to start it's settings routine
This commit is contained in:
+1162
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -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
@@ -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
|
||||
|
||||
+5
-6
@@ -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
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user