jak-project/goal_src/jak2/engine/sound/speech-h.gc
Hat Kid 4ee402984f
decomp: citizen-* files, metalhead-* files, civilian, guard, hal3-course (#2194)
No more ghost town!

Manual patches:

- `hal3-course`: In `(anon-function 17 hal3-course)`, the decompiler is
doing something strange with `s3-0` that fails to compile, so I just
removed the `set!` and inlined the condition in the `when`.
- `guard`: Rewrote `(.mula.s)` stuff
2023-02-07 19:56:06 -05:00

117 lines
3.6 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: speech-h.gc
;; name in dgo: speech-h
;; dgos: ENGINE, GAME
;; NOTE - for settings
(declare-type speech-control structure)
(define-extern *speech-control* speech-control)
;; +++speech-type-flag
(defenum speech-type-flag
:type uint8
:bitfield #t
(random-order 0)
)
;; ---speech-type-flag
;; +++speech-type
(defenum speech-type
:type int8
:bitfield #t
(speech-type-0 0)
(speech-type-1 1)
(speech-type-2 2)
(speech-type-3 3)
(speech-type-4 4)
(speech-type-5 5)
)
;; ---speech-type
;; +++speech-channel-flag
(defenum speech-channel-flag
:type uint8
:bitfield #t
(disable 0)
)
;; ---speech-channel-flag
;; DECOMP BEGINS
(deftype speech-type-info (structure)
((channel uint8 :offset-assert 0)
(flags speech-type-flag :offset-assert 1)
(priority int8 :offset-assert 2)
(request-timeout uint16 :offset-assert 4)
(min-delay uint16 :offset-assert 6)
(max-delay uint16 :offset-assert 8)
(delay uint16 :offset-assert 10)
(play-index int16 :offset-assert 12)
(list (array string) :offset-assert 16)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
(deftype speech-request (structure)
((handle handle :offset-assert 0)
(time time-frame :offset-assert 8)
(priority float :offset-assert 16)
(speech-type speech-type :offset-assert 20)
)
:pack-me
:method-count-assert 9
:size-assert #x15
:flag-assert #x900000015
)
(deftype speech-channel (structure)
((flags speech-channel-flag :offset-assert 0)
(gui-channel gui-channel :offset-assert 1)
(delay uint16 :offset-assert 2)
(id sound-id :offset-assert 4)
(update-time time-frame :offset-assert 8)
(start-time time-frame :offset-assert 16)
(end-time time-frame :offset-assert 24)
(request speech-request :inline :offset-assert 32)
(last-request speech-request :inline :offset-assert 56)
(target-pos vector :inline :offset-assert 80)
(speech-table (pointer speech-type-info) :offset-assert 96)
)
:method-count-assert 14
:size-assert #x64
:flag-assert #xe00000064
(:methods
(speech-channel-method-9 (_type_ process-drawable speech-type) none 9)
(speech-channel-method-10 (_type_ handle) none 10)
(speech-channel-method-11 (_type_) none 11)
(speech-channel-method-12 (_type_) none 12)
(speech-channel-method-13 (_type_) none 13)
)
)
(deftype speech-control (structure)
((channel-array speech-channel 2 :inline :offset-assert 0)
(speech-table speech-type-info 57 :offset-assert 224)
)
:method-count-assert 17
:size-assert #x1c4
:flag-assert #x11000001c4
(:methods
(speech-control-method-9 (_type_) none 9)
(speech-control-method-10 (_type_ int speech-type-info) none 10)
(speech-control-method-11 (_type_) none 11)
(speech-control-method-12 (_type_ process-drawable speech-type) none 12)
(speech-control-method-13 (_type_ handle) none 13)
(speech-control-method-14 (_type_) none 14)
(speech-control-method-15 (_type_ process-drawable) none 15)
(speech-control-method-16 (_type_) none 16)
)
)