;;-*-Lisp-*- (in-package goal) ;; definition of type rolling-part (deftype rolling-part (part-spawner) ((root-override basic :offset 112) ) :heap-base #x60 :method-count-assert 21 :size-assert #xd0 :flag-assert #x15006000d0 ) ;; definition for method 3 of type rolling-part (defmethod inspect rolling-part ((obj rolling-part)) (let ((t9-0 (method-of-type part-spawner inspect))) (t9-0 obj) ) obj ) ;; definition of type rollingcam (deftype rollingcam (process-hidden) () :method-count-assert 15 :size-assert #x70 :flag-assert #xf00000070 ) ;; definition for method 3 of type rollingcam (defmethod inspect rollingcam ((obj rollingcam)) (format #t "[~8x] ~A~%" obj (-> obj type)) (format #t "~Tname: ~A~%" (-> obj name)) (format #t "~Tmask: ~D~%" (-> obj mask)) (format #t "~Tparent: #x~X~%" (-> obj parent)) (format #t "~Tbrother: #x~X~%" (-> obj brother)) (format #t "~Tchild: #x~X~%" (-> obj child)) (format #t "~Tppointer: #x~X~%" (-> obj ppointer)) (format #t "~Tself: ~A~%" (-> obj self)) (format #t "~Tpool: ~A~%" (-> obj pool)) (format #t "~Tstatus: ~A~%" (-> obj status)) (format #t "~Tpid: ~D~%" (-> obj pid)) (format #t "~Tmain-thread: ~A~%" (-> obj main-thread)) (format #t "~Ttop-thread: ~A~%" (-> obj top-thread)) (format #t "~Tentity: ~A~%" (-> obj entity)) (format #t "~Tstate: ~A~%" (-> obj state)) (format #t "~Ttrans-hook: ~A~%" (-> obj trans-hook)) (format #t "~Tpost-hook: ~A~%" (-> obj post-hook)) (format #t "~Tevent-hook: ~A~%" (-> obj event-hook)) (format #t "~Tallocated-length: ~D~%" (-> obj allocated-length)) (format #t "~Tnext-state: ~A~%" (-> obj next-state)) (format #t "~Theap-base: #x~X~%" (-> obj heap-base)) (format #t "~Theap-top: #x~X~%" (-> obj heap-top)) (format #t "~Theap-cur: #x~X~%" (-> obj heap-cur)) (format #t "~Tstack-frame-top: ~A~%" (-> obj stack-frame-top)) (format #t "~Theap: #~%" (&-> obj heap-base)) (format #t "~Tconnection-list: ~`'connectable`P~%" (-> obj connection-list)) (format #t "~Tstack[0] @ #x~X~%" (-> obj stack)) obj ) ;; failed to figure out what this is: (defskelgroup *rollingcam-sg* rollingcam 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 30) :longest-edge (meters 0) ) ;; definition of type pusher-base (deftype pusher-base (process-drawable) ((root-override collide-shape-moving :offset 112) (max-frame float :offset-assert 176) ) :heap-base #x50 :method-count-assert 20 :size-assert #xb4 :flag-assert #x14005000b4 ) ;; definition for method 3 of type pusher-base (defmethod inspect pusher-base ((obj pusher-base)) (let ((t9-0 (method-of-type process-drawable inspect))) (t9-0 obj) ) (format #t "~T~Tmax-frame: ~f~%" (-> obj max-frame)) obj ) ;; definition of type pusher (deftype pusher (pusher-base) ((sync sync-info-paused :inline :offset-assert 180) (cyl cylinder :inline :offset-assert 208) ) :heap-base #x90 :method-count-assert 20 :size-assert #xf8 :flag-assert #x14009000f8 (:states pusher-idle ) ) ;; definition for method 3 of type pusher (defmethod inspect pusher ((obj pusher)) (let ((t9-0 (method-of-type pusher-base inspect))) (t9-0 obj) ) (format #t "~T~Tsync: #~%" (-> obj sync)) (format #t "~T~Tcyl: #~%" (-> obj cyl)) obj ) ;; definition of type gorge-pusher (deftype gorge-pusher (pusher-base) ((min-frame float :offset-assert 180) ) :heap-base #x50 :method-count-assert 20 :size-assert #xb8 :flag-assert #x14005000b8 (:states gorge-pusher-idle ) ) ;; definition for method 3 of type gorge-pusher (defmethod inspect gorge-pusher ((obj gorge-pusher)) (let ((t9-0 (method-of-type pusher-base inspect))) (t9-0 obj) ) (format #t "~T~Tmin-frame: ~f~%" (-> obj min-frame)) obj ) ;; failed to figure out what this is: (defskelgroup *pusher-sg* pusher 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 10) :longest-edge (meters 0) ) ;; definition for function pusher-base-init (defbehavior pusher-base-init pusher-base () (set! (-> self mask) (logior (process-mask enemy platform) (-> self mask))) (let ((gp-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-others)))) (set! (-> gp-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> gp-0 reaction) default-collision-reaction) (set! (-> gp-0 no-reaction) (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing) ) (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) (set! (-> s5-0 prim-core collide-as) (collide-kind ground-object)) (set! (-> s5-0 collide-with) (collide-kind target)) (set! (-> s5-0 prim-core action) (collide-action solid ca-1)) (set! (-> s5-0 transform-index) 0) (set-vector! (-> s5-0 local-sphere) -8192.0 0.0 0.0 40960.0) (set-root-prim! gp-0 s5-0) (let ((s4-0 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 0) (the-as uint 0)))) (set! (-> s4-0 prim-core collide-as) (collide-kind ground-object)) (set! (-> s4-0 collide-with) (collide-kind target)) (set! (-> s4-0 prim-core action) (collide-action solid ca-1)) (set! (-> s4-0 prim-core offense) (collide-offense indestructible)) (set! (-> s4-0 transform-index) 4) (set-vector! (-> s4-0 local-sphere) 8192.0 0.0 0.0 28672.0) (append-prim s5-0 s4-0) ) ) (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) (backup-collide-with-as gp-0) (set! (-> self root-override) gp-0) gp-0 ) ) ;; failed to figure out what this is: (defstate pusher-idle (pusher) :trans (the-as (function none :behavior pusher) rider-trans) :code (behavior () (while #t (let ((f0-0 -1.0)) (when (and *target* *camera*) (let ((gp-0 (new 'stack-no-clear 'vector))) (vector-! gp-0 (target-pos 0) (camera-pos)) (set! f0-0 (ray-capsule-intersect (-> self cyl) (camera-pos) gp-0)) ) ) (cond ((< f0-0 0.0) (let ((gp-1 (-> self skel root-channel 0))) (set! (-> gp-1 param 0) (get-current-value-with-mirror (-> self sync) (-> self max-frame))) (set! (-> gp-1 param 1) 1.0) (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) ) ) (else (let ((a0-4 (-> self skel root-channel 0))) (set! (-> a0-4 param 0) 0.0) (set! (-> a0-4 param 1) 1.0) (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!) ) ) ) ) (suspend) ) (none) ) :post (the-as (function none :behavior pusher) rider-post) ) ;; definition for method 11 of type pusher ;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defmethod init-from-entity! pusher ((obj pusher) (arg0 entity-actor)) (pusher-base-init) (process-drawable-from-entity! obj arg0) (initialize-skeleton obj *pusher-sg* '()) (load-params! (-> obj sync) obj (the-as uint 1500) 0.0 0.15 0.15) (set! (-> obj max-frame) (res-lump-float arg0 'max-frame :default (the float (ja-num-frames 0)))) (set! (-> obj cyl origin quad) (-> obj root-override trans quad)) (vector-x-quaternion! (-> obj cyl axis) (-> obj root-override quat)) (vector-negate! (-> obj cyl axis) (-> obj cyl axis)) (set! (-> obj cyl length) 36864.0) (set! (-> obj cyl radius) 20480.0) (go pusher-idle) (none) ) ;; failed to figure out what this is: (defstate gorge-pusher-idle (gorge-pusher) :trans (the-as (function none :behavior gorge-pusher) rider-trans) :code (behavior () (while #t (cond ((task-closed? (game-task rolling-race) (task-status need-introduction)) (let ((a0-1 (-> self skel root-channel 0))) (set! (-> a0-1 param 0) (-> self min-frame)) (set! (-> a0-1 param 1) 1.0) (joint-control-channel-group-eval! a0-1 (the-as art-joint-anim #f) num-func-seek!) ) ) (else (let ((a0-2 (-> self skel root-channel 0))) (set! (-> a0-2 param 0) (-> self max-frame)) (set! (-> a0-2 param 1) 1.0) (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!) ) ) ) (suspend) ) (none) ) :post (the-as (function none :behavior gorge-pusher) rider-post) ) ;; definition for method 11 of type gorge-pusher ;; INFO: Return type mismatch object vs none. (defmethod init-from-entity! gorge-pusher ((obj gorge-pusher) (arg0 entity-actor)) (pusher-base-init) (process-drawable-from-entity! obj arg0) (initialize-skeleton obj *pusher-sg* '()) (set! (-> obj max-frame) (res-lump-float arg0 'max-frame :default 1.0)) (set! (-> obj max-frame) (* (-> obj max-frame) (the float (ja-num-frames 0)))) (set! (-> obj min-frame) (res-lump-float arg0 'min-frame)) (set! (-> obj min-frame) (* (-> obj min-frame) (the float (ja-num-frames 0)))) (cond ((task-closed? (game-task rolling-race) (task-status need-introduction)) (let ((v1-6 (-> obj skel root-channel 0))) (set! (-> v1-6 num-func) num-func-identity) (set! (-> v1-6 frame-num) (-> obj min-frame)) ) ) (else (let ((v1-10 (-> obj skel root-channel 0))) (set! (-> v1-10 num-func) num-func-identity) (set! (-> v1-10 frame-num) (-> obj max-frame)) ) ) ) (go gorge-pusher-idle) (none) ) ;; definition of type dark-plant (deftype dark-plant (process-drawable) ((num-alts int32 :offset-assert 176) (alts entity-actor 4 :offset-assert 180) ) :heap-base #x60 :method-count-assert 20 :size-assert #xc4 :flag-assert #x14006000c4 (:states dark-plant-death dark-plant-gone dark-plant-idle dark-plant-sprout dark-plant-startup ) ) ;; definition for method 3 of type dark-plant (defmethod inspect dark-plant ((obj dark-plant)) (let ((t9-0 (method-of-type process-drawable inspect))) (t9-0 obj) ) (format #t "~T~Tnum-alts: ~D~%" (-> obj num-alts)) (format #t "~T~Talts[4] @ #x~X~%" (-> obj alts)) obj ) ;; failed to figure out what this is: (defskelgroup *dark-plant-sg* dark-plant 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 2.25 0 6) :longest-edge (meters 0) ) ;; definition for function dark-plant-check-target ;; INFO: Return type mismatch object vs symbol. (defun dark-plant-check-target ((arg0 dark-plant)) (the-as symbol (and *target* (and (< (vector-vector-distance (-> arg0 root trans) (target-pos 0)) 16384.0) (send-event *target* 'query 'powerup 4) ) ) ) ) ;; definition for function dark-plant-randomize (defun dark-plant-randomize ((arg0 dark-plant)) (quaternion-axis-angle! (-> arg0 root quat) 0.0 1.0 0.0 (rand-vu-float-range 0.0 65536.0)) (let ((s5-1 (new 'stack-no-clear 'vector))) (set-vector! s5-1 (rand-vu-float-range -1024.0 1024.0) 0.0 (rand-vu-float-range -1024.0 1024.0) 1.0) (vector+! (-> arg0 root trans) (-> arg0 entity extra trans) s5-1) ) ) ;; definition for function dark-plants-all-done (defun dark-plants-all-done ((arg0 dark-plant)) (while #t (if (!= (-> arg0 state) dark-plant-gone) (return #f) ) (if (zero? (-> arg0 num-alts)) (return #t) ) (let ((v1-9 (-> arg0 alts 0 extra process))) (if (not v1-9) (return #t) ) (if (= v1-9 arg0) (return #t) ) (set! arg0 (the-as dark-plant v1-9)) ) ) (the-as symbol #f) ) ;; definition for function dark-plant-has-bad-neighbor (defun dark-plant-has-bad-neighbor ((arg0 dark-plant)) (dotimes (v1-0 (-> arg0 num-alts)) (let ((a1-4 (-> arg0 alts v1-0 extra process))) (if (and a1-4 (!= (-> a1-4 state) dark-plant-gone)) (return #t) ) ) ) #f ) ;; definition for function dark-plant-trans ;; INFO: Return type mismatch object vs none. (defbehavior dark-plant-trans dark-plant () (if (dark-plant-check-target self) (go dark-plant-death) ) (none) ) ;; failed to figure out what this is: (defstate dark-plant-sprout (dark-plant) :trans dark-plant-trans :code (behavior () (dark-plant-randomize self) (logclear! (-> self draw status) (draw-status hidden)) (sound-play-by-name (static-sound-name "darkvine-grow") (new-sound-id) 1024 0 0 1 #t) (let ((a0-6 (-> self skel root-channel 0))) (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> self draw art-group data 4))) (set! (-> a0-6 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) data 0 length) -1)) ) (set! (-> a0-6 param 1) 1.0) (set! (-> a0-6 frame-num) 0.0) (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-7 (-> self skel root-channel 0))) (set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group data 0 length) -1))) (set! (-> a0-7 param 1) 1.0) (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!) ) ) (go dark-plant-idle) (none) ) :post (the-as (function none :behavior dark-plant) ja-post) ) ;; failed to figure out what this is: (defstate dark-plant-gone (dark-plant) :code (behavior () (logior! (-> self draw status) (draw-status hidden)) (let* ((f30-0 1500.0) (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) (v1-5 (the-as number (logior #x3f800000 v1-4))) (gp-0 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-5)))) 3000)) ) (set! (-> self state-time) (-> *display* base-frame-counter)) (while #t (when (and (!= (get-task-status (game-task rolling-plants)) (task-status invalid)) (!= (get-task-status (game-task rolling-plants)) 7) ) (cond ((>= (- (-> *display* base-frame-counter) (-> self state-time)) gp-0) (go dark-plant-sprout) ) ((dark-plant-check-target self) (set! (-> self state-time) (-> *display* base-frame-counter)) ) ((not (dark-plant-has-bad-neighbor self)) (set! (-> self state-time) (-> *display* base-frame-counter)) ) (else ) ) ) (suspend) ) ) (none) ) :post (the-as (function none :behavior dark-plant) ja-post) ) ;; failed to figure out what this is: (defstate dark-plant-death (dark-plant) :code (behavior () (spawn (-> self part) (-> self root trans)) (ja-channel-push! 1 60) (sound-play-by-name (static-sound-name "darkvine-kill") (new-sound-id) 1024 0 0 1 #t) (let ((a0-4 (-> self skel root-channel 0))) (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> self draw art-group data 3))) (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 3)) data 0 length) -1)) ) (set! (-> a0-4 param 1) 1.0) (set! (-> a0-4 frame-num) 0.0) (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> self draw art-group data 3)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-5 (-> self skel root-channel 0))) (set! (-> a0-5 param 0) (the float (+ (-> a0-5 frame-group data 0 length) -1))) (set! (-> a0-5 param 1) 1.0) (joint-control-channel-group-eval! a0-5 (the-as art-joint-anim #f) num-func-seek!) ) ) (go dark-plant-gone) (none) ) :post (the-as (function none :behavior dark-plant) ja-post) ) ;; failed to figure out what this is: (defstate dark-plant-idle (dark-plant) :trans dark-plant-trans :code (behavior () (while #t (when (and (logtest? (-> self draw status) (draw-status was-drawn)) *target* (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) ) (if (rand-vu-percent? 0.3) (sound-play-by-name (static-sound-name "darkvine-move") (new-sound-id) 1024 0 0 1 #t) ) (when (task-closed? (game-task rolling-plants) (task-status need-hint)) (level-hint-spawn (game-text-id rolling-dark-plants-location-hint) "sksp0113" (the-as entity #f) *entity-pool* (game-task none) ) (let ((a1-4 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-4 from) self) (set! (-> a1-4 num-params) 2) (set! (-> a1-4 message) 'query) (set! (-> a1-4 param 0) (the-as uint 'powerup)) (set! (-> a1-4 param 1) (the-as uint 4)) (if (not (send-event-function *target* a1-4)) (level-hint-spawn (game-text-id rolling-dark-plants-hint) "sksp0114" (the-as entity #f) *entity-pool* (game-task none) ) ) ) ) ) (let ((gp-1 (-> self skel root-channel 0))) (set! (-> gp-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 2))) (set! (-> gp-1 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 2)) data 0 length) -1)) ) (let* ((f30-1 0.9) (f28-0 0.25) (v1-32 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) (v1-33 (the-as number (logior #x3f800000 v1-32))) ) (set! (-> gp-1 param 1) (+ f30-1 (* f28-0 (+ -1.0 (the-as float v1-33))))) ) (set! (-> gp-1 frame-num) 0.0) (joint-control-channel-group! gp-1 (the-as art-joint-anim (-> self draw art-group data 2)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((gp-2 (-> self skel root-channel 0))) (set! (-> gp-2 param 0) (the float (+ (-> gp-2 frame-group data 0 length) -1))) (let* ((f30-2 0.9) (f28-1 0.25) (v1-45 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) (v1-46 (the-as number (logior #x3f800000 v1-45))) ) (set! (-> gp-2 param 1) (+ f30-2 (* f28-1 (+ -1.0 (the-as float v1-46))))) ) (joint-control-channel-group-eval! gp-2 (the-as art-joint-anim #f) num-func-seek!) ) ) ) (none) ) :post (the-as (function none :behavior dark-plant) ja-post) ) ;; failed to figure out what this is: (defstate dark-plant-startup (dark-plant) :trans dark-plant-trans :code (behavior () (let ((gp-0 (-> self skel root-channel 0))) (set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 2))) (set! (-> gp-0 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 2)) data 0 length) -1)) ) (set! (-> gp-0 param 1) 1.0) (let* ((v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) (v1-13 (the-as number (logior #x3f800000 v1-12))) ) (set! (-> gp-0 frame-num) (* (+ -1.0 (the-as float v1-13)) (the float (ja-num-frames 0)))) ) (joint-control-channel-group! gp-0 (the-as art-joint-anim (-> self draw art-group data 2)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-4 (-> self skel root-channel 0))) (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group data 0 length) -1))) (set! (-> a0-4 param 1) 1.0) (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!) ) ) (go dark-plant-idle) (none) ) :post (the-as (function none :behavior dark-plant) ja-post) ) ;; failed to figure out what this is: (defpartgroup group-dark-plant :id 455 :duration 42 :flags (use-local-clock) :bounds (static-bspherem 0 0 0 15) :parts ((sp-item 1764) (sp-item 2356)) ) ;; failed to figure out what this is: (defpart 2356 :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) (sp-flt spt-num 1.0) (sp-flt spt-y (meters 2)) (sp-flt spt-scale-x (meters 12)) (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) (sp-copy-from-other spt-scale-y -4) (sp-rnd-flt spt-r 0.0 64.0 1.0) (sp-rnd-flt spt-g 192.0 64.0 1.0) (sp-rnd-flt spt-b 0.0 32.0 1.0) (sp-flt spt-a 96.0) (sp-flt spt-fade-g -3.0) (sp-flt spt-fade-a -2.4) (sp-int spt-timer 42) (sp-cpuinfo-flags bit2 bit3 bit14) ) ) ;; failed to figure out what this is: (defpart 1764 :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2)) (sp-flt spt-num 128.0) (sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.4) 1.0) (sp-copy-from-other spt-scale-y -4) (sp-rnd-flt spt-r 0.0 128.0 1.0) (sp-rnd-flt spt-g 192.0 64.0 1.0) (sp-flt spt-b 0.0) (sp-rnd-flt spt-a 32.0 96.0 1.0) (sp-rnd-flt spt-vel-y (meters 0) (meters 0.02) 1.0) (sp-flt spt-scalevel-x (meters -0.00066666666)) (sp-copy-from-other spt-scalevel-y -4) (sp-flt spt-fade-a -0.42666668) (sp-rnd-flt spt-accel-y 0.0 5.4613333 1.0) (sp-flt spt-friction 0.95) (sp-int spt-timer 300) (sp-cpuinfo-flags bit2 bit3) (sp-flt spt-conerot-x (degrees 45.0)) (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0) (sp-rnd-flt spt-conerot-radius (meters 0) (meters 4.5) 1.0) (sp-rnd-flt spt-rotate-y (degrees -15.0) (degrees 30.0) 1.0) ) ) ;; definition for method 11 of type dark-plant ;; INFO: Return type mismatch object vs none. (defmethod init-from-entity! dark-plant ((obj dark-plant) (arg0 entity-actor)) (set! (-> obj root) (new 'process 'trsqv)) (process-drawable-from-entity! obj arg0) (initialize-skeleton obj *dark-plant-sg* '()) (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 455) obj)) (set! (-> obj num-alts) (min 4 (entity-actor-count (-> obj entity) 'alt-actor))) (dotimes (s5-3 (-> obj num-alts)) (set! (-> obj alts s5-3) (entity-actor-lookup (-> obj entity) 'alt-actor s5-3)) ) (if (zero? (-> obj num-alts)) (format 0 "ERROR: ~S has no alternates~%" (-> obj name)) ) (dark-plant-randomize obj) (case (get-task-status (game-task rolling-plants)) (((task-status invalid) (task-status need-resolution)) (go dark-plant-gone) ) (else (go dark-plant-startup) ) ) (none) ) ;; definition of type happy-plant (deftype happy-plant (process-drawable) ((root-override collide-shape :offset 112) (alt-actor entity-actor :offset-assert 176) ) :heap-base #x50 :method-count-assert 20 :size-assert #xb4 :flag-assert #x14005000b4 (:states happy-plant-init happy-plant-opened happy-plant-opening ) ) ;; definition for method 3 of type happy-plant (defmethod inspect happy-plant ((obj happy-plant)) (let ((t9-0 (method-of-type process-drawable inspect))) (t9-0 obj) ) (format #t "~T~Talt-actor: ~A~%" (-> obj alt-actor)) obj ) ;; failed to figure out what this is: (defskelgroup *happy-plant-sg* happy-plant 0 3 ((1 (meters 20)) (2 (meters 999999))) :bounds (static-spherem 0 2.25 0 6) :longest-edge (meters 0) ) ;; failed to figure out what this is: (defstate happy-plant-opened (happy-plant) :code (behavior () (while #t (let ((a0-0 (-> self skel root-channel 0))) (set! (-> a0-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 4))) (set! (-> a0-0 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) data 0 length) -1)) ) (set! (-> a0-0 param 1) 1.0) (set! (-> a0-0 frame-num) 0.0) (joint-control-channel-group! a0-0 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-1 (-> self skel root-channel 0))) (set! (-> a0-1 param 0) (the float (+ (-> a0-1 frame-group data 0 length) -1))) (set! (-> a0-1 param 1) 1.0) (joint-control-channel-group-eval! a0-1 (the-as art-joint-anim #f) num-func-seek!) ) ) ) (none) ) :post (the-as (function none :behavior happy-plant) ja-post) ) ;; failed to figure out what this is: (defstate happy-plant-opening (happy-plant) :exit (behavior () (when *target* (logclear! (-> *target* mask) (process-mask sleep)) (process-entity-status! self (entity-perm-status bit-3) #f) (logior! (-> self mask) (process-mask actor-pause)) ) (none) ) :code (behavior () (close-specific-task! (game-task rolling-plants) (task-status need-reminder)) (process-entity-status! self (entity-perm-status bit-3) #t) (logclear! (-> self mask) (process-mask actor-pause)) (while (and *target* (< (vector-vector-distance (-> self root-override trans) (target-pos 0)) 24576.0)) (suspend) ) (let* ((gp-1 (get-process *default-dead-pool* manipy #x4000)) (gp-2 (ppointer->handle (when gp-1 (let ((t9-5 (method-of-type manipy activate))) (t9-5 (the-as manipy gp-1) self 'manipy (the-as pointer #x70004000)) ) (run-now-in-process gp-1 manipy-init (-> self entity extra trans) (-> self entity) *rollingcam-sg* #f) (-> gp-1 ppointer) ) ) ) ) (let ((s5-1 (get-process *default-dead-pool* othercam #x4000))) (ppointer->handle (when s5-1 (let ((t9-8 (method-of-type othercam activate))) (t9-8 (the-as othercam s5-1) (-> gp-2 process 0) 'othercam (the-as pointer #x70004000)) ) (run-now-in-process s5-1 othercam-init-by-other (-> gp-2 process 0) 4 #f #t) (-> s5-1 ppointer) ) ) ) (let* ((s5-2 (get-process *default-dead-pool* fuel-cell #x4000)) (s5-3 (ppointer->handle (when s5-2 (let ((t9-11 (method-of-type fuel-cell activate))) (t9-11 (the-as fuel-cell s5-2) self 'fuel-cell (the-as pointer #x70004000)) ) (run-now-in-process s5-2 fuel-cell-init-as-clone (process->handle self) 55) (-> s5-2 ppointer) ) ) ) ) (if *target* (logior! (-> *target* mask) (process-mask sleep)) ) (send-event (-> gp-2 process 0) 'anim-mode 'clone-anim) (ja-play-spooled-anim (new 'static 'spool-anim :name "happy-plant-open" :index 5 :parts 2 :command-list '((0 send-event target draw #f) (10000 send-event target draw #t)) ) (the-as art-joint-anim #f) (the-as art-joint-anim (-> self draw art-group data 4)) (the-as (function process-drawable symbol) false-func) ) (ja-channel-set! 1) (let ((v1-39 (-> self skel root-channel 0))) (set! (-> v1-39 frame-group) (the-as art-joint-anim (-> self draw art-group data 4))) ) (if (handle->process (the-as int gp-2)) (deactivate (-> gp-2 process 0)) ) (let ((gp-3 (handle->process s5-3))) (when gp-3 (send-event gp-3 'stop-cloning) (let ((s5-4 (new-stack-vector0))) (vector<-cspace! s5-4 (-> self node-list data 25)) (send-event gp-3 'trans s5-4) ) ) ) ) ) (restore-collide-with-as (-> self root-override)) (go happy-plant-opened) (none) ) :post (the-as (function none :behavior happy-plant) transform-post) ) ;; failed to figure out what this is: (defstate happy-plant-init (happy-plant) :trans (behavior () (when (-> self alt-actor) (spool-push *art-control* "happy-plant-open" 0 self -99.0) (let* ((gp-0 (-> self alt-actor extra process)) (a0-2 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) dark-plant)) gp-0 ) ) ) (when a0-2 (if (dark-plants-all-done (the-as dark-plant a0-2)) (go happy-plant-opening) ) ) ) ) (none) ) :code (behavior () (clear-collide-with-as (-> self root-override)) (while #t (let ((a0-1 (-> self skel root-channel 0))) (set! (-> a0-1 frame-group) (if (> (-> self skel active-channels) 0) (-> self skel root-channel 0 frame-group) ) ) (set! (-> a0-1 param 0) (the float (+ (-> (if (> (-> self skel active-channels) 0) (-> self skel root-channel 0 frame-group) ) data 0 length ) -1 ) ) ) (set! (-> a0-1 param 1) 1.0) (set! (-> a0-1 frame-num) 0.0) (joint-control-channel-group! a0-1 (if (> (-> self skel active-channels) 0) (-> self skel root-channel 0 frame-group) ) num-func-seek! ) ) (until (ja-done? 0) (suspend) (let ((a0-2 (-> self skel root-channel 0))) (set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group data 0 length) -1))) (set! (-> a0-2 param 1) 1.0) (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!) ) ) ) (none) ) :post (the-as (function none :behavior happy-plant) ja-post) ) ;; definition for method 11 of type happy-plant ;; INFO: Return type mismatch object vs none. (defmethod init-from-entity! happy-plant ((obj happy-plant) (arg0 entity-actor)) (stack-size-set! (-> obj main-thread) 512) (let ((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) (set! (-> s3-0 prim-core collide-as) (collide-kind enemy)) (set! (-> s3-0 collide-with) (collide-kind target)) (set! (-> s3-0 prim-core action) (collide-action solid)) (set! (-> s3-0 prim-core offense) (collide-offense indestructible)) (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 8192.0) (set-root-prim! s4-0 s3-0) ) (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) (backup-collide-with-as s4-0) (set! (-> obj root-override) s4-0) ) (process-drawable-from-entity! obj arg0) (initialize-skeleton obj *happy-plant-sg* '()) (set! (-> obj alt-actor) (entity-actor-lookup (-> obj entity) 'alt-actor 0)) (case (get-task-status (game-task rolling-plants)) (((task-status invalid)) (let ((v1-19 (-> obj skel root-channel 0))) (set! (-> v1-19 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4))) ) (go happy-plant-opened) ) (((task-status need-resolution)) (let ((s5-1 (new 'stack-no-clear 'vector))) (let ((v1-23 (-> obj skel root-channel 0))) (set! (-> v1-23 frame-group) (the-as art-joint-anim (-> obj draw art-group data 4))) ) (logior! (-> obj skel status) (janim-status inited)) (ja-post) (logclear! (-> obj skel status) (janim-status inited)) (vector<-cspace! s5-1 (-> obj node-list data 25)) (birth-pickup-at-point s5-1 (pickup-type fuel-cell) 55.0 #f obj (the-as fact-info #f)) ) (go happy-plant-opened) ) (else (go happy-plant-init) ) ) (none) ) ;; definition of type race-time (deftype race-time (structure) ((digit int8 5 :offset-assert 0) ) :pack-me :method-count-assert 9 :size-assert #x5 :flag-assert #x900000005 ) ;; definition for method 3 of type race-time (defmethod inspect race-time ((obj race-time)) (format #t "[~8x] ~A~%" obj 'race-time) (format #t "~Tdigit[5] @ #x~X~%" (-> obj digit)) obj ) ;; definition for function race-time-copy! (defun race-time-copy! ((arg0 race-time) (arg1 race-time)) (dotimes (v1-0 5) (set! (-> arg0 digit v1-0) (-> arg1 digit v1-0)) ) #f ) ;; definition for function seconds->race-time (defun seconds->race-time ((arg0 race-time) (arg1 time-frame)) (let* ((v1-1 (max 0 (min #x2bf1d arg1))) (f0-1 (* 0.0033333334 (the float v1-1))) ) (set! (-> arg0 digit 0) (the int (* 0.016666668 f0-1))) (let ((f0-2 (- f0-1 (* 60.0 (the float (-> arg0 digit 0)))))) (set! (-> arg0 digit 1) (the int (* 0.1 f0-2))) (let ((f0-3 (- f0-2 (* 10.0 (the float (-> arg0 digit 1)))))) (set! (-> arg0 digit 2) (the int f0-3)) (let ((f0-4 (- f0-3 (the float (-> arg0 digit 2))))) (set! (-> arg0 digit 3) (the int (* 10.0 f0-4))) (let* ((f0-5 (- f0-4 (* 0.1 (the float (-> arg0 digit 3))))) (v0-0 (the int (* 100.0 f0-5))) ) (set! (-> arg0 digit 4) v0-0) v0-0 ) ) ) ) ) ) ;; definition for function race-time->seconds (defun race-time->seconds ((arg0 race-time)) (let ((f0-5 (+ (the float (* 60 (-> arg0 digit 0))) (the float (* 10 (-> arg0 digit 1))) (the float (-> arg0 digit 2)) (* 0.1 (the float (-> arg0 digit 3))) (* 0.01 (the float (-> arg0 digit 4))) ) ) ) (the int (* 300.0 f0-5)) ) ) ;; definition for function race-time-less-than (defun race-time-less-than ((arg0 race-time) (arg1 race-time)) (dotimes (v1-0 5) (cond ((< (-> arg0 digit v1-0) (-> arg1 digit v1-0)) (return #t) ) ((< (-> arg1 digit v1-0) (-> arg0 digit v1-0)) (return #f) ) ) ) #f ) ;; definition for function race-time-save (defun race-time-save ((arg0 race-time) (arg1 int) (arg2 task-control)) (dotimes (s3-0 5) (save-reminder arg2 (-> arg0 digit s3-0) (+ arg1 s3-0)) ) #f ) ;; definition for function race-time-read ;; INFO: Return type mismatch int vs symbol. (defun race-time-read ((arg0 race-time) (arg1 int) (arg2 task-control) (arg3 time-frame)) (dotimes (s2-0 5) (set! (-> arg0 digit s2-0) (get-reminder arg2 (+ arg1 s2-0))) ) (let ((a1-3 (new 'stack 'race-time))) (set! (-> a1-3 digit 4) 1) (the-as symbol (if (race-time-less-than arg0 a1-3) (seconds->race-time arg0 arg3) ) ) ) ) ;; failed to figure out what this is: (defskelgroup *rolling-start-whole-sg* rolling-start 0 4 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 30) :longest-edge (meters 0) ) ;; failed to figure out what this is: (defskelgroup *rolling-start-broken-sg* rolling-start 2 4 ((3 (meters 999999))) :bounds (static-spherem 0 0 0 30) :longest-edge (meters 0) ) ;; definition of type rolling-start (deftype rolling-start (process-drawable) ((whole-look lod-set :inline :offset-assert 176) (broken-look lod-set :inline :offset-assert 212) ) :heap-base #x90 :method-count-assert 20 :size-assert #xf5 :flag-assert #x14009000f5 (:states (rolling-start-break symbol) rolling-start-whole ) ) ;; definition for method 3 of type rolling-start (defmethod inspect rolling-start ((obj rolling-start)) (let ((t9-0 (method-of-type process-drawable inspect))) (t9-0 obj) ) (format #t "~T~Twhole-look: #~%" (-> obj whole-look)) (format #t "~T~Tbroken-look: #~%" (-> obj broken-look)) obj ) ;; failed to figure out what this is: (defstate rolling-start-break (rolling-start) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('unbreak) (go rolling-start-whole) ) ) ) :code (behavior ((arg0 symbol)) (let ((a0-1 (-> self skel root-channel 0))) (set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 5))) (set! (-> a0-1 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -1)) ) (set! (-> a0-1 param 1) 1.0) (set! (-> a0-1 frame-num) 0.0) (joint-control-channel-group! a0-1 (the-as art-joint-anim (-> self draw art-group data 5)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-2 (-> self skel root-channel 0))) (set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group data 0 length) -1))) (set! (-> a0-2 param 1) 1.0) (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!) ) ) (lods-assign! (-> self draw) (-> self broken-look)) (let ((a0-5 (-> self skel root-channel 0))) (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> self draw art-group data 6))) (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 6)) data 0 length) -1)) ) (set! (-> a0-5 param 1) 1.0) (set! (-> a0-5 frame-num) 0.0) (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> self draw art-group data 6)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-6 (-> self skel root-channel 0))) (set! (-> a0-6 param 0) (the float (+ (-> a0-6 frame-group data 0 length) -1))) (set! (-> a0-6 param 1) 1.0) (joint-control-channel-group-eval! a0-6 (the-as art-joint-anim #f) num-func-seek!) ) ) (while #t (let ((a0-8 (-> self skel root-channel 0))) (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> self draw art-group data 7))) (set! (-> a0-8 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 7)) data 0 length) -1)) ) (set! (-> a0-8 param 1) 1.0) (set! (-> a0-8 frame-num) 0.0) (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> self draw art-group data 7)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-9 (-> self skel root-channel 0))) (set! (-> a0-9 param 0) (the float (+ (-> a0-9 frame-group data 0 length) -1))) (set! (-> a0-9 param 1) 1.0) (joint-control-channel-group-eval! a0-9 (the-as art-joint-anim #f) num-func-seek!) ) ) (if arg0 (deactivate self) ) ) (none) ) :post (the-as (function none :behavior rolling-start) ja-post) ) ;; failed to figure out what this is: (defstate rolling-start-whole (rolling-start) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('break) (sound-play-by-name (static-sound-name "cool-rolling-st") (new-sound-id) 1024 0 0 1 #t) (go rolling-start-break #f) ) (('break-and-die) (go rolling-start-break #t) ) ) ) :code (behavior () (lods-assign! (-> self draw) (-> self whole-look)) (while #t (let ((a0-1 (-> self skel root-channel 0))) (set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 4))) (set! (-> a0-1 param 0) (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) data 0 length) -1)) ) (set! (-> a0-1 param 1) 1.0) (set! (-> a0-1 frame-num) 0.0) (joint-control-channel-group! a0-1 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-seek!) ) (until (ja-done? 0) (suspend) (let ((a0-2 (-> self skel root-channel 0))) (set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group data 0 length) -1))) (set! (-> a0-2 param 1) 1.0) (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!) ) ) ) (none) ) :post (the-as (function none :behavior rolling-start) ja-post) ) ;; definition for function rolling-start-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defbehavior rolling-start-init-by-other rolling-start ((arg0 vector) (arg1 float)) (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> arg0 quad)) (initialize-skeleton self *rolling-start-whole-sg* '()) (setup-lods! (-> self whole-look) *rolling-start-whole-sg* (-> self draw art-group) (-> self entity)) (setup-lods! (-> self broken-look) *rolling-start-broken-sg* (-> self draw art-group) (-> self entity)) (let ((s5-1 (new 'stack-no-clear 'matrix))) (matrix-rotate-y! s5-1 arg1) (matrix->quaternion (-> self root quat) s5-1) ) (go rolling-start-whole) (none) ) ;; definition of type gorge (deftype gorge (process-drawable) ((root-override collide-shape-moving :offset 112) (coord matrix :inline :offset-assert 176) (radius float :offset-assert 240) (thickness float :offset-assert 244) ) :heap-base #x90 :method-count-assert 20 :size-assert #xf8 :flag-assert #x14009000f8 ) ;; definition for method 3 of type gorge (defmethod inspect gorge ((obj gorge)) (let ((t9-0 (method-of-type process-drawable inspect))) (t9-0 obj) ) (format #t "~T~Tcoord: #~%" (-> obj coord)) (format #t "~T~Tradius: ~f~%" (-> obj radius)) (format #t "~T~Tthickness: ~f~%" (-> obj thickness)) obj ) ;; definition for function gorge-init (defbehavior gorge-init gorge ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float)) (forward-down->inv-matrix (-> self coord) arg1 (new 'static 'vector :y -1.0)) (matrix-transpose! (-> self coord) (-> self coord)) (let ((s3-0 (new 'stack-no-clear 'vector))) (vector-matrix*! s3-0 arg0 (-> self coord)) (vector-negate! (-> self coord vector 3) s3-0) ) (set! (-> self coord vector 3 w) 1.0) (set! (-> self radius) arg2) (let ((f0-2 arg3)) (set! (-> self thickness) f0-2) f0-2 ) ) ;; definition of type gorge-start (deftype gorge-start (gorge) ((tasks task-control :offset-assert 248) (record-time race-time :inline :offset-assert 252) (this-time race-time :inline :offset-assert 257) (start-banner handle :offset-assert 264) (end-banner handle :offset-assert 272) (timer-pos-offset int32 :offset-assert 280) (ticker ticky :inline :offset-assert 288) ) :heap-base #xd0 :method-count-assert 20 :size-assert #x140 :flag-assert #x1400d00140 (:states gorge-start-idle gorge-start-race-aborted gorge-start-race-finished gorge-start-racing gorge-start-ready ) ) ;; definition for method 3 of type gorge-start (defmethod inspect gorge-start ((obj gorge-start)) (let ((t9-0 (method-of-type gorge inspect))) (t9-0 obj) ) (format #t "~T~Ttasks: ~A~%" (-> obj tasks)) (format #t "~T~Trecord-time: #~%" (-> obj record-time)) (format #t "~T~Tthis-time: #~%" (-> obj this-time)) (format #t "~T~Tstart-banner: ~D~%" (-> obj start-banner)) (format #t "~T~Tend-banner: ~D~%" (-> obj end-banner)) (format #t "~T~Ttimer-pos-offset: ~D~%" (-> obj timer-pos-offset)) (format #t "~T~Tticker: #~%" (-> obj ticker)) obj ) ;; definition of type gorge-finish (deftype gorge-finish (gorge) ((alt-actor entity-actor :offset-assert 248) ) :heap-base #x90 :method-count-assert 20 :size-assert #xfc :flag-assert #x14009000fc (:states gorge-finish-idle ) ) ;; definition for method 3 of type gorge-finish (defmethod inspect gorge-finish ((obj gorge-finish)) (let ((t9-0 (method-of-type gorge inspect))) (t9-0 obj) ) (format #t "~T~Talt-actor: ~A~%" (-> obj alt-actor)) obj ) ;; definition of type gorge-abort (deftype gorge-abort (gorge) () :heap-base #x90 :method-count-assert 20 :size-assert #xf8 :flag-assert #x14009000f8 (:states gorge-abort-idle ) ) ;; definition for method 3 of type gorge-abort (defmethod inspect gorge-abort ((obj gorge-abort)) (let ((t9-0 (method-of-type gorge inspect))) (t9-0 obj) ) obj ) ;; definition for function gorge-behind ;; Used lq/sq (defun gorge-behind ((arg0 gorge)) (if (not *target*) (return #f) ) (let ((gp-0 (new-stack-vector0))) (vector-matrix*! gp-0 (target-pos 0) (-> arg0 coord)) (and (< (fabs (-> gp-0 x)) (-> arg0 radius)) (< (-> gp-0 y) (-> arg0 radius)) (< 0.0 (-> gp-0 y)) (< (-> gp-0 z) 0.0) ) ) ) ;; definition for function gorge-in-front ;; Used lq/sq (defun gorge-in-front ((arg0 gorge)) (if (not *target*) (return #f) ) (let ((s5-0 (new-stack-vector0))) (vector-matrix*! s5-0 (target-pos 0) (-> arg0 coord)) (and (< (fabs (-> s5-0 x)) (-> arg0 radius)) (< (-> s5-0 y) (-> arg0 radius)) (< 0.0 (-> s5-0 y)) (< 0.0 (-> s5-0 z)) (< (-> s5-0 z) (-> arg0 thickness)) ) ) ) ;; definition for function gorge-trans ;; INFO: Return type mismatch symbol vs none. (defun gorge-trans () (none) ) ;; failed to figure out what this is: (defstate gorge-abort-idle (gorge-abort) :trans (the-as (function none :behavior gorge-abort) gorge-trans) :code (behavior () (while #t (suspend) (if (gorge-behind self) (send-event (ppointer->process (-> self parent)) 'aborted) ) ) (none) ) ) ;; definition for function gorge-abort-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defbehavior gorge-abort-init-by-other gorge-abort ((arg0 vector) (arg1 vector) (arg2 float)) (set! (-> self root-override) (the-as collide-shape-moving (new 'process 'trsqv))) (set! (-> self root-override trans quad) (-> arg0 quad)) (gorge-init arg0 arg1 arg2 8192.0) (go gorge-abort-idle) (none) ) ;; failed to figure out what this is: (defstate gorge-finish-idle (gorge-finish) :trans (the-as (function none :behavior gorge-finish) gorge-trans) :code (behavior () (while #t (suspend) (if (gorge-in-front self) (send-event (ppointer->process (-> self parent)) 'finished) ) ) (none) ) ) ;; definition for function gorge-finish-init-by-other ;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defbehavior gorge-finish-init-by-other gorge-finish ((arg0 vector) (arg1 vector) (arg2 float)) (set! (-> self root-override) (the-as collide-shape-moving (new 'process 'trsqv))) (set! (-> self root-override trans quad) (-> arg0 quad)) (gorge-init arg0 arg1 arg2 20480.0) (go gorge-finish-idle) (none) ) ;; definition for function race-time->string (defun race-time->string ((arg0 race-time)) (cond ((zero? (-> arg0 digit 0)) (format (clear *temp-string*) "~D~D.~D~D" (-> arg0 digit 1) (-> arg0 digit 2) (-> arg0 digit 3) (-> arg0 digit 4) ) *temp-string* ) (else (format (clear *temp-string*) "~D:~D~D.~D~D" (-> arg0 digit 0) (-> arg0 digit 1) (-> arg0 digit 2) (-> arg0 digit 3) (-> arg0 digit 4) ) *temp-string* ) ) ) ;; definition for function gorge-start-draw-time ;; INFO: Return type mismatch object vs none. (defbehavior gorge-start-draw-time gorge-start ((arg0 symbol) (arg1 symbol)) (let ((gp-0 (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color yellow-orange) (font-flags shadow kerning) ) ) ) (let ((v1-1 gp-0)) (set! (-> v1-1 width) (the float 200)) ) (let ((v1-2 gp-0)) (set! (-> v1-2 height) (the float 50)) ) (let ((v1-3 gp-0)) (set! (-> v1-3 scale) 0.7) ) (set! (-> gp-0 origin x) (the float (+ (-> self timer-pos-offset) 392))) (set! (-> gp-0 origin y) (the float (- 10 (-> self timer-pos-offset)))) (set! (-> gp-0 flags) (font-flags shadow kerning right large)) (print-game-text (lookup-text! *common-text* (game-text-id rolling-race-time-string-prefix) #f) gp-0 #f 128 22 ) (set! (-> gp-0 origin x) (+ 10.0 (-> gp-0 origin x))) (set! (-> gp-0 flags) (font-flags shadow kerning large)) (print-game-text (race-time->string (-> self this-time)) gp-0 #f 128 22) (set! (-> gp-0 origin x) (+ -10.0 (-> gp-0 origin x))) (set! (-> gp-0 origin y) (+ 15.0 (-> gp-0 origin y))) (set! (-> gp-0 flags) (font-flags shadow kerning right large)) (print-game-text (lookup-text! *common-text* (game-text-id rolling-race-record-string-prefix) #f) gp-0 #f 128 22 ) (set! (-> gp-0 origin x) (+ 10.0 (-> gp-0 origin x))) (set! (-> gp-0 flags) (font-flags shadow kerning large)) (print-game-text (race-time->string (-> self record-time)) gp-0 #f 128 22) (cond ((not arg0) ) ((race-time-less-than (-> self this-time) (-> self record-time)) (when (< (mod (-> *display* real-frame-counter) 90) 60) (let ((v1-18 gp-0)) (set! (-> v1-18 scale) 1.0) ) (set! (-> gp-0 origin x) 156.0) (set! (-> gp-0 origin y) 80.0) (set! (-> gp-0 flags) (font-flags shadow kerning middle left large)) (let ((a0-15 gp-0)) (set! (-> a0-15 color) (font-color orange-red)) ) (print-game-text (lookup-text! *common-text* (game-text-id rolling-race-new-record-string-prefix) #f) gp-0 #f 128 22 ) ) (when arg1 (close-specific-task! (-> self entity extra perm task) (task-status need-reminder)) (level-hint-spawn (game-text-id rolling-race-beat-record) "sksp0109" (the-as entity #f) *entity-pool* (game-task none) ) (race-time-save (-> self this-time) 1 (-> self tasks)) ) ) (else (if arg1 (ambient-hint-spawn "st-lose" (the-as vector #f) *entity-pool* 'stinger) ) (when (< (mod (-> *display* real-frame-counter) 90) 60) (let ((v1-30 gp-0)) (set! (-> v1-30 scale) 1.0) ) (set! (-> gp-0 origin x) 156.0) (set! (-> gp-0 origin y) 80.0) (set! (-> gp-0 flags) (font-flags shadow kerning middle left large)) (let ((a0-23 gp-0)) (set! (-> a0-23 color) (font-color orange-red)) ) (print-game-text (lookup-text! *common-text* (game-text-id rolling-race-try-again-string) #f) gp-0 #f 128 22) ) ) ) ) (none) ) ;; definition for function gorge-start-launch-start-banner ;; INFO: Return type mismatch int vs handle. ;; Used lq/sq (defbehavior gorge-start-launch-start-banner gorge-start () (the-as handle (when (task-closed? (game-task rolling-race) (task-status need-introduction)) (when (not (handle->process (-> self start-banner))) (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self root-override trans quad)) (let* ((s5-0 (get-process *default-dead-pool* rolling-start #x4000)) (v0-1 (ppointer->handle (when s5-0 (let ((t9-2 (method-of-type rolling-start activate))) (t9-2 (the-as rolling-start s5-0) self 'rolling-start (the-as pointer #x70004000)) ) (run-now-in-process s5-0 rolling-start-init-by-other gp-0 0.0) (-> s5-0 ppointer) ) ) ) ) (set! (-> self start-banner) (the-as handle v0-1)) v0-1 ) ) ) ) ) ) ;; failed to figure out what this is: (defstate gorge-start-race-finished (gorge-start) :trans (behavior () (gorge-trans) (none) ) :code (behavior () (gorge-start-draw-time #t #t) (suspend) (set! (-> self state-time) (-> *display* base-frame-counter)) (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3)) (seekl! (-> self timer-pos-offset) 100 (the int (* 3.0 (-> *display* time-adjust-ratio)))) (when (= (-> self timer-pos-offset) 100) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable) (send-event (ppointer->process (-> *hud-parts* money)) 'enable) ) (gorge-start-draw-time #t #f) (suspend) (if (gorge-in-front self) (go gorge-start-ready) ) ) (go gorge-start-idle) (none) ) ) ;; failed to figure out what this is: (defstate gorge-start-race-aborted (gorge-start) :trans (behavior () (gorge-trans) (none) ) :code (behavior () (set! (-> self state-time) (-> *display* base-frame-counter)) (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3)) (seekl! (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio)))) (when (= (-> self timer-pos-offset) 100) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable) (send-event (ppointer->process (-> *hud-parts* money)) 'enable) ) (when (< (mod (-> *display* real-frame-counter) 90) 60) (let ((gp-0 (new 'stack 'font-context *font-default-matrix* 156 80 0.0 (font-color orange-red) (font-flags shadow kerning) ) ) ) (let ((v1-20 gp-0)) (set! (-> v1-20 width) (the float 200)) ) (let ((v1-21 gp-0)) (set! (-> v1-21 height) (the float 50)) ) (set! (-> gp-0 flags) (font-flags shadow kerning middle left large)) (print-game-text (lookup-text! *common-text* (game-text-id rolling-race-start-race-aborted) #f) gp-0 #f 128 22 ) ) ) (suspend) (if (gorge-in-front self) (go gorge-start-ready) ) ) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable) (send-event (ppointer->process (-> *hud-parts* money)) 'enable) (go gorge-start-idle) (none) ) ) ;; failed to figure out what this is: (defstate gorge-start-racing (gorge-start) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('finished) (go gorge-start-race-finished) ) (('aborted) (go gorge-start-race-aborted) ) ) ) :enter (behavior () (send-event (handle->process (-> self start-banner)) 'break) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'disable) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'hide) (send-event (ppointer->process (-> *hud-parts* money)) 'disable) (send-event (ppointer->process (-> *hud-parts* money)) 'hide) (race-time-read (-> self record-time) 1 (-> self tasks) (seconds 45)) (let ((gp-0 (get-process *default-dead-pool* rolling-start #x4000))) (set! (-> self end-banner) (ppointer->handle (when gp-0 (let ((t9-7 (method-of-type rolling-start activate))) (t9-7 (the-as rolling-start gp-0) self 'rolling-start (the-as pointer #x70004000)) ) (run-now-in-process gp-0 rolling-start-init-by-other (new 'static 'vector :x -86016.0 :y 112640.0 :z -6309888.0) 16384.0 ) (-> gp-0 ppointer) ) ) ) ) (let ((gp-1 (get-process *default-dead-pool* gorge-finish #x4000))) (when gp-1 (let ((t9-10 (method-of-type gorge-finish activate))) (t9-10 (the-as gorge-finish gp-1) self 'gorge-finish (the-as pointer #x70004000)) ) (run-now-in-process gp-1 gorge-finish-init-by-other (new 'static 'vector :x -86016.0 :y 114688.0 :z -6303744.0) (new 'static 'vector :x -1.0) 57344.0 ) (-> gp-1 ppointer) ) ) (let ((gp-2 (get-process *default-dead-pool* gorge-abort #x4000))) (when gp-2 (let ((t9-13 (method-of-type gorge-abort activate))) (t9-13 (the-as gorge-abort gp-2) self 'gorge-abort (the-as pointer #x70004000)) ) (run-now-in-process gp-2 gorge-abort-init-by-other (new 'static 'vector :x -696320.0 :y 122880.0 :z -6828032.0) (new 'static 'vector :x -0.707 :y 0.707) 163840.0 ) (-> gp-2 ppointer) ) ) (let ((gp-3 (get-process *default-dead-pool* gorge-abort #x4000))) (when gp-3 (let ((t9-16 (method-of-type gorge-abort activate))) (t9-16 (the-as gorge-abort gp-3) self 'gorge-abort (the-as pointer #x70004000)) ) (run-now-in-process gp-3 gorge-abort-init-by-other (new 'static 'vector :x -847872.0 :y 143360.0 :z -6828032.0) (new 'static 'vector :x 0.707 :y 0.707) 163840.0 ) (-> gp-3 ppointer) ) ) (let ((gp-4 (get-process *default-dead-pool* gorge-abort #x4000))) (when gp-4 (let ((t9-19 (method-of-type gorge-abort activate))) (t9-19 (the-as gorge-abort gp-4) self 'gorge-abort (the-as pointer #x70004000)) ) (run-now-in-process gp-4 gorge-abort-init-by-other (new 'static 'vector :x -417792.0 :y 143360.0 :z -6004736.0) (new 'static 'vector :x -0.5 :y 0.707 :z 0.3) 266240.0 ) (-> gp-4 ppointer) ) ) (let ((gp-5 (get-process *default-dead-pool* gorge-abort #x4000))) (when gp-5 (let ((t9-22 (method-of-type gorge-abort activate))) (t9-22 (the-as gorge-abort gp-5) self 'gorge-abort (the-as pointer #x70004000)) ) (run-now-in-process gp-5 gorge-abort-init-by-other (new 'static 'vector :x -647168.0 :y 143360.0 :z -6025216.0) (new 'static 'vector :x 0.5 :y 0.707 :z -0.3) 163840.0 ) (-> gp-5 ppointer) ) ) (sleep (-> self ticker) (seconds 6000)) (set-setting! *setting-control* self 'sound-flava #f 40.0 42) (none) ) :exit (behavior () (let* ((v1-0 (-> self child)) (gp-0 (-> v1-0 0 brother)) ) (while v1-0 (if (not (or (= v1-0 (-> self start-banner process)) (= v1-0 (-> self end-banner process)))) (deactivate (-> v1-0 0)) ) (set! v1-0 gp-0) (set! gp-0 (-> v1-0 0 brother)) ) ) (send-event (handle->process (-> self end-banner)) 'break-and-die) (send-event (handle->process (-> self start-banner)) 'unbreak) (clear-pending-settings-from-process *setting-control* self 'sound-flava) (none) ) :trans (the-as (function none :behavior gorge-start) gorge-trans) :code (behavior () (set! (-> self state-time) (-> *display* game-frame-counter)) (while #t (seconds->race-time (-> self this-time) (- (-> *display* game-frame-counter) (-> self state-time))) (seekl! (-> self timer-pos-offset) 0 (the int (* 5.0 (-> *display* time-adjust-ratio)))) (completed? (-> self ticker)) (gorge-start-draw-time #f #f) (suspend) (if (or (not *target*) (gorge-in-front self)) (go gorge-start-ready) ) ) (none) ) ) ;; failed to figure out what this is: (defstate gorge-start-ready (gorge-start) :trans (the-as (function none :behavior gorge-start) gorge-trans) :code (behavior () (while #t (suspend) (seekl! (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio)))) (when (= (-> self timer-pos-offset) 100) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable) (send-event (ppointer->process (-> *hud-parts* money)) 'enable) ) (gorge-start-draw-time #f #f) (cond ((gorge-in-front self) ) ((gorge-behind self) (go gorge-start-racing) ) (else (go gorge-start-idle) ) ) ) (none) ) ) ;; failed to figure out what this is: (defstate gorge-start-idle (gorge-start) :enter (behavior () (logior! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #f) (none) ) :exit (behavior () (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) (none) ) :trans (behavior () (gorge-start-launch-start-banner) (gorge-trans) (none) ) :code (behavior () (while #t (suspend) (seekl! (-> self timer-pos-offset) 100 (the int (* 5.0 (-> *display* time-adjust-ratio)))) (when (= (-> self timer-pos-offset) 100) (send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'enable) (send-event (ppointer->process (-> *hud-parts* money)) 'enable) ) (if (gorge-in-front self) (go gorge-start-ready) ) ) (none) ) ) ;; definition for method 11 of type gorge-start ;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defmethod init-from-entity! gorge-start ((obj gorge-start) (arg0 entity-actor)) (set! (-> obj root-override) (the-as collide-shape-moving (new 'process 'trsqv))) (process-drawable-from-entity! obj arg0) (let ((a0-3 (new 'stack-no-clear 'vector))) (set! (-> a0-3 quad) (-> obj root-override trans quad)) (set! (-> a0-3 y) (+ -8192.0 (-> a0-3 y))) (gorge-init a0-3 (new 'static 'vector :z 1.0) 102400.0 40960.0) ) (set! (-> obj tasks) (get-task-control (-> obj entity extra perm task))) (set! (-> obj start-banner) (the-as handle #f)) (set! (-> obj end-banner) (the-as handle #f)) (set! (-> obj timer-pos-offset) 100) (go gorge-start-idle) (none) ) ;; definition of type rolling-water (deftype rolling-water (water-anim) () :heap-base #x70 :method-count-assert 30 :size-assert #xdc :flag-assert #x1e007000dc ) ;; definition for method 3 of type rolling-water (defmethod inspect rolling-water ((obj rolling-water)) (let ((t9-0 (method-of-type water-anim inspect))) (t9-0 obj) ) obj ) ;; definition for symbol ripple-for-rolling-water, type object (define ripple-for-rolling-water (the-as object (new 'static 'ripple-wave-set :count 3 :converted #f :normal-scale 1.0 :wave (new 'static 'inline-array ripple-wave 4 (new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5) (new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5) (new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75) (new 'static 'ripple-wave) ) ) ) ) ;; definition for method 22 of type rolling-water ;; INFO: Return type mismatch uint vs none. (defmethod TODO-RENAME-22 rolling-water ((obj rolling-water)) (let ((t9-0 (method-of-type water-anim TODO-RENAME-22))) (t9-0 obj) ) (let ((v1-2 (new 'process 'ripple-control))) (set! (-> obj draw ripple) v1-2) (set-vector! (-> obj draw color-mult) 0.01 0.45 0.5 0.75) (set! (-> v1-2 global-scale) 3072.0) (set! (-> v1-2 close-fade-dist) 163840.0) (set! (-> v1-2 far-fade-dist) 245760.0) (set! (-> v1-2 waveform) (the-as ripple-wave-set ripple-for-rolling-water)) ) (set! (-> obj flags) (logand -8388609 (-> obj flags))) (none) )