mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 21:28:00 -04:00
decomp: add a bunch of enemy files (#2101)
Adds the following files: - `amphibian` - `centurion` - `ginsu` - `grenadier` - `hopper` - `metalmonk` - `monster-frog` - `predator-graph` - `predator-h` - `predator` - `rapid-gunner` - `rhino` - `rhino-wall` - `tomb-baby-spider` Also adds the DGOs for the following levels: - Mar's Tomb - Mountain Temple - Drill Platform - Sacred Site (Sage Hut) Manual patches: - The decompiler emits `(b! #t cfg-17)` in `(trans hostile hopper)` without putting a `(label cfg-17)` anywhere - Added cast to `art-joint-anim` in `(code broken rhino-wall)` and `(code hit rhino-wall)` Other notes: - `amphibian` seems to occasionally crash when using its tongue attack. Haven't investigated this yet - `ginsu` crashes after being killed somewhere in the `deactivate` method, possibly because of its `part-spawner` - Predators aren't spawning in the forest hunt mission, not sure if `forest-obs` might be needed for that or if it's something else - The `rhino-wall` STR animation seems to load (albeit a bit broken due to missing VAG stream playback), but causes the viewport to shrink as soon as it's played - I added `pegasus::74` to the `event_handler_hack` bool in `variable_naming.cpp` because I got a `none` cast after changing the return value of `enemy::74`
This commit is contained in:
@@ -207,14 +207,14 @@
|
||||
(clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none 21)
|
||||
(find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float 22)
|
||||
(set-spheres-from-nav-ids (_type_) none 23)
|
||||
(add-root-sphere-to-hash! (_type_ vector int) none 24)
|
||||
(add-root-sphere-to-hash! (_type_ vector int) symbol 24)
|
||||
(get-max-rotation-rate (_type_) float 25)
|
||||
(get-sphere-mask (_type_) uint 26)
|
||||
(get-target-speed (_type_) meters 27)
|
||||
(enable-extra-sphere! (_type_) none 28)
|
||||
(disable-extra-sphere! (_type_) none 29)
|
||||
(copy-extra-nav-sphere! (_type_ sphere) none 30)
|
||||
(set-extra-nav-sphere-xyz! (_type_ sphere) none 31)
|
||||
(set-extra-nav-sphere-xyz! (_type_ sphere) none 31)
|
||||
(set-extra-nav-sphere-radius! (_type_ float) none 32)
|
||||
(set-nearest-y-thres! (_type_ float) none 33)
|
||||
(set-nav-cull-radius! (_type_ meters) none 34)
|
||||
@@ -225,7 +225,7 @@
|
||||
(set-max-rotation-rate! (_type_ float) none 39)
|
||||
(set-sphere-mask! (_type_ uint) none 40)
|
||||
(remove! (_type_) none 41)
|
||||
(init! (_type_ collide-shape) none 42)
|
||||
(init! (_type_ collide-shape) none 42)
|
||||
(display-marks? (_type_) symbol 43)
|
||||
(nav-control-method-44 () none 44)
|
||||
(find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere 45)
|
||||
|
||||
@@ -855,12 +855,14 @@
|
||||
(a1-31 (-> s5-0 temp-dir v1-30))
|
||||
(a0-39 (-> s5-0 in-dir))
|
||||
(a2-14 (-> s5-0 right-dir))
|
||||
(a3-7 (vector-dot a1-31 a2-14))
|
||||
(a3-7 (the-as number (vector-dot a1-31 a2-14)))
|
||||
(t0-1 #xffffffff80000000)
|
||||
(a2-16 #x3f800000)
|
||||
(f0-30
|
||||
(* f0-29 (* (the-as float (logior (logand (the-as uint a3-7) (the-as uint t0-1)) a2-16)) (- 1.0 (vector-dot a1-31 a0-39))))
|
||||
)
|
||||
(f0-30 (* f0-29 (* (the-as float (logior (logand (the-as uint a3-7) (the-as uint t0-1)) a2-16))
|
||||
(- 1.0 (vector-dot a1-31 a0-39))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (-> s5-0 best-dir-angle s3-0) f0-30)
|
||||
(set! (-> s5-0 best-dir s3-0 quad) (-> s5-0 temp-dir v1-30 quad))
|
||||
@@ -1767,7 +1769,6 @@
|
||||
(the-as int (-> obj root-sphere-id))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod reset! nav-state ((obj nav-state) (arg0 nav-control))
|
||||
@@ -3526,7 +3527,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,27 +25,34 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 7]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 15]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 23]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 33]
|
||||
(defmethod enemy-method-74 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 object) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('nav-mesh-kill)
|
||||
(deactivate obj)
|
||||
#t
|
||||
)
|
||||
(('nav-mesh-new)
|
||||
(set! (-> obj water-max-height) (-> obj nav state mesh water-max-height))
|
||||
#t
|
||||
)
|
||||
(('debug-control-on)
|
||||
(go (method-of-object obj debug-control))
|
||||
)
|
||||
(('debug-control-off)
|
||||
(enemy-method-72 obj)
|
||||
)
|
||||
(else
|
||||
((method-of-type enemy enemy-method-74) obj arg0 arg1 arg2 arg3)
|
||||
)
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'nav-mesh-kill)
|
||||
(deactivate obj)
|
||||
#t
|
||||
)
|
||||
((= v1-0 'nav-mesh-new)
|
||||
(set! (-> obj water-max-height) (-> obj nav state mesh water-max-height))
|
||||
#t
|
||||
)
|
||||
((= v1-0 'debug-control-on)
|
||||
(go (method-of-object obj debug-control))
|
||||
)
|
||||
((= v1-0 'debug-control-off)
|
||||
(enemy-method-72 obj)
|
||||
)
|
||||
(else
|
||||
((method-of-type enemy enemy-method-74) obj arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *nav-enemy-dummy-shadow-control*
|
||||
@@ -2697,13 +2704,12 @@
|
||||
:post nav-enemy-die-falling-post
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch none vs symbol.
|
||||
(defmethod enemy-method-82 nav-enemy ((obj nav-enemy) (arg0 enemy-jump-info))
|
||||
"@abstract"
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-0 quad) (-> arg0 dest-pos quad))
|
||||
(set! (-> v1-0 w) (-> obj nav-radius-backup))
|
||||
(the-as symbol (add-root-sphere-to-hash! (-> obj nav) v1-0 #x80068))
|
||||
(add-root-sphere-to-hash! (-> obj nav) v1-0 #x80068)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user