2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
|
|
|
|
|
|
|
;; name: oracle.gc
|
|
|
|
;; name in dgo: oracle
|
|
|
|
;; dgos: CIT, L1, VI1, VI2, VI3, VILLAGEP
|
|
|
|
|
2021-10-16 15:12:01 -04:00
|
|
|
;; DECOMP BEGINS
|
|
|
|
|
2021-08-18 21:33:31 -04:00
|
|
|
(deftype oracle (process-taskable)
|
|
|
|
((first-task uint8 :offset-assert 380)
|
|
|
|
(second-task uint8 :offset-assert 381)
|
|
|
|
(left-eye-cell handle :offset-assert 384)
|
|
|
|
(right-eye-cell handle :offset-assert 392)
|
|
|
|
)
|
|
|
|
:heap-base #x120
|
|
|
|
:method-count-assert 53
|
|
|
|
:size-assert #x190
|
|
|
|
:flag-assert #x3501200190
|
|
|
|
)
|
|
|
|
|
2021-10-16 15:12:01 -04:00
|
|
|
|
2021-11-04 19:10:39 -04:00
|
|
|
(defskelgroup *oracle-sg* oracle
|
|
|
|
0
|
|
|
|
2
|
|
|
|
((1 (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 4)
|
|
|
|
:longest-edge (meters 0)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
(defmethod play-anim! oracle ((obj oracle) (arg0 symbol))
|
2022-01-31 20:44:54 -05:00
|
|
|
(set! (-> obj talk-message) (game-text-id press-to-talk))
|
2022-01-15 20:01:38 -05:00
|
|
|
(case (current-status (-> obj tasks))
|
|
|
|
(((task-status need-hint) (task-status need-introduction))
|
2021-10-16 15:12:01 -04:00
|
|
|
(when arg0
|
2022-01-15 20:01:38 -05:00
|
|
|
(close-specific-task! (the-as game-task (-> obj first-task)) (task-status need-introduction))
|
|
|
|
(close-specific-task! (the-as game-task (-> obj second-task)) (task-status need-introduction))
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(case (-> (level-get-target-inside *level*) name)
|
|
|
|
(('village1)
|
|
|
|
(new 'static 'spool-anim :name "oracle-intro-1" :index 9 :parts 5 :command-list '())
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(('village2)
|
|
|
|
(new 'static 'spool-anim
|
|
|
|
:name "oracle-intro-2"
|
|
|
|
:index 11
|
|
|
|
:parts 4
|
|
|
|
:command-list
|
|
|
|
'((0 kill "pontoonten-20")
|
|
|
|
(0 kill "pontoonten-19")
|
|
|
|
(0 kill "pontoonten-18")
|
|
|
|
(0 kill "pontoonten-15")
|
|
|
|
(0 kill "pontoonten-14")
|
|
|
|
(0 kill "pontoonfive-14")
|
|
|
|
(0 kill "pontoonfive-15")
|
|
|
|
(0 kill "pontoonfive-19")
|
|
|
|
(0 kill "pontoonfive-20")
|
|
|
|
(0 kill "med-res-level-12")
|
|
|
|
(0 kill "med-res-level-13")
|
|
|
|
(0 kill "med-res-level-15")
|
|
|
|
(0 kill "money-2844")
|
|
|
|
(0 kill "money-2845")
|
|
|
|
(0 kill "money-2846")
|
|
|
|
(0 kill "money-2847")
|
|
|
|
(0 kill "money-2848")
|
|
|
|
(0 kill "money-2849")
|
|
|
|
(0 kill "money-2850")
|
|
|
|
(0 kill "money-2854")
|
|
|
|
(0 kill "money-2855")
|
|
|
|
(0 kill "money-2856")
|
|
|
|
(0 kill "money-2860")
|
|
|
|
(0 kill "money-2861")
|
|
|
|
(0 kill "money-2862")
|
|
|
|
(0 kill "eco-27")
|
|
|
|
(0 kill "eco-26")
|
|
|
|
(0 kill "sharkey-25")
|
|
|
|
(0 kill "barrel-13")
|
|
|
|
(0 kill "barrel-14")
|
|
|
|
(0 kill "barrel-15")
|
|
|
|
(0 kill "barrel-16")
|
|
|
|
(0 kill "barrel-17")
|
|
|
|
(0 kill "barrel-18")
|
|
|
|
(0 kill "barrel-19")
|
|
|
|
(0 kill "barrel-20")
|
|
|
|
(0 kill "barrel-21")
|
|
|
|
(0 kill "barrel-22")
|
|
|
|
(0 kill "barrel-23")
|
|
|
|
(0 kill "villageb-part-18")
|
|
|
|
(0 kill "villageb-part-19")
|
|
|
|
(0 kill "villageb-part-20")
|
|
|
|
(0 kill "villageb-part-21")
|
|
|
|
(0 kill "villageb-part-28")
|
|
|
|
(0 kill "villageb-part-29")
|
|
|
|
(0 kill "villageb-part-30")
|
|
|
|
(0 kill "villageb-part-31")
|
|
|
|
(0 kill "villageb-part-32")
|
|
|
|
(0 kill "villageb-part-33")
|
|
|
|
(0 kill "villageb-part-35")
|
|
|
|
(0 kill "villageb-part-37")
|
|
|
|
(0 kill "villageb-part-38")
|
|
|
|
(0 kill "villageb-part-47")
|
|
|
|
(0 kill "villageb-part-48")
|
|
|
|
(0 kill "villageb-part-49")
|
|
|
|
(0 kill "villageb-part-50")
|
|
|
|
(0 kill "villageb-part-56")
|
|
|
|
(0 kill "villageb-part-62")
|
|
|
|
(0 kill "villageb-part-63")
|
|
|
|
(0 kill "villageb-ogreboss-1")
|
|
|
|
(0 kill "crate-3127")
|
|
|
|
(0 kill "crate-3128")
|
|
|
|
(0 kill "crate-3129")
|
|
|
|
(0 kill "crate-3133")
|
|
|
|
(0 kill "geologist-1")
|
|
|
|
(0 kill "fireboulder-2")
|
|
|
|
(0 kill "fireboulder-3")
|
|
|
|
(0 kill "fireboulder-4")
|
|
|
|
(0 kill "water-vol-100")
|
|
|
|
(0 kill "water-vol-101")
|
|
|
|
(0 kill "water-vol-102")
|
|
|
|
(0 kill "water-vol-103")
|
|
|
|
(0 kill "water-vol-284")
|
|
|
|
(0 kill "water-vol-285")
|
|
|
|
(0 kill "water-vol-286")
|
|
|
|
(0 kill "ceilingflag-6")
|
|
|
|
(0 kill "ceilingflag-7")
|
|
|
|
(0 kill "ceilingflag-8")
|
|
|
|
(0 kill "ceilingflag-9")
|
|
|
|
(0 kill "orb-cache-top-14")
|
|
|
|
(0 setting-reset ocean-off near)
|
|
|
|
(399 setting-unset ocean-off)
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(('village3)
|
|
|
|
(new 'static 'spool-anim :name "oracle-intro-3" :index 13 :parts 4 :command-list '())
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(((task-status need-reminder))
|
|
|
|
(set! (-> obj skippable) #t)
|
|
|
|
(case (-> (level-get-target-inside *level*) name)
|
|
|
|
(('village1)
|
|
|
|
(new 'static 'spool-anim :name "oracle-reminder-1" :index 10 :parts 4 :command-list '())
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(('village2)
|
|
|
|
(new 'static 'spool-anim :name "oracle-reminder-2" :index 12 :parts 2 :command-list '())
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(('village3)
|
|
|
|
(new 'static 'spool-anim :name "oracle-reminder-3" :index 14 :parts 2 :command-list '())
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
)
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(((task-status need-reward-speech))
|
|
|
|
(cond
|
|
|
|
(arg0
|
|
|
|
(set! (-> obj cell-for-task) (current-task (-> obj tasks)))
|
|
|
|
(close-current! (-> obj tasks))
|
|
|
|
(send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-oracle-inc)))
|
|
|
|
(cond
|
|
|
|
((= (current-task (-> obj tasks)) (-> obj first-task))
|
|
|
|
(let ((a0-25 (handle->process (-> obj right-eye-cell))))
|
|
|
|
(if a0-25
|
|
|
|
(deactivate a0-25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(else
|
|
|
|
(let ((a0-29 (handle->process (-> obj left-eye-cell))))
|
|
|
|
(if a0-29
|
|
|
|
(deactivate a0-29)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(else
|
|
|
|
(set! (-> obj will-talk) #t)
|
2022-01-31 20:44:54 -05:00
|
|
|
(set! (-> obj talk-message) (game-text-id press-to-trade-money-oracle))
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(cond
|
|
|
|
((= (current-task (-> obj tasks)) (-> obj first-task))
|
|
|
|
(case (-> (level-get-target-inside *level*) name)
|
|
|
|
(('village1)
|
|
|
|
(new 'static 'spool-anim :name "oracle-right-eye-1" :index 3 :parts 2 :command-list '())
|
|
|
|
)
|
|
|
|
(('village2)
|
|
|
|
(new 'static 'spool-anim :name "oracle-right-eye-2" :index 5 :parts 2 :command-list '())
|
|
|
|
)
|
|
|
|
(('village3)
|
|
|
|
(new 'static 'spool-anim :name "oracle-right-eye-3" :index 7 :parts 2 :command-list '())
|
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(else
|
|
|
|
(case (-> (level-get-target-inside *level*) name)
|
|
|
|
(('village1)
|
|
|
|
(new 'static 'spool-anim :name "oracle-left-eye-1" :index 4 :parts 2 :command-list '())
|
|
|
|
)
|
|
|
|
(('village2)
|
|
|
|
(new 'static 'spool-anim :name "oracle-left-eye-2" :index 6 :parts 2 :command-list '())
|
|
|
|
)
|
|
|
|
(('village3)
|
|
|
|
(new 'static 'spool-anim :name "oracle-left-eye-3" :index 8 :parts 2 :command-list '())
|
|
|
|
)
|
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(else
|
|
|
|
(if arg0
|
|
|
|
(format
|
|
|
|
0
|
|
|
|
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
|
|
|
|
(-> obj name)
|
|
|
|
(task-status->string (current-status (-> obj tasks)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(-> obj draw art-group data 2)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defmethod get-art-elem oracle ((obj oracle))
|
|
|
|
(-> obj draw art-group data 2)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate idle (oracle)
|
|
|
|
:virtual #t
|
|
|
|
:exit
|
|
|
|
(behavior ()
|
2022-01-15 20:01:38 -05:00
|
|
|
(stop! (-> self sound))
|
|
|
|
((-> (method-of-type process-taskable idle) exit))
|
|
|
|
(none)
|
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
:trans
|
|
|
|
(behavior ()
|
2022-01-15 20:01:38 -05:00
|
|
|
(update! (-> self sound))
|
|
|
|
((-> (method-of-type process-taskable idle) trans))
|
|
|
|
(none)
|
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
|
|
|
|
2021-11-15 19:05:28 -05:00
|
|
|
(defmethod init-from-entity! oracle ((obj oracle) (arg0 entity-actor))
|
2022-01-15 20:01:38 -05:00
|
|
|
(dummy-40 obj arg0 *oracle-sg* 3 4 (new 'static 'vector :y -4096.0 :w 4096.0) -1)
|
2022-05-02 18:35:17 -04:00
|
|
|
(set! (-> obj sound)
|
|
|
|
(new 'process 'ambient-sound (static-sound-spec "oracle-sleep" :fo-max 50) (-> obj root-override trans))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-10-16 15:12:01 -04:00
|
|
|
(set! (-> obj first-task) (the-as uint (-> arg0 extra perm task)))
|
|
|
|
(set! (-> obj second-task) (res-lump-value arg0 'alt-task uint))
|
2022-01-15 20:01:38 -05:00
|
|
|
(set! (-> obj tasks) (get-task-control (the-as game-task (-> obj first-task))))
|
2021-10-16 15:12:01 -04:00
|
|
|
(set! (-> obj right-eye-cell) (the-as handle #f))
|
|
|
|
(set! (-> obj left-eye-cell) (the-as handle #f))
|
2022-02-13 13:03:30 -05:00
|
|
|
(logior! (-> obj draw status) (draw-status skip-bones))
|
2021-10-16 15:12:01 -04:00
|
|
|
(let ((s4-0 (new 'stack-no-clear 'vector))
|
2022-01-15 20:01:38 -05:00
|
|
|
(s5-1 (lambda :behavior oracle
|
|
|
|
()
|
|
|
|
(let* ((gp-0 (-> self root-override))
|
|
|
|
(v1-1 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) collide-shape))
|
|
|
|
gp-0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(a1-1 (if v1-1
|
|
|
|
(-> v1-1 root-prim prim-core)
|
|
|
|
(-> self root-override trans)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(spawn (-> self part) (the-as vector a1-1))
|
|
|
|
)
|
|
|
|
0
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(ja-post)
|
|
|
|
(when (not (task-closed? (the-as game-task (-> obj first-task)) (task-status need-resolution)))
|
|
|
|
(vector<-cspace! s4-0 (-> obj node-list data 5))
|
|
|
|
(let ((s3-0 (get-process *default-dead-pool* manipy #x4000)))
|
|
|
|
(set! (-> obj right-eye-cell)
|
|
|
|
(ppointer->handle
|
|
|
|
(when s3-0
|
|
|
|
(let ((t9-8 (method-of-type manipy activate)))
|
|
|
|
(t9-8 (the-as manipy s3-0) obj 'manipy (the-as pointer #x70004000))
|
|
|
|
)
|
|
|
|
(run-now-in-process s3-0 manipy-init s4-0 (-> obj entity) *fuel-cell-sg* (new 'static 'vector :w 4915.2))
|
|
|
|
(-> s3-0 ppointer)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(send-event
|
|
|
|
(handle->process (-> obj right-eye-cell))
|
|
|
|
'eval
|
|
|
|
(lambda :behavior oracle () (let ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self)))
|
|
|
|
(set! (-> self part) v0-0)
|
|
|
|
(the-as sparticle-launch-group v0-0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(send-event (handle->process (-> obj right-eye-cell)) 'trans-hook s5-1)
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
2022-01-15 20:01:38 -05:00
|
|
|
(when (not (task-closed? (the-as game-task (-> obj second-task)) (task-status need-resolution)))
|
|
|
|
(vector<-cspace! s4-0 (-> obj node-list data 6))
|
|
|
|
(let ((s3-1 (get-process *default-dead-pool* manipy #x4000)))
|
|
|
|
(set! (-> obj left-eye-cell)
|
|
|
|
(ppointer->handle
|
|
|
|
(when s3-1
|
|
|
|
(let ((t9-15 (method-of-type manipy activate)))
|
|
|
|
(t9-15 (the-as manipy s3-1) obj 'manipy (the-as pointer #x70004000))
|
|
|
|
)
|
|
|
|
(run-now-in-process s3-1 manipy-init s4-0 (-> obj entity) *fuel-cell-sg* (new 'static 'vector :w 4915.2))
|
|
|
|
(-> s3-1 ppointer)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(send-event
|
|
|
|
(handle->process (-> obj left-eye-cell))
|
|
|
|
'eval
|
|
|
|
(lambda :behavior oracle () (let ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self)))
|
|
|
|
(set! (-> self part) v0-0)
|
|
|
|
(the-as sparticle-launch-group v0-0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(send-event (handle->process (-> obj left-eye-cell)) 'trans-hook s5-1)
|
2021-10-16 15:12:01 -04:00
|
|
|
)
|
2021-08-18 21:33:31 -04:00
|
|
|
)
|
2021-10-16 15:12:01 -04:00
|
|
|
(dummy-42 obj)
|
|
|
|
(none)
|
2021-09-01 16:59:26 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|