mirror of
https://github.com/open-goal/jak-project
synced 2026-08-08 02:31:30 -04:00
48cb9bb787
Add support for `as-type` macro, and detecting inline font methods. This works in all three games but I've only updated jak 3's goal_src for now. Eventually I will go back and work through the others, but I want to get more decompiler features in first.  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
1232 lines
40 KiB
Common Lisp
Vendored
Generated
1232 lines
40 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition for function wasall-kill-duplicate-vehicle
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defun wasall-kill-duplicate-vehicle ()
|
|
(kill-by-type w-parking-spot *active-pool*)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type dust-storm-randomizer
|
|
(deftype dust-storm-randomizer (process)
|
|
()
|
|
(:state-methods
|
|
idle
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type dust-storm-randomizer
|
|
(defmethod inspect ((this dust-storm-randomizer))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-68)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Tname: ~A~%" (-> this name))
|
|
(format #t "~1Tmask: #x~X : (process-mask " (-> this mask))
|
|
(let ((s5-0 (-> this mask)))
|
|
(if (= (logand s5-0 (process-mask process-tree)) (process-mask process-tree))
|
|
(format #t "process-tree ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask target)) (process-mask target))
|
|
(format #t "target ")
|
|
)
|
|
(if (= (logand (process-mask collectable) s5-0) (process-mask collectable))
|
|
(format #t "collectable ")
|
|
)
|
|
(if (= (logand (process-mask projectile) s5-0) (process-mask projectile))
|
|
(format #t "projectile ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask sleep-code)) (process-mask sleep-code))
|
|
(format #t "sleep-code ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask actor-pause)) (process-mask actor-pause))
|
|
(format #t "actor-pause ")
|
|
)
|
|
(if (= (logand (process-mask metalhead) s5-0) (shl #x8000 16))
|
|
(format #t "metalhead ")
|
|
)
|
|
(if (= (logand (process-mask bot) s5-0) (process-mask bot))
|
|
(format #t "bot ")
|
|
)
|
|
(if (= (logand (process-mask vehicle) s5-0) (process-mask vehicle))
|
|
(format #t "vehicle ")
|
|
)
|
|
(if (= (logand (process-mask enemy) s5-0) (process-mask enemy))
|
|
(format #t "enemy ")
|
|
)
|
|
(if (= (logand (process-mask entity) s5-0) (process-mask entity))
|
|
(format #t "entity ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask heap-shrunk)) (process-mask heap-shrunk))
|
|
(format #t "heap-shrunk ")
|
|
)
|
|
(if (= (logand (process-mask sidekick) s5-0) (process-mask sidekick))
|
|
(format #t "sidekick ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask going)) (process-mask going))
|
|
(format #t "going ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask execute)) (process-mask execute))
|
|
(format #t "execute ")
|
|
)
|
|
(if (= (logand (process-mask civilian) s5-0) (process-mask civilian))
|
|
(format #t "civilian ")
|
|
)
|
|
(if (= (logand (process-mask death) s5-0) (process-mask death))
|
|
(format #t "death ")
|
|
)
|
|
(if (= (logand (process-mask guard) s5-0) (process-mask guard))
|
|
(format #t "guard ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask no-kill)) (process-mask no-kill))
|
|
(format #t "no-kill ")
|
|
)
|
|
(if (= (logand (process-mask kg-robot) s5-0) (process-mask kg-robot))
|
|
(format #t "kg-robot ")
|
|
)
|
|
(if (= (logand (process-mask platform) s5-0) (process-mask platform))
|
|
(format #t "platform ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask freeze)) (process-mask freeze))
|
|
(format #t "freeze ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask sleep)) (process-mask sleep))
|
|
(format #t "sleep ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask progress)) (process-mask progress))
|
|
(format #t "progress ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask menu)) (process-mask menu))
|
|
(format #t "menu ")
|
|
)
|
|
(if (= (logand (process-mask camera) s5-0) (process-mask camera))
|
|
(format #t "camera ")
|
|
)
|
|
(if (= (logand (process-mask ambient) s5-0) (process-mask ambient))
|
|
(format #t "ambient ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask dark-effect)) (process-mask dark-effect))
|
|
(format #t "dark-effect ")
|
|
)
|
|
(if (= (logand (process-mask crate) s5-0) (process-mask crate))
|
|
(format #t "crate ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask kernel-run)) (process-mask kernel-run))
|
|
(format #t "kernel-run ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask movie)) (process-mask movie))
|
|
(format #t "movie ")
|
|
)
|
|
(if (= (logand s5-0 (process-mask pause)) (process-mask pause))
|
|
(format #t "pause ")
|
|
)
|
|
)
|
|
(format #t ")~%")
|
|
(format #t "~1Tclock: ~A~%" (-> this clock))
|
|
(format #t "~1Tparent: #x~X~%" (-> this parent))
|
|
(format #t "~1Tbrother: #x~X~%" (-> this brother))
|
|
(format #t "~1Tchild: #x~X~%" (-> this child))
|
|
(format #t "~1Tppointer: #x~X~%" (-> this ppointer))
|
|
(format #t "~1Tself: ~A~%" (-> this self))
|
|
(format #t "~1Tpool: ~A~%" (-> this pool))
|
|
(format #t "~1Tstatus: ~A~%" (-> this status))
|
|
(format #t "~1Tpid: ~D~%" (-> this pid))
|
|
(format #t "~1Tmain-thread: ~A~%" (-> this main-thread))
|
|
(format #t "~1Ttop-thread: ~A~%" (-> this top-thread))
|
|
(format #t "~1Tentity: ~A~%" (-> this entity))
|
|
(format #t "~1Tlevel: ~A~%" (-> this level))
|
|
(format #t "~1Tstate: ~A~%" (-> this state))
|
|
(format #t "~1Tprev-state: ~A~%" (-> this prev-state))
|
|
(format #t "~1Tnext-state: ~A~%" (-> this next-state))
|
|
(format #t "~1Tstate-stack: ~A~%" (-> this state-stack))
|
|
(format #t "~1Ttrans-hook: ~A~%" (-> this trans-hook))
|
|
(format #t "~1Tpost-hook: ~A~%" (-> this post-hook))
|
|
(format #t "~1Tevent-hook: ~A~%" (-> this event-hook))
|
|
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
|
|
(format #t "~1Theap-base: #x~X~%" (-> this heap-base))
|
|
(format #t "~1Theap-top: #x~X~%" (-> this heap-top))
|
|
(format #t "~1Theap-cur: #x~X~%" (-> this heap-cur))
|
|
(format #t "~1Tstack-frame-top: ~A~%" (-> this stack-frame-top))
|
|
(format #t "~1Theap: #<kheap @ #x~X>~%" (&-> this heap-base))
|
|
(format #t "~1Tconnection-list: ~`connectable`P~%" (-> this connection-list))
|
|
(format #t "~1Tstack[0] @ #x~X~%" (-> this stack))
|
|
(label cfg-68)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate idle (dust-storm-randomizer)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(until #f
|
|
(let ((f0-0 (cond
|
|
((logtest? (game-secrets bad-weather) (-> *game-info* secrets))
|
|
(set-setting! 'dust-storm-sound-scalar #f 1.0 0)
|
|
(rand-vu-float-range 0.35 0.6)
|
|
)
|
|
(else
|
|
(remove-setting! 'dust-storm-sound-scalar)
|
|
(rand-vu-float-range 0.08 0.2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set-setting! 'fog-special-interp-targ #f f0-0 0)
|
|
)
|
|
(suspend-for (seconds 15)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
|
|
;; definition for function dust-storm-randomizer-init-by-other
|
|
(defbehavior dust-storm-randomizer-init-by-other dust-storm-randomizer ()
|
|
(go-virtual idle)
|
|
)
|
|
|
|
;; definition for function spawn-dust-storm-randomizer
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defun spawn-dust-storm-randomizer ((arg0 process))
|
|
(process-spawn dust-storm-randomizer :name "dust-storm-randomizer" :to arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-temple
|
|
(deftype task-manager-temple (task-manager)
|
|
((rod-of-god handle)
|
|
(vehicle handle)
|
|
(minimap connection-minimap)
|
|
(minimap-temple connection-minimap)
|
|
)
|
|
(:methods
|
|
(task-manager-temple-method-32 (_type_) none)
|
|
(task-manager-temple-method-33 (_type_) none)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-temple
|
|
(defmethod inspect ((this task-manager-temple))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Trod-of-god: ~D~%" (-> this rod-of-god))
|
|
(format #t "~2Tvehicle: ~D~%" (-> this vehicle))
|
|
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> this minimap))
|
|
(format #t "~2Tminimap-temple: #<connection-minimap @ #x~X>~%" (-> this minimap-temple))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 33 of type task-manager-temple
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod task-manager-temple-method-33 ((this task-manager-temple))
|
|
(when (and (nonzero? (-> this minimap)) (-> this minimap))
|
|
(logior! (-> this minimap flags) (minimap-flag fade-out))
|
|
(set! (-> this minimap) #f)
|
|
)
|
|
(when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god))
|
|
(send-event (handle->process (-> this rod-of-god)) 'leave)
|
|
(set! (-> this rod-of-god) (the-as handle #f))
|
|
)
|
|
(when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple))
|
|
(logior! (-> this minimap-temple flags) (minimap-flag fade-out))
|
|
(set! (-> this minimap-temple) #f)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 32 of type task-manager-temple
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod task-manager-temple-method-32 ((this task-manager-temple))
|
|
(let ((s5-0 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type 15)) process-focusable)))
|
|
(cond
|
|
(s5-0
|
|
(when (and (nonzero? (-> this minimap)) (-> this minimap))
|
|
(logior! (-> this minimap flags) (minimap-flag fade-out))
|
|
(set! (-> this minimap) #f)
|
|
)
|
|
(cond
|
|
((and *target*
|
|
(focus-test? *target* pilot-riding)
|
|
(= (-> *vehicle-info* handle-by-vehicle-type 15) (-> *target* pilot vehicle))
|
|
)
|
|
(if (not (-> this minimap-temple))
|
|
(set! (-> this minimap-temple)
|
|
(add-icon! *minimap* this (the-as uint 119) (the-as int #f) (the-as vector #f) 0)
|
|
)
|
|
)
|
|
(when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god))
|
|
(send-event (handle->process (-> this rod-of-god)) 'leave)
|
|
(set! (-> this rod-of-god) (the-as handle #f))
|
|
)
|
|
)
|
|
(else
|
|
(when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple))
|
|
(logior! (-> this minimap-temple flags) (minimap-flag fade-out))
|
|
(set! (-> this minimap-temple) #f)
|
|
)
|
|
(set-map-indices! *bigmap*)
|
|
(when (and (not (-> this rod-of-god))
|
|
(!= (-> *bigmap* load-index) 18)
|
|
(!= (-> *bigmap* load-index) 19)
|
|
(!= (-> *bigmap* load-index) 20)
|
|
)
|
|
(let ((s4-1 (new 'stack-no-clear 'task-arrow-params)))
|
|
(vector-copy! (-> s4-1 pos) (-> (the-as process-focusable s5-0) root trans))
|
|
(quaternion-identity! (-> s4-1 quat))
|
|
(set! (-> s4-1 flags) (task-arrow-flags))
|
|
(set! (-> s4-1 map-icon) (the-as uint 13))
|
|
(logior! (-> s4-1 flags) (task-arrow-flags taf3 taf7 taf8))
|
|
(set! (-> this rod-of-god) (process->handle (task-arrow-spawn s4-1 *entity-pool*)))
|
|
)
|
|
)
|
|
(send-event
|
|
(handle->process (-> this rod-of-god))
|
|
'set-position
|
|
(-> (the-as process-focusable s5-0) root trans)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple))
|
|
(logior! (-> this minimap-temple flags) (minimap-flag fade-out))
|
|
(set! (-> this minimap-temple) #f)
|
|
)
|
|
(when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god))
|
|
(send-event (handle->process (-> this rod-of-god)) 'leave)
|
|
(set! (-> this rod-of-god) (the-as handle #f))
|
|
)
|
|
(if (not (-> this minimap))
|
|
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 26) (the-as int #f) (the-as vector #f) 0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 25 of type task-manager-temple
|
|
(defmethod task-manager-method-25 ((this task-manager-temple))
|
|
(task-manager-temple-method-33 this)
|
|
((method-of-type task-manager task-manager-method-25) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-temple
|
|
(defmethod set-time-limit ((this task-manager-temple))
|
|
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
|
(t9-0 this)
|
|
)
|
|
(set-setting! 'scarf 'abs 1.0 0)
|
|
(set-setting! 'goggles 'abs 1.0 0)
|
|
(set! (-> this vehicle) (the-as handle #f))
|
|
(set! (-> this rod-of-god) (the-as handle #f))
|
|
(set! (-> this minimap) #f)
|
|
(set! (-> this minimap-temple) #f)
|
|
(spawn-dust-storm-randomizer this)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-temple-climb
|
|
(deftype task-manager-temple-climb (task-manager-temple)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-temple-climb
|
|
(defmethod inspect ((this task-manager-temple-climb))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager-temple inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-temple-climb)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(until #f
|
|
(suspend)
|
|
(cond
|
|
((= (level-status? *level* 'desert #f) 'active)
|
|
(set-setting! 'scarf 'abs 1.0 0)
|
|
(set-setting! 'goggles 'abs 1.0 0)
|
|
)
|
|
(else
|
|
(set-setting! 'scarf 'abs 0.0 0)
|
|
(set-setting! 'goggles 'abs 0.0 0)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-temple-climb
|
|
;; WARN: Return type mismatch object vs none.
|
|
(defmethod task-manager-method-26 ((this task-manager-temple-climb))
|
|
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
|
(t9-0 this)
|
|
)
|
|
(if (or (and (task-node-closed? (game-task-node desert-rescue-introduction))
|
|
(not (task-node-closed? (game-task-node desert-rescue-resolution)))
|
|
)
|
|
(and (task-node-closed? (game-task-node nest-eggs-introduction))
|
|
(not (task-node-closed? (game-task-node nest-eggs-resolution)))
|
|
)
|
|
)
|
|
(task-manager-temple-method-33 this)
|
|
(task-manager-temple-method-32 this)
|
|
)
|
|
(let ((s5-0 (as-type (handle->process (-> this vehicle)) process-focusable)))
|
|
(when (not s5-0)
|
|
(when (and *target* (focus-test? *target* pilot-riding))
|
|
(let ((a0-19 (as-type (handle->process (-> *target* pilot vehicle)) v-toad)))
|
|
(when a0-19
|
|
(set! s5-0 (the-as process-focusable a0-19))
|
|
(set! (-> this vehicle) (process->handle a0-19))
|
|
(talker-spawn-func (-> *talker-speech* 91) *entity-pool* (target-pos 0) (the-as region #f))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (and s5-0 *target* (not (logtest? (-> *target* focus-status) (focus-status pilot-riding))))
|
|
(set! s5-0 (the-as process-focusable #f))
|
|
)
|
|
(when s5-0
|
|
(if (or (focus-test? s5-0 dead) (< (-> s5-0 root trans y) 28672.0))
|
|
(send-event this 'fail)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-temple-tests
|
|
(deftype task-manager-temple-tests (task-manager-temple)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-temple-tests
|
|
(defmethod inspect ((this task-manager-temple-tests))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager-temple inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-temple-tests)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(set-setting! 'music 'templedf 0.0 0)
|
|
(sleep-code)
|
|
)
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-temple-tests
|
|
(defmethod task-manager-method-26 ((this task-manager-temple-tests))
|
|
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
|
(t9-0 this)
|
|
)
|
|
(task-manager-temple-method-32 this)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-desert-interceptors-attack
|
|
(deftype task-manager-desert-interceptors-attack (task-manager)
|
|
((target-set-time time-frame)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-desert-interceptors-attack
|
|
(defmethod inspect ((this task-manager-desert-interceptors-attack))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Ttarget-set-time: ~D~%" (-> this target-set-time))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-desert-interceptors-attack
|
|
(defmethod set-time-limit ((this task-manager-desert-interceptors-attack))
|
|
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
|
(t9-0 this)
|
|
)
|
|
(set-setting! 'scarf 'abs 1.0 0)
|
|
(set-setting! 'goggles 'abs 1.0 0)
|
|
(spawn-dust-storm-randomizer this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 25 of type task-manager-desert-interceptors-attack
|
|
(defmethod task-manager-method-25 ((this task-manager-desert-interceptors-attack))
|
|
(set! (-> *was-squad-control* target-count) 0)
|
|
0
|
|
((method-of-type task-manager task-manager-method-25) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-desert-interceptors-attack
|
|
;; WARN: Return type mismatch time-frame vs none.
|
|
(defmethod task-manager-method-26 ((this task-manager-desert-interceptors-attack))
|
|
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
|
(t9-0 this)
|
|
)
|
|
(let ((s5-0 *was-squad-control*))
|
|
(when (time-elapsed? (-> this target-set-time) (seconds 15))
|
|
(set-time! (-> this target-set-time))
|
|
(set! (-> s5-0 target-count) (rand-vu-int-range 1 4))
|
|
(set! (-> s5-0 reserve-count) 4000)
|
|
)
|
|
(let ((a0-4 *target*))
|
|
(when (and a0-4 (focus-test? a0-4 grabbed))
|
|
(set! (-> s5-0 target-count) 0)
|
|
(set-time! (-> this target-set-time))
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-desert-interceptors-attack)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(while (!= (level-status? *level* 'desert #f) 'active)
|
|
(suspend)
|
|
)
|
|
(suspend)
|
|
(was-squad-manager-start self)
|
|
(let ((gp-1 *was-squad-control*))
|
|
(set! (-> gp-1 target-count) (rand-vu-int-range 1 4))
|
|
(set! (-> gp-1 reserve-count) 4000)
|
|
)
|
|
(set-setting! 'music 'desattck 0.0 0)
|
|
(sleep-code)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate fail (task-manager-desert-interceptors-attack)
|
|
:virtual #t
|
|
:enter (behavior ((arg0 resetter-params))
|
|
(set! (-> *was-squad-control* target-count) 0)
|
|
0
|
|
(kill-all-children self)
|
|
(let* ((t9-1 find-parent-method)
|
|
(a0-2 task-manager-desert-interceptors-attack)
|
|
(t9-2 (-> (the-as (state resetter-params task-manager-desert-interceptors-attack) (t9-1 a0-2 18)) enter))
|
|
)
|
|
(if t9-2
|
|
(t9-2 (the-as resetter-params a0-2))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition of type task-manager-vehicle-training-1
|
|
(deftype task-manager-vehicle-training-1 (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-vehicle-training-1
|
|
(defmethod inspect ((this task-manager-vehicle-training-1))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-vehicle-training-1)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding))))
|
|
(suspend)
|
|
)
|
|
(suspend)
|
|
(until #f
|
|
(when (and *target* (focus-test? *target* pilot-riding))
|
|
(if (as-type (handle->process (-> *target* pilot vehicle)) v-snake)
|
|
(goto cfg-22)
|
|
)
|
|
)
|
|
(suspend)
|
|
)
|
|
#f
|
|
(label cfg-22)
|
|
(suspend-for (seconds 2)
|
|
)
|
|
(talker-spawn-func (-> *talker-speech* 88) *entity-pool* (target-pos 0) (the-as region #f))
|
|
(send-event self 'complete)
|
|
)
|
|
)
|
|
|
|
;; definition of type task-manager-vehicle-training-2
|
|
(deftype task-manager-vehicle-training-2 (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-vehicle-training-2
|
|
(defmethod inspect ((this task-manager-vehicle-training-2))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-vehicle-training-2)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding))))
|
|
(suspend)
|
|
)
|
|
(suspend)
|
|
(until #f
|
|
(when (and *target* (focus-test? *target* pilot-riding))
|
|
(when (as-type (handle->process (-> *target* pilot vehicle)) v-turtle)
|
|
(when (> (-> *game-info* race-number-turbos) 0)
|
|
(talker-spawn-func (-> *talker-speech* 90) *entity-pool* (target-pos 0) (the-as region #f))
|
|
(send-event self 'complete)
|
|
)
|
|
)
|
|
)
|
|
(suspend)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
|
|
;; definition of type task-manager-highlight-vehicle
|
|
(deftype task-manager-highlight-vehicle (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-highlight-vehicle
|
|
(defmethod inspect ((this task-manager-highlight-vehicle))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-highlight-vehicle
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defmethod task-manager-method-26 ((this task-manager-highlight-vehicle))
|
|
(when (!= (-> this info index) -1)
|
|
(dotimes (s5-0 8)
|
|
(when (logtest? (-> this info index) (ash 1 s5-0))
|
|
(let ((a0-10 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type (+ s5-0 12))) process-focusable)))
|
|
(if (and a0-10 (focus-test? (the-as process-focusable a0-10) dead))
|
|
(send-event this 'fail)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-highlight-vehicle
|
|
;; WARN: Return type mismatch connection vs none.
|
|
(defmethod set-time-limit ((this task-manager-highlight-vehicle))
|
|
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
|
(t9-0 this)
|
|
)
|
|
(let ((t1-0 (-> this info index)))
|
|
(set-setting! 'vehicles 'set (sar t1-0 32) t1-0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type oasis-defense-intro-manager
|
|
(deftype oasis-defense-intro-manager (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type oasis-defense-intro-manager
|
|
(defmethod inspect ((this oasis-defense-intro-manager))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (oasis-defense-intro-manager)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(suspend-for (seconds 1)
|
|
)
|
|
(open! (-> self node-info) 'event)
|
|
(talker-spawn-func (-> *talker-speech* 83) *entity-pool* (target-pos 0) (the-as region #f))
|
|
(sleep-code)
|
|
)
|
|
)
|
|
|
|
;; definition for method 21 of type oasis-defense-intro-manager
|
|
;; WARN: Return type mismatch connection vs none.
|
|
(defmethod set-time-limit ((this oasis-defense-intro-manager))
|
|
((method-of-type task-manager set-time-limit) this)
|
|
(let ((t1-0 11))
|
|
(set-setting! 'vehicles 'set (shr t1-0 32) t1-0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-highlight-vehicle-wait
|
|
(deftype task-manager-highlight-vehicle-wait (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-highlight-vehicle-wait
|
|
(defmethod inspect ((this task-manager-highlight-vehicle-wait))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-highlight-vehicle-wait
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defmethod task-manager-method-26 ((this task-manager-highlight-vehicle-wait))
|
|
(when (!= (-> this info index) -1)
|
|
(dotimes (s5-0 8)
|
|
(when (logtest? (-> this info index) (ash 1 s5-0))
|
|
(let ((a0-10 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type (+ s5-0 12))) process-focusable)))
|
|
(if (and a0-10 (focus-test? (the-as process-focusable a0-10) dead))
|
|
(send-event this 'fail)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-highlight-vehicle-wait
|
|
;; WARN: Return type mismatch connection vs none.
|
|
(defmethod set-time-limit ((this task-manager-highlight-vehicle-wait))
|
|
(let ((t9-0 (method-of-type task-manager set-time-limit)))
|
|
(t9-0 this)
|
|
)
|
|
(let ((t1-0 (-> this info index)))
|
|
(set-setting! 'vehicles 'set (sar t1-0 32) t1-0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-highlight-vehicle-wait)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(local-vars (v1-1 object))
|
|
(until #f
|
|
(let ((v1-0 *target*))
|
|
(set! v1-1
|
|
(and v1-0
|
|
(focus-test? v1-0 pilot-riding)
|
|
(or (= (-> self info index) -1)
|
|
(begin
|
|
(dotimes (v1-7 8)
|
|
(when (and (logtest? (-> self info index) (ash 1 v1-7))
|
|
(= (-> *vehicle-info* handle-by-vehicle-type (+ v1-7 12)) (-> *target* pilot vehicle))
|
|
)
|
|
(set! v1-1 #t)
|
|
(goto cfg-19)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-19)
|
|
(if v1-1
|
|
(goto cfg-23)
|
|
)
|
|
(suspend)
|
|
)
|
|
#f
|
|
(label cfg-23)
|
|
(set-setting! 'pilot-exit #f 0.0 0)
|
|
(open! (-> self node-info) 'event)
|
|
(let ((t9-2 (-> (method-of-type task-manager active) code)))
|
|
(if t9-2
|
|
((the-as (function none) t9-2))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition of type task-manager-vehicle-wait
|
|
(deftype task-manager-vehicle-wait (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-vehicle-wait
|
|
(defmethod inspect ((this task-manager-vehicle-wait))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-vehicle-wait)
|
|
:virtual #t
|
|
:code (behavior ()
|
|
(while (not (and *target* (focus-test? *target* pilot-riding)))
|
|
(suspend)
|
|
)
|
|
(set-setting! 'pilot-exit #f 0.0 0)
|
|
(open! (-> self node-info) 'event)
|
|
(sleep-code)
|
|
)
|
|
)
|
|
|
|
;; definition of type task-manager-lock-wasdoors
|
|
(deftype task-manager-lock-wasdoors (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-lock-wasdoors
|
|
(defmethod inspect ((this task-manager-lock-wasdoors))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate active (task-manager-lock-wasdoors)
|
|
:virtual #t
|
|
:enter (behavior ()
|
|
(call-parent-state-handler enter)
|
|
(set-setting! 'airlock #f 0.0 0)
|
|
)
|
|
:trans (behavior ()
|
|
(if (and *target* (not (logtest? (-> *target* focus-status) (focus-status pilot-riding))))
|
|
(send-event self 'complete)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition of type task-manager-get-to-corral
|
|
(deftype task-manager-get-to-corral (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-get-to-corral
|
|
(defmethod inspect ((this task-manager-get-to-corral))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-get-to-corral
|
|
;; WARN: Return type mismatch object vs none.
|
|
(defmethod task-manager-method-26 ((this task-manager-get-to-corral))
|
|
(local-vars (v1-4 level))
|
|
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
|
(t9-0 this)
|
|
)
|
|
(when (and *target*
|
|
(begin (set! v1-4 (level-get *level* 'desertg)) v1-4)
|
|
(= (-> v1-4 status) 'active)
|
|
(-> v1-4 display?)
|
|
)
|
|
(let ((s4-0 (-> *minimap-class-list* 121)))
|
|
(if (< (vector-vector-distance (target-pos 0) (-> s4-0 default-position)) 1474560.0)
|
|
(send-event this 'complete)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-desert-beast-battle-intro
|
|
(deftype task-manager-desert-beast-battle-intro (task-manager)
|
|
((sig-rider-handle handle)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-desert-beast-battle-intro
|
|
(defmethod inspect ((this task-manager-desert-beast-battle-intro))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Tsig-rider-handle: ~D~%" (-> this sig-rider-handle))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-desert-beast-battle-intro
|
|
(defmethod task-manager-method-26 ((this task-manager-desert-beast-battle-intro))
|
|
(local-vars (v1-10 entity))
|
|
(let ((v1-1 (-> *vehicle-info* handle-by-vehicle-type 14)))
|
|
(if (and (not *scene-player*) (handle->process v1-1) (not (handle->process (-> this sig-rider-handle))))
|
|
(set! (-> this sig-rider-handle)
|
|
(process->handle (sig-rider-spawn (the-as vehicle (handle->process v1-1)) #t))
|
|
)
|
|
)
|
|
)
|
|
(when (and *target*
|
|
(focus-test? *target* pilot)
|
|
(begin (set! v1-10 (entity-by-name "kleever-npc-5")) v1-10)
|
|
(< (vector-vector-xz-distance (-> v1-10 extra trans) (get-trans *target* 0)) 204800.0)
|
|
)
|
|
(set-setting! 'pilot #f 0.0 0)
|
|
(send-event *target* 'end-mode 'pilot)
|
|
)
|
|
((method-of-type task-manager task-manager-method-26) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 30 of type task-manager-desert-beast-battle-intro
|
|
(defmethod taskman-event-handler ((this task-manager-desert-beast-battle-intro)
|
|
(arg0 process)
|
|
(arg1 int)
|
|
(arg2 symbol)
|
|
(arg3 event-message-block)
|
|
)
|
|
(case arg2
|
|
(('kill-sig-rider)
|
|
(send-event (handle->process (-> this sig-rider-handle)) 'die)
|
|
)
|
|
(else
|
|
((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 25 of type task-manager-desert-beast-battle-intro
|
|
(defmethod task-manager-method-25 ((this task-manager-desert-beast-battle-intro))
|
|
((method-of-type task-manager task-manager-method-25) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-desert-beast-battle-intro
|
|
(defmethod set-time-limit ((this task-manager-desert-beast-battle-intro))
|
|
(let ((t1-0 4))
|
|
(set-setting! 'vehicles 'set (shr t1-0 32) t1-0)
|
|
)
|
|
(set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x36 #x7) 0.0 0)
|
|
(set! (-> this sig-rider-handle) (the-as handle #f))
|
|
((method-of-type task-manager set-time-limit) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-desert-beast-battle
|
|
(deftype task-manager-desert-beast-battle (task-manager)
|
|
((sig-rider-handle handle)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-desert-beast-battle
|
|
(defmethod inspect ((this task-manager-desert-beast-battle))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Tsig-rider-handle: ~D~%" (-> this sig-rider-handle))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-desert-beast-battle
|
|
(defmethod task-manager-method-26 ((this task-manager-desert-beast-battle))
|
|
(when (and (time-elapsed? (-> this state-time) (seconds 2))
|
|
*target*
|
|
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
|
)
|
|
(let ((a0-9 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type 14)) process-focusable)))
|
|
(if (and a0-9 (focus-test? (the-as process-focusable a0-9) dead))
|
|
(send-event this 'fail)
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-18 (-> *vehicle-info* handle-by-vehicle-type 14)))
|
|
(if (and (handle->process v1-18) (not (handle->process (-> this sig-rider-handle))))
|
|
(set! (-> this sig-rider-handle)
|
|
(process->handle (sig-rider-spawn (the-as vehicle (handle->process v1-18)) #t))
|
|
)
|
|
)
|
|
)
|
|
((method-of-type task-manager task-manager-method-26) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-desert-beast-battle
|
|
(defmethod set-time-limit ((this task-manager-desert-beast-battle))
|
|
(set-setting! 'pilot-exit #f 0.0 0)
|
|
(set-setting! 'extra-bank '((desert1 desbatl1) (desert2 desbatl2)) 0.0 0)
|
|
(set-setting! 'music 'beastbat 0.0 0)
|
|
(let ((t1-3 (-> this info index)))
|
|
(set-setting! 'vehicles 'set (sar t1-3 32) t1-3)
|
|
)
|
|
(set-setting! 'fog-special-interp-rate #f 0.025 0)
|
|
(set-setting! 'fog-special-interp-targ #f 0.5 0)
|
|
(set! (-> this sig-rider-handle) (the-as handle #f))
|
|
((method-of-type task-manager set-time-limit) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-desert-beast-battle-end
|
|
(deftype task-manager-desert-beast-battle-end (task-manager)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-desert-beast-battle-end
|
|
(defmethod inspect ((this task-manager-desert-beast-battle-end))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 25 of type task-manager-desert-beast-battle-end
|
|
(defmethod task-manager-method-25 ((this task-manager-desert-beast-battle-end))
|
|
((method-of-type task-manager task-manager-method-25) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 21 of type task-manager-desert-beast-battle-end
|
|
(defmethod set-time-limit ((this task-manager-desert-beast-battle-end))
|
|
(set-setting! 'pilot-exit #f 0.0 0)
|
|
(set-setting! 'airlock #f 0.0 0)
|
|
(set-setting! 'extra-bank '((desert1 desbatl1) (desert2 desbatl2)) 0.0 0)
|
|
(let ((t1-3 (-> this info index)))
|
|
(set-setting! 'vehicles 'set (sar t1-3 32) t1-3)
|
|
)
|
|
(set-setting! 'fog-special-interp-rate #f 0.025 0)
|
|
(set-setting! 'fog-special-interp-targ #f 0.5 0)
|
|
((method-of-type task-manager set-time-limit) this)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type task-manager-nest-hunt
|
|
(deftype task-manager-nest-hunt (task-manager)
|
|
((vehicle-handle handle)
|
|
(sig-handle handle)
|
|
(minimap-connection connection-minimap)
|
|
(showing-desert symbol)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type task-manager-nest-hunt
|
|
(defmethod inspect ((this task-manager-nest-hunt))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type task-manager inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle))
|
|
(format #t "~2Tsig-handle: ~D~%" (-> this sig-handle))
|
|
(format #t "~2Tminimap-connection: #<connection-minimap @ #x~X>~%" (-> this minimap-connection))
|
|
(format #t "~2Tshowing-desert: ~A~%" (-> this showing-desert))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 20 of type task-manager-nest-hunt
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defmethod init! ((this task-manager-nest-hunt))
|
|
(call-parent-method this)
|
|
(set! (-> this vehicle-handle) (the-as handle #f))
|
|
(set! (-> this sig-handle) (the-as handle #f))
|
|
(set! (-> this minimap-connection) #f)
|
|
(set! (-> this showing-desert) #f)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 26 of type task-manager-nest-hunt
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod task-manager-method-26 ((this task-manager-nest-hunt))
|
|
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
|
|
(t9-0 this)
|
|
)
|
|
(cond
|
|
((task-node-closed? (game-task-node nest-hunt-sig))
|
|
(format *stdebug* "nest-hunt-sig closed~%")
|
|
(set-setting! 'pilot-exit #f 0.0 0)
|
|
(set-setting! 'pilot-death #t 0.0 0)
|
|
(set-setting! 'scarf 'abs 1.0 0)
|
|
(set-setting! 'goggles 'abs 1.0 0)
|
|
(set-setting! 'music 'nesthunt 0.0 0)
|
|
)
|
|
(else
|
|
(format *stdebug* "nest-hunt-sig open~%")
|
|
(remove-setting! 'pilot-exit)
|
|
(remove-setting! 'pilot-death)
|
|
(remove-setting! 'scarf)
|
|
(remove-setting! 'goggles)
|
|
(remove-setting! 'music)
|
|
)
|
|
)
|
|
(cond
|
|
((or (not *minimap*) (or (task-node-closed? (game-task-node nest-hunt-fight))
|
|
(not (task-node-closed? (game-task-node nest-hunt-sig)))
|
|
(let ((v1-25 (-> *game-info* sub-task-list (game-task-node nest-hunt-fight))))
|
|
(handle->process (if (-> v1-25 manager)
|
|
(-> v1-25 manager manager)
|
|
(the-as handle #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (-> this minimap-connection)
|
|
(kill-callback (-> *minimap* engine) (-> this minimap-connection))
|
|
(set! (-> this minimap-connection) #f)
|
|
)
|
|
)
|
|
((string= (-> *minimap* last-name) "map-desert")
|
|
(when (and (-> this minimap-connection) (not (-> this showing-desert)))
|
|
(kill-callback (-> *minimap* engine) (-> this minimap-connection))
|
|
(set! (-> this minimap-connection) #f)
|
|
)
|
|
(when (not (-> this minimap-connection))
|
|
(let ((v1-47 (get-continue-by-name *game-info* "desert-nest-entrance")))
|
|
(if v1-47
|
|
(set! (-> this minimap-connection)
|
|
(add-icon! *minimap* this (the-as uint 9) (the-as int #f) (-> v1-47 trans) 0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> this showing-desert) #t)
|
|
)
|
|
(else
|
|
(when (and (-> this minimap-connection) (-> this showing-desert))
|
|
(kill-callback (-> *minimap* engine) (-> this minimap-connection))
|
|
(set! (-> this minimap-connection) #f)
|
|
)
|
|
(if (not (-> this minimap-connection))
|
|
(set! (-> this minimap-connection) (add-icon!
|
|
*minimap*
|
|
this
|
|
(the-as uint 12)
|
|
(the-as int #f)
|
|
(new 'static 'vector :x 6651904.0 :y -344064.0 :z 2498560.0)
|
|
0
|
|
)
|
|
)
|
|
)
|
|
(set! (-> this showing-desert) #f)
|
|
)
|
|
)
|
|
(cond
|
|
((or (not *target*) (focus-test? *target* teleporting) (!= (send-event *target* 'query 'mode) 'pilot))
|
|
(set! (-> this vehicle-handle) (the-as handle #f))
|
|
(set! (-> this sig-handle) (the-as handle #f))
|
|
(format *stdebug* "nest-hunt task manager waiting target in pilot mode~%")
|
|
)
|
|
((not (handle->process (-> this vehicle-handle)))
|
|
(set! (-> this vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14))
|
|
(format *stdebug* "nest-hunt task manager waiting for scorpion~%")
|
|
)
|
|
((not (handle->process (-> this sig-handle)))
|
|
(if (= (level-status? *level* 'lwassig #f) 'active)
|
|
(set! (-> this sig-handle)
|
|
(process->handle (sig-rider-spawn (the-as vehicle (handle->process (-> this vehicle-handle))) #f))
|
|
)
|
|
)
|
|
(format *stdebug* "nest-hunt task manager waiting for sig rider~%")
|
|
)
|
|
)
|
|
(when (and *target* (not (focus-test? *target* teleporting)) (task-closed? "nest-hunt-sig"))
|
|
(let ((v1-99 (handle->process (-> this vehicle-handle))))
|
|
(if (and v1-99 (focus-test? (the-as process-focusable v1-99) dead))
|
|
(send-event this 'fail)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|