d/jak2: decompile ambient | speech and bigmap-data (#1954)

fma-sphere not completed due to #1888
This commit is contained in:
Tyler Wilding
2022-10-16 18:09:15 -04:00
committed by GitHub
parent d402ad8918
commit e7bb0fb68d
32 changed files with 33516 additions and 315 deletions
+11 -11
View File
@@ -19,9 +19,9 @@
:size-assert #x18
:flag-assert #xe00000018
(:methods
(talker-speech-class-method-9 () none 9)
(talker-speech-class-method-9 (_type_) symbol 9)
(talker-speech-class-method-10 (_type_) none 10)
(talker-speech-class-method-11 () none 11)
(talker-speech-class-method-11 (_type_) none 11)
(talker-speech-class-method-12 (_type_ int) none 12)
(talker-speech-class-method-13 (_type_ int) none 13)
)
@@ -56,22 +56,22 @@
(total-off-time time-frame :offset-assert 160)
(start-time time-frame :offset-assert 168)
(state-time time-frame :offset-assert 176)
(voicebox uint64 :offset-assert 184)
(voice-id uint32 :offset-assert 192)
(message-id uint32 :offset-assert 196)
(voicebox handle :offset-assert 184)
(voice-id sound-id :offset-assert 192)
(message-id sound-id :offset-assert 196)
(region region :offset-assert 200)
(interp float :offset-assert 204)
(save? basic :offset-assert 208)
(save? symbol :offset-assert 208)
)
:heap-base #x60
:method-count-assert 18
:size-assert #xd4
:flag-assert #x12006000d4
(:methods
(talker-method-14 () _type_ :state 14)
(talker-method-15 () none 15)
(talker-method-16 () none 16)
(talker-method-17 () none 17)
(idle () _type_ :state 14)
(active () _type_ :state 15)
(exit () _type_ :state 16)
(talker-method-17 (_type_) none 17)
)
)
@@ -84,7 +84,7 @@
(let ((t9-0 (method-of-type process inspect)))
(t9-0 obj)
)
(format #t "~2Ttrans: ~`vector`P~%" (-> obj stack))
(format #t "~2Ttrans: ~`vector`P~%" (-> obj trans))
(format #t "~2Tmessage: #<talker-speech-class @ #x~X>~%" (-> obj message))
(format #t "~2Ttotal-time: ~D~%" (-> obj total-time))
(format #t "~2Ttotal-off-time: ~D~%" (-> obj total-off-time))
+563
View File
@@ -0,0 +1,563 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function can-display-query?
(defun can-display-query? ((arg0 process) (arg1 string) (arg2 float))
(let ((a1-3 (gui-control-method-12
*gui-control*
arg0
(gui-channel query)
(gui-action play)
(if arg1
arg1
(symbol->string (-> arg0 type symbol))
)
0
arg2
(new 'static 'sound-id)
)
)
)
(= (gui-control-method-17 *gui-control* a1-3) (gui-action playing))
)
)
;; definition for function talker-surpress!
;; WARN: Return type mismatch int vs none.
(defun talker-surpress! ()
(set! (-> *game-info* hint-play-time) (-> *display* base-clock frame-counter))
0
(none)
)
;; definition for function talker-displayed?
(defun talker-displayed? ()
#f
)
;; definition for function kill-current-talker
;; WARN: Return type mismatch int vs none.
(defun kill-current-talker ((arg0 symbol) (arg1 pair) (arg2 symbol))
(if (not (member 'daxter arg1))
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel daxter)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(if (not (member 'voicebox arg1))
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel voicebox)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(if (not (member 'message arg1))
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel message)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(when (not (member 'notice arg1))
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel notice)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel notice-low)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
0
(none)
)
;; definition for function string->talker-speech
(defun string->talker-speech ((arg0 string))
(dotimes (s5-0 465)
(let ((s4-0 (-> *talker-speech* s5-0)))
(if (string= arg0 (-> s4-0 name))
(return s4-0)
)
)
)
(-> *talker-speech* 0)
)
;; definition for method 9 of type talker-speech-class
(defmethod talker-speech-class-method-9 talker-speech-class ((obj talker-speech-class))
(and (>= (-> *game-info* unknown-pad6 (* (-> obj speech) 2)) (-> obj pos))
(>= (-> obj neg) (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1)))
)
)
;; definition for method 10 of type talker-speech-class
;; WARN: Return type mismatch int vs none.
(defmethod talker-speech-class-method-10 talker-speech-class ((obj talker-speech-class))
(set! (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1)) (the-as uint #xffff))
0
(none)
)
;; definition for method 11 of type talker-speech-class
;; WARN: Return type mismatch int vs none.
(defmethod talker-speech-class-method-11 talker-speech-class ((obj talker-speech-class))
(set! (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1)) (the-as uint 0))
0
(none)
)
;; definition for method 12 of type talker-speech-class
;; WARN: Return type mismatch int vs none.
(defmethod talker-speech-class-method-12 talker-speech-class ((obj talker-speech-class) (arg0 int))
(if (>= arg0 0)
(set! (-> *game-info* unknown-pad6 (* (-> obj speech) 2))
(the-as uint (seekl (the-as int (-> *game-info* unknown-pad6 (* (-> obj speech) 2))) #xfff0 arg0))
)
(set! (-> *game-info* unknown-pad6 (* (-> obj speech) 2))
(the-as uint (seekl (the-as int (-> *game-info* unknown-pad6 (* (-> obj speech) 2))) 0 (- arg0)))
)
)
(if (talker-speech-class-method-9 obj)
(talker-spawn-func obj *entity-pool* (target-pos 0) (the-as region #f))
)
0
(none)
)
;; definition for method 13 of type talker-speech-class
;; WARN: Return type mismatch int vs none.
(defmethod talker-speech-class-method-13 talker-speech-class ((obj talker-speech-class) (arg0 int))
(if (>= arg0 0)
(set! (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1))
(the-as uint (seekl (the-as int (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1))) #xfff0 arg0))
)
(set! (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1))
(the-as uint (seekl (the-as int (-> *game-info* unknown-pad6 (+ (* (-> obj speech) 2) 1))) 0 (- arg0)))
)
)
0
(none)
)
;; definition for function talker-spawn-func
(defun talker-spawn-func ((arg0 talker-speech-class) (arg1 process-tree) (arg2 vector) (arg3 region))
(local-vars (s2-0 int))
(when (or (not arg0) (zero? (-> arg0 speech)) (not (talker-speech-class-method-9 arg0)))
(set! s2-0 0)
(goto cfg-27)
)
(if (and (or (not (-> *setting-control* user-current play-hints))
(= (-> *setting-control* user-current dialog-volume) 0.0)
)
(logtest? (-> arg0 flags) 1)
)
(talker-speech-class-method-10 arg0)
)
(set! s2-0 (gui-control-method-14 *gui-control* (-> arg0 name) (-> arg0 channel) (gui-action none)))
(set! s2-0 (cond
((zero? s2-0)
(let ((v1-17 (process-spawn talker :init talker-init arg0 arg2 arg3 :to arg1)))
(cond
(v1-17
(if (nonzero? (-> (the-as talker (-> v1-17 0)) voice-id))
(the-as int (-> (the-as talker (-> v1-17 0)) voice-id))
(the-as int (-> (the-as talker (-> v1-17 0)) message-id))
)
)
(else
(empty)
s2-0
)
)
)
)
(else
(empty)
s2-0
)
)
)
(label cfg-27)
s2-0
)
;; definition for function talker-init
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior talker-init talker ((arg0 talker-speech-class) (arg1 vector) (arg2 region))
(set! (-> self trans quad) (-> arg1 quad))
(let ((v1-2 (shr (the-as int (-> arg0 channel)) 4)))
(if (not (or (or (= v1-2 4) (= v1-2 5))
(or (not (-> *setting-control* user-current play-hints))
(= (-> *setting-control* user-current dialog-volume) 0.0)
)
)
)
(set! (-> self voice-id)
(gui-control-method-9 *gui-control* self (-> arg0 channel) (gui-action queue) (-> arg0 name) 81920.0 0)
)
)
)
(when (nonzero? (-> arg0 text-message))
(let* ((a0-6 *gui-control*)
(t9-1 (method-of-object a0-6 gui-control-method-9))
(a1-3 self)
(v1-15 (shr (the-as int (-> arg0 channel)) 4))
)
(set! (-> self message-id) (t9-1
a0-6
a1-3
(if (or (= v1-15 4) (= v1-15 5))
(the-as gui-channel (the-as int (-> arg0 channel)))
(gui-channel message)
)
(gui-action play)
(-> arg0 name)
81920.0
0
)
)
)
)
(set! (-> self message) arg0)
(set! (-> self region) arg2)
(set! (-> self total-time) 0)
(set! (-> self total-off-time) 0)
(set! (-> self start-time) (-> self clock frame-counter))
(set! (-> self voicebox) (the-as handle #f))
(set! (-> self save?) #f)
(if (logtest? (-> self message flags) 96)
(set! (-> self interp) 0.0)
(set! (-> self interp) 1.0)
)
(go-virtual idle)
0
(none)
)
;; definition for method 10 of type talker
(defmethod deactivate talker ((obj talker))
(send-event (handle->process (-> obj voicebox)) 'die)
((the-as (function process none) (find-parent-method talker 10)) obj)
(none)
)
;; definition for method 17 of type talker
;; WARN: Return type mismatch int vs none.
(defmethod talker-method-17 talker ((obj talker))
(let ((gp-0 (new
'stack
'font-context
*font-default-matrix*
36
310
0.0
(font-color default-#cddbcd)
(font-flags shadow kerning)
)
)
)
(let ((f0-0 320.0))
(let ((v1-2 gp-0))
(set! (-> v1-2 scale) 0.75)
)
(case (-> obj message channel)
(((gui-channel notice))
(cond
((logtest? (-> obj message flags) 128)
(let ((v1-9 gp-0)
(a1-1 36)
(a0-4 140)
)
(set! (-> v1-9 origin x) (the float a1-1))
(set! (-> v1-9 origin y) (the float a0-4))
)
)
(else
(let ((v1-10 gp-0))
(set! (-> v1-10 scale) 0.6)
)
(let ((v1-11 gp-0)
(a1-2 36)
(a0-6 160)
)
(set! (-> v1-11 origin x) (the float a1-2))
(set! (-> v1-11 origin y) (the float a0-6))
)
)
)
(set! f0-0 160.0)
)
)
(let ((v1-14 gp-0))
(set! (-> v1-14 width) (the float (the-as float #x1b8)))
)
(let ((v1-15 gp-0))
(set! (-> v1-15 height) (the float (the-as float #x8c)))
)
(set! (-> gp-0 flags) (font-flags shadow kerning middle large))
(if (logtest? (-> obj message flags) 32)
(set! (-> gp-0 alpha) (-> obj interp))
(set! (-> gp-0 alpha) 1.0)
)
(when (logtest? (-> obj message flags) 64)
(let ((s4-0 gp-0)
(s3-0 36)
(v1-27 (the int (lerp-scale 400.0 f0-0 (-> obj interp) 0.0 1.0)))
)
(set! (-> s4-0 origin x) (the float s3-0))
(set! (-> s4-0 origin y) (the float v1-27))
)
)
)
(let ((s4-1 print-game-text)
(a0-11 (lookup-text! *common-text* (the-as game-text-id (-> obj message text-message)) #f))
(a2-3 #f)
(a3-2 44)
(v1-31 (-> obj message channel))
)
(s4-1
a0-11
gp-0
a2-3
a3-2
(if (or (= v1-31 (gui-channel notice)) (= v1-31 (gui-channel notice-low)) (= v1-31 (gui-channel subtitle)))
322
320
)
)
)
)
0
(none)
)
;; failed to figure out what this is:
(defstate idle (talker)
:virtual #t
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (the-as time-frame (-> self message delay)))
(suspend)
)
)
(case (-> self message channel)
(((gui-channel voicebox))
(if *target*
(set! (-> self voicebox) (ppointer->handle (voicebox-spawn *target* (target-pos 0))))
)
)
)
(while (< (- (-> self clock frame-counter) (-> self start-time)) (the-as time-frame (+ (-> self message delay) 300)))
(if (and (or (zero? (-> self voice-id)) (= (gui-control-method-17 *gui-control* (-> self voice-id)) (gui-action play)))
(or (zero? (-> self message-id))
(= (gui-control-method-17 *gui-control* (-> self message-id)) (gui-action playing))
)
)
(go-virtual active)
)
(suspend)
)
(go-virtual exit)
(none)
)
)
;; failed to figure out what this is:
(defstate active (talker)
:virtual #t
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(if (logtest? (-> self message flags) 1)
(talker-speech-class-method-10 (-> self message))
)
(set-setting! 'hint (process->ppointer self) 0 0)
(set-setting! 'speech-control #f 0 0)
(if (nonzero? (-> self voice-id))
(gui-control-method-16
*gui-control*
(gui-action play)
(-> self voice-id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(when (and (nonzero? (-> self voice-id)) (logtest? (-> self message flags) 2))
(add-setting! 'music-volume 'rel (-> *setting-control* user-current music-volume-movie) 0)
(add-setting! 'sfx-volume 'rel (-> *setting-control* user-current sfx-movie-volume) 0)
(add-setting! 'dialog-volume 'rel (-> *setting-control* user-current dialog-volume-hint) 0)
)
(if (logtest? (-> self message flags) 4)
(auto-save-user)
)
(apply-settings *setting-control*)
(none)
)
:exit (behavior ()
(let ((gp-0 (-> self message on-close)))
(when gp-0
(let* ((s5-0 (handle->process (-> self voicebox)))
(v1-5 (if (type? s5-0 process-drawable)
(the-as process-drawable s5-0)
)
)
)
(eval!
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (if v1-5
(-> v1-5 root trans)
)
)
(the-as pair gp-0)
)
)
)
)
(when (and (logtest? (-> self message flags) 8) (not (-> self save?)))
(set! (-> self save?) #t)
(auto-save-user)
)
(if (nonzero? (-> self voice-id))
(gui-control-method-16
*gui-control*
(gui-action stop)
(-> self voice-id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(if (nonzero? (-> self message-id))
(gui-control-method-16
*gui-control*
(gui-action stop)
(-> self message-id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
)
(remove-setting! 'music-volume)
(remove-setting! 'sfx-volume)
(remove-setting! 'dialog-volume)
(remove-setting! 'hint)
(remove-setting! 'speech-control)
(apply-settings *setting-control*)
(none)
)
:code (behavior ()
(local-vars (v1-43 symbol))
(let ((gp-1 (zero? (logand (-> self message flags) 2))))
(while (or (and (nonzero? (-> self voice-id))
(let ((v1-34 (gui-control-method-17 *gui-control* (-> self voice-id))))
(or (= v1-34 (gui-action play)) (= v1-34 (gui-action playing)))
)
(begin
(dotimes (s5-2 4)
(when (and (string-charp= (-> self message name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s5-2)))
(= (-> self voice-id) (-> *sound-iop-info* stream-id s5-2))
(logtest? (-> *sound-iop-info* stream-status s5-2) (stream-status ststatus-six))
)
(set! v1-43 #f)
(goto cfg-39)
)
)
(set! v1-43 #t)
(label cfg-39)
(and v1-43 (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 120)))
)
)
(and (nonzero? (-> self message-id))
(= (gui-control-method-17 *gui-control* (-> self message-id)) (gui-action playing))
(or (< (- (-> self clock frame-counter) (-> self state-time)) (the-as time-frame (-> self message text-duration)))
(and (logtest? (-> self message flags) 16) (-> self region) (region-method-9 (-> self region) (target-pos 0)))
)
)
(< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05))
)
(when (and (nonzero? (-> self voice-id))
(not gp-1)
(zero? (gui-control-method-17 *gui-control* (-> self voice-id)))
)
(remove-setting! 'music-volume)
(remove-setting! 'sfx-volume)
(remove-setting! 'dialog-volume)
(set! gp-1 #t)
)
(when (and (nonzero? (-> self message-id))
(= (gui-control-method-17 *gui-control* (-> self message-id)) (gui-action playing))
(not (paused?))
)
(if (logtest? (-> self message flags) 32)
(seek! (-> self interp) 1.0 (* 0.5 (-> self clock seconds-per-frame)))
(seek! (-> self interp) 1.0 (* 4.0 (-> self clock seconds-per-frame)))
)
(talker-method-17 self)
)
(suspend)
)
)
(when (and (nonzero? (-> self message-id)) (logtest? (-> self message flags) 96))
(while (!= (-> self interp) 0.0)
(if (logtest? (-> self message flags) 32)
(seek! (-> self interp) 0.0 (* 0.5 (-> self clock seconds-per-frame)))
(seek! (-> self interp) 0.0 (* 4.0 (-> self clock seconds-per-frame)))
)
(talker-method-17 self)
(suspend)
)
)
(when (and (logtest? (-> self message flags) 8) (not (-> self save?)))
(let ((gp-2 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 1))
(suspend)
)
)
(set! (-> self save?) #t)
(auto-save-user)
)
(go-virtual exit)
(none)
)
)
;; failed to figure out what this is:
(defstate exit (talker)
:virtual #t
:code (the-as (function none :behavior talker) nothing)
)
+1 -1
View File
@@ -144,7 +144,7 @@
(deftype gcf-control (structure)
((matrix matrix :inline :offset-assert 0)
(giftag generic-gif-tag :inline :offset-assert 64)
(adnops uint32 2 :offset-assert 80)
(adnops gs-adcmd 2 :inline :offset-assert 80)
(num-strips uint32 :offset 76)
(num-dps uint32 :offset 92)
(kick-offset uint32 :offset 108)
+9 -9
View File
@@ -7,9 +7,9 @@
(flags lightning-spec-flags :offset-assert 8)
(rand-func uint8 :offset-assert 10)
(adjust-distance uint8 :offset-assert 11)
(start-color uint32 :offset-assert 12)
(end-color uint32 :offset-assert 16)
(fade-to-color uint32 :offset-assert 20)
(start-color rgba :offset-assert 12)
(end-color rgba :offset-assert 16)
(fade-to-color rgba :offset-assert 20)
(fade-start-factor float :offset-assert 24)
(fade-time float :offset-assert 28)
(texture uint32 :offset-assert 32)
@@ -88,8 +88,8 @@
(line vector-array :offset-assert 128)
(meet vector-array :offset-assert 132)
(path vector-array :offset-assert 136)
(start-color uint32 :offset-assert 140)
(end-color uint32 :offset-assert 144)
(start-color rgba :offset-assert 140)
(end-color rgba :offset-assert 144)
)
:method-count-assert 9
:size-assert #x94
@@ -119,9 +119,9 @@
;; definition of type lightning-control
(deftype lightning-control (basic)
((spec lightning-spec :offset-assert 4)
(process process :offset-assert 8)
(state lightning-state :inline :offset-assert 16)
((spec lightning-spec :offset-assert 4)
(process (pointer process) :offset-assert 8)
(state lightning-state :inline :offset-assert 16)
)
:method-count-assert 14
:size-assert #xa4
@@ -252,7 +252,7 @@
)
(set! (-> obj state box-size) f0-0)
)
(set! (-> obj process) (the-as process (process->ppointer arg1)))
(set! (-> obj process) (process->ppointer arg1))
(set! (-> obj state mode) (lightning-mode lm1))
(set! (-> obj state line) ((method-of-type vector-array new) allocation vector-array s3-0))
(set! (-> obj state meet) ((method-of-type vector-array new) allocation vector-array s3-0))
+1
View File
@@ -776,6 +776,7 @@
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a1, v1]
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a2, a1]
(defun matrix-axis-sin-cos-vu! ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float))
"@unused"
(local-vars (a1-2 uint128) (a2-1 uint128) (a3-1 uint128) (a3-2 uint128))
(rlet ((vf0 :class vf)
(vf1 :class vf)
+26 -26
View File
@@ -46,10 +46,10 @@
;; definition of type speech-request
(deftype speech-request (structure)
((handle uint64 :offset-assert 0)
(time time-frame :offset-assert 8)
(priority float :offset-assert 16)
(speech-type int8 :offset-assert 20)
((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
@@ -74,27 +74,27 @@
;; definition of type speech-channel
(deftype speech-channel (structure)
((flags speech-channel-flag :offset-assert 0)
(gui-channel gui-channel :offset-assert 1)
(delay uint16 :offset-assert 2)
(id uint32 :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 uint32 :offset-assert 96)
((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 () none 9)
(speech-channel-method-10 () none 10)
(speech-channel-method-11 () none 11)
(speech-channel-method-12 () none 12)
(speech-channel-method-13 () none 13)
(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)
)
)
@@ -135,14 +135,14 @@
:size-assert #x1c4
:flag-assert #x11000001c4
(:methods
(speech-control-method-9 () none 9)
(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 () none 12)
(speech-control-method-13 () none 13)
(speech-control-method-14 () none 14)
(speech-control-method-15 () none 15)
(speech-control-method-16 () none 16)
(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)
)
)
+521
View File
@@ -0,0 +1,521 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 12 of type speech-channel
;; WARN: Return type mismatch int vs none.
(defmethod speech-channel-method-12 speech-channel ((obj speech-channel))
(set! (-> obj request handle) (the-as handle #f))
(set! (-> obj request priority) -10000000000000000000000000000000000000.0)
0
(none)
)
;; definition for method 13 of type speech-channel
;; WARN: Return type mismatch int vs none.
(defmethod speech-channel-method-13 speech-channel ((obj speech-channel))
(set! (-> obj id) (new 'static 'sound-id))
(set! (-> obj last-request handle) (the-as handle #f))
(set! (-> obj last-request priority) -10000000000000000000000000000000000000.0)
0
(none)
)
;; definition for method 11 of type speech-channel
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod speech-channel-method-11 speech-channel ((obj speech-channel))
(local-vars (v1-44 int))
(with-pp
(logclear! (-> obj flags) (speech-channel-flag disable))
(if (or (not (-> *setting-control* user-current speech-control))
(load-in-progress? *level*)
(nonzero? (-> obj id))
)
(logior! (-> obj flags) (speech-channel-flag disable))
)
(set! (-> obj target-pos quad) (-> (target-pos 0) quad))
(when (not (logtest? (-> obj flags) (speech-channel-flag disable)))
(let ((s5-1 (-> obj speech-table (-> obj request speech-type))))
(cond
(s5-1
(let ((a0-8 (- (-> obj update-time) (-> obj request time)))
(v1-20 (handle->process (-> obj request handle)))
)
(if (or (< (the-as time-frame (-> s5-1 request-timeout)) a0-8)
(or (not v1-20)
(let ((f0-0 245760.0))
(< (* f0-0 f0-0)
(vector-vector-distance-squared (-> obj target-pos) (-> (the-as process-drawable v1-20) root trans))
)
)
)
)
(speech-channel-method-12 obj)
)
)
(let ((s4-0 (handle->process (-> obj request handle))))
(when s4-0
(when (or (and (>= (-> obj request priority) 0.0)
(>= (- (-> pp clock frame-counter) (-> obj end-time)) (the-as time-frame (-> s5-1 delay)))
)
(and (>= (- (-> pp clock frame-counter) (-> obj end-time)) (the-as time-frame (-> s5-1 delay)))
(>= (- (-> pp clock frame-counter) (-> obj end-time)) (the-as time-frame (-> obj delay)))
)
)
(let ((s3-0 (-> s5-1 list length))
(v1-43 (-> s5-1 play-index))
)
(when (> s3-0 0)
(cond
((logtest? (-> s5-1 flags) (speech-type-flag random-order))
(set! v1-44 (rand-vu-int-count s3-0))
(when (= v1-44 (-> s5-1 play-index))
(+! v1-44 1)
(if (>= v1-44 s3-0)
(set! v1-44 0)
)
)
)
(else
(set! v1-44 (+ v1-43 1))
(if (>= v1-44 s3-0)
(set! v1-44 0)
)
)
)
(set! (-> s5-1 play-index) v1-44)
(let ((s3-1 (-> s5-1 list v1-44)))
(mem-copy! (the-as pointer (-> obj last-request)) (the-as pointer (-> obj request)) 21)
(set! (-> obj start-time) (-> pp clock frame-counter))
(set! (-> obj delay)
(the-as uint (rand-vu-int-range (the-as int (-> s5-1 min-delay)) (the-as int (-> s5-1 max-delay))))
)
(set! (-> s5-1 delay) (-> obj delay))
(set! (-> obj id)
(gui-control-method-9 *gui-control* s4-0 (-> obj gui-channel) (gui-action play) s3-1 -99.0 0)
)
)
(speech-channel-method-12 obj)
(logior! (-> obj flags) (speech-channel-flag disable))
)
)
)
)
)
)
(else
(speech-channel-method-12 obj)
)
)
)
)
(set! (-> obj update-time) (-> pp clock frame-counter))
(when (nonzero? (-> obj id))
(let ((s4-1 (handle->process (-> obj last-request handle))))
(cond
((and s4-1 (-> *setting-control* user-current speech-control))
(when *sound-player-enable*
(let ((s5-2 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> s5-2 command) (sound-command set-param))
(set! (-> s5-2 id) (-> obj id))
(set! (-> s5-2 params fo-min) 15)
(set! (-> s5-2 params fo-max) 90)
(set! (-> s5-2 params fo-curve) 9)
(let ((a1-12 (-> (the-as process-drawable s4-1) root trans)))
(let ((s4-2 pp))
(when (= a1-12 #t)
(if (and s4-2 (type? s4-2 process-drawable) (nonzero? (-> (the-as process-drawable s4-2) root)))
(set! a1-12 (-> (the-as process-drawable s4-2) root trans))
(set! a1-12 (the-as vector #f))
)
)
)
(sound-trans-convert (the-as vector3w (-> s5-2 params trans)) a1-12)
)
(set! (-> s5-2 params mask) (the-as uint 480))
(-> s5-2 id)
)
)
)
(else
(gui-control-method-16
*gui-control*
(gui-action stop)
(-> obj id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(set! (-> obj id) (new 'static 'sound-id))
0
)
)
)
(case (gui-control-method-17 *gui-control* (-> obj id))
(((gui-action queue))
(when (>= (- (-> pp clock frame-counter) (-> obj start-time)) (seconds 1))
(gui-control-method-16
*gui-control*
(gui-action stop)
(-> obj id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(set! (-> obj id) (new 'static 'sound-id))
(set! (-> obj end-time) (-> obj update-time))
)
)
(((gui-action none))
(set! (-> obj id) (new 'static 'sound-id))
(set! (-> obj last-request handle) (the-as handle #f))
(set! (-> obj end-time) (-> obj update-time))
)
)
)
0
(none)
)
)
;; definition for method 9 of type speech-channel
;; WARN: Return type mismatch int vs none.
(defmethod speech-channel-method-9 speech-channel ((obj speech-channel) (arg0 process-drawable) (arg1 speech-type))
(with-pp
(let ((f0-0 (vector-vector-distance-squared (-> arg0 root trans) (-> obj target-pos)))
(f1-0 245760.0)
)
(when (< f0-0 (* f1-0 f1-0))
(let* ((f1-3 -1.0)
(f2-0 409600.0)
(f0-2 (+ (* f0-0 (/ f1-3 (* f2-0 f2-0))) (the float (-> obj speech-table arg1 priority))))
)
(when (< (-> obj request priority) f0-2)
(set! (-> obj request priority) f0-2)
(set! (-> obj request handle) (process->handle arg0))
(set! (-> obj request speech-type) arg1)
(set! (-> obj request time) (-> pp clock frame-counter))
)
)
)
)
0
(none)
)
)
;; definition for method 10 of type speech-channel
;; WARN: Return type mismatch int vs none.
(defmethod speech-channel-method-10 speech-channel ((obj speech-channel) (arg0 handle))
(when (= arg0 (handle->process (-> obj last-request handle)))
(gui-control-method-16
*gui-control*
(gui-action stop)
(-> obj id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(set! (-> obj id) (new 'static 'sound-id))
(set! (-> obj last-request handle) (the-as handle #f))
)
0
(none)
)
;; definition for method 12 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-12 speech-control ((obj speech-control) (arg0 process-drawable) (arg1 speech-type))
(let ((v1-2 (-> obj speech-table arg1)))
(when v1-2
(let ((a0-1 (-> obj channel-array (-> v1-2 channel))))
(if (not (logtest? (-> a0-1 flags) (speech-channel-flag disable)))
(speech-channel-method-9 a0-1 arg0 arg1)
)
)
)
)
0
(none)
)
;; definition for method 11 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-11 speech-control ((obj speech-control))
(dotimes (s5-0 2)
(speech-channel-method-11 (-> obj channel-array s5-0))
)
0
(none)
)
;; definition for method 10 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-10 speech-control ((obj speech-control) (arg0 int) (arg1 speech-type-info))
(set! (-> obj speech-table arg0) arg1)
0
(none)
)
;; definition for method 13 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-13 speech-control ((obj speech-control) (arg0 handle))
(dotimes (s4-0 2)
(speech-channel-method-10 (-> obj channel-array s4-0) arg0)
)
0
(none)
)
;; definition for method 14 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-14 speech-control ((obj speech-control))
(speech-control-method-9 obj)
(let ((s5-0 (-> obj channel-array)))
((method-of-type speech-channel speech-channel-method-13) (the-as speech-channel s5-0))
(set! (-> s5-0 0 speech-table) (-> obj speech-table))
(set! (-> s5-0 0 gui-channel) (gui-channel guard))
)
(let ((s5-1 (-> obj channel-array 1)))
(speech-channel-method-13 s5-1)
(set! (-> s5-1 speech-table) (-> obj speech-table))
(set! (-> s5-1 gui-channel) (gui-channel citizen))
)
0
(none)
)
;; definition for method 15 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-15 speech-control ((obj speech-control) (arg0 process-drawable))
(when (not (logtest? (-> obj channel-array 0 flags) (speech-channel-flag disable)))
(let ((v1-3 *target*))
(when v1-3
(cond
((logtest? (focus-status dark) (-> v1-3 focus-status))
(speech-control-method-12 obj arg0 (speech-type speech-type-3))
)
((logtest? (focus-status pilot) (-> v1-3 focus-status))
(speech-control-method-12 obj arg0 (speech-type speech-type-0 speech-type-1 speech-type-2))
)
(else
(speech-control-method-12 obj arg0 (speech-type speech-type-1 speech-type-2))
)
)
)
)
)
0
(none)
)
;; definition for method 16 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-16 speech-control ((obj speech-control))
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel guard)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(gui-control-method-16
*gui-control*
(gui-action stop)
(the-as sound-id 1)
(gui-channel citizen)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(dotimes (s5-0 2)
(speech-channel-method-12 (-> obj channel-array s5-0))
)
0
(none)
)
;; definition for method 9 of type speech-control
;; WARN: Return type mismatch int vs none.
(defmethod speech-control-method-9 speech-control ((obj speech-control))
(dotimes (v1-0 57)
(set! (-> obj speech-table v1-0) #f)
)
(dotimes (s5-0 2)
(speech-channel-method-12 (-> obj channel-array s5-0))
)
(speech-control-method-10 obj 0 (new 'static 'speech-type-info
:priority 3
:request-timeout #x12c
:min-delay #x12c
:max-delay #x12c
:list (new 'static 'boxed-array :type string)
)
)
(speech-control-method-10 obj 3 (new 'static 'speech-type-info
:priority 3
:request-timeout #x12c
:min-delay #x12c
:max-delay #x12c
:list (new 'static 'boxed-array :type string
"kg136"
"kg139"
"kg140"
"kg141"
"kg142"
"kg134"
"kg157"
"kg143"
"kg156"
"kg176"
"kg177"
"kg536"
"kg551"
)
)
)
(speech-control-method-10 obj 9 (new 'static 'speech-type-info
:priority 1
:min-delay #x258
:max-delay #x4b0
:list (new 'static 'boxed-array :type string
"kg133"
"kg135"
"kg137"
"kg138"
"kg144"
"kg145"
"kg146"
"kg147"
"kg148"
"kg149"
"kg150"
"kg151"
"kg152"
"kg153"
"kg154"
"kg155"
"kg158"
"kg159"
"kg160"
"kg163"
"kg164"
"kg507"
"kg508"
"kg509"
"kg511"
"kg513"
"kg514"
"kg515"
"kg516"
"kg517"
"kg518"
"kg520"
"kg521"
"kg523"
"kg526"
"kg527"
"kg528"
"kg529"
"kg530"
"kg532"
"kg534"
"kg535"
"kg537"
"kg538"
"kg539"
"kg540"
"kg541"
"kg542"
"kg543"
"kg544"
"kg545"
"kg546"
"kg549"
"kg550"
)
)
)
(speech-control-method-10 obj 10 (new 'static 'speech-type-info
:flags (speech-type-flag random-order)
:priority #xa
:request-timeout #x258
:min-delay #x258
:max-delay #x4b0
:list (new 'static 'boxed-array :type string
"kg165"
"kg165a"
"kg165b"
"kg166"
"kg166a"
"kg166b"
"kg167"
"kg167a"
"kg167b"
"kg168"
"kg168a"
"kg168b"
"kg169"
"kg169a"
"kg169b"
"kg170"
"kg170a"
"kg170b"
"kg171"
"kg171a"
"kg171b"
"kg172"
"kg172a"
"kg172b"
"kg173"
"kg173a"
"kg173b"
"kg174"
"kg174a"
"kg174b"
"kg175"
"kg175a"
"kg175b"
"kg510"
)
)
)
(speech-control-method-10 obj 11 (new 'static 'speech-type-info
:priority 2
:min-delay #x1e
:max-delay #x1e
:list (new 'static 'boxed-array :type string
"kg386a"
"kg428a"
"kg641"
"kg650"
"kg338a"
"kg339a"
"kg340a"
"kg341a"
"kg342a"
"kg343a"
"kg344a"
"kg512"
)
)
)
0
(none)
)
;; definition for symbol *speech-control*, type speech-control
(define *speech-control* (new 'static 'speech-control))
;; failed to figure out what this is:
(speech-control-method-14 *speech-control*)
+3 -3
View File
@@ -1515,9 +1515,9 @@
:name "lightning-darkjak-bomb1"
:flags (lightning-spec-flags lsf0 size-from-adjust-dist)
:adjust-distance #xa
:start-color #x80ffffff
:end-color #x80ffffff
:fade-to-color #x58f00bf
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:texture #xc08400
:reduction 0.42
File diff suppressed because it is too large Load Diff
+21 -21
View File
@@ -123,27 +123,27 @@
;; definition of type bigmap-compressed-layers
(deftype bigmap-compressed-layers (structure)
((data uint32 20 :offset-assert 0)
(layer0 uint32 :offset 0)
(layer1 uint32 :offset 4)
(layer2 uint32 :offset 8)
(layer3 uint32 :offset 12)
(layer4 uint32 :offset 16)
(layer5 uint32 :offset 20)
(layer6 uint32 :offset 24)
(layer7 uint32 :offset 28)
(layer8 uint32 :offset 32)
(layer9 uint32 :offset 36)
(layer10 uint32 :offset 40)
(layer11 uint32 :offset 44)
(layer12 uint32 :offset 48)
(layer13 uint32 :offset 52)
(layer14 uint32 :offset 56)
(layer15 uint32 :offset 60)
(layer16 uint32 :offset 64)
(layer17 uint32 :offset 68)
(layer18 uint32 :offset 72)
(layer19 uint32 :offset 76)
((data (pointer uint32) 20 :offset-assert 0)
(layer0 (pointer uint32) :offset 0)
(layer1 (pointer uint32) :offset 4)
(layer2 (pointer uint32) :offset 8)
(layer3 (pointer uint32) :offset 12)
(layer4 (pointer uint32) :offset 16)
(layer5 (pointer uint32) :offset 20)
(layer6 (pointer uint32) :offset 24)
(layer7 (pointer uint32) :offset 28)
(layer8 (pointer uint32) :offset 32)
(layer9 (pointer uint32) :offset 36)
(layer10 (pointer uint32) :offset 40)
(layer11 (pointer uint32) :offset 44)
(layer12 (pointer uint32) :offset 48)
(layer13 (pointer uint32) :offset 52)
(layer14 (pointer uint32) :offset 56)
(layer15 (pointer uint32) :offset 60)
(layer16 (pointer uint32) :offset 64)
(layer17 (pointer uint32) :offset 68)
(layer18 (pointer uint32) :offset 72)
(layer19 (pointer uint32) :offset 76)
)
:method-count-assert 9
:size-assert #x50
+12 -12
View File
@@ -151,9 +151,9 @@
:bolt-spec (new 'static 'lightning-spec
:name #f
:flags (lightning-spec-flags lsf2)
:start-color #x80ffffff
:end-color #x80000000
:fade-to-color #x58f00bf
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture #xc08300
@@ -170,9 +170,9 @@
:name #f
:flags (lightning-spec-flags lsf2)
:rand-func #x3
:start-color #x80ffffff
:end-color #x80ffffff
:fade-to-color #x58f00bf
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture #xc08300
@@ -1124,9 +1124,9 @@
:bolt-spec (new 'static 'lightning-spec
:name #f
:flags (lightning-spec-flags lsf2)
:start-color #x80ffffff
:end-color #x80000000
:fade-to-color #x58f00bf
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture #xc08300
@@ -1143,9 +1143,9 @@
:name #f
:flags (lightning-spec-flags lsf2)
:rand-func #x3
:start-color #x80ffffff
:end-color #x80ffffff
:fade-to-color #x58f00bf
:start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
:fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
:fade-start-factor 0.2
:fade-time 120.0
:texture #xc08300