Files
water111 637990314b wip: better stack var support (#4222)
Closes #736

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2026-04-19 00:14:44 +02:00

1327 lines
41 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type hud-hover
(deftype hud-hover (hud)
()
)
;; definition for method 3 of type hud-hover
(defmethod inspect ((this hud-hover))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type hud inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; definition for method 15 of type hud-hover
;; WARN: Return type mismatch int vs none.
(defmethod draw ((this hud-hover))
(set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165)
(format (clear (-> this strings 0 text)) "~D" (-> this values 0 current))
(set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50)
((method-of-type hud draw) this)
0
(none)
)
;; definition for method 16 of type hud-hover
;; WARN: Return type mismatch int vs none.
(defmethod update-values! ((this hud-hover))
(set! (-> this values 0 target) (the int (-> *game-info* counter)))
((method-of-type hud update-values!) this)
0
(none)
)
;; definition for method 17 of type hud-hover
;; WARN: Return type mismatch int vs none.
(defmethod init-callback ((this hud-hover))
(set! (-> this gui-id)
(add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0)
)
(logior! (-> this flags) (hud-flags show))
(set! (-> this sprites 0 tid)
(the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xbe1)))
)
(set! (-> this sprites 0 flags) (hud-sprite-flags hsf2))
(set! (-> this sprites 0 scale-x) 1.0)
(set! (-> this sprites 0 scale-y) 1.0)
(alloc-string-if-needed this 0)
(set! (-> this strings 0 scale) 1.0)
(set! (-> this strings 0 flags) (font-flags shadow kerning middle large))
0
(none)
)
;; failed to figure out what this is:
(defpartgroup group-tpl-token-trail
:id 685
:flags (sp0 sp4)
:bounds (static-bspherem 0 0 0 640)
:parts ((sp-item 2644 :flags (sp7)))
)
;; failed to figure out what this is:
(defpart 2645
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:scale-x (meters 1))
(:scale-y :copy scale-x)
(:r 32.0)
(:g 0.0)
(:b 128.0)
(:a 50.0)
(:fade-r 0.027777778)
(:fade-b -0.027777778)
(:fade-a -0.055555556)
(:timer (seconds 6))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
)
)
;; failed to figure out what this is:
(defpart 2644
:init-specs ((:texture (specs level-default-sprite))
(:num 0.3)
(:x (meters -1) (meters 2))
(:y (meters -1) (meters 2))
(:scale-x (meters 2) (meters 2))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 128.0)
(:vel-y (meters 0.006666667) (meters 0.0016666667))
(:scalevel-x (meters 0.00033333333))
(:scalevel-y :copy scalevel-x)
(:fade-a -1.0)
(:accel-y (meters -0.00033333333) (meters -0.00016666666))
(:timer (seconds 1.667))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
)
)
;; failed to figure out what this is:
(defpartgroup group-tpl-token
:id 686
:flags (sp0 sp4)
:bounds (static-bspherem 0 0 0 10)
:parts ((sp-item 2650 :flags (sp7) :period (seconds 0.167) :length (seconds 0.035))
(sp-item 2651 :flags (sp3 sp7) :binding 2646)
(sp-item 2646 :flags (sp2 sp3 sp7) :binding 2647)
(sp-item 2647 :flags (sp2))
(sp-item 2651 :flags (sp3 sp7) :binding 2648)
(sp-item 2648 :flags (sp2 sp3 sp7) :binding 2649)
(sp-item 2649 :flags (sp2))
)
)
;; failed to figure out what this is:
(defpart 2650
:init-specs ((:texture (radial-halo level-default-sprite))
(:num 1.0)
(:scale-x (meters 2))
(:rot-z (degrees 0) (degrees 3600))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 0.0)
(:scalevel-x (meters 0.013333334))
(:scalevel-y :copy scalevel-x)
(:fade-a 0.26666668)
(:timer (seconds 1))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
(:next-time (seconds 0.5))
(:next-launcher 2652)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2652
:init-specs ((:fade-a -0.26666668 -0.6666667))
)
;; failed to figure out what this is:
(defpart 2651
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0)
(:scale-x (meters 0.2))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 0.0)
(:b 0.0)
(:a 0.0)
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-3))
(:rotate-y (degrees 0))
(:rotate-z (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2646
:init-specs ((:texture (token-white templec-sprite))
(:num 1.0)
(:y (meters 0))
(:z (meters 0.5))
(:scale-x (meters 1))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 164.0)
(:vel-y (meters 0.44444445))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-3 ready-to-launch))
(:func 'spt-func-camera-facing-orbiter)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2647
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0)
(:scale-x (meters 1))
(:scale-y :copy scale-x)
(:r 32.0)
(:g 64.0)
(:b 128.0)
(:a 24.0)
(:scalevel-x (meters -0.006666667))
(:scalevel-y :copy scalevel-x)
(:fade-r 0.96)
(:fade-g 0.64)
(:fade-b -0.64)
(:fade-a -0.24)
(:timer (seconds 0.335))
(:flags (sp-cpuinfo-flag-3))
(:func 'spt-func-camera-facing-orbiter)
)
)
;; failed to figure out what this is:
(defpart 2648
:init-specs ((:texture (token-purple templec-sprite))
(:num 1.0)
(:y (meters 8))
(:z (meters 0.5))
(:scale-x (meters 1))
(:scale-y :copy scale-x)
(:r 64.0)
(:g 128.0)
(:b 128.0)
(:a 255.0)
(:vel-y (meters 0.44444445))
(:timer (seconds -0.005))
(:flags (sp-cpuinfo-flag-3 ready-to-launch))
(:func 'spt-func-camera-facing-orbiter)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2649
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0)
(:scale-x (meters 1))
(:scale-y :copy scale-x)
(:r 16.0)
(:g 0.0)
(:b 64.0)
(:a 128.0)
(:scalevel-x (meters -0.006666667))
(:scalevel-y :copy scalevel-x)
(:fade-r -0.08)
(:fade-a -1.28)
(:timer (seconds 0.335))
(:flags (sp-cpuinfo-flag-3))
(:func 'spt-func-camera-facing-orbiter)
)
)
;; failed to figure out what this is:
(defpartgroup group-tpl-token-pickup
:id 687
:duration (seconds 0.035)
:flags (sp0)
:bounds (static-bspherem 0 0 0 10)
:parts ((sp-item 2653 :fade-after (meters 50) :period (seconds 0.167) :length (seconds 0.035)) (sp-item 2654))
)
;; failed to figure out what this is:
(defpart 2653
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 6))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 255.0)
(:scalevel-x (meters -0.06666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.167))
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3))
(:func 'sparticle-track-root)
)
)
;; failed to figure out what this is:
(defpart 2654
:init-specs ((:texture (middot level-default-sprite))
(:num 10.0)
(:scale-x (meters 0.15))
(:rot-x 4)
(:scale-y :copy scale-x)
(:r 20.0)
(:g 20.0)
(:b 255.0)
(:a 128.0)
(:omega (degrees 0.0225))
(:vel-y (meters 0.06666667) (meters 0.13333334))
(:accel-y (meters 0))
(:friction 0.7)
(:timer (seconds 2))
(:flags (sp-cpuinfo-flag-3))
(:func 'sparticle-motion-blur)
(:next-time (seconds 0.167))
(:next-launcher 2655)
(:conerot-x (degrees 0) (degrees 360))
(:rotate-y (degrees 0) (degrees 3600))
)
)
;; failed to figure out what this is:
(defpart 2655
:init-specs ((:omega (degrees 0.0675)) (:accel-y (meters -0.00033333333) (meters -0.00033333333)) (:friction 0.92 0.07))
)
;; definition of type tpl-token
(deftype tpl-token (process-focusable)
((part-trail sparticle-launch-control)
(actor-group (pointer actor-group))
(actor-group-count int32)
(part-subsampler sparticle-subsampler)
(path-pos float)
(speed float)
(velocity vector :inline)
(group-num uint32)
(camera-done? uint32)
(dest vector :inline)
(sound-id sound-id)
(minimap connection-minimap)
)
(:state-methods
idle
go-door
die-fast
)
)
;; definition for method 3 of type tpl-token
(defmethod inspect ((this tpl-token))
(when (not this)
(set! this this)
(goto cfg-7)
)
(let ((t9-0 (method-of-type process-focusable inspect)))
(t9-0 this)
)
(format #t "~2Tpart-trail: ~A~%" (-> this part-trail))
(format #t "~2Tactor-group: #x~X~%" (-> this actor-group))
(dotimes (s5-0 (-> this actor-group-count))
(format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0))
)
(format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count))
(format #t "~2Tpart-subsampler: ~A~%" (-> this part-subsampler))
(format #t "~2Tpath-pos: ~f~%" (-> this path-pos))
(format #t "~2Tspeed: ~f~%" (-> this speed))
(format #t "~2Tvelocity: #<vector @ #x~X>~%" (-> this velocity))
(format #t "~2Tgroup-num: ~D~%" (-> this group-num))
(format #t "~2Tcamera-done?: ~D~%" (-> this camera-done?))
(format #t "~2Tdest: #<vector @ #x~X>~%" (-> this dest))
(format #t "~2Tsound-id: ~D~%" (-> this sound-id))
(format #t "~2Tminimap: #<connection-minimap @ #x~X>~%" (-> this minimap))
(label cfg-7)
this
)
;; definition for method 10 of type tpl-token
(defmethod deactivate ((this tpl-token))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this part))
(kill-particles (-> this part))
)
(if (nonzero? (-> this part-trail))
(kill-particles (-> this part-trail))
)
(when (-> this minimap)
(logior! (-> this minimap flags) (minimap-flag fade-out))
(set! (-> this minimap) #f)
)
((method-of-type process-drawable deactivate) this)
(none)
)
;; definition for method 7 of type tpl-token
;; WARN: Return type mismatch process-drawable vs tpl-token.
(defmethod relocate ((this tpl-token) (offset int))
(if (nonzero? (-> this part-subsampler))
(&+! (-> this part-subsampler) offset)
)
(if (nonzero? (-> this part-trail))
(&+! (-> this part-trail) offset)
)
(the-as tpl-token ((method-of-type process-drawable relocate) this offset))
)
;; failed to figure out what this is:
(defstate idle (tpl-token)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('touch 'attack)
(process-entity-status! self (entity-perm-status dead) #t)
(sound-play "yin-yang-thing")
(go-virtual go-door)
)
)
)
:exit (behavior ()
(if (nonzero? (-> self part))
(kill-particles (-> self part))
)
)
:trans (behavior ()
(spawn (-> self part) (-> self root trans))
)
:code sleep-code
)
;; failed to figure out what this is:
(defstate die-fast (tpl-token)
:virtual #t
:code (behavior ()
(until (process-release? *target*)
(suspend)
)
(process-entity-status! self (entity-perm-status dead) #t)
(when (-> self minimap)
(logior! (-> self minimap flags) (minimap-flag fade-out))
(set! (-> self minimap) #f)
)
)
)
;; failed to figure out what this is:
(defstate go-door (tpl-token)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('door)
#t
)
)
)
:enter (behavior ()
(set! (-> self group-num) (the-as uint 0))
(when (nonzero? (-> self actor-group-count))
(set! (-> self group-num) (the-as uint 0))
(let ((f30-0 -100.0)
(gp-0 (new 'stack-no-clear 'vector))
)
0.0
(dotimes (s5-0 (-> self actor-group-count))
(let ((v1-6 (-> self actor-group s5-0 data)))
(when (and v1-6 (-> v1-6 0 actor))
(vector-! gp-0 (-> v1-6 0 actor trans) (camera-pos))
(vector-normalize! gp-0 1.0)
(let ((f0-2 (vector-dot gp-0 (-> *math-camera* inv-camera-rot fvec))))
(when (< f30-0 f0-2)
(set! f30-0 f0-2)
(set! (-> self group-num) (the-as uint s5-0))
)
)
)
)
)
)
)
(set-time! (-> self state-time))
(when (>= (res-lump-value (-> self entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0)
(set-setting! 'rapid-tracking #f 0.0 0)
(send-event *camera* 'change-target self)
)
(when (-> self minimap)
(logior! (-> self minimap flags) (minimap-flag fade-out))
(set! (-> self minimap) #f)
)
)
:exit (behavior ()
(sound-stop (-> self sound-id))
)
:trans (behavior ()
(let ((s3-0 (res-lump-value (-> self entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)))
(if (>= (the-as int s3-0) 0)
(sound-play-by-name
(static-sound-name "flying-pixie-cm")
(-> self sound-id)
1024
(the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv))))
0
(sound-group)
#t
)
(sound-play-by-name
(static-sound-name "flying-pixie")
(-> self sound-id)
1024
(the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv))))
0
(sound-group)
#t
)
)
(when (>= (the-as int s3-0) 0)
(process-grab? *target* #f)
(when (and (time-elapsed? (-> self state-time) (seconds 3.5)) (zero? (-> self camera-done?)))
(set! (-> self camera-done?) (the-as uint 1))
(remove-setting! 'rapid-tracking)
(persist-with-delay *setting-control* 'interp-time (seconds 1) 'interp-time 'abs 0.0 0)
)
(when (and (time-elapsed? (-> self state-time) (seconds 4.5)) (= (-> self camera-done?) 1))
(set! (-> self camera-done?) (the-as uint 2))
(set-setting! 'mode-name 'cam-really-fixed 0.0 0)
(send-event (process-by-name "tpl-symbol-1" *active-pool*) 'flash)
(sound-play "yinyang-lightup")
)
(when (and (time-elapsed? (-> self state-time) (seconds 5.5)) (= (-> self camera-done?) 2))
(sound-stop (-> self sound-id))
(set! (-> self camera-done?) (the-as uint 3))
(remove-setting! 'mode-name)
(send-event *camera* 'change-target #f)
(persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 0.0 0)
(go-virtual die-fast)
)
)
(seek! (-> self speed) 1638400.0 (* 409600.0 (seconds-per-frame)))
(cond
((nonzero? (-> self actor-group-count))
(let ((s1-0 0)
(gp-4 (new 'stack-no-clear 'inline-array 'vector 16))
)
(dotimes (v1-48 16)
(set! (-> gp-4 v1-48 quad) (the-as uint128 0))
)
(let ((s5-4 (new 'stack-no-clear 'inline-array 'vector 16)))
(dotimes (v1-51 16)
(set! (-> s5-4 v1-51 quad) (the-as uint128 0))
)
(let ((s2-2 (new 'stack 'cubic-curve))
(s4-2 (new 'stack-no-clear 'vector))
)
(new 'stack-no-clear 'vector)
(let ((f30-2 (if (>= (the-as int s3-0) 0)
100.0
40.0
)
)
)
(vector-copy! (-> gp-4 s1-0) (-> self entity trans))
(let ((s3-1 (+ s1-0 1)))
(dotimes (s1-1 (length (-> self actor-group (-> self group-num))))
(let ((v1-61 (-> self actor-group (-> self group-num) data s1-1)))
(when (and v1-61 (-> v1-61 actor))
(vector-copy! (-> gp-4 s3-1) (-> v1-61 actor trans))
(+! s3-1 1)
)
)
)
(dotimes (v1-70 s3-1)
(cond
((zero? v1-70)
(vector-! (-> s5-4 v1-70) (-> gp-4 (+ v1-70 1)) (-> gp-4 v1-70))
)
((= v1-70 (+ s3-1 -1))
(vector-! (-> s5-4 v1-70) (-> gp-4 v1-70) (-> gp-4 (+ v1-70 -1)))
)
(else
(vector-! (-> s5-4 v1-70) (-> gp-4 (+ v1-70 1)) (-> gp-4 (+ v1-70 -1)))
)
)
)
(dotimes (s1-2 (+ s3-1 -1))
(when (and (>= (-> self path-pos) (the float s1-2)) (>= (the float (+ s1-2 1)) (-> self path-pos)))
(cubic-curve-method-9
s2-2
(-> gp-4 s1-2)
(vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-4 s1-2) 40960.0)
(-> gp-4 (+ s1-2 1))
(vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-4 (+ s1-2 1)) 40960.0)
)
(vector-lerp! (-> self dest) (-> gp-4 s1-2) (-> gp-4 (+ s1-2 1)) (- (-> self path-pos) (the float s1-2)))
(+! (-> self path-pos) (/ (* f30-2 (seconds-per-frame))
(* 0.00024414062 (vector-vector-distance (-> gp-4 s1-2) (-> gp-4 (+ s1-2 1))))
)
)
)
)
(vector-! s4-2 (-> self dest) (-> self root trans))
(vector-normalize! s4-2 409600.0)
(vector-v*float++! (-> self velocity) (-> self velocity) -1.0)
(vector-v++! (-> self velocity) s4-2)
(vector-v++! (-> self root trans) (-> self velocity))
(cond
((or (< (-> self path-pos) (the float (+ s3-1 -1)))
(< 409.6 (vector-vector-distance (-> self root trans) (-> self dest)))
)
(spawn (-> self part-trail) (-> self root trans))
(init-with-vec! (-> self part-subsampler) (-> self root trans))
)
(else
(send-event (process-by-name "tpl-symbol-1" *active-pool*) 'flash)
(sound-play "yinyang-lightup")
(go-virtual die-fast)
)
)
)
)
)
)
)
)
(else
(let ((v1-117 (-> self actor-group 0 data)))
(when (and v1-117 (-> v1-117 0 actor))
(let ((gp-7 (new 'stack-no-clear 'vector)))
(vector-copy! gp-7 (-> v1-117 0 actor trans))
(vector-seek-3d-smooth! (-> self root trans) gp-7 (* 409600.0 (seconds-per-frame)) 0.5)
(cond
((< 409.6 (vector-vector-distance (-> self root trans) gp-7))
(spawn (-> self part-trail) (-> self root trans))
(init-with-vec! (-> self part-subsampler) (-> self root trans))
)
(else
(go-virtual die-fast)
)
)
)
)
)
)
)
)
)
:code sleep-code
)
;; definition for method 11 of type tpl-token
;; INFO: Used lq/sq
(defmethod init-from-entity! ((this tpl-token) (arg0 entity-actor))
"Set up a newly created process from the entity that created it."
(with-pp
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s4-0 penetrated-by) (the-as penetrate -1))
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec collectable))
(set! (-> v1-7 prim-core collide-with) (collide-spec jak hit-by-others-list player-list))
(set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 6144.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-7)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-10 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-10 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-10 prim-core collide-with))
)
(set! (-> this root) s4-0)
)
(process-drawable-from-entity! this arg0)
(logclear! (-> this mask) (process-mask actor-pause))
(set! (-> this part) (create-launch-control group-tpl-token this))
(set! (-> this part-trail) (create-launch-control group-tpl-token-trail this))
pp
(set! (-> this part-subsampler)
(new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2645) 3.0)
)
(set! (-> this path-pos) 0.0)
(transform-post)
(let* ((sv-16 (new 'static 'res-tag))
(v1-23 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))
)
(cond
((and v1-23 (nonzero? (-> sv-16 elt-count)))
(set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count)))
(set! (-> this actor-group) v1-23)
)
(else
(set! (-> this actor-group-count) 0)
0
)
)
)
(set! (-> this sound-id) (new-sound-id))
(set! (-> this camera-done?) (the-as uint 0))
(set! (-> this minimap) (add-icon! *minimap* this (the-as uint 132) (the-as int #f) (the-as vector #t) 0))
(if (task-node-closed? (game-task-node temple-tests-hover-training))
(go (method-of-object this die-fast))
(go (method-of-object this idle))
)
)
)
;; definition of type hover-training-manager
(deftype hover-training-manager (process)
((actor-group (pointer actor-group))
(actor-group-count int32)
(gui-id sound-id)
(text basic)
(hud-counter handle)
(text-id text-id)
)
(:state-methods
idle
done
die-fast
display-text
)
(:methods
(draw-training-text (_type_ text-id) none)
)
)
;; definition for method 3 of type hover-training-manager
(defmethod inspect ((this hover-training-manager))
(when (not this)
(set! this this)
(goto cfg-7)
)
(let ((t9-0 (method-of-type process inspect)))
(t9-0 this)
)
(format #t "~2Tactor-group: #x~X~%" (-> this actor-group))
(dotimes (s5-0 (-> this actor-group-count))
(format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0))
)
(format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count))
(format #t "~2Tgui-id: ~D~%" (-> this gui-id))
(format #t "~2Ttext: ~A~%" (-> this text))
(format #t "~2Thud-counter: ~D~%" (-> this hud-counter))
(format #t "~2Ttext-id: ~D~%" (-> this text-id))
(label cfg-7)
this
)
;; definition for method 18 of type hover-training-manager
;; WARN: Return type mismatch float vs none.
(defmethod draw-training-text ((this hover-training-manager) (arg0 text-id))
(when (not (-> this text))
(set! (-> this text) (the-as basic #t))
(if (and *target* (not (logtest? (focus-status board) (-> *target* focus-status))))
(set! arg0 (text-id text-013a))
)
(when (= (get-status *gui-control* (-> this gui-id)) (gui-status active))
(let ((s5-1
(new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning))
)
)
(set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large))
(set-width! s5-1 440)
(set-height! s5-1 80)
(set-scale! s5-1 0.8)
(let ((s4-0 print-game-text))
(format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id arg0) #f))
(s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha))
)
)
)
)
(none)
)
;; failed to figure out what this is:
(defstate idle (hover-training-manager)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('dismount)
(if (and *target* (focus-test? *target* board))
(draw-training-text self (text-id text-0613))
)
)
(('board)
(when (not (logtest? (-> self actor-group 0 data 9 actor extra perm status) (entity-perm-status dead)))
(if (and *target* (not (logtest? (focus-status board) (-> *target* focus-status))))
(draw-training-text self (text-id text-013a))
)
)
)
(('jump)
(if (not (logtest? (-> self actor-group 0 data 10 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-013b))
)
)
(('jump2)
(if (not (logtest? (-> self actor-group 0 data 3 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-013b))
)
)
(('jump3)
(if (not (logtest? (-> self actor-group 0 data 14 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-013b))
)
)
(('jump4)
(if (not (logtest? (-> self actor-group 0 data 1 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-013b))
)
)
(('duck-jump)
(if (not (logtest? (-> self actor-group 0 data 9 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-013c))
)
)
(('grind)
(if (not (logtest? (-> self actor-group 0 data 5 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-013e))
)
)
(('flip)
(if (not (logtest? (-> self actor-group 0 data 11 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-0140))
)
)
(('launch)
(if (not (logtest? (-> self actor-group 0 data 12 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-05ff))
)
)
(('launch2)
(if (not (logtest? (-> self actor-group 0 data 16 actor extra perm status) (entity-perm-status dead)))
(draw-training-text self (text-id text-05ff))
)
)
(('trigger)
(when (not (-> self hud-counter))
(let ((v0-0 (the-as
object
(ppointer->handle (process-spawn hud-hover :init hud-init-by-other :name "hud-hover" :to self))
)
)
)
(set! (-> self hud-counter) (the-as handle v0-0))
v0-0
)
)
)
(('untrigger)
(when (-> self hud-counter)
(send-event (handle->process (-> self hud-counter)) 'hide-and-die)
(set! (-> self hud-counter) (the-as handle #f))
#f
)
)
)
)
:trans (behavior ()
(cond
((-> self text)
(if (zero? (-> self gui-id))
(set! (-> self gui-id)
(add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0)
)
)
(set! (-> self text) #f)
)
(else
(set-action!
*gui-control*
(gui-action stop)
(-> self gui-id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(set! (-> self gui-id) (new 'static 'sound-id))
0
)
)
(let ((gp-0 0))
(dotimes (s5-0 (length (-> self actor-group 0)))
(if (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status dead)))
(+! gp-0 1)
)
)
(cond
((zero? gp-0)
(when (-> self hud-counter)
(send-event (handle->process (-> self hud-counter)) 'hide-and-die)
(set! (-> self hud-counter) (the-as handle #f))
)
)
(else
(set! (-> *game-info* counter) (the float gp-0))
)
)
(if (zero? gp-0)
(go-virtual done)
)
)
)
:code sleep-code
)
;; failed to figure out what this is:
(defstate done (hover-training-manager)
:virtual #t
:enter (behavior ()
'()
)
:code (behavior ()
(until (process-grab? *target* #f)
(suspend)
)
(suspend-for (seconds 1)
)
(persist-with-delay *setting-control* 'interp-time (seconds 4) 'interp-time 'abs 0.0 0)
(set-setting! 'entity-name "camera-354" 0.0 0)
(suspend-for (seconds 3)
)
(task-node-close! (game-task-node temple-tests-hover-training) 'event)
(until (process-release? *target*)
(suspend)
)
(remove-setting! 'entity-name)
(when (-> self hud-counter)
(send-event (handle->process (-> self hud-counter)) 'hide-and-die)
(set! (-> self hud-counter) (the-as handle #f))
)
(while (-> self child)
(suspend)
)
(go-virtual display-text)
)
)
;; failed to figure out what this is:
(defstate die-fast (hover-training-manager)
:virtual #t
:code (behavior ()
(process-entity-status! self (entity-perm-status dead) #t)
)
)
;; failed to figure out what this is:
(defstate display-text (hover-training-manager)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('dismount)
(if (and *target* (focus-test? *target* board))
(draw-training-text self (text-id text-0613))
)
)
(('launch3)
(draw-training-text self (text-id text-05ff))
)
)
)
:trans (behavior ()
(cond
((-> self text)
(if (zero? (-> self gui-id))
(set! (-> self gui-id)
(add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0)
)
)
(set! (-> self text) #f)
)
(else
(set-action!
*gui-control*
(gui-action stop)
(-> self gui-id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(set! (-> self gui-id) (new 'static 'sound-id))
0
)
)
(if (task-node-closed? (game-task-node temple-tests-oracle-door-crossed))
(go-virtual die-fast)
)
)
:code sleep-code
)
;; definition for method 11 of type hover-training-manager
;; INFO: Used lq/sq
(defmethod init-from-entity! ((this hover-training-manager) (arg0 entity-actor))
"Set up a newly created process from the entity that created it."
(process-entity-set! this arg0)
(logclear! (-> this mask) (process-mask actor-pause))
(set! (-> this gui-id) (new 'static 'sound-id))
(set! (-> this hud-counter) (the-as handle #f))
(let* ((sv-16 (new 'static 'res-tag))
(v1-3 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))
)
(when (and v1-3 (nonzero? (-> sv-16 elt-count)))
(set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count)))
(set! (-> this actor-group) v1-3)
)
)
(if (task-node-closed? (game-task-node temple-tests-hover-training))
(go (method-of-object this display-text))
(go (method-of-object this idle))
)
)
;; failed to figure out what this is:
(defpartgroup group-tpl-symbol
:id 688
:flags (sp0 sp4)
:bounds (static-bspherem 0 0 0 20)
:parts ((sp-item 2656 :flags (is-3d sp6 sp7))
(sp-item 2657 :flags (sp6 sp7))
(sp-item 2658 :flags (is-3d sp6 sp7))
(sp-item 2659 :flags (is-3d sp6 sp7))
(sp-item 2660 :flags (sp6 sp7))
(sp-item 2661 :flags (is-3d sp6 sp7))
)
)
;; failed to figure out what this is:
(defpart 2656
:init-specs ((:texture (token-white templec-sprite))
(:num 1.0)
(:x (meters -3))
(:y (meters 2.5))
(:z (meters 1.3))
(:scale-x (meters 6))
(:rot-x (degrees 90))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 255.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3))
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2657
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:x (meters -3.1))
(:y (meters 2.5))
(:z (meters 0))
(:scale-x (meters 14))
(:rot-x (degrees 22.5))
(:scale-y :copy scale-x)
(:r 100.0)
(:g 200.0)
(:b 255.0)
(:a 64.0)
(:omega (degrees 22511.25))
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3 glow))
(:userdata 16384.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2658
:init-specs ((:texture (tpl-symbol-tail templec-sprite))
(:num 1.0)
(:x (meters 1.3))
(:y (meters -4.1))
(:z (meters 3.3))
(:scale-x (meters 7.8))
(:rot-x (degrees 5))
(:rot-y (degrees 0))
(:rot-z (degrees 90))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 200.0)
(:b 128.0)
(:a 128.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3))
(:rotate-y (degrees -90))
)
)
;; failed to figure out what this is:
(defpart 2659
:init-specs ((:texture (token-purple templec-sprite))
(:num 1.0)
(:x (meters 3))
(:y (meters -2.5))
(:z (meters 1.3))
(:scale-x (meters 6))
(:rot-x (degrees 90))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 128.0)
(:b 128.0)
(:a 255.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3))
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2660
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:x (meters 3.1))
(:y (meters -2.5))
(:z (meters 0))
(:scale-x (meters 14))
(:rot-x (degrees 22.5))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 80.0)
(:b 255.0)
(:a 64.0)
(:omega (degrees 22511.25))
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3 glow))
(:userdata 16384.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 2661
:init-specs ((:texture (tpl-symbol-tail templec-sprite))
(:num 1.0)
(:x (meters 1.3))
(:y (meters 4.1))
(:z (meters -3.3))
(:scale-x (meters 7.8))
(:rot-x (degrees 185))
(:rot-y (degrees 0))
(:rot-z (degrees 90))
(:scale-y :copy scale-x)
(:r 80.0)
(:g 32.0)
(:b 128.0)
(:a 128.0)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-3))
(:rotate-y (degrees -90))
)
)
;; failed to figure out what this is:
(defpartgroup group-tpl-symbol-touched
:id 689
:flags (sp0 sp4)
:bounds (static-bspherem 0 0 0 20)
:parts ((sp-item 2662 :flags (sp7)) (sp-item 2663 :flags (sp7)) (sp-item 2664 :flags (sp7)))
)
;; failed to figure out what this is:
(defpart 2662
:init-specs ((:texture (diamond-star level-default-sprite))
(:num 80.0)
(:y (meters 0) (meters 10))
(:scale-x (meters 1) (meters 1))
(:scale-y :copy scale-x)
(:r 64.0 64.0)
(:g 0.0 2.0 128.0)
(:b 255.0)
(:a 128.0)
(:vel-z (meters 0.033333335) (meters 0.033333335))
(:scalevel-x (meters -0.0033333334))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.10666667)
(:accel-y (meters -0.0016666667))
(:friction 0.97 0.02)
(:timer (seconds 4))
(:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z))
(:rotate-y (degrees 0))
(:rotate-z (degrees 0) (degrees 3600))
)
)
;; failed to figure out what this is:
(defpart 2663
:init-specs ((:texture (middot level-default-sprite))
(:num 100.0)
(:scale-x (meters 0.1) (meters 1))
(:scale-y :copy scale-x)
(:r 64.0 64.0)
(:g 0.0 2.0 128.0)
(:b 255.0)
(:a 128.0)
(:omega (degrees 0.45))
(:vel-z (meters 0.13333334) (meters 0.13333334))
(:fade-a -0.21333334 -0.21333334)
(:friction 0.94 0.04)
(:timer (seconds 2))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
(:func 'sparticle-motion-blur)
(:conerot-x (degrees 70) (degrees 20))
(:rotate-y (degrees 0))
(:rotate-z (degrees 0) (degrees 3600))
)
)
;; failed to figure out what this is:
(defpart 2664
:init-specs ((:texture (laser-hit-rim level-default-sprite))
(:num 1.0)
(:z (meters 5))
(:scale-x (meters 10))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 0.0)
(:b 255.0)
(:a 128.0)
(:scalevel-x (meters 0.13333334))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.21333334 -0.21333334)
(:timer (seconds 2))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
(:rotate-y (degrees 0))
)
)
;; definition of type tpl-symbol
(deftype tpl-symbol (process-drawable)
((flash-time time-frame)
(part-touched sparticle-launch-control)
)
(:state-methods
idle
)
)
;; definition for method 3 of type tpl-symbol
(defmethod inspect ((this tpl-symbol))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tflash-time: ~D~%" (-> this flash-time))
(format #t "~2Tpart-touched: ~A~%" (-> this part-touched))
(label cfg-4)
this
)
;; failed to figure out what this is:
(defskelgroup skel-tpl-symbol tpl-symbol tpl-symbol-lod0-jg tpl-symbol-idle-ja
((tpl-symbol-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 9)
)
;; failed to figure out what this is:
(defstate idle (tpl-symbol)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('flash)
(spawn (-> self part-touched) (-> self root trans))
(let ((v0-0 (current-time)))
(set! (-> self flash-time) v0-0)
v0-0
)
)
)
)
:trans (behavior ()
(let ((f0-2 (lerp-scale 1.0 0.5 (the float (- (current-time) (-> self flash-time))) 0.0 300.0)))
(set! (-> *part-id-table* 2656 init-specs 11 initial-valuef) (* 255.0 f0-2))
(set! (-> *part-id-table* 2657 init-specs 11 initial-valuef) (+ 16.0 (* 48.0 f0-2)))
(set! (-> *part-id-table* 2658 init-specs 13 initial-valuef) (* 128.0 f0-2))
(set! (-> *part-id-table* 2659 init-specs 11 initial-valuef) (* 255.0 f0-2))
(set! (-> *part-id-table* 2660 init-specs 11 initial-valuef) (+ 16.0 (* 48.0 f0-2)))
(set! (-> *part-id-table* 2661 init-specs 13 initial-valuef) (* 128.0 f0-2))
)
(spawn (-> self part) (-> self root trans))
)
: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
)
;; definition for method 10 of type tpl-symbol
(defmethod deactivate ((this tpl-symbol))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this part))
(kill-particles (-> this part))
)
(if (nonzero? (-> this part-touched))
(kill-particles (-> this part-touched))
)
((method-of-type process-drawable deactivate) this)
(none)
)
;; definition for method 7 of type tpl-symbol
;; WARN: Return type mismatch process-drawable vs tpl-symbol.
(defmethod relocate ((this tpl-symbol) (offset int))
(if (nonzero? (-> this part-touched))
(&+! (-> this part-touched) offset)
)
(the-as tpl-symbol ((method-of-type process-drawable relocate) this offset))
)
;; definition for method 11 of type tpl-symbol
(defmethod init-from-entity! ((this tpl-symbol) (arg0 entity-actor))
"Set up a newly created process from the entity that created it."
(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-tpl-symbol" (the-as (pointer level) #f)))
(the-as pair 0)
)
(set! (-> this part) (create-launch-control group-tpl-symbol this))
(set! (-> this part-touched) (create-launch-control group-tpl-symbol-touched this))
(logclear! (-> this mask) (process-mask actor-pause))
(go (method-of-object this idle))
)