mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 13:53:01 -04:00
a96396e140
* temp * add enums
790 lines
31 KiB
Common Lisp
Vendored
Generated
790 lines
31 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type bonelurker
|
|
(deftype bonelurker (nav-enemy)
|
|
((bump-player-time uint64 :offset-assert 400)
|
|
)
|
|
:heap-base #x130
|
|
:method-count-assert 76
|
|
:size-assert #x198
|
|
:flag-assert #x4c01300198
|
|
(:states
|
|
bonelurker-stun
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type bonelurker
|
|
(defmethod inspect bonelurker ((obj bonelurker))
|
|
(let ((t9-0 (method-of-type nav-enemy inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~T~Tbump-player-time: ~D~%" (-> obj bump-player-time))
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defskelgroup *bonelurker-sg* bonelurker
|
|
0
|
|
5
|
|
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
|
|
:bounds (static-spherem 0 2 0 6)
|
|
:longest-edge (meters 0)
|
|
:shadow 4
|
|
)
|
|
|
|
;; definition for function bonelurker-set-small-bounds-sphere
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defbehavior bonelurker-set-small-bounds-sphere bonelurker ()
|
|
(set! (-> self draw bounds w) 12288.0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for function bonelurker-set-large-bounds-sphere
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defbehavior bonelurker-set-large-bounds-sphere bonelurker ()
|
|
(set! (-> self draw bounds w) 24576.0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 44 of type bonelurker
|
|
;; INFO: Return type mismatch symbol vs object.
|
|
(defmethod dummy-44 bonelurker ((obj bonelurker) (arg0 process) (arg1 event-message-block))
|
|
(the-as
|
|
object
|
|
(when (and (logtest? (-> obj nav-enemy-flags) 64) ((method-of-type touching-shapes-entry prims-touching?)
|
|
(the-as touching-shapes-entry (-> arg1 param 0))
|
|
(-> obj collide-info)
|
|
(the-as uint 1)
|
|
)
|
|
)
|
|
(when (nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
|
(set! (-> obj speed-scale) 0.5)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 43 of type bonelurker
|
|
;; INFO: Return type mismatch symbol vs object.
|
|
(defmethod dummy-43 bonelurker ((obj bonelurker) (arg0 process) (arg1 event-message-block))
|
|
(with-pp
|
|
(set! (-> obj state-time) (-> *display* base-frame-counter))
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-1 from) pp)
|
|
(set! (-> a1-1 num-params) 2)
|
|
(set! (-> a1-1 message) 'query)
|
|
(set! (-> a1-1 param 0) (the-as uint 'powerup))
|
|
(set! (-> a1-1 param 1) (the-as uint 2))
|
|
(the-as
|
|
object
|
|
(cond
|
|
((or (send-event-function *target* a1-1) (= (-> arg1 param 1) 'explode))
|
|
(logclear! (-> obj mask) (process-mask actor-pause))
|
|
(go (method-of-object obj nav-enemy-die))
|
|
'die
|
|
)
|
|
(else
|
|
(cond
|
|
(((method-of-type touching-shapes-entry prims-touching?)
|
|
(the-as touching-shapes-entry (-> arg1 param 0))
|
|
(-> obj collide-info)
|
|
(the-as uint 2)
|
|
)
|
|
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-3 from) pp)
|
|
(set! (-> a1-3 num-params) 2)
|
|
(set! (-> a1-3 message) 'shove)
|
|
(set! (-> a1-3 param 0) (-> arg1 param 0))
|
|
(let ((v1-19 (new 'static 'attack-info :mask #x40)))
|
|
(set! (-> v1-19 shove-back) 16384.0)
|
|
(set! (-> a1-3 param 1) (the-as uint v1-19))
|
|
)
|
|
(send-event-function arg0 a1-3)
|
|
)
|
|
(go bonelurker-stun)
|
|
#t
|
|
)
|
|
((and ((method-of-type touching-shapes-entry prims-touching?)
|
|
(the-as touching-shapes-entry (-> arg1 param 0))
|
|
(-> obj collide-info)
|
|
(the-as uint 1)
|
|
)
|
|
(= (-> obj skel root-channel 0) (-> obj skel channel))
|
|
(let ((v1-30 (if (> (-> obj skel active-channels) 0)
|
|
(-> obj skel root-channel 0 frame-group)
|
|
)
|
|
)
|
|
)
|
|
(or (= v1-30 (-> obj draw art-group data 9)) (= v1-30 (-> obj draw art-group data 10)))
|
|
)
|
|
)
|
|
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-6 from) pp)
|
|
(set! (-> a1-6 num-params) 2)
|
|
(set! (-> a1-6 message) 'shove)
|
|
(set! (-> a1-6 param 0) (-> arg1 param 0))
|
|
(let ((v1-36 (new 'static 'attack-info :mask #x40)))
|
|
(set! (-> v1-36 shove-back) 16384.0)
|
|
(set! (-> a1-6 param 1) (the-as uint v1-36))
|
|
)
|
|
(send-event-function arg0 a1-6)
|
|
)
|
|
(set! (-> obj bump-player-time) (the-as uint (-> *display* base-frame-counter)))
|
|
(set! (-> obj nav-enemy-flags) (logand -65 (-> obj nav-enemy-flags)))
|
|
'push
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function bonelurker-stunned-event-handler
|
|
;; INFO: Return type mismatch symbol vs object.
|
|
(defbehavior bonelurker-stunned-event-handler bonelurker ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
(let ((v1-0 arg2))
|
|
(the-as object (when (= v1-0 'attack)
|
|
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) 150)
|
|
(nav-enemy-set-hit-from-direction arg0)
|
|
(send-event arg0 'get-attack-count 1)
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
(go-virtual nav-enemy-die)
|
|
'die
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
nav-enemy-default-event-handler
|
|
|
|
;; definition for function bonelurker-push-post
|
|
;; Used lq/sq
|
|
(defbehavior bonelurker-push-post bonelurker ()
|
|
(TODO-RENAME-9 (-> self align))
|
|
(dummy-11 (-> self nav) (-> self nav target-pos))
|
|
(TODO-RENAME-11
|
|
(-> self align)
|
|
4
|
|
(-> self nav travel)
|
|
(the-as int 1.0)
|
|
1.0
|
|
(* (-> self enemy-info speed) (-> self speed-scale))
|
|
)
|
|
(vector-v++! (-> self collide-info transv) (dummy-62 (-> self collide-info) (new-stack-vector0) 0.0))
|
|
(TODO-RENAME-10 (-> self align) 16 1.0 1.0 1.0)
|
|
(dummy-59 (-> self collide-info) (-> self collide-info transv) (the-as uint 1) 8192.0 #t #f #f)
|
|
(nav-enemy-common-post)
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-idle (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:exit
|
|
(behavior ()
|
|
(bonelurker-set-large-bounds-sphere)
|
|
(none)
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(bonelurker-set-small-bounds-sphere)
|
|
((the-as (function none :behavior bonelurker) (-> (method-of-type nav-enemy nav-enemy-idle) code)))
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-patrol (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(ja-channel-push! 1 60)
|
|
((the-as (function none :behavior bonelurker) (-> (method-of-type nav-enemy nav-enemy-patrol) code)))
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-notice (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:code
|
|
(-> (method-of-type nav-enemy nav-enemy-notice) code)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-chase (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:trans
|
|
(behavior ()
|
|
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
|
|
(if (and (zero? (logand (-> self nav-enemy-flags) 64))
|
|
(>= (- (-> *display* base-frame-counter) (the-as int (-> self bump-player-time))) 150)
|
|
)
|
|
(logior! (-> self nav-enemy-flags) 64)
|
|
)
|
|
(none)
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(set! (-> self rotate-speed) 524288.0)
|
|
(set! (-> self turn-time) 30)
|
|
(set! (-> self speed-scale) 1.0)
|
|
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
|
|
(cond
|
|
((= (if (> (-> self skel active-channels) 0)
|
|
(-> self skel root-channel 0 frame-group)
|
|
)
|
|
(-> self draw art-group data 13)
|
|
)
|
|
(ja-channel-push! 1 90)
|
|
)
|
|
((= (if (> (-> self skel active-channels) 0)
|
|
(-> self skel root-channel 0 frame-group)
|
|
)
|
|
(-> self draw art-group data 15)
|
|
)
|
|
(ja-channel-push! 1 60)
|
|
)
|
|
(else
|
|
(ja-channel-push! 1 45)
|
|
)
|
|
)
|
|
(let ((a0-12 (-> self skel root-channel 0)))
|
|
(set! (-> a0-12 frame-group) (the-as art-joint-anim (-> self draw art-group data 9)))
|
|
(set! (-> a0-12 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 9)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-12 param 1) f30-0)
|
|
(set! (-> a0-12 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-12 (the-as art-joint-anim (-> self draw art-group data 9)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-13 (-> self skel root-channel 0)))
|
|
(set! (-> a0-13 param 0) (the float (+ (-> a0-13 frame-group data 0 length) -1)))
|
|
(set! (-> a0-13 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(let ((a0-15 (-> self skel root-channel 0)))
|
|
(set! (-> a0-15 frame-group) (the-as art-joint-anim (-> self draw art-group data 10)))
|
|
(set! (-> a0-15 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 10)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-15 param 1) f30-0)
|
|
(set! (-> a0-15 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-15 (the-as art-joint-anim (-> self draw art-group data 10)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-16 (-> self skel root-channel 0)))
|
|
(set! (-> a0-16 param 0) (the float (+ (-> a0-16 frame-group data 0 length) -1)))
|
|
(set! (-> a0-16 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(while #t
|
|
(cond
|
|
((or (not *target*)
|
|
(< 36864.0 (vector-vector-distance (-> self collide-info trans) (-> *target* control trans)))
|
|
)
|
|
(let ((a0-19 (-> self skel root-channel 0)))
|
|
(set! (-> a0-19 frame-group) (the-as art-joint-anim (-> self draw art-group data 8)))
|
|
(set! (-> a0-19 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 8)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-19 param 1) f30-0)
|
|
(set! (-> a0-19 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-19 (the-as art-joint-anim (-> self draw art-group data 8)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-20 (-> self skel root-channel 0)))
|
|
(set! (-> a0-20 param 0) (the float (+ (-> a0-20 frame-group data 0 length) -1)))
|
|
(set! (-> a0-20 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((a0-22 (-> self skel root-channel 0)))
|
|
(set! (-> a0-22 frame-group) (the-as art-joint-anim (-> self draw art-group data 9)))
|
|
(set! (-> a0-22 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 9)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-22 param 1) f30-0)
|
|
(set! (-> a0-22 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-22 (the-as art-joint-anim (-> self draw art-group data 9)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-23 (-> self skel root-channel 0)))
|
|
(set! (-> a0-23 param 0) (the float (+ (-> a0-23 frame-group data 0 length) -1)))
|
|
(set! (-> a0-23 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(if (logtest? (-> self nav-enemy-flags) 256)
|
|
(go-virtual nav-enemy-victory)
|
|
)
|
|
(let ((a0-25 (-> self skel root-channel 0)))
|
|
(set! (-> a0-25 frame-group) (the-as art-joint-anim (-> self draw art-group data 10)))
|
|
(set! (-> a0-25 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 10)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-25 param 1) f30-0)
|
|
(set! (-> a0-25 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-25 (the-as art-joint-anim (-> self draw art-group data 10)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-26 (-> self skel root-channel 0)))
|
|
(set! (-> a0-26 param 0) (the float (+ (-> a0-26 frame-group data 0 length) -1)))
|
|
(set! (-> a0-26 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-26 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(if (logtest? (-> self nav-enemy-flags) 256)
|
|
(go-virtual nav-enemy-victory)
|
|
)
|
|
(let ((a0-28 (-> self skel root-channel 0)))
|
|
(set! (-> a0-28 frame-group) (the-as art-joint-anim (-> self draw art-group data 8)))
|
|
(set! (-> a0-28 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 8)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-28 param 1) f30-0)
|
|
(set! (-> a0-28 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-28 (the-as art-joint-anim (-> self draw art-group data 8)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-29 (-> self skel root-channel 0)))
|
|
(set! (-> a0-29 param 0) (the float (+ (-> a0-29 frame-group data 0 length) -1)))
|
|
(set! (-> a0-29 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-29 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-stop-chase (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:code
|
|
(-> (method-of-type nav-enemy nav-enemy-stop-chase) code)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-stare (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(set! (-> self rotate-speed) 524288.0)
|
|
(set! (-> self turn-time) 60)
|
|
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
|
|
(when (and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
|
|
(ja-channel-push! 1 30)
|
|
(let ((gp-0 (-> self skel root-channel 0)))
|
|
(set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 13)))
|
|
(set! (-> gp-0 param 0) (ja-aframe 48.0 0))
|
|
(set! (-> gp-0 param 1) f30-0)
|
|
(set! (-> gp-0 frame-num) 0.0)
|
|
(joint-control-channel-group! gp-0 (the-as art-joint-anim (-> self draw art-group data 13)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((gp-1 (-> self skel root-channel 0)))
|
|
(set! (-> gp-1 param 0) (ja-aframe 48.0 0))
|
|
(set! (-> gp-1 param 1) f30-0)
|
|
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
(while #t
|
|
(when (not (nav-enemy-facing-player? 2730.6667))
|
|
(logior! (-> self nav-enemy-flags) 16)
|
|
(ja-channel-push! 1 60)
|
|
(let ((v1-20 (-> self skel root-channel 0)))
|
|
(set! (-> v1-20 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
|
|
)
|
|
(let ((v1-23 (-> self skel root-channel 0)))
|
|
(set! (-> v1-23 num-func) num-func-identity)
|
|
(set! (-> v1-23 frame-num) 0.0)
|
|
)
|
|
(until (nav-enemy-facing-player? 1820.4445)
|
|
(ja-blend-eval)
|
|
(suspend)
|
|
(let ((a0-14 (-> self skel root-channel 0)))
|
|
(set! (-> a0-14 param 0) 1.0)
|
|
(joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-loop!)
|
|
)
|
|
)
|
|
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
|
)
|
|
(ja-channel-push! 1 75)
|
|
(let ((a0-18 (-> self skel root-channel 0)))
|
|
(set! (-> a0-18 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
|
(set! (-> a0-18 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-18 param 1) f30-0)
|
|
(set! (-> a0-18 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-18 (the-as art-joint-anim (-> self draw art-group data 5)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-19 (-> self skel root-channel 0)))
|
|
(set! (-> a0-19 param 0) (the float (+ (-> a0-19 frame-group data 0 length) -1)))
|
|
(set! (-> a0-19 param 1) f30-0)
|
|
(joint-control-channel-group-eval! a0-19 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(let ((a0-21 (-> self skel root-channel 0)))
|
|
(set! (-> a0-21 param 0) 1.0)
|
|
(joint-control-channel-group! a0-21 (the-as art-joint-anim #f) num-func-loop!)
|
|
)
|
|
(when (rand-vu-percent? 0.15)
|
|
(ja-channel-push! 1 30)
|
|
(let ((gp-2 (-> self skel root-channel 0)))
|
|
(set! (-> gp-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 13)))
|
|
(set! (-> gp-2 param 0) (ja-aframe 48.0 0))
|
|
(set! (-> gp-2 param 1) f30-0)
|
|
(set! (-> gp-2 frame-num) 0.0)
|
|
(joint-control-channel-group! gp-2 (the-as art-joint-anim (-> self draw art-group data 13)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((gp-3 (-> self skel root-channel 0)))
|
|
(set! (-> gp-3 param 0) (ja-aframe 48.0 0))
|
|
(set! (-> gp-3 param 1) f30-0)
|
|
(joint-control-channel-group-eval! gp-3 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-give-up (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(set! (-> self rotate-speed) 524288.0)
|
|
(set! (-> self turn-time) 30)
|
|
(ja-channel-push! 1 45)
|
|
(let ((s4-0 (-> self collide-info))
|
|
(s5-0 (target-pos 0))
|
|
)
|
|
(when (< (fabs
|
|
(deg-diff (y-angle s4-0) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans))))
|
|
)
|
|
12743.111
|
|
)
|
|
(let ((a0-6 (-> self skel root-channel 0)))
|
|
(set! (-> a0-6 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
|
(set! (-> a0-6 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -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 (-> self draw art-group data 5)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-7 (-> self skel root-channel 0)))
|
|
(set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group data 0 length) -1)))
|
|
(set! (-> a0-7 param 1) 1.0)
|
|
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(let ((a0-9 (-> self skel root-channel 0)))
|
|
(set! (-> a0-9 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
|
(set! (-> a0-9 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-9 param 1) 1.0)
|
|
(set! (-> a0-9 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-9 (the-as art-joint-anim (-> self draw art-group data 5)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-10 (-> self skel root-channel 0)))
|
|
(set! (-> a0-10 param 0) (the float (+ (-> a0-10 frame-group data 0 length) -1)))
|
|
(set! (-> a0-10 param 1) 1.0)
|
|
(joint-control-channel-group-eval! a0-10 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(let ((a0-12 (-> self skel root-channel 0)))
|
|
(set! (-> a0-12 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
|
(set! (-> a0-12 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -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 (-> self draw art-group data 5)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-13 (-> self skel root-channel 0)))
|
|
(set! (-> a0-13 param 0) (the float (+ (-> a0-13 frame-group data 0 length) -1)))
|
|
(set! (-> a0-13 param 1) 1.0)
|
|
(joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
|
(nav-enemy-get-new-patrol-point)
|
|
(let ((a0-18 (-> self skel root-channel 0)))
|
|
(set! (-> a0-18 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
|
(set! (-> a0-18 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -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 (-> self draw art-group data 5)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(seek-to-point-toward-point!
|
|
(-> self collide-info)
|
|
(-> self nav destination-pos)
|
|
(-> self rotate-speed)
|
|
(-> self turn-time)
|
|
)
|
|
(suspend)
|
|
(let ((a0-20 (-> self skel root-channel 0)))
|
|
(set! (-> a0-20 param 0) (the float (+ (-> a0-20 frame-group data 0 length) -1)))
|
|
(set! (-> a0-20 param 1) 1.0)
|
|
(joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(go-virtual nav-enemy-patrol)
|
|
(none)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate nav-enemy-victory (bonelurker)
|
|
:virtual #t
|
|
:event
|
|
(the-as
|
|
(function process int symbol event-message-block object :behavior bonelurker)
|
|
nav-enemy-default-event-handler
|
|
)
|
|
:code
|
|
(-> (method-of-type nav-enemy nav-enemy-victory) code)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate bonelurker-stun (bonelurker)
|
|
:event
|
|
bonelurker-stunned-event-handler
|
|
:enter
|
|
(behavior ()
|
|
(nav-enemy-neck-control-inactive)
|
|
(none)
|
|
)
|
|
:exit
|
|
(behavior ()
|
|
(nav-enemy-neck-control-look-at)
|
|
(none)
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector-normalize-copy! gp-0 (-> self hit-from-dir) 16384.0)
|
|
(vector+! gp-0 (-> self collide-info trans) gp-0)
|
|
(set! (-> self nav target-pos quad) (-> gp-0 quad))
|
|
)
|
|
(ja-channel-push! 1 30)
|
|
(let ((a0-5 (-> self skel root-channel 0)))
|
|
(set! (-> a0-5 frame-group) (the-as art-joint-anim (-> self draw art-group data 15)))
|
|
(set! (-> a0-5 param 0)
|
|
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 15)) data 0 length) -1))
|
|
)
|
|
(set! (-> a0-5 param 1) 1.0)
|
|
(set! (-> a0-5 frame-num) 0.0)
|
|
(joint-control-channel-group! a0-5 (the-as art-joint-anim (-> self draw art-group data 15)) num-func-seek!)
|
|
)
|
|
(until (ja-done? 0)
|
|
(suspend)
|
|
(let ((a0-6 (-> self skel root-channel 0)))
|
|
(set! (-> a0-6 param 0) (the float (+ (-> a0-6 frame-group data 0 length) -1)))
|
|
(set! (-> a0-6 param 1) 1.0)
|
|
(joint-control-channel-group-eval! a0-6 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(go-virtual nav-enemy-chase)
|
|
(none)
|
|
)
|
|
:post
|
|
bonelurker-push-post
|
|
)
|
|
|
|
;; definition for symbol *bonelurker-nav-enemy-info*, type nav-enemy-info
|
|
(define *bonelurker-nav-enemy-info* (new 'static 'nav-enemy-info
|
|
:idle-anim 5
|
|
:walk-anim 6
|
|
:turn-anim 16
|
|
:notice-anim 7
|
|
:run-anim 8
|
|
:jump-anim 17
|
|
:jump-land-anim 18
|
|
:victory-anim 13
|
|
:taunt-anim 13
|
|
:die-anim 14
|
|
:neck-joint 5
|
|
:player-look-at-joint 5
|
|
:run-travel-speed (meters 6.0)
|
|
:run-rotate-speed (degrees 2880.0)
|
|
:run-acceleration (meters 1.0)
|
|
:run-turn-time (seconds 0.1)
|
|
:walk-travel-speed (meters 3.0)
|
|
:walk-rotate-speed (degrees 2880.0)
|
|
:walk-acceleration (meters 1.0)
|
|
:walk-turn-time (seconds 0.1)
|
|
:attack-shove-back (meters 3.0)
|
|
:attack-shove-up (meters 2.0)
|
|
:shadow-size (meters 2.0)
|
|
:notice-nav-radius (meters 5.0)
|
|
:nav-nearest-y-threshold (meters 5.0)
|
|
:notice-distance (meters 30.0)
|
|
:stop-chase-distance (meters 40.0)
|
|
:frustration-distance (meters 8.0)
|
|
:frustration-time #x4b0
|
|
:die-anim-hold-frame 24.0
|
|
:jump-anim-start-frame 10.0
|
|
:jump-land-anim-end-frame 32.0
|
|
:jump-height-min (meters 3.0)
|
|
:jump-height-factor 0.5
|
|
:jump-start-anim-speed 1.0
|
|
:shadow-max-y (meters 1.0)
|
|
:shadow-min-y (meters -1.0)
|
|
:shadow-locus-dist (meters 150.0)
|
|
:use-align #t
|
|
:draw-shadow #t
|
|
:move-to-ground #t
|
|
:hover-if-no-ground #f
|
|
:use-momentum #f
|
|
:use-flee #f
|
|
:use-proximity-notice #f
|
|
:use-jump-blocked #t
|
|
:use-jump-patrol #f
|
|
:gnd-collide-with #x1
|
|
:debug-draw-neck #f
|
|
:debug-draw-jump #f
|
|
)
|
|
)
|
|
|
|
;; definition for method 47 of type bonelurker
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod initialize-collision bonelurker ((obj bonelurker))
|
|
(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) default-collision-reaction)
|
|
(set! (-> s5-0 no-reaction)
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
)
|
|
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
|
|
(set! (-> s4-0 prim-core collide-as) (collide-kind enemy))
|
|
(set! (-> s4-0 collide-with) (collide-kind target))
|
|
(set! (-> s4-0 prim-core action) (collide-action solid))
|
|
(set-vector! (-> s4-0 local-sphere) 0.0 10240.0 0.0 24576.0)
|
|
(set-root-prim! s5-0 s4-0)
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind enemy))
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
|
(set! (-> s3-0 prim-core action) (collide-action solid))
|
|
(set! (-> s3-0 prim-core offense) (collide-offense touch))
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 4096.0)
|
|
(append-prim s4-0 s3-0)
|
|
)
|
|
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
|
|
(set! (-> s3-1 prim-core collide-as) (collide-kind enemy))
|
|
(set! (-> s3-1 collide-with) (collide-kind target))
|
|
(set! (-> s3-1 prim-core action) (collide-action solid))
|
|
(set! (-> s3-1 prim-core offense) (collide-offense touch))
|
|
(set-vector! (-> s3-1 local-sphere) 0.0 11468.8 0.0 4096.0)
|
|
(append-prim s4-0 s3-1)
|
|
)
|
|
(let ((s3-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
|
|
(set! (-> s3-2 prim-core collide-as) (collide-kind enemy))
|
|
(set! (-> s3-2 collide-with) (collide-kind target))
|
|
(set! (-> s3-2 prim-core offense) (collide-offense normal-attack))
|
|
(set! (-> s3-2 transform-index) 29)
|
|
(set-vector! (-> s3-2 local-sphere) 0.0 4915.2 0.0 4915.2)
|
|
(append-prim s4-0 s3-2)
|
|
)
|
|
)
|
|
(set! (-> s5-0 nav-radius) 8192.0)
|
|
(backup-collide-with-as s5-0)
|
|
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
|
|
(set! (-> obj collide-info) s5-0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 48 of type bonelurker
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defmethod TODO-RENAME-48 bonelurker ((obj bonelurker))
|
|
(initialize-skeleton obj *bonelurker-sg* '())
|
|
(TODO-RENAME-45 obj *bonelurker-nav-enemy-info*)
|
|
(set! (-> obj neck up) (the-as uint 0))
|
|
(set! (-> obj neck nose) (the-as uint 1))
|
|
(set! (-> obj neck ear) (the-as uint 2))
|
|
0
|
|
(none)
|
|
)
|