mirror of
https://github.com/open-goal/jak-project
synced 2026-06-09 04:40:19 -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?`
184 lines
6.8 KiB
Common Lisp
184 lines
6.8 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: task-control-h.gc
|
|
;; name in dgo: task-control-h
|
|
;; dgos: GAME, ENGINE
|
|
|
|
;; for process-taskable
|
|
(declare-type process-taskable process-drawable)
|
|
(define-extern othercam-init-by-other (function process-taskable symbol symbol symbol none :behavior othercam))
|
|
|
|
;; There are a fixed number of game tasks. Most are just getting a power cell,
|
|
;; but there are also ones for using the levitator etc.
|
|
|
|
;; The list of all tasks is the game-task enum in game-info-h.gc
|
|
|
|
;; the task control contains a list of all cstage.
|
|
;; Each task may have multiple cstages.
|
|
;; Each cstage corresponds to a game-task and a task-status.
|
|
|
|
;; There is a concept of a "current stage" being played, but it may sometimes be invalid (-1).
|
|
;; it is an index into the task-control list
|
|
|
|
;; names from task-status->string function
|
|
;; the status value will increase.
|
|
;; some tasks may do their own thing and not use these values.
|
|
(defenum task-status
|
|
:type uint64
|
|
(invalid 0)
|
|
(unknown 1)
|
|
(need-hint 2)
|
|
(need-introduction 3)
|
|
(need-reminder-a 4)
|
|
(need-reminder 5)
|
|
(need-reward-speech 6)
|
|
(need-resolution 7)
|
|
)
|
|
|
|
;; our names
|
|
(defenum task-flags
|
|
:type uint8
|
|
:bitfield #t
|
|
(closed 0)
|
|
(has-entity 1)
|
|
(closed-by-default 2)
|
|
)
|
|
|
|
(declare-type task-control basic)
|
|
|
|
;; decomp begins
|
|
|
|
;; A task-cstage describes
|
|
(deftype task-cstage (structure)
|
|
((game-task game-task :offset-assert 0)
|
|
(status task-status :offset-assert 8)
|
|
(flags task-flags :offset-assert 16)
|
|
(condition (function task-control symbol) :offset-assert 20)
|
|
)
|
|
:method-count-assert 16
|
|
:size-assert #x18
|
|
:flag-assert #x1000000018
|
|
(:methods
|
|
(get-task (_type_) game-task 9)
|
|
(get-status (_type_) task-status 10)
|
|
(task-available? (_type_ task-control) symbol 11)
|
|
(closed? (_type_) symbol 12)
|
|
(closed-by-default? (_type_) symbol 13)
|
|
(close-task! (_type_) int 14)
|
|
(open-task! (_type_) int 15)
|
|
)
|
|
)
|
|
|
|
(deftype task-control (basic)
|
|
((current-stage int16 :offset-assert 4)
|
|
(stage (array task-cstage) :offset-assert 8)
|
|
)
|
|
:method-count-assert 19
|
|
:size-assert #xc
|
|
:flag-assert #x130000000c
|
|
(:methods
|
|
(current-task (_type_) int 9)
|
|
(current-status (_type_) int 10)
|
|
(close-current! (_type_) none 11)
|
|
(close-status! (_type_ task-status) int 12)
|
|
(first-any (_type_ symbol) int 13)
|
|
(reset! (_type_ symbol symbol) int 14)
|
|
(closed? (_type_ game-task task-status) symbol 15)
|
|
(get-reminder (_type_ int) int 16)
|
|
(save-reminder (_type_ int int) int 17)
|
|
(exists? (_type_ game-task task-status) symbol 18)
|
|
)
|
|
)
|
|
|
|
(deftype ambient-control (structure)
|
|
((last-ambient-time uint64 :offset-assert 0)
|
|
(last-ambient basic :offset-assert 8)
|
|
(last-ambient-id uint32 :offset-assert 12)
|
|
)
|
|
:method-count-assert 12
|
|
:size-assert #x10
|
|
:flag-assert #xc00000010
|
|
(:methods
|
|
(dummy-9 (_type_ vector int float process-drawable) none 9)
|
|
(TODO-RENAME-10 (_type_ vector int float process-drawable) vector 10)
|
|
(dummy-11 (_type_ string symbol vector) symbol 11)
|
|
)
|
|
)
|
|
|
|
(deftype process-taskable (process-drawable)
|
|
((root-override collide-shape :score 100 :offset 112)
|
|
(tasks task-control :offset-assert 176)
|
|
(query gui-query :inline :offset-assert 180)
|
|
(old-target-pos transformq :inline :offset-assert 208)
|
|
(cell-for-task game-task :offset-assert 256)
|
|
(cell-x handle :offset-assert 264)
|
|
(cam-joint-index int32 :offset-assert 272)
|
|
(skippable basic :offset-assert 276) ;; probably a symbol
|
|
(blend-on-exit basic :offset-assert 280) ;; probably a symbol?
|
|
(camera handle :offset-assert 288)
|
|
(will-talk symbol :offset-assert 296)
|
|
(talk-message uint32 :offset-assert 300)
|
|
(last-talk uint64 :offset-assert 304)
|
|
(bounce-away symbol :offset-assert 312)
|
|
(ambient ambient-control :inline :offset-assert 320)
|
|
(center-joint-index int32 :offset-assert 336)
|
|
(draw-bounds-y-offset float :offset-assert 340)
|
|
(neck-joint-index int32 :offset-assert 344)
|
|
(fuel-cell-anim spool-anim :offset-assert 348)
|
|
(sound-flava uint8 :offset-assert 352)
|
|
(have-flava symbol :offset-assert 356) ;; probably
|
|
(music basic :offset-assert 360)
|
|
(have-music symbol :offset-assert 364) ;; probably
|
|
(been-kicked symbol :offset-assert 368) ;; probably
|
|
(cur-trans-hook (function none) :offset-assert 372)
|
|
(shadow-backup shadow-geo :offset-assert 376)
|
|
)
|
|
:heap-base #x110
|
|
:method-count-assert 53
|
|
:size-assert #x17c
|
|
:flag-assert #x350110017c
|
|
(:methods
|
|
(release () _type_ :state 20)
|
|
(give-cell () _type_ :state 21) ;; state
|
|
(lose () _type_ :state 22)
|
|
(enter-playing () _type_ :state 23) ;; state
|
|
(play-accept () _type_ :state 24) ;; state
|
|
(play-reject () _type_ :state 25)
|
|
(query () _type_ :state 26) ;; state
|
|
(play-anim () _type_ :state 27) ;; state
|
|
(hidden () _type_ :state 28) ;; state
|
|
(be-clone (handle) _type_ :state 29)
|
|
(idle () _type_ :state 30) ;; state
|
|
(get-art-elem (_type_) art-element 31)
|
|
(play-anim! (_type_ symbol) basic 32) ;; ret - spool-anim | ..
|
|
(dummy-33 (_type_) none 33)
|
|
(TODO-RENAME-34 (_type_ symbol) symbol 34)
|
|
(dummy-35 (_type_) none 35)
|
|
(get-spool-anim-or-?? (_type_ symbol) basic 36) ;; ret - spool-anim | ..
|
|
(spool-push-anim (_type_) none 37)
|
|
(dummy-38 (_type_) none 38)
|
|
(should-display? (_type_) symbol 39)
|
|
(dummy-40 (_type_ object skeleton-group int int vector int) none 40)
|
|
(initialize-collision (_type_ int vector) none 41)
|
|
(dummy-42 (_type_) none 42)
|
|
(TODO-RENAME-43 (_type_) symbol 43)
|
|
(play-reminder (_type_) symbol 44)
|
|
(dummy-45 (_type_) none 45)
|
|
(dummy-46 (_type_) none 46)
|
|
(target-above-threshold? (_type_) symbol 47)
|
|
(draw-npc-shadow (_type_) none 48)
|
|
(hidden-other () _type_ :state 49)
|
|
(TODO-RENAME-50 (_type_) symbol 50)
|
|
(close-anim-file! (_type_) symbol 51)
|
|
(dummy-52 (_type_) none 52)
|
|
)
|
|
)
|
|
|
|
(defun-extern task-known? game-task symbol)
|
|
|
|
(define-extern task-closed? (function game-task task-status symbol))
|
|
(define-extern get-task-status (function game-task task-status))
|
|
(define-extern get-task-control (function game-task task-control))
|
|
(define-extern close-specific-task! (function game-task task-status int))
|