Files
jak-project/goal_src/jak2/levels/common/scene-actor.gc
T
2023-12-22 16:52:53 +00:00

1035 lines
34 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: scene-actor.gc
;; name in dgo: scene-actor
;; dgos: GAME, COMMON
(declare-type onin-game process-drawable)
(define-extern onin-game-init (function entity none :behavior onin-game))
;; DECOMP BEGINS
(defskelgroup skel-scenecamera scenecamera scenecamera-lod0-jg -1
((scenecamera-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 4)
:texture-level 6
)
(defskelgroup skel-particleman particleman particleman-lod0-jg -1
((particleman-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-jakone-highres jakone-highres jakone-highres-lod0-jg -1
((jakone-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
:longest-edge (meters 1)
:sort 1
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-darkjak-highres darkjak-highres darkjak-highres-lod0-jg -1
((darkjak-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
:longest-edge (meters 1)
:sort 1
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-jak-highres-prison jak-highres-prison jak-highres-prison-lod0-jg -1
((jak-highres-prison-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
:longest-edge (meters 1)
:shadow jak-highres-prison-shadow-mg
:sort 1
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-youngsamos-highres youngsamos-highres youngsamos-highres-lod0-jg youngsamos-highres-idle-ja
((youngsamos-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
:shadow youngsamos-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-samos-highres samos-highres samos-highres-lod0-jg samos-highres-idle-ja
((samos-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
:shadow samos-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-kor-highres kor-highres kor-highres-lod0-jg kor-highres-idle-ja
((kor-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow kor-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-metalkor-highres metalkor-highres metalkor-highres-lod0-jg metalkor-highres-idle-ja
((metalkor-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 2 2 8)
:shadow metalkor-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-metalkor-highres-lowtorso metalkor-highres metalkor-highres-lowtorso-lod0-jg metalkor-highres-lowtorso-idle-ja
((metalkor-highres-lowtorso-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -9 -12 22)
:shadow metalkor-highres-lowtorso-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-metalkor-highres-legs metalkor-highres metalkor-highres-legs-lod0-jg metalkor-highres-legs-idle-ja
((metalkor-highres-legs-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -9 2 15)
:shadow metalkor-highres-legs-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-metalkor-highres-wings metalkor-highres metalkor-highres-wings-lod0-jg metalkor-highres-wings-idle-ja
((metalkor-highres-wings-lod0-mg (meters 999999)))
:bounds (static-spherem 0 8 -5 20)
:shadow metalkor-highres-wings-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-kor-transform kor-transform kor-transform-lod0-jg kor-transform-idle-ja
((kor-transform-lod0-mg (meters 999999)))
:bounds (static-spherem 0 2 2 8)
:shadow kor-transform-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-kor-transform-monsterparts kor-transform kor-transform-monsterparts-lod0-jg kor-transform-monsterparts-idle-ja
((kor-transform-monsterparts-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -9 -12 22)
:shadow kor-transform-monsterparts-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-baron-highres baron-highres baron-highres-lod0-jg baron-highres-idle-ja
((baron-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow baron-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-errol-highres errol-highres errol-highres-lod0-jg errol-highres-idle-ja
((errol-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow errol-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-onin-highres onin-highres onin-highres-lod0-jg onin-highres-idle-ja
((onin-highres-lod0-mg (meters 200)))
:bounds (static-spherem 0 0 0 5)
:shadow onin-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-pecker-highres pecker-highres pecker-highres-lod0-jg pecker-highres-idle-ja
((pecker-highres-lod0-mg (meters 200)))
:bounds (static-spherem 0 0 0 5)
:shadow pecker-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-kid-highres kid-highres kid-highres-lod0-jg kid-highres-idle-ja
((kid-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow kid-highres-shadow-mg
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-crocadog-highres crocadog-highres crocadog-highres-lod0-jg crocadog-highres-idle-ja
((crocadog-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow crocadog-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-crimson-guard-highres crimson-guard-highres crimson-guard-highres-lod0-jg -1
((crimson-guard-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow crimson-guard-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-crimson-guard-lowres crimson-guard-lowres crimson-guard-lowres-lod0-jg -1
((crimson-guard-lowres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow crimson-guard-lowres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-crimson-guard-hover crimson-guard-hover crimson-guard-hover-lod0-jg -1
((crimson-guard-hover-lod0-mg (meters 20)) (crimson-guard-hover-lod1-mg (meters 999999)))
:bounds (static-spherem 0 0 0 7.5)
:shadow crimson-guard-hover-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-atoll-hellcat atoll-hellcat atoll-hellcat-lod0-jg atoll-hellcat-idle-ja
((atoll-hellcat-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 8.5)
:origin-joint-index 3
)
(defskelgroup skel-rift-rider rift-rider rift-rider-lod0-jg rift-rider-idle-ja
((rift-rider-lod0-mg (meters 999999)))
:bounds (static-spherem 0 1.5 0 5)
:shadow rift-rider-shadow-mg
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-torn-highres torn-highres torn-highres-lod0-jg torn-highres-idle-ja
((torn-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2.5)
:shadow torn-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-sig-highres sig-highres sig-highres-lod0-jg sig-highres-idle-ja
((sig-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5)
:shadow sig-highres-shadow-mg
:origin-joint-index 30
)
(defskelgroup skel-ashelin-highres ashelin-highres ashelin-highres-lod0-jg ashelin-highres-idle-ja
((ashelin-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5)
:shadow ashelin-highres-shadow-mg
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-brutter-highres brutter-highres brutter-highres-lod0-jg brutter-highres-idle-kiosk-ja
((brutter-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5)
:shadow brutter-highres-shadow-mg
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-palmpilot palmpilot palmpilot-lod0-jg -1
((palmpilot-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 1.5)
:origin-joint-index 3
)
(defskelgroup skel-krew-highres krew-highres krew-highres-lod0-jg krew-highres-idle-ja
((krew-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow krew-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-tess-highres tess-highres tess-highres-lod0-jg tess-highres-idle-ja
((tess-highres-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:shadow tess-highres-shadow-mg
:origin-joint-index 3
)
(defskelgroup skel-keira-highres keira-highres keira-highres-lod0-jg keira-highres-idle-ja
((keira-highres-lod0-mg (meters 200)))
:bounds (static-spherem 0 0 0 5)
:shadow keira-highres-shadow-mg
:origin-joint-index 3
:shadow-joint-index 4
)
(defskelgroup skel-sew-gold-key sew-gold-key sew-gold-key-lod0-jg sew-gold-key-idle-ja
((sew-gold-key-lod0-mg (meters 200)))
:bounds (static-spherem 0 0 0 1)
:origin-joint-index 3
)
(defskelgroup skel-life-seed life-seed life-seed-lod0-jg life-seed-idle-ja
((life-seed-lod0-mg (meters 200)))
:bounds (static-spherem 0 0 0 1)
:origin-joint-index 3
)
(defskelgroup skel-grunt-fma grunt-fma grunt-fma-lod0-jg -1
((grunt-fma-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-baron baron baron-lod0-jg baron-idle-ja
((baron-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3)
:origin-joint-index 3
)
(deftype kor-npc (process-taskable)
()
)
(defmethod get-art-elem ((this kor-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor kor-hideout))
(-> this draw art-group data 5)
)
(else
(-> this draw art-group data 4)
)
)
)
(defmethod init-art! ((this kor-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-kor-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(deftype metalkor-highres (process-drawable)
()
(:state-methods
idle
)
)
(defstate idle (metalkor-highres)
:virtual #t
:code (behavior ()
(until #f
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
#f
)
:post ja-post
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this metalkor-highres) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-metalkor-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 10))
(let ((s4-1 (process-spawn
manipy
:init manipy-init
(-> this root trans)
(-> this entity)
(art-group-get-by-name *level* "skel-metalkor-highres-lowtorso" (the-as (pointer uint32) #f))
#f
0
:to this
)
)
)
(send-event (ppointer->process s4-1) 'anim-mode 'clone-anim)
(send-event (ppointer->process s4-1) 'prefix "lowtorso-")
)
(let ((s4-3 (process-spawn
manipy
:init manipy-init
(-> this root trans)
(-> this entity)
(art-group-get-by-name *level* "skel-metalkor-highres-legs" (the-as (pointer uint32) #f))
#f
0
:to this
)
)
)
(send-event (ppointer->process s4-3) 'anim-mode 'clone-anim)
(send-event (ppointer->process s4-3) 'prefix "legs-")
)
(let ((s4-5 (process-spawn
manipy
:init manipy-init
(-> this root trans)
(-> this entity)
(art-group-get-by-name *level* "skel-metalkor-highres-wings" (the-as (pointer uint32) #f))
#f
0
:to this
)
)
)
(send-event (ppointer->process s4-5) 'anim-mode 'clone-anim)
(send-event (ppointer->process s4-5) 'prefix "wings-")
)
(go (method-of-object this idle))
(none)
)
(deftype tess-npc (process-taskable)
()
)
(defmethod get-art-elem ((this tess-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor tess-alley))
(if (task-node-closed? (game-task-node ruins-tower-resolution))
(-> this draw art-group data 3)
(-> this draw art-group data 4)
)
)
(((game-task-actor tess-hiphog))
(cond
((or (task-node-open? (game-task-node city-krew-collection-introduction))
(task-node-open? (game-task-node city-krew-collection-collection))
(task-node-open? (game-task-node forest-hunt-introduction))
(task-node-open? (game-task-node forest-hunt-resolution))
(task-node-open? (game-task-node city-errol-challenge-introduction))
(task-node-open? (game-task-node city-errol-challenge-race))
)
(-> this draw art-group data 6)
)
((and (task-node-closed? (game-task-node city-whack-pre-intro))
(not (task-node-closed? (game-task-node under-mech-resolution)))
)
(-> this draw art-group data 5)
)
(else
(-> this draw art-group data 3)
)
)
)
(else
(-> this draw art-group data 3)
)
)
)
(defmethod init-art! ((this tess-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-tess-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(deftype keira-npc (process-taskable)
()
)
(defmethod get-art-elem ((this keira-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor keira-stadium))
(-> this draw art-group data 3)
)
(else
(-> this draw art-group data 3)
)
)
)
(defmethod init-art! ((this keira-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-keira-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(deftype krew-npc (process-taskable)
()
)
(defmethod get-art-elem ((this krew-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(-> this draw art-group data 4)
)
(defmethod init-art! ((this krew-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-krew-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 10))
0
(none)
)
(deftype kid-npc (process-taskable)
()
)
(defmethod init-art! ((this kid-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-kid-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(defmethod get-art-elem ((this kid-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor kid-alley))
(-> this draw art-group data 5)
)
(((game-task-actor kid-tomb) (game-task-actor kid-vinroom))
(-> this draw art-group data 4)
)
(((game-task-actor kid-hideout))
(-> this draw art-group data 6)
)
(else
(-> this draw art-group data 3)
)
)
)
(deftype crocadog-npc (process-taskable)
()
)
(defmethod get-art-elem ((this crocadog-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor crocadog-vinroom))
(-> this draw art-group data 5)
)
(((game-task-actor crocadog-alley))
(-> this draw art-group data 4)
)
(else
(-> this draw art-group data 4)
)
)
)
(defmethod init-art! ((this crocadog-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-crocadog-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(deftype torn-npc (process-taskable)
()
)
(defmethod init-art! ((this torn-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-torn-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(defmethod get-art-elem ((this torn-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(cond
((task-node-open? (game-task-node ruins-tower-introduction))
(-> this draw art-group data 5)
)
((task-node-open? (game-task-node ruins-tower-resolution))
(-> this draw art-group data 5)
)
(else
(-> this draw art-group data 4)
)
)
)
(defmethod get-trans ((this torn-npc) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
(let ((v1-0 (-> this root)))
(if (= arg0 2)
(vector<-cspace! (new 'static 'vector) (-> this node-list data 6))
(-> v1-0 trans)
)
)
)
(deftype youngsamos-npc (process-taskable)
()
)
(defmethod init-art! ((this youngsamos-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-youngsamos-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(if (zero? (-> this draw light-index))
(set! (-> this draw light-index) (the-as uint 30))
)
0
(none)
)
(defmethod process-taskable-method-32 ((this youngsamos-npc))
(case (-> this task actor)
(((game-task-actor youngsamos-forest))
(when (not (task-node-closed? (game-task-node forest-protect-resolution)))
(let ((a0-3 (-> this skel root-channel 0)))
(set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4)))
(set! (-> a0-3 frame-num) 0.0)
(joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-identity)
)
(ja-post)
(let ((s5-0 (new 'stack-no-clear 'task-arrow-params)))
(set! (-> s5-0 pos quad) (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 3)) quad))
(quaternion-copy!
(-> s5-0 quat)
(eul->quat (new 'stack-no-clear 'quaternion) (new 'static 'euler-angles :x -16384.0 :y 16384.0))
)
(set! (-> s5-0 flags) (task-arrow-flags))
(set! (-> s5-0 map-icon) (the-as uint 15))
(task-arrow-spawn s5-0 this)
)
)
)
)
(call-parent-method this)
(none)
)
(defmethod get-art-elem ((this youngsamos-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor youngsamos-forest))
(-> this draw art-group data 4)
)
(((game-task-actor youngsamos-alley))
(-> this draw art-group data 7)
)
(((game-task-actor youngsamos-hideout))
(if (= (-> this level name) 'lysamsam)
(-> this draw art-group data 5)
(-> this draw art-group data 6)
)
)
(((game-task-actor youngsamos-tomb))
(-> this draw art-group data 8)
)
(((game-task-actor youngsamos-onintent))
(-> this draw art-group data 9)
)
(else
(-> this draw art-group data 3)
)
)
)
(deftype samos-npc (process-taskable)
()
)
(defmethod init-art! ((this samos-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-samos-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(defmethod get-art-elem ((this samos-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor samos-hideout))
(-> this draw art-group data 4)
)
(((game-task-actor samos-garage))
(-> this draw art-group data 5)
)
(else
(-> this draw art-group data 3)
)
)
)
(deftype onin-npc (process-taskable)
()
)
(defmethod init-art! ((this onin-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-onin-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 10))
0
(none)
)
(defmethod get-art-elem ((this onin-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(let ((v1-1 (get-current-task-event (-> this task))))
(case (-> v1-1 action)
(((game-task-action play))
(set! (-> this talk-message) (text-id press-triangle-to-play))
)
(else
(set! (-> this talk-message) (text-id press-triangle-to-talk))
)
)
(if (and (= (-> v1-1 action) (game-task-action play))
(or (and *target* (focus-test? *target* grabbed))
(let ((v1-10 (-> *game-info* sub-task-list (game-task-node city-play-onin-game-resolution))))
(handle->process (if (-> v1-10 info)
(-> v1-10 info manager)
(the-as handle #f)
)
)
)
)
)
(-> this draw art-group data 6)
(-> this draw art-group data 4)
)
)
)
(defstate play-game (onin-npc)
:virtual #t
:code (behavior ((arg0 game-task-event))
(let ((gp-0 (get-process *default-dead-pool* onin-game #x4000)))
(set! (-> self slave)
(ppointer->handle (when gp-0
(let ((t9-1 (method-of-type process activate)))
(t9-1 gp-0 self (symbol->string (-> onin-game symbol)) (the-as pointer #x70004000))
)
(run-now-in-process gp-0 onin-game-init (-> self entity))
(-> gp-0 ppointer)
)
)
)
)
(process-taskable-anim-loop (lambda ((arg0 process-taskable)) (handle->process (-> arg0 slave))))
(go-virtual idle)
)
)
(deftype pecker-npc (process-taskable)
()
)
(defmethod init-art! ((this pecker-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-pecker-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 10))
0
(none)
)
(defmethod get-art-elem ((this pecker-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(local-vars (s5-0 art-joint-anim) (f30-0 float))
(cond
((logtest? (-> (get-current-task-event (-> this task)) flags) (game-task-flags gatflag-02))
(-> this draw art-group data 6)
)
((begin
(set! s5-0 (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
)
(set! f30-0 (ja-aframe-num 0))
(and (= s5-0 (-> this draw art-group data 4)) (>= f30-0 0.0) (>= 118.999 f30-0))
)
(-> this draw art-group data 4)
)
((and (= s5-0 (-> this draw art-group data 4))
(>= f30-0 119.0)
(>= (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 4)) frames num-frames) -1))
(ja-frame-num 0)
)
)
(if (rand-vu-percent? 0.9)
(-> this draw art-group data 4)
(-> this draw art-group data 5)
)
)
((and (= s5-0 (-> this draw art-group data 5)) (>= f30-0 0.0) (>= 258.999 f30-0))
(-> this draw art-group data 5)
)
((and (= s5-0 (-> this draw art-group data 5))
(>= f30-0 259.0)
(>= (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 5)) frames num-frames) -1))
(ja-frame-num 0)
)
)
(-> this draw art-group data 4)
)
(else
(-> this draw art-group data 4)
)
)
)
(deftype brutter-npc (process-taskable)
()
)
(defmethod init-art! ((this brutter-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-brutter-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 10))
0
(none)
)
(deftype ashelin-npc (process-taskable)
()
)
(defmethod init-art! ((this ashelin-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-ashelin-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(defmethod get-art-elem ((this ashelin-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(case (-> this task actor)
(((game-task-actor ashelin-throne))
(logior! (-> this draw status) (draw-control-status no-draw-bounds))
(let ((v1-7 (-> this root root-prim)))
(set! (-> v1-7 prim-core collide-as) (collide-spec))
(set! (-> v1-7 prim-core collide-with) (collide-spec))
)
0
)
)
(-> this draw art-group data 3)
)
(deftype daxter-npc (process-taskable)
()
)
(defmethod init-art! ((this daxter-npc))
"@see [[initialize-skeleton]]"
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-sidekick-highres" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(set! (-> this draw light-index) (the-as uint 30))
0
(none)
)
(defmethod get-art-elem ((this daxter-npc))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
(-> this draw art-group data 3)
)
(defskelgroup skel-prsn-torture prsn-torture prsn-torture-lod0-jg prsn-torture-idle-ja
((prsn-torture-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 20)
:origin-joint-index 3
)
(defskelgroup skel-tomb-boss-bridge-a tomb-boss-bridge tomb-boss-bridge-a-lod0-jg tomb-boss-bridge-a-idle-ja
((tomb-boss-bridge-a-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 17)
:origin-joint-index 30
)
(defskelgroup skel-tomb-boss-bridge-b tomb-boss-bridge tomb-boss-bridge-b-lod0-jg tomb-boss-bridge-b-idle-ja
((tomb-boss-bridge-b-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 17)
:origin-joint-index 31
)
(defskelgroup skel-time-map time-map time-map-lod0-jg -1
((time-map-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
:origin-joint-index 20
)
(defskelgroup skel-precursor-stone precursor-stone precursor-stone-lod0-jg -1
((precursor-stone-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
:origin-joint-index 3
)
(defskelgroup skel-seal-of-mar seal-of-mar seal-of-mar-lod0-jg -1
((seal-of-mar-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-talk-box talk-box talk-box-lod0-jg talk-box-idle-ja
((talk-box-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
:origin-joint-index 3
)
(defskelgroup skel-rift-ring rift-ring rift-ring-lod0-jg -1
((rift-ring-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 60)
:origin-joint-index 6
)
(defskelgroup skel-mtn-shard mtn-shard mtn-shard-lod0-jg mtn-shard-idle-ja
((mtn-shard-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 0.5)
:origin-joint-index 3
)
(defskelgroup skel-mtn-lens mtn-lens mtn-lens-lod0-jg mtn-lens-idle-ja
((mtn-lens-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 0.5)
:origin-joint-index 3
)
(defskelgroup skel-mtn-gear-device-gear mtn-gear-device-gear mtn-gear-device-gear-lod0-jg mtn-gear-device-gear-idle-ja
((mtn-gear-device-gear-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 0.5)
:origin-joint-index 3
)
(defskelgroup skel-heart-of-mar heart-of-mar heart-of-mar-lod0-jg heart-of-mar-idle-ja
((heart-of-mar-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
:origin-joint-index 3
)
(defskelgroup skel-gun-upgrade-a gun-upgrade-a gun-upgrade-a-lod0-jg -1
((gun-upgrade-a-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 1)
:origin-joint-index 3
)
(defun intro-play ()
"A dedicated function for playing the intro cutscenes in the correct order
```opengoal
\"intro-samos-hut\" \"intro-vortex\" \"intro-city-square\" \"intro-prison\"
```"
(set! (-> *setting-control* user-default border-mode) #t)
(set! (-> *level* play?) (-> *setting-control* user-default border-mode))
(process-spawn
scene-player
:init scene-player-init
'("intro-samos-hut" "intro-vortex" "intro-city-square" "intro-prison")
#t
"village1-start"
)
0
(none)
)
(defun outro-play ()
"A dedicated function for playing the intro cutscenes in the correct order
```opengoal
\"outro-nest\" \"outro-palace\" \"outro-hiphog\" \"outro-port\"
```"
(set! (-> *setting-control* user-default border-mode) #t)
(set! (-> *level* play?) (-> *setting-control* user-default border-mode))
(process-spawn
scene-player
:init scene-player-init
'("outro-nest" "outro-palace" "outro-hiphog" "outro-port")
#t
"nestb-outro"
)
0
(none)
)