mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 21:28:00 -04:00
a857061e96
There are *a lot* of file changes and while I have carefully gone through every gsrc change to fix up manual patches, there might still be spots that I missed.
1508 lines
53 KiB
Common Lisp
Vendored
Generated
1508 lines
53 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type ashelin-anim-info
|
|
(deftype ashelin-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 ashelin-anim-info
|
|
(defmethod inspect ashelin-anim-info ((obj ashelin-anim-info))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'ashelin-anim-info)
|
|
(format #t "~1Tanim-index: ~D~%" (-> obj anim-index))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type ashelin-global-info
|
|
(deftype ashelin-global-info (basic)
|
|
((prev-blue-hit int8 :offset-assert 4)
|
|
(blue-hit-anim int32 6 :offset-assert 8)
|
|
(blue-hit-land-anim int32 6 :offset-assert 32)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x38
|
|
:flag-assert #x900000038
|
|
)
|
|
|
|
;; definition for method 3 of type ashelin-global-info
|
|
(defmethod inspect ashelin-global-info ((obj ashelin-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[6] @ #x~X~%" (-> obj blue-hit-anim))
|
|
(format #t "~1Tblue-hit-land-anim[6] @ #x~X~%" (-> obj blue-hit-land-anim))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *ashelin-global-info*, type ashelin-global-info
|
|
(define *ashelin-global-info* (new 'static 'ashelin-global-info
|
|
:blue-hit-anim (new 'static 'array int32 6 13 14 15 19 20 21)
|
|
:blue-hit-land-anim (new 'static 'array int32 6 16 17 18 22 23 24)
|
|
)
|
|
)
|
|
|
|
;; definition for symbol *ashelin-nav-enemy-info*, type nav-enemy-info
|
|
(define *ashelin-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 #x3 :param0 #x1 :param1 #x1)
|
|
(new 'static 'idle-control-frame)
|
|
(new 'static 'idle-control-frame)
|
|
(new 'static 'idle-control-frame)
|
|
)
|
|
:idle-anim 3
|
|
:notice-anim 3
|
|
:hostile-anim -1
|
|
:hit-anim 3
|
|
:knocked-anim 10
|
|
:knocked-land-anim 11
|
|
:die-anim 26
|
|
:die-falling-anim 26
|
|
:victory-anim -1
|
|
:jump-wind-up-anim 3
|
|
:jump-in-air-anim 3
|
|
:jump-land-anim 3
|
|
:neck-joint 5
|
|
:look-at-joint 6
|
|
:bullseye-joint 4
|
|
:notice-distance (meters 40)
|
|
:notice-distance-delta (meters 10)
|
|
:proximity-notice-distance (meters 20)
|
|
:default-hit-points 10
|
|
:gnd-collide-with (collide-spec backgnd)
|
|
: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 57344.0
|
|
:knocked-soft-vxz-hi 57344.0
|
|
:knocked-soft-vy-lo 81920.0
|
|
:knocked-soft-vy-hi 81920.0
|
|
:knocked-medium-vxz-lo 57344.0
|
|
:knocked-medium-vxz-hi 57344.0
|
|
:knocked-medium-vy-lo 81920.0
|
|
:knocked-medium-vy-hi 81920.0
|
|
:knocked-hard-vxz-lo 57344.0
|
|
:knocked-hard-vxz-hi 57344.0
|
|
:knocked-hard-vy-lo 81920.0
|
|
:knocked-hard-vy-hi 81920.0
|
|
: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 57344.0
|
|
:knocked-yellow-vxz-hi 57344.0
|
|
:knocked-yellow-vy-lo 81920.0
|
|
:knocked-yellow-vy-hi 81920.0
|
|
:knocked-red-vxz-lo 57344.0
|
|
:knocked-red-vxz-hi 57344.0
|
|
:knocked-red-vy-lo 81920.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 #f
|
|
:use-circling #f
|
|
:use-pacing #f
|
|
:walk-anim 4
|
|
:turn-anim -1
|
|
:run-anim 6
|
|
:taunt-anim -1
|
|
:run-travel-speed (meters 10)
|
|
:run-acceleration (meters 25)
|
|
:run-turning-acceleration (meters 12)
|
|
:walk-travel-speed (meters 3)
|
|
:walk-acceleration (meters 5)
|
|
: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! (-> *ashelin-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*)
|
|
|
|
;; definition for method 59 of type ashelin
|
|
(defmethod get-penetrate-info ashelin ((obj ashelin))
|
|
"@returns the allowed way(s) this enemy can take damage
|
|
@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]"
|
|
(let* ((t9-0 (method-of-type bot get-penetrate-info))
|
|
(v0-0 (t9-0 obj))
|
|
)
|
|
(if (logtest? (bot-flags bf22) (-> obj bot-flags))
|
|
(set! v0-0 (logior (penetrate jak-yellow-shot) v0-0))
|
|
)
|
|
v0-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 250 of type ashelin
|
|
;; WARN: Return type mismatch penetrate vs none.
|
|
(defmethod ashelin-method-250 ashelin ((obj ashelin) (arg0 symbol))
|
|
(if arg0
|
|
(set! (-> obj bot-flags) (logior (bot-flags bf22) (-> obj bot-flags)))
|
|
(logclear! (-> obj bot-flags) (bot-flags bf22))
|
|
)
|
|
(set! (-> obj root-override2 penetrated-by) (get-penetrate-info obj))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 193 of type ashelin
|
|
(defmethod bot-method-193 ashelin ((obj ashelin))
|
|
(let* ((t9-0 (method-of-type bot bot-method-193))
|
|
(v0-0 (t9-0 obj))
|
|
)
|
|
(when (and (not v0-0) (logtest? #x400000 (-> obj incoming penetrate-using)))
|
|
(if (logtest? (bot-flags bf22) (-> obj bot-flags))
|
|
(set! v0-0 #t)
|
|
)
|
|
(set! (-> obj bot-flags) (logior (bot-flags bf21) (-> obj bot-flags)))
|
|
)
|
|
v0-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 106 of type ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod enemy-method-106 ashelin ((obj ashelin) (arg0 process) (arg1 object) (arg2 int) (arg3 attack-info))
|
|
(let ((t9-0 (method-of-type bot enemy-method-106)))
|
|
(t9-0 obj arg0 arg1 arg2 arg3)
|
|
)
|
|
(if (!= (-> obj incoming knocked-type) (knocked-type knocked-type-6))
|
|
(set! (-> obj incoming knocked-type) (knocked-type knocked-type-1))
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 104 of type ashelin
|
|
(defmethod enemy-method-104 ashelin ((obj ashelin) (arg0 process) (arg1 uint) (arg2 uint))
|
|
(if (and (= (-> arg0 type) target)
|
|
(-> obj next-state)
|
|
(let ((v1-4 (-> obj next-state name)))
|
|
(or (= v1-4 'back-spring) (= v1-4 'cartwheel-left) (= v1-4 'tumble-right))
|
|
)
|
|
)
|
|
#f
|
|
((method-of-type bot enemy-method-104) obj arg0 arg1 arg2)
|
|
)
|
|
)
|
|
|
|
;; definition for method 97 of type ashelin
|
|
(defmethod enemy-method-97 ashelin ((obj ashelin))
|
|
(with-pp
|
|
(let* ((s5-0 (handle->process (-> obj attacker-handle)))
|
|
(v1-3 (if (type? s5-0 process-focusable)
|
|
s5-0
|
|
)
|
|
)
|
|
)
|
|
(when v1-3
|
|
(cond
|
|
((= (-> v1-3 type) target)
|
|
(when (or (not (logtest? (-> obj bot-flags) (bot-flags attacked)))
|
|
(>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 5))
|
|
)
|
|
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
|
|
(reset-attacker! obj)
|
|
)
|
|
(set! v1-3 (the-as process #f))
|
|
(set! (-> obj attacker-handle) (the-as handle #f))
|
|
)
|
|
)
|
|
(else
|
|
(when (>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 2.5))
|
|
(set! v1-3 (the-as process #f))
|
|
(set! (-> obj attacker-handle) (the-as handle #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((a0-21 (-> obj focus-mode))
|
|
(s5-1 (the-as process #f))
|
|
)
|
|
(cond
|
|
((zero? a0-21)
|
|
(cond
|
|
(v1-3
|
|
(set! s5-1 v1-3)
|
|
)
|
|
((begin (set! s5-1 (select-focus! obj)) s5-1)
|
|
(empty)
|
|
)
|
|
(else
|
|
(let ((s4-0 (handle->process (-> obj poi-handle))))
|
|
(set! s5-1 (if (type? s4-0 process-focusable)
|
|
s4-0
|
|
)
|
|
)
|
|
)
|
|
(if s5-1
|
|
(empty)
|
|
(set! s5-1 *target*)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= a0-21 1)
|
|
(cond
|
|
(v1-3
|
|
(set! s5-1 v1-3)
|
|
)
|
|
(else
|
|
(let ((s4-1 (handle->process (-> obj poi-handle))))
|
|
(set! s5-1 (if (type? s4-1 process-focusable)
|
|
s4-1
|
|
)
|
|
)
|
|
)
|
|
(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)) (!= (-> 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 183 of type ashelin
|
|
;; WARN: Return type mismatch object vs symbol.
|
|
(defmethod alive? ashelin ((obj ashelin))
|
|
(let ((t9-0 (method-of-type bot alive?)))
|
|
(the-as
|
|
symbol
|
|
(and (t9-0 obj) (-> obj next-state) (let ((v1-3 (-> obj next-state name)))
|
|
(or (= v1-3 'waiting-idle) (= v1-3 'hidden) (= v1-3 'traveling))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 114 of type ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-enemy-collision! ashelin ((obj ashelin))
|
|
"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)
|
|
)
|
|
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
|
|
(set! (-> s5-0 total-prims) (the-as uint 4))
|
|
(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 deadly no-standon))
|
|
(set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 8192.0)
|
|
(set! (-> s5-0 root-prim) s4-0)
|
|
)
|
|
(let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> v1-12 prim-core collide-as) (collide-spec bot bot-targetable))
|
|
(set! (-> v1-12 prim-core collide-with)
|
|
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
|
)
|
|
(set! (-> v1-12 prim-core action) (collide-action solid can-ride deadly))
|
|
(set-vector! (-> v1-12 local-sphere) 0.0 3276.8 0.0 3276.8)
|
|
)
|
|
(let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> v1-14 prim-core collide-as) (collide-spec bot bot-targetable))
|
|
(set! (-> v1-14 prim-core collide-with)
|
|
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
|
)
|
|
(set! (-> v1-14 prim-core action) (collide-action solid deadly))
|
|
(set-vector! (-> v1-14 local-sphere) 0.0 5324.8 0.0 3276.8)
|
|
)
|
|
(let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
|
|
(set! (-> v1-16 prim-core collide-as) (collide-spec bot bot-targetable))
|
|
(set! (-> v1-16 prim-core collide-with)
|
|
(collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher)
|
|
)
|
|
(set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon))
|
|
(set-vector! (-> v1-16 local-sphere) 0.0 7372.8 0.0 3276.8)
|
|
)
|
|
(set! (-> s5-0 nav-radius) 5120.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! (-> s5-0 event-priority) (the-as uint 7))
|
|
(set! (-> obj root-override2) s5-0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 115 of type ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-enemy! ashelin ((obj ashelin))
|
|
"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 22))
|
|
(set! (-> obj travel-anim-interp) 0.0)
|
|
(set! (-> obj focus-info max-los-dist) 204800.0)
|
|
(set! (-> obj hit-invuln-ignore-me-delay) (the-as uint 0))
|
|
(set! (-> obj hit-invuln-focus-disable-delay) (the-as uint 750))
|
|
(initialize-skeleton
|
|
obj
|
|
(the-as skeleton-group (art-group-get-by-name *level* "skel-ashelin" (the-as (pointer uint32) #f)))
|
|
(the-as pair 0)
|
|
)
|
|
(init-enemy-behaviour-and-stats! obj *ashelin-nav-enemy-info*)
|
|
(let ((v1-10 (-> obj neck)))
|
|
(set! (-> v1-10 up) (the-as uint 1))
|
|
(set! (-> v1-10 nose) (the-as uint 2))
|
|
(set! (-> v1-10 ear) (the-as uint 0))
|
|
(set-vector! (-> v1-10 twist-max) 11832.889 11832.889 0.0 1.0)
|
|
(set! (-> v1-10 ignore-angle) 30947.555)
|
|
)
|
|
(let ((t9-4 (method-of-type bot init-enemy!)))
|
|
(t9-4 obj)
|
|
)
|
|
(set! (-> obj my-simple-focus) (process-spawn simple-focus :to obj))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 238 of type ashelin
|
|
;; WARN: disable def twice: 25. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
|
(defmethod ashelin-method-238 ashelin ((obj ashelin) (arg0 symbol) (arg1 symbol))
|
|
(cond
|
|
((and (logtest? (-> obj bot-flags) (bot-flags attacked)) (= (-> obj focus-info fproc type) target))
|
|
#t
|
|
)
|
|
(else
|
|
(let ((f0-0 81920.0))
|
|
(if arg1
|
|
(set! f0-0 (+ 6144.0 f0-0))
|
|
)
|
|
(when (>= f0-0 (-> obj focus-info bullseye-xz-dist))
|
|
(let ((v1-9 (-> obj focus-info los)))
|
|
(if arg0
|
|
(or (= v1-9 1) (= v1-9 4))
|
|
(= v1-9 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 235 of type ashelin
|
|
(defmethod ashelin-method-235 ashelin ((obj ashelin) (arg0 symbol))
|
|
(with-pp
|
|
(and (>= (- (-> pp clock frame-counter) (-> obj last-fire-time)) (seconds 1))
|
|
(and (>= 8556.089 (fabs (-> obj focus-info ry-diff))) (ashelin-method-238 obj arg0 #t))
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 243 of type ashelin
|
|
(defmethod ashelin-method-243 ashelin ((obj ashelin) (arg0 float))
|
|
(let ((f30-0 (deg- arg0 (-> obj focus-info my-facing-ry))))
|
|
(when (>= 16384.0 (fabs f30-0))
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(when (ashelin-method-236 obj s5-0 (+ 32768.0 arg0) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s5-0 (-> obj root-override2 trans))
|
|
(return 1)
|
|
)
|
|
(cond
|
|
((< 0.0 f30-0)
|
|
(when (ashelin-method-236 obj s5-0 (+ -16384.0 arg0) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s5-0 (-> obj root-override2 trans))
|
|
(return 2)
|
|
)
|
|
)
|
|
(else
|
|
(when (ashelin-method-236 obj s5-0 (+ 16384.0 arg0) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s5-0 (-> obj root-override2 trans))
|
|
(return 3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; definition for method 246 of type ashelin
|
|
(defmethod ashelin-method-246 ashelin ((obj ashelin))
|
|
(when (>= 32768.0 (-> obj focus-info bullseye-xz-dist))
|
|
(let ((f0-1 (-> obj focus-info bullseye-ry)))
|
|
(return (ashelin-method-243 obj f0-1))
|
|
)
|
|
)
|
|
(when (logtest? (bot-flags bf20) (-> obj bot-flags))
|
|
(set! (-> obj root-override2 trans w) 1.0)
|
|
(when (>= (vector4-dot (the-as vector (-> obj frontline)) (-> obj root-override2 trans)) 12288.0)
|
|
(let ((f0-7 (atan (-> obj frontline x) (-> obj frontline z))))
|
|
(return (ashelin-method-243 obj f0-7))
|
|
)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
;; definition for method 241 of type ashelin
|
|
(defmethod ashelin-method-241 ashelin ((obj ashelin))
|
|
(let* ((v1-0 (target-pos 0))
|
|
(a1-0 (-> obj root-override2 trans))
|
|
(f30-0 (atan (- (-> a1-0 x) (-> v1-0 x)) (- (-> a1-0 z) (-> v1-0 z))))
|
|
(f0-5 (deg- f30-0 (-> obj focus-info my-facing-ry)))
|
|
(s5-0 0)
|
|
)
|
|
(cond
|
|
((or (>= 8192.0 (fabs f0-5)) (>= (fabs f0-5) 24576.0))
|
|
(let ((s3-1 (zero? (get-rand-int obj 2)))
|
|
(s4-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(countdown (s2-0 2)
|
|
(cond
|
|
(s3-1
|
|
(when (ashelin-method-236 obj s4-0 (+ 16384.0 f30-0) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s4-0 (-> obj root-override2 trans))
|
|
(set! s5-0 3)
|
|
(goto cfg-20)
|
|
)
|
|
)
|
|
(else
|
|
(when (ashelin-method-236 obj s4-0 (+ -16384.0 f30-0) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s4-0 (-> obj root-override2 trans))
|
|
(set! s5-0 2)
|
|
(goto cfg-20)
|
|
)
|
|
)
|
|
)
|
|
(set! s3-1 (not s3-1))
|
|
)
|
|
)
|
|
(label cfg-20)
|
|
)
|
|
(else
|
|
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
|
(when (ashelin-method-236 obj s4-1 (+ 32768.0 f30-0) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s4-1 (-> obj root-override2 trans))
|
|
(set! s5-0 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
s5-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 242 of type ashelin
|
|
(defmethod ashelin-method-242 ashelin ((obj ashelin))
|
|
(let ((s5-0 0))
|
|
(cond
|
|
((zero? (get-rand-int obj 2))
|
|
(when (>= 16384.0 (fabs (-> obj focus-info ry-diff)))
|
|
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
|
(when (ashelin-method-236 obj s4-0 (+ 16384.0 (-> obj focus-info bullseye-ry)) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s4-0 (-> obj root-override2 trans))
|
|
(set! s5-0 3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(when (>= 16384.0 (fabs (-> obj focus-info ry-diff)))
|
|
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
|
(when (ashelin-method-236 obj s4-1 (+ -16384.0 (-> obj focus-info bullseye-ry)) 8192.0 40707.93 34563.93)
|
|
(vector+! (-> obj move-dest) s4-1 (-> obj root-override2 trans))
|
|
(set! s5-0 2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
s5-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 240 of type ashelin
|
|
;; WARN: Return type mismatch object vs none.
|
|
(defmethod ashelin-method-240 ashelin ((obj ashelin) (arg0 int))
|
|
(case arg0
|
|
((3)
|
|
(go (method-of-object obj cartwheel-left))
|
|
)
|
|
((2)
|
|
(go (method-of-object obj tumble-right))
|
|
)
|
|
(else
|
|
(go (method-of-object obj back-spring))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 247 of type ashelin
|
|
;; INFO: Used lq/sq
|
|
(defmethod ashelin-method-247 ashelin ((obj ashelin))
|
|
(cond
|
|
((logtest? (bot-flags bf20) (-> obj bot-flags))
|
|
(set! (-> obj root-override2 trans w) 1.0)
|
|
(set! (-> obj focus-info bullseye w) 1.0)
|
|
(let ((f30-0 (vector4-dot (the-as vector (-> obj frontline)) (-> obj root-override2 trans))))
|
|
(let ((f0-4 (vector4-dot (the-as vector (-> obj frontline)) (-> obj focus-info bullseye))))
|
|
(if (or (>= 0.0 f0-4) (>= -8192.0 f30-0))
|
|
(return #t)
|
|
)
|
|
)
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(vector-! s5-0 (-> obj focus-info bullseye) (-> obj root-override2 trans))
|
|
(set! (-> s5-0 y) 0.0)
|
|
(vector-normalize! s5-0 1.0)
|
|
(if (>= -0.342 (vector-dot s5-0 (the-as vector (-> obj frontline))))
|
|
(return #t)
|
|
)
|
|
(if (>= f30-0 0.0)
|
|
(return #f)
|
|
)
|
|
(let ((a2-0 (new 'stack-no-clear 'vector))
|
|
(a0-8 (new 'stack-no-clear 'vector))
|
|
)
|
|
(vector-float*! a2-0 (the-as vector (-> obj frontline)) (- (-> obj frontline w)))
|
|
(set! (-> a0-8 quad) (-> obj root-override2 trans quad))
|
|
(set! (-> a0-8 y) 0.0)
|
|
(>= (intersect-ray-plane a0-8 s5-0 a2-0 (-> obj frontline)) 8192.0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 248 of type ashelin
|
|
(defmethod ashelin-method-248 ashelin ((obj ashelin))
|
|
(when (logtest? (bot-flags bf20) (-> obj bot-flags))
|
|
(set! (-> obj root-override2 trans w) 1.0)
|
|
(set! (-> obj focus-info bullseye w) 1.0)
|
|
(let ((f0-3 (vector4-dot (the-as vector (-> obj frontline)) (-> obj root-override2 trans)))
|
|
(f1-1 (vector4-dot (the-as vector (-> obj frontline)) (-> obj focus-info bullseye)))
|
|
)
|
|
(when (and (< 0.0 f1-1) (< 0.0 f0-3))
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(vector-! s5-0 (-> obj focus-info bullseye) (-> obj root-override2 trans))
|
|
(set! (-> s5-0 y) 0.0)
|
|
(vector-normalize! s5-0 1.0)
|
|
(>= (vector-dot s5-0 (the-as vector (-> obj frontline))) 0.0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 70 of type ashelin
|
|
(defmethod go-hostile ashelin ((obj ashelin))
|
|
(bot-method-223 obj #t)
|
|
(cond
|
|
((not (bot-method-214 obj))
|
|
(react-to-focus obj)
|
|
)
|
|
((ashelin-method-238 obj #t #f)
|
|
(go (method-of-object obj standing-idle))
|
|
)
|
|
((ashelin-method-247 obj)
|
|
(go (method-of-object obj chase))
|
|
)
|
|
(else
|
|
(go (method-of-object obj standing-idle))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 72 of type ashelin
|
|
(defmethod react-to-focus ashelin ((obj ashelin))
|
|
"@TODO - flesh out docs"
|
|
(if (bot-method-214 obj)
|
|
(go-hostile obj)
|
|
(ashelin-method-239 obj)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 239 of type ashelin
|
|
;; WARN: Return type mismatch object vs none.
|
|
(defmethod ashelin-method-239 ashelin ((obj ashelin))
|
|
(if (bot-method-214 obj)
|
|
(go (method-of-object obj standing-idle))
|
|
(go (method-of-object obj waiting-idle))
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 116 of type ashelin
|
|
;; WARN: Return type mismatch object vs none.
|
|
(defmethod go-idle ashelin ((obj ashelin))
|
|
(go (method-of-object obj hidden))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 237 of type ashelin
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch (pointer process) vs none.
|
|
(defmethod fire-projectile ashelin ((obj ashelin) (arg0 vector))
|
|
(with-pp
|
|
(set! (-> obj last-fire-time) (-> pp clock frame-counter))
|
|
(+! (-> obj fired-gun-count) 1)
|
|
(let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
|
(set! (-> s4-0 ent) (-> obj entity))
|
|
(set! (-> s4-0 charge) 1.0)
|
|
(set! (-> s4-0 options) (projectile-options account-for-target-velocity proj-options-8000))
|
|
(set! (-> s4-0 notify-handle) (process->handle obj))
|
|
(set! (-> s4-0 owner-handle) (the-as handle #f))
|
|
(set! (-> s4-0 ignore-handle) (process->handle obj))
|
|
(let* ((v1-13 *game-info*)
|
|
(a0-10 (+ (-> v1-13 attack-id) 1))
|
|
)
|
|
(set! (-> v1-13 attack-id) a0-10)
|
|
(set! (-> s4-0 attack-id) a0-10)
|
|
)
|
|
(set! (-> s4-0 timeout) (seconds 4))
|
|
(vector<-cspace! (-> s4-0 pos) (-> obj node-list data 22))
|
|
(set! (-> s4-0 vel quad) (-> arg0 quad))
|
|
(vector-! (-> s4-0 vel) (-> s4-0 vel) (-> s4-0 pos))
|
|
(vector-normalize! (-> s4-0 vel) 307200.0)
|
|
(spawn-projectile ashelin-shot s4-0 obj *default-dead-pool*)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 249 of type ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod ashelin-method-249 ashelin ((obj ashelin))
|
|
(with-pp
|
|
(let* ((f30-0 (-> obj nav state speed))
|
|
(f0-1 (lerp-scale 0.0 2.0 f30-0 12288.0 40960.0))
|
|
(f1-0 (-> obj travel-anim-interp))
|
|
(v1-5 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and v1-5 (= v1-5 (-> obj draw art-group data 5)))
|
|
(let ((f28-0 f1-0)
|
|
(f0-4 (seek f1-0 f0-1 (* 4.0 (-> pp clock seconds-per-frame))))
|
|
)
|
|
(cond
|
|
((logtest? (bot-flags bf19) (-> obj bot-flags))
|
|
(if (< f0-4 1.0)
|
|
(set! f0-4 (cond
|
|
((= f28-0 1.0)
|
|
(let ((v1-17 (-> obj skel root-channel 1)))
|
|
(set! (-> v1-17 dist) 13107.2)
|
|
(set! (-> v1-17 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
|
|
)
|
|
(logclear! (-> obj bot-flags) (bot-flags bf19))
|
|
f0-4
|
|
)
|
|
(else
|
|
1.0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(if (< 1.0 f0-4)
|
|
(set! f0-4 (cond
|
|
((= f28-0 1.0)
|
|
(let ((v1-27 (-> obj skel root-channel 1)))
|
|
(set! (-> v1-27 dist) 43690.68)
|
|
(set! (-> v1-27 frame-group) (the-as art-joint-anim (-> obj draw art-group data 6)))
|
|
)
|
|
(set! (-> obj bot-flags) (logior (bot-flags bf19) (-> obj bot-flags)))
|
|
f0-4
|
|
)
|
|
(else
|
|
1.0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> obj travel-anim-interp) f0-4)
|
|
(let ((f0-7 (if (logtest? (bot-flags bf19) (-> obj bot-flags))
|
|
(+ -1.0 f0-4)
|
|
(- 1.0 f0-4)
|
|
)
|
|
)
|
|
(v1-39 (-> obj skel root-channel 1))
|
|
)
|
|
(set! (-> v1-39 frame-interp 1) f0-7)
|
|
(set! (-> v1-39 frame-interp 0) f0-7)
|
|
)
|
|
)
|
|
(let* ((f28-1 (current-cycle-distance (-> obj skel)))
|
|
(f0-8 (quaternion-y-angle (-> obj root-override2 quat)))
|
|
(f1-10 (deg- f0-8 (-> obj travel-prev-ry)))
|
|
(f0-11 (fmin 40960.0 (* 0.35342914 (-> pp clock frames-per-second) (fabs f1-10))))
|
|
(f0-14 (/ (* 16.0 (fmax f30-0 f0-11)) (* 15.0 f28-1)))
|
|
(a0-22 (-> obj skel root-channel 0))
|
|
)
|
|
(set! (-> a0-22 param 0) f0-14)
|
|
(joint-control-channel-group-eval! a0-22 (the-as art-joint-anim #f) num-func-loop!)
|
|
)
|
|
(let ((a0-23 (-> obj skel root-channel 1)))
|
|
(set! (-> a0-23 param 0) 0.0)
|
|
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan)
|
|
)
|
|
)
|
|
(else
|
|
(let ((f30-1 (seek f1-0 f0-1 (* 4.0 (-> pp clock seconds-per-frame)))))
|
|
(set! (-> obj travel-anim-interp) f30-1)
|
|
(ja-channel-push! 2 (seconds 0.15))
|
|
(let ((a0-26 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-26 dist) 26214.4)
|
|
(set! (-> a0-26 frame-group) (the-as art-joint-anim (-> obj draw art-group data 5)))
|
|
(set! (-> a0-26 param 0) 1.0)
|
|
(joint-control-channel-group! a0-26 (the-as art-joint-anim (-> obj draw art-group data 5)) num-func-loop!)
|
|
)
|
|
(cond
|
|
((< f30-1 1.0)
|
|
(let ((f0-22 (- 1.0 f30-1))
|
|
(a0-27 (-> obj skel root-channel 1))
|
|
)
|
|
(set! (-> a0-27 frame-interp 1) f0-22)
|
|
(set! (-> a0-27 frame-interp 0) f0-22)
|
|
(set! (-> a0-27 dist) 13107.2)
|
|
(set! (-> a0-27 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4)))
|
|
(set! (-> a0-27 param 0) 0.0)
|
|
(joint-control-channel-group! a0-27 (the-as art-joint-anim (-> obj draw art-group data 4)) num-func-chan)
|
|
)
|
|
(logclear! (-> obj bot-flags) (bot-flags bf19))
|
|
)
|
|
(else
|
|
(let ((f0-26 (+ -1.0 f30-1))
|
|
(a0-29 (-> obj skel root-channel 1))
|
|
)
|
|
(set! (-> a0-29 frame-interp 1) f0-26)
|
|
(set! (-> a0-29 frame-interp 0) f0-26)
|
|
(set! (-> a0-29 dist) 43690.68)
|
|
(set! (-> a0-29 frame-group) (the-as art-joint-anim (-> obj draw art-group data 6)))
|
|
(set! (-> a0-29 param 0) 0.0)
|
|
(joint-control-channel-group! a0-29 (the-as art-joint-anim (-> obj draw art-group data 6)) num-func-chan)
|
|
)
|
|
(set! (-> obj bot-flags) (logior (bot-flags bf19) (-> obj bot-flags)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 51 of type ashelin
|
|
;; INFO: Used lq/sq
|
|
(defmethod enemy-method-51 ashelin ((obj ashelin))
|
|
(local-vars (v1-36 art-element))
|
|
(let ((f28-0 (quaternion-y-angle (-> obj root-override2 quat))))
|
|
(case (-> obj incoming knocked-type)
|
|
(((knocked-type knocked-type-6))
|
|
(let ((a0-4 (handle->process (-> obj focus handle))))
|
|
(when a0-4
|
|
(get-trans (the-as process-focusable a0-4) 0)
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(set! (-> s5-0 quad) (-> obj root-override2 transv quad))
|
|
(if (< (vector-dot
|
|
(-> obj root-override2 transv)
|
|
(vector-z-quaternion! (new 'stack-no-clear 'vector) (-> obj root-override2 quat))
|
|
)
|
|
0.0
|
|
)
|
|
(vector-negate-in-place! s5-0)
|
|
)
|
|
(set! f28-0 (atan (-> s5-0 x) (-> s5-0 z)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
|
0.0
|
|
0.0
|
|
(vector-z-quaternion! s5-1 (-> obj root-override2 quat))
|
|
(let ((f28-1 (atan (-> s5-1 x) (-> s5-1 z))))
|
|
(enemy-method-50 obj s5-1)
|
|
(let* ((f30-0 (atan (-> s5-1 x) (-> s5-1 z)))
|
|
(f0-10 (deg- f30-0 f28-1))
|
|
)
|
|
(set! f28-0 (if (>= 16384.0 (fabs f0-10))
|
|
f30-0
|
|
(the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))
|
|
)
|
|
)
|
|
(cond
|
|
((and (>= 8192.0 f0-10) (>= f0-10 -16384.0))
|
|
(set! v1-36 (-> obj draw art-group data 10))
|
|
)
|
|
((>= f0-10 8192.0)
|
|
(set! v1-36 (-> obj draw art-group data 7))
|
|
(set! f28-0 (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48)))
|
|
)
|
|
((zero? (get-rand-int obj 3))
|
|
(set! v1-36 (-> obj draw art-group data 10))
|
|
)
|
|
(else
|
|
(set! v1-36 (-> obj draw art-group data 7))
|
|
(set! f28-0 (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> obj knocked-anim) (the-as art-joint-anim v1-36))
|
|
)
|
|
)
|
|
f28-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 77 of type ashelin
|
|
(defmethod enemy-method-77 ashelin ((obj ashelin) (arg0 (pointer float)))
|
|
(local-vars (a2-0 int))
|
|
(case (-> obj incoming knocked-type)
|
|
(((knocked-type knocked-type-6))
|
|
(let ((s5-1 (ash 1 (-> *ashelin-global-info* prev-blue-hit)))
|
|
(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-6 (atan (-> s4-0 x) (-> s4-0 z)))
|
|
(f0-8 (fabs (deg- f0-6 f30-0)))
|
|
)
|
|
(if (>= 16384.0 f0-8)
|
|
(set! a2-0 (logior s5-1 7))
|
|
(set! a2-0 (logior s5-1 56))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let* ((v1-9 (enemy-method-120 obj 6 a2-0))
|
|
(s5-2 (-> obj draw art-group data (-> *ashelin-global-info* blue-hit-anim v1-9)))
|
|
)
|
|
(set! (-> *ashelin-global-info* prev-blue-hit) v1-9)
|
|
(let ((v1-12 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(if (and v1-12 (or (= v1-12 (-> obj draw art-group data 16))
|
|
(= v1-12 (-> obj draw art-group data 17))
|
|
(= v1-12 (-> obj draw art-group data 18))
|
|
(= v1-12 (-> obj draw art-group data 22))
|
|
(= v1-12 (-> obj draw art-group data 23))
|
|
(= v1-12 (-> obj draw art-group data 24))
|
|
)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.17))
|
|
(ja-channel-push! 1 (seconds 0.02))
|
|
)
|
|
)
|
|
(let ((a0-38 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-38 frame-group) (the-as art-joint-anim s5-2))
|
|
(set! (-> a0-38 param 0) (the float (+ (-> (the-as art-joint-anim s5-2) frames num-frames) -1)))
|
|
(set! (-> a0-38 param 1) 1.0)
|
|
(set! (-> a0-38 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-38 (the-as art-joint-anim s5-2) num-func-seek!)
|
|
)
|
|
)
|
|
#t
|
|
)
|
|
(else
|
|
(ja-channel-push! 1 (seconds 0.03))
|
|
(let ((a0-40 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-40 frame-group) (-> obj knocked-anim))
|
|
(set! (-> a0-40 param 0) (the float (+ (-> obj knocked-anim frames num-frames) -1)))
|
|
(set! (-> a0-40 param 1) (-> arg0 0))
|
|
(set! (-> a0-40 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-40 (-> obj knocked-anim) num-func-seek!)
|
|
)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 78 of type ashelin
|
|
(defmethod enemy-method-78 ashelin ((obj ashelin) (arg0 (pointer float)))
|
|
(case (-> obj incoming knocked-type)
|
|
(((knocked-type knocked-type-6))
|
|
(let* ((v1-1 *ashelin-global-info*)
|
|
(s5-0 (-> obj draw art-group data (-> v1-1 blue-hit-land-anim (-> v1-1 prev-blue-hit))))
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.17))
|
|
(let ((a0-7 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-7 frame-group) (the-as art-joint-anim s5-0))
|
|
(set! (-> a0-7 param 0) (the float (+ (-> (the-as art-joint-anim s5-0) frames num-frames) -1)))
|
|
(set! (-> a0-7 param 1) 1.0)
|
|
(set! (-> a0-7 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-7 (the-as art-joint-anim s5-0) num-func-seek!)
|
|
)
|
|
)
|
|
#t
|
|
)
|
|
(else
|
|
(let ((v1-15 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and v1-15 (= v1-15 (-> obj draw art-group data 7)))
|
|
(cond
|
|
((or (zero? (-> obj hit-points)) (nonzero? (-> obj fated-time)))
|
|
(ja-channel-push! 1 (seconds 0.17))
|
|
(let ((a0-14 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-14 frame-group) (the-as art-joint-anim (-> obj draw art-group data 9)))
|
|
(set! (-> a0-14 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 9)) frames num-frames) -1))
|
|
)
|
|
(set! (-> a0-14 param 1) 1.0)
|
|
(set! (-> a0-14 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-14 (the-as art-joint-anim (-> obj draw art-group data 9)) num-func-seek!)
|
|
)
|
|
#f
|
|
)
|
|
(else
|
|
(ja-channel-push! 1 (seconds 0.17))
|
|
(let ((a0-16 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-16 frame-group) (the-as art-joint-anim (-> obj draw art-group data 8)))
|
|
(set! (-> a0-16 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 8)) frames num-frames) -1))
|
|
)
|
|
(set! (-> a0-16 param 1) 1.0)
|
|
(set! (-> a0-16 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-16 (the-as art-joint-anim (-> obj draw art-group data 8)) num-func-seek!)
|
|
)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
((and (or (zero? (-> obj hit-points)) (nonzero? (-> obj fated-time))) (nonzero? (get-rand-int obj 3)))
|
|
(ja-channel-push! 1 (seconds 0.17))
|
|
(let ((a0-20 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-20 frame-group) (the-as art-joint-anim (-> obj draw art-group data 12)))
|
|
(set! (-> a0-20 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 12)) frames num-frames) -1))
|
|
)
|
|
(set! (-> a0-20 param 1) 1.0)
|
|
(set! (-> a0-20 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-20 (the-as art-joint-anim (-> obj draw art-group data 12)) num-func-seek!)
|
|
)
|
|
#f
|
|
)
|
|
(else
|
|
(ja-channel-push! 1 (seconds 0.17))
|
|
(let ((a0-22 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-22 frame-group) (the-as art-joint-anim (-> obj draw art-group data 11)))
|
|
(set! (-> a0-22 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 11)) frames num-frames) -1))
|
|
)
|
|
(set! (-> a0-22 param 1) 1.0)
|
|
(set! (-> a0-22 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-22 (the-as art-joint-anim (-> obj draw art-group data 11)) num-func-seek!)
|
|
)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 79 of type ashelin
|
|
(defmethod enemy-method-79 ashelin ((obj ashelin) (arg0 int) (arg1 enemy-knocked-info))
|
|
(cond
|
|
((= arg0 3)
|
|
(let ((s5-0 (ja-done? 0)))
|
|
(cond
|
|
((and s5-0 (let ((v1-4 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(and v1-4 (or (= v1-4 (-> obj draw art-group data 16))
|
|
(= v1-4 (-> obj draw art-group data 17))
|
|
(= v1-4 (-> obj draw art-group data 18))
|
|
(= v1-4 (-> obj draw art-group data 22))
|
|
(= v1-4 (-> obj draw art-group data 23))
|
|
(= v1-4 (-> obj draw art-group data 24))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(ja-channel-push! 1 (seconds 0.03))
|
|
(let ((a0-21 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-21 frame-group) (the-as art-joint-anim (-> obj draw art-group data 25)))
|
|
(set! (-> a0-21 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> obj draw art-group data 25)) frames num-frames) -1))
|
|
)
|
|
(set! (-> a0-21 param 1) 1.0)
|
|
(set! (-> a0-21 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-21 (the-as art-joint-anim (-> obj draw art-group data 25)) num-func-seek!)
|
|
)
|
|
(set! s5-0 #f)
|
|
)
|
|
(else
|
|
(let ((v1-25 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and v1-25 (= v1-25 (-> obj draw art-group data 8)))
|
|
(let ((f0-4 (ja-aframe-num 0)))
|
|
(cond
|
|
((>= f0-4 22.0)
|
|
(when (focus-test? obj dangerous)
|
|
(if (logtest? (-> obj enemy-flags) (enemy-flag check-water))
|
|
(logior! (-> obj focus-status) (focus-status dangerous))
|
|
(logclear! (-> obj focus-status) (focus-status dangerous))
|
|
)
|
|
)
|
|
)
|
|
((>= f0-4 16.0)
|
|
(when (not (focus-test? obj dangerous))
|
|
(logior! (-> obj focus-status) (focus-status dangerous))
|
|
(let* ((v1-42 *game-info*)
|
|
(a0-34 (+ (-> v1-42 attack-id) 1))
|
|
)
|
|
(set! (-> v1-42 attack-id) a0-34)
|
|
(set! (-> obj attack-id) a0-34)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((let ((v1-45 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(and v1-45 (= v1-45 (-> obj draw art-group data 11)))
|
|
)
|
|
(let ((f0-5 (ja-aframe-num 0)))
|
|
(cond
|
|
((>= f0-5 32.0)
|
|
(when (focus-test? obj dangerous)
|
|
(if (logtest? (-> obj enemy-flags) (enemy-flag check-water))
|
|
(logior! (-> obj focus-status) (focus-status dangerous))
|
|
(logclear! (-> obj focus-status) (focus-status dangerous))
|
|
)
|
|
)
|
|
)
|
|
((>= f0-5 25.0)
|
|
(when (not (focus-test? obj dangerous))
|
|
(logior! (-> obj focus-status) (focus-status dangerous))
|
|
(let* ((v1-62 *game-info*)
|
|
(a0-47 (+ (-> v1-62 attack-id) 1))
|
|
)
|
|
(set! (-> v1-62 attack-id) a0-47)
|
|
(set! (-> obj attack-id) a0-47)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((a0-48 (-> obj skel root-channel 0)))
|
|
(set! (-> a0-48 param 0) (the float (+ (-> a0-48 frame-group frames num-frames) -1)))
|
|
(set! (-> a0-48 param 1) (-> arg1 anim-speed))
|
|
(joint-control-channel-group-eval! a0-48 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
s5-0
|
|
)
|
|
)
|
|
(else
|
|
((method-of-type bot enemy-method-79) obj arg0 arg1)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 236 of type ashelin
|
|
;; INFO: Used lq/sq
|
|
(defmethod ashelin-method-236 ashelin ((obj ashelin) (arg0 vector) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
|
(local-vars (v1-23 float) (sv-272 vector))
|
|
(rlet ((acc :class vf)
|
|
(vf0 :class vf)
|
|
(vf1 :class vf)
|
|
(vf2 :class vf)
|
|
)
|
|
(init-vf0-vector)
|
|
(let* ((v1-0 (-> obj nav))
|
|
(a0-3 (-> v1-0 state mesh sphere-hash sphere-array))
|
|
(a1-1 (-> v1-0 sphere-id-array))
|
|
(a2-2 (-> v1-0 state mesh bounds))
|
|
(a3-1 (-> v1-0 root-nav-sphere))
|
|
(t0-1 (-> v1-0 sphere-count))
|
|
)
|
|
(dotimes (t1-1 t0-1)
|
|
(let ((t3-0 (-> a0-3 (-> a1-1 t1-1)))
|
|
(t2-4 (-> v1-0 sphere-array t1-1))
|
|
)
|
|
(vector-! (the-as vector t2-4) (the-as vector t3-0) a2-2)
|
|
(set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-1 w)))
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(let ((s0-0 (new 'stack-no-clear 'nav-avoid-spheres-params)))
|
|
(vector-! (-> s0-0 current-pos) (-> obj root-override2 trans) (-> obj nav state mesh bounds))
|
|
(set! sv-272 (-> s0-0 travel))
|
|
(set! (-> sv-272 x) (sin arg1))
|
|
(set! (-> sv-272 y) 0.0)
|
|
(set! (-> sv-272 z) (cos arg1))
|
|
(set! (-> sv-272 w) 1.0)
|
|
(vector-float*! (-> s0-0 travel) (-> s0-0 travel) arg3)
|
|
(set! (-> s0-0 pref-dir quad) (-> s0-0 travel quad))
|
|
(avoid-spheres-1! (-> obj nav) s0-0)
|
|
(set! (-> arg0 quad) (-> s0-0 out-travel 0 quad))
|
|
)
|
|
0
|
|
(when (>= arg2 (fabs (deg- arg1 (atan (-> arg0 x) (-> arg0 z)))))
|
|
(let ((t0-2 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)))
|
|
(clamp-vector-to-mesh-no-gaps
|
|
(-> obj nav)
|
|
(-> obj root-override2 trans)
|
|
(-> obj nav state current-poly)
|
|
arg0
|
|
t0-2
|
|
)
|
|
)
|
|
(.lvf vf1 (&-> arg0 quad))
|
|
(.add.w.vf vf2 vf0 vf0 :mask #b1)
|
|
(.mul.vf vf1 vf1 vf1)
|
|
(.mul.x.vf acc vf2 vf1 :mask #b1)
|
|
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
|
|
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
|
|
(.mov v1-23 vf1)
|
|
(let ((f0-11 v1-23)
|
|
(f1-1 arg4)
|
|
)
|
|
(>= f0-11 (* f1-1 f1-1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 142 of type ashelin
|
|
(defmethod nav-enemy-method-142 ashelin ((obj ashelin) (arg0 nav-control))
|
|
(if (not (and (-> obj next-state) (let ((v1-3 (-> obj next-state name)))
|
|
(or (= v1-3 'back-spring) (= v1-3 'cartwheel-left) (= v1-3 'tumble-right))
|
|
)
|
|
)
|
|
)
|
|
((method-of-type bot nav-enemy-method-142) obj arg0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 216 of type ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod bot-method-216 ashelin ((obj ashelin))
|
|
(set! (-> obj health-handle) (ppointer->handle (process-spawn hud-ashelin :init hud-init-by-other :to obj)))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 203 of type ashelin
|
|
(defmethod play-attacked-speech ashelin ((obj ashelin))
|
|
(local-vars (v1-3 int) (a3-0 int))
|
|
(when (not (channel-active? obj (the-as uint 0)))
|
|
(let ((v1-2 0))
|
|
(if (logtest? #x3c00000 (-> obj incoming penetrate-using))
|
|
(set! v1-3 (logior v1-2 128))
|
|
(set! v1-3 (logior v1-2 64))
|
|
)
|
|
)
|
|
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
|
|
(set! a3-0 (logior v1-3 256))
|
|
(set! a3-0 (logior v1-3 512))
|
|
)
|
|
(let ((a1-3 (bot-speech-list-method-9
|
|
(-> obj ash-course attack-player-speeches)
|
|
obj
|
|
(-> obj ash-course speeches)
|
|
(the-as speech-flags a3-0)
|
|
)
|
|
)
|
|
)
|
|
(if (>= a1-3 0)
|
|
(play-speech obj a1-3)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 244 of type ashelin
|
|
(defmethod ashelin-method-244 ashelin ((obj ashelin))
|
|
(when (not (channel-active? obj (the-as uint 0)))
|
|
(let ((a1-2
|
|
(bot-speech-list-method-9 (-> obj ash-course ouch-speeches) obj (-> obj ash-course speeches) (speech-flags))
|
|
)
|
|
)
|
|
(if (>= a1-2 0)
|
|
(play-speech obj a1-2)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 245 of type ashelin
|
|
(defmethod ashelin-method-245 ashelin ((obj ashelin))
|
|
(with-pp
|
|
(when (and (not (channel-active? obj (the-as uint 0)))
|
|
(>= (-> pp clock frame-counter) (-> obj victory-speech-time))
|
|
)
|
|
(let ((s5-0 (bot-speech-list-method-9
|
|
(-> obj ash-course victory-speeches)
|
|
obj
|
|
(-> obj ash-course speeches)
|
|
(speech-flags)
|
|
)
|
|
)
|
|
)
|
|
(when (>= s5-0 0)
|
|
(set! (-> obj victory-speech-time)
|
|
(the-as time-frame (+ (get-rand-int-range obj 1200 2100) (-> pp clock frame-counter)))
|
|
)
|
|
(play-speech obj s5-0)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 136 of type ashelin
|
|
(defmethod enemy-method-136 ashelin ((obj ashelin))
|
|
(with-pp
|
|
(when (>= (- (-> pp clock frame-counter) (-> obj hit-focus-time)) (seconds 2))
|
|
(let ((v0-0 (logclear (-> obj enemy-flags) (enemy-flag look-at-focus))))
|
|
(set! (-> obj enemy-flags) v0-0)
|
|
v0-0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 206 of type ashelin
|
|
;; WARN: Return type mismatch enemy-flag vs none.
|
|
(defmethod play-speech ashelin ((obj ashelin) (arg0 int))
|
|
(let ((t9-0 (method-of-type bot play-speech)))
|
|
(t9-0 obj arg0)
|
|
)
|
|
(logclear! (-> obj enemy-flags) (enemy-flag look-at-focus))
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 15 of type hud-ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod draw hud-ashelin ((obj hud-ashelin))
|
|
(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)) 8 2)
|
|
((method-of-type hud draw) obj)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 16 of type hud-ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod update-values hud-ashelin ((obj hud-ashelin))
|
|
(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-ashelin
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod init-callback hud-ashelin ((obj hud-ashelin))
|
|
(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-ashlyn-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)
|
|
)
|