mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
dd959d0d0d
* decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)` * decomp: almost finish `process-taskable` * blocked: mistycannon / pelican * decomp: finish `babak-with-cannon` write a script to fix gsrc * decomp: finish `process-taskable` * decomp: finish `flutflut` and `yakow` * decomp: finish `fishermans-boat` * blocked: state decomp `training-obs` * decomp: finish `muse` * decomp: finish `bonelurker` * blocked: state decomp in `quicksandlurker`| `balloonlurker` * decomp: finish `assistant-village2` * scripts: script to help updating goal_src * starting to update goal_src * tests: update ref tests * src: more src updating * src: waiting on `process-taskable` and `muse` * blocked: `citb-plat` state decomp * decomp: finish `square-platform` * blocked: `orbit-plat` due to overlays + static data * decomp: finish `qbert-plat` * blocked: almost finish `misty-conveyor`, sparticle-callback * blocked: jungle-mirrors * blocked: state decomp in `swamp-blimp` * decomp: finish `swamp-bat` * decomp: finish `swamp-rat` * decomp: finish `swamp-rat-nest` * blocked: state decomp `kermit` * decomp: finish `cavecrystal-light` * decomp: finish `spiderwebs` * blocked: state decomp `dark-crystal` * decomp: finish `baby-spider` * decomp: finish `mother-spider-h` * decomp: finish `mother-spider-proj` * blocked: state decomp in `gnawer` * blocked: state decomp in `driller-lurker` * blocked: `sun-exit-chamber` breaks when adding handle cast * decomp: finish `sunken-water` * blocked: `target-tube` ShortCircuitElement::push_to_stack * decomp: finish `sunken-fish` * blocked: `minecart` decomp crash when adding stack cast * decomp: finish `assistant-village3` * decomp: finish `sage-village3` * blocked: `cave-trap` done but ran into `go` issue * blocked: `spider-egg` state decomp * decomp: finish `target-snowball` * blocked/stuck: `target-ice` decomp issue around cpad * pausing: ice-cube has some weird collide-shape-prim handling * blocked: `snow-ball` state decomp * blocked: `snow-bumper` state decomp * decomp: finish `snow-ram-h` * decomp: finish `yeti` * decomp: finish `assistant-lavatube` * re-enable the float cast log * decomp: updating to new sparticle definitions * decomp: address feedback up to `swamp-rat-nest` * address remaining feedback * all-types: move the `pointer` def * add back temporary `hud-hidden?`
313 lines
7.2 KiB
Common Lisp
313 lines
7.2 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: geologist.gc
|
|
;; name in dgo: geologist
|
|
;; dgos: L1, VI2
|
|
|
|
(define-extern *geologist-sg* skeleton-group)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype geologist (process-taskable)
|
|
()
|
|
:heap-base #x110
|
|
:method-count-assert 53
|
|
:size-assert #x17c
|
|
:flag-assert #x350110017c
|
|
)
|
|
|
|
|
|
(let
|
|
((v1-1
|
|
(new 'static 'skeleton-group
|
|
:art-group-name "geologist"
|
|
:bounds (new 'static 'vector :w 16384.0)
|
|
:max-lod 2
|
|
:version #x6
|
|
:shadow 4
|
|
)
|
|
)
|
|
)
|
|
(set! (-> v1-1 jgeo) 0)
|
|
(set! (-> v1-1 janim) 5)
|
|
(set! (-> v1-1 mgeo 0) (the-as uint 1))
|
|
(set! (-> v1-1 lod-dist 0) 81920.0)
|
|
(set! (-> v1-1 mgeo 1) (the-as uint 2))
|
|
(set! (-> v1-1 lod-dist 1) 163840.0)
|
|
(set! (-> v1-1 mgeo 2) (the-as uint 3))
|
|
(set! (-> v1-1 lod-dist 2) 4095996000.0)
|
|
(set! *geologist-sg* v1-1)
|
|
)
|
|
|
|
(defmethod play-anim! geologist ((obj geologist) (arg0 symbol))
|
|
(with-pp
|
|
(set! (-> obj talk-message) (the-as uint 260))
|
|
(case (current-status (-> obj tasks))
|
|
((2 3)
|
|
(when arg0
|
|
(close-status! (-> obj tasks) (task-status need-introduction))
|
|
(close-specific-task!
|
|
(game-task village2-geologist-money)
|
|
(task-status need-introduction)
|
|
)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-introduction"
|
|
:index 6
|
|
:parts 13
|
|
:command-list
|
|
'(
|
|
(0
|
|
want-levels
|
|
village2
|
|
rolling
|
|
)
|
|
((the binteger 199)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 325)
|
|
joint
|
|
"camera"
|
|
)
|
|
((the binteger 520)
|
|
alive
|
|
"racer-2"
|
|
)
|
|
((the binteger 544)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 546)
|
|
dead
|
|
"racer-2"
|
|
)
|
|
((the binteger 809)
|
|
joint
|
|
"camera"
|
|
)
|
|
((the binteger 1031)
|
|
joint
|
|
"cameraB"
|
|
)
|
|
((the binteger 1229) joint "camera")
|
|
)
|
|
)
|
|
)
|
|
((5)
|
|
(set! (-> obj skippable) #t)
|
|
(cond
|
|
((closed?
|
|
(-> obj tasks)
|
|
(game-task rolling-moles)
|
|
(task-status need-reward-speech)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-reminder-money"
|
|
:index 8
|
|
:parts 2
|
|
:command-list '()
|
|
)
|
|
)
|
|
((closed?
|
|
(-> obj tasks)
|
|
(game-task village2-geologist-money)
|
|
(task-status need-reward-speech)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-reminder-moles"
|
|
:index 7
|
|
:parts 3
|
|
:command-list '()
|
|
)
|
|
)
|
|
((zero? (get-reminder (-> obj tasks) 0))
|
|
(if arg0
|
|
(save-reminder (-> obj tasks) 1 0)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-reminder-moles"
|
|
:index 7
|
|
:parts 3
|
|
:command-list '()
|
|
)
|
|
)
|
|
(else
|
|
(if arg0
|
|
(save-reminder (-> obj tasks) 0 0)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-reminder-money"
|
|
:index 8
|
|
:parts 2
|
|
:command-list '()
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((6)
|
|
(if (not arg0)
|
|
(set! (-> obj will-talk) #t)
|
|
)
|
|
(case (current-task (-> obj tasks))
|
|
((54)
|
|
(when arg0
|
|
(set!
|
|
(-> obj cell-for-task)
|
|
(the-as game-task (current-task (-> obj tasks)))
|
|
)
|
|
(close-current! (-> obj tasks))
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-resolution-moles"
|
|
:index 9
|
|
:parts 3
|
|
:command-list '()
|
|
)
|
|
)
|
|
(else
|
|
(cond
|
|
(arg0
|
|
(set!
|
|
(-> obj cell-for-task)
|
|
(the-as game-task (current-task (-> obj tasks)))
|
|
)
|
|
(close-current! (-> obj tasks))
|
|
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-10 from) pp)
|
|
(set! (-> a1-10 num-params) 2)
|
|
(set! (-> a1-10 message) 'get-pickup)
|
|
(set! (-> a1-10 param 0) (the-as uint 5))
|
|
(set!
|
|
(-> a1-10 param 1)
|
|
(the-as uint (- (-> *GAME-bank* money-task-inc)))
|
|
)
|
|
(send-event-function *target* a1-10)
|
|
)
|
|
)
|
|
(else
|
|
(set! (-> obj talk-message) (the-as uint 282))
|
|
)
|
|
)
|
|
(new 'static 'spool-anim
|
|
:name "geologist-resolution-money"
|
|
:index 10
|
|
:parts 2
|
|
:command-list '()
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(if arg0
|
|
(format
|
|
0
|
|
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
|
|
(-> obj name)
|
|
(task-status->string
|
|
(the-as task-status (current-status (-> obj tasks)))
|
|
)
|
|
)
|
|
)
|
|
(-> obj draw art-group data 5)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defmethod get-art-elem geologist ((obj geologist))
|
|
(-> obj draw art-group data 5)
|
|
)
|
|
|
|
(defmethod TODO-RENAME-43 geologist ((obj geologist))
|
|
(when
|
|
(TODO-RENAME-10
|
|
(-> obj ambient)
|
|
(new 'stack-no-clear 'vector)
|
|
9000
|
|
122880.0
|
|
obj
|
|
)
|
|
(let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
|
(v1-4 (the-as number (logior #x3f800000 v1-3)))
|
|
(f0-2 (+ -1.0 (the-as float v1-4)))
|
|
)
|
|
(cond
|
|
((< 0.8888889 f0-2)
|
|
(dummy-11 (-> obj ambient) "GEO-AM01" #f (-> obj root-override trans))
|
|
)
|
|
((< 0.7777778 f0-2)
|
|
(if
|
|
(not
|
|
(closed?
|
|
(-> obj tasks)
|
|
(game-task rolling-moles)
|
|
(task-status need-reminder)
|
|
)
|
|
)
|
|
(dummy-11 (-> obj ambient) "GEO-AM02" #f (-> obj root-override trans))
|
|
)
|
|
)
|
|
((< 0.6666667 f0-2)
|
|
(dummy-11 (-> obj ambient) "GEO-AM03" #f (-> obj root-override trans))
|
|
)
|
|
((< 0.5555556 f0-2)
|
|
(if
|
|
(closed?
|
|
(-> obj tasks)
|
|
(game-task village2-geologist-money)
|
|
(task-status need-introduction)
|
|
)
|
|
(dummy-11 (-> obj ambient) "GEO-AM04" #f (-> obj root-override trans))
|
|
)
|
|
)
|
|
((< 0.44444445 f0-2)
|
|
(dummy-11 (-> obj ambient) "GEO-AM05" #f (-> obj root-override trans))
|
|
)
|
|
((< 0.33333334 f0-2)
|
|
(dummy-11 (-> obj ambient) "GEO-AM06" #f (-> obj root-override trans))
|
|
)
|
|
((< 0.22222222 f0-2)
|
|
(if
|
|
(not
|
|
(closed?
|
|
(-> obj tasks)
|
|
(game-task rolling-moles)
|
|
(task-status need-reminder)
|
|
)
|
|
)
|
|
(dummy-11 (-> obj ambient) "GEO-AM07" #f (-> obj root-override trans))
|
|
)
|
|
)
|
|
((< 0.11111111 f0-2)
|
|
(dummy-11 (-> obj ambient) "GEO-LO02" #f (-> obj root-override trans))
|
|
)
|
|
((closed?
|
|
(-> obj tasks)
|
|
(game-task village2-geologist-money)
|
|
(task-status need-resolution)
|
|
)
|
|
(dummy-11 (-> obj ambient) "GEO-AM08" #f (-> obj root-override trans))
|
|
)
|
|
(else
|
|
(dummy-11 (-> obj ambient) "GEO-LO01" #f (-> obj root-override trans))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defmethod copy-defaults! geologist ((obj geologist) (arg0 res-lump))
|
|
(dummy-40 obj arg0 *geologist-sg* 3 45 (new 'static 'vector :w 4096.0) 5)
|
|
(set! (-> obj tasks) (get-task-control (game-task rolling-moles)))
|
|
(set! (-> obj sound-flava) (the-as uint 16))
|
|
(set! (-> obj draw light-index) (the-as uint 2))
|
|
(dummy-42 obj)
|
|
(none)
|
|
)
|
|
|
|
|
|
|
|
|