2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
2024-05-12 12:37:59 -04:00
|
|
|
(bundles "INT.DGO")
|
|
|
|
(require "engine/common-obs/process-taskable.gc")
|
2020-09-04 14:44:23 -04:00
|
|
|
|
2021-10-16 15:12:01 -04:00
|
|
|
;; DECOMP BEGINS
|
2022-06-09 21:18:08 -04:00
|
|
|
|
2021-08-22 21:03:47 -04:00
|
|
|
(deftype evilbro (process-taskable)
|
2024-06-05 22:17:31 -04:00
|
|
|
((evilsis entity-actor)))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2024-06-05 22:17:31 -04:00
|
|
|
(defskelgroup *evilbro-intro-sg*
|
|
|
|
evilbro
|
|
|
|
evilbro-lod0-jg
|
|
|
|
evilbro-idle-ja
|
|
|
|
((evilbro-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 4)
|
|
|
|
:shadow evilbro-shadow-mg)
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod play-anim! ((this evilbro) (arg0 symbol))
|
2021-10-16 15:12:01 -04:00
|
|
|
(cond
|
2022-01-15 20:01:38 -05:00
|
|
|
(arg0
|
2024-06-05 22:17:31 -04:00
|
|
|
(close-specific-task! (game-task leaving-misty) (task-status need-introduction))
|
|
|
|
(send-event (-> this evilsis extra process) 'clone (process->handle this)))
|
|
|
|
(else (set! (-> this will-talk) #t)))
|
|
|
|
(the-as basic (new 'static 'spool-anim :name "evilbro-misty-end" :index 5 :parts 9 :command-list '())))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod get-art-elem ((this evilbro))
|
2024-06-05 22:17:31 -04:00
|
|
|
(-> this draw art-group data 3))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
|
|
|
(defstate play-anim (evilbro)
|
|
|
|
:virtual #t
|
2024-06-05 22:17:31 -04:00
|
|
|
:exit
|
|
|
|
(behavior ()
|
|
|
|
(send-event (-> self evilsis extra process) 'end-mode)
|
|
|
|
((-> (method-of-type process-taskable play-anim) exit))))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
|
|
|
(defstate idle (evilbro)
|
|
|
|
:virtual #t
|
2024-06-05 22:17:31 -04:00
|
|
|
:code
|
|
|
|
(behavior ()
|
|
|
|
(if (!= (ja-group) (get-art-elem self)) (ja-channel-push! 1 (seconds 0.05)))
|
|
|
|
(loop
|
|
|
|
(ja-no-eval :group! evilbro-idle-ja :num! (seek!) :frame-num 0.0)
|
|
|
|
(until (ja-done? 0)
|
2022-01-15 20:01:38 -05:00
|
|
|
(suspend)
|
2024-06-05 22:17:31 -04:00
|
|
|
(ja :num! (seek!)))
|
|
|
|
(let ((gp-0 (current-time)))
|
|
|
|
(while (let ((s5-0 (current-time))
|
|
|
|
(f30-0 300.0)
|
|
|
|
(f28-0 0.16)
|
|
|
|
(f26-0 0.17000002))
|
|
|
|
(< (- s5-0 (the-as time-frame (the int (* f30-0 (+ f28-0 (* f26-0 (rand-float-gen))))))) gp-0))
|
|
|
|
(suspend)))
|
|
|
|
(ja-no-eval :group! (ja-group) :num! (seek! (ja-aframe 0.0 0)) :frame-num (ja-aframe 16.0 0))
|
|
|
|
(until (ja-done? 0)
|
2022-01-15 20:01:38 -05:00
|
|
|
(suspend)
|
2024-06-05 22:17:31 -04:00
|
|
|
(ja :num! (seek! (ja-aframe 0.0 0))))
|
|
|
|
(let ((gp-3 (current-time)))
|
|
|
|
(while (let ((s5-1 (current-time))
|
|
|
|
(f30-1 300.0)
|
|
|
|
(f28-1 0.16)
|
|
|
|
(f26-1 0.17000002))
|
|
|
|
(< (- s5-1 (the-as time-frame (the int (* f30-1 (+ f28-1 (* f26-1 (rand-float-gen))))))) gp-3))
|
|
|
|
(suspend))))))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this evilbro) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(process-taskable-method-40 this arg0 *evilbro-intro-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
|
|
|
(set! (-> this tasks) (get-task-control (game-task leaving-misty)))
|
|
|
|
(set! (-> this evilsis) (entity-actor-lookup arg0 'alt-actor 0))
|
|
|
|
(process-taskable-method-42 this)
|
2024-06-05 22:17:31 -04:00
|
|
|
(none))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2024-06-05 22:17:31 -04:00
|
|
|
(deftype evilsis (process-taskable) ())
|
2021-10-16 15:12:01 -04:00
|
|
|
|
2024-06-05 22:17:31 -04:00
|
|
|
(defskelgroup *evilsis-intro-sg*
|
|
|
|
evilsis
|
|
|
|
evilsis-lod0-jg
|
|
|
|
evilsis-idle-ja
|
|
|
|
((evilsis-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 4)
|
|
|
|
:shadow evilsis-shadow-mg)
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod play-anim! ((this evilsis) (arg0 symbol))
|
2021-08-22 21:03:47 -04:00
|
|
|
(if arg0
|
2024-06-05 22:17:31 -04:00
|
|
|
(format 0
|
|
|
|
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
|
|
|
|
(-> this name)
|
|
|
|
(task-status->string (current-status (-> this tasks)))))
|
|
|
|
(the-as basic (get-art-elem this)))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod get-art-elem ((this evilsis))
|
2024-06-05 22:17:31 -04:00
|
|
|
(-> this draw art-group data 3))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
|
|
|
(defstate idle (evilsis)
|
|
|
|
:virtual #t
|
2024-06-05 22:17:31 -04:00
|
|
|
:trans
|
|
|
|
(behavior ()
|
|
|
|
(set! (-> self will-talk) #f)
|
|
|
|
((-> (method-of-type process-taskable idle) trans))))
|
2021-08-22 21:03:47 -04:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this evilsis) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(process-taskable-method-40 this arg0 *evilsis-intro-sg* 3 0 (new 'static 'vector :w 4096.0) 5)
|
|
|
|
(set! (-> this tasks) (get-task-control (game-task leaving-misty)))
|
|
|
|
(process-taskable-method-42 this)
|
2024-06-05 22:17:31 -04:00
|
|
|
(none))
|