d/jak2: cleaning up some old decomp issues (#2462)

This commit is contained in:
Tyler Wilding
2023-04-08 22:29:33 -05:00
committed by GitHub
parent 3dbbbd37d4
commit 028153d48e
7 changed files with 295 additions and 104 deletions
@@ -691,22 +691,12 @@
[48, "vector"]
],
"(trans close com-airlock)": [[16, "script-context"]],
"traj3d-calc-initial-velocity-using-tilt": [[16, "traj2d-params"]],
"(method 9 cubic-curve)": [[16, "trajectory"]],
"(method 10 cubic-curve)": [[16, "trajectory"]],
"(method 11 cubic-curve)": [[16, "trajectory"]],
"(method 12 cubic-curve)": [[16, "trajectory"]],
"(method 13 cubic-curve)": [[16, "trajectory"]],
"(method 13 combo-tracker)": [
[16, "event-message-block"],
[112, ["array", "collide-shape", 32]]
],
"(anon-function 2 find-nearest)": [[128, "collide-query"]],
"find-nearest-focusable": [[160, "collide-query"]],
"(method 11 impact-control)": [
[16, "touching-shapes-entry"],
[48, "event-message-block"]
],
"(method 11 impact-control)": [[16, "touching-shapes-entry"]],
"(method 16 collide-cache)": [[16, "collide-cache-tri"]],
"(method 20 editable)": [
[16, "vector"],
@@ -720,14 +710,6 @@
[32, "vector"],
[16, "vector"]
],
"(method 30 editable-plane)": [
[16, "vector"],
[32, "vector"],
[48, "vector"]
],
"(method 13 editable-plane)": [[64, ["inline-array", "vector", 4]]],
"execute-select": [[16, "vector"]],
"(method 9 editable-array)": [[16, "vector"]],
"execute-mouse-move": [
[80, "vector"],
[96, "vector"],
@@ -745,7 +727,6 @@
[16, "vector"],
[32, ["array", "int32", 8]]
],
"(method 11 editable-region)": [[16, "vector2h"]],
"(method 29 editable-face)": [
[16, ["inline-array", "vector", 6]],
[304, "matrix"],
@@ -753,7 +734,6 @@
[240, ["array", "editable-point", 6]]
],
"(method 10 editable-face)": [[16, ["inline-array", "vector", 6]]],
"(method 11 editable)": [[16, "collide-query"]],
"(method 10 editable-plane)": [[16, "matrix"]],
"(method 9 game-task-node-info)": [[16, ["inline-array", "qword", 8]]],
"(code retry task-manager)": [[16, "event-message-block"]],
@@ -2247,5 +2227,10 @@
[32, "vector"],
[48, "vector"],
[64, "vector"]
]
],
"(method 13 combo-tracker)": [
[16, "event-message-block"],
[112, ["array", "collide-shape", 32]]
],
"(code impact gun-dark-shot)": [[160, ["array", "collide-shape", 16]]]
}
+4
View File
@@ -552,3 +552,7 @@
)
)
)
+4
View File
@@ -2622,3 +2622,7 @@
*debug-hook*
)
)
+1 -1
View File
@@ -1451,7 +1451,7 @@
)
(when (< 0.0 (-> gp-0 z))
(reverse-transform-point! gp-0 (edit-get-trans (-> obj vertex 0)) s5-0 arg0)
(let ((s3-1 (the-as object (new 'stack-no-clear 'inline-array 'vector 4))))
(let ((s3-1 (the-as object (new 'stack-no-clear 'matrix))))
(dotimes (v1-6 4)
(set! (-> (the-as (inline-array vector) s3-1) v1-6 quad) (the-as uint128 0))
)
+274
View File
@@ -650,4 +650,278 @@
;; failed to figure out what this is:
(defstate impact (gun-dark-shot)
:virtual #t
:code (behavior ()
(local-vars
(sv-256 collide-shape)
(sv-272 process-drawable)
(sv-288 vector)
(sv-304 process-drawable)
(sv-320 process-drawable)
(sv-336 process-drawable)
)
(if (< (- (-> self clock frame-counter) (-> self spawn-time)) (seconds 0.1))
(send-event (ppointer->process (-> self parent)) 'release)
)
(sound-stop (the-as sound-id (-> self trail-sound)))
(let ((v1-10 (get-status *gui-control* (the-as sound-id (-> self explode-sound)))))
(cond
((= v1-10 (gui-status ready))
(set-action!
*gui-control*
(gui-action play)
(the-as sound-id (-> self explode-sound))
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(else
(set-action!
*gui-control*
(gui-action stop)
(the-as sound-id (-> self explode-sound))
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(the-as int (sound-play "explosion" :pitch 2.5))
)
)
)
(let ((v1-16 (-> self root-override root-prim)))
(set! (-> v1-16 prim-core collide-as) (collide-spec))
(set! (-> v1-16 prim-core collide-with) (collide-spec))
)
0
(let ((gp-1 (new 'stack-no-clear 'explosion-init-params)))
(set! (-> gp-1 spawn-point quad) (-> self root-override trans quad))
(quaternion-copy! (-> gp-1 spawn-quat) (-> self root-override quat))
(set! (-> gp-1 radius) 36864.0)
(set! (-> gp-1 group) (-> *part-group-id-table* 71))
(set! (-> gp-1 collide-with)
(collide-spec backgnd crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
)
(set! (-> gp-1 penetrate-using) (penetrate explode))
(explosion-spawn (the-as process-drawable *default-pool*) explosion gp-1)
)
(let ((s3-0 (the-as (array collide-shape) ((method-of-type array new)
(the-as symbol (new 'stack-no-clear 'array 'collide-shape 16))
array
collide-shape
16
)
)
)
(a1-8 (new 'stack-no-clear 'sphere))
)
(set! (-> a1-8 quad) (-> self root-override trans quad))
(set! (-> a1-8 r) (-> self blast-radius))
(let ((gp-2 (fill-actor-list-for-sphere *actor-hash* a1-8 (-> s3-0 data) (-> s3-0 allocated-length))))
(let ((s1-0 (the-as process-drawable #f))
(f30-0 4096000.0)
(s4-0 0)
(s5-1 #t)
)
(countdown (s2-0 gp-2)
(set! sv-256 (-> s3-0 s2-0))
(set! sv-272 (-> sv-256 process))
(let ((s0-0 (if (type? sv-272 process-focusable)
sv-272
)
)
)
(cond
((and (nonzero? (-> sv-256 root-prim prim-core collide-as))
s0-0
(logtest? (process-mask crate enemy collectable guard) (-> s0-0 mask))
(not (focus-test? (the-as process-focusable s0-0) disable dead ignore))
(not (logtest? (process-mask no-track) (-> s0-0 mask)))
)
(set! sv-288 (get-trans (the-as process-focusable s0-0) 3))
(let ((f28-0 (- (vector-vector-distance (-> self root-override trans) sv-288) (-> sv-288 w))))
(set! sv-304 s0-0)
(if (and (not (if (type? sv-304 crate)
sv-304
)
)
(begin (set! sv-320 s0-0) (not (if (type? sv-320 market-object)
sv-320
)
)
)
(begin (set! sv-336 s0-0) (not (if (type? sv-336 fruit-stand)
sv-336
)
)
)
)
(set! s5-1 #f)
)
(cond
((not s1-0)
(+! gp-2 -1)
(set! f30-0 f28-0)
(set! s1-0 s0-0)
)
((< f28-0 f30-0)
(set! (-> self result-array s4-0) (process->handle s1-0))
(+! s4-0 1)
(set! f30-0 f28-0)
(set! s1-0 s0-0)
)
(else
(set! (-> self result-array s4-0) (process->handle s0-0))
(+! s4-0 1)
)
)
)
)
(else
(+! gp-2 -1)
)
)
)
)
(when s1-0
(set! (-> self result-array s4-0) (process->handle s1-0))
(+! gp-2 1)
(+ s4-0 1)
)
(if (zero? gp-2)
(go-virtual fizzle)
)
(if s5-1
(process-spawn gun-dark-shot :init gun-dark-shot-init-fizzle (-> self root-override trans))
)
)
(countdown (s5-3 gp-2)
(let* ((s3-1 (handle->process (-> self result-array s5-3)))
(s4-1 (if (type? s3-1 process-focusable)
s3-1
)
)
)
(when s4-1
(let ((a1-21 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-21 from) (process->ppointer self))
(set! (-> a1-21 num-params) 2)
(set! (-> a1-21 message) 'attack)
(set! (-> a1-21 param 0) (the-as uint #f))
(let ((v1-91 (new 'static 'attack-info :mask (attack-info-mask mode id damage))))
(let* ((a0-49 *game-info*)
(a2-12 (+ (-> a0-49 attack-id) 1))
)
(set! (-> a0-49 attack-id) a2-12)
(set! (-> v1-91 id) a2-12)
)
(set! (-> v1-91 mode) 'explode)
(set! (-> v1-91 damage) 16.0)
(set! (-> a1-21 param 1) (the-as uint v1-91))
)
(send-event-function s4-1 a1-21)
)
(process-spawn-function
process
(lambda :behavior gun-dark-shot
((arg0 handle))
(let ((s5-0 (-> self parent))
(s4-0 0)
(s3-0 (-> self clock frame-counter))
)
(set! (-> self clock) (-> s5-0 0 clock))
(while (and (nonzero? (-> (the-as process-drawable (-> s5-0 0)) skel))
(let ((v1-30 s5-0))
(and (or (focus-test?
(the-as process-focusable (if v1-30
(the-as process-focusable (-> v1-30 0 self))
)
)
dead
hit
)
(let ((v1-35 s5-0))
(or (and (-> (the-as process (if v1-35
(the-as process (-> v1-35 0 self))
)
)
next-state
)
(let ((v1-39 s5-0))
(= (-> (the-as process (if v1-39
(the-as process (-> v1-39 0 self))
)
)
next-state
name
)
'knocked
)
)
)
(< (- (-> self clock frame-counter) s3-0) (seconds 0.1))
)
)
)
(< (- (-> self clock frame-counter) s3-0) (seconds 5))
(not (logtest? (-> (the-as process-drawable (-> s5-0 0)) draw status) (draw-control-status no-draw no-draw-temp))
)
)
)
)
(when (>= (- (-> self clock frame-counter) (the-as time-frame s4-0)) (seconds 0.05))
(set! s4-0 (the-as int (-> self clock frame-counter)))
(if (handle->process arg0)
(process-drawable-shock-effect-bullseye
(the-as process-focusable (handle->process arg0))
(the-as process-focusable (ppointer->process s5-0))
(the-as matrix (-> *lightning-spec-id-table* 12))
(the-as int lightning-probe-callback)
(-> *part-id-table* 430)
(-> *part-id-table* 215)
(-> *part-id-table* 216)
)
)
(process-drawable-shock-effect
(the-as process-drawable (ppointer->process s5-0))
(-> *lightning-spec-id-table* 11)
lightning-probe-callback
(-> *part-id-table* 429)
0
0
40960.0
)
)
(suspend)
)
)
(none)
)
(-> self result-array (+ gp-2 -1))
:to s4-1
)
(let ((s4-2 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s4-2) (seconds 0.1))
(suspend)
)
)
)
)
)
)
)
(let ((gp-3 (-> self clock frame-counter)))
(while (or (-> self child) (and (nonzero? (get-status *gui-control* (the-as sound-id (-> self explode-sound))))
(< (- (-> self clock frame-counter) gp-3) (seconds 10))
)
)
(suspend)
)
)
(deactivate self)
(none)
)
)
-77
View File
@@ -437,7 +437,6 @@
(security-wall-method-24 self)
(none)
)
:code L448
)
;; failed to figure out what this is:
@@ -1678,82 +1677,6 @@ This commonly includes things such as:
(set! (-> self root-override root-prim specific 0) (+ (-> self root-override root-prim specific 1) -1))
(none)
)
:code (behavior ()
(local-vars (v1-6 handle))
(cond
((and (>= (-> self id) 0)
(begin
(let ((v1-4 (-> *game-info* sub-task-list 87)))
(set! v1-6 (if (-> v1-4 info)
(-> v1-4 info manager)
(the-as handle #f)
)
)
)
(nonzero? (l32-false-check v1-6))
)
(let ((a0-4 (-> v1-6 process 0)))
(if (= (-> v1-6 pid) (-> a0-4 pid))
a0-4
)
)
)
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 2))
(let ((a1-1 (new 'stack-no-clear 'vector)))
(set! (-> a1-1 quad) (-> self root-override trans quad))
(set! (-> a1-1 y) (+ 10240.0 (-> a1-1 y)))
(spawn (-> self part) a1-1)
)
(suspend)
)
)
(while (not (-> self button-down?))
(suspend)
)
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) (process->ppointer self))
(set! (-> a1-2 num-params) 1)
(set! (-> a1-2 message) 'guard-turret-button-pushed)
(set! (-> a1-2 param 0) (the-as uint (-> self id)))
(let ((t9-1 send-event-function)
(v1-25 (-> *game-info* sub-task-list 87))
)
(t9-1
(handle->process (if (-> v1-25 info)
(-> v1-25 info manager)
(the-as handle #f)
)
)
a1-2
)
)
)
(go-virtual pushed)
)
(else
(ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! 32.0 0.5) :frame-num 20.0)
(until (ja-done? 0)
(let ((a1-4 (new 'stack-no-clear 'vector)))
(set! (-> a1-4 quad) (-> self root-override trans quad))
(set! (-> a1-4 y) (+ 10240.0 (-> a1-4 y)))
(spawn (-> self part) a1-4)
)
(suspend)
(ja :num! (seek! 32.0 0.5))
)
(let ((gp-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 3))
(suspend)
)
)
)
)
(set! (-> self root-override root-prim specific 0) (-> self root-override root-prim specific 1))
(setup-masks (-> self draw) 2 0)
(go-virtual idle)
(none)
)
:post (behavior ()
(ja-post)
(none)
+5 -4
View File
@@ -89,7 +89,6 @@
],
"skip_compile_files": [
"ctywide-obs",
"drill-baron"
],
@@ -309,12 +308,12 @@
"target-pilot-init",
"(method 224 crimson-guard)", // .mula.s
"metalkor-egg-reaction", // .mula.s
"init-vortex-polys"
"init-vortex-polys",
"(method 11 cty-guard-turret)" // handle casts
],
"skip_compile_states": {
"(idle process-taskable)": ["event"],
"(impact gun-dark-shot)": ["code"],
"(target-gun-stance target)": ["code"],
"(hostile hopper)": ["trans"], // adds b! but the corresponding label is missing
"(broken rhino-wall)": ["code"], // missing cast to art-joint-anim
@@ -326,6 +325,8 @@
"(hit drill-crane)": ["code"], // missing cast to art-joint-anim
"(hit under-break-door)": ["code"], // missing cast to art-joint-anim
"(target-pilot-get-on target)": ["trans"], // missing cast
"(idle krew-boss)": ["trans"] // collide-shape array created on the stack
"(idle krew-boss)": ["trans"], // collide-shape array created on the stack
"(idle-close security-wall)": ["code"], // https://github.com/open-goal/jak-project/issues/2168
"(explode cty-guard-turret)": ["code"] // handle casts not sorted out
}
}