decomp: meet-brutter (#2218)

This commit is contained in:
Hat Kid 2023-02-18 16:30:29 +01:00 committed by GitHub
parent 4c812658f1
commit 7a2575fd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 7356 additions and 80 deletions

View File

@ -9035,6 +9035,7 @@
(citizen-fat 2)
(citizen-norm-2 3)
(crimson-guard-0 4)
(tt5 5)
(crimson-guard-1 6)
(crimson-guard-2 7)
(metalhead-grunt 8)
@ -9046,6 +9047,7 @@
(cara 14)
(carb 15)
(carc 16)
(tt17 17)
(guard-bike 18)
(hellcat 19)
(traffic-type-20 20)
@ -34933,82 +34935,6 @@
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; meet-brutter ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype paddywagon (UNKNOWN)
()
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
;; Failed to read fields.
)
|#
#|
(deftype pw-iter-seg (UNKNOWN)
((self basic :offset-assert 0)
(desired-dir vector :inline :offset-assert 16)
(score float :offset-assert 32)
(seg nav-segment :offset-assert 36)
(level basic :offset-assert 40)
)
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
)
|#
#|
(deftype city-lurker (UNKNOWN)
()
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
;; Failed to read fields.
)
|#
#|
(deftype city-meet-brutter-info (UNKNOWN)
((pos vector :inline :offset-assert 0)
(level basic :offset-assert 16)
(nav-mesh-id uint32 :offset-assert 20)
(end-pos vector :inline :offset-assert 32)
)
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
)
|#
#|
(deftype city-save-lurkers-info (UNKNOWN)
((pos vector :inline :offset-assert 0)
(level basic :offset-assert 16)
(nav-mesh-id uint32 :offset-assert 20)
(end-pos vector :inline :offset-assert 32)
(pipe-name basic :offset-assert 48)
)
:method-count-assert 0
:size-assert #x0
:flag-assert #x0
)
|#
;; (define-extern *paddywagon-constants* object)
;; (define-extern pw-iter-seg-new-dir-level function)
;; (define-extern choose-next-branch-no-exit-level function)
;; (define-extern *city-lurker-global-info* civilian-global-info)
;; (define-extern *city-lurker-nav-enemy-info* nav-enemy-info)
;; (define-extern *city-meet-brutter-vehicle-info* object)
;; (define-extern *meet-brutter-position* array)
;; (define-extern *city-save-lurkers-pipe-info* array)
;; (define-extern *city-save-lurkers-vehicle-info* object)
;; (define-extern *save-lurkers-position* array)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ctysluma-part ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -51230,6 +51156,97 @@
(define-extern civilian-falling-post (function none :behavior civilian))
(define-extern do-spline2 (function vector vector vector vector vector float vector))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; meet-brutter ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; this block was moved
(deftype paddywagon (vehicle-guard)
((current-level symbol :offset-assert 1076)
)
:method-count-assert 159
:size-assert #x438
:flag-assert #x9f03c00438
)
(deftype pw-iter-seg (structure)
((self paddywagon :offset-assert 0)
(desired-dir vector :inline :offset-assert 16)
(score float :offset-assert 32)
(seg nav-segment :offset-assert 36)
(level symbol :offset-assert 40)
)
:method-count-assert 9
:size-assert #x2c
:flag-assert #x90000002c
)
(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)
)
:method-count-assert 221
:size-assert #x474
:flag-assert #xdd04000474
(:methods
(go-at-end () _type_ :state 218)
(go-at-pipe () _type_ :state 219)
(wait-at-end () _type_ :state 220)
)
)
(deftype city-meet-brutter-info (structure)
((pos vector :inline :offset-assert 0)
(level symbol :offset-assert 16)
(nav-mesh-id uint32 :offset-assert 20)
(end-pos vector :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
(deftype city-save-lurkers-info (structure)
((pos vector :inline :offset-assert 0)
(level symbol :offset-assert 16)
(nav-mesh-id uint32 :offset-assert 20)
(end-pos vector :inline :offset-assert 32)
(pipe-name string :offset-assert 48)
)
:method-count-assert 9
:size-assert #x34
:flag-assert #x900000034
)
(deftype mystery-traffic-object-spawn-params-1 (structure)
"(anon-function 6 meet-brutter)"
((params traffic-object-spawn-params 2 :inline)
(vec vector :inline)
(quat quaternion :inline)
)
)
(define-extern *paddywagon-constants* rigid-body-vehicle-constants)
(define-extern pw-iter-seg-new-dir-level (function pw-iter-seg nav-segment none))
(define-extern choose-next-branch-no-exit-level (function vehicle-controller paddywagon nav-branch))
(define-extern *city-lurker-global-info* civilian-global-info)
(define-extern *city-lurker-nav-enemy-info* nav-enemy-info)
(define-extern *city-meet-brutter-vehicle-info* (inline-array city-meet-brutter-info))
(define-extern *meet-brutter-position* (array vector))
(define-extern *city-save-lurkers-pipe-info* (array city-save-lurkers-info))
(define-extern *city-save-lurkers-vehicle-info* (inline-array city-save-lurkers-info))
(define-extern *save-lurkers-position* (array vector))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; guard ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -1227,5 +1227,21 @@
"metalkor-setup": [
[1, "(function gem-tracker none)"],
[2, "(function gem-tracker none)"]
],
"meet-brutter": [
[0, "(function none :behavior task-manager)"],
[1, "(function none :behavior task-manager)"],
[2, "(function none :behavior task-manager)"],
[3, "(function symbol :behavior task-manager)"],
[4, "(function city-lurker object symbol none :behavior task-manager)"],
[5, "(function none :behavior task-manager)"],
[6, "(function none :behavior task-manager)"],
[7, "(function none :behavior task-manager)"],
[8, "(function none :behavior task-manager)"],
[9, "(function none :behavior task-manager)"],
[10, "(function none :behavior task-manager)"],
[11, "(function city-lurker object symbol none :behavior task-manager)"],
[12, "(function none :behavior task-manager)"],
[13, "(function none :behavior task-manager)"]
]
}

View File

@ -98,7 +98,6 @@
"(method 10 bigmap)",
"(method 9 editable-region)", // condition branch assert hit
"(anon-function 10 meet-brutter)",
"(method 154 vehicle-racer)",
"(method 228 hal-sewer)",
"test-to-from-spr",
@ -525,7 +524,8 @@
"(method 15 vehicle-controller)": [0, 3, 5, 6, 7, 10],
"(anon-function 41 guard)": [9],
"(anon-function 10 metalhead-predator)": [24, 25],
"(anon-function 10 errol-chal)": [6]
"(anon-function 10 errol-chal)": [6],
"choose-next-branch-no-exit-level": [0, 6, 8, 12, 13, 16, 18, 26]
},
// Sometimes the game might use format strings that are fetched dynamically,

View File

@ -1654,5 +1654,22 @@
["L430", "vector"],
["L431", "vector"],
["L423", "attack-info"]
],
"meet-brutter": [
["L537", "(inline-array city-save-lurkers-info)", 6],
["L558", "(inline-array city-meet-brutter-info)", 3],
["L643", "uint64", true],
["L647", "uint64", true],
["L644", "uint64", true],
["L646", "uint64", true],
["L645", "uint64", true],
["L602", "uint64", true],
["L599", "uint64", true],
["L601", "uint64", true],
["L603", "uint64", true],
["L563", "attack-info"],
["L600", "uint64", true],
["L551", "vector"],
["L531", "vector"]
]
}

