Files
jak-project/test/decompiler/reference/jak2/characters/sig/sig_REF.gc
T
Hat Kid 67d4eda169 decomp: hover-* files, wasp, crimson-guard-hover, flamer, target-turret, drill-turret, jellyfish (#2198)
Manual patches:

- `drill-turret`: The static data for `*turret-13-path*`,
`*turret-14-path*` and `*turret-15-path*` was decompiled by hand and the
integers in the `set-speed-mult` events have been replaced with boxed
integer arrays that contain only that integer in order to make the
compiler happy. To that effect, the event handler in `target-turret` was
changed to access that array instead of just accessing the int.
- `hover-nav-control`: In `hover-nav-control::10`, `arg2` is usually a
`vector`, but there are some places where it is called with `#t` as
`arg2` and, subsequently, crashes the game because it tries to access
the `quad` of `arg2` if `arg2` is truthy. To mitigate this, the
condition `arg2` has been replaced with `(and (!= arg2 #t) arg2)` (in
this case, it would jump to the `else` that just resets the `dest-vel`
and `transv` `quad`s)
- `drill-baron`: The static data for `*drill-ship-turret-speed-event*`
has been decompiled by hand.

TODOs:
- Jellyfish crash the game
- Destroying the metalhead eggs that are on the breakable wall crashes
the game (already happened with the Peacemaker before)
- Figure out why static data of type `turret-path-event` doesn't
decompile

The docs for all the hover-nav and nav-network code could use some love
in the future, I'm not smart enough to figure out what any of that code
actually means, but it seems to work...

Also threw in the fix for the ▲ that was accidentally left commented
out.
2023-02-09 18:22:56 -05:00

1538 lines
56 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type sig-anim-info
(deftype sig-anim-info (structure)
((anim-index int32 :offset-assert 0)
)
:pack-me
:method-count-assert 9
:size-assert #x4
:flag-assert #x900000004
)
;; definition for method 3 of type sig-anim-info
(defmethod inspect sig-anim-info ((obj sig-anim-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'sig-anim-info)
(format #t "~1Tanim-index: ~D~%" (-> obj anim-index))
(label cfg-4)
obj
)
;; definition of type sig-global-info
(deftype sig-global-info (basic)
((prev-blue-hit int8 :offset-assert 4)
(blue-hit-anim sig-anim-info 3 :inline :offset-assert 8)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
;; definition for method 3 of type sig-global-info
(defmethod inspect sig-global-info ((obj sig-global-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tprev-blue-hit: ~D~%" (-> obj prev-blue-hit))
(format #t "~1Tblue-hit-anim[3] @ #x~X~%" (-> obj blue-hit-anim))
(label cfg-4)
obj
)
;; definition for symbol *sig-global-info*, type sig-global-info
(define *sig-global-info*
(new 'static 'sig-global-info :blue-hit-anim (new 'static 'inline-array sig-anim-info 3
(new 'static 'sig-anim-info :anim-index 19)
(new 'static 'sig-anim-info :anim-index 20)
(new 'static 'sig-anim-info :anim-index 21)
)
)
)
;; definition for symbol *sig-nav-enemy-info*, type nav-enemy-info
(define *sig-nav-enemy-info*
(new 'static 'nav-enemy-info
:use-die-falling #t
:use-victory #f
:use-jump-blocked #t
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #t
:hover-if-no-ground #f
:idle-anim-script (new 'static 'array idle-control-frame 4
(new 'static 'idle-control-frame :command (ic-cmd play) :anim #x4 :param0 #x1 :param1 #x1)
(new 'static 'idle-control-frame)
(new 'static 'idle-control-frame)
(new 'static 'idle-control-frame)
)
:idle-anim 4
:notice-anim 4
:hostile-anim -1
:hit-anim 4
:knocked-anim 15
:knocked-land-anim 15
:die-anim 25
:die-falling-anim 25
:victory-anim -1
:jump-wind-up-anim 39
:jump-in-air-anim 40
:jump-land-anim 41
:neck-joint 6
:look-at-joint 7
:bullseye-joint 5
:sound-hit (static-sound-name "sig-hit")
:notice-distance (meters 40)
:notice-distance-delta (meters 10)
:proximity-notice-distance (meters 20)
:default-hit-points 20
:gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list)
:overlaps-others-collide-with-filter (collide-spec jak civilian enemy vehicle-sphere hit-by-others-list player-list)
:penetrate-knocked (penetrate
touch
generic-attack
lunge
flop
punch
spin
roll
uppercut
bonk
tube
vehicle
flut-attack
board
mech
mech-punch
mech-bonk
dark-skin
dark-punch
dark-bomb
dark-giant
shield
explode
jak-yellow-shot
jak-red-shot
jak-blue-shot
jak-dark-shot
enemy-yellow-shot
enemy-dark-shot
eco-yellow
eco-red
eco-blue
eco-green
knocked
penetrate-33
penetrate-34
penetrate-35
penetrate-36
penetrate-37
penetrate-38
penetrate-39
penetrate-40
penetrate-41
penetrate-42
penetrate-43
penetrate-44
penetrate-45
penetrate-46
penetrate-47
penetrate-48
penetrate-49
penetrate-50
penetrate-51
penetrate-52
penetrate-53
penetrate-54
penetrate-55
penetrate-56
penetrate-57
penetrate-58
penetrate-59
penetrate-60
penetrate-61
penetrate-62
penetrate-63
)
:movement-gravity (meters -100)
:friction 0.7
: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 2730.6667
:knocked-soft-vxz-lo 45056.0
:knocked-soft-vxz-hi 54067.2
:knocked-soft-vy-lo 38092.8
:knocked-soft-vy-hi 45056.0
:knocked-medium-vxz-lo 65536.0
:knocked-medium-vxz-hi 74547.2
:knocked-medium-vy-lo 65536.0
:knocked-medium-vy-hi 73728.0
:knocked-hard-vxz-lo 66355.2
:knocked-hard-vxz-hi 85196.8
:knocked-hard-vy-lo 60620.8
:knocked-hard-vy-hi 101580.8
: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 20480.0
:knocked-yellow-vxz-hi 24576.0
:knocked-yellow-vy-lo 28672.0
:knocked-yellow-vy-hi 40960.0
:knocked-red-vxz-lo 24576.0
:knocked-red-vxz-hi 73728.0
:knocked-red-vy-lo 65536.0
:knocked-red-vy-hi 81920.0
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 49152.0
:knocked-blue-vy-lo 24576.0
:knocked-blue-vy-hi 40960.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 #t
:use-frustration #t
:use-stop-chase #t
:use-circling #f
:use-pacing #f
:walk-anim 3
:turn-anim -1
:run-anim 8
:taunt-anim -1
:run-travel-speed (meters 7)
:run-acceleration (meters 14)
:run-turning-acceleration (meters 6)
:walk-travel-speed (meters 4)
:walk-acceleration (meters 8)
:walk-turning-acceleration (meters 6)
:maximum-rotation-rate (degrees 360.0)
:notice-nav-radius (meters 20)
: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! (-> *sig-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
;; failed to figure out what this is:
(defpartgroup group-sig-gun-glow
:id 148
:bounds (static-bspherem 0 0 0 1)
:parts ((sp-item 671 :flags (bit6)))
)
;; failed to figure out what this is:
(defpart 671
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xca :page #xc))
(sp-flt spt-num 1.0)
(sp-flt spt-scale-x (meters 1.5))
(sp-flt spt-rot-x 409.6)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 255.0)
(sp-flt spt-g 192.0)
(sp-flt spt-b 64.0)
(sp-flt spt-a 16.0)
(sp-int spt-timer 5)
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
(sp-flt spt-userdata 819.2)
)
)
;; definition for method 97 of type sig
(defmethod enemy-method-97 sig ((obj sig))
(with-pp
(let* ((s5-0 (handle->process (-> obj attacker-handle)))
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(when s4-0
(cond
((= (-> s4-0 type) target)
(when (or (not (logtest? (-> obj bot-flags) (bot-flags attacked)))
(>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 1.5))
)
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
(reset-attacker! obj)
)
(set! s4-0 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
)
(else
(when (>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 6))
(set! s4-0 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
)
)
)
(let ((v1-23 (-> obj focus-mode))
(s5-1 (the-as process #f))
)
(cond
((zero? v1-23)
(cond
(s4-0
(if (or (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(>= 16384.0
(vector-vector-xz-distance (-> obj root-override2 trans) (get-trans (the-as process-focusable s4-0) 3))
)
)
(set! s5-1 s4-0)
)
)
(else
(when (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(set! s5-1 (select-focus! obj))
(cond
(s5-1
(empty)
)
(else
(let ((s4-1 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(if s5-1
(empty)
(set! s5-1 *target*)
)
)
)
)
)
)
)
((= v1-23 1)
(cond
(s4-0
(if (or (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(>= 16384.0
(vector-vector-xz-distance (-> obj root-override2 trans) (get-trans (the-as process-focusable s4-0) 3))
)
)
(set! s5-1 s4-0)
)
)
(else
(when (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(let ((s4-2 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-2 process-focusable)
s4-2
)
)
)
(cond
(s5-1
(empty)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
(else
(set! s5-1 *target*)
)
)
)
)
)
)
)
(cond
(s5-1
(try-update-focus (-> obj focus) (the-as process-focusable s5-1) obj)
(if (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (!= (-> (the-as process-focusable s5-1) type) target))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
(else
(clear-focused (-> obj focus))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
s5-1
)
)
)
)
;; definition for method 74 of type sig
;; WARN: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 33]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 38]
(defmethod general-event-handler sig ((obj sig) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'untrigger)
(sig-plasma-method-11 (-> obj plasma) #t)
)
((= v1-0 'sig-path)
(when (and (not (logtest? (-> obj focus-status) (focus-status dead)))
(nonzero? (-> obj hit-points))
(zero? (-> obj fated-time))
)
(let ((a1-2 (-> arg3 param 0)))
(sig-method-249 obj (the-as sig-path a1-2))
)
(go (method-of-object obj sig-path-run))
)
)
(else
((method-of-type bot general-event-handler) obj arg0 arg1 arg2 arg3)
)
)
)
)
)
;; definition for method 55 of type sig
(defmethod track-target! sig ((obj sig))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(with-pp
(let ((v1-2 (-> obj skel top-anim frame-group)))
(cond
((>= (- (-> pp clock frame-counter) (-> obj danger-time)) (seconds 2))
(cond
((not v1-2)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
)
((= v1-2 (-> obj draw art-group data 44))
(push-anim-to-targ
(-> obj skel top-anim)
(the-as art-joint-anim (-> obj draw art-group data 46))
0.0
0
0
1.0
0.0
#f
)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
)
)
)
(else
(cond
((not v1-2)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 44))
)
((= v1-2 (-> obj draw art-group data 42))
(push-anim-to-targ
(-> obj skel top-anim)
(the-as art-joint-anim (-> obj draw art-group data 43))
0.0
0
0
1.0
0.0
#f
)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 44))
)
)
)
)
)
(let ((t9-2 (method-of-type bot track-target!)))
(t9-2 obj)
)
(when (logtest? (-> obj bot-flags) (bot-flags too-far-fail))
(let ((f0-0 (vector-vector-distance (-> obj root-override2 trans) (target-pos 0))))
(when (or (>= f0-0 491520.0)
(and (>= f0-0 102400.0) (>= (- (-> pp clock frame-counter) (-> obj last-draw-time)) (seconds 10)))
)
(process-entity-status! obj (entity-perm-status no-kill) #f)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
)
)
(sig-plasma-method-14 (-> obj plasma) obj)
(none)
)
)
;; definition for method 213 of type sig
(defmethod go-to-waypoint! sig ((obj sig) (arg0 int) (arg1 symbol))
"Start moving to the given [[bot-waypoint]]."
(set! (-> obj plasma charge-speed) 0.125)
((method-of-type bot go-to-waypoint!) obj arg0 arg1)
)
;; definition for method 10 of type sig
(defmethod deactivate sig ((obj sig))
(let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-0 command) (sound-command set-param))
(set! (-> v1-0 id) (-> obj plasma powerup-sound-id))
(set! (-> v1-0 params volume) -4)
(set! (-> v1-0 auto-time) 24)
(set! (-> v1-0 auto-from) 2)
(set! (-> v1-0 params mask) (the-as uint 17))
(-> v1-0 id)
)
(let ((v1-2 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-2 command) (sound-command set-param))
(set! (-> v1-2 id) (-> obj plasma plasma-sound-id))
(set! (-> v1-2 params volume) -4)
(set! (-> v1-2 auto-time) 24)
(set! (-> v1-2 auto-from) 2)
(set! (-> v1-2 params mask) (the-as uint 17))
(-> v1-2 id)
)
((method-of-type bot deactivate) obj)
(none)
)
;; definition for method 46 of type sig
;; WARN: Return type mismatch vector vs none.
(defmethod enemy-method-46 sig ((obj sig) (arg0 int))
"@abstract"
(let ((v1-0 arg0))
(cond
((zero? v1-0)
(let ((v1-2 (-> obj root-override2 root-prim)))
(dotimes (a0-1 4)
(let ((a1-3 (-> (the-as collide-shape-prim-group v1-2) child (+ a0-1 3))))
(set! (-> a1-3 prim-core collide-with) (collide-spec))
(set! (-> a1-3 prim-core collide-as) (collide-spec))
(set! (-> a1-3 transform-index) -2)
)
)
)
)
((= v1-0 3)
(let ((v1-5 (the-as collide-shape-prim-group (-> obj root-override2 root-prim))))
(let ((a0-3 (-> v1-5 child 3)))
(set! (-> a0-3 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> a0-3 prim-core collide-with)
(collide-spec jak crate civilian enemy vehicle-sphere hit-by-others-list player-list)
)
(set! (-> a0-3 transform-index) 23)
(set-vector! (-> a0-3 local-sphere) 0.0 -819.2 -4915.2 1638.4)
)
(let ((a0-6 (-> v1-5 child 4)))
(set! (-> a0-6 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> a0-6 prim-core collide-with)
(collide-spec jak crate civilian enemy vehicle-sphere hit-by-others-list player-list)
)
(set! (-> a0-6 transform-index) 23)
(set-vector! (-> a0-6 local-sphere) 0.0 0.0 -1638.4 2048.0)
)
(let ((a0-9 (-> v1-5 child 5)))
(set! (-> a0-9 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> a0-9 prim-core collide-with)
(collide-spec jak crate civilian enemy vehicle-sphere hit-by-others-list player-list)
)
(set! (-> a0-9 transform-index) 23)
(set-vector! (-> a0-9 local-sphere) 0.0 0.0 2048.0 1638.4)
)
(let ((v1-7 (-> v1-5 child 6)))
(set! (-> v1-7 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> v1-7 prim-core collide-with)
(collide-spec jak crate civilian enemy vehicle-sphere hit-by-others-list player-list)
)
(set! (-> v1-7 transform-index) 23)
(set-vector! (-> v1-7 local-sphere) 0.0 1024.0 6144.0 2457.6)
)
)
)
)
)
(none)
)
;; definition for method 114 of type sig
;; WARN: Return type mismatch int vs none.
(defmethod init-enemy-collision! sig ((obj sig))
"Initializes the [[collide-shape-moving]] and any ancillary tasks to make the enemy collide properly"
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
(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 7) 0)))
(set! (-> s5-0 total-prims) (the-as uint 8))
(set! (-> s4-0 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> s4-0 prim-core collide-with)
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
)
(set! (-> s4-0 prim-core action) (collide-action solid can-ride no-standon))
(set-vector! (-> s4-0 local-sphere) 0.0 10240.0 0.0 13721.6)
(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 bot bot-targetable))
(set! (-> v1-13 prim-core collide-with)
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
)
(set! (-> v1-13 prim-core action) (collide-action solid can-ride))
(set-vector! (-> v1-13 local-sphere) 0.0 4096.0 0.0 4096.0)
)
(let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> v1-15 prim-core collide-with)
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
)
(set! (-> v1-15 prim-core action) (collide-action solid))
(set-vector! (-> v1-15 local-sphere) 0.0 7168.0 0.0 4096.0)
)
(let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-17 prim-core collide-as) (collide-spec bot bot-targetable))
(set! (-> v1-17 prim-core collide-with)
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
)
(set! (-> v1-17 prim-core action) (collide-action solid no-standon))
(set-vector! (-> v1-17 local-sphere) 0.0 10240.0 0.0 4096.0)
)
(let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-19 prim-core action) (collide-action deadly))
(set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 4096.0)
)
(let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-21 prim-core action) (collide-action deadly))
(set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 4096.0)
)
(let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-23 prim-core action) (collide-action deadly))
(set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 4096.0)
)
(let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-25 prim-core action) (collide-action deadly))
(set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 4096.0)
)
(set! (-> s5-0 nav-radius) 7372.8)
(let ((v1-27 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-27 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> s5-0 event-priority) (the-as uint 8))
(set! (-> obj root-override2) s5-0)
)
(enemy-method-46 obj 0)
0
(none)
)
;; definition for method 115 of type sig
;; WARN: Return type mismatch int vs none.
(defmethod init-enemy! sig ((obj sig))
"Common method called to initialize the enemy, typically sets up default field values and calls ancillary helper methods"
(init! obj)
(set! (-> obj channel) (the-as uint 21))
(set! (-> obj notice-enemy-dist) 122880.0)
(set! (-> obj travel-anim-interp) 0.0)
(set! (-> obj plasma charge-speed) 0.125)
(set! (-> obj plasma powerup-sound-id) (new-sound-id))
(set! (-> obj plasma plasma-sound-id) (new-sound-id))
(set! (-> obj focus-info max-los-dist) 102400.0)
(set! (-> obj sig-path) #f)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-sig" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(init-enemy-behaviour-and-stats! obj *sig-nav-enemy-info*)
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 147) obj))
(add-connection *part-engine* obj 23 obj 671 (new 'static 'sphere :y 327.68 :z 7536.64 :r 163840.0))
(set! (-> obj skel interp-select 0) (the-as int (the-as uint #x1ffc007ffff0)))
(set! (-> obj skel interp-select 1) 0)
(set! (-> obj skel top-anim) (new 'process 'top-anim-joint-control obj))
(set! (-> obj skel interp-select 0) 0)
(set! (-> obj skel interp-select 1) 0)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
(set! (-> obj swivel-joint-mod) (new 'process 'joint-mod (joint-mod-mode joint-set*) obj 4))
(let ((v1-26 (-> obj neck)))
(set! (-> v1-26 up) (the-as uint 1))
(set! (-> v1-26 nose) (the-as uint 2))
(set! (-> v1-26 ear) (the-as uint 0))
(set-vector! (-> v1-26 twist-max) 11832.889 11832.889 0.0 1.0)
(set! (-> v1-26 ignore-angle) 30947.555)
)
(let ((t9-10 (method-of-type bot init-enemy!)))
(t9-10 obj)
)
(set! (-> obj my-simple-focus) (process-spawn simple-focus :to obj))
0
(none)
)
;; definition for method 105 of type sig
;; WARN: Return type mismatch sound-id vs enemy-flag.
(defmethod enemy-method-105 sig ((obj sig) (arg0 process))
(let ((t9-0 (method-of-type bot enemy-method-105)))
(t9-0 obj arg0)
)
(the-as enemy-flag (if (and (-> obj next-state) (= (-> obj next-state name) 'whip))
(sound-play "sig-gun-strike")
)
)
)
;; definition for method 251 of type sig
(defmethod sig-method-251 sig ((obj sig))
(logtest? (-> obj plasma flags) 1)
)
;; definition for method 254 of type sig
(defmethod sig-method-254 sig ((obj sig))
(logtest? (bot-flags bf22) (-> obj bot-flags))
)
;; definition for method 252 of type sig
(defmethod sig-method-252 sig ((obj sig))
(logtest? (bot-flags bf20) (-> obj bot-flags))
)
;; definition for method 255 of type sig
(defmethod sig-method-255 sig ((obj sig))
(logtest? (bot-flags bf19) (-> obj bot-flags))
)
;; definition for method 246 of type sig
(defmethod sig-method-246 sig ((obj sig))
(>= 16384.0 (-> obj focus-info bullseye-xz-dist))
)
;; definition for method 245 of type sig
(defmethod sig-method-245 sig ((obj sig))
(and (or (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (= (-> obj focus-info fproc type) target))
(and (>= 40960.0 (-> obj focus-info bullseye-xz-dist)) (= (-> obj focus-info los) 1))
)
(zero? (logand (bot-flags bf19) (-> obj bot-flags)))
)
)
;; definition for method 70 of type sig
(defmethod go-hostile sig ((obj sig))
(bot-method-223 obj #t)
(cond
((not (bot-method-214 obj))
(react-to-focus obj)
)
((sig-method-246 obj)
(go (method-of-object obj whip))
)
((sig-method-245 obj)
(go (method-of-object obj blast))
)
(else
(go (method-of-object obj chase))
)
)
(none)
)
;; definition for method 72 of type sig
(defmethod react-to-focus sig ((obj sig))
"@TODO - flesh out docs"
(cond
((bot-method-214 obj)
(go-hostile obj)
)
((sig-method-252 obj)
(go (method-of-object obj gun-jam))
)
((sig-method-255 obj)
(go (method-of-object obj repair-gun))
)
((not (outside-spot-radius? obj (the-as bot-spot #f) (the-as vector #f) #f))
(go (method-of-object obj traveling))
)
((and (-> obj focus-info fproc) (>= (fabs (-> obj focus-info ry-diff)) 9102.223))
(go (method-of-object obj waiting-turn))
)
((sig-method-251 obj)
(go (method-of-object obj charge-plasma))
)
((sig-method-254 obj)
(go (method-of-object obj clean-gun))
)
(else
(go (method-of-object obj waiting-close))
)
)
(none)
)
;; definition for method 116 of type sig
;; WARN: Return type mismatch object vs none.
(defmethod go-idle sig ((obj sig))
(go (method-of-object obj waiting-far))
(none)
)
;; definition for method 247 of type sig
;; INFO: Used lq/sq
(defmethod fire-gun sig ((obj sig) (arg0 vector))
"Increase gun fired counter and spawn projectile."
(+! (-> obj fired-gun-count) 1)
(let ((s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
(set! (-> s5-0 ent) (-> obj entity))
(set! (-> s5-0 charge) 1.0)
(set! (-> s5-0 options) (projectile-options account-for-target-velocity proj-options-8000))
(set! (-> s5-0 notify-handle) (process->handle obj))
(set! (-> s5-0 owner-handle) (the-as handle #f))
(set! (-> s5-0 ignore-handle) (process->handle obj))
(let* ((v1-11 *game-info*)
(a0-10 (+ (-> v1-11 attack-id) 1))
)
(set! (-> v1-11 attack-id) a0-10)
(set! (-> s5-0 attack-id) a0-10)
)
(set! (-> s5-0 timeout) (seconds 4))
(vector<-cspace! (-> s5-0 pos) (-> obj node-list data 24))
(set! (-> s5-0 vel quad) (-> arg0 quad))
(vector-! (-> s5-0 vel) (-> s5-0 vel) (-> s5-0 pos))
(vector-normalize! (-> s5-0 vel) 307200.0)
(spawn-projectile sig-shot s5-0 obj *default-dead-pool*)
)
)
;; definition for method 258 of type sig
;; WARN: Return type mismatch int vs none.
(defmethod sig-method-258 sig ((obj sig))
(with-pp
(let ((f30-0 (-> obj nav state speed)))
(let ((f0-1 (lerp-scale 0.0 1.0 f30-0 16384.0 28672.0)))
(seek! (-> obj travel-anim-interp) f0-1 (* 4.0 (-> pp clock seconds-per-frame)))
)
(let ((f28-0 (-> obj travel-anim-interp))
(v1-7 (if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
)
(cond
((and v1-7 (= v1-7 (-> obj draw art-group data 3)))
(let ((v1-12 (-> obj skel root-channel 1)))
(set! (-> v1-12 frame-interp 1) f28-0)
(set! (-> v1-12 frame-interp 0) f28-0)
)
(let* ((f28-1 (current-cycle-distance (-> obj skel)))
(f0-5 (quaternion-y-angle (-> obj root-override2 quat)))
(f1-2 (deg- f0-5 (-> obj travel-prev-ry)))
(f0-8 (fmin 28672.0 (* 0.35342914 (-> pp clock frames-per-second) (fabs f1-2))))
(f0-11 (/ (* 24.0 (fmax f30-0 f0-8)) (* 30.0 f28-1)))
(a0-10 (-> obj skel root-channel 0))
)
(set! (-> a0-10 param 0) f0-11)
(joint-control-channel-group-eval! a0-10 (the-as art-joint-anim #f) num-func-loop!)
)
(let ((a0-11 (-> obj skel root-channel 1)))
(set! (-> a0-11 param 0) 0.0)
(joint-control-channel-group-eval! a0-11 (the-as art-joint-anim #f) num-func-chan)
)
)
(else
(ja-channel-push! 2 (seconds 0.15))
(let ((a0-13 (-> obj skel root-channel 0)))
(set! (-> a0-13 dist) 13107.2)
(set! (-> a0-13 frame-group) (the-as art-joint-anim (-> obj draw art-group data 3)))
(set! (-> a0-13 param 0) 1.0)
(joint-control-channel-group! a0-13 (the-as art-joint-anim (-> obj draw art-group data 3)) num-func-loop!)
)
(let ((a0-14 (-> obj skel root-channel 1)))
(set! (-> a0-14 frame-interp 1) f28-0)
(set! (-> a0-14 frame-interp 0) f28-0)
(set! (-> a0-14 dist) 22937.6)
(set! (-> a0-14 frame-group) (the-as art-joint-anim (-> obj draw art-group data 8)))
(set! (-> a0-14 param 0) 0.0)
(joint-control-channel-group! a0-14 (the-as art-joint-anim (-> obj draw art-group data 8)) num-func-chan)
)
)
)
)
)
(none)
)
)
;; definition for method 77 of type sig
(defmethod enemy-method-77 sig ((obj sig) (arg0 (pointer float)))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(let* ((v1-3 (enemy-method-120 obj 3 (ash 1 (-> *sig-global-info* prev-blue-hit))))
(s5-1 (-> obj draw art-group data (-> *sig-global-info* blue-hit-anim v1-3 anim-index)))
)
(set! (-> *sig-global-info* prev-blue-hit) v1-3)
(let ((v1-6 (if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
)
(if (and v1-6 (= v1-6 (-> obj draw art-group data 22)))
(ja-channel-push! 1 (seconds 0.17))
(ja-channel-push! 1 (seconds 0.02))
)
)
(let ((a0-15 (-> obj skel root-channel 0)))
(set! (-> a0-15 frame-group) (the-as art-joint-anim s5-1))
(set! (-> a0-15 param 0) (the float (+ (-> (the-as art-joint-anim s5-1) frames num-frames) -1)))
(set! (-> a0-15 param 1) 1.0)
(set! (-> a0-15 frame-num) 0.0)
(joint-control-channel-group! a0-15 (the-as art-joint-anim s5-1) num-func-seek!)
)
)
#t
)
(((knocked-type knocked-type-2))
(ja-channel-push! 1 (seconds 0.17))
(let ((a0-18 (-> obj skel root-channel 0)))
(set! (-> a0-18 frame-group) (the-as art-joint-anim (-> obj draw art-group data 23)))
(set! (-> a0-18 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 23)) frames num-frames) -1))
)
(set! (-> a0-18 param 1) 1.0)
(set! (-> a0-18 frame-num) 0.0)
(joint-control-channel-group! a0-18 (the-as art-joint-anim (-> obj draw art-group data 23)) num-func-seek!)
)
#t
)
(else
(let ((s4-0 (new 'stack-no-clear 'vector)))
0.0
0.0
(vector-z-quaternion! s4-0 (-> obj root-override2 quat))
(let ((f30-0 (atan (-> s4-0 x) (-> s4-0 z))))
(enemy-method-50 obj s4-0)
(let* ((f0-14 (atan (-> s4-0 x) (-> s4-0 z)))
(f0-15 (deg- f0-14 f30-0))
(f1-0 (fabs f0-15))
(s4-1 (cond
((>= 8192.0 f1-0)
(-> obj draw art-group data 16)
)
((>= f1-0 24576.0)
(-> obj draw art-group data 15)
)
((< f0-15 0.0)
(-> obj draw art-group data 17)
)
(else
(-> obj draw art-group data 18)
)
)
)
)
(ja-channel-push! 1 (seconds 0.03))
(let ((a0-25 (-> obj skel root-channel 0)))
(set! (-> a0-25 frame-group) (the-as art-joint-anim s4-1))
(set! (-> a0-25 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1)))
(set! (-> a0-25 param 1) (-> arg0 0))
(set! (-> a0-25 frame-num) 0.0)
(joint-control-channel-group! a0-25 (the-as art-joint-anim s4-1) num-func-seek!)
)
)
)
)
#t
)
)
)
;; definition for method 78 of type sig
(defmethod enemy-method-78 sig ((obj sig) (arg0 (pointer float)))
(case (-> obj incoming knocked-type)
(((knocked-type knocked-type-6))
(when (>= (-> obj incoming blue-juggle-count) (the-as uint 2))
(-> obj draw art-group data 22)
(ja-channel-push! 1 (seconds 0.17))
(let ((a0-3 (-> obj skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> obj draw art-group data 22)))
(set! (-> a0-3 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 22)) frames num-frames) -1))
)
(set! (-> a0-3 param 1) 1.0)
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> obj draw art-group data 22)) num-func-seek!)
)
#t
)
)
(((knocked-type knocked-type-2))
(ja-channel-push! 1 (seconds 0.17))
(let ((a0-6 (-> obj skel root-channel 0)))
(set! (-> a0-6 frame-group) (the-as art-joint-anim (-> obj draw art-group data 24)))
(set! (-> a0-6 param 0)
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 24)) frames num-frames) -1))
)
(set! (-> a0-6 param 1) 1.0)
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group! a0-6 (the-as art-joint-anim (-> obj draw art-group data 24)) num-func-seek!)
)
#t
)
(else
(not (ja-done? 0))
)
)
)
;; definition for method 84 of type sig
(defmethod enemy-method-84 sig ((obj sig) (arg0 enemy-jump-info))
(logclear! (-> obj bot-flags) (bot-flags bf23))
(let ((f1-0 (vector-vector-xz-distance (-> arg0 dest-pos) (-> arg0 start-pos)))
(f2-1 (- (-> arg0 dest-pos y) (-> arg0 start-pos y)))
)
2048.0
(let* ((f0-2 -245760.0)
(v1-6 (if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
(f1-4
(cond
((or (not (and v1-6 (= v1-6 (-> obj draw art-group data 3)))) (or (= (-> obj jump-why) 4) (>= f2-1 8192.0)))
(set! (-> obj bot-flags) (logior (bot-flags bf23) (-> obj bot-flags)))
(let ((f2-3 (fmax 12288.0 (* 0.5 f1-0)))
(f1-3 (fmax (-> arg0 start-pos y) (-> arg0 dest-pos y)))
)
(- (fmax (+ (fmin (-> arg0 start-pos y) (-> arg0 dest-pos y)) f2-3) (+ 10240.0 f1-3)) f1-3)
)
)
(else
(fmax 2048.0 (* 0.2 f1-0))
)
)
)
)
(setup-from-to-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) f1-4 (* 0.000011111111 f0-2))
)
)
(none)
)
;; definition for method 86 of type sig
(defmethod enemy-method-86 sig ((obj sig))
(let* ((t9-0 (method-of-type bot enemy-method-86))
(v0-0 (t9-0 obj))
)
(when (and (= (-> obj jump-why) 4) (not v0-0))
(when (< (-> obj root-override2 transv y) 0.0)
(let* ((v1-11 (-> obj actor-group 0 data (-> obj platform-index) actor))
(a0-5 (if v1-11
(-> v1-11 extra process)
)
)
)
(when a0-5
(let ((s4-0 (-> (the-as process-focusable a0-5) root-override trans))
(s5-0 (-> obj root-override2 trans))
)
(when (< 2048.0 (- (-> s4-0 y) (-> s5-0 y)))
(vector-reset! (-> obj root-override2 transv))
(let ((f30-0 9420.8))
(when (< f30-0 (vector-vector-xz-distance s4-0 s5-0))
(vector-! s5-0 s5-0 s4-0)
(set! (-> s5-0 y) 0.0)
(vector-normalize! s5-0 f30-0)
(vector+! s5-0 s5-0 s4-0)
)
)
(let ((a1-4 (new 'stack-no-clear 'collide-query)))
(find-ground (-> obj root-override2) a1-4 (the-as collide-spec (-> obj gnd-collide)) 8192.0 81920.0 1024.0)
)
(set! (-> s5-0 y) (-> obj root-override2 gspot-pos y))
(set! v0-0 #t)
)
)
)
)
)
)
v0-0
)
)
;; definition for method 85 of type sig
;; INFO: Used lq/sq
;; WARN: Return type mismatch object vs float.
(defmethod enemy-method-85 sig ((obj sig))
(rlet ((vf0 :class vf))
(init-vf0-vector)
(let ((t9-0 (method-of-type bot enemy-method-85)))
(t9-0 obj)
)
(let ((s5-0 (static-sound-spec "sig-jland" :mask (reg0))))
(set! (-> s5-0 reg 0) (the-as uint (-> obj root-override2 ground-pat material)))
(sound-play-by-spec s5-0 (new-sound-id) (the-as vector #t))
)
(the-as
float
(cond
((logtest? (bot-flags bf23) (-> obj bot-flags))
(let ((v0-3 (the-as object (-> obj root-override2 transv))))
(.svf (&-> (the-as vector v0-3) quad) vf0)
v0-3
)
)
(else
(let ((v1-9 obj))
(set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag37) (-> v1-9 enemy-flags))))
)
0
(let ((v1-11 obj))
(if (not (logtest? (enemy-flag enemy-flag36) (-> v1-11 enemy-flags)))
(set! (-> v1-11 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag38) (-> v1-11 enemy-flags))))
)
(set! (-> v1-11 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag36) (-> v1-11 enemy-flags))))
(set! (-> v1-11 nav callback-info) (-> v1-11 enemy-info-override callback-info))
)
0
(let ((s5-1 (new 'stack-no-clear 'vector)))
(set! (-> s5-1 quad) (-> obj root-override2 transv quad))
(set! (-> s5-1 y) 0.0)
(let ((v1-18 (-> obj nav state)))
(set! (-> v1-18 speed) (fmin (vector-length s5-1) (-> obj nav target-speed)))
)
0
(vector-xz-normalize! s5-1 16384.0)
(let ((v1-21 (-> obj nav state)))
(logior! (-> v1-21 flags) (nav-state-flag directional-mode))
(set! (-> v1-21 travel quad) (-> s5-1 quad))
)
)
0.0
)
)
)
)
)
;; definition for method 89 of type sig
;; WARN: Return type mismatch int vs symbol.
(defmethod enemy-method-89 sig ((obj sig) (arg0 enemy-jump-info))
(the-as
symbol
(when (logtest? (bot-flags bf23) (-> obj bot-flags))
(let ((a0-2 (-> obj skel root-channel 0)))
(set! (-> a0-2 param 0) 1.0)
(joint-control-channel-group! a0-2 (the-as art-joint-anim #f) num-func-loop!)
)
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-3 (-> obj draw art-group data (-> obj enemy-info-override jump-wind-up-anim)))
(a0-6 (-> obj skel root-channel 0))
)
(set! (-> a0-6 frame-group) (the-as art-joint-anim a1-3))
(set! (-> a0-6 param 0) (the float (+ (-> (the-as art-joint-anim a1-3) frames num-frames) -1)))
(set! (-> a0-6 param 1) (-> arg0 anim-speed))
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group! a0-6 (the-as art-joint-anim a1-3) num-func-seek!)
)
)
)
)
;; definition for method 88 of type sig
;; WARN: Return type mismatch int vs symbol.
(defmethod enemy-method-88 sig ((obj sig) (arg0 enemy-jump-info))
(the-as
symbol
(when (logtest? (bot-flags bf23) (-> obj bot-flags))
(let ((a0-2 (-> obj skel root-channel 0)))
(set! (-> a0-2 param 0) 1.0)
(joint-control-channel-group! a0-2 (the-as art-joint-anim #f) num-func-loop!)
)
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-3 (-> obj draw art-group data (-> obj enemy-info-override jump-land-anim)))
(a0-6 (-> obj skel root-channel 0))
)
(set! (-> a0-6 frame-group) (the-as art-joint-anim a1-3))
(set! (-> a0-6 param 0) (the float (+ (-> (the-as art-joint-anim a1-3) frames num-frames) -1)))
(set! (-> a0-6 param 1) (-> arg0 anim-speed))
(set! (-> a0-6 frame-num) 0.0)
(joint-control-channel-group! a0-6 (the-as art-joint-anim a1-3) num-func-seek!)
)
)
)
)
;; definition for method 198 of type sig
;; WARN: Return type mismatch float vs meters.
(defmethod set-cam-height! sig ((obj sig) (arg0 vector))
(cond
((and (-> obj next-state) (= (-> obj next-state name) 'failed))
(set-vector! arg0 0.0 4096.0 28672.0 1.0)
)
((logtest? (-> obj focus-status) (focus-status under-water))
(set-vector! arg0 0.0 12288.0 28672.0 1.0)
)
(else
(set-vector! arg0 0.0 20480.0 45056.0 1.0)
)
)
(vector<-cspace+vector! arg0 (-> obj node-list data 2) arg0)
(the-as
meters
(if (logtest? (-> obj focus-status) (focus-status under-water))
(set! (-> arg0 y) (+ (get-water-height obj) (-> *setting-control* cam-current target-height)))
)
)
)
;; definition for method 216 of type sig
;; WARN: Return type mismatch int vs none.
(defmethod bot-method-216 sig ((obj sig))
(set! (-> obj health-handle) (ppointer->handle (process-spawn hud-sig :init hud-init-by-other :to obj)))
0
(none)
)
;; definition for method 249 of type sig
;; WARN: Return type mismatch enemy-flag vs none.
(defmethod sig-method-249 sig ((obj sig) (arg0 sig-path))
(set! (-> obj sig-path) arg0)
(set! (-> obj sig-path-clock) (-> *display* user0-clock))
(set! (-> obj sig-path-start-time) (-> obj sig-path-clock frame-counter))
(set! (-> obj sig-path-cur-time) (-> obj sig-path-start-time))
(set! (-> obj sig-path-prev-time) (-> obj sig-path-start-time))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-active checking-water))
(none)
)
;; definition for method 248 of type sig
;; INFO: Used lq/sq
;; WARN: Return type mismatch vector vs none.
(defmethod sig-method-248 sig ((obj sig) (arg0 sig-path-sample))
(local-vars (at-0 int))
(with-pp
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((a0-1 (-> obj sig-path-clock frame-counter)))
(when (!= (-> obj sig-path-cur-time) a0-1)
(set! (-> obj sig-path-prev-time) (-> obj sig-path-cur-time))
(set! (-> obj sig-path-cur-time) a0-1)
(set! (-> obj event-param-point quad) (-> obj root-override2 trans quad))
)
)
(let ((s3-0 (+ (-> obj sig-path sample-count) -1))
(s2-0 (the int (* 0.05 (the float (- (-> obj sig-path-prev-time) (-> obj sig-path-start-time))))))
(s4-0 (the int (* 0.05 (the float (- (-> obj sig-path-cur-time) (-> obj sig-path-start-time))))))
)
(if (< s3-0 s2-0)
(set! s2-0 s3-0)
)
(if (< s3-0 s4-0)
(set! s4-0 s3-0)
)
(cond
((= s2-0 s4-0)
(mem-copy! (the-as pointer arg0) (the-as pointer (-> obj sig-path samples s2-0)) 64)
)
(else
(mem-copy! (the-as pointer arg0) (the-as pointer (-> obj sig-path samples s4-0)) 64)
(let ((v1-22 0))
(countdown (a0-9 (- s4-0 s2-0))
(set! v1-22 (logior v1-22 (logand (-> obj sig-path samples (+ a0-9 s2-0) flags) 3)))
)
(logior! (-> arg0 flags) v1-22)
)
)
)
(when (< s4-0 s3-0)
(let* ((f0-6 0.05)
(f1-5 (the float (- (-> obj sig-path-cur-time) (-> obj sig-path-start-time))))
(f30-0 (* f0-6 (- f1-5 (* (the float (the int (/ f1-5 20.0))) 20.0))))
(v1-30 (-> obj sig-path samples))
(s3-1 (-> v1-30 s4-0))
(s4-1 (-> v1-30 (+ s4-0 1)))
(s2-1 (-> arg0 flags))
)
(vector-lerp! (-> arg0 pos) (-> s3-1 pos) (-> s4-1 pos) f30-0)
(quaternion-slerp! (-> arg0 quat) (-> s3-1 quat) (-> s4-1 quat) f30-0)
(set! (-> arg0 flags) s2-1)
)
(vector-! (-> obj root-override2 transv) (-> arg0 pos) (-> obj event-param-point))
(let ((v0-5 (-> obj root-override2 transv)))
(.lvf vf1 (&-> (-> obj root-override2 transv) quad))
(let ((f0-7 (-> pp clock frames-per-second)))
(.mov at-0 f0-7)
)
(.mov vf2 at-0)
(.mov.vf vf1 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v0-5 quad) vf1)
)
)
)
(none)
)
)
)
;; definition for method 256 of type sig
;; WARN: Return type mismatch int vs none.
(defmethod sig-method-256 sig ((obj sig))
(let* ((v1-3 (the int (* 0.05 (the float (- (-> obj sig-path-cur-time) (-> obj sig-path-start-time))))))
(v1-4 (- (+ (-> obj sig-path sample-count) -1) v1-3))
)
(if (<= v1-4 0)
0
(* 20 v1-4)
)
)
(none)
)
;; definition for method 257 of type sig
(defmethod sig-method-257 sig ((obj sig))
(>= (the int (* 0.05 (the float (- (-> obj sig-path-cur-time) (-> obj sig-path-start-time)))))
(+ (-> obj sig-path sample-count) -1)
)
)
;; definition for method 250 of type sig
;; INFO: Used lq/sq
(defmethod sig-method-250 sig ((obj sig))
(local-vars (a2-7 float) (a2-14 float))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
)
(let ((s5-0 (new 'stack-no-clear 'sphere)))
(let ((v1-4 (+ (the int (* 0.05 (the float (- (-> obj sig-path-cur-time) (-> obj sig-path-start-time))))) 2))
(a0-3 (-> obj sig-path sample-count))
(a1-1 (-> obj sig-path samples))
)
(while (< v1-4 a0-3)
(let ((a2-1 (-> a1-1 v1-4)))
(when (not (logtest? (-> a2-1 flags) 4))
(set! (-> s5-0 quad) (-> a2-1 pos quad))
(set! (-> s5-0 r) 32768.0)
(goto cfg-8)
)
)
(+! v1-4 1)
)
)
(return #f)
(label cfg-8)
(let ((s4-0 (the-as process-drawable #f)))
(let ((f30-0 -1.0))
(set! *actor-list-length* 0)
(if #t
(set! *actor-list-length* (fill-actor-list-for-sphere *actor-hash* s5-0 *actor-list* 256))
)
(when #f
(let ((a0-7 (-> *collide-player-list* alive-list next0)))
*collide-player-list*
(let ((v1-21 (-> a0-7 next0)))
(while (!= a0-7 (-> *collide-player-list* alive-list-end))
(let* ((a0-8 (-> (the-as connection a0-7) param1))
(a1-3 (-> (the-as collide-shape a0-8) root-prim))
)
(when (logtest? (collide-spec hit-by-others-list pusher) (-> a1-3 prim-core collide-as))
(let ((a1-4 (-> a1-3 prim-core)))
(let ((a2-6 a1-4)
(a3-5 s5-0)
)
(.lvf vf2 (&-> a2-6 world-sphere quad))
(.lvf vf3 (&-> a3-5 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-7 vf1)
(let ((f0-4 a2-7)
(f1-3 (+ (-> a1-4 world-sphere w) (-> s5-0 r)))
)
(when (< f0-4 (* f1-3 f1-3))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-8))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-7 v1-21)
*collide-player-list*
(set! v1-21 (-> v1-21 next0))
)
)
)
)
(when #f
(let ((a0-10 (-> *collide-hit-by-player-list* alive-list next0)))
*collide-hit-by-player-list*
(let ((v1-28 (-> a0-10 next0)))
(while (!= a0-10 (-> *collide-hit-by-player-list* alive-list-end))
(let* ((a0-11 (-> (the-as connection a0-10) param1))
(a1-15 (-> (the-as collide-shape a0-11) root-prim))
)
(when (logtest? (collide-spec hit-by-others-list pusher) (-> a1-15 prim-core collide-as))
(let ((a1-16 (-> a1-15 prim-core)))
(let ((a2-13 a1-16)
(a3-7 s5-0)
)
(.lvf vf2 (&-> a2-13 world-sphere quad))
(.lvf vf3 (&-> a3-7 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-14 vf1)
(let ((f0-5 a2-14)
(f1-7 (+ (-> a1-16 world-sphere w) (-> s5-0 r)))
)
(when (< f0-5 (* f1-7 f1-7))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-11))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-10 v1-28)
*collide-hit-by-player-list*
(set! v1-28 (-> v1-28 next0))
)
)
)
)
(dotimes (s3-0 *actor-list-length*)
(let* ((v1-33 (-> *actor-list* s3-0))
(a0-14 (-> v1-33 root-prim))
)
(when (logtest? (collide-spec hit-by-others-list pusher) (-> a0-14 prim-core collide-as))
(let* ((s1-0 (-> v1-33 process))
(s2-0 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(when s2-0
(let ((f0-6 (vector-vector-distance-squared s5-0 (get-trans (the-as process-focusable s2-0) 0))))
(when (or (< f30-0 0.0) (< f0-6 f30-0))
(set! f30-0 f0-6)
(set! s4-0 s2-0)
)
)
)
)
)
)
)
)
(cond
(s4-0
(fire-gun obj (get-trans (the-as process-focusable s4-0) 3))
#t
)
(else
#f
)
)
)
)
)
)
;; definition for method 15 of type hud-sig
;; WARN: Return type mismatch int vs none.
(defmethod draw hud-sig ((obj hud-sig))
(set-hud-piece-position!
(-> obj sprites 2)
(the int (+ 30.0 (* -130.0 (-> obj offset))))
(the int (+ 30.0 (* -100.0 (-> obj offset))))
)
(set! (-> obj sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> obj values 0 current)) 100)))))
(set-as-offset-from! (the-as hud-sprite (-> obj sprites)) (the-as vector4w (-> obj sprites 2)) 40 16)
(set-as-offset-from! (-> obj sprites 1) (the-as vector4w (-> obj sprites 2)) 1 16)
(set-as-offset-from! (-> obj sprites 3) (the-as vector4w (-> obj sprites 2)) 15 2)
((method-of-type hud draw) obj)
0
(none)
)
;; definition for method 16 of type hud-sig
;; WARN: Return type mismatch int vs none.
(defmethod update-values hud-sig ((obj hud-sig))
(set! (-> obj values 0 target) (the int (* 100.0 (-> *game-info* bot-health 0))))
((method-of-type hud update-values) obj)
0
(none)
)
;; definition for method 17 of type hud-sig
;; WARN: Return type mismatch int vs none.
(defmethod init-callback hud-sig ((obj hud-sig))
(set! (-> obj gui-id)
(add-process *gui-control* obj (gui-channel hud-upper-left) (gui-action hidden) (-> obj name) 81920.0 0)
)
(logior! (-> obj flags) (hud-flags show))
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x1e :page #x67a)))
(set! (-> obj sprites 0 scale-x) 12.0)
(set! (-> obj sprites 0 scale-y) 11.2)
(set! (-> obj sprites 0 pos z) #xfffff2)
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x25 :page #x67a)))
(set! (-> obj sprites 1 pos z) #xfffff0)
(set! (-> obj sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x12 :page #x67a)))
(set! (-> obj sprites 2 pos z) #xffffff)
(set! (-> obj sprites 3 tex)
(lookup-texture-by-name "hud-sig-head" (the-as string #f) (the-as (pointer texture-page) #f))
)
(set! (-> obj sprites 3 scale-x) 1.0)
(set! (-> obj sprites 3 scale-y) 1.4)
(set! (-> obj sprites 3 pos z) #xffffff)
0
(none)
)