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:
Hat Kid
2023-01-07 23:14:12 +01:00
committed by GitHub
parent 00ac12094e
commit bdee98323d
60 changed files with 37190 additions and 1196 deletions
+2 -1
View File
@@ -735,7 +735,8 @@ void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
if (function.ir2.env.version == GameVersion::Jak2) {
event_handler_hack = function.guessed_name.is_event_handler() ||
function.guessed_name.to_string() == "target-generic-event-handler" ||
function.guessed_name.to_string() == "target-standard-event-handler";
function.guessed_name.to_string() == "target-standard-event-handler" ||
function.guessed_name.to_string() == "(method 74 pegasus)";
}
for (int block_id = 0; block_id < int(blocks.size()); block_id++) {
+235 -283
View File
@@ -22756,7 +22756,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 "Set up spheres from sphere ids previously found by find-sphere-ids-from-sphere-hash" (_type_) none 23)
(add-root-sphere-to-hash! "Add our root sphere to the hash (if enabled with output-sphere-hash flag) at the given location." (_type_ vector int) none 24)
(add-root-sphere-to-hash! "Add our root sphere to the hash (if enabled with output-sphere-hash flag) at the given location." (_type_ vector int) symbol 24)
(get-max-rotation-rate (_type_) float 25)
(get-sphere-mask (_type_) uint 26)
(get-target-speed (_type_) meters 27)
@@ -22879,7 +22879,7 @@
(update-from-spheres (_type_) none 28)
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none 29)
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params) none 30)
(add-sphere-with-mask-and-id (_type_ vector int int) none 31)
(add-sphere-with-mask-and-id (_type_ vector int int) symbol 31)
(sphere-hash-method-32 (_type_ vector vector float int) symbol 32)
(remove-by-id (_type_ sphere int) none 33)
)
@@ -32623,14 +32623,14 @@
(enemy-method-55 (_type_) none 55)
(enemy-method-56 (_type_ process event-message-block) int 56)
(enemy-method-57 (_type_ process-focusable enemy-best-focus) enemy-aware 57)
(enemy-method-58 (_type_) symbol 58)
(enemy-method-58 (_type_ process event-message-block) symbol 58)
(enemy-method-59 (_type_) penetrate 59)
(coin-flip?
"@returns The result of a 50/50 RNG roll"
(_type_) symbol 60)
(enemy-method-61 (_type_ int) int :behavior enemy 61)
(enemy-method-62 (_type_) none 62)
(enemy-method-63 (_type_ process-focusable symbol) none 63)
(enemy-method-63 (_type_ process-focusable symbol) symbol 63)
(enemy-method-64 (_type_) none 64)
(enemy-method-65 (_type_) none 65)
(go-ambush (_type_) none 66)
@@ -32641,7 +32641,7 @@
(go-flee (_type_) none 71)
(enemy-method-72 (_type_) none 72)
(enemy-method-73 (_type_) none 73)
(enemy-method-74 (_type_ process object symbol event-message-block) none 74)
(enemy-method-74 (_type_ process object symbol event-message-block) object 74)
(enemy-method-75 (_type_ process touching-shapes-entry) none 75)
(enemy-method-76 (_type_ process event-message-block) symbol 76)
(enemy-method-77 (_type_ (pointer float)) symbol 77)
@@ -36046,14 +36046,15 @@
(dest-node-id uint16 :offset-assert 0)
(flags predator-edge-flag :offset-assert 2)
)
:pack-me
:flag-assert #x900000004
)
(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 (inline-array predator-node) :offset-assert 4)
(edge (inline-array predator-edge) :offset-assert 8)
)
:method-count-assert 9
:size-assert #xc
@@ -36065,13 +36066,12 @@
;; predator-graph ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *predator-graph* object)
(define-extern *predator-graph* predator-graph)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; predator ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype predator-shot (metalhead-shot)
()
:method-count-assert 40
@@ -36080,19 +36080,18 @@
(:methods
)
)
|#
(deftype predator (nav-enemy)
((los los-control :inline :offset-assert 608)
(want-stop basic :offset-assert 756)
(want-stop symbol :offset-assert 756)
(target-pos vector :inline :offset-assert 768)
(curr-node int32 :offset-assert 784)
(hide-pos vector :inline :offset-assert 800)
(next-change uint64 :offset-assert 816)
(shoot-angle float :offset-assert 824)
(miss-amount float :offset-assert 828)
(ambient-sound-id uint32 :offset-assert 832)
(shock-effect-time time-frame :offset-assert 840)
(ambient-sound-id sound-id :offset-assert 832)
(shock-effect-time time-frame :offset-assert 840)
(shock-effect-end uint64 :offset-assert 848)
(fade float :offset-assert 856)
(dest-fade float :offset-assert 860)
@@ -36105,39 +36104,37 @@
(fire () _type_ :state 179)
(hide () _type_ :state 180)
(hidden () _type_ :state 181)
(predator-method-182 () none 182)
(predator-method-183 () none 183)
(predator-method-184 () none 184)
(predator-method-185 () none 185)
(predator-method-186 () none 186)
(predator-method-187 () none 187)
(predator-method-188 () none 188)
(set-dangerous! (_type_ symbol) symbol 182)
(predator-method-183 (_type_) none 183)
(predator-method-184 (_type_ int float) none 184)
(predator-method-185 (_type_) none 185)
(predator-method-186 (_type_) none 186)
(predator-method-187 (_type_) symbol 187)
(predator-method-188 (_type_ vector vector vector) none 188)
)
)
#|
(deftype predator-manager (process)
()
((predator-count uint32 :offset-assert 128)
(predator-h handle 32 :offset-assert 136)
(hud-counter handle :offset-assert 392)
(actor-group (pointer actor-group) :offset-assert 400)
(actor-group-count int32 :offset-assert 404)
)
:method-count-assert 17
:size-assert #x198
:flag-assert #x1101200198
;; Failed to read fields.
(:methods
(predator-manager-method-9 () none 9)
(predator-manager-method-10 () none 10)
(closed () _type_ :state 11)
(predator-manager-method-12 () none 12)
(predator-manager-method-13 () none 13)
(idle () _type_ :state 14)
(closed () _type_ :state 15)
(predator-manager-method-16 () none 16)
(predator-manager-method-16 (_type_) none 16)
)
)
|#
;; (define-extern point-in-line-region? function)
;; (define-extern *predator-nav-enemy-info* nav-enemy-info)
;; (define-extern *predator-manager* object)
(define-extern point-in-line-region? (function vector vector vector float symbol))
(define-extern *predator-nav-enemy-info* nav-enemy-info)
(define-extern *predator-manager* predator-manager)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; forest-scenes ;;
@@ -36681,7 +36678,6 @@
;; tomb-baby-spider ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype tomb-baby-spider (nav-enemy)
()
:method-count-assert 180
@@ -36692,9 +36688,7 @@
(attack-stop () _type_ :state 179)
)
)
|#
#|
(deftype dig-spider (tomb-baby-spider)
()
:method-count-assert 180
@@ -36703,9 +36697,8 @@
(:methods
)
)
|#
;; (define-extern *tomb-baby-spider-nav-enemy-info* nav-enemy-info)
(define-extern *tomb-baby-spider-nav-enemy-info* nav-enemy-info)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; grenadier ;;
@@ -36723,15 +36716,15 @@
)
(deftype grenadier (nav-enemy)
((shot-trajectory trajectory :inline :offset-assert 608)
(hostile-path path-control :offset-assert 648)
(bank bank-info :inline :offset-assert 656)
(joint joint-mod-blend-world :offset-assert 720)
(heading basic :offset-assert 724)
(move-pos vector :inline :offset-assert 736)
(move-angle float :offset-assert 752)
(status-flags uint64 :offset-assert 760)
(suppress-knockaside-timer uint64 :offset-assert 768)
((shot-trajectory trajectory :inline :offset-assert 608)
(hostile-path path-control :offset-assert 648)
(bank bank-info :inline :offset-assert 656)
(joint joint-mod-blend-world :offset-assert 720)
(heading symbol :offset-assert 724)
(move-pos vector :inline :offset-assert 736)
(move-angle float :offset-assert 752)
(status-flags uint64 :offset-assert 760)
(suppress-knockaside-timer time-frame :offset-assert 768)
)
:method-count-assert 184
:size-assert #x308
@@ -36740,20 +36733,19 @@
(attack () _type_ :state 178)
(backup () _type_ :state 179)
(spin-kick () _type_ :state 180)
(grenadier-method-181 () none 181)
(grenadier-method-182 () none 182)
(grenadier-method-183 () none 183)
(grenadier-method-181 (_type_) none 181)
(grenadier-method-182 (_type_ vector) none 182)
(grenadier-method-183 (_type_) none 183)
)
)
;; (define-extern *grenadier-nav-enemy-info* nav-enemy-info)
;; (define-extern pos-rotate-y<-vector+vector function)
(define-extern *grenadier-nav-enemy-info* nav-enemy-info)
(define-extern pos-rotate-y<-vector+vector (function vector vector float))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; metalmonk ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype metalmonk-anim-info (structure)
((anim-index int32 :offset-assert 0)
)
@@ -36761,51 +36753,46 @@
:size-assert #x4
:flag-assert #x900000004
)
|#
#|
(deftype metalmonk-global-info (basic)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(idle-anim UNKNOWN 3 :offset-assert 8)
(patrol-anim UNKNOWN 2 :offset-assert 20)
(notice-anim UNKNOWN 2 :offset-assert 28)
(charge-anim UNKNOWN 2 :offset-assert 36)
(attack-anim UNKNOWN 2 :offset-assert 44)
(knocked-anim UNKNOWN 2 :offset-assert 52)
(celebrate-anim UNKNOWN 2 :offset-assert 60)
(yellow-hit-anim UNKNOWN 4 :offset-assert 68)
(blue-hit-anim UNKNOWN 3 :offset-assert 84)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(idle-anim int32 3 :offset-assert 8)
(patrol-anim int32 2 :offset-assert 20)
(notice-anim int32 2 :offset-assert 28)
(charge-anim int32 2 :offset-assert 36)
(attack-anim int32 2 :offset-assert 44)
(knocked-anim int32 2 :offset-assert 52)
(celebrate-anim int32 2 :offset-assert 60)
(yellow-hit-anim int32 4 :offset-assert 68)
(blue-hit-anim int32 3 :offset-assert 84)
)
:pack-me
:method-count-assert 9
:size-assert #x60
:flag-assert #x900000060
)
|#
#|
(deftype metalmonk (nav-enemy)
((focus-pos vector :inline :offset-assert 348)
(new-facing vector :inline :offset-assert 620)
(old-facing vector :inline :offset-assert 636)
(high-time time-frame :offset-assert 652)
(intro-path basic :offset-assert 660)
((new-facing vector :inline :offset 624)
(old-facing vector :inline :offset 640)
(high-time time-frame :offset 656)
(intro-path path-control :offset-assert 664)
)
:method-count-assert 183
:size-assert #x29c
:flag-assert #xb70220029c
(:methods
(attack () _type_ :state 178)
(metalmonk-method-179 () none 179)
(metalmonk-method-180 () none 180)
(metalmonk-method-181 () none 181)
(metalmonk-method-182 () none 182)
(metalmonk-method-179 (_type_ vector) none 179)
(metalmonk-method-180 (_type_ symbol) none 180)
(metalmonk-method-181 (_type_ float float) none 181)
(metalmonk-method-182 (_type_ float float) none 182)
)
)
|#
;; (define-extern *metalmonk-global-info* metalmonk-global-info)
;; (define-extern *metalmonk-nav-enemy-info* nav-enemy-info)
(define-extern *metalmonk-global-info* metalmonk-global-info)
(define-extern *metalmonk-nav-enemy-info* nav-enemy-info)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; dig-texture ;;
@@ -37660,7 +37647,6 @@
;; centurion ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype centurion-shot (metalhead-shot)
()
:method-count-assert 40
@@ -37669,22 +37655,20 @@
(:methods
)
)
|#
#|
(deftype centurion (nav-enemy)
((los los-control :inline :offset-assert 604)
(target-pos vector :inline :offset-assert 764)
(can-shoot? basic :offset-assert 780)
(incoming-attack-id uint32 :offset-assert 784)
(can-take-damage? basic :offset-assert 788)
(first-shoot? basic :offset-assert 792)
(shoot-dir vector :inline :offset-assert 796)
(tar-pos vector :inline :offset-assert 812)
(joint basic :offset-assert 828)
(joint-enable basic :offset-assert 832)
(victory-sound uint32 :offset-assert 836)
(shield-shot uint32 :offset-assert 840)
((los los-control :inline :offset-assert 608)
(target-pos vector :inline :offset-assert 768)
(can-shoot? basic :offset-assert 784)
(incoming-attack-id uint32 :offset-assert 788)
(can-take-damage? symbol :offset-assert 792)
(first-shoot? symbol :offset-assert 796)
(shoot-dir vector :inline :offset-assert 800)
(tar-pos vector :inline :offset-assert 816)
(joint joint-mod :offset-assert 832)
(joint-enable symbol :offset-assert 836)
(victory-sound sound-id :offset-assert 840)
(shield-shot uint32 :offset-assert 844)
)
:method-count-assert 183
:size-assert #x350
@@ -37692,14 +37676,12 @@
(:methods
(attack () _type_ :state 178)
(fire () _type_ :state 179)
(centurion-method-180 () none 180)
(centurion-method-181 () none 181)
(centurion-method-182 () none 182)
(centurion-method-180 (_type_) none 180)
(centurion-method-181 (_type_ vector) int 181)
(centurion-method-182 (_type_ vector) symbol 182)
)
)
|#
#|
(deftype centurion-anim-info (structure)
((anim-index int32 :offset-assert 0)
)
@@ -37707,39 +37689,36 @@
:size-assert #x4
:flag-assert #x900000004
)
|#
#|
(deftype centurion-global-info (basic)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(yellow-hit-anim UNKNOWN 1 :offset-assert 8)
(blue-hit-anim UNKNOWN 3 :offset-assert 12)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(yellow-hit-anim int32 1 :offset-assert 8)
(blue-hit-anim int32 3 :offset-assert 12)
)
:pack-me
:method-count-assert 9
:size-assert #x18
:flag-assert #x900000018
)
|#
;; (define-extern *centurion-shield-glow-spt-scale-x* object)
;; (define-extern *centurion-shield-glow-spt-scale-y* object)
;; (define-extern *centurion-shield-center-spt-scale-x* object)
;; (define-extern *centurion-shield-center-spt-scale-y* object)
;; (define-extern *centurion-shield-spt-scale-x* object)
;; (define-extern *centurion-shield-spt-scale-y* object)
;; (define-extern *centurion-shield-2-spt-scale-x* object)
;; (define-extern *centurion-shield-2-spt-scale-y* object)
;; (define-extern centurion-shield-big function)
;; (define-extern centurion-shield-little function)
;; (define-extern *centurion-global-info* centurion-global-info)
;; (define-extern *centurion-nav-enemy-info* nav-enemy-info)
(define-extern *centurion-shield-glow-spt-scale-x* int)
(define-extern *centurion-shield-glow-spt-scale-y* int)
(define-extern *centurion-shield-center-spt-scale-x* int)
(define-extern *centurion-shield-center-spt-scale-y* int)
(define-extern *centurion-shield-spt-scale-x* int)
(define-extern *centurion-shield-spt-scale-y* int)
(define-extern *centurion-shield-2-spt-scale-x* int)
(define-extern *centurion-shield-2-spt-scale-y* int)
(define-extern centurion-shield-big (function none))
(define-extern centurion-shield-little (function none))
(define-extern *centurion-global-info* centurion-global-info)
(define-extern *centurion-nav-enemy-info* nav-enemy-info)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ginsu ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype ginsu-anim-info (structure)
((anim-index int32 :offset-assert 0)
)
@@ -37747,35 +37726,31 @@
:size-assert #x4
:flag-assert #x900000004
)
|#
#|
(deftype ginsu-global-info (basic)
((prev-blue-hit int8 :offset-assert 4)
(blue-hit-anim UNKNOWN 3 :offset-assert 8)
((prev-blue-hit int8 :offset-assert 4)
(blue-hit-anim int32 3 :offset-assert 8)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
|#
#|
(deftype ginsu (nav-enemy)
((blade-jm basic :offset-assert 600)
(blade-speed cam-float-seeker :inline :offset-assert 604)
(blade-angle float :offset-assert 628)
(desired-distance float :offset-assert 632)
(spiral-time time-frame :offset-assert 636)
(blade-part basic :offset-assert 644)
(ambush-path basic :offset-assert 648)
(path-pos float :offset-assert 652)
(ambush-started basic :offset-assert 656)
(blade-sound uint32 :offset-assert 660)
(blade-sound-playing basic :offset-assert 664)
(grind-sound uint32 :offset-assert 668)
(grind-sound-playing basic :offset-assert 672)
(grind-timer uint64 :offset-assert 676)
((blade-jm joint-mod :offset-assert 604)
(blade-speed cam-float-seeker :inline :offset-assert 608)
(blade-angle float :offset-assert 632)
(desired-distance float :offset-assert 636)
(spiral-time time-frame :offset-assert 640)
(blade-part part-spawner :offset-assert 648)
(ambush-path path-control :offset-assert 652)
(path-pos float :offset-assert 656)
(ambush-started symbol :offset-assert 660)
(blade-sound uint32 :offset-assert 664)
(blade-sound-playing symbol :offset-assert 668)
(grind-sound uint32 :offset-assert 672)
(grind-sound-playing symbol :offset-assert 676)
(grind-timer time-frame :offset-assert 680)
)
:method-count-assert 184
:size-assert #x2b0
@@ -37783,17 +37758,16 @@
(:methods
(anticipate-attack () _type_ :state 178)
(attack () _type_ :state 179)
(ginsu-method-180 () none 180)
(ginsu-method-181 () none 181)
(ginsu-method-182 () none 182)
(ginsu-method-183 () none 183)
(ginsu-method-180 (_type_) none 180)
(ginsu-method-181 (_type_ vector) vector 181)
(ginsu-method-182 (_type_) none 182)
(ginsu-method-183 (_type_ symbol) none 183)
)
)
|#
;; (define-extern *ginsu-global-info* ginsu-global-info)
;; (define-extern *ginsu-nav-enemy-info* nav-enemy-info)
;; (define-extern ginsu-sounds-off function)
(define-extern *ginsu-global-info* ginsu-global-info)
(define-extern *ginsu-nav-enemy-info* nav-enemy-info)
(define-extern ginsu-sounds-off (function none :behavior ginsu))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; oracle-texture ;;
@@ -37917,30 +37891,31 @@
;; rhino ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(declare-type rhino-wall process-focusable)
(deftype rhino (nav-enemy)
((wall basic :offset-assert 600)
(path-intro basic :offset-assert 604)
(charge-aware uint64 :offset-assert 612)
(anim-skid-left int32 :offset-assert 620)
(anim-skid-right int32 :offset-assert 624)
(anim-victory-hit int32 :offset-assert 628)
(circle-backward? basic :offset-assert 636)
(focus-pos vector :inline :offset-assert 348)
(skid-speed float :offset-assert 668)
(angle float :offset-assert 672)
(angle-speed float :offset-assert 676)
(dest vector :inline :offset-assert 684)
(charge-straight basic :offset-assert 700)
(in-stop-run basic :offset-assert 704)
(smush-target basic :offset-assert 708)
(num-hit-flinch int32 :offset-assert 712)
(frame-die-smush float :offset-assert 716)
(quat quaternion :inline :offset-assert 732)
(can-hit? basic :offset-assert 748)
(interest int32 :offset-assert 752)
(victory-count uint32 :offset-assert 756)
(stomach-touched-once? basic :offset-assert 760)
((wall rhino-wall :offset-assert 604)
(path-intro path-control :offset-assert 608)
(charge-aware uint64 :offset-assert 616)
(anim-skid-left int32 :offset-assert 624)
(anim-skid-right int32 :offset-assert 628)
(anim-victory-hit int32 :offset-assert 632)
(circle-backward? symbol :offset-assert 636)
;; (focus-pos vector :inline :offset-assert 348)
(skid-speed float :offset 672)
(angle float :offset-assert 676)
(angle-speed float :offset-assert 680)
(dest vector :inline :offset-assert 688)
(charge-straight symbol :offset-assert 704)
(in-stop-run symbol :offset-assert 708)
(smush-target smush-control :offset-assert 712)
(num-hit-flinch int32 :offset-assert 716)
(frame-die-smush float :offset-assert 720)
(quat quaternion :inline :offset-assert 736)
(can-hit? symbol :offset-assert 752)
(interest int32 :offset-assert 756)
(victory-count uint32 :offset-assert 760)
(stomach-touched-once? symbol :offset-assert 764)
)
:method-count-assert 183
:size-assert #x300
@@ -37950,22 +37925,20 @@
(stop-run () _type_ :state 179)
(run-away () _type_ :state 180)
(charge () _type_ :state 181)
(rhino-method-182 () none 182)
(rhino-method-182 (_type_ process event-message-block) symbol 182)
)
)
|#
;; (define-extern *rhino-nav-enemy-info* nav-enemy-info)
(define-extern *rhino-nav-enemy-info* nav-enemy-info)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; rhino-wall ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype rhino-wall (process-focusable)
((anim basic :offset-assert 200)
(art-name basic :offset-assert 204)
(id int8 :offset-assert 208)
((anim spool-anim :offset-assert 204)
(art-name string :offset-assert 208)
(id int8 :offset-assert 212)
)
:method-count-assert 31
:size-assert #xd5
@@ -37974,10 +37947,9 @@
(unbroken () _type_ :state 27)
(hit () _type_ :state 28)
(broken () _type_ :state 29)
(rhino-wall-method-30 () none 30)
(rhino-wall-method-30 (_type_) none 30)
)
)
|#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -38304,65 +38276,60 @@
;; hopper ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype hopper (nav-enemy)
((speed-y float :offset-assert 600)
(accel-y float :offset-assert 604)
(next-jump-time int32 :offset-assert 608)
(path-intro basic :offset-assert 612)
(can-go-knocked? basic :offset-assert 616)
(land-anim-index int32 :offset-assert 620)
(step-num int32 :offset-assert 624)
(best-point vector :inline :offset-assert 636)
(best-score float :offset-assert 652)
(origin vector :inline :offset-assert 668)
(direction vector :inline :offset-assert 684)
(jump-dist float :offset-assert 700)
(side float :offset-assert 704)
(jump-start-anim uint32 :offset-assert 708)
(jump-air-anim uint32 :offset-assert 712)
(jump-land-anim uint32 :offset-assert 716)
(jump-height-min float :offset-assert 720)
(jump-anim-start-frame float :offset-assert 724)
(minimap connection-minimap :offset-assert 728)
((speed-y float :offset-assert 604)
(accel-y float :offset-assert 608)
(next-jump-time int32 :offset-assert 612)
(path-intro path-control :offset-assert 616)
(can-go-knocked? symbol :offset-assert 620)
(land-anim-index int32 :offset-assert 624)
(step-num int32 :offset-assert 628)
(best-point vector :inline :offset-assert 640)
(best-score float :offset-assert 656)
(origin vector :inline :offset-assert 672)
(direction vector :inline :offset-assert 688)
(jump-dist float :offset-assert 704)
(side float :offset-assert 708)
(jump-start-anim uint32 :offset-assert 712)
(jump-air-anim uint32 :offset-assert 716)
(jump-land-anim uint32 :offset-assert 720)
(jump-height-min float :offset-assert 724)
(jump-anim-start-frame float :offset-assert 728)
(minimap connection-minimap :offset-assert 732)
)
:method-count-assert 180
:size-assert #x2e0
:flag-assert #xb4026002e0
(:methods
(hopper-method-178 () none 178)
(hopper-method-179 () none 179)
(hopper-method-178 (_type_) symbol 178)
(hopper-method-179 (_type_) none 179)
)
)
|#
#|
(deftype hopper-anim-info (structure)
((hit-anim-index int32 :offset-assert 0)
(land-anim-index int32 :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
|#
#|
(deftype hopper-global-info (basic)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(yellow-hit-anim UNKNOWN 3 :offset-assert 8)
(blue-hit-anim UNKNOWN 3 :offset-assert 32)
(yellow-hit-anim hopper-anim-info 3 :inline :offset-assert 8)
(blue-hit-anim hopper-anim-info 3 :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x38
:flag-assert #x900000038
)
|#
;; (define-extern *hopper-global-info* hopper-global-info)
;; (define-extern *hopper-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info
;; (define-extern *hopper-next-jump-time* object)
(define-extern *hopper-global-info* hopper-global-info)
(define-extern *hopper-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info
(define-extern *hopper-next-jump-time* time-frame)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; intro-ocean ;;
@@ -39374,7 +39341,6 @@
;; amphibian ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype amphibian-tongue-attack-info (structure)
((targ-dist float :offset-assert 0)
(max-length float :offset-assert 4)
@@ -39392,12 +39358,10 @@
:size-assert #xa0
:flag-assert #x9000000a0
)
|#
#|
(deftype amphibian-joint-mod (basic)
((joint-index int32 :offset-assert 4)
(proc basic :offset-assert 8)
(proc process-drawable :offset-assert 8)
(max-length float :offset-assert 12)
(target vector :inline :offset-assert 16)
)
@@ -39405,12 +39369,11 @@
:size-assert #x20
:flag-assert #xa00000020
(:methods
(amphibian-joint-mod-method-9 () none 9)
(new (symbol type process-drawable int) _type_ 0)
(amphibian-joint-mod-method-9 (_type_) none 9)
)
)
|#
#|
(deftype amphibian-anim-info (structure)
((anim-index int32 :offset-assert 0)
)
@@ -39418,38 +39381,34 @@
:size-assert #x4
:flag-assert #x900000004
)
|#
#|
(deftype amphibian-global-info (basic)
((prev-blue-hit int8 :offset-assert 4)
(prev-knocked int8 :offset-assert 5)
(notice-anim UNKNOWN 2 :offset-assert 8)
(run-anim UNKNOWN 2 :offset-assert 16)
(knocked-anim UNKNOWN 3 :offset-assert 24)
(knocked-land-anim UNKNOWN 3 :offset-assert 36)
(blue-hit-anim UNKNOWN 3 :offset-assert 48)
(jump-wind-up-anim UNKNOWN 2 :offset-assert 60)
(jump-in-air-anim UNKNOWN 2 :offset-assert 68)
(jump-land-anim UNKNOWN 2 :offset-assert 76)
(notice-anim int32 2 :offset-assert 8)
(run-anim int32 2 :offset-assert 16)
(knocked-anim int32 3 :offset-assert 24)
(knocked-land-anim int32 3 :offset-assert 36)
(blue-hit-anim int32 3 :offset-assert 48)
(jump-wind-up-anim int32 2 :offset-assert 60)
(jump-in-air-anim int32 2 :offset-assert 68)
(jump-land-anim int32 2 :offset-assert 76)
)
:method-count-assert 9
:size-assert #x54
:flag-assert #x900000054
)
|#
#|
(deftype amphibian (nav-enemy)
((tongue-scale float :offset-assert 600)
(flags uint8 :offset-assert 604)
(knocked-anim-index int8 :offset-assert 605)
(jump-anim-index int8 :offset-assert 606)
(tongue-mode uint64 :offset-assert 612)
(tongue-mod basic :offset-assert 620)
(attacker-handle uint64 :offset-assert 628)
(prev-ry float :offset-assert 636)
(prev-ry1 float :offset-assert 640)
((tongue-scale float :offset-assert 604)
(flags uint8 :offset-assert 608)
(knocked-anim-index int8 :offset-assert 609)
(jump-anim-index int8 :offset-assert 610)
(tongue-mode uint64 :offset-assert 616)
(tongue-mod amphibian-joint-mod :offset-assert 624)
(attacker-handle handle :offset-assert 632)
(prev-ry float :offset-assert 640)
(prev-ry1 float :offset-assert 644)
)
:method-count-assert 188
:size-assert #x288
@@ -39461,17 +39420,16 @@
(attack-spin () _type_ :state 181)
(stare-idle () _type_ :state 182)
(tongue-attack () _type_ :state 183)
(amphibian-method-184 () none 184)
(amphibian-method-185 () none 185)
(amphibian-method-186 () none 186)
(amphibian-method-187 () none 187)
(amphibian-method-184 (_type_ vector vector) vector 184)
(amphibian-method-185 (_type_ amphibian-tongue-attack-info) none 185)
(amphibian-method-186 (_type_ vector vector) symbol 186)
(amphibian-method-187 (_type_) none 187)
)
)
|#
;; (define-extern *amphibian-global-info* amphibian-global-info)
;; (define-extern *amphibian-nav-enemy-info* nav-enemy-info)
;; (define-extern amphibian-joint-mod-callback function)
(define-extern *amphibian-global-info* amphibian-global-info)
(define-extern *amphibian-nav-enemy-info* nav-enemy-info)
(define-extern amphibian-joint-mod-callback (function cspace transformq none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; juicer ;;
@@ -46220,23 +46178,21 @@
;; monster-frog ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype monster-frog (nav-enemy)
()
:method-count-assert 181
:size-assert #x25c
:flag-assert #xb501e0025c
(:methods
(attack () _type_ :state 178)
(attack (vector) _type_ :state 178)
(attack-recover () _type_ :state 179)
(turn () _type_ :state 180)
)
)
|#
;; (define-extern *monster-frog-nav-enemy-info* nav-enemy-info)
;; (define-extern monster-frog-hop-slow-code function)
;; (define-extern monster-frog-hop-fast-code function)
(define-extern *monster-frog-nav-enemy-info* nav-enemy-info)
(define-extern monster-frog-hop-slow-code (function symbol :behavior monster-frog))
(define-extern monster-frog-hop-fast-code (function symbol :behavior monster-frog))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; tomb-scenes ;;
@@ -51898,27 +51854,26 @@
;; rapid-gunner ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype rapid-gunner (nav-enemy)
((los los-control :inline :offset-assert 604)
(joint basic :offset-assert 752)
(joint-blend float :offset-assert 756)
(joint-enable basic :offset-assert 760)
(shot-timer uint64 :offset-assert 764)
(predict-timer uint64 :offset-assert 772)
(target-prev-pos vector :inline :offset-assert 780)
(target-next-pos vector :inline :offset-assert 796)
(focus-dir vector :inline :offset-assert 812)
(y-diff float :offset-assert 828)
(shots-fired uint32 :offset-assert 832)
(spin-up-angle float :offset-assert 836)
(spin-up-timer uint64 :offset-assert 844)
(shoot-anim-index int32 :offset-assert 852)
(status-flags uint64 :offset-assert 860)
(start-pos vector :inline :offset-assert 876)
(dest-pos vector :inline :offset-assert 892)
(hop-dir vector :inline :offset-assert 908)
(roam-radius float :offset-assert 924)
((los los-control :inline :offset-assert 608)
(joint joint-mod :offset-assert 756)
(joint-blend float :offset-assert 760)
(joint-enable symbol :offset-assert 764)
(shot-timer uint64 :offset-assert 768)
(predict-timer uint64 :offset-assert 776)
(target-prev-pos vector :inline :offset-assert 784)
(target-next-pos vector :inline :offset-assert 800)
(focus-dir vector :inline :offset-assert 816)
(y-diff float :offset-assert 832)
(shots-fired uint32 :offset-assert 836)
(spin-up-angle float :offset-assert 840)
(spin-up-timer time-frame :offset-assert 848)
(shoot-anim-index int32 :offset-assert 856)
(status-flags uint64 :offset-assert 864)
(start-pos vector :inline :offset-assert 880)
(dest-pos vector :inline :offset-assert 896)
(hop-dir vector :inline :offset-assert 912)
(roam-radius float :offset-assert 928)
)
:method-count-assert 187
:size-assert #x3a4
@@ -51930,14 +51885,12 @@
(hop-turn () _type_ :state 181)
(cool-down () _type_ :state 182)
(reload () _type_ :state 183)
(rapid-gunner-method-184 () none 184)
(rapid-gunner-method-185 () none 185)
(rapid-gunner-method-186 () none 186)
(rapid-gunner-method-184 (_type_ float) symbol 184)
(rapid-gunner-method-185 (_type_ vector float) none 185)
(rapid-gunner-method-186 (_type_ int float int int) none 186)
)
)
|#
#|
(deftype shield-gunner (rapid-gunner)
()
:method-count-assert 187
@@ -51946,12 +51899,11 @@
(:methods
)
)
|#
;; (define-extern *rapid-gunner-nav-enemy-info* nav-enemy-info)
;; (define-extern vector-average-copy! function)
;; (define-extern *aim-pos* object)
;; (define-extern rapid-gunner-common-post function)
(define-extern *rapid-gunner-nav-enemy-info* nav-enemy-info)
(define-extern vector-average-copy! (function vector vector float vector))
(define-extern *aim-pos* vector)
(define-extern rapid-gunner-common-post (function none :behavior rapid-gunner))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; collection-task ;;
+4 -6
View File
@@ -40,7 +40,6 @@
"(method 77 flamer)",
"(method 77 grenadier)",
"(method 224 bot)",
"(method 77 rapid-gunner)",
// until loop without nop:
"target-history-print",
"display-list-control",
@@ -52,7 +51,6 @@
"(anon-function 10 pilot-recorder)",
"(method 0 hover-nav-control)",
"(method 24 nav-network)",
"(method 11 predator-manager)",
"(method 9 bot-speech-list)",
"(method 9 bot-speech-list-shuffle)",
"(anon-function 10 sig-recorder)",
@@ -113,7 +111,6 @@
"(method 9 editable-region)", // condition branch assert hit
"(anon-function 10 meet-brutter)",
"(method 154 vehicle-racer)",
"(method 188 predator)",
"(anon-function 13 sig0-course)",
"(method 228 hal-sewer)",
"(method 154 vehicle-city-racer)",
@@ -122,8 +119,6 @@
"vehicle-explode-post",
"(method 158 vehicle-guard)",
"(method 207 metalhead-predator)",
"(anon-function 28 grenadier)",
"(anon-function 24 grenadier)",
"test-to-from-spr",
"test-from-spr",
"test-to-spr",
@@ -479,7 +474,10 @@
"(method 40 nav-state)": [1, 2],
"(method 45 nav-mesh)": [5, 6],
"(method 43 nav-mesh)": [0, 1, 2, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"(anon-function 45 gungame-obs)": [0, 1, 6, 9, 14, 18, 21, 22, 30] // TODO - probably not the best
"(anon-function 45 gungame-obs)": [0, 1, 6, 9, 14, 18, 21, 22, 30], // TODO - probably not the best
"(method 142 grenadier)": [0, 1, 3],
"(anon-function 34 predator)": [24]
},
// Sometimes the game might use format strings that are fetched dynamically,
+23 -10
View File
@@ -30,7 +30,7 @@
"DGO/DMI.DGO",
"DGO/ORACLE.DGO",
// "DGO/LERLTESS.DGO",
// "DGO/DRI.DGO",
"DGO/DRI.DGO",
// "DGO/LBRNERMK.DGO",
// "DGO/LRACECF.DGO",
"DGO/CTC.DGO",
@@ -45,7 +45,7 @@
// "DGO/LTRNYSAM.DGO",
// "DGO/LOUTCSTB.DGO",
// "DGO/LASHTHRN.DGO",
// "DGO/TOC.DGO",
"DGO/TOC.DGO",
"DGO/CFB.DGO",
"DGO/CAB.DGO",
// "DGO/STC.DGO",
@@ -67,7 +67,7 @@
"DGO/LKIDDOGE.DGO",
// "DGO/NESTT.DGO",
"DGO/LWIDEC.DGO",
// "DGO/SAG.DGO",
"DGO/SAG.DGO",
"DGO/NEB.DGO",
"DGO/COB.DGO",
"DGO/LBOMBBOT.DGO",
@@ -79,7 +79,7 @@
"DGO/NES.DGO",
"DGO/PAR.DGO",
// "DGO/LERBRNGD.DGO",
// "DGO/MTX.DGO",
"DGO/MTX.DGO",
"DGO/FDA.DGO",
// "DGO/LKEIRIFT.DGO",
"DGO/LWHACK.DGO",
@@ -111,7 +111,7 @@
"DGO/SKA.DGO",
// "DGO/LTRNKRKD.DGO",
"DGO/CIA.DGO",
// "DGO/TOB.DGO",
"DGO/TOB.DGO",
// "DGO/LRACEDB.DGO",
"DGO/LDJAKBRN.DGO",
"DGO/TOA.DGO",
@@ -135,7 +135,7 @@
// "DGO/SWE.DGO",
// "DGO/LRACECB.DGO",
"DGO/GGA.DGO",
// "DGO/TOD.DGO",
"DGO/TOD.DGO",
"DGO/MCN.DGO",
// "DGO/SEW.DGO",
"DGO/VIN.DGO",
@@ -190,10 +190,6 @@
"CTB.DGO",
"CWI.DGO",
"DMI.DGO",
"FOB.DGO",
"FOR.DGO",
"FEA.DGO",
"FEB.DGO",
"GGA.DGO",
"HIDEOUT.DGO",
"KIOSK.DGO",
@@ -201,6 +197,23 @@
"LWIDEA.DGO",
"LWIDEB.DGO",
"LWIDEC.DGO",
"FEA.DGO",
"FEB.DGO",
"DRI.DGO",
"TOC.DGO",
"FOB.DGO",
"SAG.DGO",
"MTX.DGO",
"TOB.DGO",
"TOA.DGO",
"TOD.DGO",
"DRILLMTN.DGO",
"FOR.DGO",
"LDJAKBRN.DGO",
"HIDEOUT.DGO",
"KIOSK.DGO",
"DMI.DGO",
"LSACK.DGO",
"MTN.DGO",
"PRI.DGO",
+42
View File
@@ -854,5 +854,47 @@
["L58", "vector"],
["L57", "vector"],
["L56", "vector"]
],
"amphibian": [["L275", "attack-info"]],
"hopper": [
["L99", "vector"],
["L98", "vector"]
],
"metalmonk": [
["L197", "attack-info"],
["L186", "vector"],
["L185", "vector"],
["L184", "vector"]
],
"ginsu": [["L156", "attack-info"]],
"centurion": [
["L187", "vector"],
["L186", "vector"],
["L194", "attack-info"]
],
"rhino": [
["L253", "attack-info"],
["L239", "vector"],
["L238", "vector"]
],
"grenadier": [
["L204", "vector"],
["L203", "vector"],
["L220", "(pointer int64)", 2],
["L227", "(pointer int64)", 2]
],
"rapid-gunner": [
["L211", "vector"],
["L210", "vector"],
["L209", "vector"],
["L223", "(pointer int32)", 4],
["L224", "(pointer int64)", 3],
["L232", "(pointer int64)", 3],
["L231", "(pointer int32)", 4]
],
"tomb-baby-spider": [["L73", "attack-info"]],
"predator": [
["L252", "vector"],
["L251", "vector"]
]
}
+50 -1
View File
@@ -1305,5 +1305,54 @@
"(trans target-mech-carry-drag)": [[560, "sphere"]],
"(method 22 krew-collection-item)": [[16, "collide-query-with-2vec"]],
"(code idle krew-collection-item)": [[64, "vector"]],
"pegasus-fly-code": [[96, "vector"]]
"pegasus-fly-code": [[96, "vector"]],
"(method 90 amphibian)": [[80, "vector"]],
"(method 186 amphibian)": [
[560, "vector"],
[16, "collide-query"],
[576, "event-message-block"]
],
"(enter tongue-attack amphibian)": [[16, "amphibian-tongue-attack-info"]],
"amphibian-joint-mod-callback": [
[16, ["inline-array", "matrix", 3]],
[112, "vector"]
],
"(method 178 hopper)": [
[144, "vector"],
// unused
[96, "vector"],
[176, "vector"]
],
"(method 90 hopper)": [[80, "vector"]],
"(method 180 ginsu)": [[16, "matrix"]],
"(trans hostile centurion)": [[16, "vector"]],
"(method 181 centurion)": [
[80, "vector"],
[160, "vector"],
[176, "vector"]
],
"(method 74 centurion)": [[16, "event-message-block"]],
"(enter stop-run rhino)": [
// unused
[32, "vector"]
],
"(enter attack rhino)": [[32, "vector"]],
"(method 74 rhino)": [[48, "vector"]],
"(enter run-away rhino)": [[32, "vector"]],
"(trans hostile grenadier)": [
// unused
[48, "vector"]
],
"(method 115 rapid-gunner)": [[32, "vector"]],
"(code notice monster-frog)": [[16, "vector"]],
"(method 184 predator)": [
[128, "vector"],
[144, "vector"],
[176, "vector"]
],
"(method 11 predator-manager)": [
[32, "transformq"],
[80, "vector"],
[112, "vector"]
]
}
+576 -5
View File
@@ -5417,7 +5417,11 @@
[110, "s2", "collide-shape-prim-sphere"]
],
"(method 11 nav-state)": [[37, "v1", "float"]],
"(method 18 nav-control)": [[252, "a2", "float"]],
"(method 18 nav-control)": [
[252, "a2", "float"],
[250, "a3", "uint"],
[250, "t0", "uint"]
],
"(method 23 nav-mesh)": [["_stack_", 16, "res-tag"]],
"nav-control-validate": [
[29, "s5", "int"],
@@ -5691,9 +5695,7 @@
[10, "gp", "target"],
[14, "gp", "target"]
],
"(anon-function 9 target-mech)": [
[2, "a0", "(pointer target)"]
],
"(anon-function 9 target-mech)": [[2, "a0", "(pointer target)"]],
"target-mech-handler": [
[91, "a0", "process"],
[213, "a3", "vector"],
@@ -5754,5 +5756,574 @@
],
"(code die pegasus)": [[45, "v1", "art-joint-anim"]],
"pegasus-choose-path": [[114, "v1", "float"]],
"(method 115 pegasus)": [["_stack_", 16, "res-tag"]]
"(method 115 pegasus)": [["_stack_", 16, "res-tag"]],
"(code attack-forward amphibian)": [[14, "v1", "art-joint-anim"]],
"(enter attack-forward amphibian)": [
[50, "gp", "process-focusable"],
[54, "a0", "process-focusable"],
[53, "gp", "process-focusable"]
],
"(code tongue-attack amphibian)": [[14, "v1", "art-joint-anim"]],
"(method 76 amphibian)": [[1, "a1", "process-focusable"]],
"(method 90 amphibian)": [[165, "v1", "art-joint-anim"]],
"(method 88 amphibian)": [[29, "s4", "art-joint-anim"]],
"(method 87 amphibian)": [[20, "s4", "art-joint-anim"]],
"(method 89 amphibian)": [[37, "s4", "art-joint-anim"]],
"(method 78 amphibian)": [
[21, "v1", "art-joint-anim"],
[67, "s4", "art-joint-anim"]
],
"(method 77 amphibian)": [
[37, "s5", "art-joint-anim"],
[97, "s4", "art-joint-anim"]
],
"(method 51 amphibian)": [
[34, "a0", "process-focusable"],
[37, "a0", "process-focusable"]
],
"(method 186 amphibian)": [[41, "s3", "collide-shape-prim-sphere"]],
"(code notice amphibian)": [[37, "a1", "art-joint-anim"]],
"(enter stare amphibian)": [
[35, "a0", "process-focusable"],
[38, "a0", "process-focusable"]
],
"(code attack-spin amphibian)": [
[53, "v1", "art-joint-anim"],
[203, "a0", "process-focusable"],
[102, "v1", "art-joint-anim"],
[136, "v1", "art-joint-anim"],
[206, "a0", "process-focusable"]
],
"(enter attack-spin amphibian)": [
[56, "gp", "process-focusable"],
[59, "gp", "process-focusable"]
],
"(post attack-forward-lunge amphibian)": [
[14, "a0", "process-focusable"],
[17, "a0", "process-focusable"]
],
"(code stare-idle amphibian)": [[23, "v1", "art-joint-anim"]],
"(code stare amphibian)": [
[53, "v1", "art-joint-anim"],
[102, "v1", "art-joint-anim"],
[136, "v1", "art-joint-anim"]
],
"(enter notice amphibian)": [
[20, "a0", "process-focusable"],
[23, "a0", "process-focusable"]
],
"(code active amphibian)": [
[69, "v1", "art-joint-anim"],
[135, "v1", "art-joint-anim"]
],
"(method 185 amphibian)": [
[33, "a0", "process-focusable"],
[36, "a0", "process-focusable"]
],
"amphibian-joint-mod-callback": [
[12, "s2", "amphibian-joint-mod"],
[18, "s2", "amphibian-joint-mod"],
[48, "s2", "amphibian-joint-mod"],
[49, "v1", "amphibian"]
],
"(method 7 hopper)": [
[14, "t9", "(function process-focusable int process-focusable)"]
],
"(method 132 hopper)": [[16, "t9", "(function enemy none)"]],
"(code active hopper)": [[22, "v1", "art-joint-anim"]],
"(trans hostile hopper)": [
[24, "gp", "process-focusable"],
[153, "gp", "process-focusable"],
[156, "gp", "process-focusable"]
],
"(method 88 hopper)": [[16, "a1", "art-joint-anim"]],
"(method 87 hopper)": [[16, "a1", "art-joint-anim"]],
"(method 89 hopper)": [[16, "a1", "art-joint-anim"]],
"(method 78 hopper)": [
[18, "s4", "art-joint-anim"],
[56, "v1", "art-joint-anim"]
],
"(method 77 hopper)": [
[33, "a1", "art-joint-anim"],
[86, "a1", "art-joint-anim"]
],
"(method 7 metalmonk)": [
[14, "t9", "(function process-focusable int process-focusable)"]
],
"(method 87 metalmonk)": [[27, "s5", "art-joint-anim"]],
"(method 104 metalmonk)": [
[14, "a0", "process-focusable"],
[17, "a0", "process-focusable"]
],
"(code attack metalmonk)": [[37, "s5", "art-joint-anim"]],
"(code active metalmonk)": [
[205, "a1", "art-joint-anim"],
[118, "gp", "art-joint-anim"]
],
"(trans hostile metalmonk)": [
[29, "gp", "process-focusable"],
[71, "gp", "process-focusable"],
[74, "gp", "process-focusable"]
],
"(method 180 metalmonk)": [[4, "v1", "collide-shape-prim-group"]],
"(method 78 metalmonk)": [
[18, "s4", "art-joint-anim"],
[83, "s4", "art-joint-anim"]
],
"(method 77 metalmonk)": [
[37, "a1", "art-joint-anim"],
[106, "s5", "art-joint-anim"],
[163, "s4", "art-joint-anim"]
],
"(trans victory metalmonk)": [
[28, "a0", "process-focusable"],
[31, "a0", "process-focusable"]
],
"(method 46 ginsu)": [[8, "v1", "collide-shape-prim-group"]],
"(method 183 ginsu)": [[2, "v1", "collide-shape-prim-group"]],
"(method 70 ginsu)": [
[33, "v1", "float"],
[30, "a0", "int"]
],
"(method 181 ginsu)": [
[18, "a0", "process-focusable"],
[21, "a0", "process-focusable"]
],
"(trans attack ginsu)": [[32, "a0", "process-focusable"]],
"(trans anticipate-attack ginsu)": [[27, "a0", "process-focusable"]],
"(method 142 ginsu)": [
[16, "a0", "process-focusable"],
[19, "a0", "process-focusable"]
],
"(method 10 ginsu)": [[6, "t9", "(function none :behavior part-spawner)"]],
"(code victory centurion)": [[30, "v1", "art-joint-anim"]],
"(code fire centurion)": [
[22, "a0", "process-focusable"],
[25, "a0", "process-focusable"],
[43, "v1", "art-joint-anim"],
[76, "gp", "process-focusable"],
[95, "gp", "process-focusable"],
[311, "v1", "art-joint-anim"],
[374, "v1", "art-joint-anim"],
[98, "gp", "process-focusable"],
[163, "a0", "process-focusable"],
[166, "a0", "process-focusable"]
],
"(code active centurion)": [[22, "v1", "art-joint-anim"]],
"(code attack centurion)": [[14, "v1", "art-joint-anim"]],
"(enter attack centurion)": [
[3, "a0", "collide-shape-prim-group"],
[9, "v1", "collide-shape-prim-group"]
],
"(exit attack centurion)": [
[3, "a0", "collide-shape-prim-group"],
[9, "v1", "collide-shape-prim-group"]
],
"(method 55 centurion)": [
[246, "a0", "process-focusable"],
[249, "a0", "process-focusable"],
[341, "a2", "float"]
],
"(code hostile centurion)": [
[87, "a0", "process-focusable"],
[90, "a0", "process-focusable"]
],
"(method 7 centurion)": [
[14, "t9", "(function process-focusable int process-focusable)"]
],
"(method 78 centurion)": [
[18, "v1", "art-joint-anim"],
[53, "s4", "art-joint-anim"],
[82, "v1", "art-joint-anim"]
],
"(method 77 centurion)": [
[18, "v1", "art-joint-anim"],
[72, "a1", "art-joint-anim"],
[117, "a1", "art-joint-anim"],
[151, "s4", "art-joint-anim"]
],
"(trans hostile centurion)": [
[25, "a0", "process-focusable"],
[31, "s5", "process-focusable"],
[21, "s5", "process-focusable"]
],
"(method 180 centurion)": [
[28, "s0", "process-focusable"],
[49, "s0", "process-focusable"]
],
"(method 132 centurion)": [[13, "t9", "(function enemy none)"]],
"(method 31 centurion-shot)": [[7, "t9", "(function projectile none)"]],
"(method 28 centurion-shot)": [
[49, "t9", "(function projectile projectile-options sound-id)"]
],
"(method 74 centurion)": [
[76, "v1", "attack-info"],
[78, "v1", "attack-info"],
[85, "v1", "attack-info"]
],
"(method 30 rhino-wall)": [[5, "v1", "collide-shape-prim-group"]],
"(code circling rhino)": [
[129, "gp", "art-joint-anim"],
[243, "v1", "art-joint-anim"]
],
"(code charge rhino)": [
[29, "v1", "art-joint-anim"],
[85, "v1", "art-joint-anim"],
[137, "v1", "art-joint-anim"]
],
"(code stop-run rhino)": [
[14, "v1", "art-joint-anim"],
[85, "a0", "process-focusable"],
[88, "a0", "process-focusable"],
[145, "a1", "art-joint-anim"]
],
"(code attack rhino)": [[15, "v1", "art-joint-anim"]],
"(trans hostile rhino)": [
[20, "a0", "process-focusable"],
[20, "a0", "process-focusable"],
[23, "a0", "process-focusable"],
[81, "a0", "process-focusable"],
[84, "a0", "process-focusable"],
[113, "s3", "process-focusable"],
[19, "s3", "process-focusable"],
[80, "s3", "process-focusable"],
[117, "a0", "process-focusable"],
[116, "s3", "process-focusable"]
],
"(code die rhino)": [[33, "v1", "art-joint-anim"]],
"(code hit rhino)": [
[30, "v1", "art-joint-anim"],
[83, "v1", "art-joint-anim"]
],
"(method 104 rhino)": [
[30, "a0", "process-focusable"],
[30, "a0", "process-focusable"],
[33, "a0", "process-focusable"]
],
"(enter victory rhino)": [
[8, "v1", "collide-shape-prim-group"],
[12, "v1", "collide-shape-prim-group"],
[17, "a0", "collide-shape-prim-group"]
],
"(code victory rhino)": [
[14, "v1", "art-joint-anim"],
[59, "a0", "collide-shape-prim-group"],
[64, "a0", "collide-shape-prim-group"],
[69, "a0", "collide-shape-prim-group"],
[81, "v1", "art-joint-anim"],
[140, "a0", "process-focusable"],
[143, "a0", "process-focusable"],
[157, "gp", "process-focusable"],
[180, "a0", "collide-shape-prim-group"],
[201, "v1", "art-joint-anim"],
[290, "a0", "process-focusable"],
[139, "gp", "process-focusable"],
[293, "a0", "process-focusable"]
],
"(method 7 rhino)": [
[14, "t9", "(function process-focusable int process-focusable)"]
],
"(method 74 rhino)": [[68, "s2", "process-focusable"]],
"(method 182 rhino)": [[36, "s2", "process-drawable"]],
"(exit victory rhino)": [
[10, "v1", "collide-shape-prim-group"],
[14, "v1", "collide-shape-prim-group"]
],
"(code run-away rhino)": [[14, "v1", "art-joint-anim"]],
"(code hit rhino-wall)": [
[42, "a2", "art-joint-anim"],
[32, "v0", "art-joint-anim"]
],
"(trans hostile grenadier)": [
[19, "a0", "process-focusable"],
[156, "a0", "process-focusable"],
[22, "a0", "process-focusable"]
],
"(method 181 grenadier)": [
[21, "a0", "process-focusable"],
[24, "a0", "process-focusable"],
[79, "a0", "process-focusable"],
[82, "a0", "process-focusable"],
[20, "s5", "process-focusable"],
[78, "s5", "process-focusable"]
],
"(code hit grenadier)": [
[87, "gp", "art-joint-anim"],
[210, "a0", "process-focusable"]
],
"(code victory grenadier)": [
[27, "v1", "art-joint-anim"],
[76, "v1", "art-joint-anim"]
],
"(post attack grenadier)": [
[24, "a0", "process-focusable"],
[27, "a0", "process-focusable"]
],
"(code attack grenadier)": [
[74, "v1", "art-joint-anim"],
[163, "v1", "art-joint-anim"],
[295, "a0", "process-focusable"],
[298, "a0", "process-focusable"],
[317, "v1", "art-joint-anim"],
[366, "v1", "art-joint-anim"]
],
"(event attack grenadier)": [
[23, "s4", "process-focusable"],
[27, "a0", "process-focusable"],
[26, "s4", "process-focusable"]
],
"(method 78 grenadier)": [
[18, "s4", "art-joint-anim"],
[63, "a1", "art-joint-anim"],
[93, "v1", "art-joint-anim"]
],
"(exit spin-kick grenadier)": [[2, "v1", "collide-shape-prim-group"]],
"(post spin-kick grenadier)": [
[24, "a0", "process-focusable"],
[27, "a0", "process-focusable"]
],
"(code spin-kick grenadier)": [[14, "v1", "art-joint-anim"]],
"(enter spin-kick grenadier)": [[29, "v1", "collide-shape-prim-group"]],
"(code backup grenadier)": [[10, "v1", "art-joint-anim"]],
"(method 7 grenadier)": [
[21, "t9", "(function process-focusable int process-focusable)"]
],
"(method 70 grenadier)": [[41, "a0", "process-focusable"]],
"(code active grenadier)": [
[140, "v1", "art-joint-anim"],
[202, "v1", "art-joint-anim"],
[51, "v1", "art-joint-anim"],
[27, "s5", "pair"],
[311, "v1", "art-joint-anim"]
],
"(code hostile grenadier)": [[45, "gp", "art-joint-anim"]],
"rapid-gunner-common-post": [
[14, "a0", "process-focusable"],
[17, "a0", "process-focusable"]
],
"(post notice rapid-gunner)": [
[24, "a0", "process-focusable"],
[27, "a0", "process-focusable"]
],
"(code notice rapid-gunner)": [[30, "v1", "art-joint-anim"]],
"(enter notice rapid-gunner)": [
[85, "a0", "process-focusable"],
[88, "a0", "process-focusable"]
],
"(trans attack rapid-gunner)": [
[30, "a0", "process-focusable"],
[33, "a0", "process-focusable"],
[37, "a0", "process-focusable"],
[40, "a0", "process-focusable"],
[67, "gp", "process-focusable"],
[170, "gp", "process-focusable"],
[173, "gp", "process-focusable"],
[36, "gp", "process-focusable"],
[29, "gp", "process-focusable"]
],
"(post attack rapid-gunner)": [
[32, "a0", "process-focusable"],
[35, "a0", "process-focusable"]
],
"(code attack rapid-gunner)": [[103, "v1", "art-joint-anim"]],
"(code hop rapid-gunner)": [
[89, "v1", "art-joint-anim"],
[120, "v1", "art-joint-anim"]
],
"(post hop-turn rapid-gunner)": [
[32, "a0", "process-focusable"],
[35, "a0", "process-focusable"]
],
"(method 7 rapid-gunner)": [
[14, "t9", "(function process-focusable int process-focusable)"]
],
"(exit spin-attack rapid-gunner)": [[13, "v1", "collide-shape-prim-group"]],
"(post spin-attack rapid-gunner)": [
[24, "a0", "process-focusable"],
[27, "a0", "process-focusable"]
],
"(code spin-attack rapid-gunner)": [[14, "v1", "art-joint-anim"]],
"(enter spin-attack rapid-gunner)": [[29, "v1", "collide-shape-prim-group"]],
"(code hostile rapid-gunner)": [[118, "v1", "art-joint-anim"]],
"(trans hostile rapid-gunner)": [
[27, "a0", "process-focusable"],
[30, "a0", "process-focusable"],
[58, "gp", "process-focusable"],
[26, "gp", "process-focusable"]
],
"(code reload rapid-gunner)": [[14, "v1", "art-joint-anim"]],
"(code cool-down rapid-gunner)": [[14, "v1", "art-joint-anim"]],
"(code hop-turn rapid-gunner)": [[14, "v1", "art-joint-anim"]],
"(method 78 rapid-gunner)": [
[21, "v1", "art-joint-anim"],
[67, "a1", "art-joint-anim"],
[94, "a1", "art-joint-anim"]
],
"(method 79 tomb-baby-spider)": [
[49, "v1", "art-joint-anim"],
[77, "v1", "art-joint-anim"],
[127, "v1", "collide-shape-prim-group"],
[131, "v1", "collide-shape-prim-group"],
[135, "v1", "collide-shape-prim-group"],
[137, "v1", "collide-shape-prim-group"],
[139, "v1", "collide-shape-prim-group"]
],
"(method 78 tomb-baby-spider)": [
[13, "a2", "art-joint-anim"],
[50, "a2", "art-joint-anim"]
],
"(method 77 tomb-baby-spider)": [
[2, "a2", "collide-shape-prim-group"],
[36, "a2", "art-joint-anim"],
[73, "a2", "art-joint-anim"],
[10, "a2", "collide-shape-prim-group"]
],
"(code attack-stop tomb-baby-spider)": [[10, "v1", "art-joint-anim"]],
"(exit attack tomb-baby-spider)": [[2, "v1", "collide-shape-prim-group"]],
"(enter attack tomb-baby-spider)": [[14, "v1", "collide-shape-prim-group"]],
"(code attack tomb-baby-spider)": [[30, "v1", "art-joint-anim"]],
"(code notice tomb-baby-spider)": [
[27, "a0", "process-focusable"],
[30, "a0", "process-focusable"],
[52, "v1", "art-joint-anim"],
[115, "v1", "art-joint-anim"]
],
"(code active tomb-baby-spider)": [
[30, "v1", "art-joint-anim"],
[126, "v1", "art-joint-anim"],
[188, "v1", "art-joint-anim"],
[297, "v1", "art-joint-anim"]
],
"monster-frog-hop-fast-code": [
[15, "v1", "art-joint-anim"],
[72, "v1", "art-joint-anim"]
],
"monster-frog-hop-slow-code": [
[231, "v1", "art-joint-anim"],
[288, "v1", "art-joint-anim"],
[46, "v1", "art-joint-anim"],
[117, "v1", "art-joint-anim"]
],
"(method 78 monster-frog)": [
[19, "v1", "art-joint-anim"],
[54, "v1", "art-joint-anim"],
[89, "v1", "art-joint-anim"],
[121, "v1", "art-joint-anim"]
],
"(method 77 monster-frog)": [
[19, "v1", "art-joint-anim"],
[54, "v1", "art-joint-anim"],
[89, "v1", "art-joint-anim"],
[121, "v1", "art-joint-anim"]
],
"(code attack-recover monster-frog)": [
[10, "v1", "art-joint-anim"],
[87, "v1", "art-joint-anim"],
[158, "v1", "art-joint-anim"]
],
"(code attack monster-frog)": [[19, "v1", "art-joint-anim"]],
"(code turn monster-frog)": [
[21, "v1", "art-joint-anim"],
[79, "v1", "art-joint-anim"]
],
"(code active monster-frog)": [
[27, "v1", "art-joint-anim"],
[80, "v1", "art-joint-anim"],
[172, "v1", "art-joint-anim"],
[234, "v1", "art-joint-anim"],
[343, "v1", "art-joint-anim"]
],
"(code notice monster-frog)": [
[23, "v1", "art-joint-anim"],
[71, "v1", "art-joint-anim"],
[103, "a0", "process-focusable"],
[106, "a0", "process-focusable"],
[149, "v1", "art-joint-anim"]
],
"(code ambush monster-frog)": [
[21, "a0", "process-focusable"],
[24, "a0", "process-focusable"],
[68, "v1", "art-joint-anim"]
],
"(post turn monster-frog)": [
[24, "a0", "process-focusable"],
[27, "a0", "process-focusable"]
],
"(code hostile monster-frog)": [
[18, "a0", "process-focusable"],
[21, "a0", "process-focusable"],
[117, "v1", "art-joint-anim"],
[202, "v1", "art-joint-anim"]
],
"(method 77 predator)": [
[21, "v1", "art-joint-anim"],
[53, "v1", "art-joint-anim"],
[96, "v1", "art-joint-anim"],
[126, "v1", "art-joint-anim"],
[160, "v1", "art-joint-anim"],
[192, "v1", "art-joint-anim"]
],
"(method 78 predator)": [
[21, "v1", "art-joint-anim"],
[53, "v1", "art-joint-anim"],
[89, "v1", "art-joint-anim"],
[123, "v1", "art-joint-anim"],
[155, "v1", "art-joint-anim"]
],
"(method 7 predator)": [
[9, "t9", "(function process-focusable int process-focusable)"]
],
"(method 184 predator)": [
[67, "s2", "process-focusable"],
[79, "a0", "process-focusable"],
[78, "s2", "process-focusable"],
[108, "s2", "process-focusable"]
],
"(method 182 predator)": [[4, "v1", "collide-shape-prim-group"]],
"(code active predator)": [[22, "v1", "art-joint-anim"]],
"(post idle predator)": [[4, "t9", "(function none)"]],
"(code fire predator)": [
[26, "v1", "art-joint-anim"],
[103, "a0", "process-focusable"],
[102, "s5", "process-focusable"],
[121, "s5", "process-focusable"],
[124, "s5", "process-focusable"]
],
"(code close-attack predator)": [
[14, "v1", "art-joint-anim"],
[71, "v1", "art-joint-anim"]
],
"(trans hidden predator)": [
[40, "gp", "process-focusable"],
[43, "gp", "process-focusable"]
],
"(code hidden predator)": [
[14, "v1", "art-joint-anim"],
[75, "v1", "art-joint-anim"]
],
"(code hostile predator)": [
[14, "v1", "art-joint-anim"],
[67, "v1", "art-joint-anim"]
],
"(trans hostile predator)": [
[52, "gp", "process-focusable"],
[55, "gp", "process-focusable"]
],
"(code hide predator)": [[14, "v1", "art-joint-anim"]],
"(trans hide predator)": [
[21, "gp", "process-focusable"],
[24, "gp", "process-focusable"]
],
"(method 186 predator)": [[17, "v1", "int"]],
"(method 77 rapid-gunner)": [
[29, "v1", "art-joint-anim"],
[149, "v1", "art-joint-anim"],
[266, "a1", "art-joint-anim"],
[116, "s4", "art-joint-anim"],
[233, "s5", "art-joint-anim"]
],
"(method 11 predator-manager)": [
["_stack_", 16, "res-tag"],
[281, "s2", "process-drawable"]
]
}
+1 -1
View File
@@ -7,7 +7,7 @@
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": ["pegasus"],
"allowed_objects": [],
"banned_objects": ["texture-anim-tables", "traffic-engine"],
////////////////////////////
+4 -1
View File
@@ -828,7 +828,10 @@ const std::unordered_map<
{"lightning-probe-vars", {{"probe-dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}}},
{"nav-mesh",
{{"poly-array", ArrayFieldDecompMeta(TypeSpec("nav-poly"), 64)},
{"nav-control-array", ArrayFieldDecompMeta(TypeSpec("nav-control"), 288)}}}}}};
{"nav-control-array", ArrayFieldDecompMeta(TypeSpec("nav-control"), 288)}}},
{"predator-graph",
{{"node", ArrayFieldDecompMeta(TypeSpec("predator-node"), 48)},
{"edge", ArrayFieldDecompMeta(TypeSpec("predator-edge"), 4)}}}}}};
goos::Object decompile_structure(const TypeSpec& type,
const DecompilerLabel& label,
@@ -157,6 +157,9 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
// 130
init_bucket_renderer<TextureUploadHandler>("tex-l1-alpha", BucketCategory::TEX,
BucketId::TEX_L1_ALPHA);
init_bucket_renderer<TFragment>("tfrag-t-l1-alpha", BucketCategory::TFRAG,
BucketId::TFRAG_T_L1_ALPHA,
std::vector{tfrag3::TFragmentTreeKind::TRANS}, false, 1);
// 140
// 150
// 160
+1
View File
@@ -116,6 +116,7 @@ enum class BucketId {
TEX_L0_ALPHA = 127,
TFRAG_T_L0_ALPHA = 128,
TEX_L1_ALPHA = 137,
TFRAG_T_L1_ALPHA = 138,
TEX_LCOM_TFRAG = 187,
MERC_LCOM_TFRAG = 188,
TEX_LCOM_SHRUB = 191,
+3 -3
View File
@@ -337,12 +337,12 @@
(enemy-method-55 (_type_) none 55)
(enemy-method-56 (_type_ process event-message-block) int 56)
(enemy-method-57 (_type_ process-focusable enemy-best-focus) enemy-aware 57)
(enemy-method-58 (_type_) symbol 58)
(enemy-method-58 (_type_ process event-message-block) symbol 58)
(enemy-method-59 (_type_) penetrate 59)
(coin-flip? (_type_) symbol 60)
(enemy-method-61 (_type_ int) int :behavior enemy 61)
(enemy-method-62 (_type_) none 62)
(enemy-method-63 (_type_ process-focusable symbol) none 63)
(enemy-method-63 (_type_ process-focusable symbol) symbol 63)
(enemy-method-64 (_type_) none 64)
(enemy-method-65 (_type_) none 65)
(go-ambush (_type_) none 66)
@@ -353,7 +353,7 @@
(go-flee (_type_) none 71)
(enemy-method-72 (_type_) none 72)
(enemy-method-73 (_type_) none 73)
(enemy-method-74 (_type_ process object symbol event-message-block) none 74)
(enemy-method-74 (_type_ process object symbol event-message-block) object 74)
(enemy-method-75 (_type_ process touching-shapes-entry) none 75)
(enemy-method-76 (_type_ process event-message-block) symbol 76)
(enemy-method-77 (_type_ (pointer float)) symbol 77)
+327 -314
View File
@@ -406,13 +406,11 @@
)
)
;; WARN: Return type mismatch symbol vs none.
(defmethod enemy-method-63 enemy ((obj enemy) (arg0 process-focusable) (arg1 symbol))
(if arg1
(enemy-focus-method-13 (-> obj focus) arg0 (the-as enemy-aware arg1))
(try-update-focus (-> obj focus) arg0 obj)
)
(none)
)
(defmethod enemy-method-62 enemy ((obj enemy))
@@ -1592,124 +1590,162 @@
)
)
;; WARN: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 17]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 28]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 89]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 202]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 274]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 346]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 413]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 490]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 493]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 530]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 560]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 610]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 641]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 774]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 807]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 814]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 850]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 933]
(defmethod enemy-method-74 enemy ((obj enemy) (arg0 process) (arg1 object) (arg2 symbol) (arg3 event-message-block))
(local-vars (s5-5 rgbaf) (sv-432 process) (sv-448 event-message-block))
(with-pp
(cond
((= arg2 'track)
(and (nonzero? (-> obj hit-points))
(logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(logtest? (enemy-flag check-water-backup) (-> obj enemy-flags))
)
)
((= arg2 'combo)
(and (not (logtest? (enemy-flag multi-focus) (-> obj enemy-flags))) (nonzero? (-> obj hit-points)))
)
((= arg2 'touch)
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
((= arg2 'touched)
(when (logtest? (-> obj enemy-flags) (enemy-flag attackable-backup))
(let* ((s3-1 arg0)
(v1-20 (if (type? s3-1 process-drawable)
(the-as process-drawable s3-1)
)
)
)
(when v1-20
(let* ((s3-2 (-> v1-20 root))
(a1-4 (if (type? s3-2 collide-shape)
s3-2
)
)
(s3-3 (-> arg3 param 0))
)
(if (and a1-4
s3-3
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(the-as collide-shape a1-4)
(collide-action solid)
(collide-action)
)
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(-> obj root-override2)
(collide-action solid)
(collide-action)
)
)
(set! (-> obj auto-reset-penetrate-time) (the-as uint (-> pp clock frame-counter)))
)
)
)
)
)
(enemy-method-76 obj arg0 arg3)
)
((= arg2 'attack-invinc)
(case (-> (the-as attack-info (-> arg3 param 1)) mode)
(('endlessfall)
(let ((v1-31 (-> obj root-override2 root-prim)))
(set! (-> v1-31 prim-core collide-as) (collide-spec))
(set! (-> v1-31 prim-core collide-with) (collide-spec))
)
0
(enemy-method-73 obj)
)
)
)
((= arg2 'attack)
(let ((s2-0 (the-as object (-> arg3 param 1))))
(when (!= (-> (the-as attack-info s2-0) id) (-> obj incoming attack-id))
(cond
((and (logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let* ((s1-0 obj)
(s0-0 (method-of-object s1-0 enemy-method-106))
)
(set! sv-432 arg0)
(set! sv-448 arg3)
(let ((a3-3 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)))
(s0-0 s1-0 sv-432 sv-448 (the-as int a3-3) (the-as attack-info s2-0))
)
)
(send-event (ppointer->process (-> obj parent)) 'child-hit)
0
(if (not *debug-unkillable*)
(enemy-method-48 obj arg0 arg3)
)
(let ((s2-1 (the-as attack-info (enemy-method-58 obj))))
(when s2-1
(logclear! (-> obj enemy-flags) (enemy-flag called-dying))
(enemy-method-108 obj (the-as enemy arg0) arg3)
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer arg0))
(set! (-> a1-13 num-params) (the-as int arg1))
(set! (-> a1-13 message) (the-as symbol s2-1))
(set! (-> a1-13 param 0) (-> arg3 param 0))
(set! (-> a1-13 param 1) (-> arg3 param 1))
(set! (-> a1-13 param 2) (-> arg3 param 2))
(set! (-> a1-13 param 3) (-> arg3 param 3))
(set! (-> a1-13 param 4) (-> arg3 param 4))
(set! (-> a1-13 param 5) (-> arg3 param 5))
(send-event-function obj a1-13)
)
)
)
(the-as
object
(cond
((= arg2 'track)
(and (nonzero? (-> obj hit-points))
(logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(logtest? (enemy-flag check-water-backup) (-> obj enemy-flags))
)
(else
(set! (-> obj incoming attack-id) (-> (the-as attack-info s2-0) id))
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
((= arg2 'combo)
(and (not (logtest? (enemy-flag multi-focus) (-> obj enemy-flags))) (nonzero? (-> obj hit-points)))
)
((= arg2 'touch)
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
((= arg2 'touched)
(when (logtest? (-> obj enemy-flags) (enemy-flag attackable-backup))
(let* ((s3-1 arg0)
(v1-20 (if (type? s3-1 process-drawable)
(the-as process-drawable s3-1)
)
)
)
(when v1-20
(let* ((s3-2 (-> v1-20 root))
(a1-4 (if (type? s3-2 collide-shape)
s3-2
)
)
(s3-3 (-> arg3 param 0))
)
(if (and a1-4
s3-3
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(the-as collide-shape a1-4)
(collide-action solid)
(collide-action)
)
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(-> obj root-override2)
(collide-action solid)
(collide-action)
)
)
(set! (-> obj auto-reset-penetrate-time) (the-as uint (-> pp clock frame-counter)))
)
)
)
)
)
(enemy-method-76 obj arg0 arg3)
)
((= arg2 'attack-invinc)
(case (-> (the-as attack-info (-> arg3 param 1)) mode)
(('endlessfall)
(let ((v1-31 (-> obj root-override2 root-prim)))
(set! (-> v1-31 prim-core collide-as) (collide-spec))
(set! (-> v1-31 prim-core collide-with) (collide-spec))
)
0
(enemy-method-73 obj)
)
)
)
((= arg2 'attack)
(let ((s2-0 (the-as object (-> arg3 param 1))))
(when (!= (-> (the-as attack-info s2-0) id) (-> obj incoming attack-id))
(cond
((and (logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let* ((s1-0 obj)
(s0-0 (method-of-object s1-0 enemy-method-106))
)
(set! sv-432 arg0)
(set! sv-448 arg3)
(let ((a3-3 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)))
(s0-0 s1-0 sv-432 sv-448 (the-as int a3-3) (the-as attack-info s2-0))
)
)
(send-event (ppointer->process (-> obj parent)) 'child-hit)
0
(if (not *debug-unkillable*)
(enemy-method-48 obj arg0 arg3)
)
(let ((s2-1 (the-as attack-info (enemy-method-58 obj arg0 arg3))))
(when s2-1
(logclear! (-> obj enemy-flags) (enemy-flag called-dying))
(enemy-method-108 obj (the-as enemy arg0) arg3)
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer arg0))
(set! (-> a1-13 num-params) (the-as int arg1))
(set! (-> a1-13 message) (the-as symbol s2-1))
(set! (-> a1-13 param 0) (-> arg3 param 0))
(set! (-> a1-13 param 1) (-> arg3 param 1))
(set! (-> a1-13 param 2) (-> arg3 param 2))
(set! (-> a1-13 param 3) (-> arg3 param 3))
(set! (-> a1-13 param 4) (-> arg3 param 4))
(set! (-> a1-13 param 5) (-> arg3 param 5))
(send-event-function obj a1-13)
)
)
)
)
(else
(set! (-> obj incoming attack-id) (-> (the-as attack-info s2-0) id))
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
)
)
)
)
)
((= arg2 'hit-flinch)
(when (zero? (-> obj hit-points))
((= arg2 'hit-flinch)
(when (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)
)
#t
)
((= arg2 'hit-knocked)
(logclear! (-> obj mask) (process-mask actor-pause))
(logclear! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice))
@@ -1723,138 +1759,17 @@
(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)
)
#t
)
((= arg2 'hit-knocked)
(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)
(when (zero? (-> obj hit-points))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-4) (knocked-type knocked-type-6))
(set! (-> obj incoming knocked-type) (knocked-type knocked-type-0))
0
)
)
)
(go (method-of-object obj knocked))
)
((= arg2 'hit)
(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)
(if (zero? (-> obj hit-points))
(enemy-method-73 obj)
(go (method-of-object obj hit))
)
)
((= arg2 'cue-chase)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let ((v1-162 (logtest? (enemy-flag alert) (-> obj enemy-flags))))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice alert victory called-dying))
(set! (-> obj enemy-flags) (logior (enemy-flag dangerous-backup) (-> obj enemy-flags)))
(logclear! (-> obj mask) (process-mask actor-pause))
(cond
(v1-162
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go-hostile obj)
)
)
((and (-> obj next-state) (let ((v1-173 (-> obj next-state name)))
(or (= v1-173 'dormant) (= v1-173 'dormant-aware))
)
)
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go (method-of-object obj notice))
)
(when (zero? (-> obj hit-points))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-4) (knocked-type knocked-type-6))
(set! (-> obj incoming knocked-type) (knocked-type knocked-type-0))
0
)
)
)
#t
(go (method-of-object obj knocked))
)
)
((= arg2 'cue-wake)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj enemy-flags) (enemy-flag alert victory called-dying))
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(enemy-method-72 obj)
)
#t
)
)
((= arg2 'jump)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj jump-why) (-> arg3 param 0))
(set! (-> obj event-param-point quad) (-> (the-as vector (-> arg3 param 1)) quad))
(go (method-of-object obj jump))
)
)
((= arg2 'death-start)
(set! (-> obj enemy-flags) (the-as enemy-flag (logior (enemy-flag recover) (-> obj enemy-flags))))
(send-event (ppointer->process (-> obj parent)) 'child-die)
(drop-pickup (-> obj fact-info-override) #t *entity-pool* (-> obj fact-info-override) 0)
(let ((s5-1 (-> obj on-death)))
(if s5-1
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-1)
)
)
)
)
((= arg2 'death-end)
(if (-> obj skel effect)
(logior! (-> obj skel effect flags) (effect-control-flag ecf2))
)
(logior! (-> obj draw status) (draw-control-status no-draw))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-active checking-water))
(logclear! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj enemy-flags) (enemy-flag check-water))
)
((= arg2 'instant-death)
(when (and (> (-> obj hit-points) 0) (zero? (-> obj fated-time)))
(set! (-> obj hit-points) 0)
(set! (-> obj root-override2 penetrated-by) (enemy-method-59 obj))
(let ((s5-2 (enemy-method-50 obj (new 'stack-no-clear 'vector))))
(vector-z-quaternion! s5-2 (-> obj root-override2 quat))
(vector-float*! s5-2 s5-2 -1.0)
(vector-normalize! s5-2 1.0)
)
((= arg2 'hit)
(logclear! (-> obj mask) (process-mask actor-pause))
(logclear! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice))
@@ -1866,88 +1781,187 @@
(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)))
(enemy-method-73 obj)
(process-contact-action arg0)
(send-event arg0 'get-attack-count 1)
(if (zero? (-> obj hit-points))
(enemy-method-73 obj)
(go (method-of-object obj hit))
)
)
)
((= arg2 'die-fast)
(logior! (-> obj draw status) (draw-control-status no-draw))
(enemy-method-132 obj)
(send-event (ppointer->process (-> obj parent)) 'child-die)
(let ((s5-3 (-> obj on-death)))
(if s5-3
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-3)
((= arg2 'cue-chase)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let ((v1-162 (logtest? (enemy-flag alert) (-> obj enemy-flags))))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice alert victory called-dying))
(set! (-> obj enemy-flags) (logior (enemy-flag dangerous-backup) (-> obj enemy-flags)))
(logclear! (-> obj mask) (process-mask actor-pause))
(cond
(v1-162
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go-hostile obj)
)
)
((and (-> obj next-state) (let ((v1-173 (-> obj next-state name)))
(or (= v1-173 'dormant) (= v1-173 'dormant-aware))
)
)
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go (method-of-object obj notice))
)
)
)
)
)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
((= arg2 'victory)
(if (and (-> obj enemy-info use-victory)
(not (and (-> obj next-state) (= (-> obj next-state name) 'victory)))
(> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(go (method-of-object obj victory))
)
)
((= arg2 'nav-control)
(if (nonzero? (-> obj nav))
(-> obj nav)
)
)
((= arg2 'push-trans)
(move-by-vector! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'move-trans)
(move-to-point! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'shadow)
(cond
((-> arg3 param 0)
(let ((v1-320 (-> obj draw shadow-ctrl)))
(logclear! (-> v1-320 settings flags) (shadow-flags disable-draw))
)
0
)
(else
(let ((v1-323 (-> obj draw shadow-ctrl)))
(logior! (-> v1-323 settings flags) (shadow-flags disable-draw))
)
0
#t
)
)
)
((= arg2 'color-effect)
(let ((v1-325 (-> arg3 param 0)))
(set! s5-5
(cond
((= v1-325 'dark)
(let ((f30-0 (rand-vu-float-range 0.2 1.0)))
(set-vector! (-> obj draw color-mult) (lerp 1.0 1.0 f30-0) (lerp 1.0 0.0 f30-0) (lerp 1.0 1.0 f30-0) 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 x) (lerp 0.0 0.3 f30-0))
(set! (-> s5-5 y) (lerp 0.0 0.0 f30-0))
(set! (-> s5-5 z) (lerp 0.0 0.3 f30-0))
((= arg2 'cue-wake)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(set! (-> s5-5 w) 1.0)
s5-5
)
((= v1-325 #f)
(set-vector! (-> obj draw color-mult) 1.0 1.0 1.0 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 quad) (the-as uint128 0))
s5-5
)
(logclear! (-> obj enemy-flags) (enemy-flag alert victory called-dying))
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(enemy-method-72 obj)
)
#t
)
)
((= arg2 'jump)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj jump-why) (-> arg3 param 0))
(set! (-> obj event-param-point quad) (-> (the-as vector (-> arg3 param 1)) quad))
(go (method-of-object obj jump))
)
)
((= arg2 'death-start)
(set! (-> obj enemy-flags) (the-as enemy-flag (logior (enemy-flag recover) (-> obj enemy-flags))))
(send-event (ppointer->process (-> obj parent)) 'child-die)
(drop-pickup (-> obj fact-info-override) #t *entity-pool* (-> obj fact-info-override) 0)
(let ((s5-1 (-> obj on-death)))
(if s5-1
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-1)
)
)
)
)
)
((= arg2 'death-end)
(if (-> obj skel effect)
(logior! (-> obj skel effect flags) (effect-control-flag ecf2))
)
(logior! (-> obj draw status) (draw-control-status no-draw))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-active checking-water))
(logclear! (-> obj focus-status) (focus-status dangerous))
(set! (-> obj enemy-flags) (logclear (-> obj enemy-flags) (enemy-flag check-water)))
)
((= arg2 'instant-death)
(when (and (> (-> obj hit-points) 0) (zero? (-> obj fated-time)))
(set! (-> obj hit-points) 0)
(set! (-> obj root-override2 penetrated-by) (enemy-method-59 obj))
(let ((s5-2 (enemy-method-50 obj (new 'stack-no-clear 'vector))))
(vector-z-quaternion! s5-2 (-> obj root-override2 quat))
(vector-float*! s5-2 s5-2 -1.0)
(vector-normalize! s5-2 1.0)
)
(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)))
(enemy-method-73 obj)
)
)
((= arg2 'die-fast)
(logior! (-> obj draw status) (draw-control-status no-draw))
(enemy-method-132 obj)
(send-event (ppointer->process (-> obj parent)) 'child-die)
(let ((s5-3 (-> obj on-death)))
(if s5-3
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-3)
)
)
)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
((= arg2 'victory)
(if (and (-> obj enemy-info use-victory)
(not (and (-> obj next-state) (= (-> obj next-state name) 'victory)))
(> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(go (method-of-object obj victory))
)
)
((= arg2 'nav-control)
(if (nonzero? (-> obj nav))
(-> obj nav)
)
)
((= arg2 'push-trans)
(move-by-vector! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'move-trans)
(move-to-point! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'shadow)
(cond
((-> arg3 param 0)
(let ((v1-320 (-> obj draw shadow-ctrl)))
(logclear! (-> v1-320 settings flags) (shadow-flags disable-draw))
)
0
)
(else
(let ((v1-323 (-> obj draw shadow-ctrl)))
(logior! (-> v1-323 settings flags) (shadow-flags disable-draw))
)
0
)
)
)
((= arg2 'color-effect)
(case (-> arg3 param 0)
(('dark)
(let ((f30-0 (rand-vu-float-range 0.2 1.0)))
(set-vector! (-> obj draw color-mult) (lerp 1.0 1.0 f30-0) (lerp 1.0 0.0 f30-0) (lerp 1.0 1.0 f30-0) 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 x) (lerp 0.0 0.3 f30-0))
(set! (-> s5-5 y) (lerp 0.0 0.0 f30-0))
(set! (-> s5-5 z) (lerp 0.0 0.3 f30-0))
)
(set! (-> s5-5 w) 1.0)
s5-5
)
((#f)
(set-vector! (-> obj draw color-mult) 1.0 1.0 1.0 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 quad) (the-as uint128 0))
s5-5
)
)
)
)
)
(none)
)
)
@@ -1960,7 +1974,7 @@
)
)
(defmethod enemy-method-58 enemy ((obj enemy))
(defmethod enemy-method-58 enemy ((obj enemy) (arg0 process) (arg1 event-message-block))
(let ((v1-0 (-> obj incoming penetrate-using)))
(cond
((logtest? (the-as penetrate v1-0) (-> obj penetrated-flinch))
@@ -2095,9 +2109,8 @@
)
)
;; WARN: Return type mismatch none vs object.
(defbehavior enemy-event-handler enemy ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(the-as object (enemy-method-74 self arg0 arg1 arg2 arg3))
(enemy-method-74 self arg0 arg1 arg2 arg3)
)
(defbehavior enemy-simple-post enemy ()
-1
View File
@@ -4776,4 +4776,3 @@
(def-art-elt grunt-egg-a-ag grunt-egg-a-lod1-mg 2)
(def-art-elt grunt-egg-a-ag grunt-egg-a-lod0-mg 1)
(def-art-elt grunt-egg-a-ag grunt-egg-a-lod0-jg 0)
+3 -3
View File
@@ -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)
+6 -9
View File
@@ -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)
)
)
+27 -21
View File
@@ -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)
)
)
@@ -72,12 +72,12 @@
(deftype find-nav-sphere-ids-params (structure)
((bsphere sphere :inline :offset-assert 0)
(y-threshold float :offset-assert 16)
(len int16 :offset-assert 20)
(max-len int16 :offset-assert 22)
(mask uint8 :offset-assert 24)
(array (pointer uint8) :offset-assert 28)
((bsphere sphere :inline :offset-assert 0)
(y-threshold float :offset-assert 16)
(len int16 :offset-assert 20)
(max-len int16 :offset-assert 22)
(mask uint8 :offset-assert 24)
(array (pointer uint8) :offset-assert 28)
)
:method-count-assert 9
:size-assert #x20
@@ -103,7 +103,7 @@
(update-from-spheres (_type_) none 28)
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none 29)
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params) none 30)
(add-sphere-with-mask-and-id (_type_ vector int int) none 31)
(add-sphere-with-mask-and-id (_type_ vector int int) symbol 31)
(sphere-hash-method-32 (_type_ vector vector float int) symbol 32)
(remove-by-id (_type_ sphere int) none 33)
)
+119 -109
View File
@@ -175,6 +175,9 @@
:out `(,out-name))
out-name))
(defmacro copy-strs (&rest strs)
`(begin ,@(apply (lambda (x) `(set! *all-str* (cons (copy-iso-file ,x "STR/" ".STR") *all-str*))) strs)))
(defmacro copy-sbk-files (&rest files)
`(begin ,@(apply (lambda (x) `(set! *all-sbk* (cons (copy-iso-file ,x "SBK/" ".SBK") *all-sbk*))) files)))
@@ -1936,28 +1939,28 @@
;; ;; DRI
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "DRI.DGO" "dri.gd")
(cgo "DRI.DGO" "dri.gd")
;; (copy-textures 1204 1205 1239 1203 1206)
(copy-textures 1204 1205 1239 1203 1206)
;; (copy-gos
;; "centurion-ag"
;; "drill-turret-ext-ag"
;; "mech-ag"
;; "port-turret-ag"
;; "ginsu-ag"
;; "drill-elevator-ag"
;; "drill-plat-falling-ag"
;; "drill-bridge-shot-ag"
;; "warp-gate-ag"
;; "drill-elevator-base-ag"
;; "drill-wall-ag"
;; "drill-metalhead-eggs-c-ag"
;; "drill-metalhead-eggs-b-ag"
;; "drill-metalhead-eggs-a-ag"
;; "drill-turret-int-ag"
;; "drill-vis"
;; )
(copy-gos
"centurion-ag"
;; "drill-turret-ext-ag"
;; "mech-ag"
;; "port-turret-ag"
"ginsu-ag"
"drill-elevator-ag"
"drill-plat-falling-ag"
"drill-bridge-shot-ag"
;; "warp-gate-ag"
"drill-elevator-base-ag"
;; "drill-wall-ag"
;; "drill-metalhead-eggs-c-ag"
;; "drill-metalhead-eggs-b-ag"
;; "drill-metalhead-eggs-a-ag"
;; "drill-turret-int-ag"
"drill-vis"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; DRILLMTN
@@ -2117,7 +2120,12 @@
(copy-gos
"youngsamos-forestb+0-ag"
;; "daxter-highres-ag"
"youngsamos-highres-ag"
;; "jak-highres-ag"
;; "crimson-guard-hover-ag"
;; "transport-ag"
;; "life-seed-ag"
"forestb-vis"
)
@@ -3459,36 +3467,38 @@
;; ;; MTX
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "MTX.DGO" "mtx.gd")
(cgo "MTX.DGO" "mtx.gd")
;; (copy-textures 1719 1721 1720 1722 3506)
(copy-textures 1719 1721 1720 1722 3506)
;; (copy-gos
;; "daxter-highres-ag"
;; "jak-highres-ag"
;; "mtn-gear-device-ag"
;; "mtn-step-plat-rocks-ag"
;; "metalmonk-ag"
;; "centurion-ag"
;; "rhino-ag"
;; "mtn-plat-buried-rocks-ag"
;; "rhino-wall-ag"
;; "hopper-ag"
;; "water-anim-mountain-dark-eco-ag"
;; "mtn-aval-rocks-ag"
;; "mtn-dice-ag"
;; "plat-buried-ag"
;; "plat-return-ag"
;; "iris-door-ag"
;; "seal-of-mar-ag"
;; "mtn-dice-button-ag"
;; "mtn-plat-eject-ag"
;; "mtn-button-ag"
;; "gear-device-gear-ag"
;; "mtn-lens-ag"
;; "particleman-ag"
;; "mtnext-vis"
;; )
(copy-gos
;; "daxter-highres-ag"
;; "jak-highres-ag"
"mtn-gear-device-ag"
"mtn-step-plat-rocks-ag"
;; "metalmonk-ag"
;; "centurion-ag"
"rhino-ag"
"mtn-plat-buried-rocks-ag"
"rhino-wall-ag"
"hopper-ag"
"water-anim-mountain-dark-eco-ag"
"mtn-aval-rocks-ag"
"mtn-dice-ag"
;; "plat-buried-ag"
;; "plat-return-ag"
;; "iris-door-ag"
"seal-of-mar-ag"
"mtn-dice-button-ag"
"mtn-plat-eject-ag"
"mtn-button-ag"
;; "gear-device-gear-ag"
;; "mtn-lens-ag"
;; "particleman-ag"
"mtnext-vis"
)
(copy-strs "RHW1" "RHW2")
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; NEB
@@ -3906,24 +3916,24 @@
;; ;; SAG
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "SAG.DGO" "sag.gd")
(cgo "SAG.DGO" "sag.gd")
;; (copy-textures 881 1131 882 880)
(copy-textures 881 1131 882 880)
;; (copy-gos
;; "daxter-highres-ag"
;; "jak-highres-ag"
;; "torn-highres-ag"
;; "ruins-tower-a-ag"
;; "ruins-tower-c-ag"
;; "ruins-tower-e-ag"
;; "ruins-tower-b-ag"
;; "ruins-tower-f-ag"
;; "ruins-tower-d-ag"
;; "life-seed-ag"
;; "ruins-tower-rp-ag"
;; "sagehut-vis"
;; )
(copy-gos
;; "daxter-highres-ag"
;; "jak-highres-ag"
"torn-highres-ag"
"ruins-tower-a-ag"
"ruins-tower-c-ag"
"ruins-tower-e-ag"
"ruins-tower-b-ag"
"ruins-tower-f-ag"
"ruins-tower-d-ag"
;; "life-seed-ag"
"ruins-tower-rp-ag"
"sagehut-vis"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; SEB
@@ -4431,51 +4441,51 @@
;; ;; TOB
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "TOB.DGO" "tob.gd")
(cgo "TOB.DGO" "tob.gd")
;; (copy-textures 1596 1597)
(copy-textures 1596 1597)
;; (copy-gos
;; "jak-pole+0-ag"
;; "tomb-stair-block-ag"
;; "tomb-baby-spider-ag"
;; "water-anim-tomb-dark-eco-ag"
;; "tomb-elevator-ag"
;; "tomb-plat-wall-ag"
;; "tomb-button-ag"
;; "tomb-stair-block-spikes-ag"
;; "tomb-boulder-door-ag"
;; "tomb-move-swing-pole-ag"
;; "tombb-vis"
;; )
(copy-gos
;; "jak-pole+0-ag"
"tomb-stair-block-ag"
"tomb-baby-spider-ag"
"water-anim-tomb-dark-eco-ag"
"tomb-elevator-ag"
"tomb-plat-wall-ag"
"tomb-button-ag"
"tomb-stair-block-spikes-ag"
"tomb-boulder-door-ag"
"tomb-move-swing-pole-ag"
"tombb-vis"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; TOC
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "TOC.DGO" "toc.gd")
(cgo "TOC.DGO" "toc.gd")
;; (copy-textures 1598 1599 1832)
(copy-textures 1598 1599 1832)
;; (copy-gos
;; "water-anim-tomb-ag"
;; "tomb-baby-spider-ag"
;; "tomb-beetle-ag"
;; "tomb-door-ag"
;; "tomb-vibe-ag"
;; "tomb-simon-button-ag"
;; "tomb-plat-simon-ag"
;; "tomb-wing-door-ag"
;; "tomb-button-ag"
;; "tomb-beetle-door-ag"
;; "tombc-vis"
;; )
(copy-gos
;; "water-anim-tomb-ag"
;; "tomb-baby-spider-ag"
"tomb-beetle-ag"
"tomb-door-ag"
"tomb-vibe-ag"
;; "tomb-simon-button-ag"
"tomb-plat-simon-ag"
;; "tomb-wing-door-ag"
;; "tomb-button-ag"
"tomb-beetle-door-ag"
"tombc-vis"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; TOD
;; ;;;;;;;;;;;;;;;;;;;;;
;; (cgo "TOD.DGO" "tod.gd")
(cgo "TOD.DGO" "tod.gd")
;; (goal-src-sequence
;; ""
@@ -4483,21 +4493,21 @@
;; "levels/common/entities/com-elevator.gc"
;; )
;; (copy-textures 1626 1627 3275)
(copy-textures 1626 1627 3275)
;; (copy-gos
;; "youngsamos-tombd+0-ag"
;; "kid-tombd+0-ag"
;; "daxter-highres-ag"
;; "youngsamos-highres-ag"
;; "jak-highres-ag"
;; "crocadog-highres-ag"
;; "kor-highres-ag"
;; "kid-highres-ag"
;; "tomb-mar-door-ag"
;; "com-elevator-ag"
;; "tombd-vis"
;; )
(copy-gos
"youngsamos-tombd+0-ag"
;; "kid-tombd+0-ag"
;; "daxter-highres-ag"
;; "youngsamos-highres-ag"
;; "jak-highres-ag"
;; "crocadog-highres-ag"
;; "kor-highres-ag"
;; "kid-highres-ag"
;; "tomb-mar-door-ag"
;; "com-elevator-ag"
"tombd-vis"
)
;; ;;;;;;;;;;;;;;;;;;;;;
;; ;; TOE
+2
View File
@@ -1401,6 +1401,8 @@
(fake-asm .sync.p)
;; Copies the contents of a cop0 (system control) register to a gpr
(fake-asm .mfc0 dest src)
(fake-asm .mfpc dest src)
;; Copies the contents of a gpr to a cop0 (system control) register
(fake-asm .mtc0 dest src)
(fake-asm .mtpc dest src)
)
+1
View File
@@ -1096,6 +1096,7 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! tomb-mar-door ((obj tomb-mar-door) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 1024) ;; added
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 penetrated-by) (penetrate))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
File diff suppressed because it is too large Load Diff
@@ -7,3 +7,751 @@
;; DECOMP BEGINS
(deftype tomb-baby-spider (nav-enemy)
()
:heap-base #x1e0
:method-count-assert 180
:size-assert #x25c
:flag-assert #xb401e0025c
(:methods
(attack () _type_ :state 178)
(attack-stop () _type_ :state 179)
)
)
(defskelgroup skel-tomb-baby-spider tomb-baby-spider tomb-baby-spider-lod0-jg tomb-baby-spider-idle-ja
((tomb-baby-spider-lod0-mg (meters 20)) (tomb-baby-spider-lod1-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5.5)
:shadow tomb-baby-spider-shadow-mg
)
(define *tomb-baby-spider-nav-enemy-info*
(new 'static 'nav-enemy-info
:use-die-falling #f
:use-victory #f
:use-jump-blocked #f
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #t
:hover-if-no-ground #f
:idle-anim-script (new 'static 'array uint32 4 #x1e0002 #x64640401 #x0 #x0)
:idle-anim 4
:notice-anim 5
:hostile-anim 8
:hit-anim 4
:knocked-anim 14
:knocked-land-anim 15
:die-anim 13
:die-falling-anim 13
:victory-anim 4
:jump-wind-up-anim 4
:jump-in-air-anim 4
:jump-land-anim 4
:neck-joint -1
:look-at-joint 3
:bullseye-joint 3
:sound-die (static-sound-name "bspider-die")
:notice-distance (meters 40)
:notice-distance-delta (meters 10)
:proximity-notice-distance (meters 2)
:default-hit-points 1
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:penetrate-knocked #x11fffdffa
:movement-gravity (meters -100)
:friction 0.8
:attack-shove-back (meters 6)
:attack-shove-up (meters 3)
:attack-mode 'generic
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-seek-ry-clamp 2730.6667
:knocked-soft-vxz-lo 80281.6
:knocked-soft-vxz-hi 87654.4
:knocked-soft-vy-lo 67993.6
:knocked-soft-vy-hi 112230.4
:knocked-medium-vxz-lo 147456.0
:knocked-medium-vxz-hi 196608.0
:knocked-medium-vy-lo 135168.0
:knocked-medium-vy-hi 151552.0
:knocked-hard-vxz-lo 55705.6
:knocked-hard-vxz-hi 71270.4
:knocked-hard-vy-lo 88473.6
:knocked-hard-vy-hi 132710.4
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 55705.6
:knocked-red-vxz-hi 71270.4
:knocked-red-vy-lo 88473.6
:knocked-red-vy-hi 132710.4
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 49152.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 81920.0
:shadow-size (meters 2)
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:gem-joint -1
:gem-offset (new 'static 'sphere :r 163840.0)
:callback-info #f
:use-momentum #f
:use-frustration #f
:use-stop-chase #f
:use-circling #f
:use-pacing #f
:walk-anim 5
:turn-anim 5
:run-anim 8
:taunt-anim -1
:run-travel-speed (meters 6)
:run-acceleration (meters 4)
:run-turning-acceleration (meters 18)
:walk-travel-speed (meters 4)
:walk-acceleration (meters 1)
:walk-turning-acceleration (meters 8)
:maximum-rotation-rate (degrees 180.0)
:notice-nav-radius (meters 2)
:frustration-distance (meters 6)
:frustration-time (seconds 4)
:blocked-time (seconds 0.3)
:circle-dist-lo 20480.0
:circle-dist-hi 61440.0
:nav-mesh #f
)
)
(set! (-> *tomb-baby-spider-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
(defstate active (tomb-baby-spider)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (get-rand-float-range self 0.9 1.1)))
(until #f
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override walk-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override walk-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
(when (enemy-method-123 self 0.2)
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.2))
(let ((v1-37 self))
(set! (-> v1-37 enemy-flags) (the-as enemy-flag (logclear (-> v1-37 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-37 nav callback-info) *nav-enemy-null-callback-info*)
)
0
(nav-enemy-method-167 self)
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override idle-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override idle-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(ja :num! (seek! max f30-0))
)
(until (not (enemy-method-123 self 0.2))
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override idle-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override idle-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(let ((v1-101 self))
(if (not (logtest? (enemy-flag enemy-flag36) (-> v1-101 enemy-flags)))
(set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag38) (-> v1-101 enemy-flags))))
)
(set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag36) (-> v1-101 enemy-flags))))
(set! (-> v1-101 nav callback-info) (-> v1-101 enemy-info-override callback-info))
)
0
(nav-enemy-method-165 self)
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override walk-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override walk-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
)
#f
(none)
)
)
(defstate notice (tomb-baby-spider)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (get-rand-float-range self 0.8 1.2)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((a0-3 (handle->process (-> self focus handle))))
(cond
(a0-3
(set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-3) 0) quad))
)
(else
(let ((a1-4 (-> self nav state)))
(set! (-> gp-0 quad) (-> a1-4 target-post quad))
)
)
)
)
(ja-no-eval :group! tomb-baby-spider-notice-spin-ja
:num! (seek!
(the float (+ (-> (the-as art-joint-anim tomb-baby-spider-notice-spin-ja) frames num-frames) -1))
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self root-override2)
gp-0
(* 1.8 (-> self nav max-rotation-rate))
(seconds 0.02)
)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(ja-no-eval :group! tomb-baby-spider-notice-land-ja
:num! (seek!
(the float (+ (-> (the-as art-joint-anim tomb-baby-spider-notice-land-ja) frames num-frames) -1))
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(enemy-method-72 self)
(none)
)
)
(defstate attack (tomb-baby-spider)
:virtual #t
:event (the-as
(function process int symbol event-message-block object :behavior tomb-baby-spider)
enemy-event-handler
)
:enter (behavior ()
(nav-enemy-method-166 self)
(set! (-> self enemy-flags) (logior (enemy-flag actor-pause-backup) (-> self enemy-flags)))
(logior! (-> self focus-status) (focus-status dangerous))
(let ((v1-9 (-> (the-as collide-shape-prim-group (-> self root-override2 root-prim)) child 1)))
(set! (-> v1-9 local-sphere w) 4915.2)
)
(set! (-> self root-override2 penetrate-using) (penetrate generic-attack lunge))
(enemy-method-49 self)
(let* ((v1-14 *game-info*)
(v0-2 (+ (-> v1-14 attack-id) 1))
)
(set! (-> v1-14 attack-id) v0-2)
(set! (-> self attack-id) v0-2)
)
(none)
)
:exit (behavior ()
(let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root-override2 root-prim)) child 1)))
(set! (-> v1-3 local-sphere w) 819.2)
)
(logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup))
(if (logtest? (-> self enemy-flags) (enemy-flag check-water))
(logior! (-> self focus-status) (focus-status dangerous))
(logclear! (-> self focus-status) (focus-status dangerous))
)
(nav-enemy-method-165 self)
(none)
)
:trans (behavior ()
(enemy-method-49 self)
(if (logtest? (-> self enemy-flags) (enemy-flag look-at-focus))
(logclear! (-> self enemy-flags) (enemy-flag look-at-focus))
)
(none)
)
:code (behavior ()
(let ((v1-0 (-> self nav)))
(set! (-> v1-0 target-speed) (* 2.8 (-> self enemy-info-override run-travel-speed)))
)
0
(let ((v1-2 (-> self nav)))
(set! (-> v1-2 acceleration) (* 2.4 (-> self enemy-info-override run-acceleration)))
)
0
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! tomb-baby-spider-attack0-start-ja
:num! (seek!
(the float (+ (-> (the-as art-joint-anim tomb-baby-spider-attack0-start-ja) frames num-frames) -1))
0.8
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.8))
)
(go-virtual attack-stop)
(none)
)
:post (the-as (function none :behavior tomb-baby-spider) nav-enemy-chase-post)
)
(defstate attack-stop (tomb-baby-spider)
:virtual #t
:event (the-as
(function process int symbol event-message-block object :behavior tomb-baby-spider)
enemy-event-handler
)
:enter (behavior ()
(let ((v1-0 (-> self nav)))
(set! (-> v1-0 target-speed) 0.0)
)
0
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag37))))
)
0
(none)
)
:exit (behavior ()
(let ((v1-0 self))
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-0 enemy-flags))))
)
0
(none)
)
:code (behavior ()
(ja-no-eval :group! tomb-baby-spider-attack0-stop-ja
:num! (seek! (the float (+ (-> (the-as art-joint-anim tomb-baby-spider-attack0-stop-ja) frames num-frames) -1)))
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
(when (not (enemy-method-96 self 6371.5557 #t))
(let ((v1-27 self))
(set! (-> v1-27 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-27 enemy-flags))))
)
0
(let ((t9-4 vector-normalize!)
(a0-7 (new 'stack-no-clear 'vector))
(a2-3 (-> self nav state))
(v1-30 (new 'stack-no-clear 'vector))
)
(set! (-> v1-30 quad) (-> a2-3 target-post quad))
(let* ((s5-0 (t9-4 (vector-! a0-7 v1-30 (-> self root-override2 trans)) 1.0))
(f30-0 (deg-diff (quaternion-y-angle (-> self root-override2 quat)) (vector-y-angle s5-0)))
)
(ja-no-eval :num! (loop!))
(cond
((< 0.0 f30-0)
(ja-channel-push! 1 (seconds 0.1))
(ja :group! tomb-baby-spider-turn-left-ja :num! min)
)
(else
(ja-channel-push! 1 (seconds 0.1))
(ja :group! tomb-baby-spider-turn-right-ja :num! min)
)
)
)
)
(until (enemy-method-96 self 910.2222 #t)
(ja-blend-eval)
(suspend)
(ja :num! (loop!))
)
(let ((v1-53 self))
(set! (-> v1-53 enemy-flags) (the-as enemy-flag (logclear (-> v1-53 enemy-flags) (enemy-flag enemy-flag37))))
)
0
)
(ja-channel-push! 1 (seconds 0.2))
(let ((gp-3 (-> self clock frame-counter))
(s5-1 (the int (* 300.0 (rand-vu-float-range 0.6 1.2))))
(f30-2 1.0)
)
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override idle-anim))
:num! (loop! f30-2)
:frame-num 0.0
)
(until (>= (- (-> self clock frame-counter) gp-3) s5-1)
(suspend)
(ja :num! (loop! f30-2))
)
)
(let ((gp-4 (-> self focus aware)))
(if (or (not (enemy-method-107 self)) (!= gp-4 3))
(go-stare self)
)
)
(go-virtual hostile)
(none)
)
:post (the-as (function none :behavior tomb-baby-spider) nav-enemy-face-focus-post)
)
(defstate hostile (tomb-baby-spider)
:virtual #t
:trans (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) trans)))
(if t9-0
(t9-0)
)
)
(let ((a0-1 (enemy-method-107 self)))
(when a0-1
(let ((a0-2 (get-trans a0-1 0)))
(if (and (< (vector-vector-distance a0-2 (-> self root-override2 trans)) 20480.0)
(enemy-method-96 self 1274.3112 #t)
)
(go-virtual attack)
)
)
)
)
(none)
)
)
(defmethod enemy-method-77 tomb-baby-spider ((obj tomb-baby-spider) (arg0 (pointer float)))
(let* ((a2-0 (the-as collide-shape-prim-group (-> obj root-override2 root-prim)))
(v1-2 (-> a2-0 child 3))
)
(dotimes (a3-0 3)
(set! (-> a2-0 child a3-0 local-sphere w) 819.2)
)
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-2 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle player-list blocking-plane pusher)
)
)
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let ((v1-6 (-> obj skel root-channel 0)))
(set! (-> v1-6 frame-group) (the-as art-joint-anim (-> obj draw art-group data 20)))
(set! (-> v1-6 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 20)) frames num-frames) -1))
)
(set! (-> v1-6 param 1) (-> arg0 0))
(set! (-> v1-6 frame-num) 0.0)
(joint-control-channel-group! v1-6 (the-as art-joint-anim (-> obj draw art-group data 20)) num-func-seek!)
)
#t
)
(((knocked-type knocked-type-2) (knocked-type knocked-type-5))
(let ((v1-11 (-> obj skel root-channel 0)))
(set! (-> v1-11 frame-group) (the-as art-joint-anim (-> obj draw art-group data 17)))
(set! (-> v1-11 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 17)) frames num-frames) -1))
)
(set! (-> v1-11 param 1) (-> arg0 0))
(set! (-> v1-11 frame-num) 0.0)
(joint-control-channel-group! v1-11 (the-as art-joint-anim (-> obj draw art-group data 17)) num-func-seek!)
)
#t
)
(else
((method-of-type nav-enemy enemy-method-77) obj arg0)
)
)
)
(defmethod enemy-method-78 tomb-baby-spider ((obj tomb-baby-spider) (arg0 (pointer float)))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let ((v1-3 (-> obj skel root-channel 0)))
(set! (-> v1-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 22)))
(set! (-> v1-3 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 22)) frames num-frames) -1))
)
(set! (-> v1-3 param 1) (-> arg0 0))
(set! (-> v1-3 frame-num) 0.0)
(joint-control-channel-group! v1-3 (the-as art-joint-anim (-> obj draw art-group data 22)) num-func-seek!)
)
#t
)
(((knocked-type knocked-type-2) (knocked-type knocked-type-5))
(let ((v1-8 (-> obj skel root-channel 0)))
(set! (-> v1-8 frame-group) (the-as art-joint-anim (-> obj draw art-group data 18)))
(set! (-> v1-8 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 18)) frames num-frames) -1))
)
(set! (-> v1-8 param 1) (-> arg0 0))
(set! (-> v1-8 frame-num) 0.0)
(joint-control-channel-group! v1-8 (the-as art-joint-anim (-> obj draw art-group data 18)) num-func-seek!)
)
#t
)
(else
((method-of-type nav-enemy enemy-method-78) obj arg0)
)
)
)
(defmethod enemy-method-79 tomb-baby-spider ((obj tomb-baby-spider) (arg0 int) (arg1 enemy-knocked-info))
(case arg0
((3)
(let ((s4-0 (ja-done? 0)))
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group frames num-frames) -1)))
(set! (-> a0-3 param 1) (-> arg1 anim-speed))
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
)
(when s4-0
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
)
(((knocked-type knocked-type-2) (knocked-type knocked-type-5))
(let ((a0-7 (-> obj skel root-channel 0)))
(set! (-> a0-7 frame-group) (the-as art-joint-anim (-> obj draw art-group data 19)))
(set! (-> a0-7 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 19)) frames num-frames) -1))
)
(set! (-> a0-7 param 1) (-> arg1 anim-speed))
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group! a0-7 (the-as art-joint-anim (-> obj draw art-group data 19)) num-func-seek!)
)
)
(else
(let ((a0-8 (-> obj skel root-channel 0)))
(set! (-> a0-8 frame-group) (the-as art-joint-anim (-> obj draw art-group data 16)))
(set! (-> a0-8 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 16)) frames num-frames) -1))
)
(set! (-> a0-8 param 1) (-> arg1 anim-speed))
(set! (-> a0-8 frame-num) 0.0)
(joint-control-channel-group! a0-8 (the-as art-joint-anim (-> obj draw art-group data 16)) num-func-seek!)
)
)
)
(vector-reset! (-> obj root-override2 transv))
#t
)
)
)
((4)
(let ((s4-1 (ja-done? 0)))
(let ((a0-11 (-> obj skel root-channel 0)))
(set! (-> a0-11 param 0) (the float (+ (-> a0-11 frame-group frames num-frames) -1)))
(set! (-> a0-11 param 1) (-> arg1 anim-speed))
(joint-control-channel-group-eval! a0-11 (the-as art-joint-anim #f) num-func-seek!)
)
(when s4-1
(let ((v1-50 (-> obj root-override2 root-prim)))
(set! (-> (the-as collide-shape-prim-group v1-50) child 0 local-sphere w) 1638.4)
(set! (-> (the-as collide-shape-prim-group v1-50) child 1 local-sphere w) 1638.4)
(set! (-> (the-as collide-shape-prim-group v1-50) child 2 local-sphere w) 3276.8)
(set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core action) (collide-action))
(set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core collide-with) (collide-spec))
)
0
)
s4-1
)
)
(else
((method-of-type nav-enemy enemy-method-79) obj arg0 arg1)
)
)
)
(defmethod enemy-method-104 tomb-baby-spider ((obj tomb-baby-spider) (arg0 process) (arg1 uint) (arg2 uint))
(let* ((s1-0 arg0)
(s2-0 (if (type? s1-0 process-focusable)
s1-0
)
)
(s1-1 *target*)
(v1-0 (if (type? s1-1 process-focusable)
s1-1
)
)
(f0-0 1.0)
)
(if (and (= s2-0 v1-0) (logtest? (focus-status indax) (-> v1-0 focus-status)))
(set! f0-0 0.6)
)
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-5 from) (process->ppointer self))
(set! (-> a1-5 num-params) 2)
(set! (-> a1-5 message) 'attack)
(set! (-> a1-5 param 0) arg1)
(let ((v1-9 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
(set! (-> v1-9 id) arg2)
(set! (-> v1-9 shove-back) (* f0-0 (-> obj enemy-info-override attack-shove-back)))
(set! (-> v1-9 shove-up) (* f0-0 (-> obj enemy-info-override attack-shove-up)))
(set! (-> v1-9 mode) (-> obj enemy-info-override attack-mode))
(set! (-> v1-9 damage) (the float (-> obj enemy-info-override attack-damage)))
(set! (-> v1-9 knock) (the-as uint 8))
(set! (-> a1-5 param 1) (the-as uint v1-9))
)
(when (send-event-function arg0 a1-5)
(enemy-method-105 obj arg0)
#t
)
)
)
)
(defmethod enemy-method-114 tomb-baby-spider ((obj tomb-baby-spider))
"@abstract"
(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 ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 5) 0)))
(set! (-> s5-0 total-prims) (the-as uint 6))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s4-0 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 409.6 0.0 7782.4)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-13 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-13 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-13 prim-core action) (collide-action solid no-standon))
(set! (-> v1-13 transform-index) 3)
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 1638.4)
)
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-15 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-15 prim-core action) (collide-action solid deadly no-standon))
(set! (-> v1-15 transform-index) 24)
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 1638.4)
)
(let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-17 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-17 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-17 prim-core action) (collide-action solid no-standon))
(set! (-> v1-17 transform-index) 4)
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 3276.8)
)
(set-vector!
(-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere)
0.0
2867.2
0.0
3276.8
)
(let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-21 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-21 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-21 prim-core action) (collide-action solid no-standon))
(set! (-> v1-21 transform-index) 5)
(set-vector! (-> v1-21 local-sphere) 0.0 4096.0 -1228.8 1638.4)
)
(set! (-> s5-0 nav-radius) 3686.4)
(let ((v1-23 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> obj root-override2) s5-0)
)
0
(none)
)
(defmethod enemy-method-115 tomb-baby-spider ((obj tomb-baby-spider))
"@abstract"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-tomb-baby-spider" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(enemy-method-113 obj *tomb-baby-spider-nav-enemy-info*)
(none)
)
(deftype dig-spider (tomb-baby-spider)
()
:heap-base #x1e0
:method-count-assert 180
:size-assert #x25c
:flag-assert #xb401e0025c
)
+991
View File
@@ -7,3 +7,994 @@
;; DECOMP BEGINS
(deftype hopper (nav-enemy)
((speed-y float :offset-assert 604)
(accel-y float :offset-assert 608)
(next-jump-time int32 :offset-assert 612)
(path-intro path-control :offset-assert 616)
(can-go-knocked? symbol :offset-assert 620)
(land-anim-index int32 :offset-assert 624)
(step-num int32 :offset-assert 628)
(best-point vector :inline :offset-assert 640)
(best-score float :offset-assert 656)
(origin vector :inline :offset-assert 672)
(direction vector :inline :offset-assert 688)
(jump-dist float :offset-assert 704)
(side float :offset-assert 708)
(jump-start-anim uint32 :offset-assert 712)
(jump-air-anim uint32 :offset-assert 716)
(jump-land-anim uint32 :offset-assert 720)
(jump-height-min float :offset-assert 724)
(jump-anim-start-frame float :offset-assert 728)
(minimap connection-minimap :offset-assert 732)
)
:heap-base #x260
:method-count-assert 180
:size-assert #x2e0
:flag-assert #xb4026002e0
(:methods
(hopper-method-178 (_type_) symbol 178)
(hopper-method-179 (_type_) none 179)
)
)
(defskelgroup skel-hopper hopper hopper-lod0-jg hopper-idle-ja
((hopper-lod0-mg (meters 20)) (hopper-lod1-mg (meters 999999)))
:bounds (static-spherem 0 2.25 -0.7 6.5)
:shadow hopper-shadow-mg
)
(deftype hopper-anim-info (structure)
((hit-anim-index int32 :offset-assert 0)
(land-anim-index int32 :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
(deftype hopper-global-info (basic)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(yellow-hit-anim hopper-anim-info 3 :inline :offset-assert 8)
(blue-hit-anim hopper-anim-info 3 :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x38
:flag-assert #x900000038
)
(define *hopper-global-info* (new 'static 'hopper-global-info
:yellow-hit-anim (new 'static 'inline-array hopper-anim-info 3
(new 'static 'hopper-anim-info :hit-anim-index 25 :land-anim-index 26)
(new 'static 'hopper-anim-info :hit-anim-index 27 :land-anim-index 28)
(new 'static 'hopper-anim-info :hit-anim-index 29 :land-anim-index 30)
)
:blue-hit-anim (new 'static 'inline-array hopper-anim-info 3
(new 'static 'hopper-anim-info :hit-anim-index 21 :land-anim-index 24)
(new 'static 'hopper-anim-info :hit-anim-index 22 :land-anim-index 24)
(new 'static 'hopper-anim-info :hit-anim-index 23 :land-anim-index 24)
)
)
)
(defmethod enemy-method-77 hopper ((obj hopper) (arg0 (pointer float)))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let* ((a2-0 (ash 1 (-> *hopper-global-info* prev-blue-hit)))
(v1-3 (enemy-method-120 obj 3 a2-0))
(a1-5 (-> obj draw art-group data (-> *hopper-global-info* blue-hit-anim v1-3 hit-anim-index)))
)
(set! (-> *hopper-global-info* prev-blue-hit) v1-3)
(let ((a0-12 (-> obj skel root-channel 0)))
(set! (-> a0-12 frame-group) (the-as art-joint-anim a1-5))
(set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim a1-5) frames num-frames) -1)))
(set! (-> a0-12 param 1) 1.0)
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group! a0-12 (the-as art-joint-anim a1-5) num-func-seek!)
)
)
)
(else
(ja-channel-push! 1 (seconds 0.1))
(let* ((a2-2 (ash 1 (-> *hopper-global-info* prev-yellow-hit)))
(v1-13 (enemy-method-120 obj 3 a2-2))
(a1-11 (-> obj draw art-group data (-> *hopper-global-info* yellow-hit-anim v1-13 hit-anim-index)))
)
(set! (-> obj land-anim-index) (-> *hopper-global-info* yellow-hit-anim v1-13 land-anim-index))
(set! (-> *hopper-global-info* prev-yellow-hit) v1-13)
(let ((a0-27 (-> obj skel root-channel 0)))
(set! (-> a0-27 frame-group) (the-as art-joint-anim a1-11))
(set! (-> a0-27 param 0) (the float (+ (-> (the-as art-joint-anim a1-11) frames num-frames) -1)))
(set! (-> a0-27 param 1) (-> arg0 0))
(set! (-> a0-27 frame-num) 0.0)
(joint-control-channel-group! a0-27 (the-as art-joint-anim a1-11) num-func-seek!)
)
)
)
)
#t
)
(defmethod enemy-method-78 hopper ((obj hopper) (arg0 (pointer float)))
(cond
((= (-> obj incoming knocked-type) (knocked-type knocked-type-6))
(when (>= (-> obj incoming blue-juggle-count) (the-as uint 2))
(let ((s4-0 (-> obj draw art-group data 24)))
(ja-channel-push! 1 (seconds 0.1))
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0))
(set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) frames num-frames) -1)))
(set! (-> a0-3 param 1) (-> arg0 0))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim s4-0) num-func-seek!)
)
)
#t
)
#f
)
(else
(ja-channel-push! 1 (seconds 0.1))
(let ((a0-5 (-> obj skel root-channel 0)))
(set! (-> a0-5 frame-group) (the-as art-joint-anim (-> obj draw art-group data (-> obj land-anim-index))))
(set! (-> a0-5 param 0)
(the float
(+ (-> (the-as art-joint-anim (-> obj draw art-group data (-> obj land-anim-index))) frames num-frames) -1)
)
)
(set! (-> a0-5 param 1) (-> arg0 0))
(set! (-> a0-5 frame-num) 0.0)
(joint-control-channel-group!
a0-5
(the-as art-joint-anim (-> obj draw art-group data (-> obj land-anim-index)))
num-func-seek!
)
)
#t
)
)
)
(define *hopper-nav-enemy-info*
(new 'static 'nav-enemy-info
:use-die-falling #t
:use-victory #f
:use-jump-blocked #f
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #t
:hover-if-no-ground #f
:idle-anim-script (new 'static 'array uint32 8 #x5010401 #x1010501 #x5010401 #x1010601 #x0 #x0 #x0 #x0)
:idle-anim 4
:notice-anim 7
:hostile-anim 4
:hit-anim 4
:knocked-anim 25
:knocked-land-anim 26
:die-anim 19
:die-falling-anim 20
:victory-anim -1
:jump-wind-up-anim -1
:jump-in-air-anim -1
:jump-land-anim -1
:neck-joint 5
:look-at-joint 5
:bullseye-joint 4
:sound-hit (static-sound-name "hopper-hit")
:sound-die (static-sound-name "hopper-die")
:notice-distance (meters 40)
:notice-distance-delta (meters 40)
:proximity-notice-distance (meters 4)
:default-hit-points 1
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:penetrate-knocked #xffffffffffffffff
:movement-gravity (meters -100)
:friction 0.8
:attack-shove-back (meters 3)
:attack-shove-up (meters 2)
:attack-mode 'generic
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-seek-ry-clamp 4551.1113
:knocked-soft-vxz-lo 72089.6
:knocked-soft-vxz-hi 108134.4
:knocked-soft-vy-lo 81920.0
:knocked-soft-vy-hi 122880.0
:knocked-medium-vxz-lo 147456.0
:knocked-medium-vxz-hi 196608.0
:knocked-medium-vy-lo 135168.0
:knocked-medium-vy-hi 151552.0
:knocked-hard-vxz-lo 78643.2
:knocked-hard-vxz-hi 117964.8
:knocked-hard-vy-lo 183500.8
:knocked-hard-vy-hi 209715.2
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 24576.0
:knocked-red-vxz-hi 196608.0
:knocked-red-vy-lo 94208.0
:knocked-red-vy-hi 151552.0
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 49152.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 81920.0
:shadow-size (meters 2)
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:gem-joint 5
:gem-seg #x2
:gem-no-seg #x4
:gem-offset (new 'static 'sphere :y 1843.2 :z 1884.16 :r 163840.0)
:callback-info #f
:use-momentum #f
:use-frustration #t
:use-stop-chase #f
:use-circling #f
:use-pacing #f
:walk-anim 4
:turn-anim 9
:run-anim 13
:taunt-anim -1
:run-travel-speed (meters 1)
:run-acceleration (meters 1)
:run-turning-acceleration (meters 2)
:walk-travel-speed (meters 1)
:walk-acceleration (meters 1)
:walk-turning-acceleration (meters 3)
:maximum-rotation-rate (degrees 720.0)
:notice-nav-radius (meters 2)
:frustration-distance (meters 8)
:frustration-time (seconds 4)
:blocked-time (seconds 0.3)
:circle-dist-lo 20480.0
:circle-dist-hi 61440.0
:nav-mesh #f
)
)
(set! (-> *hopper-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
(defmethod enemy-method-73 hopper ((obj hopper))
(cond
((-> obj can-go-knocked?)
(set! (-> obj can-go-knocked?) #f)
(go (method-of-object obj knocked))
)
(else
((method-of-type nav-enemy enemy-method-73) obj)
)
)
(none)
)
(defmethod enemy-method-90 hopper ((obj hopper) (arg0 int) (arg1 enemy-jump-info))
(when (= (-> obj jump-why) 2)
(cond
((zero? arg0)
(logior! (-> obj focus-status) (focus-status touch-water under-water))
)
(else
(when (logtest? (-> obj focus-status) (focus-status touch-water))
(let ((s3-0 (new 'stack-no-clear 'water-info)))
(water-info-init! (-> obj root-override2) s3-0 (collide-action solid semi-solid))
(let ((v1-9 #f))
(cond
((not (logtest? (water-flags touch-water) (-> s3-0 flags)))
(if (logtest? (-> obj focus-status) (focus-status under-water))
(set! v1-9 #t)
)
(logclear! (-> obj focus-status) (focus-status touch-water under-water))
)
((logtest? (-> obj focus-status) (focus-status under-water))
(let ((f0-1 (+ 11264.0 (-> obj root-override2 trans y))))
(if (< (-> s3-0 trans y) f0-1)
(set! v1-9 #t)
)
)
)
)
(when v1-9
(logclear! (-> obj focus-status) (focus-status under-water))
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> obj root-override2 trans quad))
(when (logtest? (water-flags touch-water) (-> s3-0 flags))
(set! (-> s2-0 y) (-> s3-0 trans y))
(let ((s3-1 (get-process *default-dead-pool* part-tracker #x4000)))
(when s3-1
(let ((t9-2 (method-of-type part-tracker activate)))
(t9-2
(the-as part-tracker s3-1)
*entity-pool*
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(let ((t9-3 run-function-in-process)
(a0-26 s3-1)
(a1-6 part-tracker-init)
(a2-6 (-> *part-group-id-table* 121))
(a3-1 0)
(t0-0 #f)
(t1-0 #f)
(t2-0 #f)
(t3-0 *launch-matrix*)
)
(set! (-> t3-0 trans quad) (-> s2-0 quad))
((the-as (function object object object object object object object object none) t9-3)
a0-26
a1-6
a2-6
a3-1
t0-0
t1-0
t2-0
t3-0
)
)
(-> s3-1 ppointer)
)
)
(sound-play "splash-out")
)
)
)
)
)
)
)
)
)
((method-of-type nav-enemy enemy-method-90) obj arg0 arg1)
)
(defmethod enemy-method-89 hopper ((obj hopper) (arg0 enemy-jump-info))
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-2 (-> obj draw art-group data (-> obj jump-start-anim)))
(a0-4 (-> obj skel root-channel 0))
)
(set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2))
(set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1)))
(set! (-> a0-4 param 1) (-> arg0 anim-speed))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!)
)
#t
)
(defmethod enemy-method-87 hopper ((obj hopper) (arg0 enemy-jump-info))
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-2 (-> obj draw art-group data (-> obj jump-air-anim)))
(a0-4 (-> obj skel root-channel 0))
)
(set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2))
(set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1)))
(set! (-> a0-4 param 1) (-> arg0 anim-speed))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!)
)
#t
)
(defmethod enemy-method-88 hopper ((obj hopper) (arg0 enemy-jump-info))
(ja-channel-push! 1 (seconds 0.075))
(let ((a1-2 (-> obj draw art-group data (-> obj jump-land-anim)))
(a0-4 (-> obj skel root-channel 0))
)
(set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2))
(set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1)))
(set! (-> a0-4 param 1) (-> arg0 anim-speed))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!)
)
#t
)
(defstate jump (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy jump) enter)))
(if t9-0
(t9-0)
)
)
(none)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy jump) exit)))
(if t9-0
(t9-0)
)
)
(let ((v1-5 (-> self draw shadow-ctrl)))
(logclear! (-> v1-5 settings flags) (shadow-flags shdf03))
(let ((a0-2 v1-5))
(set! (-> a0-2 settings top-plane w) (- 4096.0))
)
0
(set! (-> v1-5 settings bot-plane w) (- -4096.0))
)
0
(none)
)
:trans (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy jump) trans)))
(if t9-0
(t9-0)
)
)
(let ((v1-5 (-> self draw shadow-ctrl)))
(logior! (-> v1-5 settings flags) (shadow-flags shdf03))
(let ((a0-2 v1-5))
(set! (-> a0-2 settings bot-plane w)
(- (+ (- -4096.0 (-> self root-override2 trans y)) (-> self root-override2 gspot-pos y)))
)
)
0
(set! (-> v1-5 settings top-plane w)
(- (+ (- 8192.0 (-> self root-override2 trans y)) (-> self root-override2 gspot-pos y)))
)
)
0
(none)
)
)
(defmethod hopper-method-178 hopper ((obj hopper))
(local-vars (sv-752 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
)
(init-vf0-vector)
(+! (-> obj step-num) -1)
(cond
((>= (-> obj step-num) 0)
(let ((s3-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector))
)
(vector-rotate-around-y! s3-0 (-> obj direction) (* 182.04445 (the float (+ (* (-> obj step-num) 16) -135))))
(let ((a1-1 s5-0))
(let ((v1-7 (-> obj origin)))
(let ((a0-2 s3-0))
(let ((a2-1 (-> obj jump-dist)))
(.mov vf7 a2-1)
)
(.lvf vf5 (&-> a0-2 quad))
)
(.lvf vf4 (&-> v1-7 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-1 quad) vf6)
)
(let ((v1-8 (-> obj nav))
(a0-3 s5-0)
(a1-2 (new 'stack-no-clear 'nav-find-poly-parms))
)
(vector-! (-> a1-2 point) a0-3 (-> v1-8 state mesh bounds))
(set! (-> a1-2 y-threshold) (-> v1-8 nearest-y-threshold))
(set! (-> a1-2 ignore) (the-as uint 2))
(let ((s4-0 (find-poly-containing-point-local (-> v1-8 state mesh) a1-2)))
(when s4-0
(let ((f30-0 (vector-dot s3-0 (-> obj direction))))
(new 'stack-no-clear 'vector)
(let ((a1-3 (new 'stack-no-clear 'vector)))
(set! (-> a1-3 quad) (-> s5-0 quad))
(set! (-> a1-3 w) 6144.0)
(when (not (add-root-sphere-to-hash! (-> obj nav) a1-3 #x8006c))
(when (< (-> obj best-score) f30-0)
(set! (-> obj best-score) f30-0)
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! sv-752 (new 'stack-no-clear 'vector))
(let ((s3-1 (new 'stack 'collide-query)))
(let ((s0-0 (-> obj nav))
(s1-0 s2-0)
)
(let* ((v1-21 s5-0)
(a0-10 (-> s0-0 state mesh))
(t9-4 (method-of-object a0-10 project-point-onto-plane-of-poly-local))
(a2-5 s1-0)
(t0-1 (vector-! (new 'stack-no-clear 'vector) v1-21 (-> s0-0 state mesh bounds)))
)
(t9-4 a0-10 s4-0 a2-5 sv-752 t0-1)
)
(vector+! s1-0 s1-0 (-> s0-0 state mesh bounds))
)
0
(set! (-> s5-0 y) (-> s2-0 y))
(if (enemy-method-126 obj s3-1 s5-0 (collide-spec backgnd) 8192.0 81920.0 1024.0)
(set! (-> s5-0 y) (-> s3-1 best-other-tri intersect y))
)
)
)
(set! (-> obj best-point quad) (-> s5-0 quad))
)
)
)
)
)
)
)
)
#t
)
(else
#f
)
)
)
)
(defstate stare (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy stare) enter)))
(if t9-0
(t9-0)
)
)
(let ((v1-4 self))
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag enemy-flag37))))
)
0
(none)
)
)
(define *hopper-next-jump-time* (the-as time-frame 0))
(defstate hostile (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) enter)))
(if t9-0
(t9-0)
)
)
(let ((v1-4 self))
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-4 nav callback-info) *nav-enemy-null-callback-info*)
)
0
(let ((v1-7 self))
(set! (-> v1-7 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-7 enemy-flags))))
)
0
(set! (-> self speed-y) 0.0)
(set! (-> self accel-y) 0.0)
(set! (-> self next-jump-time) (the-as int (+ (-> self clock frame-counter) (get-rand-int-range self 0 120))))
(set! (-> self step-num) 0)
(set! (-> self best-score) -2.0)
(none)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) exit)))
(if t9-0
(t9-0)
)
)
(none)
)
:trans (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) trans)))
(if t9-0
(t9-0)
)
)
(when (< *hopper-next-jump-time* (-> self clock frame-counter))
(let ((gp-0 (handle->process (-> self focus handle))))
(when gp-0
(let ((s4-1 (vector-!
(new 'stack-no-clear 'vector)
(get-trans (the-as process-focusable gp-0) 0)
(-> self root-override2 trans)
)
)
)
0.0
(let ((s5-0 (get-rand-int self 2)))
(set! (-> self direction y) 0.0)
(let* ((v1-12 s4-1)
(f30-0 (sqrtf (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))))
)
(set! (-> self step-num) 16)
(set! (-> self direction quad) (-> s4-1 quad))
0.0
(let ((s4-2 (new 'stack-no-clear 'vector))
(f28-0 (if (zero? s5-0)
(get-rand-float-range self 4096.0 8192.0)
(get-rand-float-range self 8192.0 (fmin 40960.0 (fmax 16384.0 (* 0.5 f30-0))))
)
)
)
(vector-rotate90-around-y! s4-2 (-> self direction))
(vector-normalize! (-> self direction) 1.0)
(if (< (+ -2048.0 f30-0) f28-0)
(set! f28-0 (+ -2048.0 f30-0))
)
(if (< f28-0 6144.0)
(set! s5-0 0)
)
(set! (-> self jump-dist) f28-0)
)
)
(set! (-> self best-score) -2.0)
(set! (-> self origin quad) (-> self root-override2 trans quad))
;; cfg-17 label is never output by the decompiler
;; (b! #t cfg-17)
(until (not (hopper-method-178 self))
(empty)
)
(when (!= (-> self best-score) -2.0)
(let* ((s4-4 (vector-! (new 'stack-no-clear 'vector) (-> self best-point) (-> self root-override2 trans)))
(f30-1 (deg-diff (quaternion-y-angle (-> self root-override2 quat)) (vector-y-angle s4-4)))
)
(cond
((< (vector-vector-xz-distance (-> self best-point) (get-trans (the-as process-focusable gp-0) 0)) 8192.0)
(when (enemy-method-107 self)
(cond
((zero? s5-0)
(set! (-> self jump-start-anim) (the-as uint 34))
(set! (-> self jump-air-anim) (the-as uint 35))
(set! (-> self jump-land-anim) (the-as uint 36))
(set! (-> self jump-height-min) 4096.0)
(set! (-> self jump-anim-start-frame) 2.0)
)
(else
(if (< 2730.6667 (fabs f30-1))
(set! (-> self jump-start-anim) (the-as uint (if (< 0.0 f30-1)
11
12
)
)
)
(set! (-> self jump-start-anim) (the-as uint 10))
)
(cond
((zero? (get-rand-int self 2))
(set! (-> self jump-air-anim) (the-as uint 15))
(set! (-> self jump-land-anim) (the-as uint 16))
(set! (-> self jump-height-min) 12288.0)
(set! (-> self jump-anim-start-frame) 8.0)
)
(else
(set! (-> self jump-air-anim) (the-as uint 17))
(set! (-> self jump-land-anim) (the-as uint 18))
(set! (-> self jump-height-min) 12288.0)
(set! (-> self jump-anim-start-frame) 8.0)
)
)
)
)
(set! *hopper-next-jump-time* (+ (-> self clock frame-counter) (get-rand-int-range self 4 22)))
(set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag vulnerable))))
(send-event self 'jump 0 (-> self best-point))
)
)
(else
(cond
((zero? s5-0)
(set! (-> self jump-start-anim) (the-as uint 31))
(set! (-> self jump-air-anim) (the-as uint 32))
(set! (-> self jump-land-anim) (the-as uint 33))
(set! (-> self jump-height-min) 4096.0)
(set! (-> self jump-anim-start-frame) 2.0)
)
(else
(if (< 2730.6667 (fabs f30-1))
(set! (-> self jump-start-anim) (the-as uint (if (< 0.0 f30-1)
11
12
)
)
)
(set! (-> self jump-start-anim) (the-as uint 10))
)
(set! (-> self jump-air-anim) (the-as uint 13))
(set! (-> self jump-land-anim) (the-as uint 14))
(set! (-> self jump-height-min) 12288.0)
(set! (-> self jump-anim-start-frame) 8.0)
)
)
(set! *hopper-next-jump-time* (+ (-> self clock frame-counter) (get-rand-int-range self 4 22)))
(set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag vulnerable))))
(send-event self 'jump 0 (-> self best-point))
)
)
)
)
)
)
)
)
)
(none)
)
:post (the-as (function none :behavior hopper) nav-enemy-simple-post)
)
(defstate active (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy active) enter)))
(if t9-0
(t9-0)
)
)
(none)
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (get-rand-float-range self 0.9 1.1)))
(until #f
(ja-no-eval :group! hopper-idle-ja
:num! (seek! (the float (+ (-> (the-as art-joint-anim hopper-idle-ja) frames num-frames) -1)) f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
#f
(none)
)
:post (the-as (function none :behavior hopper) nav-enemy-simple-post)
)
(defstate notice (hopper)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.075))
(let ((f30-0 (get-rand-float-range self 0.8 1.2))
(gp-0 (new 'stack-no-clear 'vector))
)
(if (zero? (get-rand-int self 2))
(ja :group! hopper-notice-ja)
(ja :group! hopper-notice-alt-ja)
)
(ja-no-eval :group! (ja-group)
:num! (seek! (the float (+ (-> (ja-group) frames num-frames) -1)) f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(let ((a1-4 (-> self nav state)))
(set! (-> gp-0 quad) (-> a1-4 travel quad))
)
(seek-toward-heading-vec! (-> self root-override2) gp-0 (-> self nav max-rotation-rate) (seconds 0.02))
(suspend)
(ja :num! (seek! max f30-0))
)
)
(enemy-method-72 self)
(none)
)
)
(defstate ambush (hopper)
:virtual #t
:enter (behavior ()
(when (logtest? (-> self enemy-flags) (enemy-flag auto-reset-penetrate))
(logclear! (-> self enemy-flags) (enemy-flag auto-reset-penetrate))
(let ((gp-0 (-> self on-notice)))
(if gp-0
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (-> self root-override2 trans))
(the-as pair gp-0)
)
)
)
)
(let ((v1-12 (-> self root-override2 root-prim)))
(set! (-> self root-override2 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> self root-override2 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(let ((v1-15 (-> self root-override2 root-prim)))
(set! (-> v1-15 prim-core collide-as) (collide-spec))
(set! (-> v1-15 prim-core collide-with) (collide-spec))
)
0
(when (handle->process (-> self focus handle))
(let ((gp-1 (-> self root-override2))
(s5-0 (new 'stack-no-clear 'vector))
)
(let ((s4-0 (new 'stack-no-clear 'vector)))
0.0
(get-point-in-path! (-> self path-intro) s5-0 0.0 'exact)
(set! (-> s5-0 y) (+ -16384.0 (-> s5-0 y)))
(get-point-in-path! (-> self path-intro) s4-0 1.0 'exact)
(let ((f0-3 (deg-diff
(quaternion-y-angle (-> gp-1 quat))
(vector-y-angle (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s4-0 s5-0) 1.0))
)
)
)
(quaternion-rotate-y! (-> gp-1 quat) (-> gp-1 quat) f0-3)
)
)
(set! (-> gp-1 trans quad) (-> s5-0 quad))
)
)
(none)
)
:exit (behavior ()
(let ((v1-1 (-> self root-override2 root-prim)))
(set! (-> v1-1 prim-core collide-as) (-> self root-override2 backup-collide-as))
(set! (-> v1-1 prim-core collide-with) (-> self root-override2 backup-collide-with))
)
(none)
)
:trans (behavior ()
'()
(none)
)
:code (behavior ()
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((s5-0 (new 'stack 'collide-query)))
(get-point-in-path! (-> self path-intro) gp-0 1.0 'exact)
(if (enemy-method-126 self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0)
(set! (-> gp-0 y) (-> s5-0 best-other-tri intersect y))
)
)
(set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag vulnerable))))
(send-event self 'jump 2 gp-0)
)
(go-virtual hostile)
(none)
)
)
(defmethod enemy-method-132 hopper ((obj hopper))
(when (-> obj minimap)
(logior! (-> obj minimap flags) (minimap-flag fade-out))
(set! (-> obj minimap) #f)
)
((the-as (function enemy none) (find-parent-method hopper 132)) obj)
(none)
)
;; WARN: Return type mismatch process-focusable vs hopper.
(defmethod relocate hopper ((obj hopper) (arg0 int))
(if (nonzero? (-> obj path-intro))
(&+! (-> obj path-intro) arg0)
)
(the-as
hopper
((the-as (function process-focusable int process-focusable) (find-parent-method hopper 7)) obj arg0)
)
)
(defmethod enemy-method-114 hopper ((obj hopper))
"@abstract"
(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 ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s4-0 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon))
(set! (-> s4-0 transform-index) 12)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 9216.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-14 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-14 prim-core action) (collide-action solid no-standon))
(set-vector! (-> v1-14 local-sphere) 0.0 3686.4 0.0 3686.4)
)
(let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-16 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-16 prim-core action) (collide-action deadly))
(set! (-> v1-16 transform-index) 5)
(set-vector! (-> v1-16 local-sphere) 0.0 0.0 819.2 3276.8)
)
(set! (-> s5-0 nav-radius) 4096.0)
(let ((v1-18 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> obj root-override2) s5-0)
)
0
(none)
)
(defmethod enemy-method-115 hopper ((obj hopper))
"@abstract"
(stack-size-set! (-> obj main-thread) 256)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-hopper" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj skel generate-frame-function) create-interpolated2-joint-animation-frame)
(enemy-method-113 obj *hopper-nav-enemy-info*)
(set! (-> obj can-go-knocked?) #t)
(let ((v1-9 (-> obj neck)))
(set! (-> v1-9 up) (the-as uint 1))
(set! (-> v1-9 nose) (the-as uint 2))
(set! (-> v1-9 ear) (the-as uint 0))
(set-vector! (-> v1-9 twist-max) 10922.667 12743.111 0.0 1.0)
(set! (-> v1-9 ignore-angle) 18204.445)
)
(set! (-> obj jump-start-anim) (the-as uint 10))
(set! (-> obj jump-air-anim) (the-as uint 13))
(set! (-> obj jump-land-anim) (the-as uint 14))
(set! (-> obj jump-height-min) 12288.0)
(set! (-> obj jump-anim-start-frame) 8.0)
(set! (-> obj land-anim-index) 26)
(set! (-> obj side) (get-rand-float-range obj -1.5 1.5))
(when (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(set! (-> obj path-intro) (new 'process 'path-control obj 'intro 0.0 (-> obj entity) #f))
(if (-> obj path-intro)
(logior! (-> obj path-intro flags) (path-control-flag display draw-line draw-point draw-text))
)
)
(add-connection *part-engine* obj 5 obj 318 (new 'static 'vector :x 1392.64 :y 491.52 :z 1638.4 :w 163840.0))
(add-connection *part-engine* obj 5 obj 318 (new 'static 'vector :x -1392.64 :y 491.52 :z 1638.4 :w 163840.0))
(logior! (-> obj nav flags) (nav-control-flag output-sphere-hash))
(let ((v1-34 (-> obj nav)))
(set! (-> v1-34 speed-scale) 1.0)
)
0
(set-gravity-length (-> obj root-override2 dynam) 327680.0)
(let ((v1-39 (-> obj nav)))
(set! (-> v1-39 nav-cull-radius) 61440.0)
)
0
(set! (-> obj minimap)
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
)
0
(none)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-1
View File
@@ -326,7 +326,6 @@
((method-of-type nav-enemy enemy-method-74) obj arg0 arg1 arg2 arg3)
)
)
(none)
)
(defmethod go-ambush grunt ((obj grunt))
File diff suppressed because it is too large Load Diff
+38 -32
View File
@@ -190,39 +190,48 @@
)
)
;; 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)
)
)
@@ -375,10 +384,7 @@
0.0
(set! f30-0
(cond
((or (>= (-> self current-path) (-> self num-paths))
(< (-> self current-path) 0)
(<= (-> s5-0 num-data) 0)
)
((or (>= (-> self current-path) (-> self num-paths)) (< (-> self current-path) 0) (<= (-> s5-0 num-data) 0))
(format
0
"<GMJ>: ~A has path out of range cur ~D num ~D num-data ~D~%"
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -47,6 +47,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
@@ -54,10 +55,10 @@
(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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+298
View File
@@ -7,3 +7,301 @@
;; DECOMP BEGINS
(deftype rhino-wall (process-focusable)
((anim spool-anim :offset-assert 204)
(art-name string :offset-assert 208)
(id int8 :offset-assert 212)
)
:heap-base #x60
:method-count-assert 31
:size-assert #xd5
:flag-assert #x1f006000d5
(:methods
(unbroken () _type_ :state 27)
(hit () _type_ :state 28)
(broken () _type_ :state 29)
(rhino-wall-method-30 (_type_) none 30)
)
)
(defskelgroup skel-rhino-wall-1 rhino-wall rhino-wall-1-lod0-jg rhino-wall-1-idle-ja
((rhino-wall-1-lod0-mg (meters 999999)))
:bounds (static-spherem 0.3 9 -3 11)
)
(defskelgroup skel-rhino-wall-2 rhino-wall rhino-wall-2-lod0-jg rhino-wall-2-idle-ja
((rhino-wall-2-lod0-mg (meters 999999)))
:bounds (static-spherem 0.3 13.5 0 14.5)
)
;; WARN: Return type mismatch vector vs none.
(defmethod rhino-wall-method-30 rhino-wall ((obj rhino-wall))
(let ((v1-1 (-> obj root-override root-prim)))
(countdown (a1-0 (-> v1-1 specific 0))
(let ((a2-1 (-> (the-as collide-shape-prim-group v1-1) child a1-0)))
(cond
((zero? a1-0)
(set! (-> a2-1 prim-core collide-as) (collide-spec))
0
)
(else
(set! (-> a2-1 prim-core collide-as) (collide-spec obstacle))
)
)
)
)
(case (-> obj id)
((1)
(set! (-> obj draw origin-joint-index) (the-as uint 2))
(set-vector! (-> obj draw bounds) 0.0 0.0 81920.0 131072.0)
(set! (-> v1-1 transform-index) 2)
(set-vector! (-> v1-1 local-sphere) 0.0 0.0 81920.0 122880.0)
)
((2)
(set! (-> obj draw origin-joint-index) (the-as uint 2))
(set-vector! (-> obj draw bounds) 0.0 0.0 81920.0 131072.0)
(set! (-> v1-1 transform-index) 2)
(set-vector! (-> v1-1 local-sphere) 0.0 0.0 81920.0 122880.0)
)
)
)
(none)
)
(defstate unbroken (rhino-wall)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('trigger)
(go-virtual hit)
)
)
)
:code (behavior ()
(add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0)
(transform-post)
(suspend)
(transform-post)
(sleep-code)
(none)
)
)
(defstate hit (rhino-wall)
:virtual #t
:code (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(rhino-wall-method-30 self)
(set! (-> self draw bounds w) 573440.0)
(let* ((gp-0 (-> self draw art-group))
(s5-0 (method-of-object gp-0 get-art-by-name-method))
)
(format (clear *temp-string*) "~S-end" (-> self art-name))
(let ((a2-3 (s5-0 gp-0 *temp-string* art-joint-anim)))
;; added cast
(ja-play-spooled-anim (-> self anim) (ja-group) (the-as art-joint-anim a2-3) (the-as (function process-drawable symbol) false-func))
)
)
(go-virtual broken)
(none)
)
:post (the-as (function none :behavior rhino-wall) transform-post)
)
(defstate broken (rhino-wall)
:virtual #t
:code (behavior ()
(rhino-wall-method-30 self)
(let* ((gp-0 (-> self draw art-group))
(s5-0 (method-of-object gp-0 get-art-by-name-method))
)
(format (clear *temp-string*) "~S-end" (-> self art-name))
(let ((gp-1 (s5-0 gp-0 *temp-string* art-joint-anim)))
(ja-channel-set! 1)
;; added cast
(set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1))
)
)
(logior! (-> self skel status) (joint-control-status sync-math))
(transform-post)
(logclear! (-> self skel status) (joint-control-status sync-math))
(suspend)
(transform-post)
(sleep-code)
(none)
)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! rhino-wall ((obj rhino-wall) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(set! (-> obj mask) (logior (process-mask collectable) (-> obj mask)))
(let ((s3-0 (res-lump-struct (-> obj entity) 'art-name structure))
(s4-0 (art-group-get-by-name *level* "skel-rhino-wall-1" (the-as (pointer uint32) #f)))
)
(set! (-> obj art-name) (the-as string s3-0))
(cond
((string= (the-as string s3-0) "rhino-wall-1")
(set! (-> obj id) 1)
(let ((s4-1 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-1 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-1 reaction) cshape-reaction-default)
(set! (-> s4-1 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s4-1 penetrated-by) (penetrate))
(let ((s3-1 (new 'process 'collide-shape-prim-group s4-1 (the-as uint 9) 0)))
(set! (-> s4-1 total-prims) (the-as uint 10))
(set! (-> s3-1 prim-core collide-as) (collide-spec obstacle))
(set! (-> s3-1 prim-core action) (collide-action solid))
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 14336.0 -8192.0 0.0 40960.0)
(set! (-> s4-1 root-prim) s3-1)
)
(let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-19 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-19 prim-core action) (collide-action solid))
(set! (-> v1-19 transform-index) 3)
(set-vector! (-> v1-19 local-sphere) 14336.0 -8192.0 0.0 40960.0)
)
(let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 8) (the-as uint 0))))
(set! (-> v1-21 prim-core action) (collide-action solid))
(set! (-> v1-21 transform-index) 43)
(set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 32768.0)
)
(let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-23 prim-core action) (collide-action solid))
(set! (-> v1-23 transform-index) 7)
(set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 5) (the-as uint 0))))
(set! (-> v1-25 prim-core action) (collide-action solid))
(set! (-> v1-25 transform-index) 12)
(set-vector! (-> v1-25 local-sphere) 8192.0 0.0 0.0 12288.0)
)
(let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 6) (the-as uint 0))))
(set! (-> v1-27 prim-core action) (collide-action solid))
(set! (-> v1-27 transform-index) 16)
(set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 10240.0)
)
(let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-29 prim-core action) (collide-action solid))
(set! (-> v1-29 transform-index) 3)
(set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-31 prim-core action) (collide-action solid))
(set! (-> v1-31 transform-index) 9)
(set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 7) (the-as uint 0))))
(set! (-> v1-33 prim-core action) (collide-action solid))
(set! (-> v1-33 transform-index) 28)
(set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-35 prim-core action) (collide-action solid))
(set! (-> v1-35 transform-index) 8)
(set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 16384.0)
)
(set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w)))
(let ((v1-38 (-> s4-1 root-prim)))
(set! (-> s4-1 backup-collide-as) (-> v1-38 prim-core collide-as))
(set! (-> s4-1 backup-collide-with) (-> v1-38 prim-core collide-with))
)
(set! (-> obj root-override) s4-1)
)
(set! s4-0 (art-group-get-by-name *level* "skel-rhino-wall-1" (the-as (pointer uint32) #f)))
(set! (-> obj anim)
(new 'static 'spool-anim :name "rhino-wall-1" :anim-name "1-break" :parts 2 :command-list '())
)
)
((string= (the-as string s3-0) "rhino-wall-2")
(set! (-> obj id) 2)
(let ((s4-2 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-2 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-2 reaction) cshape-reaction-default)
(set! (-> s4-2 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s4-2 penetrated-by) (penetrate))
(let ((s3-2 (new 'process 'collide-shape-prim-group s4-2 (the-as uint 9) 0)))
(set! (-> s4-2 total-prims) (the-as uint 10))
(set! (-> s3-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> s3-2 prim-core action) (collide-action solid))
(set! (-> s3-2 transform-index) 3)
(set-vector! (-> s3-2 local-sphere) -8192.0 -4096.0 0.0 40960.0)
(set! (-> s4-2 root-prim) s3-2)
)
(let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-55 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-55 prim-core action) (collide-action solid))
(set! (-> v1-55 transform-index) 3)
(set-vector! (-> v1-55 local-sphere) -8192.0 -4096.0 0.0 40960.0)
)
(let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-57 prim-core action) (collide-action solid))
(set! (-> v1-57 transform-index) 4)
(set-vector! (-> v1-57 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-59 prim-core action) (collide-action solid))
(set! (-> v1-59 transform-index) 7)
(set-vector! (-> v1-59 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-61 prim-core action) (collide-action solid))
(set! (-> v1-61 transform-index) 15)
(set-vector! (-> v1-61 local-sphere) 0.0 0.0 0.0 12288.0)
)
(let ((v1-63 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-63 prim-core action) (collide-action solid))
(set! (-> v1-63 transform-index) 16)
(set-vector! (-> v1-63 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-65 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 5) (the-as uint 0))))
(set! (-> v1-65 prim-core action) (collide-action solid))
(set! (-> v1-65 transform-index) 26)
(set-vector! (-> v1-65 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-67 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 6) (the-as uint 0))))
(set! (-> v1-67 prim-core action) (collide-action solid))
(set! (-> v1-67 transform-index) 27)
(set-vector! (-> v1-67 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-69 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 7) (the-as uint 0))))
(set! (-> v1-69 prim-core action) (collide-action solid))
(set! (-> v1-69 transform-index) 28)
(set-vector! (-> v1-69 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-71 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 9) (the-as uint 0))))
(set! (-> v1-71 prim-core action) (collide-action solid))
(set! (-> v1-71 transform-index) 58)
(set-vector! (-> v1-71 local-sphere) 0.0 12288.0 0.0 32768.0)
)
(set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w)))
(let ((v1-74 (-> s4-2 root-prim)))
(set! (-> s4-2 backup-collide-as) (-> v1-74 prim-core collide-as))
(set! (-> s4-2 backup-collide-with) (-> v1-74 prim-core collide-with))
)
(set! (-> obj root-override) s4-2)
)
(set! s4-0 (art-group-get-by-name *level* "skel-rhino-wall-2" (the-as (pointer uint32) #f)))
(set! (-> obj anim)
(new 'static 'spool-anim :name "rhino-wall-2" :anim-name "2-break" :parts 1 :command-list '())
)
)
(else
(go process-drawable-art-error (the-as string s3-0))
)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton obj (the-as skeleton-group s4-0) (the-as pair 0))
)
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
(go (method-of-object obj broken))
(go (method-of-object obj unbroken))
)
(none)
)
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -438,12 +438,12 @@
(enemy-method-55 (_type_) none 55)
(enemy-method-56 (_type_ process event-message-block) int 56)
(enemy-method-57 (_type_ process-focusable enemy-best-focus) enemy-aware 57)
(enemy-method-58 (_type_) symbol 58)
(enemy-method-58 (_type_ process event-message-block) symbol 58)
(enemy-method-59 (_type_) penetrate 59)
(coin-flip? (_type_) symbol 60)
(enemy-method-61 (_type_ int) int :behavior enemy 61)
(enemy-method-62 (_type_) none 62)
(enemy-method-63 (_type_ process-focusable symbol) none 63)
(enemy-method-63 (_type_ process-focusable symbol) symbol 63)
(enemy-method-64 (_type_) none 64)
(enemy-method-65 (_type_) none 65)
(go-ambush (_type_) none 66)
@@ -454,7 +454,7 @@
(go-flee (_type_) none 71)
(enemy-method-72 (_type_) none 72)
(enemy-method-73 (_type_) none 73)
(enemy-method-74 (_type_ process object symbol event-message-block) none 74)
(enemy-method-74 (_type_ process object symbol event-message-block) object 74)
(enemy-method-75 (_type_ process touching-shapes-entry) none 75)
(enemy-method-76 (_type_ process event-message-block) symbol 76)
(enemy-method-77 (_type_ (pointer float)) symbol 77)
+327 -314
View File
@@ -426,13 +426,11 @@
)
;; definition for method 63 of type enemy
;; WARN: Return type mismatch symbol vs none.
(defmethod enemy-method-63 enemy ((obj enemy) (arg0 process-focusable) (arg1 symbol))
(if arg1
(enemy-focus-method-13 (-> obj focus) arg0 (the-as enemy-aware arg1))
(try-update-focus (-> obj focus) arg0 obj)
)
(none)
)
;; definition for method 62 of type enemy
@@ -1678,124 +1676,162 @@
;; definition for method 74 of type enemy
;; INFO: Used lq/sq
;; WARN: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 17]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 28]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 89]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 202]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 274]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 346]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 413]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 490]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 493]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 530]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 560]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 610]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 641]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 774]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 807]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 814]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 850]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 933]
(defmethod enemy-method-74 enemy ((obj enemy) (arg0 process) (arg1 object) (arg2 symbol) (arg3 event-message-block))
(local-vars (s5-5 rgbaf) (sv-432 process) (sv-448 event-message-block))
(with-pp
(cond
((= arg2 'track)
(and (nonzero? (-> obj hit-points))
(logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(logtest? (enemy-flag check-water-backup) (-> obj enemy-flags))
)
)
((= arg2 'combo)
(and (not (logtest? (enemy-flag multi-focus) (-> obj enemy-flags))) (nonzero? (-> obj hit-points)))
)
((= arg2 'touch)
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
((= arg2 'touched)
(when (logtest? (-> obj enemy-flags) (enemy-flag attackable-backup))
(let* ((s3-1 arg0)
(v1-20 (if (type? s3-1 process-drawable)
(the-as process-drawable s3-1)
)
)
)
(when v1-20
(let* ((s3-2 (-> v1-20 root))
(a1-4 (if (type? s3-2 collide-shape)
s3-2
)
)
(s3-3 (-> arg3 param 0))
)
(if (and a1-4
s3-3
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(the-as collide-shape a1-4)
(collide-action solid)
(collide-action)
)
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(-> obj root-override2)
(collide-action solid)
(collide-action)
)
)
(set! (-> obj auto-reset-penetrate-time) (the-as uint (-> pp clock frame-counter)))
)
)
)
)
)
(enemy-method-76 obj arg0 arg3)
)
((= arg2 'attack-invinc)
(case (-> (the-as attack-info (-> arg3 param 1)) mode)
(('endlessfall)
(let ((v1-31 (-> obj root-override2 root-prim)))
(set! (-> v1-31 prim-core collide-as) (collide-spec))
(set! (-> v1-31 prim-core collide-with) (collide-spec))
)
0
(enemy-method-73 obj)
)
)
)
((= arg2 'attack)
(let ((s2-0 (the-as object (-> arg3 param 1))))
(when (!= (-> (the-as attack-info s2-0) id) (-> obj incoming attack-id))
(cond
((and (logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let* ((s1-0 obj)
(s0-0 (method-of-object s1-0 enemy-method-106))
)
(set! sv-432 arg0)
(set! sv-448 arg3)
(let ((a3-3 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)))
(s0-0 s1-0 sv-432 sv-448 (the-as int a3-3) (the-as attack-info s2-0))
)
)
(send-event (ppointer->process (-> obj parent)) 'child-hit)
0
(if (not *debug-unkillable*)
(enemy-method-48 obj arg0 arg3)
)
(let ((s2-1 (the-as attack-info (enemy-method-58 obj))))
(when s2-1
(logclear! (-> obj enemy-flags) (enemy-flag called-dying))
(enemy-method-108 obj (the-as enemy arg0) arg3)
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer arg0))
(set! (-> a1-13 num-params) (the-as int arg1))
(set! (-> a1-13 message) (the-as symbol s2-1))
(set! (-> a1-13 param 0) (-> arg3 param 0))
(set! (-> a1-13 param 1) (-> arg3 param 1))
(set! (-> a1-13 param 2) (-> arg3 param 2))
(set! (-> a1-13 param 3) (-> arg3 param 3))
(set! (-> a1-13 param 4) (-> arg3 param 4))
(set! (-> a1-13 param 5) (-> arg3 param 5))
(send-event-function obj a1-13)
)
)
)
(the-as
object
(cond
((= arg2 'track)
(and (nonzero? (-> obj hit-points))
(logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(logtest? (enemy-flag check-water-backup) (-> obj enemy-flags))
)
(else
(set! (-> obj incoming attack-id) (-> (the-as attack-info s2-0) id))
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
((= arg2 'combo)
(and (not (logtest? (enemy-flag multi-focus) (-> obj enemy-flags))) (nonzero? (-> obj hit-points)))
)
((= arg2 'touch)
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
((= arg2 'touched)
(when (logtest? (-> obj enemy-flags) (enemy-flag attackable-backup))
(let* ((s3-1 arg0)
(v1-20 (if (type? s3-1 process-drawable)
(the-as process-drawable s3-1)
)
)
)
(when v1-20
(let* ((s3-2 (-> v1-20 root))
(a1-4 (if (type? s3-2 collide-shape)
s3-2
)
)
(s3-3 (-> arg3 param 0))
)
(if (and a1-4
s3-3
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(the-as collide-shape a1-4)
(collide-action solid)
(collide-action)
)
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s3-3)
(-> obj root-override2)
(collide-action solid)
(collide-action)
)
)
(set! (-> obj auto-reset-penetrate-time) (the-as uint (-> pp clock frame-counter)))
)
)
)
)
)
(enemy-method-76 obj arg0 arg3)
)
((= arg2 'attack-invinc)
(case (-> (the-as attack-info (-> arg3 param 1)) mode)
(('endlessfall)
(let ((v1-31 (-> obj root-override2 root-prim)))
(set! (-> v1-31 prim-core collide-as) (collide-spec))
(set! (-> v1-31 prim-core collide-with) (collide-spec))
)
0
(enemy-method-73 obj)
)
)
)
((= arg2 'attack)
(let ((s2-0 (the-as object (-> arg3 param 1))))
(when (!= (-> (the-as attack-info s2-0) id) (-> obj incoming attack-id))
(cond
((and (logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let* ((s1-0 obj)
(s0-0 (method-of-object s1-0 enemy-method-106))
)
(set! sv-432 arg0)
(set! sv-448 arg3)
(let ((a3-3 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)))
(s0-0 s1-0 sv-432 sv-448 (the-as int a3-3) (the-as attack-info s2-0))
)
)
(send-event (ppointer->process (-> obj parent)) 'child-hit)
0
(if (not *debug-unkillable*)
(enemy-method-48 obj arg0 arg3)
)
(let ((s2-1 (the-as attack-info (enemy-method-58 obj arg0 arg3))))
(when s2-1
(logclear! (-> obj enemy-flags) (enemy-flag called-dying))
(enemy-method-108 obj (the-as enemy arg0) arg3)
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer arg0))
(set! (-> a1-13 num-params) (the-as int arg1))
(set! (-> a1-13 message) (the-as symbol s2-1))
(set! (-> a1-13 param 0) (-> arg3 param 0))
(set! (-> a1-13 param 1) (-> arg3 param 1))
(set! (-> a1-13 param 2) (-> arg3 param 2))
(set! (-> a1-13 param 3) (-> arg3 param 3))
(set! (-> a1-13 param 4) (-> arg3 param 4))
(set! (-> a1-13 param 5) (-> arg3 param 5))
(send-event-function obj a1-13)
)
)
)
)
(else
(set! (-> obj incoming attack-id) (-> (the-as attack-info s2-0) id))
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
)
)
)
)
)
)
((= arg2 'hit-flinch)
(when (zero? (-> obj hit-points))
((= arg2 'hit-flinch)
(when (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)
)
#t
)
((= arg2 'hit-knocked)
(logclear! (-> obj mask) (process-mask actor-pause))
(logclear! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice))
@@ -1809,138 +1845,17 @@
(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)
)
#t
)
((= arg2 'hit-knocked)
(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)
(when (zero? (-> obj hit-points))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-4) (knocked-type knocked-type-6))
(set! (-> obj incoming knocked-type) (knocked-type knocked-type-0))
0
)
)
)
(go (method-of-object obj knocked))
)
((= arg2 'hit)
(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)
(if (zero? (-> obj hit-points))
(enemy-method-73 obj)
(go (method-of-object obj hit))
)
)
((= arg2 'cue-chase)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let ((v1-162 (logtest? (enemy-flag alert) (-> obj enemy-flags))))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice alert victory called-dying))
(set! (-> obj enemy-flags) (logior (enemy-flag dangerous-backup) (-> obj enemy-flags)))
(logclear! (-> obj mask) (process-mask actor-pause))
(cond
(v1-162
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go-hostile obj)
)
)
((and (-> obj next-state) (let ((v1-173 (-> obj next-state name)))
(or (= v1-173 'dormant) (= v1-173 'dormant-aware))
)
)
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go (method-of-object obj notice))
)
(when (zero? (-> obj hit-points))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-4) (knocked-type knocked-type-6))
(set! (-> obj incoming knocked-type) (knocked-type knocked-type-0))
0
)
)
)
#t
(go (method-of-object obj knocked))
)
)
((= arg2 'cue-wake)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj enemy-flags) (enemy-flag alert victory called-dying))
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(enemy-method-72 obj)
)
#t
)
)
((= arg2 'jump)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj jump-why) (-> arg3 param 0))
(set! (-> obj event-param-point quad) (-> (the-as vector (-> arg3 param 1)) quad))
(go (method-of-object obj jump))
)
)
((= arg2 'death-start)
(set! (-> obj enemy-flags) (the-as enemy-flag (logior (enemy-flag recover) (-> obj enemy-flags))))
(send-event (ppointer->process (-> obj parent)) 'child-die)
(drop-pickup (-> obj fact-info-override) #t *entity-pool* (-> obj fact-info-override) 0)
(let ((s5-1 (-> obj on-death)))
(if s5-1
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-1)
)
)
)
)
((= arg2 'death-end)
(if (-> obj skel effect)
(logior! (-> obj skel effect flags) (effect-control-flag ecf2))
)
(logior! (-> obj draw status) (draw-control-status no-draw))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-active checking-water))
(logclear! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj enemy-flags) (enemy-flag check-water))
)
((= arg2 'instant-death)
(when (and (> (-> obj hit-points) 0) (zero? (-> obj fated-time)))
(set! (-> obj hit-points) 0)
(set! (-> obj root-override2 penetrated-by) (enemy-method-59 obj))
(let ((s5-2 (enemy-method-50 obj (new 'stack-no-clear 'vector))))
(vector-z-quaternion! s5-2 (-> obj root-override2 quat))
(vector-float*! s5-2 s5-2 -1.0)
(vector-normalize! s5-2 1.0)
)
((= arg2 'hit)
(logclear! (-> obj mask) (process-mask actor-pause))
(logclear! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice))
@@ -1952,88 +1867,187 @@
(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)))
(enemy-method-73 obj)
(process-contact-action arg0)
(send-event arg0 'get-attack-count 1)
(if (zero? (-> obj hit-points))
(enemy-method-73 obj)
(go (method-of-object obj hit))
)
)
)
((= arg2 'die-fast)
(logior! (-> obj draw status) (draw-control-status no-draw))
(enemy-method-132 obj)
(send-event (ppointer->process (-> obj parent)) 'child-die)
(let ((s5-3 (-> obj on-death)))
(if s5-3
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-3)
((= arg2 'cue-chase)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(let ((v1-162 (logtest? (enemy-flag alert) (-> obj enemy-flags))))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice alert victory called-dying))
(set! (-> obj enemy-flags) (logior (enemy-flag dangerous-backup) (-> obj enemy-flags)))
(logclear! (-> obj mask) (process-mask actor-pause))
(cond
(v1-162
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go-hostile obj)
)
)
((and (-> obj next-state) (let ((v1-173 (-> obj next-state name)))
(or (= v1-173 'dormant) (= v1-173 'dormant-aware))
)
)
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(go (method-of-object obj notice))
)
)
)
)
)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
((= arg2 'victory)
(if (and (-> obj enemy-info use-victory)
(not (and (-> obj next-state) (= (-> obj next-state name) 'victory)))
(> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(go (method-of-object obj victory))
)
)
((= arg2 'nav-control)
(if (nonzero? (-> obj nav))
(-> obj nav)
)
)
((= arg2 'push-trans)
(move-by-vector! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'move-trans)
(move-to-point! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'shadow)
(cond
((-> arg3 param 0)
(let ((v1-320 (-> obj draw shadow-ctrl)))
(logclear! (-> v1-320 settings flags) (shadow-flags disable-draw))
)
0
)
(else
(let ((v1-323 (-> obj draw shadow-ctrl)))
(logior! (-> v1-323 settings flags) (shadow-flags disable-draw))
)
0
#t
)
)
)
((= arg2 'color-effect)
(let ((v1-325 (-> arg3 param 0)))
(set! s5-5
(cond
((= v1-325 'dark)
(let ((f30-0 (rand-vu-float-range 0.2 1.0)))
(set-vector! (-> obj draw color-mult) (lerp 1.0 1.0 f30-0) (lerp 1.0 0.0 f30-0) (lerp 1.0 1.0 f30-0) 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 x) (lerp 0.0 0.3 f30-0))
(set! (-> s5-5 y) (lerp 0.0 0.0 f30-0))
(set! (-> s5-5 z) (lerp 0.0 0.3 f30-0))
((= arg2 'cue-wake)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(set! (-> s5-5 w) 1.0)
s5-5
)
((= v1-325 #f)
(set-vector! (-> obj draw color-mult) 1.0 1.0 1.0 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 quad) (the-as uint128 0))
s5-5
)
(logclear! (-> obj enemy-flags) (enemy-flag alert victory called-dying))
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(go-ambush obj)
(enemy-method-72 obj)
)
#t
)
)
((= arg2 'jump)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj jump-why) (-> arg3 param 0))
(set! (-> obj event-param-point quad) (-> (the-as vector (-> arg3 param 1)) quad))
(go (method-of-object obj jump))
)
)
((= arg2 'death-start)
(set! (-> obj enemy-flags) (the-as enemy-flag (logior (enemy-flag recover) (-> obj enemy-flags))))
(send-event (ppointer->process (-> obj parent)) 'child-die)
(drop-pickup (-> obj fact-info-override) #t *entity-pool* (-> obj fact-info-override) 0)
(let ((s5-1 (-> obj on-death)))
(if s5-1
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-1)
)
)
)
)
)
((= arg2 'death-end)
(if (-> obj skel effect)
(logior! (-> obj skel effect flags) (effect-control-flag ecf2))
)
(logior! (-> obj draw status) (draw-control-status no-draw))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-active checking-water))
(logclear! (-> obj focus-status) (focus-status dangerous))
(set! (-> obj enemy-flags) (logclear (-> obj enemy-flags) (enemy-flag check-water)))
)
((= arg2 'instant-death)
(when (and (> (-> obj hit-points) 0) (zero? (-> obj fated-time)))
(set! (-> obj hit-points) 0)
(set! (-> obj root-override2 penetrated-by) (enemy-method-59 obj))
(let ((s5-2 (enemy-method-50 obj (new 'stack-no-clear 'vector))))
(vector-z-quaternion! s5-2 (-> obj root-override2 quat))
(vector-float*! s5-2 s5-2 -1.0)
(vector-normalize! s5-2 1.0)
)
(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)))
(enemy-method-73 obj)
)
)
((= arg2 'die-fast)
(logior! (-> obj draw status) (draw-control-status no-draw))
(enemy-method-132 obj)
(send-event (ppointer->process (-> obj parent)) 'child-die)
(let ((s5-3 (-> obj on-death)))
(if s5-3
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (-> obj root-override2 trans))
(the-as pair s5-3)
)
)
)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
((= arg2 'victory)
(if (and (-> obj enemy-info use-victory)
(not (and (-> obj next-state) (= (-> obj next-state name) 'victory)))
(> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
)
(go (method-of-object obj victory))
)
)
((= arg2 'nav-control)
(if (nonzero? (-> obj nav))
(-> obj nav)
)
)
((= arg2 'push-trans)
(move-by-vector! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'move-trans)
(move-to-point! (-> obj root-override2) (the-as vector (-> arg3 param 0)))
)
((= arg2 'shadow)
(cond
((-> arg3 param 0)
(let ((v1-320 (-> obj draw shadow-ctrl)))
(logclear! (-> v1-320 settings flags) (shadow-flags disable-draw))
)
0
)
(else
(let ((v1-323 (-> obj draw shadow-ctrl)))
(logior! (-> v1-323 settings flags) (shadow-flags disable-draw))
)
0
)
)
)
((= arg2 'color-effect)
(case (-> arg3 param 0)
(('dark)
(let ((f30-0 (rand-vu-float-range 0.2 1.0)))
(set-vector! (-> obj draw color-mult) (lerp 1.0 1.0 f30-0) (lerp 1.0 0.0 f30-0) (lerp 1.0 1.0 f30-0) 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 x) (lerp 0.0 0.3 f30-0))
(set! (-> s5-5 y) (lerp 0.0 0.0 f30-0))
(set! (-> s5-5 z) (lerp 0.0 0.3 f30-0))
)
(set! (-> s5-5 w) 1.0)
s5-5
)
((#f)
(set-vector! (-> obj draw color-mult) 1.0 1.0 1.0 1.0)
(set! s5-5 (-> obj draw color-emissive))
(set! (-> s5-5 quad) (the-as uint128 0))
s5-5
)
)
)
)
)
(none)
)
)
@@ -2048,7 +2062,7 @@
)
;; definition for method 58 of type enemy
(defmethod enemy-method-58 enemy ((obj enemy))
(defmethod enemy-method-58 enemy ((obj enemy) (arg0 process) (arg1 event-message-block))
(let ((v1-0 (-> obj incoming penetrate-using)))
(cond
((logtest? (the-as penetrate v1-0) (-> obj penetrated-flinch))
@@ -2188,9 +2202,8 @@
)
;; definition for function enemy-event-handler
;; WARN: Return type mismatch none vs object.
(defbehavior enemy-event-handler enemy ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(the-as object (enemy-method-74 self arg0 arg1 arg2 arg3))
(enemy-method-74 self arg0 arg1 arg2 arg3)
)
;; definition for function enemy-simple-post
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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)
)
)
+1 -1
View File
@@ -155,7 +155,7 @@
(update-from-spheres (_type_) none 28)
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none 29)
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params) none 30)
(add-sphere-with-mask-and-id (_type_ vector int int) none 31)
(add-sphere-with-mask-and-id (_type_ vector int int) symbol 31)
(sphere-hash-method-32 (_type_ vector vector float int) symbol 32)
(remove-by-id (_type_ sphere int) none 33)
)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,796 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type tomb-baby-spider
(deftype tomb-baby-spider (nav-enemy)
()
:heap-base #x1e0
:method-count-assert 180
:size-assert #x25c
:flag-assert #xb401e0025c
(:methods
(attack () _type_ :state 178)
(attack-stop () _type_ :state 179)
)
)
;; definition for method 3 of type tomb-baby-spider
(defmethod inspect tomb-baby-spider ((obj tomb-baby-spider))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nav-enemy inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-tomb-baby-spider tomb-baby-spider tomb-baby-spider-lod0-jg tomb-baby-spider-idle-ja
((tomb-baby-spider-lod0-mg (meters 20)) (tomb-baby-spider-lod1-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5.5)
:shadow tomb-baby-spider-shadow-mg
)
;; definition for symbol *tomb-baby-spider-nav-enemy-info*, type nav-enemy-info
(define *tomb-baby-spider-nav-enemy-info*
(new 'static 'nav-enemy-info
:use-die-falling #f
:use-victory #f
:use-jump-blocked #f
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #t
:hover-if-no-ground #f
:idle-anim-script (new 'static 'array uint32 4 #x1e0002 #x64640401 #x0 #x0)
:idle-anim 4
:notice-anim 5
:hostile-anim 8
:hit-anim 4
:knocked-anim 14
:knocked-land-anim 15
:die-anim 13
:die-falling-anim 13
:victory-anim 4
:jump-wind-up-anim 4
:jump-in-air-anim 4
:jump-land-anim 4
:neck-joint -1
:look-at-joint 3
:bullseye-joint 3
:sound-die (static-sound-name "bspider-die")
:notice-distance (meters 40)
:notice-distance-delta (meters 10)
:proximity-notice-distance (meters 2)
:default-hit-points 1
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:penetrate-knocked #x11fffdffa
:movement-gravity (meters -100)
:friction 0.8
:attack-shove-back (meters 6)
:attack-shove-up (meters 3)
:attack-mode 'generic
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-seek-ry-clamp 2730.6667
:knocked-soft-vxz-lo 80281.6
:knocked-soft-vxz-hi 87654.4
:knocked-soft-vy-lo 67993.6
:knocked-soft-vy-hi 112230.4
:knocked-medium-vxz-lo 147456.0
:knocked-medium-vxz-hi 196608.0
:knocked-medium-vy-lo 135168.0
:knocked-medium-vy-hi 151552.0
:knocked-hard-vxz-lo 55705.6
:knocked-hard-vxz-hi 71270.4
:knocked-hard-vy-lo 88473.6
:knocked-hard-vy-hi 132710.4
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 55705.6
:knocked-red-vxz-hi 71270.4
:knocked-red-vy-lo 88473.6
:knocked-red-vy-hi 132710.4
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 49152.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 81920.0
:shadow-size (meters 2)
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:gem-joint -1
:gem-offset (new 'static 'sphere :r 163840.0)
:callback-info #f
:use-momentum #f
:use-frustration #f
:use-stop-chase #f
:use-circling #f
:use-pacing #f
:walk-anim 5
:turn-anim 5
:run-anim 8
:taunt-anim -1
:run-travel-speed (meters 6)
:run-acceleration (meters 4)
:run-turning-acceleration (meters 18)
:walk-travel-speed (meters 4)
:walk-acceleration (meters 1)
:walk-turning-acceleration (meters 8)
:maximum-rotation-rate (degrees 180.0)
:notice-nav-radius (meters 2)
:frustration-distance (meters 6)
:frustration-time (seconds 4)
:blocked-time (seconds 0.3)
:circle-dist-lo 20480.0
:circle-dist-hi 61440.0
:nav-mesh #f
)
)
;; failed to figure out what this is:
(set! (-> *tomb-baby-spider-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
;; failed to figure out what this is:
(defstate active (tomb-baby-spider)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (get-rand-float-range self 0.9 1.1)))
(until #f
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override walk-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override walk-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
(when (enemy-method-123 self 0.2)
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.2))
(let ((v1-37 self))
(set! (-> v1-37 enemy-flags) (the-as enemy-flag (logclear (-> v1-37 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-37 nav callback-info) *nav-enemy-null-callback-info*)
)
0
(nav-enemy-method-167 self)
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override idle-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override idle-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(ja :num! (seek! max f30-0))
)
(until (not (enemy-method-123 self 0.2))
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override idle-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override idle-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(let ((v1-101 self))
(if (not (logtest? (enemy-flag enemy-flag36) (-> v1-101 enemy-flags)))
(set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag38) (-> v1-101 enemy-flags))))
)
(set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag36) (-> v1-101 enemy-flags))))
(set! (-> v1-101 nav callback-info) (-> v1-101 enemy-info-override callback-info))
)
0
(nav-enemy-method-165 self)
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override walk-anim))
:num! (seek!
(the float
(+ (-> (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info-override walk-anim)))
frames
num-frames
)
-1
)
)
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(ja-blend-eval)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
)
#f
(none)
)
)
;; failed to figure out what this is:
(defstate notice (tomb-baby-spider)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (get-rand-float-range self 0.8 1.2)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((a0-3 (handle->process (-> self focus handle))))
(cond
(a0-3
(set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-3) 0) quad))
)
(else
(let ((a1-4 (-> self nav state)))
(set! (-> gp-0 quad) (-> a1-4 target-post quad))
)
)
)
)
(ja-no-eval :group! tomb-baby-spider-notice-spin-ja
:num! (seek!
(the float (+ (-> (the-as art-joint-anim tomb-baby-spider-notice-spin-ja) frames num-frames) -1))
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(seek-to-point-toward-point!
(-> self root-override2)
gp-0
(* 1.8 (-> self nav max-rotation-rate))
(seconds 0.02)
)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(ja-no-eval :group! tomb-baby-spider-notice-land-ja
:num! (seek!
(the float (+ (-> (the-as art-joint-anim tomb-baby-spider-notice-land-ja) frames num-frames) -1))
f30-0
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
(enemy-method-72 self)
(none)
)
)
;; failed to figure out what this is:
(defstate attack (tomb-baby-spider)
:virtual #t
:event (the-as
(function process int symbol event-message-block object :behavior tomb-baby-spider)
enemy-event-handler
)
:enter (behavior ()
(nav-enemy-method-166 self)
(set! (-> self enemy-flags) (logior (enemy-flag actor-pause-backup) (-> self enemy-flags)))
(logior! (-> self focus-status) (focus-status dangerous))
(let ((v1-9 (-> (the-as collide-shape-prim-group (-> self root-override2 root-prim)) child 1)))
(set! (-> v1-9 local-sphere w) 4915.2)
)
(set! (-> self root-override2 penetrate-using) (penetrate generic-attack lunge))
(enemy-method-49 self)
(let* ((v1-14 *game-info*)
(v0-2 (+ (-> v1-14 attack-id) 1))
)
(set! (-> v1-14 attack-id) v0-2)
(set! (-> self attack-id) v0-2)
)
(none)
)
:exit (behavior ()
(let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root-override2 root-prim)) child 1)))
(set! (-> v1-3 local-sphere w) 819.2)
)
(logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup))
(if (logtest? (-> self enemy-flags) (enemy-flag check-water))
(logior! (-> self focus-status) (focus-status dangerous))
(logclear! (-> self focus-status) (focus-status dangerous))
)
(nav-enemy-method-165 self)
(none)
)
:trans (behavior ()
(enemy-method-49 self)
(if (logtest? (-> self enemy-flags) (enemy-flag look-at-focus))
(logclear! (-> self enemy-flags) (enemy-flag look-at-focus))
)
(none)
)
:code (behavior ()
(let ((v1-0 (-> self nav)))
(set! (-> v1-0 target-speed) (* 2.8 (-> self enemy-info-override run-travel-speed)))
)
0
(let ((v1-2 (-> self nav)))
(set! (-> v1-2 acceleration) (* 2.4 (-> self enemy-info-override run-acceleration)))
)
0
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! tomb-baby-spider-attack0-start-ja
:num! (seek!
(the float (+ (-> (the-as art-joint-anim tomb-baby-spider-attack0-start-ja) frames num-frames) -1))
0.8
)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.8))
)
(go-virtual attack-stop)
(none)
)
:post (the-as (function none :behavior tomb-baby-spider) nav-enemy-chase-post)
)
;; failed to figure out what this is:
(defstate attack-stop (tomb-baby-spider)
:virtual #t
:event (the-as
(function process int symbol event-message-block object :behavior tomb-baby-spider)
enemy-event-handler
)
:enter (behavior ()
(let ((v1-0 (-> self nav)))
(set! (-> v1-0 target-speed) 0.0)
)
0
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag37))))
)
0
(none)
)
:exit (behavior ()
(let ((v1-0 self))
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-0 enemy-flags))))
)
0
(none)
)
:code (behavior ()
(ja-no-eval :group! tomb-baby-spider-attack0-stop-ja
:num! (seek! (the float (+ (-> (the-as art-joint-anim tomb-baby-spider-attack0-stop-ja) frames num-frames) -1)))
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
(when (not (enemy-method-96 self 6371.5557 #t))
(let ((v1-27 self))
(set! (-> v1-27 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-27 enemy-flags))))
)
0
(let ((t9-4 vector-normalize!)
(a0-7 (new 'stack-no-clear 'vector))
(a2-3 (-> self nav state))
(v1-30 (new 'stack-no-clear 'vector))
)
(set! (-> v1-30 quad) (-> a2-3 target-post quad))
(let* ((s5-0 (t9-4 (vector-! a0-7 v1-30 (-> self root-override2 trans)) 1.0))
(f30-0 (deg-diff (quaternion-y-angle (-> self root-override2 quat)) (vector-y-angle s5-0)))
)
(ja-no-eval :num! (loop!))
(cond
((< 0.0 f30-0)
(ja-channel-push! 1 (seconds 0.1))
(ja :group! tomb-baby-spider-turn-left-ja :num! min)
)
(else
(ja-channel-push! 1 (seconds 0.1))
(ja :group! tomb-baby-spider-turn-right-ja :num! min)
)
)
)
)
(until (enemy-method-96 self 910.2222 #t)
(ja-blend-eval)
(suspend)
(ja :num! (loop!))
)
(let ((v1-53 self))
(set! (-> v1-53 enemy-flags) (the-as enemy-flag (logclear (-> v1-53 enemy-flags) (enemy-flag enemy-flag37))))
)
0
)
(ja-channel-push! 1 (seconds 0.2))
(let ((gp-3 (-> self clock frame-counter))
(s5-1 (the int (* 300.0 (rand-vu-float-range 0.6 1.2))))
(f30-2 1.0)
)
(ja-no-eval :group! (-> self draw art-group data (-> self enemy-info-override idle-anim))
:num! (loop! f30-2)
:frame-num 0.0
)
(until (>= (- (-> self clock frame-counter) gp-3) s5-1)
(suspend)
(ja :num! (loop! f30-2))
)
)
(let ((gp-4 (-> self focus aware)))
(if (or (not (enemy-method-107 self)) (!= gp-4 3))
(go-stare self)
)
)
(go-virtual hostile)
(none)
)
:post (the-as (function none :behavior tomb-baby-spider) nav-enemy-face-focus-post)
)
;; failed to figure out what this is:
(defstate hostile (tomb-baby-spider)
:virtual #t
:trans (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) trans)))
(if t9-0
(t9-0)
)
)
(let ((a0-1 (enemy-method-107 self)))
(when a0-1
(let ((a0-2 (get-trans a0-1 0)))
(if (and (< (vector-vector-distance a0-2 (-> self root-override2 trans)) 20480.0)
(enemy-method-96 self 1274.3112 #t)
)
(go-virtual attack)
)
)
)
)
(none)
)
)
;; definition for method 77 of type tomb-baby-spider
(defmethod enemy-method-77 tomb-baby-spider ((obj tomb-baby-spider) (arg0 (pointer float)))
(let* ((a2-0 (the-as collide-shape-prim-group (-> obj root-override2 root-prim)))
(v1-2 (-> a2-0 child 3))
)
(dotimes (a3-0 3)
(set! (-> a2-0 child a3-0 local-sphere w) 819.2)
)
(set! (-> v1-2 prim-core action) (collide-action solid))
(set! (-> v1-2 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-2 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle player-list blocking-plane pusher)
)
)
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let ((v1-6 (-> obj skel root-channel 0)))
(set! (-> v1-6 frame-group) (the-as art-joint-anim (-> obj draw art-group data 20)))
(set! (-> v1-6 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 20)) frames num-frames) -1))
)
(set! (-> v1-6 param 1) (-> arg0 0))
(set! (-> v1-6 frame-num) 0.0)
(joint-control-channel-group! v1-6 (the-as art-joint-anim (-> obj draw art-group data 20)) num-func-seek!)
)
#t
)
(((knocked-type knocked-type-2) (knocked-type knocked-type-5))
(let ((v1-11 (-> obj skel root-channel 0)))
(set! (-> v1-11 frame-group) (the-as art-joint-anim (-> obj draw art-group data 17)))
(set! (-> v1-11 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 17)) frames num-frames) -1))
)
(set! (-> v1-11 param 1) (-> arg0 0))
(set! (-> v1-11 frame-num) 0.0)
(joint-control-channel-group! v1-11 (the-as art-joint-anim (-> obj draw art-group data 17)) num-func-seek!)
)
#t
)
(else
((method-of-type nav-enemy enemy-method-77) obj arg0)
)
)
)
;; definition for method 78 of type tomb-baby-spider
(defmethod enemy-method-78 tomb-baby-spider ((obj tomb-baby-spider) (arg0 (pointer float)))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let ((v1-3 (-> obj skel root-channel 0)))
(set! (-> v1-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 22)))
(set! (-> v1-3 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 22)) frames num-frames) -1))
)
(set! (-> v1-3 param 1) (-> arg0 0))
(set! (-> v1-3 frame-num) 0.0)
(joint-control-channel-group! v1-3 (the-as art-joint-anim (-> obj draw art-group data 22)) num-func-seek!)
)
#t
)
(((knocked-type knocked-type-2) (knocked-type knocked-type-5))
(let ((v1-8 (-> obj skel root-channel 0)))
(set! (-> v1-8 frame-group) (the-as art-joint-anim (-> obj draw art-group data 18)))
(set! (-> v1-8 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 18)) frames num-frames) -1))
)
(set! (-> v1-8 param 1) (-> arg0 0))
(set! (-> v1-8 frame-num) 0.0)
(joint-control-channel-group! v1-8 (the-as art-joint-anim (-> obj draw art-group data 18)) num-func-seek!)
)
#t
)
(else
((method-of-type nav-enemy enemy-method-78) obj arg0)
)
)
)
;; definition for method 79 of type tomb-baby-spider
(defmethod enemy-method-79 tomb-baby-spider ((obj tomb-baby-spider) (arg0 int) (arg1 enemy-knocked-info))
(case arg0
((3)
(let ((s4-0 (ja-done? 0)))
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group frames num-frames) -1)))
(set! (-> a0-3 param 1) (-> arg1 anim-speed))
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
)
(when s4-0
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
)
(((knocked-type knocked-type-2) (knocked-type knocked-type-5))
(let ((a0-7 (-> obj skel root-channel 0)))
(set! (-> a0-7 frame-group) (the-as art-joint-anim (-> obj draw art-group data 19)))
(set! (-> a0-7 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 19)) frames num-frames) -1))
)
(set! (-> a0-7 param 1) (-> arg1 anim-speed))
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group! a0-7 (the-as art-joint-anim (-> obj draw art-group data 19)) num-func-seek!)
)
)
(else
(let ((a0-8 (-> obj skel root-channel 0)))
(set! (-> a0-8 frame-group) (the-as art-joint-anim (-> obj draw art-group data 16)))
(set! (-> a0-8 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 16)) frames num-frames) -1))
)
(set! (-> a0-8 param 1) (-> arg1 anim-speed))
(set! (-> a0-8 frame-num) 0.0)
(joint-control-channel-group! a0-8 (the-as art-joint-anim (-> obj draw art-group data 16)) num-func-seek!)
)
)
)
(vector-reset! (-> obj root-override2 transv))
#t
)
)
)
((4)
(let ((s4-1 (ja-done? 0)))
(let ((a0-11 (-> obj skel root-channel 0)))
(set! (-> a0-11 param 0) (the float (+ (-> a0-11 frame-group frames num-frames) -1)))
(set! (-> a0-11 param 1) (-> arg1 anim-speed))
(joint-control-channel-group-eval! a0-11 (the-as art-joint-anim #f) num-func-seek!)
)
(when s4-1
(let ((v1-50 (-> obj root-override2 root-prim)))
(set! (-> (the-as collide-shape-prim-group v1-50) child 0 local-sphere w) 1638.4)
(set! (-> (the-as collide-shape-prim-group v1-50) child 1 local-sphere w) 1638.4)
(set! (-> (the-as collide-shape-prim-group v1-50) child 2 local-sphere w) 3276.8)
(set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core action) (collide-action))
(set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core collide-with) (collide-spec))
)
0
)
s4-1
)
)
(else
((method-of-type nav-enemy enemy-method-79) obj arg0 arg1)
)
)
)
;; definition for method 104 of type tomb-baby-spider
(defmethod enemy-method-104 tomb-baby-spider ((obj tomb-baby-spider) (arg0 process) (arg1 uint) (arg2 uint))
(let* ((s1-0 arg0)
(s2-0 (if (type? s1-0 process-focusable)
s1-0
)
)
(s1-1 *target*)
(v1-0 (if (type? s1-1 process-focusable)
s1-1
)
)
(f0-0 1.0)
)
(if (and (= s2-0 v1-0) (logtest? (focus-status indax) (-> v1-0 focus-status)))
(set! f0-0 0.6)
)
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-5 from) (process->ppointer self))
(set! (-> a1-5 num-params) 2)
(set! (-> a1-5 message) 'attack)
(set! (-> a1-5 param 0) arg1)
(let ((v1-9 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
(set! (-> v1-9 id) arg2)
(set! (-> v1-9 shove-back) (* f0-0 (-> obj enemy-info-override attack-shove-back)))
(set! (-> v1-9 shove-up) (* f0-0 (-> obj enemy-info-override attack-shove-up)))
(set! (-> v1-9 mode) (-> obj enemy-info-override attack-mode))
(set! (-> v1-9 damage) (the float (-> obj enemy-info-override attack-damage)))
(set! (-> v1-9 knock) (the-as uint 8))
(set! (-> a1-5 param 1) (the-as uint v1-9))
)
(when (send-event-function arg0 a1-5)
(enemy-method-105 obj arg0)
#t
)
)
)
)
;; definition for method 114 of type tomb-baby-spider
;; WARN: Return type mismatch int vs none.
(defmethod enemy-method-114 tomb-baby-spider ((obj tomb-baby-spider))
"@abstract"
(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 ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 5) 0)))
(set! (-> s5-0 total-prims) (the-as uint 6))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s4-0 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 409.6 0.0 7782.4)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-13 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-13 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-13 prim-core action) (collide-action solid no-standon))
(set! (-> v1-13 transform-index) 3)
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 1638.4)
)
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-15 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-15 prim-core action) (collide-action solid deadly no-standon))
(set! (-> v1-15 transform-index) 24)
(set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 1638.4)
)
(let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-17 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-17 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-17 prim-core action) (collide-action solid no-standon))
(set! (-> v1-17 transform-index) 4)
(set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 3276.8)
)
(set-vector!
(-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere)
0.0
2867.2
0.0
3276.8
)
(let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-21 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-21 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-21 prim-core action) (collide-action solid no-standon))
(set! (-> v1-21 transform-index) 5)
(set-vector! (-> v1-21 local-sphere) 0.0 4096.0 -1228.8 1638.4)
)
(set! (-> s5-0 nav-radius) 3686.4)
(let ((v1-23 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> obj root-override2) s5-0)
)
0
(none)
)
;; definition for method 115 of type tomb-baby-spider
(defmethod enemy-method-115 tomb-baby-spider ((obj tomb-baby-spider))
"@abstract"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-tomb-baby-spider" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(enemy-method-113 obj *tomb-baby-spider-nav-enemy-info*)
(none)
)
;; definition of type dig-spider
(deftype dig-spider (tomb-baby-spider)
()
:heap-base #x1e0
:method-count-assert 180
:size-assert #x25c
:flag-assert #xb401e0025c
)
;; definition for method 3 of type dig-spider
(defmethod inspect dig-spider ((obj dig-spider))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type tomb-baby-spider inspect)))
(t9-0 obj)
)
(label cfg-4)
obj
)
;; failed to figure out what this is:
0
+946
View File
@@ -0,0 +1,946 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type hopper
(deftype hopper (nav-enemy)
((speed-y float :offset-assert 604)
(accel-y float :offset-assert 608)
(next-jump-time int32 :offset-assert 612)
(path-intro path-control :offset-assert 616)
(can-go-knocked? symbol :offset-assert 620)
(land-anim-index int32 :offset-assert 624)
(step-num int32 :offset-assert 628)
(best-point vector :inline :offset-assert 640)
(best-score float :offset-assert 656)
(origin vector :inline :offset-assert 672)
(direction vector :inline :offset-assert 688)
(jump-dist float :offset-assert 704)
(side float :offset-assert 708)
(jump-start-anim uint32 :offset-assert 712)
(jump-air-anim uint32 :offset-assert 716)
(jump-land-anim uint32 :offset-assert 720)
(jump-height-min float :offset-assert 724)
(jump-anim-start-frame float :offset-assert 728)
(minimap connection-minimap :offset-assert 732)
)
:heap-base #x260
:method-count-assert 180
:size-assert #x2e0
:flag-assert #xb4026002e0
(:methods
(hopper-method-178 (_type_) symbol 178)
(hopper-method-179 (_type_) none 179)
)
)
;; definition for method 3 of type hopper
(defmethod inspect hopper ((obj hopper))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type nav-enemy inspect)))
(t9-0 obj)
)
(format #t "~2Tspeed-y: ~f~%" (-> obj speed-y))
(format #t "~2Taccel-y: ~f~%" (-> obj accel-y))
(format #t "~2Tnext-jump-time: ~D~%" (-> obj next-jump-time))
(format #t "~2Tpath-intro: ~A~%" (-> obj path-intro))
(format #t "~2Tcan-go-knocked?: ~A~%" (-> obj can-go-knocked?))
(format #t "~2Tland-anim-index: ~D~%" (-> obj land-anim-index))
(format #t "~2Tstep-num: ~D~%" (-> obj step-num))
(format #t "~2Tbest-point: #<vector @ #x~X>~%" (-> obj best-point))
(format #t "~2Tbest-score: ~f~%" (-> obj best-score))
(format #t "~2Torigin: #<vector @ #x~X>~%" (-> obj origin))
(format #t "~2Tdirection: #<vector @ #x~X>~%" (-> obj direction))
(format #t "~2Tjump-dist: ~f~%" (-> obj jump-dist))
(format #t "~2Tside: ~f~%" (-> obj side))
(format #t "~2Tjump-start-anim: ~D~%" (-> obj jump-start-anim))
(format #t "~2Tjump-air-anim: ~D~%" (-> obj jump-air-anim))
(format #t "~2Tjump-land-anim: ~D~%" (-> obj jump-land-anim))
(format #t "~2Tjump-height-min: ~f~%" (-> obj jump-height-min))
(format #t "~2Tjump-anim-start-frame: ~f~%" (-> obj jump-anim-start-frame))
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> obj minimap))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-hopper hopper hopper-lod0-jg hopper-idle-ja
((hopper-lod0-mg (meters 20)) (hopper-lod1-mg (meters 999999)))
:bounds (static-spherem 0 2.25 -0.7 6.5)
:shadow hopper-shadow-mg
)
;; definition of type hopper-anim-info
(deftype hopper-anim-info (structure)
((hit-anim-index int32 :offset-assert 0)
(land-anim-index int32 :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; definition for method 3 of type hopper-anim-info
(defmethod inspect hopper-anim-info ((obj hopper-anim-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'hopper-anim-info)
(format #t "~1Thit-anim-index: ~D~%" (-> obj hit-anim-index))
(format #t "~1Tland-anim-index: ~D~%" (-> obj land-anim-index))
(label cfg-4)
obj
)
;; definition of type hopper-global-info
(deftype hopper-global-info (basic)
((prev-yellow-hit int8 :offset-assert 4)
(prev-blue-hit int8 :offset-assert 5)
(yellow-hit-anim hopper-anim-info 3 :inline :offset-assert 8)
(blue-hit-anim hopper-anim-info 3 :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x38
:flag-assert #x900000038
)
;; definition for method 3 of type hopper-global-info
(defmethod inspect hopper-global-info ((obj hopper-global-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tprev-yellow-hit: ~D~%" (-> obj prev-yellow-hit))
(format #t "~1Tprev-blue-hit: ~D~%" (-> obj prev-blue-hit))
(format #t "~1Tyellow-hit-anim[3] @ #x~X~%" (-> obj yellow-hit-anim))
(format #t "~1Tblue-hit-anim[3] @ #x~X~%" (-> obj blue-hit-anim))
(label cfg-4)
obj
)
;; definition for symbol *hopper-global-info*, type hopper-global-info
(define *hopper-global-info* (new 'static 'hopper-global-info
:yellow-hit-anim (new 'static 'inline-array hopper-anim-info 3
(new 'static 'hopper-anim-info :hit-anim-index 25 :land-anim-index 26)
(new 'static 'hopper-anim-info :hit-anim-index 27 :land-anim-index 28)
(new 'static 'hopper-anim-info :hit-anim-index 29 :land-anim-index 30)
)
:blue-hit-anim (new 'static 'inline-array hopper-anim-info 3
(new 'static 'hopper-anim-info :hit-anim-index 21 :land-anim-index 24)
(new 'static 'hopper-anim-info :hit-anim-index 22 :land-anim-index 24)
(new 'static 'hopper-anim-info :hit-anim-index 23 :land-anim-index 24)
)
)
)
;; definition for method 77 of type hopper
(defmethod enemy-method-77 hopper ((obj hopper) (arg0 (pointer float)))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let* ((a2-0 (ash 1 (-> *hopper-global-info* prev-blue-hit)))
(v1-3 (enemy-method-120 obj 3 a2-0))
(a1-5 (-> obj draw art-group data (-> *hopper-global-info* blue-hit-anim v1-3 hit-anim-index)))
)
(set! (-> *hopper-global-info* prev-blue-hit) v1-3)
(let ((a0-12 (-> obj skel root-channel 0)))
(set! (-> a0-12 frame-group) (the-as art-joint-anim a1-5))
(set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim a1-5) frames num-frames) -1)))
(set! (-> a0-12 param 1) 1.0)
(set! (-> a0-12 frame-num) 0.0)
(joint-control-channel-group! a0-12 (the-as art-joint-anim a1-5) num-func-seek!)
)
)
)
(else
(ja-channel-push! 1 (seconds 0.1))
(let* ((a2-2 (ash 1 (-> *hopper-global-info* prev-yellow-hit)))
(v1-13 (enemy-method-120 obj 3 a2-2))
(a1-11 (-> obj draw art-group data (-> *hopper-global-info* yellow-hit-anim v1-13 hit-anim-index)))
)
(set! (-> obj land-anim-index) (-> *hopper-global-info* yellow-hit-anim v1-13 land-anim-index))
(set! (-> *hopper-global-info* prev-yellow-hit) v1-13)
(let ((a0-27 (-> obj skel root-channel 0)))
(set! (-> a0-27 frame-group) (the-as art-joint-anim a1-11))
(set! (-> a0-27 param 0) (the float (+ (-> (the-as art-joint-anim a1-11) frames num-frames) -1)))
(set! (-> a0-27 param 1) (-> arg0 0))
(set! (-> a0-27 frame-num) 0.0)
(joint-control-channel-group! a0-27 (the-as art-joint-anim a1-11) num-func-seek!)
)
)
)
)
#t
)
;; definition for method 78 of type hopper
(defmethod enemy-method-78 hopper ((obj hopper) (arg0 (pointer float)))
(cond
((= (-> obj incoming knocked-type) (knocked-type knocked-type-6))
(when (>= (-> obj incoming blue-juggle-count) (the-as uint 2))
(let ((s4-0 (-> obj draw art-group data 24)))
(ja-channel-push! 1 (seconds 0.1))
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0))
(set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) frames num-frames) -1)))
(set! (-> a0-3 param 1) (-> arg0 0))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim s4-0) num-func-seek!)
)
)
#t
)
#f
)
(else
(ja-channel-push! 1 (seconds 0.1))
(let ((a0-5 (-> obj skel root-channel 0)))
(set! (-> a0-5 frame-group) (the-as art-joint-anim (-> obj draw art-group data (-> obj land-anim-index))))
(set! (-> a0-5 param 0)
(the float
(+ (-> (the-as art-joint-anim (-> obj draw art-group data (-> obj land-anim-index))) frames num-frames) -1)
)
)
(set! (-> a0-5 param 1) (-> arg0 0))
(set! (-> a0-5 frame-num) 0.0)
(joint-control-channel-group!
a0-5
(the-as art-joint-anim (-> obj draw art-group data (-> obj land-anim-index)))
num-func-seek!
)
)
#t
)
)
)
;; definition for symbol *hopper-nav-enemy-info*, type nav-enemy-info
(define *hopper-nav-enemy-info*
(new 'static 'nav-enemy-info
:use-die-falling #t
:use-victory #f
:use-jump-blocked #f
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #t
:hover-if-no-ground #f
:idle-anim-script (new 'static 'array uint32 8 #x5010401 #x1010501 #x5010401 #x1010601 #x0 #x0 #x0 #x0)
:idle-anim 4
:notice-anim 7
:hostile-anim 4
:hit-anim 4
:knocked-anim 25
:knocked-land-anim 26
:die-anim 19
:die-falling-anim 20
:victory-anim -1
:jump-wind-up-anim -1
:jump-in-air-anim -1
:jump-land-anim -1
:neck-joint 5
:look-at-joint 5
:bullseye-joint 4
:sound-hit (static-sound-name "hopper-hit")
:sound-die (static-sound-name "hopper-die")
:notice-distance (meters 40)
:notice-distance-delta (meters 40)
:proximity-notice-distance (meters 4)
:default-hit-points 1
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:penetrate-knocked #xffffffffffffffff
:movement-gravity (meters -100)
:friction 0.8
:attack-shove-back (meters 3)
:attack-shove-up (meters 2)
:attack-mode 'generic
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-seek-ry-clamp 4551.1113
:knocked-soft-vxz-lo 72089.6
:knocked-soft-vxz-hi 108134.4
:knocked-soft-vy-lo 81920.0
:knocked-soft-vy-hi 122880.0
:knocked-medium-vxz-lo 147456.0
:knocked-medium-vxz-hi 196608.0
:knocked-medium-vy-lo 135168.0
:knocked-medium-vy-hi 151552.0
:knocked-hard-vxz-lo 78643.2
:knocked-hard-vxz-hi 117964.8
:knocked-hard-vy-lo 183500.8
:knocked-hard-vy-hi 209715.2
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 24576.0
:knocked-red-vxz-hi 196608.0
:knocked-red-vy-lo 94208.0
:knocked-red-vy-hi 151552.0
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 49152.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 81920.0
:shadow-size (meters 2)
:shadow-max-y (meters 1)
:shadow-min-y (meters -1)
:shadow-locus-dist (meters 150)
:gem-joint 5
:gem-seg #x2
:gem-no-seg #x4
:gem-offset (new 'static 'sphere :y 1843.2 :z 1884.16 :r 163840.0)
:callback-info #f
:use-momentum #f
:use-frustration #t
:use-stop-chase #f
:use-circling #f
:use-pacing #f
:walk-anim 4
:turn-anim 9
:run-anim 13
:taunt-anim -1
:run-travel-speed (meters 1)
:run-acceleration (meters 1)
:run-turning-acceleration (meters 2)
:walk-travel-speed (meters 1)
:walk-acceleration (meters 1)
:walk-turning-acceleration (meters 3)
:maximum-rotation-rate (degrees 720.0)
:notice-nav-radius (meters 2)
:frustration-distance (meters 8)
:frustration-time (seconds 4)
:blocked-time (seconds 0.3)
:circle-dist-lo 20480.0
:circle-dist-hi 61440.0
:nav-mesh #f
)
)
;; failed to figure out what this is:
(set! (-> *hopper-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
;; definition for method 73 of type hopper
(defmethod enemy-method-73 hopper ((obj hopper))
(cond
((-> obj can-go-knocked?)
(set! (-> obj can-go-knocked?) #f)
(go (method-of-object obj knocked))
)
(else
((method-of-type nav-enemy enemy-method-73) obj)
)
)
(none)
)
;; definition for method 90 of type hopper
;; INFO: Used lq/sq
(defmethod enemy-method-90 hopper ((obj hopper) (arg0 int) (arg1 enemy-jump-info))
(when (= (-> obj jump-why) 2)
(cond
((zero? arg0)
(logior! (-> obj focus-status) (focus-status touch-water under-water))
)
(else
(when (logtest? (-> obj focus-status) (focus-status touch-water))
(let ((s3-0 (new 'stack-no-clear 'water-info)))
(water-info-init! (-> obj root-override2) s3-0 (collide-action solid semi-solid))
(let ((v1-9 #f))
(cond
((not (logtest? (water-flags touch-water) (-> s3-0 flags)))
(if (logtest? (-> obj focus-status) (focus-status under-water))
(set! v1-9 #t)
)
(logclear! (-> obj focus-status) (focus-status touch-water under-water))
)
((logtest? (-> obj focus-status) (focus-status under-water))
(let ((f0-1 (+ 11264.0 (-> obj root-override2 trans y))))
(if (< (-> s3-0 trans y) f0-1)
(set! v1-9 #t)
)
)
)
)
(when v1-9
(logclear! (-> obj focus-status) (focus-status under-water))
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> obj root-override2 trans quad))
(when (logtest? (water-flags touch-water) (-> s3-0 flags))
(set! (-> s2-0 y) (-> s3-0 trans y))
(let ((s3-1 (get-process *default-dead-pool* part-tracker #x4000)))
(when s3-1
(let ((t9-2 (method-of-type part-tracker activate)))
(t9-2
(the-as part-tracker s3-1)
*entity-pool*
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(let ((t9-3 run-function-in-process)
(a0-26 s3-1)
(a1-6 part-tracker-init)
(a2-6 (-> *part-group-id-table* 121))
(a3-1 0)
(t0-0 #f)
(t1-0 #f)
(t2-0 #f)
(t3-0 *launch-matrix*)
)
(set! (-> t3-0 trans quad) (-> s2-0 quad))
((the-as (function object object object object object object object object none) t9-3)
a0-26
a1-6
a2-6
a3-1
t0-0
t1-0
t2-0
t3-0
)
)
(-> s3-1 ppointer)
)
)
(sound-play "splash-out")
)
)
)
)
)
)
)
)
)
((method-of-type nav-enemy enemy-method-90) obj arg0 arg1)
)
;; definition for method 89 of type hopper
(defmethod enemy-method-89 hopper ((obj hopper) (arg0 enemy-jump-info))
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-2 (-> obj draw art-group data (-> obj jump-start-anim)))
(a0-4 (-> obj skel root-channel 0))
)
(set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2))
(set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1)))
(set! (-> a0-4 param 1) (-> arg0 anim-speed))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!)
)
#t
)
;; definition for method 87 of type hopper
(defmethod enemy-method-87 hopper ((obj hopper) (arg0 enemy-jump-info))
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-2 (-> obj draw art-group data (-> obj jump-air-anim)))
(a0-4 (-> obj skel root-channel 0))
)
(set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2))
(set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1)))
(set! (-> a0-4 param 1) (-> arg0 anim-speed))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!)
)
#t
)
;; definition for method 88 of type hopper
(defmethod enemy-method-88 hopper ((obj hopper) (arg0 enemy-jump-info))
(ja-channel-push! 1 (seconds 0.075))
(let ((a1-2 (-> obj draw art-group data (-> obj jump-land-anim)))
(a0-4 (-> obj skel root-channel 0))
)
(set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2))
(set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1)))
(set! (-> a0-4 param 1) (-> arg0 anim-speed))
(set! (-> a0-4 frame-num) 0.0)
(joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!)
)
#t
)
;; failed to figure out what this is:
(defstate jump (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy jump) enter)))
(if t9-0
(t9-0)
)
)
(none)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy jump) exit)))
(if t9-0
(t9-0)
)
)
(let ((v1-5 (-> self draw shadow-ctrl)))
(logclear! (-> v1-5 settings flags) (shadow-flags shdf03))
(let ((a0-2 v1-5))
(set! (-> a0-2 settings top-plane w) (- 4096.0))
)
0
(set! (-> v1-5 settings bot-plane w) (- -4096.0))
)
0
(none)
)
:trans (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy jump) trans)))
(if t9-0
(t9-0)
)
)
(let ((v1-5 (-> self draw shadow-ctrl)))
(logior! (-> v1-5 settings flags) (shadow-flags shdf03))
(let ((a0-2 v1-5))
(set! (-> a0-2 settings bot-plane w)
(- (+ (- -4096.0 (-> self root-override2 trans y)) (-> self root-override2 gspot-pos y)))
)
)
0
(set! (-> v1-5 settings top-plane w)
(- (+ (- 8192.0 (-> self root-override2 trans y)) (-> self root-override2 gspot-pos y)))
)
)
0
(none)
)
)
;; definition for method 178 of type hopper
;; INFO: Used lq/sq
(defmethod hopper-method-178 hopper ((obj hopper))
(local-vars (sv-752 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
)
(init-vf0-vector)
(+! (-> obj step-num) -1)
(cond
((>= (-> obj step-num) 0)
(let ((s3-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector))
)
(vector-rotate-around-y! s3-0 (-> obj direction) (* 182.04445 (the float (+ (* (-> obj step-num) 16) -135))))
(let ((a1-1 s5-0))
(let ((v1-7 (-> obj origin)))
(let ((a0-2 s3-0))
(let ((a2-1 (-> obj jump-dist)))
(.mov vf7 a2-1)
)
(.lvf vf5 (&-> a0-2 quad))
)
(.lvf vf4 (&-> v1-7 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-1 quad) vf6)
)
(let ((v1-8 (-> obj nav))
(a0-3 s5-0)
(a1-2 (new 'stack-no-clear 'nav-find-poly-parms))
)
(vector-! (-> a1-2 point) a0-3 (-> v1-8 state mesh bounds))
(set! (-> a1-2 y-threshold) (-> v1-8 nearest-y-threshold))
(set! (-> a1-2 ignore) (the-as uint 2))
(let ((s4-0 (find-poly-containing-point-local (-> v1-8 state mesh) a1-2)))
(when s4-0
(let ((f30-0 (vector-dot s3-0 (-> obj direction))))
(new 'stack-no-clear 'vector)
(let ((a1-3 (new 'stack-no-clear 'vector)))
(set! (-> a1-3 quad) (-> s5-0 quad))
(set! (-> a1-3 w) 6144.0)
(when (not (add-root-sphere-to-hash! (-> obj nav) a1-3 #x8006c))
(when (< (-> obj best-score) f30-0)
(set! (-> obj best-score) f30-0)
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! sv-752 (new 'stack-no-clear 'vector))
(let ((s3-1 (new 'stack 'collide-query)))
(let ((s0-0 (-> obj nav))
(s1-0 s2-0)
)
(let* ((v1-21 s5-0)
(a0-10 (-> s0-0 state mesh))
(t9-4 (method-of-object a0-10 project-point-onto-plane-of-poly-local))
(a2-5 s1-0)
(t0-1 (vector-! (new 'stack-no-clear 'vector) v1-21 (-> s0-0 state mesh bounds)))
)
(t9-4 a0-10 s4-0 a2-5 sv-752 t0-1)
)
(vector+! s1-0 s1-0 (-> s0-0 state mesh bounds))
)
0
(set! (-> s5-0 y) (-> s2-0 y))
(if (enemy-method-126 obj s3-1 s5-0 (collide-spec backgnd) 8192.0 81920.0 1024.0)
(set! (-> s5-0 y) (-> s3-1 best-other-tri intersect y))
)
)
)
(set! (-> obj best-point quad) (-> s5-0 quad))
)
)
)
)
)
)
)
)
#t
)
(else
#f
)
)
)
)
;; failed to figure out what this is:
(defstate stare (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy stare) enter)))
(if t9-0
(t9-0)
)
)
(let ((v1-4 self))
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag enemy-flag37))))
)
0
(none)
)
)
;; definition for symbol *hopper-next-jump-time*, type time-frame
(define *hopper-next-jump-time* (the-as time-frame 0))
;; failed to figure out what this is:
(defstate hostile (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) enter)))
(if t9-0
(t9-0)
)
)
(let ((v1-4 self))
(set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-4 nav callback-info) *nav-enemy-null-callback-info*)
)
0
(let ((v1-7 self))
(set! (-> v1-7 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-7 enemy-flags))))
)
0
(set! (-> self speed-y) 0.0)
(set! (-> self accel-y) 0.0)
(set! (-> self next-jump-time) (the-as int (+ (-> self clock frame-counter) (get-rand-int-range self 0 120))))
(set! (-> self step-num) 0)
(set! (-> self best-score) -2.0)
(none)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) exit)))
(if t9-0
(t9-0)
)
)
(none)
)
:post (the-as (function none :behavior hopper) nav-enemy-simple-post)
)
;; failed to figure out what this is:
(defstate active (hopper)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy active) enter)))
(if t9-0
(t9-0)
)
)
(none)
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (get-rand-float-range self 0.9 1.1)))
(until #f
(ja-no-eval :group! hopper-idle-ja
:num! (seek! (the float (+ (-> (the-as art-joint-anim hopper-idle-ja) frames num-frames) -1)) f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
)
)
#f
(none)
)
:post (the-as (function none :behavior hopper) nav-enemy-simple-post)
)
;; failed to figure out what this is:
(defstate notice (hopper)
:virtual #t
:code (behavior ()
(ja-channel-push! 1 (seconds 0.075))
(let ((f30-0 (get-rand-float-range self 0.8 1.2))
(gp-0 (new 'stack-no-clear 'vector))
)
(if (zero? (get-rand-int self 2))
(ja :group! hopper-notice-ja)
(ja :group! hopper-notice-alt-ja)
)
(ja-no-eval :group! (ja-group)
:num! (seek! (the float (+ (-> (ja-group) frames num-frames) -1)) f30-0)
:frame-num 0.0
)
(until (ja-done? 0)
(let ((a1-4 (-> self nav state)))
(set! (-> gp-0 quad) (-> a1-4 travel quad))
)
(seek-toward-heading-vec! (-> self root-override2) gp-0 (-> self nav max-rotation-rate) (seconds 0.02))
(suspend)
(ja :num! (seek! max f30-0))
)
)
(enemy-method-72 self)
(none)
)
)
;; failed to figure out what this is:
(defstate ambush (hopper)
:virtual #t
:enter (behavior ()
(when (logtest? (-> self enemy-flags) (enemy-flag auto-reset-penetrate))
(logclear! (-> self enemy-flags) (enemy-flag auto-reset-penetrate))
(let ((gp-0 (-> self on-notice)))
(if gp-0
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (-> self root-override2 trans))
(the-as pair gp-0)
)
)
)
)
(let ((v1-12 (-> self root-override2 root-prim)))
(set! (-> self root-override2 backup-collide-as) (-> v1-12 prim-core collide-as))
(set! (-> self root-override2 backup-collide-with) (-> v1-12 prim-core collide-with))
)
(let ((v1-15 (-> self root-override2 root-prim)))
(set! (-> v1-15 prim-core collide-as) (collide-spec))
(set! (-> v1-15 prim-core collide-with) (collide-spec))
)
0
(when (handle->process (-> self focus handle))
(let ((gp-1 (-> self root-override2))
(s5-0 (new 'stack-no-clear 'vector))
)
(let ((s4-0 (new 'stack-no-clear 'vector)))
0.0
(get-point-in-path! (-> self path-intro) s5-0 0.0 'exact)
(set! (-> s5-0 y) (+ -16384.0 (-> s5-0 y)))
(get-point-in-path! (-> self path-intro) s4-0 1.0 'exact)
(let ((f0-3 (deg-diff
(quaternion-y-angle (-> gp-1 quat))
(vector-y-angle (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s4-0 s5-0) 1.0))
)
)
)
(quaternion-rotate-y! (-> gp-1 quat) (-> gp-1 quat) f0-3)
)
)
(set! (-> gp-1 trans quad) (-> s5-0 quad))
)
)
(none)
)
:exit (behavior ()
(let ((v1-1 (-> self root-override2 root-prim)))
(set! (-> v1-1 prim-core collide-as) (-> self root-override2 backup-collide-as))
(set! (-> v1-1 prim-core collide-with) (-> self root-override2 backup-collide-with))
)
(none)
)
:trans (behavior ()
'()
(none)
)
:code (behavior ()
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((s5-0 (new 'stack 'collide-query)))
(get-point-in-path! (-> self path-intro) gp-0 1.0 'exact)
(if (enemy-method-126 self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0)
(set! (-> gp-0 y) (-> s5-0 best-other-tri intersect y))
)
)
(set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag vulnerable))))
(send-event self 'jump 2 gp-0)
)
(go-virtual hostile)
(none)
)
)
;; definition for method 132 of type hopper
(defmethod enemy-method-132 hopper ((obj hopper))
(when (-> obj minimap)
(logior! (-> obj minimap flags) (minimap-flag fade-out))
(set! (-> obj minimap) #f)
)
((the-as (function enemy none) (find-parent-method hopper 132)) obj)
(none)
)
;; definition for method 7 of type hopper
;; WARN: Return type mismatch process-focusable vs hopper.
(defmethod relocate hopper ((obj hopper) (arg0 int))
(if (nonzero? (-> obj path-intro))
(&+! (-> obj path-intro) arg0)
)
(the-as
hopper
((the-as (function process-focusable int process-focusable) (find-parent-method hopper 7)) obj arg0)
)
)
;; definition for method 114 of type hopper
;; WARN: Return type mismatch int vs none.
(defmethod enemy-method-114 hopper ((obj hopper))
"@abstract"
(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 ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s5-0 total-prims) (the-as uint 3))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s4-0 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon))
(set! (-> s4-0 transform-index) 12)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 9216.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-14 prim-core collide-with)
(collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list)
)
(set! (-> v1-14 prim-core action) (collide-action solid no-standon))
(set-vector! (-> v1-14 local-sphere) 0.0 3686.4 0.0 3686.4)
)
(let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-16 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-16 prim-core action) (collide-action deadly))
(set! (-> v1-16 transform-index) 5)
(set-vector! (-> v1-16 local-sphere) 0.0 0.0 819.2 3276.8)
)
(set! (-> s5-0 nav-radius) 4096.0)
(let ((v1-18 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> obj root-override2) s5-0)
)
0
(none)
)
;; definition for method 115 of type hopper
;; WARN: Return type mismatch int vs none.
(defmethod enemy-method-115 hopper ((obj hopper))
"@abstract"
(stack-size-set! (-> obj main-thread) 256)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-hopper" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> obj skel generate-frame-function) create-interpolated2-joint-animation-frame)
(enemy-method-113 obj *hopper-nav-enemy-info*)
(set! (-> obj can-go-knocked?) #t)
(let ((v1-9 (-> obj neck)))
(set! (-> v1-9 up) (the-as uint 1))
(set! (-> v1-9 nose) (the-as uint 2))
(set! (-> v1-9 ear) (the-as uint 0))
(set-vector! (-> v1-9 twist-max) 10922.667 12743.111 0.0 1.0)
(set! (-> v1-9 ignore-angle) 18204.445)
)
(set! (-> obj jump-start-anim) (the-as uint 10))
(set! (-> obj jump-air-anim) (the-as uint 13))
(set! (-> obj jump-land-anim) (the-as uint 14))
(set! (-> obj jump-height-min) 12288.0)
(set! (-> obj jump-anim-start-frame) 8.0)
(set! (-> obj land-anim-index) 26)
(set! (-> obj side) (get-rand-float-range obj -1.5 1.5))
(when (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
(set! (-> obj path-intro) (new 'process 'path-control obj 'intro 0.0 (-> obj entity) #f))
(if (-> obj path-intro)
(logior! (-> obj path-intro flags) (path-control-flag display draw-line draw-point draw-text))
)
)
(add-connection *part-engine* obj 5 obj 318 (new 'static 'vector :x 1392.64 :y 491.52 :z 1638.4 :w 163840.0))
(add-connection *part-engine* obj 5 obj 318 (new 'static 'vector :x -1392.64 :y 491.52 :z 1638.4 :w 163840.0))
(logior! (-> obj nav flags) (nav-control-flag output-sphere-hash))
(let ((v1-34 (-> obj nav)))
(set! (-> v1-34 speed-scale) 1.0)
)
0
(set-gravity-length (-> obj root-override2 dynam) 327680.0)
(let ((v1-39 (-> obj nav)))
(set! (-> v1-39 nav-cull-radius) 61440.0)
)
0
(set! (-> obj minimap)
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
)
0
(none)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-1
View File
@@ -389,7 +389,6 @@
((method-of-type nav-enemy enemy-method-74) obj arg0 arg1 arg2 arg3)
)
)
(none)
)
;; definition for method 66 of type grunt
File diff suppressed because it is too large Load Diff
+37 -28
View File
@@ -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)
)
)
File diff suppressed because it is too large Load Diff
+5 -8
View File
@@ -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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+288
View File
@@ -0,0 +1,288 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type rhino-wall
(deftype rhino-wall (process-focusable)
((anim spool-anim :offset-assert 204)
(art-name string :offset-assert 208)
(id int8 :offset-assert 212)
)
:heap-base #x60
:method-count-assert 31
:size-assert #xd5
:flag-assert #x1f006000d5
(:methods
(unbroken () _type_ :state 27)
(hit () _type_ :state 28)
(broken () _type_ :state 29)
(rhino-wall-method-30 (_type_) none 30)
)
)
;; definition for method 3 of type rhino-wall
(defmethod inspect rhino-wall ((obj rhino-wall))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 obj)
)
(format #t "~2Tanim: ~A~%" (-> obj anim))
(format #t "~2Tart-name: ~A~%" (-> obj art-name))
(format #t "~2Tid: ~D~%" (-> obj id))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defskelgroup skel-rhino-wall-1 rhino-wall rhino-wall-1-lod0-jg rhino-wall-1-idle-ja
((rhino-wall-1-lod0-mg (meters 999999)))
:bounds (static-spherem 0.3 9 -3 11)
)
;; failed to figure out what this is:
(defskelgroup skel-rhino-wall-2 rhino-wall rhino-wall-2-lod0-jg rhino-wall-2-idle-ja
((rhino-wall-2-lod0-mg (meters 999999)))
:bounds (static-spherem 0.3 13.5 0 14.5)
)
;; definition for method 30 of type rhino-wall
;; WARN: Return type mismatch vector vs none.
(defmethod rhino-wall-method-30 rhino-wall ((obj rhino-wall))
(let ((v1-1 (-> obj root-override root-prim)))
(countdown (a1-0 (-> v1-1 specific 0))
(let ((a2-1 (-> (the-as collide-shape-prim-group v1-1) child a1-0)))
(cond
((zero? a1-0)
(set! (-> a2-1 prim-core collide-as) (collide-spec))
0
)
(else
(set! (-> a2-1 prim-core collide-as) (collide-spec obstacle))
)
)
)
)
(case (-> obj id)
((1)
(set! (-> obj draw origin-joint-index) (the-as uint 2))
(set-vector! (-> obj draw bounds) 0.0 0.0 81920.0 131072.0)
(set! (-> v1-1 transform-index) 2)
(set-vector! (-> v1-1 local-sphere) 0.0 0.0 81920.0 122880.0)
)
((2)
(set! (-> obj draw origin-joint-index) (the-as uint 2))
(set-vector! (-> obj draw bounds) 0.0 0.0 81920.0 131072.0)
(set! (-> v1-1 transform-index) 2)
(set-vector! (-> v1-1 local-sphere) 0.0 0.0 81920.0 122880.0)
)
)
)
(none)
)
;; failed to figure out what this is:
(defstate unbroken (rhino-wall)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('trigger)
(go-virtual hit)
)
)
)
:code (behavior ()
(add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0)
(transform-post)
(suspend)
(transform-post)
(sleep-code)
(none)
)
)
;; failed to figure out what this is:
(defstate hit (rhino-wall)
:virtual #t
:post (the-as (function none :behavior rhino-wall) transform-post)
)
;; failed to figure out what this is:
(defstate broken (rhino-wall)
:virtual #t
)
;; definition for method 11 of type rhino-wall
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! rhino-wall ((obj rhino-wall) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(set! (-> obj mask) (logior (process-mask collectable) (-> obj mask)))
(let ((s3-0 (res-lump-struct (-> obj entity) 'art-name structure))
(s4-0 (art-group-get-by-name *level* "skel-rhino-wall-1" (the-as (pointer uint32) #f)))
)
(set! (-> obj art-name) (the-as string s3-0))
(cond
((string= (the-as string s3-0) "rhino-wall-1")
(set! (-> obj id) 1)
(let ((s4-1 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-1 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-1 reaction) cshape-reaction-default)
(set! (-> s4-1 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s4-1 penetrated-by) (penetrate))
(let ((s3-1 (new 'process 'collide-shape-prim-group s4-1 (the-as uint 9) 0)))
(set! (-> s4-1 total-prims) (the-as uint 10))
(set! (-> s3-1 prim-core collide-as) (collide-spec obstacle))
(set! (-> s3-1 prim-core action) (collide-action solid))
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 14336.0 -8192.0 0.0 40960.0)
(set! (-> s4-1 root-prim) s3-1)
)
(let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-19 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-19 prim-core action) (collide-action solid))
(set! (-> v1-19 transform-index) 3)
(set-vector! (-> v1-19 local-sphere) 14336.0 -8192.0 0.0 40960.0)
)
(let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 8) (the-as uint 0))))
(set! (-> v1-21 prim-core action) (collide-action solid))
(set! (-> v1-21 transform-index) 43)
(set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 32768.0)
)
(let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-23 prim-core action) (collide-action solid))
(set! (-> v1-23 transform-index) 7)
(set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 5) (the-as uint 0))))
(set! (-> v1-25 prim-core action) (collide-action solid))
(set! (-> v1-25 transform-index) 12)
(set-vector! (-> v1-25 local-sphere) 8192.0 0.0 0.0 12288.0)
)
(let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 6) (the-as uint 0))))
(set! (-> v1-27 prim-core action) (collide-action solid))
(set! (-> v1-27 transform-index) 16)
(set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 10240.0)
)
(let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-29 prim-core action) (collide-action solid))
(set! (-> v1-29 transform-index) 3)
(set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-31 prim-core action) (collide-action solid))
(set! (-> v1-31 transform-index) 9)
(set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 7) (the-as uint 0))))
(set! (-> v1-33 prim-core action) (collide-action solid))
(set! (-> v1-33 transform-index) 28)
(set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-35 prim-core action) (collide-action solid))
(set! (-> v1-35 transform-index) 8)
(set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 16384.0)
)
(set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w)))
(let ((v1-38 (-> s4-1 root-prim)))
(set! (-> s4-1 backup-collide-as) (-> v1-38 prim-core collide-as))
(set! (-> s4-1 backup-collide-with) (-> v1-38 prim-core collide-with))
)
(set! (-> obj root-override) s4-1)
)
(set! s4-0 (art-group-get-by-name *level* "skel-rhino-wall-1" (the-as (pointer uint32) #f)))
(set! (-> obj anim)
(new 'static 'spool-anim :name "rhino-wall-1" :anim-name "1-break" :parts 2 :command-list '())
)
)
((string= (the-as string s3-0) "rhino-wall-2")
(set! (-> obj id) 2)
(let ((s4-2 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(set! (-> s4-2 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-2 reaction) cshape-reaction-default)
(set! (-> s4-2 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s4-2 penetrated-by) (penetrate))
(let ((s3-2 (new 'process 'collide-shape-prim-group s4-2 (the-as uint 9) 0)))
(set! (-> s4-2 total-prims) (the-as uint 10))
(set! (-> s3-2 prim-core collide-as) (collide-spec obstacle))
(set! (-> s3-2 prim-core action) (collide-action solid))
(set! (-> s3-2 transform-index) 3)
(set-vector! (-> s3-2 local-sphere) -8192.0 -4096.0 0.0 40960.0)
(set! (-> s4-2 root-prim) s3-2)
)
(let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-55 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-55 prim-core action) (collide-action solid))
(set! (-> v1-55 transform-index) 3)
(set-vector! (-> v1-55 local-sphere) -8192.0 -4096.0 0.0 40960.0)
)
(let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-57 prim-core action) (collide-action solid))
(set! (-> v1-57 transform-index) 4)
(set-vector! (-> v1-57 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-59 prim-core action) (collide-action solid))
(set! (-> v1-59 transform-index) 7)
(set-vector! (-> v1-59 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-61 prim-core action) (collide-action solid))
(set! (-> v1-61 transform-index) 15)
(set-vector! (-> v1-61 local-sphere) 0.0 0.0 0.0 12288.0)
)
(let ((v1-63 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-63 prim-core action) (collide-action solid))
(set! (-> v1-63 transform-index) 16)
(set-vector! (-> v1-63 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-65 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 5) (the-as uint 0))))
(set! (-> v1-65 prim-core action) (collide-action solid))
(set! (-> v1-65 transform-index) 26)
(set-vector! (-> v1-65 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-67 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 6) (the-as uint 0))))
(set! (-> v1-67 prim-core action) (collide-action solid))
(set! (-> v1-67 transform-index) 27)
(set-vector! (-> v1-67 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-69 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 7) (the-as uint 0))))
(set! (-> v1-69 prim-core action) (collide-action solid))
(set! (-> v1-69 transform-index) 28)
(set-vector! (-> v1-69 local-sphere) 0.0 0.0 0.0 8192.0)
)
(let ((v1-71 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 9) (the-as uint 0))))
(set! (-> v1-71 prim-core action) (collide-action solid))
(set! (-> v1-71 transform-index) 58)
(set-vector! (-> v1-71 local-sphere) 0.0 12288.0 0.0 32768.0)
)
(set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w)))
(let ((v1-74 (-> s4-2 root-prim)))
(set! (-> s4-2 backup-collide-as) (-> v1-74 prim-core collide-as))
(set! (-> s4-2 backup-collide-with) (-> v1-74 prim-core collide-with))
)
(set! (-> obj root-override) s4-2)
)
(set! s4-0 (art-group-get-by-name *level* "skel-rhino-wall-2" (the-as (pointer uint32) #f)))
(set! (-> obj anim)
(new 'static 'spool-anim :name "rhino-wall-2" :anim-name "2-break" :parts 1 :command-list '())
)
)
(else
(go process-drawable-art-error (the-as string s3-0))
)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton obj (the-as skeleton-group s4-0) (the-as pair 0))
)
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
(go (method-of-object obj broken))
(go (method-of-object obj unbroken))
)
(none)
)
File diff suppressed because it is too large Load Diff
+7 -2
View File
@@ -264,12 +264,17 @@
"(method 43 nav-mesh)",
"(method 34 nav-mesh)",
"(method 18 nav-control)",
"(method 10 idle-control)" // re-assigns `self`
"(method 10 idle-control)", // re-assigns `self`
"(method 3 rhino)"
],
"skip_compile_states": {
"(idle process-taskable)": ["event"],
"(impact gun-dark-shot)": ["code"],
"(target-gun-stance target)": ["code"]
"(target-gun-stance target)": ["code"],
"(hostile hopper)": ["trans"], // adds b! but the corresponding label is missing
"(broken rhino-wall)": ["code"], // missing cast to art-joint-anim
"(hit rhino-wall)": ["code"] // missing cast to art-joint-anim
}
}