mirror of
https://github.com/open-goal/jak-project
synced 2026-06-28 19:21:06 -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:
+1
-1
@@ -304,7 +304,7 @@
|
||||
(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)
|
||||
|
||||
+6
-5
@@ -949,12 +949,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 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))
|
||||
@@ -2120,7 +2122,6 @@
|
||||
(the-as int (-> obj root-sphere-id))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 47 of type nav-state
|
||||
|
||||
+27
-21
@@ -23,27 +23,34 @@
|
||||
)
|
||||
|
||||
;; definition for method 74 of type nav-enemy
|
||||
;; 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)
|
||||
)
|
||||
|
||||
;; definition for symbol *nav-enemy-dummy-shadow-control*, type shadow-control
|
||||
@@ -2827,13 +2834,12 @@
|
||||
|
||||
;; definition for method 82 of type nav-enemy
|
||||
;; INFO: Used lq/sq
|
||||
;; 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