View File

@ -2125,5 +2125,17 @@
"(trans hang-shoot-n-launch metalkor)": [[32, "enemy-init-by-other-params"]],
"(trans test metalkor)": [[32, "vector"]],
"(trans explode metalkor)": [[16, "matrix"]],
"(method 12 metalkor-chain-physics)": [[560, "bounding-box"]]
"(method 12 metalkor-chain-physics)": [[560, "bounding-box"]],
"(code exit-vehicle city-lurker)": [
[16, "vector"],
[64, "vector"]
],
"(anon-function 6 meet-brutter)": [
[16, "mystery-traffic-object-spawn-params-1"]
],
"(anon-function 3 meet-brutter)": [[96, "task-arrow-params"]],
"(anon-function 13 meet-brutter)": [
[208, "mystery-traffic-object-spawn-params-1"]
],
"choose-next-branch-no-exit-level": [[32, "pw-iter-seg"]]
}

View File

@ -10025,5 +10025,96 @@
[373, "v1", "art-joint-anim"],
["_stack_", 16, "res-tag"]
],
"(trans explode metalkor)": [[15, "v0", "entity-actor"]]
"(trans explode metalkor)": [[15, "v0", "entity-actor"]],
"(code board-vehicle city-lurker)": [
[12, "v1", "vehicle"],
[166, "s1", "vehicle"],
[169, "s1", "vehicle"],
[298, "s5", "vehicle"],
[301, "s5", "vehicle"],
[306, "s5", "vehicle"],
[173, "s1", "vehicle"],
[372, "a0", "vehicle"],
[376, "a0", "vehicle"],
["_stack_", 128, "float"]
],
"(code ride city-lurker)": [
[15, "v1", "vehicle"],
[116, "v1", "vehicle"]
],
"(code exit-vehicle city-lurker)": [
[12, "v1", "vehicle"],
[95, "s5", "vehicle"],
[98, "s5", "vehicle"],
[103, "s5", "vehicle"],
[190, "a0", "vehicle"],
[193, "a0", "vehicle"],
[256, "s3", "vehicle"],
[253, "s3", "vehicle"],
[260, "s3", "vehicle"],
[150, "s3", "vehicle"],
[153, "s3", "vehicle"],
[158, "s3", "vehicle"]
],
"(code wait-for-ride city-lurker)": [
[22, "v1", "art-joint-anim"],
[149, "v1", "art-joint-anim"]
],
"(trans idle city-lurker)": [
[14, "a0", "vehicle"],
[19, "a0", "vehicle"],
[22, "a0", "vehicle"]
],
"(code wait-at-end city-lurker)": [[22, "v1", "art-joint-anim"]],
"(method 74 city-lurker)": [[[24, 106], "s5", "traffic-object-spawn-params"]],
"(anon-function 10 meet-brutter)": [
[[341, 625], "s4", "city-lurker"],
[[692, 706], "s4", "city-lurker"],
[472, "s3", "vehicle"],
[492, "s3", "vehicle"],
[520, "s3", "vehicle"],
[580, "s2", "vehicle"],
[593, "s2", "vehicle"],
[182, "s5", "city-lurker"],
[276, "s4", "city-lurker"],
[281, "s4", "city-lurker"],
[76, "a1", "city-lurker"],
[22, "a1", "city-lurker"],
[30, "a1", "city-lurker"],
[186, "s5", "paddywagon"],
[192, "s5", "paddywagon"],
[198, "s5", "paddywagon"],
[229, "s5", "paddywagon"],
[235, "s5", "paddywagon"],
[258, "s5", "paddywagon"],
[261, "s5", "paddywagon"],
[274, "s5", "paddywagon"],
[285, "s5", "paddywagon"],
[297, "s5", "paddywagon"],
[277, "s5", "paddywagon"],
[283, "s4", "city-lurker"]
],
"(anon-function 6 meet-brutter)": [
[162, "v0", "city-lurker"],
[121, "v0", "paddywagon"]
],
"(anon-function 3 meet-brutter)": [
[[421, 772], "s4", "city-lurker"],
[[552, 612], "s3", "vehicle"],
[699, "s2", "vehicle"],
[712, "s2", "vehicle"],
[[262, 378], "s5", "paddywagon"],
[356, "s4", "process-focusable"],
[361, "s4", "process-focusable"],
[201, "a0", "city-lurker"],
[78, "a1", "city-lurker"],
[169, "a0", "city-lurker"],
[23, "a2", "city-lurker"],
[31, "a2", "city-lurker"],
[363, "s4", "process-focusable"]
],
"(anon-function 13 meet-brutter)": [
[215, "v0", "city-lurker"],
[174, "v0", "paddywagon"]
]
}

