mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
80a002f8c0
* make birthing work * fix float representation on defskelgroup * test * update * debugger improvements & dont upload aux sprites * ? * fix progress * fixes * fixes * Create bea.gd * fix test * fix xmm reg clobbering in kernel (water) * cleanup cam-start * clear gamepad state every frame * allow controller connects and disconnects while running
293 lines
6.5 KiB
Common Lisp
293 lines
6.5 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: geologist.gc
|
|
;; name in dgo: geologist
|
|
;; dgos: L1, VI2
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(deftype geologist (process-taskable)
|
|
()
|
|
:heap-base #x110
|
|
:method-count-assert 53
|
|
:size-assert #x17c
|
|
:flag-assert #x350110017c
|
|
)
|
|
|
|
|
|
(defskelgroup *geologist-sg* geologist
|
|
0
|
|
5
|
|
((1 (meters 20)) (2 (meters 40)) (3 (meters 999999)))
|
|
:bounds (static-spherem 0 0 0 4)
|
|
:longest-edge (meters 0)
|
|
:shadow 4
|
|
)
|
|
|
|
(defmethod play-anim! geologist ((obj geologist) (arg0 symbol))
|
|
(set! (-> obj talk-message) (the-as uint 260))
|
|
(case (current-status (-> obj tasks))
|
|
(((task-status need-hint) (task-status need-introduction))
|
|
(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")
|
|
)
|
|
)
|
|
)
|
|
(((task-status need-reminder))
|
|
(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 '()
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(((task-status need-reward-speech))
|
|
(if (not arg0)
|
|
(set! (-> obj will-talk) #t)
|
|
)
|
|
(case (current-task (-> obj tasks))
|
|
(((game-task rolling-moles))
|
|
(when arg0
|
|
(set! (-> obj cell-for-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) (current-task (-> obj tasks)))
|
|
(close-current! (-> obj tasks))
|
|
(send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc)))
|
|
)
|
|
(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 (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)
|
|
(play-ambient (-> 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)
|
|
)
|
|
)
|
|
(play-ambient
|
|
(-> obj ambient)
|
|
"GEO-AM02"
|
|
#f
|
|
(-> obj root-override trans)
|
|
)
|
|
)
|
|
)
|
|
((< 0.6666667 f0-2)
|
|
(play-ambient (-> 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)
|
|
)
|
|
(play-ambient
|
|
(-> obj ambient)
|
|
"GEO-AM04"
|
|
#f
|
|
(-> obj root-override trans)
|
|
)
|
|
)
|
|
)
|
|
((< 0.44444445 f0-2)
|
|
(play-ambient (-> obj ambient) "GEO-AM05" #f (-> obj root-override trans))
|
|
)
|
|
((< 0.33333334 f0-2)
|
|
(play-ambient (-> 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)
|
|
)
|
|
)
|
|
(play-ambient
|
|
(-> obj ambient)
|
|
"GEO-AM07"
|
|
#f
|
|
(-> obj root-override trans)
|
|
)
|
|
)
|
|
)
|
|
((< 0.11111111 f0-2)
|
|
(play-ambient (-> obj ambient) "GEO-LO02" #f (-> obj root-override trans))
|
|
)
|
|
((closed?
|
|
(-> obj tasks)
|
|
(game-task village2-geologist-money)
|
|
(task-status need-resolution)
|
|
)
|
|
(play-ambient (-> obj ambient) "GEO-AM08" #f (-> obj root-override trans))
|
|
)
|
|
(else
|
|
(play-ambient (-> obj ambient) "GEO-LO01" #f (-> obj root-override trans))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defmethod init-from-entity! geologist ((obj geologist) (arg0 entity-actor))
|
|
(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)
|
|
)
|
|
|
|
|
|
|
|
|