mirror of
https://github.com/open-goal/jak-project
synced 2026-05-29 16:45:10 -04:00
03ffb97176
* define every skeleton-group, name every inherited virtual state * typo!
175 lines
6.1 KiB
Common Lisp
175 lines
6.1 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: task-control-h.gc
|
|
;; name in dgo: task-control-h
|
|
;; dgos: GAME, ENGINE
|
|
|
|
;; 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)
|
|
|
|
;; 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-game-task (_type_) game-task 9)
|
|
(get-task-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)
|
|
(dummy-10 () none 10)
|
|
(dummy-11 () none 11)
|
|
)
|
|
)
|
|
|
|
(deftype process-taskable (process-drawable)
|
|
((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 uint64 :offset-assert 264)
|
|
(cam-joint-index int32 :offset-assert 272)
|
|
(skippable basic :offset-assert 276)
|
|
(blend-on-exit basic :offset-assert 280)
|
|
(camera uint64 :offset-assert 288)
|
|
(will-talk basic :offset-assert 296)
|
|
(talk-message uint32 :offset-assert 300)
|
|
(last-talk uint64 :offset-assert 304)
|
|
(bounce-away basic :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 basic :offset-assert 348)
|
|
(sound-flava uint8 :offset-assert 352)
|
|
(have-flava basic :offset-assert 356)
|
|
(music basic :offset-assert 360)
|
|
(have-music basic :offset-assert 364)
|
|
(been-kicked basic :offset-assert 368)
|
|
(cur-trans-hook basic :offset-assert 372)
|
|
(shadow-backup basic :offset-assert 376)
|
|
)
|
|
:heap-base #x110
|
|
:method-count-assert 53
|
|
:size-assert #x17c
|
|
:flag-assert #x350110017c
|
|
(:methods
|
|
(dummy-20 () none 20)
|
|
(give-cell () none 21) ;; state
|
|
(dummy-22 () none 22)
|
|
(enter-playing () none 23) ;; state
|
|
(play-accept () none 24) ;; state
|
|
(dummy-25 () none 25)
|
|
(query () none 26) ;; state
|
|
(play-anim () none 27) ;; state
|
|
(hidden () none 28) ;; state
|
|
(dummy-29 () none 29)
|
|
(idle () none 30) ;; state
|
|
(dummy-31 (_type_) none 31)
|
|
(dummy-32 (_type_ symbol) spool-anim 32)
|
|
(dummy-33 (_type_) none 33)
|
|
(dummy-34 (_type_) none 34)
|
|
(dummy-35 (_type_) none 35)
|
|
(dummy-36 (_type_) none 36)
|
|
(dummy-37 (_type_) none 37)
|
|
(dummy-38 (_type_) none 38)
|
|
(dummy-39 (_type_) none 39)
|
|
(dummy-40 (_type_ object skeleton-group int int vector int) none 40)
|
|
(dummy-41 (_type_) none 41)
|
|
(dummy-42 (_type_) none 42)
|
|
(dummy-43 (_type_) none 43)
|
|
(dummy-44 (_type_) none 44)
|
|
(dummy-45 (_type_) none 45)
|
|
(dummy-46 (_type_) none 46)
|
|
(dummy-47 (_type_) none 47)
|
|
(dummy-48 (_type_) none 48)
|
|
(dummy-49 (_type_) none 49)
|
|
(dummy-50 (_type_) none 50)
|
|
(dummy-51 (_type_) none 51)
|
|
(dummy-52 (_type_) none 52)
|
|
)
|
|
)
|
|
|
|
(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))
|