View File

@ -35,6 +35,7 @@
(citizen-fat 2)
(citizen-norm-2 3)
(crimson-guard-0 4)
(tt5 5)
(crimson-guard-1 6)
(crimson-guard-2 7)
(metalhead-grunt 8)
@ -46,6 +47,7 @@
(cara 14)
(carb 15)
(carc 16)
(tt17 17)
(guard-bike 18)
(hellcat 19)
(traffic-type-20 20)

View File

@ -7,3 +7,278 @@
;; DECOMP BEGINS
(defskelgroup skel-lurker-pipe-lid lurker-pipe-lid lurker-pipe-lid-lod0-jg lurker-pipe-lid-idle-ja
((lurker-pipe-lid-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
)
(deftype lurker-pipe-lid (process-focusable)
((angle degrees :offset-assert 204)
(rot float :offset-assert 208)
)
:heap-base #x60
:method-count-assert 31
:size-assert #xd4
:flag-assert #x1f006000d4
(:methods
(idle () _type_ :state 27)
(lurker-pipe-lid-method-28 (_type_) none 28)
(lurker-pipe-lid-method-29 (_type_) none 29)
(lurker-pipe-lid-method-30 (_type_) none 30)
)
)
(defstate idle (lurker-pipe-lid)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(the-as object (case event-type
(('spin)
(set! (-> self angle) 196608.0)
(set! (-> self rot) -655360.0)
)
)
)
)
:enter (behavior ()
'()
(none)
)
:exit (behavior ()
'()
(none)
)
:trans (behavior ()
'()
(none)
)
:code (the-as (function none :behavior lurker-pipe-lid) sleep-code)
:post (behavior ()
(if (< 0.0 (-> self angle))
(set! (-> self angle)
(- (-> self angle)
(* 6.0 (-> self clock seconds-per-frame) (fmax 1820.4445 (fmin (-> self angle) (-> self angle))))
)
)
(set! (-> self angle) 0.0)
)
(quaternion-vector-angle! (-> self root-override quat) *x-vector* (-> self angle))
(ja-post)
(none)
)
)
(defmethod lurker-pipe-lid-method-28 lurker-pipe-lid ((obj lurker-pipe-lid))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-6 prim-core collide-as) (collide-spec crate))
(set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list))
(set! (-> v1-6 prim-core action) (collide-action solid rideable))
(set! (-> v1-6 transform-index) 3)
(set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-6)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-9 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
(defmethod lurker-pipe-lid-method-29 lurker-pipe-lid ((obj lurker-pipe-lid))
(set! (-> obj mask) (logior (process-mask crate) (-> obj mask)))
0
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! lurker-pipe-lid ((obj lurker-pipe-lid) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(lurker-pipe-lid-method-28 obj)
(process-drawable-from-entity! obj arg0)
(ctywide-entity-hack)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-lurker-pipe-lid" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(lurker-pipe-lid-method-29 obj)
(set! (-> obj angle) 0.0)
(transform-post)
(go (method-of-object obj idle))
(none)
)
(deftype ctyn-lamp (process-focusable)
()
:heap-base #x50
:method-count-assert 31
:size-assert #xcc
:flag-assert #x1f005000cc
(:methods
(idle () _type_ :state 27)
(die () _type_ :state 28)
(ctyn-lamp-method-29 (_type_) none 29)
(ctyn-lamp-method-30 (_type_) none 30)
)
)
(defskelgroup skel-ctyn-lamp ctyn-lamp ctyn-lamp-lod0-jg ctyn-lamp-idle-ja
((ctyn-lamp-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5)
)
(defskelgroup skel-ctyn-lamp-explode ctyn-lamp ctyn-lamp-explode-lod0-jg ctyn-lamp-explode-idle-ja
((ctyn-lamp-explode-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 80)
)
(define *ctyn-lamp-exploder-params*
(new 'static 'joint-exploder-static-params
:joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
(new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
)
:collide-spec #x1
)
)
(defstate idle (ctyn-lamp)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('attack)
(-> event param 1)
(let ((s5-0 (the-as process-drawable proc))
(gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))
)
(set! (-> gp-0 fountain-rand-transv-lo quad) (-> s5-0 root trans quad))
(set! (-> gp-0 fountain-rand-transv-hi x) 16384.0)
(set! (-> gp-0 fountain-rand-transv-hi y) 40960.0)
(process-spawn
joint-exploder
(art-group-get-by-name *level* "skel-ctyn-lamp-explode" (the-as (pointer uint32) #f))
5
gp-0
*ctyn-lamp-exploder-params*
:to self
)
)
(go-virtual die)
)
)
)
:code (the-as (function none :behavior ctyn-lamp) sleep-code)
)
(defstate die (ctyn-lamp)
:virtual #t
:enter (the-as (function none :behavior ctyn-lamp) #f)
:exit (the-as (function none :behavior ctyn-lamp) #f)
:trans (the-as (function none :behavior ctyn-lamp) #f)
:code (behavior ()
(sound-play "lamp-hit")
(let ((v1-3 (-> self root-override root-prim)))
(set! (-> v1-3 prim-core collide-as) (collide-spec))
(set! (-> v1-3 prim-core collide-with) (collide-spec))
)
0
(logior! (-> self draw status) (draw-control-status no-draw))
(while (-> self child)
(suspend)
)
(cleanup-for-death self)
(none)
)
:post (the-as (function none :behavior ctyn-lamp) #f)
)
(defmethod ctyn-lamp-method-29 ctyn-lamp ((obj ctyn-lamp))
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate
generic-attack
lunge
flop
punch
spin
roll
uppercut
bonk
tube
vehicle
flut-attack
board
mech-punch
dark-punch
dark-giant
)
)
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 0)
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 20480.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-7)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-10 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
(defmethod ctyn-lamp-method-30 ctyn-lamp ((obj ctyn-lamp))
(set! (-> obj mask) (logior (process-mask crate) (-> obj mask)))
0
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ctyn-lamp ((obj ctyn-lamp) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(ctyn-lamp-method-29 obj)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-ctyn-lamp" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(ctyn-lamp-method-30 obj)
(transform-post)
(go (method-of-object obj idle))
(none)
)

File diff suppressed because it is too large Load Diff

View File

@ -47,6 +47,7 @@
"DGO/LBOMBBOT.DGO",
"DGO/LERLCHAL.DGO",
"DGO/LKIDDOGE.DGO",
"DGO/LMEETBRT.DGO",
"DGO/LPORTRUN.DGO",
"DGO/LSACK.DGO",
"DGO/MCN.DGO",