2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
|
|
|
|
|
|
|
;; name: evilbro.gc
|
|
|
|
;; name in dgo: evilbro
|
|
|
|
;; dgos: INT, L1
|
|
|
|
|
2021-10-16 15:12:01 -04:00
|
|
|
;; DECOMP BEGINS
|
2022-05-23 18:53:02 -04:00
|
|
|
(import "goal_src/import/evilsis-ag.gc")
|
|
|
|
(import "goal_src/import/evilbro-ag.gc")
|
2021-10-16 15:12:01 -04:00
|
|
|
|
2021-08-22 21:03:47 -04:00
|
|
|
(deftype evilbro (process-taskable)
|
2021-08-22 23:16:55 -04:00
|
|
|
((evilsis entity :offset-assert 380)
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
|
|
|
:heap-base #x110
|
|
|
|
:method-count-assert 53
|
|
|
|
:size-assert #x180
|
|
|
|
:flag-assert #x3501100180
|
|
|
|
)
|
|
|
|
|
2021-10-16 15:12:01 -04:00
|
|
|
|
2022-05-19 21:30:14 -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
|
|
|
|
|
|
|
(defmethod play-anim! evilbro ((obj evilbro) (arg0 symbol))
|
2021-10-16 15:12:01 -04:00
|
|
|
(cond
|
2022-01-15 20:01:38 -05:00
|
|
|
(arg0
|
|
|
|
(close-specific-task! (game-task leaving-misty) (task-status need-introduction))
|
|
|
|
(send-event (-> obj evilsis extra process) 'clone (process->handle obj))
|
|
|
|
)
|
|
|
|
(else
|
|
|
|
(set! (-> obj will-talk) #t)
|
|
|
|
)
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(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
|
|
|
)
|
|
|
|
|
|
|
|
(defmethod get-art-elem evilbro ((obj evilbro))
|
|
|
|
(-> obj draw art-group data 3)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate play-anim (evilbro)
|
|
|
|
:virtual #t
|
|
|
|
:exit
|
|
|
|
(behavior ()
|
2022-01-15 20:01:38 -05:00
|
|
|
(send-event (-> self evilsis extra process) 'end-mode)
|
|
|
|
((-> (method-of-type process-taskable play-anim) exit))
|
|
|
|
(none)
|
|
|
|
)
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate idle (evilbro)
|
|
|
|
:virtual #t
|
|
|
|
:code
|
|
|
|
(behavior ()
|
2022-05-19 21:30:14 -04:00
|
|
|
(if (!= (ja-group) (get-art-elem self))
|
|
|
|
(ja-channel-push! 1 (seconds 0.05))
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
|
|
|
(ja-no-eval :group! evilbro-idle-ja :num! (seek!) :frame-num 0.0)
|
2022-01-15 20:01:38 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek!))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
(let ((gp-0 (-> *display* base-frame-counter)))
|
|
|
|
(while (let* ((s5-0 (-> *display* base-frame-counter))
|
|
|
|
(f30-0 300.0)
|
|
|
|
(f28-0 0.16)
|
|
|
|
(f26-0 0.17000002)
|
|
|
|
(v1-29 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
|
|
|
(v1-30 (the-as number (logior #x3f800000 v1-29)))
|
|
|
|
)
|
2022-02-12 12:26:19 -05:00
|
|
|
(< (- s5-0 (the-as time-frame (the int (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-30)))))))) gp-0)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja-no-eval :group! (ja-group) :num! (seek! (ja-aframe 0.0 0)) :frame-num (ja-aframe 16.0 0))
|
2022-01-15 20:01:38 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! (ja-aframe 0.0 0)))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
(let ((gp-3 (-> *display* base-frame-counter)))
|
|
|
|
(while (let* ((s5-1 (-> *display* base-frame-counter))
|
|
|
|
(f30-1 300.0)
|
|
|
|
(f28-1 0.16)
|
|
|
|
(f26-1 0.17000002)
|
|
|
|
(v1-54 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
|
|
|
(v1-55 (the-as number (logior #x3f800000 v1-54)))
|
|
|
|
)
|
2022-02-12 12:26:19 -05:00
|
|
|
(< (- s5-1 (the-as time-frame (the int (* f30-1 (+ f28-1 (* f26-1 (+ -1.0 (the-as float v1-55)))))))) gp-3)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(none)
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2021-11-15 19:05:28 -05:00
|
|
|
(defmethod init-from-entity! evilbro ((obj evilbro) (arg0 entity-actor))
|
2021-08-22 21:03:47 -04:00
|
|
|
(dummy-40 obj arg0 *evilbro-intro-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
|
|
|
(set! (-> obj tasks) (get-task-control (game-task leaving-misty)))
|
2021-08-22 23:16:55 -04:00
|
|
|
(set! (-> obj evilsis) (entity-actor-lookup arg0 'alt-actor 0))
|
2021-08-22 21:03:47 -04:00
|
|
|
(dummy-42 obj)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype evilsis (process-taskable)
|
|
|
|
()
|
|
|
|
:heap-base #x110
|
|
|
|
:method-count-assert 53
|
|
|
|
:size-assert #x17c
|
|
|
|
:flag-assert #x350110017c
|
|
|
|
)
|
|
|
|
|
2021-10-16 15:12:01 -04:00
|
|
|
|
2022-05-19 21:30:14 -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
|
|
|
|
|
|
|
(defmethod play-anim! evilsis ((obj evilsis) (arg0 symbol))
|
|
|
|
(if arg0
|
2022-01-15 20:01:38 -05:00
|
|
|
(format
|
|
|
|
0
|
|
|
|
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
|
|
|
|
(-> obj name)
|
|
|
|
(task-status->string (current-status (-> obj tasks)))
|
|
|
|
)
|
|
|
|
)
|
2021-08-22 21:03:47 -04:00
|
|
|
(the-as basic (get-art-elem obj))
|
|
|
|
)
|
|
|
|
|
|
|
|
(defmethod get-art-elem evilsis ((obj evilsis))
|
|
|
|
(-> obj draw art-group data 3)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate idle (evilsis)
|
|
|
|
:virtual #t
|
|
|
|
:trans
|
|
|
|
(behavior ()
|
2022-01-15 20:01:38 -05:00
|
|
|
(set! (-> self will-talk) #f)
|
|
|
|
((-> (method-of-type process-taskable idle) trans))
|
|
|
|
(none)
|
|
|
|
)
|
2021-08-22 21:03:47 -04:00
|
|
|
)
|
|
|
|
|
2021-11-15 19:05:28 -05:00
|
|
|
(defmethod init-from-entity! evilsis ((obj evilsis) (arg0 entity-actor))
|
2021-08-22 21:03:47 -04:00
|
|
|
(dummy-40 obj arg0 *evilsis-intro-sg* 3 0 (new 'static 'vector :w 4096.0) 5)
|
|
|
|
(set! (-> obj tasks) (get-task-control (game-task leaving-misty)))
|
|
|
|
(dummy-42 obj)
|
|
|
|
(none)
|
|
|
|
)
|
2021-10-16 15:12:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|