Files
jak-project/test/decompiler/reference/jak1/levels/beach/beach-rocks_REF.gc
T

538 lines
16 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defskelgroup *lrocklrg-sg* lrocklrg lrocklrg-lod0-jg lrocklrg-idle-ja
((lrocklrg-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 5)
:longest-edge (meters 11)
)
;; failed to figure out what this is:
(defpartgroup group-beach-rocks-start
:id 553
:duration (seconds 3)
:flags (use-local-clock)
:bounds (static-bspherem 0 0 0 64)
:parts ((sp-item 2340 :period (seconds 0.25) :length (seconds 0.035))
(sp-item 2341 :period (seconds 0.25) :length (seconds 0.035))
(sp-item 2289 :period (seconds 0.25) :length (seconds 0.035))
)
)
;; failed to figure out what this is:
(defpart 2341
:init-specs ((:texture (rockbit effects))
(:num 3.0 6.0)
(:y (meters 0) (meters -4))
(:scale-x (meters 0.25) (meters 1))
(:rot-z (degrees 0) (degrees 360))
(:scale-y (meters 0.25) (meters 1))
(:r 96.0 64.0)
(:g 96.0 64.0)
(:b 0.0 32.0)
(:a 64.0 64.0)
(:vel-y (meters 0.053333335) (meters 0.053333335))
(:scalevel-x (meters 0))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:accel-y (meters -0.0028333333) (meters -0.0021666666))
(:friction 0.97)
(:timer (seconds 5))
(:flags (bit2 bit12 bit14))
(:conerot-x (degrees 80) (degrees 200.00002))
(:conerot-y (degrees 0) (degrees 360))
(:conerot-radius (meters 0) (meters 5))
)
)
;; failed to figure out what this is:
(defpart 2340
:init-specs ((:texture (woodchip effects))
(:num 8.0 16.0)
(:y (meters 0) (meters -4))
(:scale-x (meters 0.5) (meters 1))
(:rot-z (degrees 0) (degrees 360))
(:scale-y (meters 0.5) (meters 1))
(:r 64.0 128.0)
(:g 128.0 128.0)
(:b 0.0 64.0)
(:a 64.0 64.0)
(:vel-y (meters 0.053333335) (meters 0.053333335))
(:scalevel-x (meters 0))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.08533333)
(:accel-y (meters -0.00083333335) (meters -0.0021666666))
(:friction 0.93)
(:timer (seconds 5))
(:flags (bit2 bit12 bit14))
(:conerot-x (degrees 80) (degrees 200.00002))
(:conerot-y (degrees 0) (degrees 360))
(:conerot-radius (meters 0) (meters 5))
)
)
;; failed to figure out what this is:
(defpart 2289
:init-specs ((:texture (bigpuff effects))
(:num 1.0 3.0)
(:y (meters 0) (meters -4))
(:scale-x (meters 6) (meters 2))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 192.0 64.0)
(:g 128.0 64.0)
(:b 64.0)
(:a 16.0 32.0)
(:vel-y (meters 0.053333335) (meters 0.053333335))
(:scalevel-x (meters 0.04))
(:rotvel-z (degrees -0.2) (degrees 0.4))
(:scalevel-y :copy scalevel-x)
(:fade-r -0.042666666)
(:fade-g -0.061333332)
(:fade-b -0.042666666)
(:fade-a -0.032)
(:accel-y (meters -0.0005) (meters -0.0018333334))
(:friction 0.95)
(:timer (seconds 5))
(:flags (bit2 bit12 bit14))
(:conerot-x (degrees 0) (degrees 360))
(:conerot-y (degrees 0) (degrees 360))
(:conerot-radius (meters 0) (meters 6))
)
)
;; failed to figure out what this is:
(defpartgroup group-beach-rocks-fall
:id 554
:flags (use-local-clock)
:bounds (static-bspherem 0 0 0 8)
:parts ((sp-item 2290 :period (seconds 0.05) :length (seconds 0.017)))
)
;; failed to figure out what this is:
(defpart 2290
:init-specs ((:texture (bigpuff effects))
(:num 3.0 3.0)
(:y (meters 0) (meters -4))
(:scale-x (meters 7) (meters 9))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 192.0 64.0)
(:g 128.0 64.0)
(:b 64.0)
(:a 16.0 48.0)
(:vel-y (meters 0.013333334) (meters 0.006666667))
(:scalevel-x (meters 0.026666667))
(:rotvel-z (degrees -0.2) (degrees 0.4))
(:scalevel-y :copy scalevel-x)
(:fade-r -0.10666667)
(:fade-g -0.15333334)
(:fade-b -0.10666667)
(:fade-a -0.10666667)
(:accel-y (meters -0.0005) (meters -0.0018333334))
(:friction 0.98)
(:timer (seconds 5))
(:flags (bit2 bit12 bit14))
(:conerot-x (degrees 0) (degrees 360))
(:conerot-y (degrees 0) (degrees 360))
(:conerot-radius (meters 0) (meters 2))
)
)
;; failed to figure out what this is:
(defpartgroup group-beach-rocks-land
:id 555
:duration (seconds 3)
:flags (use-local-clock)
:bounds (static-bspherem 0 0 0 64)
:parts ((sp-item 2342 :period (seconds 3) :length (seconds 0.135))
(sp-item 2343 :period (seconds 3) :length (seconds 0.135))
(sp-item 2291 :period (seconds 3) :length (seconds 0.135))
)
)
;; failed to figure out what this is:
(defpart 2343
:init-specs ((:texture (hotdot effects))
(:num 32.0)
(:y (meters -3))
(:scale-x (meters 0.4) (meters 0.3))
(:rot-z (degrees 0) (degrees 180))
(:scale-y (meters 32) (meters 10))
(:r 192.0 64.0)
(:g 128.0 64.0)
(:b 64.0)
(:a 32.0 64.0)
(:scalevel-y (meters 3.4133334))
(:fade-r -0.10666667)
(:fade-g -0.15333334)
(:fade-b -0.10666667)
(:fade-a -3.2)
(:timer (seconds 0.1))
(:flags (bit2 bit3 bit14))
)
)
;; failed to figure out what this is:
(defpart 2342
:init-specs ((:texture (woodchip effects))
(:num 64.0 64.0)
(:y (meters 0) (meters -4))
(:scale-x (meters 0.5) (meters 1))
(:rot-z (degrees 0) (degrees 360))
(:scale-y (meters 0.5) (meters 1))
(:r 128.0 64.0)
(:g 192.0 64.0)
(:b 0.0 64.0)
(:a 64.0 64.0)
(:vel-y (meters 0.10666667) (meters 0.21333334))
(:scalevel-x (meters 0))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.08533333)
(:accel-y (meters -0.00083333335) (meters -0.0021666666))
(:friction 0.95)
(:timer (seconds 5))
(:flags (bit2 bit12 bit14))
(:conerot-x (degrees 60) (degrees 20))
(:conerot-y (degrees 0) (degrees 360))
(:conerot-radius (meters 0) (meters 5))
)
)
;; failed to figure out what this is:
(defpart 2291
:init-specs ((:texture (bigpuff effects))
(:num 32.0 32.0)
(:y (meters 0) (meters -4))
(:scale-x (meters 8) (meters 8))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 192.0 64.0)
(:g 128.0 64.0)
(:b 64.0)
(:a 16.0 48.0)
(:vel-y (meters 0.10666667) (meters 0.32))
(:scalevel-x (meters 0.033333335) (meters 0.02))
(:rotvel-z (degrees -0.2) (degrees 0.4))
(:scalevel-y :copy scalevel-x)
(:fade-r -0.10666667)
(:fade-g -0.15333334)
(:fade-b -0.10666667)
(:fade-a -0.10666667)
(:accel-y (meters -0.0005) (meters -0.0018333334))
(:friction 0.85)
(:timer (seconds 5))
(:flags (bit2 bit12 bit14))
(:conerot-x (degrees 0) (degrees 100.00001))
(:conerot-y (degrees 0) (degrees 360))
(:conerot-radius (meters 0) (meters 2))
)
)
;; definition of type beach-rock
(deftype beach-rock (process-drawable)
((root collide-shape-moving :override)
(trigger basic)
(movie-start time-frame)
(part-falling sparticle-launch-control)
(part-landing sparticle-launch-control)
(prev-frame float)
)
(:state-methods
idle
loading
falling
fallen
)
)
;; definition for method 3 of type beach-rock
(defmethod inspect ((this beach-rock))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~T~Ttrigger: ~A~%" (-> this trigger))
(format #t "~T~Tmovie-start: ~D~%" (-> this movie-start))
(format #t "~T~Tpart-falling: ~A~%" (-> this part-falling))
(format #t "~T~Tpart-landing: ~A~%" (-> this part-landing))
(format #t "~T~Tprev-frame: ~f~%" (-> this prev-frame))
this
)
;; definition for method 7 of type beach-rock
(defmethod relocate ((this beach-rock) (offset int))
(if (nonzero? (-> this part-falling))
(set! (-> this part-falling) (the-as sparticle-launch-control (+ (the-as int (-> this part-falling)) offset)))
)
(if (nonzero? (-> this part-landing))
(set! (-> this part-landing) (the-as sparticle-launch-control (+ (the-as int (-> this part-landing)) offset)))
)
(call-parent-method this offset)
)
;; definition for method 10 of type beach-rock
(defmethod deactivate ((this beach-rock))
(if (nonzero? (-> this part-falling))
(kill-and-free-particles (-> this part-falling))
)
(if (nonzero? (-> this part-landing))
(kill-and-free-particles (-> this part-landing))
)
(call-parent-method this)
(none)
)
;; failed to figure out what this is:
(defstate idle (beach-rock)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('trigger)
(set! (-> self trigger) #t)
(go-virtual falling)
)
(('loading)
(go-virtual loading)
)
)
)
:code (behavior ()
(if (-> self trigger)
(go-virtual falling)
)
(ja-channel-set! 0)
(ja-post)
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend)
)
)
)
;; failed to figure out what this is:
(defstate loading (beach-rock)
:virtual #t
:event (-> (the-as state (method-of-type beach-rock idle)) event)
:code (behavior ()
(loop
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
(suspend)
)
)
)
;; failed to figure out what this is:
(defstate falling (beach-rock)
:virtual #t
:trans (behavior ()
(set! (-> self draw bounds w) 819200.0)
(let ((f30-0 (ja-aframe-num 0)))
(when (and (< -50.0 f30-0) (< f30-0 158.0))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> self root trans quad))
(spawn (-> self part) gp-0)
(+! (-> gp-0 x) 122880.0)
(+! (-> gp-0 z) 102400.0)
(spawn (-> self part) gp-0)
)
)
(if (and (< 200.0 f30-0) (< f30-0 275.0))
(spawn
(-> self part-falling)
(vector<-cspace! (new 'stack-no-clear 'vector) (joint-node lrocklrg-lod0-jg Lrocklrg))
)
)
(if (and (< 270.0 f30-0) (< f30-0 333.0))
(spawn
(-> self part-falling)
(vector<-cspace! (new 'stack-no-clear 'vector) (joint-node lrocklrg-lod0-jg platformrock))
)
)
(if (and (< (-> self prev-frame) 333.0) (>= f30-0 333.0))
(spawn
(-> self part-landing)
(vector<-cspace! (new 'stack-no-clear 'vector) (joint-node lrocklrg-lod0-jg platformrock))
)
)
(if (and (< 169.0 f30-0) (< f30-0 202.0))
(spawn
(-> self part-falling)
(vector<-cspace! (new 'stack-no-clear 'vector) (joint-node lrocklrg-lod0-jg Rrocklrg))
)
)
(if (and (< 240.0 f30-0) (< f30-0 270.0))
(spawn
(-> self part-falling)
(vector<-cspace! (new 'stack-no-clear 'vector) (joint-node lrocklrg-lod0-jg smlrock))
)
)
(set! (-> self prev-frame) f30-0)
)
)
:code (behavior ()
(local-vars (v1-3 symbol) (v1-49 symbol))
(until v1-3
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
(suspend)
(set! v1-3 (or (not *target*) (process-grab? *target*)))
)
(logclear! (-> self draw status) (draw-status hidden))
(ja-channel-set! 1)
(ja :group! lrocklrg-idle-ja :num! min)
(let ((gp-2 (ppointer->handle (process-spawn othercam self 7 #f #t :to self)))
(s5-1 (ppointer->handle (process-spawn
fuel-cell
:init fuel-cell-init-as-clone
(process->handle self)
(-> self entity extra perm task)
:to self
)
)
)
)
(close-specific-task! (-> self entity extra perm task) (task-status need-reminder))
(set-time! (-> self movie-start))
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
(ja-play-spooled-anim
(new 'static 'spool-anim
:name "lrocklrg-falling"
:index 4
:parts 4
:command-list '((-150 blackout 100) (-116 blackout 0))
)
(the-as art-joint-anim lrocklrg-idle-ja)
(the-as art-joint-anim lrocklrg-fallen-ja)
(the-as (function process-drawable symbol) false-func)
)
(process-entity-status! self (entity-perm-status complete) #t)
(cond
((handle->process gp-2)
(deactivate (-> gp-2 process 0))
)
(else
)
)
(let ((a0-28 (handle->process s5-1)))
(if a0-28
(send-event a0-28 'stop-cloning)
)
)
)
(until v1-49
(suspend)
(set! v1-49 (or (not *target*) (process-release? *target*)))
)
(set! (-> self draw bounds w) 20480.0)
(go-virtual fallen)
)
:post transform-post
)
;; failed to figure out what this is:
(defstate fallen (beach-rock)
:virtual #t
:code (behavior ()
(level-hint-spawn
(text-id beach-seagulls-avalanche)
"sksp0025"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(ja :group! lrocklrg-fallen-ja)
(compute-alignment! (-> self align))
(let ((v1-6 (first-transform (-> self align))))
(set! (-> self root trans quad) (-> self entity extra trans quad))
(+! (-> self root trans y) (-> v1-6 trans y))
)
(suspend)
(update-transforms! (-> self root))
(logior! (-> self mask) (process-mask sleep))
(suspend)
0
)
:post ja-post
)
;; definition for method 11 of type beach-rock
;; INFO: Return type mismatch object vs none.
(defmethod init-from-entity! ((this beach-rock) (arg0 entity-actor))
(set! (-> this link) (new 'process 'actor-link-info this))
(set! (-> this align) (new 'process 'align-control this))
(set! (-> this trigger) #f)
(logclear! (-> this mask) (process-mask actor-pause))
(set! (-> this part) (create-launch-control group-beach-rocks-start this))
(set! (-> this part-falling) (create-launch-control group-beach-rocks-fall this))
(set! (-> this part-landing) (create-launch-control group-beach-rocks-land this))
(set! (-> this prev-frame) -1000.0)
(set! (-> this draw origin-joint-index) (the-as uint 4))
(case (get-task-status (-> this entity extra perm task))
(((task-status invalid))
(go (method-of-object this fallen))
)
(((task-status need-resolution))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(ja-post)
(vector<-cspace! s5-0 (-> this node-list data 8))
(birth-pickup-at-point
s5-0
(pickup-type fuel-cell)
(the float (the-as int (-> this entity extra perm task)))
#f
this
(the-as fact-info #f)
)
)
(go (method-of-object this fallen))
)
(else
(go (method-of-object this idle))
)
)
(none)
)
;; definition of type lrocklrg
(deftype lrocklrg (beach-rock)
()
)
;; definition for method 3 of type lrocklrg
(defmethod inspect ((this lrocklrg))
(let ((t9-0 (method-of-type beach-rock inspect)))
(t9-0 this)
)
this
)
;; definition for method 11 of type lrocklrg
(defmethod init-from-entity! ((this lrocklrg) (arg0 entity-actor))
(stack-size-set! (-> this main-thread) 512)
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
)
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s3-0 prim-core collide-as) (collide-kind background))
(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! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 24576.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! (-> this root) s4-0)
)
(process-drawable-from-entity! this arg0)
(initialize-skeleton this *lrocklrg-sg* '())
((method-of-type beach-rock init-from-entity!) this arg0)
(none)
)