decomp: logic-target (#1861)

Also adds all names for `focus-status`.

Closes #1859 and updates ref tests for Jak 1 for this edge case.
This commit is contained in:
Hat Kid
2022-09-09 00:26:33 +02:00
committed by GitHub
parent f3c63f26bb
commit bb777e4bac
46 changed files with 8461 additions and 937 deletions
+1 -67
View File
@@ -3239,73 +3239,7 @@
(logclear! (-> obj flags) (nav-control-flags navcf9 navcf17 navcf18 navcf19))
(TODO-RENAME-27 obj)
(if (logtest? (-> obj flags) (nav-control-flags navcf8))
(TODO-RENAME-28 obj (collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 obj (the-as collide-kind -1))
)
(dummy-13 obj arg0 (-> obj old-travel))
(-> obj mesh)
+1 -67
View File
@@ -1962,73 +1962,7 @@ nav-enemy-default-event-handler
(set! (-> s4-0 quad) (-> obj collide-info trans quad))
(set! (-> obj collide-info trans quad) (-> arg0 quad))
(let ((gp-0 (-> obj nav)))
(TODO-RENAME-28 gp-0 (collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 gp-0 (the-as collide-kind -1))
(set! (-> obj collide-info trans quad) (-> s4-0 quad))
(let* ((v1-8 (-> gp-0 mesh origin))
(f0-1 (- (-> arg0 x) (-> v1-8 x)))
+1 -67
View File
@@ -1364,73 +1364,7 @@
(defmethod TODO-RENAME-20 mother-spider ((obj mother-spider) (arg0 vector) (arg1 vector))
(set! (-> obj nav nav-cull-radius) 40960.0)
(set-current-poly! (-> obj nav) (dummy-16 (-> obj nav) (-> obj root-override trans)))
(TODO-RENAME-28 (-> obj nav) (collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 (-> obj nav) (the-as collide-kind -1))
(dotimes (s3-1 4)
(let ((f28-0 (+ 32768.0 (-> obj orient-rot y)))
(f30-0 (rand-vu-float-range 16384.0 40960.0))
+1 -67
View File
@@ -929,73 +929,7 @@
(set! (-> s5-0 found-best) #f)
(let ((s4-0 (-> obj nav)))
(TODO-RENAME-27 s4-0)
(TODO-RENAME-28 s4-0 (collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 s4-0 (the-as collide-kind -1))
)
(let ((s4-1 (target-pos 0)))
(vector-! (-> s5-0 away-vec) (-> obj collide-info trans) s4-1)
+3 -205
View File
@@ -770,75 +770,7 @@
(.svf (&-> v1-7 quad) vf1)
)
(let ((gp-0 #f))
(TODO-RENAME-28
(-> self nav)
(collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 (-> self nav) (the-as collide-kind -1))
(let ((a2-1 (new 'stack-no-clear 'check-vector-collision-with-nav-spheres-info)))
(if (>= (dummy-23 (-> self nav) (-> self nav travel) a2-1) 0.0)
(set! gp-0 #t)
@@ -889,73 +821,7 @@
;; definition for method 52 of type double-lurker
;; INFO: Used lq/sq
(defmethod dummy-52 double-lurker ((obj double-lurker) (arg0 vector))
(TODO-RENAME-28 (-> obj nav) (collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 (-> obj nav) (the-as collide-kind -1))
(let ((a1-2 (new 'stack-no-clear 'vector)))
(vector-float*! a1-2 (-> obj hit-from-dir) 22937.602)
(vector+! a1-2 a1-2 (-> obj collide-info trans))
@@ -1056,75 +922,7 @@
(.svf (&-> v1-7 quad) vf1)
)
(let ((gp-0 #f))
(TODO-RENAME-28
(-> self nav)
(collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 (-> self nav) (the-as collide-kind -1))
(let ((a2-1 (new 'stack-no-clear 'check-vector-collision-with-nav-spheres-info)))
(if (>= (dummy-23 (-> self nav) (-> self nav travel) a2-1) 0.0)
(set! gp-0 #t)
+1 -69
View File
@@ -415,75 +415,7 @@
)
)
(TODO-RENAME-27 (-> obj nav))
(TODO-RENAME-28
(-> obj nav)
(collide-kind
background
cak-1
cak-2
cak-3
target
water
powerup
crate
enemy
wall-object
projectile
ground-object
target-attack
mother-spider
cak-14
blue-eco-suck
unknown-16
unknown-17
unknown-18
unknown-19
unknown-20
unknown-21
unknown-22
unknown-23
unknown-24
unknown-25
unknown-26
unknown-27
unknown-28
unknown-29
unknown-30
unknown-31
unknown-32
unknown-33
unknown-34
unknown-35
unknown-36
unknown-37
unknown-38
unknown-39
unknown-40
unknown-41
unknown-42
unknown-43
unknown-44
unknown-45
unknown-46
unknown-47
unknown-48
unknown-49
unknown-50
unknown-51
unknown-52
unknown-53
unknown-54
unknown-55
unknown-56
unknown-57
unknown-58
unknown-59
unknown-60
unknown-61
unknown-62
unknown-63
)
)
(TODO-RENAME-28 (-> obj nav) (the-as collide-kind -1))
(dummy-13 (-> obj nav) arg0 (-> obj root-override transv))
(let ((f30-0 (* (vector-xz-length (-> obj nav travel)) (-> *display* frames-per-second))))
(let ((f0-11 (atan (-> obj nav travel x) (-> obj nav travel z)))
+2 -2
View File
@@ -155,7 +155,7 @@
(generate-frame-function function :offset-assert 24)
(prebind-function function :offset-assert 28)
(postbind-function function :offset-assert 32)
(effect basic :offset-assert 36)
(effect effect-control :offset-assert 36)
(interp-select int64 2 :offset-assert 40)
(top-anim top-anim-joint-control :offset-assert 56)
(override basic :offset-assert 60)
@@ -167,7 +167,7 @@
(:methods
(new (symbol type int) _type_ 0)
(joint-control-method-9 () none 9)
(joint-control-method-10 () none 10)
(joint-control-method-10 (_type_) none 10)
(debug-print-channels (_type_ symbol) int 11)
)
)
+1 -1
View File
@@ -525,7 +525,7 @@
:exit (behavior ()
(if (and *target*
(logtest? (-> *camera* master-options) 1)
(logtest? (-> *target* focus-status) (focus-status fs8))
(logtest? (-> *target* focus-status) (focus-status in-head))
)
(send-event *target* 'end-mode)
)
+1 -5
View File
@@ -159,7 +159,7 @@
(collide-cache-method-13 () none 13)
(fill-using-spheres (_type_ collide-query) none 14)
(collide-cache-method-15 () none 15)
(collide-cache-method-16 () none 16)
(collide-cache-method-16 (_type_) float 16)
(probe-using-spheres (_type_ collide-query) symbol 17)
(collide-cache-method-18 () none 18)
(collide-cache-method-19 () none 19)
@@ -251,7 +251,3 @@
;; failed to figure out what this is:
(kmemclose)
+2 -6
View File
@@ -53,8 +53,8 @@
:size-assert #x1e4
:flag-assert #xb000001e4
(:methods
(edge-grab-info-method-9 () none 9)
(edge-grab-info-method-10 () none 10)
(edge-grab-info-method-9 (_type_) symbol 9)
(debug-draw (_type_) symbol 10)
)
)
@@ -373,7 +373,3 @@
;; failed to figure out what this is:
(kmemclose)
+6 -6
View File
@@ -1307,10 +1307,10 @@
(:methods
(new (symbol type process-drawable collide-list-enum) _type_ 0)
(collide-shape-method-28 () none 28)
(collide-shape-method-29 () none 29)
(collide-shape-method-29 (_type_ vector) none 29)
(collide-shape-method-30 () none 30)
(collide-shape-method-31 () none 31)
(collide-shape-method-32 () none 32)
(collide-shape-method-32 (_type_ vector uint int) none 32)
(collide-shape-method-33 () none 33)
(collide-shape-method-34 () none 34)
(collide-shape-method-35 () none 35)
@@ -1318,13 +1318,13 @@
(collide-shape-method-37 () none 37)
(collide-shape-method-38 () none 38)
(collide-shape-method-39 () none 39)
(collide-shape-method-40 () none 40)
(find-overlapping-shapes (_type_ overlaps-others-params) symbol 40)
(collide-shape-method-41 () none 41)
(collide-shape-method-42 () none 42)
(collide-shape-method-43 () none 43)
(collide-shape-method-44 () none 44)
(collide-shape-method-45 () none 45)
(collide-shape-method-46 () none 46)
(collide-shape-method-46 (_type_) none 46)
(collide-shape-method-47 () none 47)
(collide-shape-method-48 () none 48)
(collide-shape-method-49 () none 49)
@@ -1614,14 +1614,14 @@
:flag-assert #x44000001dc
(:methods
(new (symbol type process-drawable collide-list-enum) _type_ 0)
(collide-shape-moving-method-55 () none 55)
(collide-shape-moving-method-55 (_type_) symbol 55)
(collide-shape-moving-method-56 () none 56)
(collide-shape-moving-method-57 () none 57)
(collide-shape-moving-method-58 () none 58)
(collide-shape-moving-method-59 () none 59)
(collide-shape-moving-method-60 () none 60)
(collide-shape-moving-method-61 () none 61)
(collide-shape-moving-method-62 () none 62)
(collide-shape-moving-method-62 (_type_) none 62)
(collide-shape-moving-method-63 () none 63)
(collide-shape-moving-method-64 () none 64)
(collide-shape-moving-method-65 () none 65)
+140 -9
View File
@@ -3,15 +3,146 @@
;; definition of type control-info
(deftype control-info (collide-shape-moving)
((unknown-qword00 vector :offset 12)
(unknown-float00 float :offset 528)
(unknown-surface00 surface :offset 3832)
(unknown-cpad-info00 cpad-info :offset 3848)
(unknown-time-frame00 time-frame :offset 4624)
(unknown-dword00 uint64 :offset 4656)
(unknown-dword01 uint64 :offset 5944)
(unknown-time-frame01 time-frame :offset 6368)
(pad uint8 :offset 6415)
((unknown-float00 float :offset 448)
(unknown-float01 float :offset 452)
(unknown-float02 float :offset 456)
(unknown-float03 float :offset 460)
(unknown-vector00 vector :inline :offset 480)
(unknown-vector01 vector :inline :offset 496)
(unknown-vector02 vector :inline :offset 512)
(unknown-quaternion00 quaternion :inline :offset 528)
(unknown-quaternion01 quaternion :inline :offset 544)
(unknown-float04 float :offset 560)
(unknown-float05 float :offset 564)
(unknown-float06 float :offset 572)
(unknown-float07 float :offset 576)
(unknown-time-frame00 time-frame :offset 584)
(unknown-vector03 vector :inline :offset 592)
(unknown-quaternion02 quaternion :inline :offset 608)
(unknown-quaternion03 quaternion :inline :offset 624)
(unknown-vector-array00 vector 128 :inline :offset 640)
(unknown-time-frame-array00 time-frame 128 :offset 2688)
(unknown-word00 int32 :offset 3712)
(unknown-vector04 vector :inline :offset 3728)
(unknown-vector05 vector :inline :offset 3744)
(unknown-vector06 vector :inline :offset 3776)
(unknown-dynamics00 dynamics :offset 3824)
(unknown-surface00 surface :offset 3828)
(unknown-surface01 surface :offset 3832)
(unknown-surface02 surface :offset 3836)
(unknown-time-frame02 time-frame :offset 3840)
(unknown-cpad-info00 cpad-info :offset 3848)
(unknown-float08 float :offset 3852)
(unknown-float09 float :offset 3856)
(unknown-float10 float :offset 3860)
(unknown-float11 float :offset 3864)
(unknown-vector07 vector :inline :offset 3872)
(unknown-vector08 vector :inline :offset 3888)
(unknown-vector09 vector :inline :offset 3904)
(unknown-vector10 vector :inline :offset 3920)
(unknown-vector-array01 vector 7 :inline :offset 3936)
(unknown-vector12 vector :inline :offset 4064)
(unknown-vector13 vector :inline :offset 4080)
(unknown-float12 float :offset 4096)
(unknown-float13 float :offset 4100)
(unknown-dword01 int64 :offset 4104)
(unknown-matrix00 matrix :inline :offset 4112)
(unknown-matrix01 matrix :inline :offset 4176)
(unknown-matrix02 matrix :inline :offset 4240)
(unknown-vector14 vector :inline :offset 4320)
(unknown-vector15 vector :inline :offset 4336)
(unknown-matrix03 matrix :inline :offset 4352)
(unknown-dword02 int64 :offset 4416)
(unknown-vector16 vector :inline :offset 4432)
(unknown-float14 float :offset 4448)
(unknown-float15 float :offset 4456)
(unknown-word01 int32 :offset 4460)
(unknown-vector17 vector :inline :offset 4464)
(unknown-vector18 vector :inline :offset 4480)
(unknown-time-frame03 time-frame :offset 4496)
(unknown-time-frame04 time-frame :offset 4504)
(unknown-vector19 vector :inline :offset 4512)
(unknown-vector20 vector :inline :offset 4528)
(unknown-vector21 vector :inline :offset 4544)
(unknown-float16 float :offset 4548)
(unknown-vector22 vector :inline :offset 4560)
(unknown-vector23 vector :inline :offset 4576)
(unknown-time-frame05 time-frame :offset 4624)
(unknown-float17 float :offset 4636)
(unknown-float18 float :offset 4640)
(unknown-float19 float :offset 4644)
(unknown-float20 float :offset 4648)
(unknown-time-frame06 time-frame :offset 4656)
(unknown-time-frame07 time-frame :offset 4672)
(unknown-pat-surface00 pat-surface :offset 4680)
(unknown-vector24 vector :inline :offset 4688)
(unknown-vector25 vector :inline :offset 4720)
(unknown-handle01 handle :offset 4768)
(unknown-pat-surface01 pat-surface :offset 4776)
(unknown-float21 float :offset 4780)
(unknown-float22 float :offset 4784)
(unknown-float23 float :offset 4788)
(unknown-float24 float :offset 4792)
(unknown-float25 float :offset 4796)
(unknown-time-frame08 time-frame :offset 4816)
(unknown-vector26 vector :inline :offset 4928)
(unknwon-vector27 vector :inline :offset 4976)
(unknown-float26 float :offset 4992)
(unknown-time-frame09 time-frame :offset 5000)
(unknown-sphere-array00 collide-shape-prim-sphere 10 :offset 5016)
(unknown-float27 float :offset 5132)
(unknown-float28 float :offset 5136)
(unknown-float29 float :offset 5140)
(unknown-vector28 vector :inline :offset 5152)
(unknown-vector29 vector :inline :offset 5168)
(unknown-vector30 vector :inline :offset 5184)
(unknown-vector31 vector :inline :offset 5200)
(unknown-vector32 vector :inline :offset 5216)
(unknown-vector33 vector :inline :offset 5232)
(unknown-float31 float :offset 5256)
(unknown-vector-array02 vector 15 :inline :offset 5264)
(unknown-float32 float :offset 5520)
(unknown-word02 int32 :offset 5524)
(unknown-float33 float :offset 5528)
(unknown-vector34 vector :inline :offset 5536)
(unknown-vector35 vector :inline :offset 5568)
(unknown-time-frame10 time-frame :offset 5584)
(unknown-time-frame11 time-frame :offset 5592)
(unknown-handle00 handle :offset 5608)
(unknown-symbol00 symbol :offset 5620)
(unknown-cspace02 cspace :inline :offset 5824)
(unknown-vector36 vector :inline :offset 5904)
(unknown-float34 float :offset 5908)
(unknown-vector37 vector :inline :offset 5920)
(unknown-float35 float :offset 5924)
(unknown-time-frame12 time-frame :offset 5944)
(unknown-dword05 uint64 :offset 6008)
(unknown-symbol01 symbol :offset 6144)
(unknown-halfword00 uint16 :offset 6188)
(history-length uint16 :offset 6190)
(unknown-word03 int32 :offset 6192)
(unknown-time-frame13 time-frame :offset 6200)
(unknown-time-frame14 time-frame :offset 6208)
(unknown-time-frame15 time-frame :offset 6216)
(unknown-time-frame16 time-frame :offset 6224)
(unknown-time-frame17 time-frame :offset 6248)
(unknown-time-frame18 time-frame :offset 6256)
(unknown-dword06 int64 :offset 6264)
(unknown-sound-id00 sound-id :offset 6240)
(unknown-sound-id01 sound-id :offset 6244)
(unknown-sound-id02 sound-id :offset 6292)
(unknown-word04 int32 :offset 6300)
(unknown-word05 int32 :offset 6304)
(unknown-word06 int32 :offset 6308)
(unknown-word07 int32 :offset 6312)
(unknown-time-frame19 time-frame :offset 6320)
(unknown-time-frame20 time-frame :offset 6328)
(unknown-dword07 int64 :offset 6336)
(unknown-time-frame21 time-frame :offset 6368)
(unknown-quaternion04 quaternion :inline :offset 6384)
(unknown-time-frame22 time-frame :offset 6400)
(unknown-time-frame23 time-frame :offset 6408)
(pad uint8 :offset 6415)
)
:method-count-assert 68
:size-assert #x1910
+1 -1
View File
@@ -613,7 +613,7 @@
(draw-control-method-11 () none 11)
(draw-control-method-12 () none 12)
(draw-control-method-13 () none 13)
(draw-control-method-14 () none 14)
(draw-control-method-14 (_type_ cspace-array joint-control) none 14)
)
)
+16 -22
View File
@@ -5129,30 +5129,24 @@
)
)
(function "Trick Mode" #f (lambda () (send-event *target* 'get-pickup 20 #x468ca000)))
(function
"Reset Trans"
#f
(lambda () (when *target*
(position-in-front-of-camera! (target-pos 0) 40960.0 4096.0)
(set! (-> *target* control transv quad) (the-as uint128 0))
(quaternion-identity! (-> *target* control quat))
(quaternion-identity! (the-as quaternion (&-> (-> *target* control) unknown-float00)))
(quaternion-identity! (-> *target* control dir-targ))
)
(function "Reset Trans" #f (lambda () (when *target*
(position-in-front-of-camera! (target-pos 0) 40960.0 4096.0)
(set! (-> *target* control transv quad) (the-as uint128 0))
(quaternion-identity! (-> *target* control quat))
(quaternion-identity! (-> *target* control unknown-quaternion00))
(quaternion-identity! (-> *target* control dir-targ))
)
)
)
)
(function
"Zero Trans"
#f
(lambda () (when *target*
(set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0)
(set! (-> *target* control transv quad) (the-as uint128 0))
(quaternion-identity! (-> *target* control quat))
(quaternion-identity! (the-as quaternion (&-> (-> *target* control) unknown-float00)))
(quaternion-identity! (-> *target* control dir-targ))
)
(function "Zero Trans" #f (lambda () (when *target*
(set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0)
(set! (-> *target* control transv quad) (the-as uint128 0))
(quaternion-identity! (-> *target* control quat))
(quaternion-identity! (-> *target* control unknown-quaternion00))
(quaternion-identity! (-> *target* control dir-targ))
)
)
)
)
(flag "Slow Frame Rate" *slow-frame-rate* dm-boolean-toggle-pick-func)
(function "Print Pos" #f (lambda ()
(let ((v1-0 (target-pos 0)))
+32 -32
View File
@@ -81,8 +81,8 @@
(format #t "~1Tchannel: ~D~%" (-> obj channel))
(format #t "~1Ttimestamp: ~D~%" (-> obj timestamp))
(format #t "~1Torigin: #<vector @ #x~X>~%" (-> obj origin))
(format #t "~1Tbytes[16] @ #x~X~%" (-> obj bytes))
(format #t "~1Tvector: #<vector @ #x~X>~%" (-> obj bytes))
(format #t "~1Tbytes[16] @ #x~X~%" (-> obj vector))
(format #t "~1Tvector: #<vector @ #x~X>~%" (-> obj vector))
(format #t "~1Tfloat: ~f~%" (-> obj vector x))
(format #t "~1Tcollide-status: ~D~%" (-> obj collide-status))
(format #t "~1Tcollide-reaction-flag: ~D~%" (-> obj vector z))
@@ -96,7 +96,7 @@
((max-age uint32 :offset-assert 4)
(owner uint8 :offset-assert 8)
(proc process :offset-assert 12)
(out basic :offset-assert 16)
(out object :offset-assert 16)
(channel-mask uint64 :offset-assert 24)
(index int32 :offset-assert 32)
(done? symbol :offset-assert 36)
@@ -105,7 +105,7 @@
:size-assert #x28
:flag-assert #xc00000028
(:methods
(new (symbol type uint32) _type_ 0)
(new (symbol type uint) _type_ 0)
(frame-counter-delta (_type_ history-elt) time-frame 9)
(update-entries! (_type_) history-elt 10)
(history-iterator-method-11 (_type_ history-elt) float 11)
@@ -246,9 +246,9 @@
)
;; definition for method 0 of type history-iterator
(defmethod new history-iterator ((allocation symbol) (type-to-make type) (arg0 uint32))
(defmethod new history-iterator ((allocation symbol) (type-to-make type) (arg0 uint))
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> v0-0 max-age) (the-as uint arg0))
(set! (-> v0-0 max-age) arg0)
(set! (-> v0-0 owner) (the-as uint 1))
(set! (-> v0-0 proc) #f)
(set! (-> v0-0 out) *stdcon*)
@@ -473,7 +473,7 @@
;; WARN: new jak 2 until loop case, check carefully
(defun history-print ((arg0 history-iterator))
(local-vars
(sv-16 basic)
(sv-16 object)
(sv-24 int)
(sv-32 int)
(sv-40 history-elt)
@@ -657,11 +657,11 @@
(a0-7 history-channel)
(a0-9 symbol)
(a0-10 symbol)
(a0-11 (pointer uint8))
(a0-12 (pointer uint8))
(a0-11 vector)
(a0-12 vector)
(a0-13 symbol)
(a0-14 symbol)
(a0-15 (pointer uint8))
(a0-15 vector)
(a0-16 symbol)
(a0-18 symbol)
(a0-20 symbol)
@@ -697,10 +697,10 @@
(a1-29 float)
(a1-30 float)
(a1-31 int)
(a2-1 (pointer uint8))
(a2-2 (pointer uint8))
(a2-3 (pointer uint8))
(a2-4 (pointer uint8))
(a2-1 vector)
(a2-2 vector)
(a2-3 vector)
(a2-4 vector)
(a2-5 vector)
(a2-6 vector)
(a2-7 vector)
@@ -708,16 +708,16 @@
(a2-9 history-channel)
(a2-10 vector)
(a2-11 vector)
(a3-0 (pointer uint8))
(a3-0 vector)
(a3-1 int)
(a3-2 int)
(a3-3 (pointer uint8))
(a3-3 vector)
(a3-4 int)
(a3-5 int)
(a3-6 (pointer uint8))
(a3-7 (pointer uint8))
(a3-8 (pointer uint8))
(a3-9 (pointer uint8))
(a3-6 vector)
(a3-7 vector)
(a3-8 vector)
(a3-9 vector)
(a3-10 vector)
(t0-0 int)
(t0-1 int)
@@ -758,8 +758,8 @@
(f0-6 float)
(f1-0 float)
(f1-1 float)
(sv-16 (pointer uint8))
(sv-20 (pointer uint8))
(sv-16 vector)
(sv-20 vector)
(sv-24 number)
)
(set! sv-16 #f)
@@ -775,7 +775,7 @@
(set! a0-9 #t)
(set! a1-5 318)
(set! a2-1 sv-16)
(set! a3-0 (-> s5-0 bytes))
(set! a3-0 (-> s5-0 vector))
(set! t0-0 #xffff00)
(set! v1-9 (shl v1-8 24))
(set! t0-1 (logior #xffff00 (shl v1-8 24)))
@@ -788,7 +788,7 @@
(set! t9-4 add-debug-x)
(set! a0-10 #t)
(set! a1-6 318)
(set! a2-2 (-> s5-0 bytes))
(set! a2-2 (-> s5-0 vector))
(set! a3-1 #xffff00)
(set! v1-11 (sll v1-8 24))
(set! a3-2 (logior a3-1 v1-11))
@@ -796,7 +796,7 @@
(set! v1-12 v0-4)
)
)
(set! a0-11 (-> s5-0 bytes))
(set! a0-11 (-> s5-0 vector))
(set! sv-16 a0-11)
)
((begin (set! a1-7 4) (= a0-7 a1-7))
@@ -806,7 +806,7 @@
(set! a0-13 #t)
(set! a1-9 318)
(set! a2-3 sv-20)
(set! a3-3 (-> s5-0 bytes))
(set! a3-3 (-> s5-0 vector))
(set! t0-2 #xffffff)
(set! v1-13 (sll v1-8 24))
(set! t0-3 (logior t0-2 v1-13))
@@ -819,7 +819,7 @@
(set! t9-6 add-debug-x)
(set! a0-14 #t)
(set! a1-10 318)
(set! a2-4 (-> s5-0 bytes))
(set! a2-4 (-> s5-0 vector))
(set! a3-4 #xffffff)
(set! v1-15 (sll v1-8 24))
(set! a3-5 (logior a3-4 v1-15))
@@ -827,7 +827,7 @@
(set! v1-16 v0-6)
)
)
(set! a0-15 (-> s5-0 bytes))
(set! a0-15 (-> s5-0 vector))
(set! sv-20 a0-15)
)
((begin (set! a1-11 1) (= a0-7 a1-11))
@@ -835,7 +835,7 @@
(set! a0-16 #t)
(set! a1-13 318)
(set! a2-5 (-> s5-0 origin))
(set! a3-6 (-> s5-0 bytes))
(set! a3-6 (-> s5-0 vector))
(set! t0-4 #x3dcccccd)
(set! v1-17 (sll v1-8 24))
(set! t1-2 (logior v1-17 #xff00))
@@ -847,7 +847,7 @@
(set! a0-18 #t)
(set! a1-16 318)
(set! a2-6 (-> s5-0 origin))
(set! a3-7 (-> s5-0 bytes))
(set! a3-7 (-> s5-0 vector))
(set! t0-5 #x3dcccccd)
(set! t1-3 #x408040)
(set! v1-18 (sll v1-8 24))
@@ -860,7 +860,7 @@
(set! a0-20 #t)
(set! a1-19 318)
(set! a2-7 (-> s5-0 origin))
(set! a3-8 (-> s5-0 bytes))
(set! a3-8 (-> s5-0 vector))
(set! t0-6 #x3dcccccd)
(set! t1-5 #x404080)
(set! v1-19 (sll v1-8 24))
@@ -888,7 +888,7 @@
(set! a0-29 #t)
(set! a1-25 318)
(set! a2-10 (-> s5-0 origin))
(set! a3-9 (-> s5-0 bytes))
(set! a3-9 (-> s5-0 vector))
(set! t0-7 #x45800000)
(set! v1-20 (sll v1-8 24))
(set! t1-8 (logior t1-7 v1-20))
+1 -1
View File
@@ -1565,7 +1565,7 @@
)
((= v1-0 (gui-channel query))
(and (not (or (logtest? (-> *art-control* frame-mask) 28) (!= *master-mode* 'game)))
(and *target* (zero? (logand (-> *target* focus-status) (focus-status fs1 fs6))))
(and *target* (zero? (logand (-> *target* focus-status) (focus-status dead hit))))
)
)
(else
+10 -9
View File
@@ -37,9 +37,9 @@
;; definition of type board-info
(deftype board-info (basic)
((board uint32 :offset-assert 4)
((board (pointer board) :offset-assert 4)
(camera-interp float :offset-assert 8)
(process uint32 :offset-assert 12)
(process (pointer target) :offset-assert 12)
(board-trans vector :inline :offset-assert 16)
(board-quat vector :inline :offset-assert 32)
(board-scale vector :inline :offset-assert 48)
@@ -391,17 +391,18 @@
)
)
(not *pause-lock*)
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame01)) (seconds 0.1))
(>= (the-as int (-> self control unknown-dword00)) (the-as int (-> self control unknown-dword01)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame21)) (seconds 0.1))
(>= (-> self control unknown-time-frame06) (-> self control unknown-time-frame12))
)
(-> self board latch?)
)
(zero? (logand (focus-status fs1 fs6 fs7 fs8 fs12 fs13 fs18 fs20 fs21 fs22) (-> self focus-status)))
(zero? (logand (focus-status dead hit grabbed in-head edge-grab pole board pilot mech dark) (-> self focus-status))
)
(or (zero? (-> self board)) (>= (- (-> self clock frame-counter) (-> self board board-time)) (seconds 0.5)))
(zero? (logand (state-flags sf17) (-> self state-flags)))
(< (-> self board board-time) (-> self control unknown-time-frame00))
(zero? (logand (surface-flag no-board) (-> self control unknown-surface00 flags)))
(or (zero? (logand (-> self control unknown-surface00 flags) (surface-flag duck)))
(< (-> self board board-time) (-> self control unknown-time-frame05))
(zero? (logand (surface-flag no-board) (-> self control unknown-surface01 flags)))
(or (zero? (logand (-> self control unknown-surface01 flags) (surface-flag duck)))
(begin self (can-exit-duck?))
)
(not (and (logtest? (-> self water flags) (water-flags under-water))
@@ -416,7 +417,7 @@
)
(let ((v1-51 (new 'stack-no-clear 'vector)))
(set! (-> v1-51 quad) (-> self control trans quad))
(if (logtest? (-> self focus-status) (focus-status fs10))
(if (logtest? (-> self focus-status) (focus-status on-water))
(set! (-> v1-51 y) (-> self water height))
)
(set! (-> s5-0 0 quad) (-> v1-51 quad))
+3 -3
View File
@@ -68,7 +68,7 @@
)
focus-status
)
(focus-status fs8)
(focus-status in-head)
)
)
(go-virtual idle #f)
@@ -104,7 +104,7 @@
)
focus-status
)
(focus-status fs8)
(focus-status in-head)
)
(go-virtual hidden)
)
@@ -161,7 +161,7 @@
)
focus-status
)
(focus-status fs8)
(focus-status in-head)
)
(go-virtual hidden)
)
+6 -6
View File
@@ -466,19 +466,19 @@
(local-vars (v1-36 symbol))
(and (logtest? (-> arg0 game features) (game-feature unk-game-feature-06))
(>= (- (-> self clock frame-counter) (-> arg0 gun gun-time)) (seconds 0.1))
(zero? (logand (focus-status fs1 fs6 fs18 fs21 fs22 fs30) (-> arg0 focus-status)))
(zero? (logand (surface-flag gun-inactive gun-hide gun-off) (-> arg0 control unknown-surface00 flags)))
(zero? (logand (focus-status dead hit board mech dark teleporting) (-> arg0 focus-status)))
(zero? (logand (surface-flag gun-inactive gun-hide gun-off) (-> arg0 control unknown-surface01 flags)))
(zero? (logand (state-flags sf18) (-> arg0 state-flags)))
(logtest? (the-as game-feature (logand (-> *setting-control* user-current features) 960))
(-> arg0 game features)
)
(or (zero? (logand (-> arg0 control unknown-surface00 flags) (surface-flag duck))) (can-exit-duck?))
(or (zero? (logand (focus-status fs20) (-> arg0 focus-status))) (-> arg0 pilot gun?))
(or (zero? (logand (-> arg0 control unknown-surface01 flags) (surface-flag duck))) (can-exit-duck?))
(or (zero? (logand (focus-status pilot) (-> arg0 focus-status))) (-> arg0 pilot gun?))
(or arg1
(nonzero? (-> arg0 gun using-gun-type))
(begin
(set! v1-36 (and (cpad-hold? (-> arg0 control unknown-cpad-info00 number) r1)
(zero? (logand (-> arg0 focus-status) (focus-status fs7)))
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
(begin (set! v1-36 #t) (set! (-> arg0 gun latch?) v1-36) v1-36)
)
)
@@ -487,7 +487,7 @@
(-> arg0 gun latch?)
)
(not (-> arg0 skel top-anim frame-group))
(>= (- (-> self clock frame-counter) (the-as int (-> arg0 control unknown-dword01))) (seconds 0.1))
(>= (- (-> self clock frame-counter) (-> arg0 control unknown-time-frame12)) (seconds 0.1))
)
)
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -235,7 +235,9 @@
(set! (-> obj were-behind?) #t)
)
(and (< (-> obj latch-closed-time) (-> self clock frame-counter))
(or (not (and *target* (logtest? (focus-status fs20 fs30) (-> *target* focus-status)))) (< f30-0 -409.6))
(or (not (and *target* (logtest? (focus-status pilot teleporting) (-> *target* focus-status))))
(< f30-0 -409.6)
)
(or (and (< f30-0 (-> obj open-distance))
(or (not (-> obj were-behind?)) (< f30-0 20480.0))
(and (or (< 409.6 f30-0)
@@ -257,7 +259,7 @@
)
s5-0
(let ((f0-8 (check-crossing-distance obj (camera-pos) #f)))
(and (or (not *target*) (zero? (logand (-> *target* focus-status) (focus-status fs8))))
(and (or (not *target*) (zero? (logand (-> *target* focus-status) (focus-status in-head))))
(or (< (* f30-0 f0-8) 0.0)
(and (< (fabs f0-8) 4096.0)
(< (vector-vector-xz-distance (camera-pos) (-> obj root-override trans)) (-> obj door-radius))