decomp: finish mother-spider (#1014)

* decomp: finish `mother-spider`

* address feedback
This commit is contained in:
Tyler Wilding
2021-12-18 01:32:46 -05:00
committed by GitHub
parent 694b895f04
commit 89980bd61d
21 changed files with 8590 additions and 6579 deletions
+29 -27
View File
@@ -10145,7 +10145,7 @@
:flag-assert #xc00000028
(:methods
(new (symbol type process-drawable pickup-type float) _type_ 0)
(drop-pickup (_type_ symbol process-tree fact-info int) none 9)
(drop-pickup (_type_ symbol process-tree fact-info int) (pointer process) 9)
(reset! (_type_ symbol) none 10)
(pickup-collectable! (_type_ pickup-type float handle) float 11)
)
@@ -11284,7 +11284,7 @@
(pat-ignore-mask pat-surface :offset-assert 148)
(event-self basic :offset-assert 152)
(event-other basic :offset-assert 156)
(root-prim collide-shape-prim :offset-assert 160)
(root-prim collide-shape-prim :offset-assert 160) ;; i think this can be any subtype of collide-shape-prim as well!
(riders collide-sticky-rider-group :offset-assert 164)
(backup-collide-as uint64 :offset-assert 168)
(backup-collide-with uint64 :offset-assert 176)
@@ -15274,11 +15274,11 @@
(set-current-poly! (_type_ nav-poly) none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 (_type_ vector) nav-poly 16) ; see - nav-enemy-test-point-in-nav-mesh?
(dummy-17 () none 17)
(dummy-17 (_type_ vector vector) none 17)
(TODO-RENAME-18 (_type_ vector) nav-poly 18)
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-21 (_type_ vector) none 21)
(dummy-22 () none 22)
(dummy-23 (_type_ vector check-vector-collision-with-nav-spheres-info) float 23) ;; TODO - unconfirmed
(dummy-24 (_type_ float clip-travel-vector-to-mesh-return-info) none 24)
@@ -15292,7 +15292,7 @@
(dummy-32 () none 32)
(dummy-33 () none 33)
(dummy-34 () none 34)
(dummy-35 () none 35)
(dummy-35 (_type_ vector vector vector vector float) none 35)
)
)
@@ -32261,6 +32261,8 @@
:size-assert #xf0
:heap-base #x80
:flag-assert #x14008000f0
(:states
(mother-spider-leg-flying))
)
(deftype mother-spider-thread (structure)
@@ -32363,9 +32365,22 @@
(spawn-child (_type_ vector vector symbol) int 30)
(is-player-stuck? (_type_) symbol 31)
)
(:states
(mother-spider-die-wait-for-children)
(mother-spider-idle)
(mother-spider-hit-while-birthing)
(mother-spider-birthing)
(mother-spider-traveling uint)
(mother-spider-birth-baby)
(mother-spider-tracking)
(mother-spider-hit-while-tracking)
(mother-spider-spit)
(mother-spider-stop-traveling)
(mother-spider-die-from-uppercut)
(mother-spider-die)
(wait-for-children))
)
;; ----------------------
;; File - mother-spider-egg
;; Source Path - levels/maincave/mother-spider-egg.gc
@@ -32394,6 +32409,13 @@
(dummy-20 (_type_) none 20)
(draw-egg-shadow (_type_ vector symbol) symbol 21)
)
(:states
(mother-spider-egg-falling)
(mother-spider-egg-die-exit)
(mother-spider-egg-hatch)
(mother-spider-egg-die)
(mother-spider-egg-on-ground)
(mother-spider-egg-die-while-falling))
)
;; - Functions
@@ -32404,12 +32426,6 @@
(define-extern *mother-spider-egg-unbroken-sg* skeleton-group)
(define-extern *mother-spider-egg-broken-sg* skeleton-group)
(define-extern mother-spider-egg-falling (state mother-spider-egg)) ;; unknown type
(define-extern mother-spider-egg-die-exit (state mother-spider-egg)) ;; unknown type
(define-extern mother-spider-egg-hatch (state mother-spider-egg)) ;; unknown type
(define-extern mother-spider-egg-die (state mother-spider-egg)) ;; unknown type
(define-extern mother-spider-egg-on-ground (state mother-spider-egg)) ;; unknown type
(define-extern mother-spider-egg-die-while-falling (state mother-spider-egg)) ;; unknown type
;; ----------------------
@@ -32452,23 +32468,9 @@
;; - Unknowns
(define-extern *mother-spider-sg* skeleton-group)
(define-extern mother-spider-die-wait-for-children (state mother-spider)) ;; unknown type
(define-extern mother-spider-idle (state mother-spider)) ;; unknown type
(define-extern *mother-spider-threads* (inline-array mother-spider-thread)) ;; unknown type
(define-extern *mother-spider-leg-infos* (inline-array mother-spider-leg-info)) ;; unknown type
(define-extern mother-spider-hit-while-birthing (state mother-spider)) ;; unknown type
(define-extern mother-spider-birthing (state mother-spider)) ;; unknown type
(define-extern mother-spider-traveling (state uint mother-spider)) ;; unknown type
(define-extern mother-spider-birth-baby (state mother-spider)) ;; unknown type
(define-extern mother-spider-tracking (state mother-spider)) ;; unknown type
(define-extern mother-spider-hit-while-tracking (state mother-spider)) ;; unknown type
(define-extern mother-spider-spit (state mother-spider)) ;; unknown type
(define-extern mother-spider-stop-traveling (state mother-spider)) ;; unknown type
(define-extern mother-spider-die-from-uppercut (state mother-spider)) ;; unknown type
(define-extern mother-spider-die (state mother-spider)) ;; unknown type
(define-extern *mother-spider-leg-sg* skeleton-group)
(define-extern mother-spider-leg-flying (state mother-spider-leg)) ;; unknown type
(define-extern wait-for-children (state mother-spider)) ;; unknown type
;; ----------------------
@@ -33542,7 +33544,7 @@
:heap-base #x40
:flag-assert #x14004000b0
(:states
(bully-broken-cage-explode bully-broken-cage)
(bully-broken-cage-explode)
)
)
@@ -5740,12 +5740,12 @@
],
"(trans mother-spider-leg-flying)": [
[16, "collide-mesh-cache-tri"],
[16, "collide-tri-result"],
[112, "vector"]
],
"(method 24 mother-spider)": [
[16, "collide-mesh-cache-tri"],
[16, "collide-tri-result"],
[112, "vector"],
[128, "vector"]
],
@@ -5753,9 +5753,9 @@
"(method 20 mother-spider)": [
[16, "vector"],
[32, "vector"],
[48, "collide-mesh-cache-tri"],
[48, "collide-tri-result"],
[144, "vector"],
[160, "collide-mesh-cache-tri"]
[160, "collide-tri-result"]
],
"mother-spider-default-event-handler": [
@@ -7004,5 +7004,18 @@
[367, "v0", "(pointer float)"]
],
"mother-spider-full-joint-callback": [
[[10, 48], "v1", "mother-spider-thread"]
],
"(method 11 mother-spider)": [
["_stack_", 16, "res-tag"],
[[500, 525], "v0", "(pointer float)"]
],
"(method 21 mother-spider)": [
[179, "s3", "collide-shape-prim-group"]
],
"placeholder-do-not-add-below": []
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -107,7 +107,7 @@
:flag-assert #xc00000028
(:methods
(new (symbol type process-drawable pickup-type float) _type_ 0)
(drop-pickup (_type_ symbol process-tree fact-info int) none 9)
(drop-pickup (_type_ symbol process-tree fact-info int) (pointer process) 9)
(reset! (_type_ symbol) none 10)
(pickup-collectable! (_type_ pickup-type float handle) float 11)
)
+3 -3
View File
@@ -246,11 +246,11 @@
(set-current-poly! (_type_ nav-poly) none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 (_type_ vector) nav-poly 16) ; see - nav-enemy-test-point-in-nav-mesh?
(dummy-17 () none 17)
(dummy-17 (_type_ vector vector) none 17)
(TODO-RENAME-18 (_type_ vector) nav-poly 18)
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-21 (_type_ vector) none 21)
(dummy-22 () none 22)
(dummy-23 (_type_ vector check-vector-collision-with-nav-spheres-info) float 23) ;; TODO - unconfirmed
(dummy-24 (_type_ float clip-travel-vector-to-mesh-return-info) none 24)
@@ -264,7 +264,7 @@
(dummy-32 () none 32)
(dummy-33 () none 33)
(dummy-34 () none 34)
(dummy-35 () none 35)
(dummy-35 (_type_ vector vector vector vector float) none 35)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -39,6 +39,14 @@
(dummy-20 (_type_) none 20)
(draw-egg-shadow (_type_ vector symbol) symbol 21)
)
(:states
mother-spider-egg-die
mother-spider-egg-die-exit
mother-spider-egg-die-while-falling
mother-spider-egg-falling
mother-spider-egg-hatch
mother-spider-egg-on-ground
)
)
@@ -17,6 +17,9 @@
:method-count-assert 20
:size-assert #xf0
:flag-assert #x14008000f0
(:states
mother-spider-leg-flying
)
)
@@ -126,6 +129,21 @@
(spawn-child (_type_ vector vector symbol) int 30)
(is-player-stuck? (_type_) symbol 31)
)
(:states
mother-spider-birth-baby
mother-spider-birthing
mother-spider-die
mother-spider-die-from-uppercut
mother-spider-die-wait-for-children
mother-spider-hit-while-birthing
mother-spider-hit-while-tracking
mother-spider-idle
mother-spider-spit
mother-spider-stop-traveling
mother-spider-tracking
(mother-spider-traveling uint)
wait-for-children
)
)
File diff suppressed because it is too large Load Diff
+14 -16
View File
@@ -20,7 +20,7 @@
:size-assert #xb0
:flag-assert #x14004000b0
(:states
(bully-broken-cage-explode bully-broken-cage)
bully-broken-cage-explode
)
)
@@ -273,23 +273,23 @@
(defstate bully-broken-cage-explode (bully-broken-cage)
:code
(behavior ((arg0 bully-broken-cage))
(behavior ()
(ja-channel-push! 1 0)
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
(set! (-> a0-2 param 0)
(let ((a0-1 (-> self skel root-channel 0)))
(set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
(set! (-> a0-1 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 16)) data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group! a0-2 (the-as art-joint-anim (-> self draw art-group data 16)) num-func-seek!)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group! a0-1 (the-as art-joint-anim (-> self draw art-group data 16)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group data 0 length) -1)))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group data 0 length) -1)))
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
)
)
(none)
@@ -304,10 +304,8 @@
(set! (-> self root trans quad) (-> self parent-override 0 root-override trans quad))
(quaternion-copy! (-> self root quat) (-> self parent-override 0 root-override quat))
(set! (-> self root scale quad) (-> self parent-override 0 root-override scale quad))
(let ((a0-13 self))
(initialize-skeleton a0-13 *bully-broken-cage-sg* '())
(go bully-broken-cage-explode a0-13)
)
(initialize-skeleton self *bully-broken-cage-sg* '())
(go bully-broken-cage-explode)
(none)
)
+1 -1
View File
@@ -117,7 +117,7 @@
:flag-assert #xc00000028
(:methods
(new (symbol type process-drawable pickup-type float) _type_ 0)
(drop-pickup (_type_ symbol process-tree fact-info int) none 9)
(drop-pickup (_type_ symbol process-tree fact-info int) (pointer process) 9)
(reset! (_type_ symbol) none 10)
(pickup-collectable! (_type_ pickup-type float handle) float 11)
)
+3 -3
View File
@@ -381,11 +381,11 @@
(set-current-poly! (_type_ nav-poly) none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 (_type_ vector) nav-poly 16)
(dummy-17 () none 17)
(dummy-17 (_type_ vector vector) none 17)
(TODO-RENAME-18 (_type_ vector) nav-poly 18)
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-21 (_type_ vector) none 21)
(dummy-22 () none 22)
(dummy-23 (_type_ vector check-vector-collision-with-nav-spheres-info) float 23)
(dummy-24 (_type_ float clip-travel-vector-to-mesh-return-info) none 24)
@@ -399,7 +399,7 @@
(dummy-32 () none 32)
(dummy-33 () none 33)
(dummy-34 () none 34)
(dummy-35 () none 35)
(dummy-35 (_type_ vector vector vector vector float) none 35)
)
)
+1
View File
@@ -250,6 +250,7 @@
)
;; definition for function process-drawable-death-event-handler
;; INFO: Return type mismatch object vs none.
(defbehavior process-drawable-death-event-handler process-drawable ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('death-start)
+1 -1
View File
@@ -257,7 +257,7 @@ nav-enemy-default-event-handler
(vector-normalize! (-> self dir) 1.0)
(vector+*! gp-0 s4-0 (-> self dir) (- (-> self spawn-distance)))
)
((method-of-object (-> self nav) dummy-17))
(dummy-17 (-> self nav) gp-0 gp-0)
(set! (-> gp-0 y) (-> self y-min))
(set! (-> self spawn-point quad) (-> gp-0 quad))
)
+8
View File
@@ -22,6 +22,14 @@
(dummy-20 (_type_) none 20)
(draw-egg-shadow (_type_ vector symbol) symbol 21)
)
(:states
mother-spider-egg-die
mother-spider-egg-die-exit
mother-spider-egg-die-while-falling
mother-spider-egg-falling
mother-spider-egg-hatch
mother-spider-egg-on-ground
)
)
;; definition for method 3 of type mother-spider-egg
+18
View File
@@ -12,6 +12,9 @@
:method-count-assert 20
:size-assert #xf0
:flag-assert #x14008000f0
(:states
mother-spider-leg-flying
)
)
;; definition for method 3 of type mother-spider-leg
@@ -168,6 +171,21 @@
(spawn-child (_type_ vector vector symbol) int 30)
(is-player-stuck? (_type_) symbol 31)
)
(:states
mother-spider-birth-baby
mother-spider-birthing
mother-spider-die
mother-spider-die-from-uppercut
mother-spider-die-wait-for-children
mother-spider-hit-while-birthing
mother-spider-hit-while-tracking
mother-spider-idle
mother-spider-spit
mother-spider-stop-traveling
mother-spider-tracking
(mother-spider-traveling uint)
wait-for-children
)
)
;; definition for method 3 of type mother-spider
File diff suppressed because it is too large Load Diff
+14 -16
View File
@@ -10,7 +10,7 @@
:size-assert #xb0
:flag-assert #x14004000b0
(:states
(bully-broken-cage-explode bully-broken-cage)
bully-broken-cage-explode
)
)
@@ -304,23 +304,23 @@
;; failed to figure out what this is:
(defstate bully-broken-cage-explode (bully-broken-cage)
:code
(behavior ((arg0 bully-broken-cage))
(behavior ()
(ja-channel-push! 1 0)
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
(set! (-> a0-2 param 0)
(let ((a0-1 (-> self skel root-channel 0)))
(set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
(set! (-> a0-1 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 16)) data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group! a0-2 (the-as art-joint-anim (-> self draw art-group data 16)) num-func-seek!)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group! a0-1 (the-as art-joint-anim (-> self draw art-group data 16)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group data 0 length) -1)))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group data 0 length) -1)))
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
)
)
(none)
@@ -338,10 +338,8 @@
(set! (-> self root trans quad) (-> self parent-override 0 root-override trans quad))
(quaternion-copy! (-> self root quat) (-> self parent-override 0 root-override quat))
(set! (-> self root scale quad) (-> self parent-override 0 root-override scale quad))
(let ((a0-13 self))
(initialize-skeleton a0-13 *bully-broken-cage-sg* '())
(go bully-broken-cage-explode a0-13)
)
(initialize-skeleton self *bully-broken-cage-sg* '())
(go bully-broken-cage-explode)
(none)
)
+1 -1
View File
@@ -721,7 +721,7 @@
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as
object
uint
(cond
((= v1-0 'death-start)
(the-as uint (drop-pickup (-> self fact-info-override) #t *entity-pool* (-> self fact-info-override) 0))