mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-24 06:39:51 +00:00
[jak2] decomp cleanup of traffic
things + fix stadium
crash (#2319)
This commit is contained in:
parent
0c64d48b0d
commit
0cf285ef99
@ -9016,7 +9016,7 @@
|
||||
|
||||
(deftype traffic-suppression-params (structure)
|
||||
((bbox bounding-box :inline :offset-assert 0)
|
||||
(duration uint64 :offset-assert 32)
|
||||
(duration time-frame :offset-assert 32)
|
||||
(id int8 :offset-assert 40)
|
||||
)
|
||||
:method-count-assert 13
|
||||
@ -9058,6 +9058,21 @@
|
||||
)
|
||||
;; ---traffic-h:traffic-type
|
||||
|
||||
;; +++traffic-h:traffic-spawn-flags
|
||||
(defenum traffic-spawn-flags
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(trsflags-00)
|
||||
(trsflags-01)
|
||||
(trsflags-02)
|
||||
(dark-guard)
|
||||
(trsflags-04)
|
||||
(trsflags-05)
|
||||
(trsflags-06)
|
||||
(trsflags-07)
|
||||
)
|
||||
;; ---traffic-h:traffic-spawn-flags
|
||||
|
||||
(declare-type nav-mesh basic)
|
||||
(declare-type nav-branch structure)
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
@ -9072,7 +9087,7 @@
|
||||
(handle handle :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(flags traffic-spawn-flags :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
)
|
||||
:method-count-assert 9
|
||||
@ -51169,7 +51184,7 @@
|
||||
(v-speed vector :inline :offset-assert 1088)
|
||||
(end-pos vector :inline :offset-assert 1104)
|
||||
(task-done? symbol :offset-assert 1120)
|
||||
(task-node uint16 :offset-assert 1124)
|
||||
(task-node game-task-node :offset-assert 1124)
|
||||
(jump-in-pipe? symbol :offset-assert 1128)
|
||||
(pipe-name string :offset-assert 1132)
|
||||
(coming-from-pw symbol :offset-assert 1136)
|
||||
|
@ -1923,7 +1923,7 @@
|
||||
],
|
||||
"(method 45 nav-mesh)": [
|
||||
[15, "v1", "entity-nav-mesh"],
|
||||
[[34, 43], "v1", "nav-mesh"]
|
||||
[[34, 43], "v1", "nav-mesh-link"]
|
||||
],
|
||||
"(method 13 nav-engine)": [
|
||||
[[53, 65], "s4", "nav-mesh"],
|
||||
|
@ -55,6 +55,21 @@
|
||||
)
|
||||
;; ---traffic-h:traffic-type
|
||||
|
||||
;; +++traffic-h:traffic-spawn-flags
|
||||
(defenum traffic-spawn-flags
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(trsflags-00)
|
||||
(trsflags-01)
|
||||
(trsflags-02)
|
||||
(dark-guard)
|
||||
(trsflags-04)
|
||||
(trsflags-05)
|
||||
(trsflags-06)
|
||||
(trsflags-07)
|
||||
)
|
||||
;; ---traffic-h:traffic-spawn-flags
|
||||
|
||||
;; NOTE - for default-menu
|
||||
(define-extern traffic-start (function none))
|
||||
(define-extern traffic-kill (function none))
|
||||
@ -95,7 +110,7 @@
|
||||
|
||||
(deftype traffic-suppression-params (structure)
|
||||
((bbox bounding-box :inline :offset-assert 0)
|
||||
(duration uint64 :offset-assert 32)
|
||||
(duration time-frame :offset-assert 32)
|
||||
(id int8 :offset-assert 40)
|
||||
)
|
||||
:method-count-assert 13
|
||||
@ -117,19 +132,19 @@
|
||||
)
|
||||
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle handle :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle handle :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags traffic-spawn-flags :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x68
|
||||
|
@ -1824,7 +1824,7 @@
|
||||
)
|
||||
|
||||
(defbehavior task-manager-init-by-other task-manager ((arg0 game-task-node-info) (arg1 symbol))
|
||||
(stack-size-set! (-> self main-thread) 4096) ;; increased from 2048
|
||||
(stack-size-set! (-> self main-thread) 4096) ;; increased from 1024
|
||||
(add-connection *task-manager-engine* self nothing self arg0 #f)
|
||||
(set! (-> self node-info) arg0)
|
||||
(set! (-> self lev-name) arg1)
|
||||
|
@ -688,7 +688,7 @@
|
||||
)
|
||||
(when v1-1
|
||||
(let ((a0-3 (-> v1-1 nav-mesh))
|
||||
(v1-2 (the-as structure #f))
|
||||
(v1-2 (the-as nav-mesh-link #f))
|
||||
)
|
||||
(dotimes (a1-2 (the-as int (-> a0-3 link-count)))
|
||||
(let ((a2-1 (-> a0-3 link-array a1-2)))
|
||||
@ -701,13 +701,13 @@
|
||||
(label cfg-7)
|
||||
)
|
||||
(label cfg-10)
|
||||
(when (the-as nav-mesh-link v1-2)
|
||||
(when v1-2
|
||||
(set! (-> arg0 dest-mesh) a0-3)
|
||||
(set! (-> (the-as nav-mesh v1-2) route) (the-as (pointer nav-poly) obj))
|
||||
(set! (-> arg0 dest-link-poly-id) (-> (the-as nav-mesh v1-2) poly-count))
|
||||
(set! (-> arg0 dest-switch-poly-id) (-> (the-as nav-mesh v1-2) static-sphere-count))
|
||||
(set! (-> (the-as nav-mesh v1-2) nav-control-count) (-> arg0 src-switch-poly-id))
|
||||
(set! (-> (the-as nav-mesh v1-2) max-nav-control-count) (-> arg0 src-link-poly-id))
|
||||
(set! (-> v1-2 dest-mesh) obj)
|
||||
(set! (-> arg0 dest-link-poly-id) (-> v1-2 src-switch-poly-id))
|
||||
(set! (-> arg0 dest-switch-poly-id) (-> v1-2 src-link-poly-id))
|
||||
(set! (-> v1-2 dest-link-poly-id) (-> arg0 src-switch-poly-id))
|
||||
(set! (-> v1-2 dest-switch-poly-id) (-> arg0 src-link-poly-id))
|
||||
#t
|
||||
)
|
||||
)
|
||||
|
@ -690,14 +690,14 @@ This commonly includes things such as:
|
||||
(init-enemy-collision! self)
|
||||
(set! (-> self root-override2 trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root-override2 quat) (-> arg0 rotation))
|
||||
(if (not (logtest? (-> arg0 flags) 1))
|
||||
(if (not (logtest? (-> arg0 flags) (traffic-spawn-flags trsflags-00)))
|
||||
(lwide-entity-hack)
|
||||
)
|
||||
(set! (-> self vehicle) (-> arg0 handle))
|
||||
(set! (-> self interp) 0.0)
|
||||
(logclear! (-> self flags) (citizen-flag run-mode))
|
||||
(logclear! (-> self flags) (citizen-flag shuffle-mode))
|
||||
(if (logtest? (-> arg0 flags) 8)
|
||||
(if (logtest? (-> arg0 flags) (traffic-spawn-flags dark-guard))
|
||||
(logior! (-> self flags) (citizen-flag dark-guard))
|
||||
)
|
||||
(init-enemy! self)
|
||||
|
@ -960,7 +960,7 @@ This commonly includes things such as:
|
||||
(quaternion-look-at! (-> s1-0 rotation) s2-0 *up-vector*)
|
||||
(set! (-> s1-0 user-data) (the-as uint s5-1))
|
||||
(set! (-> s1-0 position w) f30-0)
|
||||
(logior! (-> s1-0 flags) 1)
|
||||
(logior! (-> s1-0 flags) (traffic-spawn-flags trsflags-00))
|
||||
(process->handle (vehicle-spawn obj barge s1-0))
|
||||
)
|
||||
(+! f30-0 (/ (* 4096.0 (+ 150.0 (* 150.0 (rand-vu)))) (total-distance s4-0)))
|
||||
|
@ -684,7 +684,7 @@
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle *target*))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(quaternion-identity! (-> s5-0 rotation))
|
||||
|
@ -217,7 +217,7 @@
|
||||
"Kill a suppression box, and inform the traffic manager by setting duration to 0."
|
||||
(when (!= (-> obj id) -1)
|
||||
(let ((s5-0 (-> obj duration)))
|
||||
(set! (-> obj duration) (the-as uint 0))
|
||||
(set! (-> obj duration) 0)
|
||||
(send-event *traffic-manager* 'update-suppression-box obj)
|
||||
(set! (-> obj duration) s5-0)
|
||||
)
|
||||
@ -283,7 +283,7 @@ The param object is updated with the ID of the box and can be later used with up
|
||||
(s4-1 (logior (-> s5-0 flags) (traffic-suppression-box-flags tfsb1)))
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> s5-0 bbox)) (the-as pointer (-> arg0 bbox)) 32)
|
||||
(set! (-> s5-0 duration) (-> arg0 duration))
|
||||
(set! (-> s5-0 duration) (the-as uint (-> arg0 duration)))
|
||||
(set! (-> s5-0 flags) s4-1)
|
||||
)
|
||||
)
|
||||
@ -1528,7 +1528,7 @@ Process is recycled and moved to reserved, if it deactivates."
|
||||
(.add.x.vf vf5 vf4 vf6 :mask #b111)
|
||||
(.svf (&-> a0-2 quad) vf5)
|
||||
)
|
||||
(set! (-> a1-1 duration) (the-as uint 1500))
|
||||
(set! (-> a1-1 duration) (seconds 5))
|
||||
(new-suppression-box obj a1-1)
|
||||
)
|
||||
(let ((v1-5 (-> obj danger-sphere-count)))
|
||||
@ -3421,9 +3421,9 @@ Process is recycled and moved to reserved, if it deactivates."
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (math-camera-pos))
|
||||
(f30-0 81920.0)
|
||||
(f28-0 819200.0)
|
||||
(f26-0 491520.0)
|
||||
(f30-0 (meters 20))
|
||||
(f28-0 (meters 2000))
|
||||
(f26-0 (meters 1200))
|
||||
)
|
||||
(dotimes (s4-0 (the-as int (-> obj city-info cell-count)))
|
||||
(let ((s3-0 (-> obj city-info cell-array s4-0)))
|
||||
|
@ -130,83 +130,147 @@
|
||||
)
|
||||
|
||||
(defmethod spawn-all traffic-manager ((obj traffic-manager))
|
||||
(let ((s5-0 0))
|
||||
(b! #t cfg-4 :delay (nop!))
|
||||
(label cfg-1)
|
||||
(let ((s4-0 (-> obj traffic-engine object-type-info-array s5-0)))
|
||||
|
||||
;; rewritten to remove asm branches
|
||||
|
||||
;; (let ((s5-0 0))
|
||||
;; (b! #t cfg-4 :delay (nop!))
|
||||
;; (label cfg-1)
|
||||
;; (let ((s4-0 (-> obj traffic-engine object-type-info-array s5-0)))
|
||||
;; (logclear! (-> s4-0 flags) (traffic-type-flags trtflags-3))
|
||||
;; (if (= (level-status *level* (-> s4-0 level)) 'active)
|
||||
;; (logior! (-> s4-0 flags) (traffic-type-flags trtflags-3))
|
||||
;; )
|
||||
;; )
|
||||
;; (+! s5-0 1)
|
||||
;; (label cfg-4)
|
||||
;; (b! (< s5-0 21) cfg-1)
|
||||
;; )
|
||||
(dotimes (i 21)
|
||||
(let ((s4-0 (-> obj traffic-engine object-type-info-array i)))
|
||||
(logclear! (-> s4-0 flags) (traffic-type-flags trtflags-3))
|
||||
(if (= (level-status *level* (-> s4-0 level)) 'active)
|
||||
(logior! (-> s4-0 flags) (traffic-type-flags trtflags-3))
|
||||
)
|
||||
)
|
||||
(+! s5-0 1)
|
||||
(label cfg-4)
|
||||
(b! (< s5-0 21) cfg-1)
|
||||
)
|
||||
(let ((s5-1 1)
|
||||
(s4-1 0)
|
||||
(s3-1 #x1fffff)
|
||||
;; (let ((max-to-spawn 1)
|
||||
;; (spawned-nb 0)
|
||||
;; (spawn-mask #x1fffff)
|
||||
;; )
|
||||
;; (if (-> obj fast-spawn)
|
||||
;; (set! max-to-spawn 120)
|
||||
;; )
|
||||
;; (b! #t cfg-36 :delay (nop!))
|
||||
;; (label cfg-8)
|
||||
;; (let* ((spawn-params (-> obj spawn-params))
|
||||
;; (spawn-type (-> spawn-params object-type))
|
||||
;; )
|
||||
;; (when (logtest? spawn-mask (ash 1 spawn-type))
|
||||
;; (let ((s0-0 (-> obj traffic-engine object-type-info-array spawn-type)))
|
||||
;; (let ((v1-21 (+ (-> s0-0 active-count) (-> s0-0 inactive-count))))
|
||||
;; (b!
|
||||
;; (not (and (logtest? (-> s0-0 flags) (traffic-type-flags trtflags-1))
|
||||
;; (logtest? (-> s0-0 flags) (traffic-type-flags trtflags-3))
|
||||
;; (< v1-21 (-> s0-0 want-count))
|
||||
;; )
|
||||
;; )
|
||||
;; cfg-29
|
||||
;; :delay (nop!)
|
||||
;; )
|
||||
;; (set! (-> spawn-params flags) (logand -9 (-> spawn-params flags)))
|
||||
;; (b!
|
||||
;; (not (and (= (-> spawn-params object-type) (traffic-type crimson-guard-1))
|
||||
;; (> (-> obj dark-guard-ratio) 0)
|
||||
;; (zero? (mod v1-21 (-> obj dark-guard-ratio)))
|
||||
;; )
|
||||
;; )
|
||||
;; cfg-25
|
||||
;; :delay (empty-form)
|
||||
;; )
|
||||
;; )
|
||||
;; (logior! (-> spawn-params flags) 8)
|
||||
;; (label cfg-25)
|
||||
;; (let ((traffic-obj (traffic-object-spawn obj spawn-params)))
|
||||
;; (b! (not traffic-obj) cfg-27 :delay (nop!))
|
||||
;; (add-object (-> obj traffic-engine) spawn-type traffic-obj)
|
||||
;; )
|
||||
;; (+! (-> s0-0 reserve-count) -1)
|
||||
;; )
|
||||
;; (+! (-> spawn-params id) 1)
|
||||
;; (+! spawned-nb 1)
|
||||
;; (b! #t cfg-28 :delay (nop!))
|
||||
;; (label cfg-27)
|
||||
;; (format #t "traffic-manager: unable to spawn~%")
|
||||
;; (b! #t cfg-41 :delay (nop!))
|
||||
;; (label cfg-28)
|
||||
;; (b! #t cfg-33 :delay (nop!))
|
||||
;; (label cfg-29)
|
||||
;; (set! spawn-mask (logclear spawn-mask (ash 1 spawn-type)))
|
||||
;; )
|
||||
;; (label cfg-33)
|
||||
;; (let ((next-spawn-type (the-as int (+ spawn-type 1))))
|
||||
;; (if (>= (the-as uint next-spawn-type) (the-as uint 21))
|
||||
;; (set! next-spawn-type 0)
|
||||
;; )
|
||||
;; (set! (-> spawn-params object-type) (the-as traffic-type next-spawn-type))
|
||||
;; )
|
||||
;; )
|
||||
;; (label cfg-36)
|
||||
;; (b! (and (< spawned-nb max-to-spawn) (nonzero? spawn-mask)) cfg-8 :delay (nop!))
|
||||
;; )
|
||||
;; (label cfg-41)
|
||||
;; (set! (-> obj fast-spawn) #f)
|
||||
(let ((max-to-spawn 1)
|
||||
(spawned-nb 0)
|
||||
(spawn-mask #x1fffff)
|
||||
)
|
||||
(if (-> obj fast-spawn)
|
||||
(set! s5-1 120)
|
||||
(set! max-to-spawn 120)
|
||||
)
|
||||
(b! #t cfg-36 :delay (nop!))
|
||||
(label cfg-8)
|
||||
(let* ((s2-0 (-> obj spawn-params))
|
||||
(s1-0 (-> s2-0 object-type))
|
||||
)
|
||||
(when (logtest? s3-1 (ash 1 s1-0))
|
||||
(let ((s0-0 (-> obj traffic-engine object-type-info-array s1-0)))
|
||||
(let ((v1-21 (+ (-> s0-0 active-count) (-> s0-0 inactive-count))))
|
||||
(b!
|
||||
(not (and (logtest? (-> s0-0 flags) (traffic-type-flags trtflags-1))
|
||||
(logtest? (-> s0-0 flags) (traffic-type-flags trtflags-3))
|
||||
(< v1-21 (-> s0-0 want-count))
|
||||
(while (and (< spawned-nb max-to-spawn) (nonzero? spawn-mask))
|
||||
(let* ((spawn-params (-> obj spawn-params))
|
||||
(spawn-type (-> spawn-params object-type))
|
||||
)
|
||||
(when (logtest? spawn-mask (ash 1 spawn-type))
|
||||
(let ((s0-0 (-> obj traffic-engine object-type-info-array spawn-type)))
|
||||
(let ((v1-21 (+ (-> s0-0 active-count) (-> s0-0 inactive-count))))
|
||||
(cond
|
||||
((and (logtest? (-> s0-0 flags) (traffic-type-flags trtflags-1))
|
||||
(logtest? (-> s0-0 flags) (traffic-type-flags trtflags-3))
|
||||
(< v1-21 (-> s0-0 want-count)))
|
||||
(logclear! (-> spawn-params flags) (traffic-spawn-flags dark-guard))
|
||||
(when (and (= (-> spawn-params object-type) (traffic-type crimson-guard-1))
|
||||
(> (-> obj dark-guard-ratio) 0)
|
||||
(zero? (mod v1-21 (-> obj dark-guard-ratio))))
|
||||
(logior! (-> spawn-params flags) (traffic-spawn-flags dark-guard)))
|
||||
(let ((traffic-obj (traffic-object-spawn obj spawn-params)))
|
||||
(cond
|
||||
(traffic-obj
|
||||
(add-object (-> obj traffic-engine) spawn-type traffic-obj)
|
||||
(+! (-> s0-0 reserve-count) -1)
|
||||
(+! (-> spawn-params id) 1)
|
||||
(+! spawned-nb 1)
|
||||
)
|
||||
)
|
||||
cfg-29
|
||||
:delay (nop!)
|
||||
)
|
||||
(set! (-> s2-0 flags) (logand -9 (-> s2-0 flags)))
|
||||
(b!
|
||||
(not (and (= (-> s2-0 object-type) (traffic-type crimson-guard-1))
|
||||
(> (-> obj dark-guard-ratio) 0)
|
||||
(zero? (mod v1-21 (-> obj dark-guard-ratio)))
|
||||
)
|
||||
)
|
||||
cfg-25
|
||||
:delay (empty-form)
|
||||
(else
|
||||
(format #t "traffic-manager: unable to spawn~%")
|
||||
(goto cfg-41)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! spawn-mask (logclear spawn-mask (ash 1 spawn-type))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> s2-0 flags) 8)
|
||||
(label cfg-25)
|
||||
(let ((a2-0 (traffic-object-spawn obj s2-0)))
|
||||
(b! (not a2-0) cfg-27 :delay (nop!))
|
||||
(add-object (-> obj traffic-engine) s1-0 a2-0)
|
||||
)
|
||||
(+! (-> s0-0 reserve-count) -1)
|
||||
)
|
||||
(+! (-> s2-0 id) 1)
|
||||
(+! s4-1 1)
|
||||
(b! #t cfg-28 :delay (nop!))
|
||||
(label cfg-27)
|
||||
(format #t "traffic-manager: unable to spawn~%")
|
||||
(b! #t cfg-41 :delay (nop!))
|
||||
(label cfg-28)
|
||||
(b! #t cfg-33 :delay (nop!))
|
||||
(label cfg-29)
|
||||
(set! s3-1 (logclear s3-1 (ash 1 s1-0)))
|
||||
)
|
||||
(label cfg-33)
|
||||
(let ((v1-37 (the-as int (+ s1-0 1))))
|
||||
(if (>= (the-as uint v1-37) (the-as uint 21))
|
||||
(set! v1-37 0)
|
||||
)
|
||||
(set! (-> s2-0 object-type) (the-as traffic-type v1-37))
|
||||
(let ((next-spawn-type (the-as int (+ spawn-type 1))))
|
||||
(if (>= (the-as uint next-spawn-type) (the-as uint 21))
|
||||
(set! next-spawn-type 0)
|
||||
)
|
||||
(set! (-> spawn-params object-type) (the-as traffic-type next-spawn-type))
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-36)
|
||||
(b! (and (< s4-1 s5-1) (nonzero? s3-1)) cfg-8 :delay (nop!))
|
||||
)
|
||||
(label cfg-41)
|
||||
(set! (-> obj fast-spawn) #f)
|
||||
@ -232,7 +296,7 @@
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(if (and gp-0 (logtest? (-> arg2 flags) 2))
|
||||
(if (and gp-0 (logtest? (-> arg2 flags) (traffic-spawn-flags trsflags-01)))
|
||||
(vehicle-method-137 (the-as vehicle gp-0) arg2)
|
||||
)
|
||||
(the-as process-drawable gp-0)
|
||||
@ -425,7 +489,7 @@
|
||||
(set! (-> params proc) #f)
|
||||
(set! (-> params handle) (the-as handle #f))
|
||||
(set! (-> params user-data) (the-as uint 0))
|
||||
(set! (-> params flags) (the-as uint 2))
|
||||
(set! (-> params flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> params guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> params velocity))
|
||||
(vector-reset! (-> params position))
|
||||
|
@ -442,7 +442,7 @@
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle obj))
|
||||
(set! (-> s5-0 user-data) (-> obj spawn-side))
|
||||
(set! (-> s5-0 flags) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(set! (-> s5-0 position quad) (-> obj root-override trans quad))
|
||||
|
@ -156,7 +156,7 @@
|
||||
(set! (-> gp-0 proc) #f)
|
||||
(set! (-> gp-0 handle) (process->handle (-> self parent-override 0)))
|
||||
(set! (-> gp-0 user-data) (-> self draw seg-mask))
|
||||
(set! (-> gp-0 flags) (the-as uint 0))
|
||||
(set! (-> gp-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> gp-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-0 velocity))
|
||||
(when (logtest? (-> self flags) 8)
|
||||
|
@ -1911,7 +1911,7 @@
|
||||
(allocate-and-init-cshape self)
|
||||
(set! (-> self root-override-2 trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 rotation))
|
||||
(if (not (logtest? (-> arg0 flags) 1))
|
||||
(if (not (logtest? (-> arg0 flags) (traffic-spawn-flags trsflags-00)))
|
||||
(lwide-entity-hack)
|
||||
)
|
||||
(init-skel-and-rigid-body self)
|
||||
|
@ -291,7 +291,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> s2-2 user-data) (the-as uint 0))
|
||||
(set! (-> s2-2 flags) (the-as uint 0))
|
||||
(set! (-> s2-2 flags) (traffic-spawn-flags))
|
||||
(set! (-> s2-2 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s2-2 velocity))
|
||||
(set! (-> s2-2 position quad) (-> s5-1 quad))
|
||||
@ -421,7 +421,7 @@
|
||||
(set! (-> s4-1 proc) #f)
|
||||
(set! (-> s4-1 handle) (the-as handle #f))
|
||||
(set! (-> s4-1 user-data) (the-as uint 0))
|
||||
(set! (-> s4-1 flags) (the-as uint 0))
|
||||
(set! (-> s4-1 flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-1 velocity))
|
||||
(set! (-> s4-1 position quad) (-> obj hal4-course spots 5 center quad))
|
||||
|
@ -41,7 +41,7 @@
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((v1-1 (-> obj suppress)))
|
||||
(set! (-> v1-1 duration) (the-as uint 300))
|
||||
(set! (-> v1-1 duration) (seconds 1))
|
||||
(set! (-> v1-1 id) -1)
|
||||
(let ((a0-4 (-> v1-1 bbox)))
|
||||
(set! (-> a0-4 min x) 1634304.0)
|
||||
|
@ -755,17 +755,17 @@
|
||||
(set! (-> *city-lurker-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
|
||||
|
||||
(deftype city-lurker (civilian)
|
||||
((nav-mesh-aid uint32 :offset-assert 1060)
|
||||
(index uint32 :offset-assert 1064)
|
||||
(left-right-interp float :offset-assert 1068)
|
||||
(front-back-interp float :offset-assert 1072)
|
||||
(v-speed vector :inline :offset-assert 1088)
|
||||
(end-pos vector :inline :offset-assert 1104)
|
||||
(task-done? symbol :offset-assert 1120)
|
||||
(task-node uint16 :offset-assert 1124)
|
||||
(jump-in-pipe? symbol :offset-assert 1128)
|
||||
(pipe-name string :offset-assert 1132)
|
||||
(coming-from-pw symbol :offset-assert 1136)
|
||||
((nav-mesh-aid uint32 :offset-assert 1060)
|
||||
(index uint32 :offset-assert 1064)
|
||||
(left-right-interp float :offset-assert 1068)
|
||||
(front-back-interp float :offset-assert 1072)
|
||||
(v-speed vector :inline :offset-assert 1088)
|
||||
(end-pos vector :inline :offset-assert 1104)
|
||||
(task-done? symbol :offset-assert 1120)
|
||||
(task-node game-task-node :offset-assert 1124)
|
||||
(jump-in-pipe? symbol :offset-assert 1128)
|
||||
(pipe-name string :offset-assert 1132)
|
||||
(coming-from-pw symbol :offset-assert 1136)
|
||||
)
|
||||
:heap-base #x400
|
||||
:method-count-assert 221
|
||||
@ -2281,7 +2281,7 @@
|
||||
(set! (-> gp-1 params 0 proc) #f)
|
||||
(set! (-> gp-1 params 0 handle) (the-as handle #f))
|
||||
(set! (-> gp-1 params 0 user-data) (the-as uint 0))
|
||||
(set! (-> gp-1 params 0 flags) (the-as uint 2))
|
||||
(set! (-> gp-1 params 0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> gp-1 params 0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-1 params 0 velocity))
|
||||
(set! (-> gp-1 params 0 position quad) (-> gp-1 vec quad))
|
||||
@ -2294,7 +2294,7 @@
|
||||
(set! (-> gp-1 params 1 proc) #f)
|
||||
(set! (-> gp-1 params 1 handle) (the-as handle #f))
|
||||
(set! (-> gp-1 params 1 user-data) (the-as uint 0))
|
||||
(set! (-> gp-1 params 1 flags) (the-as uint 1))
|
||||
(set! (-> gp-1 params 1 flags) (traffic-spawn-flags trsflags-00))
|
||||
(set! (-> gp-1 params 1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-1 params 1 velocity))
|
||||
(set! (-> gp-1 params 1 position quad) (-> gp-1 vec quad))
|
||||
@ -2317,7 +2317,7 @@
|
||||
(let ((s3-0 (the-as city-lurker (citizen-spawn self city-lurker (-> gp-1 params 1)))))
|
||||
(when s3-0
|
||||
(set! (-> s3-0 end-pos quad) (-> s2-0 end-pos quad))
|
||||
(set! (-> s3-0 task-node) (the-as uint 124))
|
||||
(set! (-> s3-0 task-node) (game-task-node city-meet-brutter-meet-brutter))
|
||||
(set! (-> s3-0 index) (the-as uint s5-1))
|
||||
(set! (-> s3-0 nav-mesh-aid) (the-as uint 0))
|
||||
(set! (-> self slave s5-1) (process->handle s3-0))
|
||||
@ -2505,7 +2505,7 @@
|
||||
(set! (-> s4-0 proc) #f)
|
||||
(set! (-> s4-0 handle) (-> self slave (+ gp-1 (-> self max-count))))
|
||||
(set! (-> s4-0 user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (the-as uint 2))
|
||||
(set! (-> s4-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s4-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 velocity))
|
||||
(set! (-> s4-0 position quad) (-> (the-as paddywagon s5-1) root-override-2 trans quad))
|
||||
@ -2558,7 +2558,7 @@
|
||||
(set! (-> s3-1 proc) #f)
|
||||
(set! (-> s3-1 handle) (-> self slave s5-2))
|
||||
(set! (-> s3-1 user-data) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (traffic-spawn-flags))
|
||||
(set! (-> s3-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s3-1 velocity))
|
||||
(set! (-> s3-1 position quad) (-> (the-as city-lurker s4-2) root-override2 trans quad))
|
||||
@ -2866,7 +2866,7 @@
|
||||
(set! (-> gp-0 params 0 proc) #f)
|
||||
(set! (-> gp-0 params 0 handle) (the-as handle #f))
|
||||
(set! (-> gp-0 params 0 user-data) (the-as uint 0))
|
||||
(set! (-> gp-0 params 0 flags) (the-as uint 2))
|
||||
(set! (-> gp-0 params 0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> gp-0 params 0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-0 params 0 velocity))
|
||||
(set! (-> gp-0 params 0 position quad) (-> gp-0 vec quad))
|
||||
@ -2879,7 +2879,7 @@
|
||||
(set! (-> gp-0 params 1 proc) #f)
|
||||
(set! (-> gp-0 params 1 handle) (the-as handle #f))
|
||||
(set! (-> gp-0 params 1 user-data) (the-as uint 0))
|
||||
(set! (-> gp-0 params 1 flags) (the-as uint 1))
|
||||
(set! (-> gp-0 params 1 flags) (traffic-spawn-flags trsflags-00))
|
||||
(set! (-> gp-0 params 1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-0 params 1 velocity))
|
||||
(set! (-> gp-0 params 1 position quad) (-> gp-0 vec quad))
|
||||
@ -2904,7 +2904,7 @@
|
||||
(set! (-> s3-0 jump-in-pipe?) #t)
|
||||
(set! (-> s3-0 pipe-name) (-> s2-0 pipe-name))
|
||||
(set! (-> s3-0 end-pos quad) (-> s2-0 end-pos quad))
|
||||
(set! (-> s3-0 task-node) (the-as uint 207))
|
||||
(set! (-> s3-0 task-node) (game-task-node city-save-lurkers-save-lurkers))
|
||||
(set! (-> s3-0 index) (the-as uint s5-0))
|
||||
(set! (-> s3-0 nav-mesh-aid) (the-as uint 0))
|
||||
(set! (-> self slave s5-0) (process->handle s3-0))
|
||||
@ -3082,7 +3082,7 @@
|
||||
(set! (-> s4-0 proc) #f)
|
||||
(set! (-> s4-0 handle) (-> self slave (+ gp-1 (-> self max-count))))
|
||||
(set! (-> s4-0 user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (the-as uint 2))
|
||||
(set! (-> s4-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s4-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 velocity))
|
||||
(set! (-> s4-0 position quad) (-> (the-as paddywagon s5-2) root-override-2 trans quad))
|
||||
@ -3135,7 +3135,7 @@
|
||||
(set! (-> s3-1 proc) #f)
|
||||
(set! (-> s3-1 handle) (-> self slave s5-3))
|
||||
(set! (-> s3-1 user-data) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (traffic-spawn-flags))
|
||||
(set! (-> s3-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s3-1 velocity))
|
||||
(set! (-> s3-1 position quad) (-> (the-as city-lurker s4-2) root-override2 trans quad))
|
||||
|
@ -257,7 +257,7 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle *target*))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 2))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(forward-up-nopitch->quaternion
|
||||
@ -329,7 +329,7 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle *target*))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 2))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(forward-up-nopitch->quaternion
|
||||
|
@ -38,7 +38,7 @@
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((v1-1 (-> obj suppress)))
|
||||
(set! (-> v1-1 0 duration) (the-as uint 300))
|
||||
(set! (-> v1-1 0 duration) (seconds 1))
|
||||
(set! (-> v1-1 0 id) -1)
|
||||
(let ((a0-4 (-> v1-1 0)))
|
||||
(set! (-> a0-4 bbox min x) 2170880.0)
|
||||
@ -53,7 +53,7 @@
|
||||
)
|
||||
(set-vector! (-> a1-4 min) 2531328.0 20480.0 -675840.0 1.0)
|
||||
(set-vector! (-> a1-4 max) 2785280.0 40960.0 -233472.0 1.0)
|
||||
(set! (-> v1-3 duration) (the-as uint 300))
|
||||
(set! (-> v1-3 duration) (seconds 1))
|
||||
(set! (-> v1-3 id) -1)
|
||||
(mem-copy! (the-as pointer (-> v1-3 bbox)) (the-as pointer a1-4) 32)
|
||||
)
|
||||
@ -366,7 +366,7 @@
|
||||
(set! (-> s4-0 proc) #f)
|
||||
(set! (-> s4-0 handle) (the-as handle #f))
|
||||
(set! (-> s4-0 user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 velocity))
|
||||
(set! (-> s4-0 position quad) (-> arg0 course spots (+ s5-1 1) center quad))
|
||||
@ -548,7 +548,7 @@
|
||||
(set! (-> s4-0 proc) #f)
|
||||
(set! (-> s4-0 handle) (process->handle s5-0))
|
||||
(set! (-> s4-0 user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 velocity))
|
||||
(set! (-> s4-0 position quad) (-> (the-as process-drawable s5-0) root trans quad))
|
||||
|
@ -1029,7 +1029,7 @@
|
||||
(set! (-> s4-0 params proc) #f)
|
||||
(set! (-> s4-0 params handle) (the-as handle #f))
|
||||
(set! (-> s4-0 params user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 params flags) (the-as uint 0))
|
||||
(set! (-> s4-0 params flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-0 params guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 params velocity))
|
||||
(set! (-> gp-0 i-player) 0)
|
||||
@ -1061,7 +1061,7 @@
|
||||
(quaternion-copy! (-> s4-0 params rotation) (-> *target* control quat))
|
||||
(set! (-> s4-0 params position y) (+ 12288.0 (-> s4-0 params position y)))
|
||||
(set! (-> s4-0 params behavior) (the-as uint 4))
|
||||
(set! (-> s4-0 params flags) (logand -3 (-> s4-0 params flags)))
|
||||
(logclear! (-> s4-0 params flags) (traffic-spawn-flags trsflags-01))
|
||||
(let ((s5-1 (vehicle-spawn obj (type-from-race-vehicle-type (-> s2-0 vehicle)) (-> s4-0 params))))
|
||||
(when s5-1
|
||||
(init-racers! gp-0 s5-1)
|
||||
@ -1085,7 +1085,7 @@
|
||||
(set! (-> s4-0 params position quad) (-> s0-0 start-position quad))
|
||||
(set! (-> s4-0 params id) (the-as uint s2-1))
|
||||
(set! (-> s4-0 params user-data) (-> s1-0 rider))
|
||||
(logior! (-> s4-0 params flags) 2)
|
||||
(logior! (-> s4-0 params flags) (traffic-spawn-flags trsflags-01))
|
||||
(let ((v1-48 (-> s1-0 rider)))
|
||||
(cond
|
||||
((or (zero? v1-48) (= v1-48 1))
|
||||
@ -1104,7 +1104,7 @@
|
||||
(set! (-> s4-0 params position quad) (-> gp-0 info player-intro-pos quad))
|
||||
(set! (-> s4-0 params position y) (+ 12288.0 (-> s4-0 params position y)))
|
||||
)
|
||||
(set! (-> s4-0 params flags) (logand -3 (-> s4-0 params flags)))
|
||||
(logclear! (-> s4-0 params flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! sv-416 37)
|
||||
sv-416
|
||||
)
|
||||
|
@ -303,7 +303,7 @@
|
||||
(when (-> obj race mesh)
|
||||
(race-control-method-9 (-> obj race) (-> obj traffic-priority-id) (-> obj root-override-2 trans))
|
||||
(cond
|
||||
((logtest? (-> arg0 flags) 2)
|
||||
((logtest? (-> arg0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> obj flags) (logior (rigid-body-object-flag riding ai-driving) (-> obj flags)))
|
||||
(cond
|
||||
((-> obj race path)
|
||||
@ -706,7 +706,6 @@
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (-> obj race)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'inline-array 'matrix 9)))
|
||||
(format 0 "vehicle-racer::physics-post s4-0: ~X~%" s4-0)
|
||||
(set! (-> s4-0 0 quad 0) (-> obj rbody state position quad))
|
||||
(set! (-> s4-0 0 vector 1 quad) (-> obj rbody state lin-velocity quad))
|
||||
(set! (-> s4-0 3 vector 1 y) 0.0)
|
||||
@ -718,9 +717,7 @@
|
||||
(* (-> obj rbody state ang-velocity y) (vector-length (-> obj rbody state lin-velocity)))
|
||||
)
|
||||
(set! (-> s4-0 3 vector 1 x) (-> pp clock seconds-per-frame))
|
||||
(format 0 "vehicle-racer::physics-post s4-0 before: ~X~%" s4-0)
|
||||
(race-control-method-12 s5-0 (the-as vector (-> s4-0 0)))
|
||||
(format 0 "vehicle-racer::physics-post s4-0 after: ~X~%" s4-0)
|
||||
(set! (-> s4-0 3 vector 0 y) (vector-length (-> s4-0 0 vector 1)))
|
||||
(set! (-> s4-0 3 vector 0 z) (vector-length (-> s5-0 lin-velocity)))
|
||||
(set! (-> s4-0 3 vector 0 w)
|
||||
|
@ -1171,6 +1171,7 @@ This commonly includes things such as:
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(stack-size-set! (-> obj main-thread) 560) ;; added
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
@ -2427,6 +2428,7 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer stadium-barrier).
|
||||
(defun stadium-barrier-spawn ((arg0 stad-force-field) (arg1 vector) (arg2 quaternion) (arg3 vector))
|
||||
(process-spawn stadium-barrier arg1 arg2 arg3 :to arg0)
|
||||
)
|
||||
@ -3229,7 +3231,7 @@ This commonly includes things such as:
|
||||
(set! (-> v1-0 min w) 1.0)
|
||||
)
|
||||
(set-vector! (-> a0-0 bbox max) 1482301.5 204800.0 -1228800.0 1.0)
|
||||
(set! (-> a0-0 duration) (the-as uint #xad08e00))
|
||||
(set! (-> a0-0 duration) (seconds 604800))
|
||||
(create-or-update-suppression-box a0-0)
|
||||
)
|
||||
(none)
|
||||
@ -3296,7 +3298,7 @@ This commonly includes things such as:
|
||||
(set! (-> v1-0 min w) 1.0)
|
||||
)
|
||||
(set-vector! (-> a0-0 bbox max) 1482301.5 204800.0 -1228800.0 1.0)
|
||||
(set! (-> a0-0 duration) (the-as uint #xad08e00))
|
||||
(set! (-> a0-0 duration) (seconds 604800))
|
||||
(create-or-update-suppression-box a0-0)
|
||||
)
|
||||
(none)
|
||||
|
28
test/decompiler/reference/jak2/engine/ai/traffic-h_REF.gc
generated
vendored
28
test/decompiler/reference/jak2/engine/ai/traffic-h_REF.gc
generated
vendored
@ -51,7 +51,7 @@
|
||||
;; definition of type traffic-suppression-params
|
||||
(deftype traffic-suppression-params (structure)
|
||||
((bbox bounding-box :inline :offset-assert 0)
|
||||
(duration uint64 :offset-assert 32)
|
||||
(duration time-frame :offset-assert 32)
|
||||
(id int8 :offset-assert 40)
|
||||
)
|
||||
:method-count-assert 13
|
||||
@ -88,19 +88,19 @@
|
||||
|
||||
;; definition of type traffic-object-spawn-params
|
||||
(deftype traffic-object-spawn-params (structure)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle handle :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags uint32 :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
((object-type traffic-type :offset-assert 0)
|
||||
(behavior uint64 :offset-assert 8)
|
||||
(id uint32 :offset-assert 16)
|
||||
(nav-mesh nav-mesh :offset-assert 20)
|
||||
(nav-branch nav-branch :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rotation quaternion :inline :offset-assert 48)
|
||||
(velocity vector :inline :offset-assert 64)
|
||||
(handle handle :offset-assert 80)
|
||||
(guard-type uint8 :offset-assert 88)
|
||||
(user-data uint32 :offset-assert 92)
|
||||
(flags traffic-spawn-flags :offset-assert 96)
|
||||
(proc process :offset-assert 100)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x68
|
||||
|
17
test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc
generated
vendored
17
test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc
generated
vendored
@ -726,7 +726,7 @@
|
||||
)
|
||||
(when v1-1
|
||||
(let ((a0-3 (-> v1-1 nav-mesh))
|
||||
(v1-2 (the-as structure #f))
|
||||
(v1-2 (the-as nav-mesh-link #f))
|
||||
)
|
||||
(dotimes (a1-2 (the-as int (-> a0-3 link-count)))
|
||||
(let ((a2-1 (-> a0-3 link-array a1-2)))
|
||||
@ -739,13 +739,13 @@
|
||||
(label cfg-7)
|
||||
)
|
||||
(label cfg-10)
|
||||
(when (the-as nav-mesh-link v1-2)
|
||||
(when v1-2
|
||||
(set! (-> arg0 dest-mesh) a0-3)
|
||||
(set! (-> (the-as nav-mesh v1-2) route) (the-as (pointer nav-poly) obj))
|
||||
(set! (-> arg0 dest-link-poly-id) (-> (the-as nav-mesh v1-2) poly-count))
|
||||
(set! (-> arg0 dest-switch-poly-id) (-> (the-as nav-mesh v1-2) static-sphere-count))
|
||||
(set! (-> (the-as nav-mesh v1-2) nav-control-count) (-> arg0 src-switch-poly-id))
|
||||
(set! (-> (the-as nav-mesh v1-2) max-nav-control-count) (-> arg0 src-link-poly-id))
|
||||
(set! (-> v1-2 dest-mesh) obj)
|
||||
(set! (-> arg0 dest-link-poly-id) (-> v1-2 src-switch-poly-id))
|
||||
(set! (-> arg0 dest-switch-poly-id) (-> v1-2 src-link-poly-id))
|
||||
(set! (-> v1-2 dest-link-poly-id) (-> arg0 src-switch-poly-id))
|
||||
(set! (-> v1-2 dest-switch-poly-id) (-> arg0 src-link-poly-id))
|
||||
#t
|
||||
)
|
||||
)
|
||||
@ -2835,3 +2835,6 @@
|
||||
(none)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
4
test/decompiler/reference/jak2/levels/city/common/citizen_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/levels/city/common/citizen_REF.gc
generated
vendored
@ -735,14 +735,14 @@ This commonly includes things such as:
|
||||
(init-enemy-collision! self)
|
||||
(set! (-> self root-override2 trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root-override2 quat) (-> arg0 rotation))
|
||||
(if (not (logtest? (-> arg0 flags) 1))
|
||||
(if (not (logtest? (-> arg0 flags) (traffic-spawn-flags trsflags-00)))
|
||||
(lwide-entity-hack)
|
||||
)
|
||||
(set! (-> self vehicle) (-> arg0 handle))
|
||||
(set! (-> self interp) 0.0)
|
||||
(logclear! (-> self flags) (citizen-flag run-mode))
|
||||
(logclear! (-> self flags) (citizen-flag shuffle-mode))
|
||||
(if (logtest? (-> arg0 flags) 8)
|
||||
(if (logtest? (-> arg0 flags) (traffic-spawn-flags dark-guard))
|
||||
(logior! (-> self flags) (citizen-flag dark-guard))
|
||||
)
|
||||
(init-enemy! self)
|
||||
|
2
test/decompiler/reference/jak2/levels/city/common/ctyport-obs_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/city/common/ctyport-obs_REF.gc
generated
vendored
@ -1044,7 +1044,7 @@ This commonly includes things such as:
|
||||
(quaternion-look-at! (-> s1-0 rotation) s2-0 *up-vector*)
|
||||
(set! (-> s1-0 user-data) (the-as uint s5-1))
|
||||
(set! (-> s1-0 position w) f30-0)
|
||||
(logior! (-> s1-0 flags) 1)
|
||||
(logior! (-> s1-0 flags) (traffic-spawn-flags trsflags-00))
|
||||
(process->handle (vehicle-spawn obj barge s1-0))
|
||||
)
|
||||
(+! f30-0 (/ (* 4096.0 (+ 150.0 (* 150.0 (rand-vu)))) (total-distance s4-0)))
|
||||
|
6
test/decompiler/reference/jak2/levels/city/common/ctywide-tasks_REF.gc
generated
vendored
6
test/decompiler/reference/jak2/levels/city/common/ctywide-tasks_REF.gc
generated
vendored
@ -712,7 +712,7 @@
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle *target*))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(quaternion-identity! (-> s5-0 rotation))
|
||||
@ -906,3 +906,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
test/decompiler/reference/jak2/levels/city/common/traffic-engine_REF.gc
generated
vendored
6
test/decompiler/reference/jak2/levels/city/common/traffic-engine_REF.gc
generated
vendored
@ -235,7 +235,7 @@
|
||||
"Kill a suppression box, and inform the traffic manager by setting duration to 0."
|
||||
(when (!= (-> obj id) -1)
|
||||
(let ((s5-0 (-> obj duration)))
|
||||
(set! (-> obj duration) (the-as uint 0))
|
||||
(set! (-> obj duration) 0)
|
||||
(send-event *traffic-manager* 'update-suppression-box obj)
|
||||
(set! (-> obj duration) s5-0)
|
||||
)
|
||||
@ -309,7 +309,7 @@ The param object is updated with the ID of the box and can be later used with up
|
||||
(s4-1 (logior (-> s5-0 flags) (traffic-suppression-box-flags tfsb1)))
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> s5-0 bbox)) (the-as pointer (-> arg0 bbox)) 32)
|
||||
(set! (-> s5-0 duration) (-> arg0 duration))
|
||||
(set! (-> s5-0 duration) (the-as uint (-> arg0 duration)))
|
||||
(set! (-> s5-0 flags) s4-1)
|
||||
)
|
||||
)
|
||||
@ -1626,7 +1626,7 @@ Process is recycled and moved to reserved, if it deactivates."
|
||||
(.add.x.vf vf5 vf4 vf6 :mask #b111)
|
||||
(.svf (&-> a0-2 quad) vf5)
|
||||
)
|
||||
(set! (-> a1-1 duration) (the-as uint 1500))
|
||||
(set! (-> a1-1 duration) (seconds 5))
|
||||
(new-suppression-box obj a1-1)
|
||||
)
|
||||
(let ((v1-5 (-> obj danger-sphere-count)))
|
||||
|
12
test/decompiler/reference/jak2/levels/city/common/traffic-manager_REF.gc
generated
vendored
12
test/decompiler/reference/jak2/levels/city/common/traffic-manager_REF.gc
generated
vendored
@ -190,7 +190,7 @@
|
||||
cfg-29
|
||||
:delay (nop!)
|
||||
)
|
||||
(set! (-> s2-0 flags) (logand -9 (-> s2-0 flags)))
|
||||
(logclear! (-> s2-0 flags) (traffic-spawn-flags dark-guard))
|
||||
(b!
|
||||
(not (and (= (-> s2-0 object-type) (traffic-type crimson-guard-1))
|
||||
(> (-> obj dark-guard-ratio) 0)
|
||||
@ -201,7 +201,7 @@
|
||||
:delay (empty-form)
|
||||
)
|
||||
)
|
||||
(logior! (-> s2-0 flags) 8)
|
||||
(logior! (-> s2-0 flags) (traffic-spawn-flags dark-guard))
|
||||
(label cfg-25)
|
||||
(let ((a2-0 (traffic-object-spawn obj s2-0)))
|
||||
(b! (not a2-0) cfg-27 :delay (nop!))
|
||||
@ -256,7 +256,7 @@
|
||||
(set! gp-0 (-> v1-1 0))
|
||||
)
|
||||
)
|
||||
(if (and gp-0 (logtest? (-> arg2 flags) 2))
|
||||
(if (and gp-0 (logtest? (-> arg2 flags) (traffic-spawn-flags trsflags-01)))
|
||||
(vehicle-method-137 (the-as vehicle gp-0) arg2)
|
||||
)
|
||||
(the-as process-drawable gp-0)
|
||||
@ -458,7 +458,7 @@
|
||||
(set! (-> params proc) #f)
|
||||
(set! (-> params handle) (the-as handle #f))
|
||||
(set! (-> params user-data) (the-as uint 0))
|
||||
(set! (-> params flags) (the-as uint 2))
|
||||
(set! (-> params flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> params guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> params velocity))
|
||||
(vector-reset! (-> params position))
|
||||
@ -923,3 +923,7 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
test/decompiler/reference/jak2/levels/city/common/transport_REF.gc
generated
vendored
6
test/decompiler/reference/jak2/levels/city/common/transport_REF.gc
generated
vendored
@ -517,7 +517,7 @@
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle obj))
|
||||
(set! (-> s5-0 user-data) (-> obj spawn-side))
|
||||
(set! (-> s5-0 flags) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(set! (-> s5-0 position quad) (-> obj root-override trans quad))
|
||||
@ -661,3 +661,7 @@ This commonly includes things such as:
|
||||
(go (method-of-object obj come-down))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
test/decompiler/reference/jak2/levels/city/common/vehicle-rider_REF.gc
generated
vendored
6
test/decompiler/reference/jak2/levels/city/common/vehicle-rider_REF.gc
generated
vendored
@ -181,7 +181,7 @@
|
||||
(set! (-> gp-0 proc) #f)
|
||||
(set! (-> gp-0 handle) (process->handle (-> self parent-override 0)))
|
||||
(set! (-> gp-0 user-data) (-> self draw seg-mask))
|
||||
(set! (-> gp-0 flags) (the-as uint 0))
|
||||
(set! (-> gp-0 flags) (traffic-spawn-flags))
|
||||
(set! (-> gp-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-0 velocity))
|
||||
(when (logtest? (-> self flags) 8)
|
||||
@ -519,3 +519,7 @@ This commonly includes things such as:
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak2/levels/city/common/vehicle_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/city/common/vehicle_REF.gc
generated
vendored
@ -1971,7 +1971,7 @@
|
||||
(allocate-and-init-cshape self)
|
||||
(set! (-> self root-override-2 trans quad) (-> arg0 position quad))
|
||||
(quaternion-copy! (-> self root-override-2 quat) (-> arg0 rotation))
|
||||
(if (not (logtest? (-> arg0 flags) 1))
|
||||
(if (not (logtest? (-> arg0 flags) (traffic-spawn-flags trsflags-00)))
|
||||
(lwide-entity-hack)
|
||||
)
|
||||
(init-skel-and-rigid-body self)
|
||||
|
8
test/decompiler/reference/jak2/levels/city/kid_escort/hal4-course_REF.gc
generated
vendored
8
test/decompiler/reference/jak2/levels/city/kid_escort/hal4-course_REF.gc
generated
vendored
@ -344,7 +344,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> s2-2 user-data) (the-as uint 0))
|
||||
(set! (-> s2-2 flags) (the-as uint 0))
|
||||
(set! (-> s2-2 flags) (traffic-spawn-flags))
|
||||
(set! (-> s2-2 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s2-2 velocity))
|
||||
(set! (-> s2-2 position quad) (-> s5-1 quad))
|
||||
@ -479,7 +479,7 @@
|
||||
(set! (-> s4-1 proc) #f)
|
||||
(set! (-> s4-1 handle) (the-as handle #f))
|
||||
(set! (-> s4-1 user-data) (the-as uint 0))
|
||||
(set! (-> s4-1 flags) (the-as uint 0))
|
||||
(set! (-> s4-1 flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-1 velocity))
|
||||
(set! (-> s4-1 position quad) (-> obj hal4-course spots 5 center quad))
|
||||
@ -2089,3 +2089,7 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *bot-course-table* course 10) *hal4-course*)
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak2/levels/city/market/east/ashelin/ash4-course_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/city/market/east/ashelin/ash4-course_REF.gc
generated
vendored
@ -51,7 +51,7 @@
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((v1-1 (-> obj suppress)))
|
||||
(set! (-> v1-1 duration) (the-as uint 300))
|
||||
(set! (-> v1-1 duration) (seconds 1))
|
||||
(set! (-> v1-1 id) -1)
|
||||
(let ((a0-4 (-> v1-1 bbox)))
|
||||
(set! (-> a0-4 min x) 1634304.0)
|
||||
|
42
test/decompiler/reference/jak2/levels/city/market/west/brutter_kiosk/meet-brutter_REF.gc
generated
vendored
42
test/decompiler/reference/jak2/levels/city/market/west/brutter_kiosk/meet-brutter_REF.gc
generated
vendored
@ -807,17 +807,17 @@
|
||||
|
||||
;; definition of type city-lurker
|
||||
(deftype city-lurker (civilian)
|
||||
((nav-mesh-aid uint32 :offset-assert 1060)
|
||||
(index uint32 :offset-assert 1064)
|
||||
(left-right-interp float :offset-assert 1068)
|
||||
(front-back-interp float :offset-assert 1072)
|
||||
(v-speed vector :inline :offset-assert 1088)
|
||||
(end-pos vector :inline :offset-assert 1104)
|
||||
(task-done? symbol :offset-assert 1120)
|
||||
(task-node uint16 :offset-assert 1124)
|
||||
(jump-in-pipe? symbol :offset-assert 1128)
|
||||
(pipe-name string :offset-assert 1132)
|
||||
(coming-from-pw symbol :offset-assert 1136)
|
||||
((nav-mesh-aid uint32 :offset-assert 1060)
|
||||
(index uint32 :offset-assert 1064)
|
||||
(left-right-interp float :offset-assert 1068)
|
||||
(front-back-interp float :offset-assert 1072)
|
||||
(v-speed vector :inline :offset-assert 1088)
|
||||
(end-pos vector :inline :offset-assert 1104)
|
||||
(task-done? symbol :offset-assert 1120)
|
||||
(task-node game-task-node :offset-assert 1124)
|
||||
(jump-in-pipe? symbol :offset-assert 1128)
|
||||
(pipe-name string :offset-assert 1132)
|
||||
(coming-from-pw symbol :offset-assert 1136)
|
||||
)
|
||||
:heap-base #x400
|
||||
:method-count-assert 221
|
||||
@ -2407,7 +2407,7 @@
|
||||
(set! (-> gp-1 params 0 proc) #f)
|
||||
(set! (-> gp-1 params 0 handle) (the-as handle #f))
|
||||
(set! (-> gp-1 params 0 user-data) (the-as uint 0))
|
||||
(set! (-> gp-1 params 0 flags) (the-as uint 2))
|
||||
(set! (-> gp-1 params 0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> gp-1 params 0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-1 params 0 velocity))
|
||||
(set! (-> gp-1 params 0 position quad) (-> gp-1 vec quad))
|
||||
@ -2420,7 +2420,7 @@
|
||||
(set! (-> gp-1 params 1 proc) #f)
|
||||
(set! (-> gp-1 params 1 handle) (the-as handle #f))
|
||||
(set! (-> gp-1 params 1 user-data) (the-as uint 0))
|
||||
(set! (-> gp-1 params 1 flags) (the-as uint 1))
|
||||
(set! (-> gp-1 params 1 flags) (traffic-spawn-flags trsflags-00))
|
||||
(set! (-> gp-1 params 1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-1 params 1 velocity))
|
||||
(set! (-> gp-1 params 1 position quad) (-> gp-1 vec quad))
|
||||
@ -2443,7 +2443,7 @@
|
||||
(let ((s3-0 (the-as city-lurker (citizen-spawn self city-lurker (-> gp-1 params 1)))))
|
||||
(when s3-0
|
||||
(set! (-> s3-0 end-pos quad) (-> s2-0 end-pos quad))
|
||||
(set! (-> s3-0 task-node) (the-as uint 124))
|
||||
(set! (-> s3-0 task-node) (game-task-node city-meet-brutter-meet-brutter))
|
||||
(set! (-> s3-0 index) (the-as uint s5-1))
|
||||
(set! (-> s3-0 nav-mesh-aid) (the-as uint 0))
|
||||
(set! (-> self slave s5-1) (process->handle s3-0))
|
||||
@ -2634,7 +2634,7 @@
|
||||
(set! (-> s4-0 proc) #f)
|
||||
(set! (-> s4-0 handle) (-> self slave (+ gp-1 (-> self max-count))))
|
||||
(set! (-> s4-0 user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (the-as uint 2))
|
||||
(set! (-> s4-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s4-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 velocity))
|
||||
(set! (-> s4-0 position quad) (-> (the-as paddywagon s5-1) root-override-2 trans quad))
|
||||
@ -2687,7 +2687,7 @@
|
||||
(set! (-> s3-1 proc) #f)
|
||||
(set! (-> s3-1 handle) (-> self slave s5-2))
|
||||
(set! (-> s3-1 user-data) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (traffic-spawn-flags))
|
||||
(set! (-> s3-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s3-1 velocity))
|
||||
(set! (-> s3-1 position quad) (-> (the-as city-lurker s4-2) root-override2 trans quad))
|
||||
@ -3018,7 +3018,7 @@
|
||||
(set! (-> gp-0 params 0 proc) #f)
|
||||
(set! (-> gp-0 params 0 handle) (the-as handle #f))
|
||||
(set! (-> gp-0 params 0 user-data) (the-as uint 0))
|
||||
(set! (-> gp-0 params 0 flags) (the-as uint 2))
|
||||
(set! (-> gp-0 params 0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> gp-0 params 0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-0 params 0 velocity))
|
||||
(set! (-> gp-0 params 0 position quad) (-> gp-0 vec quad))
|
||||
@ -3031,7 +3031,7 @@
|
||||
(set! (-> gp-0 params 1 proc) #f)
|
||||
(set! (-> gp-0 params 1 handle) (the-as handle #f))
|
||||
(set! (-> gp-0 params 1 user-data) (the-as uint 0))
|
||||
(set! (-> gp-0 params 1 flags) (the-as uint 1))
|
||||
(set! (-> gp-0 params 1 flags) (traffic-spawn-flags trsflags-00))
|
||||
(set! (-> gp-0 params 1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> gp-0 params 1 velocity))
|
||||
(set! (-> gp-0 params 1 position quad) (-> gp-0 vec quad))
|
||||
@ -3056,7 +3056,7 @@
|
||||
(set! (-> s3-0 jump-in-pipe?) #t)
|
||||
(set! (-> s3-0 pipe-name) (-> s2-0 pipe-name))
|
||||
(set! (-> s3-0 end-pos quad) (-> s2-0 end-pos quad))
|
||||
(set! (-> s3-0 task-node) (the-as uint 207))
|
||||
(set! (-> s3-0 task-node) (game-task-node city-save-lurkers-save-lurkers))
|
||||
(set! (-> s3-0 index) (the-as uint s5-0))
|
||||
(set! (-> s3-0 nav-mesh-aid) (the-as uint 0))
|
||||
(set! (-> self slave s5-0) (process->handle s3-0))
|
||||
@ -3237,7 +3237,7 @@
|
||||
(set! (-> s4-0 proc) #f)
|
||||
(set! (-> s4-0 handle) (-> self slave (+ gp-1 (-> self max-count))))
|
||||
(set! (-> s4-0 user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 flags) (the-as uint 2))
|
||||
(set! (-> s4-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s4-0 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 velocity))
|
||||
(set! (-> s4-0 position quad) (-> (the-as paddywagon s5-2) root-override-2 trans quad))
|
||||
@ -3290,7 +3290,7 @@
|
||||
(set! (-> s3-1 proc) #f)
|
||||
(set! (-> s3-1 handle) (-> self slave s5-3))
|
||||
(set! (-> s3-1 user-data) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (the-as uint 0))
|
||||
(set! (-> s3-1 flags) (traffic-spawn-flags))
|
||||
(set! (-> s3-1 guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s3-1 velocity))
|
||||
(set! (-> s3-1 position quad) (-> (the-as city-lurker s4-2) root-override2 trans quad))
|
||||
|
8
test/decompiler/reference/jak2/levels/city/misc/delivery/delivery-task_REF.gc
generated
vendored
8
test/decompiler/reference/jak2/levels/city/misc/delivery/delivery-task_REF.gc
generated
vendored
@ -280,7 +280,7 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle *target*))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 2))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(forward-up-nopitch->quaternion
|
||||
@ -353,7 +353,7 @@ This commonly includes things such as:
|
||||
(set! (-> s5-0 proc) #f)
|
||||
(set! (-> s5-0 handle) (process->handle *target*))
|
||||
(set! (-> s5-0 user-data) (the-as uint 0))
|
||||
(set! (-> s5-0 flags) (the-as uint 2))
|
||||
(set! (-> s5-0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> s5-0 guard-type) (the-as uint 1))
|
||||
(vector-reset! (-> s5-0 velocity))
|
||||
(forward-up-nopitch->quaternion
|
||||
@ -568,3 +568,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
test/decompiler/reference/jak2/levels/common/races/race-manager_REF.gc
generated
vendored
8
test/decompiler/reference/jak2/levels/common/races/race-manager_REF.gc
generated
vendored
@ -1061,7 +1061,7 @@
|
||||
(set! (-> s4-0 params proc) #f)
|
||||
(set! (-> s4-0 params handle) (the-as handle #f))
|
||||
(set! (-> s4-0 params user-data) (the-as uint 0))
|
||||
(set! (-> s4-0 params flags) (the-as uint 0))
|
||||
(set! (-> s4-0 params flags) (traffic-spawn-flags))
|
||||
(set! (-> s4-0 params guard-type) (the-as uint 7))
|
||||
(vector-reset! (-> s4-0 params velocity))
|
||||
(set! (-> gp-0 i-player) 0)
|
||||
@ -1093,7 +1093,7 @@
|
||||
(quaternion-copy! (-> s4-0 params rotation) (-> *target* control quat))
|
||||
(set! (-> s4-0 params position y) (+ 12288.0 (-> s4-0 params position y)))
|
||||
(set! (-> s4-0 params behavior) (the-as uint 4))
|
||||
(set! (-> s4-0 params flags) (logand -3 (-> s4-0 params flags)))
|
||||
(logclear! (-> s4-0 params flags) (traffic-spawn-flags trsflags-01))
|
||||
(let ((s5-1 (vehicle-spawn obj (type-from-race-vehicle-type (-> s2-0 vehicle)) (-> s4-0 params))))
|
||||
(when s5-1
|
||||
(init-racers! gp-0 s5-1)
|
||||
@ -1117,7 +1117,7 @@
|
||||
(set! (-> s4-0 params position quad) (-> s0-0 start-position quad))
|
||||
(set! (-> s4-0 params id) (the-as uint s2-1))
|
||||
(set! (-> s4-0 params user-data) (-> s1-0 rider))
|
||||
(logior! (-> s4-0 params flags) 2)
|
||||
(logior! (-> s4-0 params flags) (traffic-spawn-flags trsflags-01))
|
||||
(let ((v1-48 (-> s1-0 rider)))
|
||||
(cond
|
||||
((or (zero? v1-48) (= v1-48 1))
|
||||
@ -1136,7 +1136,7 @@
|
||||
(set! (-> s4-0 params position quad) (-> gp-0 info player-intro-pos quad))
|
||||
(set! (-> s4-0 params position y) (+ 12288.0 (-> s4-0 params position y)))
|
||||
)
|
||||
(set! (-> s4-0 params flags) (logand -3 (-> s4-0 params flags)))
|
||||
(logclear! (-> s4-0 params flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! sv-416 37)
|
||||
sv-416
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/levels/common/races/vehicle-racer_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/common/races/vehicle-racer_REF.gc
generated
vendored
@ -359,7 +359,7 @@
|
||||
(when (-> obj race mesh)
|
||||
(race-control-method-9 (-> obj race) (-> obj traffic-priority-id) (-> obj root-override-2 trans))
|
||||
(cond
|
||||
((logtest? (-> arg0 flags) 2)
|
||||
((logtest? (-> arg0 flags) (traffic-spawn-flags trsflags-01))
|
||||
(set! (-> obj flags) (logior (rigid-body-object-flag riding ai-driving) (-> obj flags)))
|
||||
(cond
|
||||
((-> obj race path)
|
||||
|
5
test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc
generated
vendored
5
test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc
generated
vendored
@ -2672,6 +2672,7 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for function stadium-barrier-spawn
|
||||
;; WARN: Return type mismatch (pointer process) vs (pointer stadium-barrier).
|
||||
(defun stadium-barrier-spawn ((arg0 stad-force-field) (arg1 vector) (arg2 quaternion) (arg3 vector))
|
||||
(process-spawn stadium-barrier arg1 arg2 arg3 :to arg0)
|
||||
)
|
||||
@ -3583,7 +3584,7 @@ This commonly includes things such as:
|
||||
(set! (-> v1-0 min w) 1.0)
|
||||
)
|
||||
(set-vector! (-> a0-0 bbox max) 1482301.5 204800.0 -1228800.0 1.0)
|
||||
(set! (-> a0-0 duration) (the-as uint #xad08e00))
|
||||
(set! (-> a0-0 duration) (seconds 604800))
|
||||
(create-or-update-suppression-box a0-0)
|
||||
)
|
||||
(none)
|
||||
@ -3653,7 +3654,7 @@ This commonly includes things such as:
|
||||
(set! (-> v1-0 min w) 1.0)
|
||||
)
|
||||
(set-vector! (-> a0-0 bbox max) 1482301.5 204800.0 -1228800.0 1.0)
|
||||
(set! (-> a0-0 duration) (the-as uint #xad08e00))
|
||||
(set! (-> a0-0 duration) (seconds 604800))
|
||||
(create-or-update-suppression-box a0-0)
|
||||
)
|
||||
(none)
|
||||
|
Loading…
Reference in New Issue
Block a user