jak-project/test/decompiler/reference/levels/jungle/fisher-JUN_REF.gc
ManDude c245f37feb
[decomp] joint and related (#1003)
* update jak 2 config and hack to make game text dumpable

* update stuff

* update src

* do `cspace<-parented-transformq-joint!`

* progress.... kind of...

* more drawable stuff

* clagng

* bones begin

* more bones

* even more bones

* everything builds

* touches

* errors

* ?

* fix `quicksandlurker`

* updates

* update refs

* more fixes

* update refs
2021-12-26 11:43:16 -05:00

2496 lines
100 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type fisher-bank
(deftype fisher-bank (basic)
((width meters :offset-assert 4)
(net-radius meters :offset-assert 8)
(max-caught int32 :offset-assert 12)
(max-missed int32 :offset-assert 16)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
;; definition for method 3 of type fisher-bank
(defmethod inspect fisher-bank ((obj fisher-bank))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Twidth: (meters ~m)~%" (-> obj width))
(format #t "~Tnet-radius: (meters ~m)~%" (-> obj net-radius))
(format #t "~Tmax-caught: ~D~%" (-> obj max-caught))
(format #t "~Tmax-missed: ~D~%" (-> obj max-missed))
obj
)
;; definition for symbol *FISHER-bank*, type fisher-bank
(define
*FISHER-bank*
(new 'static 'fisher-bank :width (meters 3.3) :net-radius (meters 0.7) :max-caught #xc8 :max-missed 20)
)
;; failed to figure out what this is:
(set! (-> *part-group-id-table* 177)
(new 'static 'sparticle-launch-group
:length 2
:duration #x5
:linger-duration #x1c2
:flags (sp-group-flag use-local-clock)
:name "group-bad-fish"
:launcher
(new 'static 'inline-array sparticle-group-item 2 (sp-item 828) (sp-item 2013))
:bounds (new 'static 'sphere :w 8192.0)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 828) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 17
(sp-tex spt-texture (new 'static 'texture-id :page #x2))
(sp-rnd-flt spt-num 0.5 0.5 1.0)
(sp-flt spt-y (meters 0.2))
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.5) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 128.0 1.0)
(sp-rnd-flt spt-b 128.0 128.0 1.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-vel-x (meters -0.0033333334) (meters 0.006666667) 1.0)
(sp-flt spt-scalevel-x (meters 0.0033333334))
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a 0.53333336)
(sp-int spt-timer 600)
(sp-cpuinfo-flags bit2 bit14)
(sp-int-plain-rnd spt-next-time 10 53 1)
(sp-launcher-by-id spt-next-launcher 829)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 829)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.21333334) (sp-end))
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2013) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 15
(sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
(sp-rnd-flt spt-num 0.1 1.0 1.0)
(sp-rnd-flt spt-x (meters -0.7) (meters 0.5) 1.0)
(sp-rnd-flt spt-z -409.6 819.2 1.0)
(sp-rnd-flt spt-scale-x (meters 0.05) (meters 0.1) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
(sp-flt spt-b 255.0)
(sp-rnd-flt spt-a 32.0 32.0 1.0)
(sp-flt spt-fade-a -0.42666668)
(sp-flt spt-accel-y 1.3653333)
(sp-int spt-timer 150)
(sp-cpuinfo-flags bit2 bit3 bit14)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-group-id-table* 178) (new 'static 'sparticle-launch-group
:length 1
:duration #x5
:linger-duration #x1c2
:flags (sp-group-flag use-local-clock)
:name "group-normal-fish"
:launcher
(new 'static 'inline-array sparticle-group-item 1 (sp-item 2001))
:bounds (new 'static 'sphere :w 8192.0)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2001) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 15
(sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
(sp-rnd-flt spt-num 0.1 1.0 1.0)
(sp-rnd-flt spt-x (meters -0.4) (meters 0.5) 1.0)
(sp-rnd-flt spt-z -1024.0 2048.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.05) (meters 0.1) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-r 255.0)
(sp-flt spt-g 255.0)
(sp-flt spt-b 255.0)
(sp-rnd-flt spt-a 32.0 32.0 1.0)
(sp-flt spt-fade-a -0.42666668)
(sp-flt spt-accel-y 1.3653333)
(sp-int spt-timer 150)
(sp-cpuinfo-flags bit2 bit3 bit14)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-group-id-table* 179)
(new 'static 'sparticle-launch-group
:length 2
:duration #x5
:linger-duration #x4b0
:flags (sp-group-flag use-local-clock)
:name "group-fish-collect"
:launcher
(new 'static 'inline-array sparticle-group-item 2 (sp-item 830) (sp-item 831))
:bounds (new 'static 'sphere :w 32768.0)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 831) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 11
(sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
(sp-flt spt-num 2.0)
(sp-rnd-flt spt-scale-x (meters 5.0) (meters 1.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 32.0 64.0 1.0)
(sp-rnd-flt spt-g 128.0 128.0 1.0)
(sp-flt spt-a 16.0)
(sp-flt spt-fade-a -1.6)
(sp-int spt-timer 25)
(sp-cpuinfo-flags bit2 bit3)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 830) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
(sp-flt spt-num 16.0)
(sp-rnd-flt spt-scale-x (meters 2.0) (meters 2.0) 1.0)
(sp-int spt-rot-x 4)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-rnd-flt spt-scale-y (meters 0.25) (meters 0.5) 1.0)
(sp-rnd-flt spt-r 32.0 64.0 1.0)
(sp-rnd-flt spt-g 128.0 128.0 1.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 0.0)
(sp-flt spt-scalevel-x (meters 0.009765625))
(sp-rnd-flt spt-rotvel-z (degrees -0.3) (degrees 0.6) 1.0)
(sp-flt spt-scalevel-y (meters 0.009765625))
(sp-flt spt-fade-a 1.2)
(sp-int spt-timer 150)
(sp-cpuinfo-flags bit2 bit3)
(sp-func spt-func 'sparticle-track-root)
(sp-int-plain-rnd spt-next-time 10 9 1)
(sp-launcher-by-id spt-next-launcher 832)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 832)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.8) (sp-end))
)
)
;; definition of type fisher-params
(deftype fisher-params (structure)
((timeout seconds :offset-assert 0)
(vel float :offset-assert 8)
(swing-min seconds :offset-assert 16)
(swing-max seconds :offset-assert 24)
(period seconds :offset-assert 32)
(fish-vel float :offset-assert 40)
(bad-percent float :offset-assert 44)
(deadly-percent float :offset-assert 48)
(powerup-percent float :offset-assert 52)
)
:allow-misaligned :method-count-assert 9
:size-assert #x38
:flag-assert #x900000038
)
;; definition for method 3 of type fisher-params
(defmethod inspect fisher-params ((obj fisher-params))
(format #t "[~8x] ~A~%" obj 'fisher-params)
(format #t "~Ttimeout: ~D~%" (-> obj timeout))
(format #t "~Tvel: ~f~%" (-> obj vel))
(format #t "~Tswing-min: ~D~%" (-> obj swing-min))
(format #t "~Tswing-max: ~D~%" (-> obj swing-max))
(format #t "~Tperiod: ~D~%" (-> obj period))
(format #t "~Tfish-vel: ~f~%" (-> obj fish-vel))
(format #t "~Tbad-percent: ~f~%" (-> obj bad-percent))
(format #t "~Tdeadly-percent: ~f~%" (-> obj deadly-percent))
(format #t "~Tpowerup-percent: ~f~%" (-> obj powerup-percent))
obj
)
;; definition for symbol *fisher-params*, type (array (inline-array fisher-params))
(define *fisher-params* (new
'static
'boxed-array
:type (inline-array fisher-params) :length 6 :allocated-length 6
(new 'static 'inline-array fisher-params 16
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 0.5)
:vel 0.6
:swing-max (seconds 0.1)
:period (seconds 0.5)
:fish-vel 1.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 10)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.6)
:fish-vel 1.5
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 8)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.6)
:fish-vel 1.6
:bad-percent 0.5
:powerup-percent 0.25
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 15)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.45)
:fish-vel 1.7
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 15)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.4)
:fish-vel 1.8
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 15)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.5)
:fish-vel 1.9
:bad-percent 0.9
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2000)
:vel 0.8
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.35)
:fish-vel 2.0
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params)
)
(new 'static 'inline-array fisher-params 16
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 1)
:vel 0.6
:swing-max (seconds 0.1)
:period (seconds 0.5)
:fish-vel 1.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 11)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.7)
:fish-vel 1.4
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 9)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.7)
:fish-vel 1.5
:bad-percent 0.4
:powerup-percent 0.25
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 18)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period #x9e
:fish-vel 1.6
:bad-percent 0.083
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 18)
:vel 2.41
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.48)
:fish-vel 1.7
:bad-percent 0.083
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 14)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.58)
:fish-vel 1.8
:bad-percent 0.8
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2000)
:vel 0.8
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.43)
:fish-vel 1.8
:bad-percent 0.083
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params)
)
(new 'static 'inline-array fisher-params 16
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 1.5)
:vel 0.6
:swing-max (seconds 0.1)
:period (seconds 0.5)
:fish-vel 1.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 12)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.8)
:fish-vel 1.4
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 10)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.8)
:fish-vel 1.5
:bad-percent 0.3
:powerup-percent 0.25
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 21)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.61)
:fish-vel 1.5
:bad-percent 0.066
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 21)
:vel 1.83
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period #xa8
:fish-vel 1.6
:bad-percent 0.066
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 14)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.66)
:fish-vel 1.6
:bad-percent 0.6
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2000)
:vel 0.8
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.5133333)
:fish-vel 1.7
:bad-percent 0.066
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params)
)
(new 'static 'inline-array fisher-params 16
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2)
:vel 0.6
:swing-max (seconds 0.1)
:period (seconds 0.5)
:fish-vel 1.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 13)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.9)
:fish-vel 1.3
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 11)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.9)
:fish-vel 1.4
:bad-percent 0.2
:powerup-percent 0.25
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 23)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.7)
:fish-vel 1.4
:bad-percent 0.05
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 23)
:vel 1.25
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.65)
:fish-vel 1.5
:bad-percent 0.05
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 13)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.75)
:fish-vel 1.5
:bad-percent 0.5
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2000)
:vel 0.8
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.6)
:fish-vel 1.6
:bad-percent 0.05
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params)
)
(new 'static 'inline-array fisher-params 26
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2.5)
:vel 0.6
:swing-max (seconds 0.1)
:period (seconds 0.5)
:fish-vel 1.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 13)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.9)
:fish-vel 1.3
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 11)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.9)
:fish-vel 1.3
:bad-percent 0.2
:powerup-percent 0.25
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:swing-max (seconds 0.33333334)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:swing-max (seconds 0.33333334)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 11)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.9)
:fish-vel 1.3
:bad-percent 0.05
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:swing-max (seconds 0.33333334)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-min (seconds 333.33)
:swing-max (seconds 0.33333334)
:period (seconds 0.5)
:fish-vel 1.3
:powerup-percent 0.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 2000)
:vel 0.7
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.9)
:fish-vel 1.3
:bad-percent 0.05
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params)
)
(new 'static 'inline-array fisher-params 22
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 3)
:vel 0.6
:swing-max (seconds 0.1)
:period (seconds 0.5)
:fish-vel 1.5
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 10)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.6)
:fish-vel 2.0
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 5)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.6)
:fish-vel 2.0
:bad-percent 0.75
:powerup-percent 0.25
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 15)
:vel 0.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.3)
:fish-vel 2.0
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 15)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.4)
:fish-vel 2.0
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 15)
:vel 3.0
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.4)
:fish-vel 2.0
:bad-percent 0.9
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 30)
:vel 1.4
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.25)
:fish-vel 2.0
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 30)
:vel 1.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.15)
:fish-vel 2.2
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 30)
:vel 1.4
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.25)
:fish-vel 2.0
:bad-percent 0.2
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params
:timeout (seconds 31535998.0)
:vel 1.6
:swing-min (seconds 0.5)
:swing-max (seconds 2)
:period (seconds 0.15)
:fish-vel 2.2
:bad-percent 0.1
:powerup-percent 0.1
)
(new 'static 'fisher-params :timeout (seconds 2))
(new 'static 'fisher-params)
)
)
)
;; definition of type fisher
(deftype fisher (process-taskable)
((paddle-end vector 2 :inline :offset-assert 384)
(paddle-pos vector :inline :offset-assert 416)
(paddle float :offset-assert 432)
(paddle-vel float :offset-assert 436)
(spawner float :offset-assert 440)
(spawner-last float :offset-assert 444)
(spawn-time int64 :offset-assert 448)
(turn-time int64 :offset-assert 456)
(swing-time int64 :offset-assert 464)
(block-time int64 :offset-assert 472)
(block int32 :offset-assert 480)
(caught int32 :offset-assert 484)
(missed int32 :offset-assert 488)
(difficulty int32 :offset-assert 492)
(start-time int64 :offset-assert 496)
(ambient-big-one int64 :offset-assert 504)
(ambient-steady int64 :offset-assert 512)
(ambient-sagging int64 :offset-assert 520)
(ambient-almost int64 :offset-assert 528)
(cheat-temp int32 :offset-assert 536)
(hard symbol :offset-assert 540)
(training symbol :offset-assert 544)
(params fisher-params :inline :offset-assert 552)
)
:heap-base #x1f0
:method-count-assert 53
:size-assert #x260
:flag-assert #x3501f00260
)
;; definition for method 3 of type fisher
(defmethod inspect fisher ((obj fisher))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
(format #t "~T~Tpaddle-end[2] @ #x~X~%" (-> obj paddle-end))
(format #t "~T~Tpaddle-pos: ~`vector`P~%" (-> obj paddle-pos))
(format #t "~T~Tpaddle: ~f~%" (-> obj paddle))
(format #t "~T~Tpaddle-vel: ~f~%" (-> obj paddle-vel))
(format #t "~T~Tspawner: ~f~%" (-> obj spawner))
(format #t "~T~Tspawner-last: ~f~%" (-> obj spawner-last))
(format #t "~T~Tspawn-time: ~D~%" (-> obj spawn-time))
(format #t "~T~Tturn-time: ~D~%" (-> obj turn-time))
(format #t "~T~Tswing-time: ~D~%" (-> obj swing-time))
(format #t "~T~Tblock-time: ~D~%" (-> obj block-time))
(format #t "~T~Tblock: ~D~%" (-> obj block))
(format #t "~T~Tcaught: ~D~%" (-> obj caught))
(format #t "~T~Tmissed: ~D~%" (-> obj missed))
(format #t "~T~Tdifficulty: ~D~%" (-> obj difficulty))
(format #t "~T~Tstart-time: ~D~%" (-> obj start-time))
(format #t "~T~Tambient-big-one: ~D~%" (-> obj ambient-big-one))
(format #t "~T~Tambient-steady: ~D~%" (-> obj ambient-steady))
(format #t "~T~Tambient-sagging: ~D~%" (-> obj ambient-sagging))
(format #t "~T~Tambient-almost: ~D~%" (-> obj ambient-almost))
(format #t "~T~Tcheat-temp: ~D~%" (-> obj cheat-temp))
(format #t "~T~Thard: ~A~%" (-> obj hard))
(format #t "~T~Ttraining: ~A~%" (-> obj training))
(format #t "~T~Tparams: #<fisher-params @ #x~X>~%" (-> obj params))
obj
)
;; definition of type fisher-fish
(deftype fisher-fish (process-drawable)
((dir vector :inline :offset-assert 176)
(offset float :offset-assert 192)
(pos float :offset-assert 196)
(vel float :offset-assert 200)
(mode basic :offset-assert 204)
(size meters :offset-assert 208)
)
:heap-base #x70
:method-count-assert 20
:size-assert #xd4
:flag-assert #x14007000d4
)
;; definition for method 3 of type fisher-fish
(defmethod inspect fisher-fish ((obj fisher-fish))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tdir: #<vector @ #x~X>~%" (-> obj dir))
(format #t "~T~Toffset: ~f~%" (-> obj offset))
(format #t "~T~Tpos: ~f~%" (-> obj pos))
(format #t "~T~Tvel: ~f~%" (-> obj vel))
(format #t "~T~Tmode: ~A~%" (-> obj mode))
(format #t "~T~Tsize: (meters ~m)~%" (-> obj size))
obj
)
;; failed to figure out what this is:
(defskelgroup *catch-fisha-sg* catch-fisha
0
2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 4)
:longest-edge (meters 0)
)
;; failed to figure out what this is:
(defskelgroup *catch-fishb-sg* catch-fishb
0
2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 4)
:longest-edge (meters 0)
)
;; failed to figure out what this is:
(defskelgroup *catch-fishc-sg* catch-fishc
0
2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 4)
:longest-edge (meters 0)
)
;; failed to figure out what this is:
(defskelgroup *fish-net-sg* fish-net
0
2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 4)
:longest-edge (meters 0)
)
;; failed to figure out what this is:
(defskelgroup *fisher-sg* fisher
0
6
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
:bounds (static-spherem 0 -6 0 14)
:longest-edge (meters 0)
:shadow 4
)
;; definition for method 52 of type fisher
;; INFO: Return type mismatch int vs none.
(defmethod dummy-52 fisher ((obj fisher))
(let ((v1-1 (-> obj draw shadow-ctrl)))
(when v1-1
(let ((f0-0 (-> obj root-override trans y)))
(let ((a0-2 v1-1))
(set! (-> a0-2 settings bot-plane w) (- (+ -1024.0 f0-0)))
)
0
(let ((a0-4 v1-1))
(set! (-> a0-4 settings top-plane w) (- (+ 4096.0 f0-0)))
)
)
0
(set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags)))
)
)
(none)
)
;; definition for method 48 of type fisher
(defmethod draw-npc-shadow fisher ((obj fisher))
(-> obj draw shadow-ctrl)
(cond
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
(let ((v1-9 (-> obj draw shadow-ctrl)))
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
)
0
(dummy-14 (-> obj draw shadow-ctrl))
)
(else
(let ((v1-14 (-> obj draw shadow-ctrl)))
(logior! (-> v1-14 settings flags) 32)
)
0
)
)
(none)
)
;; definition for function fisher-fish-water
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior fisher-fish-water fisher-fish ((arg0 vector) (arg1 float))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> arg0 quad))
(set! (-> gp-0 y) (ocean-get-height gp-0))
(set! (-> *part-id-table* 118 init-specs 4 initial-valuef) (+ 24576.0 arg1))
(set! (-> *part-id-table* 118 init-specs 19 initial-valuef) (+ 49152.0 arg1))
(set! (-> *part-id-table* 118 init-specs 1 initial-valuef) 0.05)
(set! (-> *part-id-table* 118 init-specs 2 initial-valuef) 0.0)
(set! (-> *part-id-table* 118 init-specs 13 initial-valuef) 0.35555556)
(sp-launch-particles-var
*sp-particle-system-3d*
(-> *part-id-table* 118)
gp-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
0
(none)
)
;; definition for function fisher-fish-move
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior fisher-fish-move fisher-fish ()
(+! (-> self pos) (* (-> self vel) (-> *display* seconds-per-frame)))
(eval-path-curve-div! (-> (the-as fisher (-> self parent 0)) path) (-> self root trans) (-> self pos) 'interp)
(TODO-RENAME-12 (-> (the-as fisher (-> self parent 0)) path) (-> self dir) (-> self pos))
(seek-toward-heading-vec! (-> self root) (-> self dir) 291271.12 60)
(let ((f30-1 (+ 16384.0 (y-angle (-> self root))))
(gp-0 (new-stack-vector0))
)
(set! (-> gp-0 x) (sin f30-1))
(set! (-> gp-0 y) 0.0)
(set! (-> gp-0 z) (cos f30-1))
(set! (-> gp-0 w) 1.0)
(vector-normalize! gp-0 (* 2.0 (+ -0.5 (-> self offset)) (-> *FISHER-bank* width)))
(vector+! (-> self root trans) (-> self root trans) gp-0)
)
(fisher-fish-water (-> self root trans) (y-angle (-> self root)))
(if (nonzero? (-> self part))
(spawn (-> self part) (-> self root trans))
)
0
(none)
)
;; failed to figure out what this is:
(defstate fisher-fish-fall (fisher-fish)
:code
(behavior ()
(set-heading-vec!
(-> self root)
(TODO-RENAME-12 (-> (the-as fisher (-> self parent 0)) path) (-> self dir) (-> self pos))
)
(while #t
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set! (-> a0-2 param 0) (the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(fisher-fish-move)
(if (< (vector-vector-xz-distance (-> self root trans) (-> (the-as fisher (-> self parent 0)) paddle-pos))
(+ (-> *FISHER-bank* net-radius) (* (-> self size) (-> self root scale x)))
)
(go fisher-fish-caught)
)
(if (or
(>= (-> self pos) (the float (+ (-> (the-as fisher (-> self parent 0)) path curve num-cverts) -1)))
(>= (-> self pos) 7.2)
)
(go fisher-fish-die)
)
(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!)
)
)
)
(none)
)
:post
(the-as (function none :behavior fisher-fish) ja-post)
)
;; failed to figure out what this is:
(defstate fisher-fish-caught (fisher-fish)
:code
(behavior ()
(case (-> self mode)
(('deadly 'bad)
(sound-play-by-name (static-sound-name "caught-eel") (new-sound-id) 1024 0 0 1 #t)
(ambient-hint-spawn "sksp0a42" (-> self root trans) *entity-pool* 'ambient)
(send-event (ppointer->process (-> self parent)) 'deadly)
)
(('powerup)
(let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-1
(let ((t9-5 (method-of-type part-tracker activate)))
(t9-5 (the-as part-tracker gp-1) *entity-pool* 'part-tracker (the-as pointer #x70004000))
)
(run-now-in-process gp-1 part-tracker-init (-> *part-group-id-table* 179) -1 #f #f #f (-> self root trans))
(-> gp-1 ppointer)
)
)
(sound-play-by-name (static-sound-name "get-big-fish") (new-sound-id) 1024 0 0 1 #t)
(send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 5)
)
(else
(let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-3
(let ((t9-11 (method-of-type part-tracker activate)))
(t9-11 (the-as part-tracker gp-3) *entity-pool* 'part-tracker (the-as pointer #x70004000))
)
(run-now-in-process gp-3 part-tracker-init (-> *part-group-id-table* 179) -1 #f #f #f (-> self root trans))
(-> gp-3 ppointer)
)
)
(sound-play-by-name (static-sound-name "get-small-fish") (new-sound-id) 1024 0 0 1 #t)
(send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 1)
)
)
(set! (-> self vel) (* 0.25 (-> self vel)))
(while (< 0.1 (-> self root scale x))
(set! (-> self offset) (-> (the-as fisher (-> self parent 0)) paddle))
(fisher-fish-move)
(vector-float*! (-> self root scale) (-> self root scale) 0.93)
(ja-post)
(suspend)
(let ((a0-22 (-> self skel root-channel 0)))
(set! (-> a0-22 param 0) 1.0)
(joint-control-channel-group-eval! a0-22 (the-as art-joint-anim #f) num-func-loop!)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate fisher-fish-die (fisher-fish)
:code
(behavior ()
(case (-> self mode)
(('deadly 'bad)
)
(('powerup)
(level-hint-spawn
(game-text-id sidekick-hint-fish-powerup)
"sksp0b42"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-3 (the-as number (logior #x3f800000 v1-2)))
(f0-2 (+ -1.0 (the-as float v1-3)))
)
(if (< 0.5 f0-2)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA04" #t (-> self root trans))
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA05" #t (-> self root trans))
)
)
(send-event (ppointer->process (-> self parent)) 'fisher-fish-die 5)
)
(else
(let* ((v1-21 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-22 (the-as number (logior #x3f800000 v1-21)))
(f0-5 (+ -1.0 (the-as float v1-22)))
)
(cond
((and (< 0.8333 f0-5) (< (-> (the-as fisher (-> self parent 0)) paddle-pos z) (-> self root trans z)))
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA01" #t (-> self root trans))
)
((< 0.8333 f0-5)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA02" #t (-> self root trans))
)
((and (< 0.6666 f0-5) (< (-> (the-as fisher (-> self parent 0)) paddle-pos z) (-> self root trans z)))
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA1A" #t (-> self root trans))
)
((< 0.6666 f0-5)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA2A" #t (-> self root trans))
)
((< 0.5 f0-5)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA06" #t (-> self root trans))
)
((< 0.3333 f0-5)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA08" #t (-> self root trans))
)
((< 0.1666 f0-5)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA09" #t (-> self root trans))
)
((> (-> (the-as fisher (-> self parent 0)) missed) 0)
(play-ambient (-> (the-as fisher (-> self parent 0)) ambient) "FIS-TA10" #t (-> self root trans))
)
)
)
(send-event (ppointer->process (-> self parent)) 'fisher-fish-die 1)
)
)
(none)
)
)
;; definition for function fisher-fish-init-by-other
;; INFO: Return type mismatch object vs none.
(defbehavior fisher-fish-init-by-other fisher-fish ((arg0 symbol) (arg1 float) (arg2 float))
(set! (-> self mode) arg0)
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self root) (new 'process 'trsqv))
(set! (-> self size) 3276.8)
(initialize-skeleton
self
(cond
((or (= arg0 'deadly) (= arg0 'bad))
(set! (-> self size) 409.6)
(set-vector! (-> self root scale) 0.9 0.9 0.7 1.0)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 177) self))
*catch-fishc-sg*
)
((= arg0 'powerup)
(set-vector! (-> self root scale) 0.4 0.4 0.4 1.0)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 178) self))
*catch-fishb-sg*
)
(else
(set-vector! (-> self root scale) 0.3 0.3 0.3 1.0)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 178) self))
*catch-fisha-sg*
)
)
'()
)
(set! (-> self pos) 1.0)
(set! (-> self offset) arg1)
(set! (-> self vel) arg2)
(set! (-> self draw force-lod) 0)
(set! (-> self root transv z) 40960.0)
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
(set-vector! (-> self draw color-emissive) 0.6 0.6 0.6 0.0)
(go fisher-fish-fall)
(none)
)
;; definition for function fisher-draw-display
;; INFO: Return type mismatch float vs none.
(defbehavior fisher-draw-display fisher ((arg0 fisher))
(let ((s5-0 (new
'stack
'font-context
*font-default-matrix*
435
10
0.0
(font-color orange-red)
(font-flags shadow kerning)
)
)
)
(let ((v1-1 s5-0))
(set! (-> v1-1 width) (the float 200))
)
(let ((v1-2 s5-0))
(set! (-> v1-2 height) (the float 30))
)
(let ((v1-3 s5-0))
(set! (-> v1-3 scale) 0.7)
)
(set! (-> s5-0 flags) (font-flags shadow kerning right large))
(print-game-text (lookup-text! *common-text* (game-text-id caught) #f) s5-0 #f 128 22)
(set! (-> s5-0 origin x) 488.0)
(let ((s4-1 print-game-text))
(format (clear *temp-string*) "~3D" (-> arg0 caught))
(s4-1 *temp-string* s5-0 #f 128 22)
)
(set! (-> s5-0 origin x) 435.0)
(set! (-> s5-0 origin y) 25.0)
(print-game-text (lookup-text! *common-text* (game-text-id missed) #f) s5-0 #f 128 22)
(set! (-> s5-0 origin x) 488.0)
(let ((s4-3 print-game-text))
(format (clear *temp-string*) "~3D" (-> arg0 missed))
(s4-3 *temp-string* s5-0 #f 128 22)
)
)
(none)
)
;; definition for method 32 of type fisher
(defmethod play-anim! fisher ((obj fisher) (arg0 symbol))
(if arg0
(set! (-> obj training) #f)
)
(case (current-status (-> obj tasks))
(((task-status need-hint) (task-status need-introduction))
(when arg0
(set! (-> obj blend-on-exit) #t)
(close-status! (-> obj tasks) (task-status need-introduction))
(set! (-> obj training) #t)
)
(new 'static 'spool-anim
:name "fisher-introduction"
:index 8
:parts 9
:command-list
'((0 want-levels village1 jungle)
(0 alive "jungle-part-1")
(130 blackout 10)
(130 display-level village1 movie)
(130 want-force-vis village1 #t)
(134 blackout 0)
(229 blackout 10)
(232 blackout 0)
(235 display-level village1 #f)
(235 want-force-vis village1 #f)
(419 blackout 10)
(422 blackout 0)
(518 blackout 10)
(521 blackout 0)
(585 blackout 10)
(588 blackout 0)
(668 blackout 10)
(671 blackout 0)
(848 display-level village1 movie)
(848 want-force-vis village1 #t)
(849 alive "fishermans-boat-2")
(878 blackout 10)
(881 blackout 0)
(958 blackout 10)
(961 blackout 0)
(965 dead "fishermans-boat-2")
(965 display-level village1 display)
(965 want-force-vis village1 #f)
)
)
)
(((task-status need-reminder-a) (task-status need-reminder))
(set! (-> obj skippable) #t)
(set! (-> obj blend-on-exit) #t)
(new 'static 'spool-anim :name "fisher-reminder-1" :index 10 :parts 1 :command-list '())
)
(((task-status need-reward-speech))
(when arg0
(set! (-> obj cell-for-task) (current-task (-> obj tasks)))
(close-current! (-> obj tasks))
)
(new 'static 'spool-anim
:name "fisher-resolution"
:index 9
:parts 4
:command-list
'((188 blackout 10) (199 blackout 0))
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> obj name)
(task-status->string (current-status (-> obj tasks)))
)
)
(get-art-elem obj)
)
)
)
;; definition for method 31 of type fisher
(defmethod get-art-elem fisher ((obj fisher))
(if (closed? (-> obj tasks) (game-task jungle-fishgame) (task-status need-reminder))
(-> obj draw art-group data 7)
(-> obj draw art-group data 6)
)
)
;; definition for method 38 of type fisher
(defmethod dummy-38 fisher ((obj fisher))
(case (current-status (-> obj tasks))
(((task-status need-reminder-a) (task-status need-reminder))
(go (method-of-object obj query))
)
(((task-status need-reward-speech))
(go (method-of-object obj play-anim))
)
(else
((the-as (function fisher none) (find-parent-method fisher 38)) obj)
)
)
(none)
)
;; definition for method 34 of type fisher
(defmethod get-accept-anim fisher ((obj fisher) (arg0 symbol))
(when arg0
(close-current! (-> obj tasks))
(aybabtu 2)
)
(new 'static 'spool-anim
:name "fisher-accept"
:index 12
:parts 6
:command-list
'((0 send-event self emissive-on) (700 send-event self emissive-off))
)
)
;; definition for method 36 of type fisher
(defmethod get-reject-anim fisher ((obj fisher) (arg0 symbol))
(new 'static 'spool-anim :name "fisher-reject" :index 11 :parts 2 :command-list '())
)
;; failed to figure out what this is:
(defstate fisher-done (fisher)
:enter
(behavior ()
(init!
(-> self query)
(lookup-text! *common-text* (game-text-id play-again?) #f)
40
150
30
#f
(lookup-text! *common-text* (game-text-id quit) #f)
)
(ja-channel-set! 1)
(let ((gp-1 (-> self skel root-channel 0)))
(set! (-> gp-1 frame-group) (the-as art-joint-anim (get-art-elem self)))
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(while (-> self child)
(deactivate (-> self child 0))
)
(set! *camera-look-through-other* 2)
(cond
((>= (-> self caught) (-> *FISHER-bank* max-caught))
(send-event *target* 'end-mode)
(set! (-> self trans-hook) (lambda :behavior fisher
()
(set! *camera-look-through-other* 2)
(when (process-grab? *target*)
(close-current! (-> self tasks))
(go-virtual play-anim)
)
(none)
)
)
)
((< (-> self caught) 0)
(send-event *target* 'end-mode)
(go-virtual idle)
)
(else
(let ((gp-2 (-> self entity extra perm)))
(logior! (-> gp-2 status) (entity-perm-status user-set-from-cstage))
(cond
((-> self hard)
)
((and (< (-> self caught) 40) (< (-> self missed) 5))
)
((and (< (-> self caught) 80) (< (-> self missed) 10))
)
(else
(set! (-> gp-2 user-int8 4) (the-as int (+ (-> gp-2 user-uint8 4) 1)))
(let ((v1-40 (-> self caught)))
(if (>= v1-40 90)
(set! v1-40 (+ v1-40 -90 v1-40))
)
(set! (-> gp-2 user-object 0)
(+ (the-as float (-> gp-2 user-object 0))
(* 12.903226 (/ (the float v1-40) (fmax 5.0 (the float (-> self missed)))))
)
)
)
)
)
(let ((f0-4 (if (zero? (-> gp-2 user-uint8 4))
200.0
(/ (the-as float (-> gp-2 user-object 0)) (the float (-> gp-2 user-uint8 4)))
)
)
)
(when (zero? (mod (+ (-> gp-2 user-uint8 5) 1) (the-as uint 5)))
(cond
((-> self hard)
)
((= (-> gp-2 user-uint8 5) 4)
(if (< f0-4 60.0)
(set! (-> gp-2 user-int8 6) (seekl (the-as int (-> gp-2 user-uint8 6)) 4 1))
)
(set! (-> gp-2 user-object 0) 0.0)
(set! (-> gp-2 user-int8 4) 0)
0
)
((= (-> gp-2 user-uint8 5) 9)
(if (< f0-4 120.0)
(set! (-> gp-2 user-int8 6) (seekl (the-as int (-> gp-2 user-uint8 6)) 4 1))
)
)
(else
(set! (-> gp-2 user-int8 6) (seekl (the-as int (-> gp-2 user-uint8 6)) 4 1))
)
)
)
)
(set! (-> gp-2 user-int8 5) (seekl (the-as int (-> gp-2 user-uint8 5)) 255 1))
(set! (-> self difficulty) (the-as int (-> gp-2 user-uint8 6)))
(if (-> self hard)
(set! (-> self difficulty) 5)
)
(format
#t
"fisher: accum ~f div ~d tries ~d diff ~d~%"
(the-as float (-> gp-2 user-object 0))
(-> gp-2 user-uint8 4)
(-> gp-2 user-uint8 5)
(-> gp-2 user-uint8 6)
)
)
(let ((gp-3 (get-process *default-dead-pool* process #x4000)))
(when gp-3
(let ((t9-15 (method-of-type process activate)))
(t9-15 gp-3 *default-pool* 'process (the-as pointer #x70004000))
)
(run-next-time-in-process gp-3 (lambda :behavior process
()
(let ((gp-0 (-> *display* base-frame-counter)))
(until (>= (- (-> *display* base-frame-counter) gp-0) 30)
(suspend)
)
)
(ambient-hint-spawn "st-lose" (the-as vector #f) *entity-pool* 'stinger)
(none)
)
)
(-> gp-3 ppointer)
)
)
(send-event *target* 'lose)
)
)
(none)
)
:exit
(behavior ()
(when (and *target* (the-as target #f))
(send-event *target* 'end-mode)
(process-grab? *target*)
)
(none)
)
:trans
(behavior ()
(set! *camera-look-through-other* 2)
(cond
((>= (-> self caught) (-> *FISHER-bank* max-caught))
)
((< (-> self caught) 0)
)
(else
(when (< (mod (-> *display* base-frame-counter) 300) 150)
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf))
(gp-0 (-> s5-0 base))
)
(draw-string-xy
(lookup-text! *common-text* (game-text-id lose!) #f)
s5-0
256
100
(font-color orange-red)
(font-flags shadow kerning middle large)
)
(let ((a3-1 (-> s5-0 base)))
(let ((v1-13 (the-as dma-packet (-> s5-0 base))))
(set! (-> v1-13 dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> v1-13 vif0) (new 'static 'vif-tag))
(set! (-> v1-13 vif1) (new 'static 'vif-tag))
(set! (-> s5-0 base) (&+ (the-as pointer v1-13) 16))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) frame bucket-group)
(bucket-id debug-draw0)
gp-0
(the-as (pointer dma-tag) a3-1)
)
)
)
)
(fisher-draw-display self)
(let ((gp-1 (get-response (-> self query))))
(cond
((and (= gp-1 'yes) (process-release? *target*))
(go-virtual enter-playing)
)
((= gp-1 'no)
(go-virtual play-reject)
)
)
)
)
)
(spool-push *art-control* "fisher-reject" 0 self -99.0)
(none)
)
:code
(the-as (function none :behavior fisher) process-taskable-anim-loop)
:post
(the-as (function none :behavior fisher) ja-post)
)
;; definition for function fisher-spawn-ambient
;; INFO: Return type mismatch int vs none.
(defbehavior fisher-spawn-ambient fisher ()
(let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-2 (the-as number (logior #x3f800000 v1-1)))
(f0-2 (+ -1.0 (the-as float v1-2)))
)
(cond
((and (< 0.3 f0-2) (< (+ (-> *FISHER-bank* max-caught) -30) (-> self caught)))
(if (and
(>= (- (-> *display* base-frame-counter) (-> self ambient-almost)) 3000)
(play-ambient (-> self ambient) "FIS-TA11" #t (-> self root-override trans))
)
(set! (-> self ambient-almost) (-> *display* base-frame-counter))
)
)
((< 0.125 f0-2)
)
((< 0.1 f0-2)
(if (and
(>= (- (-> *display* base-frame-counter) (-> self ambient-steady)) 3000)
(play-ambient (-> self ambient) "FIS-TA06" #t (-> self root-override trans))
)
(set! (-> self ambient-steady) (-> *display* base-frame-counter))
)
)
((< (+ (-> *FISHER-bank* max-missed) -6) (-> self missed))
(if (and
(>= (- (-> *display* base-frame-counter) (-> self ambient-sagging)) 3000)
(play-ambient (-> self ambient) "FIS-TA07" #t (-> self root-override trans))
)
(set! (-> self ambient-sagging) (-> *display* base-frame-counter))
)
)
)
)
(none)
)
;; definition for function fisher-game-update
;; INFO: Return type mismatch int vs none.
(defbehavior fisher-game-update fisher ()
(when (>= (- (-> *display* base-frame-counter) (-> self block-time)) (the-as int (-> self params timeout)))
(set! (-> self block-time) (-> *display* base-frame-counter))
(+! (-> self block) 1)
(mem-copy!
(the-as pointer (-> self params))
(the-as pointer (-> *fisher-params* (-> self difficulty) (-> self block)))
56
)
)
(when (>= (- (-> *display* base-frame-counter) (-> self turn-time)) (-> self swing-time))
(set! (-> self turn-time) (-> *display* base-frame-counter))
(set! (-> self swing-time)
(rand-vu-int-range (the-as int (-> self params swing-min)) (the-as int (-> self params swing-max)))
)
(set! (-> self params vel) (- (-> self params vel)))
)
(+! (-> self spawner) (* (-> self params vel) (-> *display* seconds-per-frame)))
(if (= (-> self params swing-min) #x1869f)
(set! (-> self spawner) (* 0.01 (the float (-> self params swing-max))))
)
(cond
((and (< 0.0 (-> self params vel)) (>= (-> self spawner) 1.0))
(set! (-> self params vel) (- (-> self params vel)))
(set! (-> self spawner) 1.0)
)
((and (< (-> self params vel) 0.0) (>= 0.0 (-> self spawner)))
(set! (-> self params vel) (- (-> self params vel)))
(set! (-> self spawner) 0.0)
)
)
(when (and
(nonzero? (-> self params period))
(>= (- (-> *display* base-frame-counter) (-> self spawn-time)) (the-as int (-> self params period)))
)
(let ((gp-0
(cond
((rand-vu-percent? (-> self params powerup-percent))
(if (and
(>= (- (-> *display* base-frame-counter) (-> self ambient-big-one)) 9000)
(play-ambient (-> self ambient) "FIS-TA03" #t (-> self root-override trans))
)
(set! (-> self ambient-big-one) (-> *display* base-frame-counter))
)
'powerup
)
((rand-vu-percent? (-> self params bad-percent))
'bad
)
((rand-vu-percent? (-> self params deadly-percent))
'deadly
)
(else
'normal
)
)
)
)
(if (and (!= gp-0 'bad) (< 0.8 (fabs (- (-> self spawner-last) (-> self spawner)))))
(set! (-> self spawner) (* 0.5 (+ (-> self spawner-last) (-> self spawner))))
)
(set! (-> self spawner-last) (-> self spawner))
(set! (-> self spawn-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "fish-spawn") (new-sound-id) 716 0 0 1 #t)
(fisher-spawn-ambient)
(let ((s5-1 (get-process *default-dead-pool* fisher-fish #x4000)))
(when s5-1
(let ((t9-10 (method-of-type fisher-fish activate)))
(t9-10 (the-as fisher-fish s5-1) self 'fisher-fish (the-as pointer #x70004000))
)
(run-now-in-process s5-1 fisher-fish-init-by-other gp-0 (-> self spawner) (* 1.85 (-> self params fish-vel)))
(-> s5-1 ppointer)
)
)
)
)
(let ((f1-14 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 28.0)))
(+! (-> self paddle-vel) (* f1-14 (-> *display* seconds-per-frame)))
)
(set! (-> self paddle-vel) (seek (-> self paddle-vel) 0.0 (* 15.0 (-> *display* seconds-per-frame))))
(set! (-> self paddle-vel) (fmax -2.0 (fmin 2.0 (-> self paddle-vel))))
(+! (-> self paddle) (* (-> self paddle-vel) (-> *display* seconds-per-frame)))
(set! (-> self paddle) (fmax 0.0 (fmin 1.0 (-> self paddle))))
(vector-lerp!
(-> self paddle-pos)
(the-as vector (-> self paddle-end))
(the-as vector (&-> self stack 288))
(-> self paddle)
)
0
(none)
)
;; failed to figure out what this is:
(defstate fisher-playing (fisher)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-2 object))
(case arg2
(('fisher-fish-die)
(sound-play-by-name (static-sound-name "fish-miss") (new-sound-id) 1024 0 0 1 #t)
(set! v0-2 (+ (-> self missed) (-> arg3 param 0)))
(set! (-> self missed) (the-as int v0-2))
v0-2
)
(('fisher-fish-caught)
(send-event *target* 'bounce)
(set! v0-2 (+ (-> self caught) (-> arg3 param 0)))
(set! (-> self caught) (the-as int v0-2))
v0-2
)
(('deadly)
(go fisher-done)
)
(('bad)
(set! v0-2 (seekl (-> self caught) 0 10))
(set! (-> self caught) (the-as int v0-2))
v0-2
)
)
)
:enter
(behavior ()
(set-setting! *setting-control* self 'ambient-volume 'rel 50.0 0)
(send-event *target* 'reset-pickup 'eco)
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(let ((gp-0 (get-process *default-dead-pool* process #x4000)))
(when gp-0
(let ((t9-5 (method-of-type process activate)))
(t9-5 gp-0 self 'process (the-as pointer #x70004000))
)
(run-next-time-in-process gp-0 (lambda :behavior fisher-fish
()
(logclear! (-> self mask) (process-mask pause))
(while #t
(fisher-draw-display (the-as fisher (ppointer->process (-> self parent))))
(suspend)
)
(none)
)
)
(-> gp-0 ppointer)
)
)
(send-event *camera* 'change-to-entity-by-name "camera-152")
(init! (-> self query) (the-as string #f) 40 150 25 #t (lookup-text! *common-text* (game-text-id quit) #f))
(none)
)
:exit
(behavior ()
(clear-pending-settings-from-process *setting-control* self 'ambient-volume)
(let* ((v1-2 *camera-other-matrix*)
(a3-0 (-> *camera-combiner* inv-camera-rot))
(a0-2 (-> a3-0 vector 0 quad))
(a1-1 (-> a3-0 vector 1 quad))
(a2-1 (-> a3-0 vector 2 quad))
(a3-1 (-> a3-0 vector 3 quad))
)
(set! (-> v1-2 vector 0 quad) a0-2)
(set! (-> v1-2 vector 1 quad) a1-1)
(set! (-> v1-2 vector 2 quad) a2-1)
(set! (-> v1-2 vector 3 quad) a3-1)
)
(set! (-> *camera-other-fov* data) (-> *camera-combiner* fov))
(set! (-> *camera-other-trans* quad) (-> *camera-combiner* trans quad))
(set! (-> *camera-other-root* quad) (-> self root-override trans quad))
(restore-collide-with-as (-> self root-override))
(send-event *camera* 'blend-from-as-fixed)
(send-event *camera* 'change-state *camera-base-mode* 0)
(send-event *camera* 'clear-entity)
0
(none)
)
:trans
(behavior ()
(spool-push *art-control* "fisher-resolution" 0 self -99.0)
(spool-push *art-control* "fisher-reject" 0 self -99.0)
(none)
)
:code
(behavior ()
(set! *display-profile* #f)
(set! (-> self paddle) 0.5)
(set! (-> self paddle-vel) 0.0)
(set! (-> self start-time) (-> *display* base-frame-counter))
(set! (-> self caught) 0)
(set! (-> self missed) 0)
(set! (-> self spawner) 0.5)
(set! (-> self spawner-last) 0.5)
(set! (-> self swing-time) 0)
(set! (-> self block) -1)
(set! (-> self block-time) (-> *display* base-frame-counter))
(+! (-> self block) 1)
(mem-copy!
(the-as pointer (-> self params))
(the-as pointer (-> *fisher-params* (-> self difficulty) (-> self block)))
56
)
(set! (-> self ambient-big-one) 0)
(set! (-> self ambient-steady) 0)
(set! (-> self ambient-sagging) 0)
(set! (-> self ambient-almost) 0)
(while #t
(hide-hud-quick)
(fisher-game-update)
(if (or
(zero? (-> self params timeout))
(>= (-> self missed) (-> *FISHER-bank* max-missed))
(>= (-> self caught) (-> *FISHER-bank* max-caught))
)
(go fisher-done)
)
(suspend)
)
(none)
)
:post
(behavior () (ja-post) (none))
)
;; failed to figure out what this is:
(defstate enter-playing (fisher)
:virtual #t
:trans
(behavior ()
(set-blackout-frames 5)
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) self)
(set! (-> a1-0 num-params) 2)
(set! (-> a1-0 message) 'change-mode)
(set! (-> a1-0 param 0) (the-as uint 'fishing))
(set! (-> a1-0 param 1) (the-as uint self))
(if (send-event-function *target* a1-0)
(go fisher-playing)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate query (fisher)
:virtual #t
:enter
(behavior ()
(init!
(-> self query)
(lookup-text! *common-text* (game-text-id fish?) #f)
40
150
25
#f
(lookup-text! *common-text* (game-text-id quit) #f)
)
(none)
)
)
;; definition for method 43 of type fisher
(defmethod TODO-RENAME-43 fisher ((obj fisher))
(cond
((closed? (-> obj tasks) (game-task jungle-fishgame) (task-status need-reminder))
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) 300 122880.0 obj)
(let* ((v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-6 (the-as number (logior #x3f800000 v1-5)))
(f0-2 (+ -1.0 (the-as float v1-6)))
)
(if (< 0.5 f0-2)
(play-ambient (-> obj ambient) "FIS-LO03" #f (-> obj root-override trans))
(play-ambient (-> obj ambient) "FIS-LO05" #f (-> obj root-override trans))
)
)
)
)
(else
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) 9000 122880.0 obj)
(let* ((v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-16 (the-as number (logior #x3f800000 v1-15)))
(f0-5 (+ -1.0 (the-as float v1-16)))
)
(cond
((< 0.875 f0-5)
(play-ambient (-> obj ambient) "FIS-LO01" #f (-> obj root-override trans))
)
((< 0.75 f0-5)
(play-ambient (-> obj ambient) "FIS-LO04" #f (-> obj root-override trans))
)
((< 0.625 f0-5)
(play-ambient (-> obj ambient) "FIS-AM01" #f (-> obj root-override trans))
)
((< 0.5 f0-5)
(play-ambient (-> obj ambient) "FIS-AM02" #f (-> obj root-override trans))
)
((< 0.375 f0-5)
(play-ambient (-> obj ambient) "FIS-AM03" #f (-> obj root-override trans))
)
((< 0.25 f0-5)
(play-ambient (-> obj ambient) "FIS-AM04" #f (-> obj root-override trans))
)
((< 0.125 f0-5)
(play-ambient (-> obj ambient) "FIS-AM05" #f (-> obj root-override trans))
)
(else
(play-ambient (-> obj ambient) "FIS-AM06" #f (-> obj root-override trans))
)
)
)
)
)
)
)
;; failed to figure out what this is:
(defstate play-accept (fisher)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-0 rgbaf))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'emissive-on)
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
(set! v0-0 (-> self draw color-emissive))
(set! (-> v0-0 x) 0.6)
(set! (-> v0-0 y) 0.6)
(set! (-> v0-0 z) 0.6)
(set! (-> v0-0 w) 0.0)
v0-0
)
((= v1-0 'emissive-off)
(set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0)
(set! v0-0 (-> self draw color-emissive))
(set! (-> v0-0 x) 0.0)
(set! (-> v0-0 y) 0.0)
(set! (-> v0-0 z) 0.0)
(set! (-> v0-0 w) 0.0)
v0-0
)
)
)
)
)
:trans
(behavior ()
(when (-> self training)
(let ((gp-0 (new-stack-vector0)))
(vector<-cspace! gp-0 (-> self node-list data 74))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 2001)
gp-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
(fisher-fish-water gp-0 (+ 32768.0 (vector-y-angle (-> self node-list data 75 bone transform vector 1))))
(vector<-cspace! gp-0 (-> self node-list data 77))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 2001)
gp-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
(fisher-fish-water gp-0 (+ 32768.0 (vector-y-angle (-> self node-list data 78 bone transform vector 1))))
(vector<-cspace! gp-0 (-> self node-list data 80))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 828)
gp-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 2013)
gp-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
(fisher-fish-water gp-0 (+ 32768.0 (vector-y-angle (-> self node-list data 80 bone transform vector 1))))
)
)
(let ((t9-14 (-> (the-as state (find-parent-method fisher 24)) trans)))
(if t9-14
(t9-14)
)
)
(none)
)
)
;; failed to figure out what this is:
(defstate idle (fisher)
:virtual #t
:trans
(behavior ()
(let ((t9-1 (-> (the-as state (find-parent-method fisher 30)) trans)))
(if t9-1
(t9-1)
)
)
(when (task-complete? *game-info* (-> self entity extra perm task))
(when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0))
(let ((v1-9 (-> self cheat-temp)))
(cond
((zero? v1-9)
(cond
((cpad-pressed? 0 left)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 1)
(cond
((cpad-pressed? 0 left)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 2)
(cond
((cpad-pressed? 0 right)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 3)
(cond
((cpad-pressed? 0 right)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 4)
(cond
((cpad-pressed? 0 left)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 5)
(cond
((cpad-pressed? 0 left)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 6)
(cond
((cpad-pressed? 0 right)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 7)
(cond
((cpad-pressed? 0 right)
(+! (-> self cheat-temp) 1)
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
((= v1-9 8)
(cond
((cpad-pressed? 0 x)
(set! (-> self hard) #t)
(set! (-> self difficulty) 5)
(set! (-> *FISHER-bank* max-caught) #x70000000)
(ambient-hint-spawn "FIS-LO03" (the-as vector #f) *entity-pool* 'stinger)
(set! (-> self cheat-temp) 0)
0
)
(else
(set! (-> self cheat-temp) 0)
0
)
)
)
)
)
)
)
(none)
)
:code
(behavior ()
(if (!= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(get-art-elem self)
)
(ja-channel-push! 1 60)
)
(while #t
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 frame-group) (the-as art-joint-anim (get-art-elem self)))
)
(let* ((f30-0 5.0)
(v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-10 (the-as number (logior #x3f800000 v1-9)))
)
(countdown (gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-10)))) 5))
(let ((a0-10 (-> self skel root-channel 0)))
(set! (-> a0-10 frame-group) (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(set! (-> a0-10 param 0) (the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-10 param 1) 1.0)
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group!
a0-10
(if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
num-func-seek!
)
)
(until (ja-done? 0)
(TODO-RENAME-43 self)
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
(set! (-> a0-12 param 0) (the float (+ (-> a0-12 frame-group data 0 length) -1)))
(set! (-> a0-12 param 1) 1.0)
(joint-control-channel-group-eval! a0-12 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
)
(when (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 6)
)
(let ((a0-19 (-> self skel root-channel 0)))
(set! (-> a0-19 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
(set! (-> a0-19 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -1))
)
(set! (-> a0-19 param 1) 1.0)
(set! (-> a0-19 frame-num) 0.0)
(joint-control-channel-group! a0-19 (the-as art-joint-anim (-> self draw art-group data 5)) num-func-seek!)
)
(until (ja-done? 0)
(TODO-RENAME-43 self)
(suspend)
(let ((a0-21 (-> self skel root-channel 0)))
(set! (-> a0-21 param 0) (the float (+ (-> a0-21 frame-group data 0 length) -1)))
(set! (-> a0-21 param 1) 1.0)
(joint-control-channel-group-eval! a0-21 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
)
(none)
)
)
;; definition for method 41 of type fisher
;; INFO: Return type mismatch int vs none.
(defmethod initialize-collision fisher ((obj fisher) (arg0 int) (arg1 vector))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 4)
(set-vector! (-> s4-0 local-sphere) 6144.0 0.0 4096.0 14336.0)
(set-root-prim! s5-0 s4-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set! (-> s2-0 prim-core action) (the-as uint 1))
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) arg0)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 6553.6)
(append-prim s4-0 s2-0)
)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 57)
(set-vector! (-> s3-1 local-sphere) 0.0 4096.0 0.0 4096.0)
(append-prim s4-0 s3-1)
)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
;; definition for method 47 of type fisher
(defmethod target-above-threshold? fisher ((obj fisher))
(or (= (current-task (-> obj tasks)) (game-task jungle-fishgame)) (-> obj hard))
)
;; definition for method 11 of type fisher
;; Used lq/sq
(defmethod init-from-entity! fisher ((obj fisher) (arg0 entity-actor))
(dummy-40 obj arg0 *fisher-sg* 3 49 (new 'static 'vector :w 4096.0) 33)
(set! (-> obj tasks) (get-task-control (game-task jungle-fishgame)))
(set! (-> obj path) (new 'process 'curve-control obj 'path -1000000000.0))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(let ((s5-0 (eval-path-curve-div! (-> obj path) (-> obj paddle-pos) 6.5 'interp))
(s4-0 (TODO-RENAME-12 (-> obj path) (new-stack-vector0) 6.5))
)
(set! (-> s5-0 y) (+ 2457.6 (-> s5-0 y)))
(vector-normalize! (vector-rotate-y! s4-0 s4-0 16384.0) (-> *FISHER-bank* width))
(vector-! (the-as vector (-> obj paddle-end)) s5-0 s4-0)
(vector+! (the-as vector (&-> obj stack 288)) s5-0 s4-0)
)
(set! (-> obj music) 'fishgame)
(set! (-> obj difficulty) (the-as int (-> obj entity extra perm user-uint8 6)))
(set! (-> obj hard) #f)
(set! (-> *FISHER-bank* max-caught) 200)
(set! (-> obj training) #f)
(dummy-42 obj)
(none)
)
;; failed to figure out what this is:
(defstate target-fishing (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(cond
((= arg2 'bounce)
(set-zero! (-> self control unknown-smush00))
(activate! (-> self control unknown-smush00) 1.0 120 210 0.3 1.0)
)
((= arg2 'lose)
(set! (-> self control unknown-uint20) (the-as uint arg2))
arg2
)
(else
((-> target-grab event) arg0 arg1 arg2 arg3)
)
)
)
:enter
(behavior ((arg0 handle))
(set! (-> self control unknown-surface00) *empty-mods*)
(logior! (-> self state-flags) 16)
(set-zero! (-> self control unknown-smush00))
(set! (-> self control unknown-uint20) (the-as uint #f))
(none)
)
:exit
(behavior ()
(set! (-> self state-flags) (logand -17 (-> self state-flags)))
(let ((v1-2 (-> self manipy)))
(when v1-2
(deactivate (-> v1-2 0))
(set! (-> self manipy) (the-as (pointer manipy) #f))
)
)
(-> target-periscope exit)
(none)
)
:code
(behavior ((arg0 handle))
(let ((v1-1 (handle->process arg0)))
(when (and v1-1 (type-type? (-> v1-1 type) fisher))
(set-vector! (-> self control trans) 1067827.2 9420.8 -955596.8 1.0)
(set-yaw-angle-clear-roll-pitch! (-> self control) -20024.889)
(rot->dir-targ! (-> self control))
)
)
(ja-channel-set! 1)
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
(set! (-> self manipy)
(the-as (pointer manipy) (when s5-0
(let ((t9-5 (method-of-type manipy activate)))
(t9-5 (the-as manipy s5-0) self 'manipy (the-as pointer #x70004000))
)
(let ((t9-6 run-function-in-process)
(a0-11 s5-0)
(a1-5 manipy-init)
(a2-2 (-> self control trans))
(v1-16 (handle->process arg0))
)
((the-as (function object object object object object object none) t9-6)
a0-11
a1-5
a2-2
(if v1-16
(-> v1-16 entity)
(the-as entity #f)
)
*fish-net-sg*
#f
)
)
(-> s5-0 ppointer)
)
)
)
)
(when (-> self manipy)
(send-event (ppointer->process (-> self manipy)) 'anim-mode 'copy-parent)
(send-event
(ppointer->process (-> self manipy))
'eval
(lambda :behavior target
()
(set! (-> self attack-info vector x)
(the-as float (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 6))
)
(set! (-> self attack-info vector y)
(the-as float (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 5))
)
(none)
)
)
(let ((v1-35 (-> self manipy 0 node-list data)))
(set! (-> v1-35 0 param0) cspace<-cspace+quaternion!)
(set! (-> v1-35 0 param1) (the-as basic (-> self node-list data 23)))
(set! (-> v1-35 0 param2) (the-as basic (-> self control quat)))
)
)
(let ((s5-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
s5-1
(the-as art-joint-anim (-> self draw art-group data 99))
num-func-identity
)
(set! (-> s5-1 frame-num) (ja-aframe 15.0 0))
)
(let ((s5-2 (new 'stack-no-clear 'vector)))
(until (-> self control unknown-spoolanim00)
(let ((v1-42 (handle->process arg0)))
(when v1-42
(let ((a0-28 (-> self skel root-channel 0)))
(set! (-> a0-28 param 0) (* (fmax 0.0 (- 1.0 (-> (the-as fisher v1-42) paddle)))
(the float (+ (-> (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
data
0
length
)
-1
)
)
)
)
(set! (-> a0-28 param 1) 1.0)
(joint-control-channel-group-eval! a0-28 (the-as art-joint-anim #f) num-func-seek!)
)
(when (-> self manipy)
(let ((s2-0 (new-stack-quaternion0))
(s4-0 (new-stack-quaternion0))
(s3-0 (quaternion-identity! (new-stack-quaternion0)))
(f30-0 (update! (-> self control unknown-smush00)))
)
(quaternion-rotate-y! s3-0 s3-0 (* 5461.3335 f30-0))
(set-vector! s2-0 1.0 1.0 1.0 1.0)
(set-vector! s4-0 0.0 (* 2048.0 (-> s5-2 y)) (* 819.2 (-> s5-2 y)) 1.0)
(initialize-skeleton (-> self manipy 0 joint 0) (the-as skeleton-group s4-0) (the-as pair s3-0))
(set-vector! s4-0 0.0 (* -614.4 f30-0) 0.0 1.0)
(let* ((a0-34 (-> self manipy 0 joint 1))
(t9-16 (method-of-object a0-34 initialize-skeleton))
(a2-7 #f)
)
(t9-16 a0-34 (the-as skeleton-group s4-0) (the-as pair a2-7))
)
(set! (-> s5-2 y) (-> s5-2 x))
(set! (-> s5-2 x) f30-0)
)
)
)
)
(suspend)
)
)
(case (-> self control unknown-spoolanim00)
(('lose)
(ja-channel-push! 1 30)
(let ((a0-38 (-> self skel root-channel 0)))
(set! (-> a0-38 frame-group) (the-as art-joint-anim (-> self draw art-group data 100)))
(set! (-> a0-38 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 100)) data 0 length) -1))
)
(set! (-> a0-38 param 1) 1.0)
(set! (-> a0-38 frame-num) 0.0)
(joint-control-channel-group! a0-38 (the-as art-joint-anim (-> self draw art-group data 100)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-39 (-> self skel root-channel 0)))
(set! (-> a0-39 param 0) (the float (+ (-> a0-39 frame-group data 0 length) -1)))
(set! (-> a0-39 param 1) 1.0)
(joint-control-channel-group-eval! a0-39 (the-as art-joint-anim #f) num-func-seek!)
)
)
(anim-loop)
)
)
(none)
)
:post
(the-as (function none :behavior target) target-post)
)