mirror of
https://github.com/open-goal/jak-project
synced 2026-08-11 11:33:51 -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:
+37
-28
@@ -243,39 +243,48 @@
|
||||
)
|
||||
|
||||
;; definition for method 74 of type pegasus
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod enemy-method-74 pegasus ((obj pegasus) (arg0 process) (arg1 object) (arg2 symbol) (arg3 event-message-block))
|
||||
(with-pp
|
||||
(case arg2
|
||||
(('track)
|
||||
)
|
||||
(('hit 'hit-knocked)
|
||||
(cond
|
||||
((zero? (-> obj hit-points))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(logclear! (-> obj focus-status) (focus-status dangerous))
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice))
|
||||
(logior! (-> obj enemy-flags) (enemy-flag chase-startup))
|
||||
(logior! (-> obj focus-status) (focus-status hit))
|
||||
(if (zero? (-> obj hit-points))
|
||||
(logior! (-> obj focus-status) (focus-status dead))
|
||||
)
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag actor-pause-backup))
|
||||
(enemy-method-62 obj)
|
||||
(set! (-> obj enemy-flags) (logior (enemy-flag actor-pause-backup) (-> obj enemy-flags)))
|
||||
(process-contact-action arg0)
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(enemy-method-73 obj)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj targetted-timer) (the-as uint (-> pp clock frame-counter)))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'track)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type enemy enemy-method-74) obj arg0 arg1 arg2 arg3)
|
||||
((or (= v1-0 'hit) (= v1-0 'hit-knocked))
|
||||
(cond
|
||||
((zero? (-> obj hit-points))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(logclear! (-> obj focus-status) (focus-status dangerous))
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice))
|
||||
(logior! (-> obj enemy-flags) (enemy-flag chase-startup))
|
||||
(logior! (-> obj focus-status) (focus-status hit))
|
||||
(if (zero? (-> obj hit-points))
|
||||
(logior! (-> obj focus-status) (focus-status dead))
|
||||
)
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag actor-pause-backup))
|
||||
(enemy-method-62 obj)
|
||||
(set! (-> obj enemy-flags) (logior (enemy-flag actor-pause-backup) (-> obj enemy-flags)))
|
||||
(process-contact-action arg0)
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(the-as object (enemy-method-73 obj))
|
||||
)
|
||||
(else
|
||||
(let ((v0-0 (the-as object (-> pp clock frame-counter))))
|
||||
(set! (-> obj targetted-timer) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type enemy enemy-method-74) obj arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+2155
File diff suppressed because it is too large
Load Diff
+5
-8
@@ -54,6 +54,7 @@
|
||||
((dest-node-id uint16 :offset-assert 0)
|
||||
(flags predator-edge-flag :offset-assert 2)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
@@ -76,10 +77,10 @@
|
||||
|
||||
;; definition of type predator-graph
|
||||
(deftype predator-graph (structure)
|
||||
((node-count uint16 :offset-assert 0)
|
||||
(edge-count uint16 :offset-assert 2)
|
||||
(node uint32 :offset-assert 4)
|
||||
(edge uint32 :offset-assert 8)
|
||||
((node-count uint16 :offset-assert 0)
|
||||
(edge-count uint16 :offset-assert 2)
|
||||
(node (inline-array predator-node) :offset-assert 4)
|
||||
(edge (inline-array predator-edge) :offset-assert 8)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
@@ -103,7 +104,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1844
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user