jak-project/goal_src/jak2/engine/game/settings.gc
2022-11-21 20:25:20 -05:00

1646 lines
59 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: settings.gc
;; name in dgo: settings
;; dgos: ENGINE, GAME
;; NOTE - for text
(define-extern *setting-control* setting-control)
;; DECOMP BEGINS
(defun get-current-language ()
"Returns the current [[language-enum]]"
(-> *setting-control* user-current language)
)
(defmethod user-setting-data-method-9 user-setting-data ((obj user-setting-data) (arg0 engine) (arg1 engine-pers) (arg2 engine))
(let ((s3-0 (-> arg1 alive-list)))
(while s3-0
(user-setting-data-method-10
obj
(-> s3-0 param 0)
(the-as symbol (-> s3-0 param 1))
(the-as float (-> s3-0 param 2))
(the-as uint (-> s3-0 param 3))
)
(set! s3-0 (-> s3-0 next))
)
)
(let ((s3-1 (-> arg0 alive-list-end))
(s2-0 (-> arg0 alive-list-end prev0))
)
(while (!= s3-1 (-> arg0 alive-list))
(let ((s1-0 (-> (the-as connection s3-1) param0)))
(case s1-0
(('sfx-volume)
(if (or (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask progress)))
(= ((method-of-type connection get-process) (the-as connection s3-1)) (ppointer->process *progress-process*))
)
(user-setting-data-method-10
obj
s1-0
(the-as symbol (-> (the-as connection s3-1) param1))
(the-as float (-> (the-as connection s3-1) param2))
(the-as uint (-> (the-as connection s3-1) param3))
)
)
)
(else
(user-setting-data-method-10
obj
s1-0
(the-as symbol (-> (the-as connection s3-1) param1))
(the-as float (-> (the-as connection s3-1) param2))
(the-as uint (-> (the-as connection s3-1) param3))
)
)
)
)
(set! s3-1 s2-0)
(set! s2-0 (-> s3-1 prev0))
)
)
(let* ((v1-21 (-> arg2 alive-list next0))
(s4-1 (-> v1-21 next0))
)
(while (!= v1-21 (-> arg2 alive-list-end))
(user-setting-data-method-10
obj
(-> (the-as connection v1-21) param0)
(the-as symbol (-> (the-as connection v1-21) param1))
(the-as float (-> (the-as connection v1-21) param2))
(the-as uint (-> (the-as connection v1-21) param3))
)
(set! v1-21 s4-1)
(set! s4-1 (-> s4-1 next0))
)
)
obj
)
(defmethod user-setting-data-method-10 user-setting-data ((obj user-setting-data) (arg0 object) (arg1 symbol) (arg2 float) (arg3 uint))
"set-defaults! perhaps?"
(case arg0
(('border-mode)
(set! (-> obj border-mode) arg1)
)
(('region-mode)
(set! (-> obj region-mode) arg1)
)
(('allow-look-around)
(set! (-> obj allow-look-around) arg1)
)
(('ocean-off)
(set! (-> obj ocean-off) arg1)
)
(('weather)
(set! (-> obj weather) arg1)
)
(('mouse)
(set! (-> obj mouse) arg1)
)
(('cursor)
(set! (-> obj cursor) arg1)
)
(('music)
(set! (-> obj music) arg1)
)
(('extra-bank)
(set! (-> obj extra-bank) (the-as pair arg1))
)
(('process-mask)
(case arg1
(('set)
(logior! (-> obj process-mask) arg3)
)
(('clear)
(logclear! (-> obj process-mask) arg3)
)
(('abs)
(set! (-> obj process-mask) (the-as process-mask arg3))
)
)
)
(('task-mask)
(case arg1
(('set)
(logior! (-> obj task-mask) arg3)
)
(('clear)
(logclear! (-> obj task-mask) arg3)
)
(('abs)
(set! (-> obj task-mask) (the-as task-mask arg3))
)
)
)
(('task-manager)
(set! (-> obj task-manager) (the-as (pointer process) arg1))
)
(('task)
(set! (-> obj task) arg1)
)
(('exclusive-task)
(set! (-> obj exclusive-task) (the-as int arg3))
)
(('exclusive-load)
(set! (-> obj exclusive-load) arg1)
)
(('sfx-volume)
(case arg1
(('rel)
(set! (-> obj sfx-volume) (* (-> obj sfx-volume) arg2))
)
(else
(set! (-> obj sfx-volume) arg2)
)
)
)
(('music-volume)
(case arg1
(('rel)
(set! (-> obj music-volume) (* (-> obj music-volume) arg2))
)
(else
(set! (-> obj music-volume) arg2)
)
)
)
(('ambient-volume)
(case arg1
(('rel)
(set! (-> obj ambient-volume) (* (-> obj ambient-volume) arg2))
)
(else
(set! (-> obj ambient-volume) arg2)
)
)
)
(('dialog-volume)
(case arg1
(('rel)
(set! (-> obj dialog-volume) (* (-> obj dialog-volume) arg2))
)
(else
(set! (-> obj dialog-volume) arg2)
)
)
)
(('sfx-volume-movie)
(case arg1
(('rel)
(set! (-> obj sfx-movie-volume) (* (-> obj sfx-movie-volume) arg2))
)
(else
(set! (-> obj sfx-movie-volume) arg2)
)
)
)
(('music-volume-movie)
(case arg1
(('rel)
(set! (-> obj music-volume-movie) (* (-> obj music-volume-movie) arg2))
)
(else
(set! (-> obj music-volume-movie) arg2)
)
)
)
(('ambient-volume-movie)
(case arg1
(('rel)
(set! (-> obj ambient-volume-move) (* (-> obj ambient-volume-move) arg2))
)
(else
(set! (-> obj ambient-volume-move) arg2)
)
)
)
(('dialog-volume-hint)
(case arg1
(('rel)
(set! (-> obj dialog-volume-hint) (* (-> obj dialog-volume-hint) arg2))
)
(else
(set! (-> obj dialog-volume-hint) arg2)
)
)
)
(('sound-flava)
(when (>= arg2 (-> obj sound-flava-priority))
(set! (-> obj sound-flava) arg3)
(set! (-> obj sound-flava-priority) arg2)
)
)
(('sound-mode)
(set! (-> obj sound-mode) arg3)
)
(('sound-tune)
(set! (-> obj sound-tune) arg3)
)
(('sound-excitement)
(case arg1
(('rel)
(set! (-> obj sound-excitement) (* (-> obj sound-excitement) arg2))
)
(('add)
(+! (-> obj sound-excitement) arg2)
)
(else
(set! (-> obj sound-excitement) arg2)
)
)
)
(('sound-reverb)
(case arg1
(('rel)
(set! (-> obj sound-reverb) (* (-> obj sound-reverb) arg2))
)
(('add)
(+! (-> obj sound-reverb) arg2)
)
(else
(set! (-> obj sound-reverb) arg2)
)
)
)
(('mode-sound-bank)
(set! (-> obj mode-sound-bank) (the-as uint arg1))
)
(('spotlight-color)
(set! (-> obj spotlight-color) (the-as rgba arg3))
)
(('bg-r)
(set! (-> obj bg-r) arg2)
)
(('bg-g)
(set! (-> obj bg-g) arg2)
)
(('bg-b)
(set! (-> obj bg-b) arg2)
)
(('bg-a)
(set! (-> obj bg-a) arg2)
)
(('bg-a-speed)
(set! (-> obj bg-a-speed) arg2)
)
(('bg-a-force)
(set! (-> obj bg-a-force) arg2)
)
(('allow-blackout)
(set! (-> obj allow-blackout) arg1)
)
(('rain)
(set! (-> obj rain) arg2)
)
(('snow)
(set! (-> obj snow) arg2)
)
(('language)
(set! (-> obj language) (the-as language-enum arg3))
)
(('subtitle-language)
(set! (-> obj subtitle-language) (the-as language-enum arg3))
)
(('vibration)
(set! (-> obj vibration) arg1)
)
(('auto-save)
(set! (-> obj auto-save) arg1)
)
(('allow-pause)
(set! (-> obj allow-pause) arg1)
)
(('allow-progress)
(set! (-> obj allow-progress) arg1)
)
(('allow-continue)
(set! (-> obj allow-continue) arg1)
)
(('allow-timeout)
(set! (-> obj allow-timeout) arg1)
)
(('allow-error)
(set! (-> obj allow-error) arg1)
)
(('under-water-pitch-mod)
(set! (-> obj under-water-pitch-mod) arg2)
)
(('sound-bank-load)
(set! (-> obj sound-bank-load) arg1)
)
(('play-hints)
(set! (-> obj play-hints) arg1)
)
(('subtitle)
(set! (-> obj subtitle) arg1)
)
(('mirror)
(set! (-> obj mirror) arg1)
)
(('movie)
(set! (-> obj movie) (the-as (pointer process) arg1))
)
(('movie-name)
(set! (-> obj movie-name) arg1)
)
(('movie-skip-frame)
(set! (-> obj movie-skip-frame) arg2)
)
(('talking)
(set! (-> obj talking) (the-as (pointer process) arg1))
)
(('spooling)
(set! (-> obj spooling) (the-as (pointer process) arg1))
)
(('spool-anim)
(set! (-> obj spool-anim) (the-as spool-anim arg1))
)
(('hint)
(set! (-> obj hint) (the-as (pointer process) arg1))
)
(('ambient)
(set! (-> obj ambient) (the-as (pointer process) arg1))
)
(('common-page)
(case arg1
(('set)
(logior! (-> obj unknown-int32-00) arg3)
)
(('clear)
(logclear! (-> obj unknown-int32-00) arg3)
)
)
)
(('duck)
(set! (-> obj duck) arg1)
)
(('jump)
(set! (-> obj jump) arg1)
)
(('double-jump)
(set! (-> obj double-jump) arg1)
)
(('darkjak)
(set! (-> obj darkjak) arg1)
)
(('endlessfall)
(set! (-> obj endlessfall) arg1)
)
(('pilot)
(set! (-> obj pilot) arg1)
)
(('pilot-exit)
(set! (-> obj pilot-exit) arg1)
)
(('attack)
(set! (-> obj attack) arg1)
)
(('board)
(set! (-> obj board) arg1)
)
(('gun)
(set! (-> obj gun) arg1)
)
(('doorway)
(set! (-> obj doorway) arg1)
)
(('calm)
(set! (-> obj attack) (not arg1))
(set! (-> obj gun) (not arg1))
(set! (-> obj board) (not arg1))
(set! (-> obj jump) (not arg1))
(set! (-> obj double-jump) (not arg1))
(set! (-> obj darkjak) (not arg1))
(set! (-> obj pilot) (not arg1))
(case arg1
((#t)
(set! (-> obj speed-mult) 0.5)
)
)
)
(('airlock)
(set! (-> obj airlock) arg1)
)
(('gun-buoy)
(set! (-> obj gun-buoy) arg1)
)
(('ignore-target)
(set! (-> obj ignore-target) arg1)
)
(('speech-control)
(set! (-> obj speech-control) arg1)
)
(('vehicle-hijacking)
(set! (-> obj vehicle-hijacking) arg1)
)
(('features)
(case arg1
(('set)
(logior! (-> obj features) arg3)
)
(('clear)
(logclear! (-> obj features) arg3)
)
(('abs)
(set! (-> obj features) (the-as game-feature arg3))
)
)
)
(('gem)
(set! (-> obj gen) arg1)
)
(('minimap)
(case arg1
(('set)
(logior! (-> obj minimap) arg3)
)
(('clear)
(logclear! (-> obj minimap) arg3)
)
(('abs)
(set! (-> obj minimap) arg3)
)
)
)
(('race-minimap)
(set! (-> obj race-minimap) (the-as int arg3))
)
(('borrow)
(set! (-> obj borrow) (the-as pair arg1))
)
(('half-speed)
(set! (-> obj half-speed) arg1)
)
(('render)
(set! (-> obj render) arg1)
)
)
obj
)
(defmethod cam-setting-data-method-9 cam-setting-data ((obj cam-setting-data) (arg0 engine) (arg1 engine-pers) (arg2 engine))
(let ((s3-0 (-> arg1 alive-list)))
(while s3-0
(cam-setting-data-method-10
obj
(-> s3-0 param 0)
(the-as (pointer process) (-> s3-0 param 1))
(the-as float (-> s3-0 param 2))
(the-as int (-> s3-0 param 3))
)
(set! s3-0 (-> s3-0 next))
)
)
(let ((s3-1 (-> arg0 alive-list-end))
(s2-0 (-> arg0 alive-list-end prev0))
)
(while (!= s3-1 (-> arg0 alive-list))
(let ((s1-0 (-> (the-as connection s3-1) param0)))
(case s1-0
(('sfx-volume)
(if (or (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask progress)))
(= ((method-of-type connection get-process) (the-as connection s3-1)) (ppointer->process *progress-process*))
)
(cam-setting-data-method-10
obj
s1-0
(the-as (pointer process) (-> (the-as connection s3-1) param1))
(the-as float (-> (the-as connection s3-1) param2))
(-> (the-as connection s3-1) param3)
)
)
)
(else
(cam-setting-data-method-10
obj
s1-0
(the-as (pointer process) (-> (the-as connection s3-1) param1))
(the-as float (-> (the-as connection s3-1) param2))
(-> (the-as connection s3-1) param3)
)
)
)
)
(set! s3-1 s2-0)
(set! s2-0 (-> s3-1 prev0))
)
)
(let* ((v1-21 (-> arg2 alive-list next0))
(s4-1 (-> v1-21 next0))
)
(while (!= v1-21 (-> arg2 alive-list-end))
(cam-setting-data-method-10
obj
(-> (the-as connection v1-21) param0)
(the-as (pointer process) (-> (the-as connection v1-21) param1))
(the-as float (-> (the-as connection v1-21) param2))
(-> (the-as connection v1-21) param3)
)
(set! v1-21 s4-1)
(set! s4-1 (-> s4-1 next0))
)
)
obj
)
;; WARN: Return type mismatch cam-setting-data vs none.
(defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 float) (arg3 int))
(case arg0
(('fov)
(if (= arg1 'rel)
(set! (-> obj fov) (* (-> obj fov) arg2))
(set! (-> obj fov) arg2)
)
)
(('pov-handle)
(let ((a0-6 (new 'static 'handle :process arg1 :pid arg3)))
(when (handle->process a0-6)
(set! (-> obj pov-handle) a0-6)
(set! (-> obj pov-bone) (the int arg2))
)
)
)
(('pov-offset)
(set! (-> obj pov-offset quad) (-> (the-as vector arg2) quad))
)
(('string-max-length)
(case arg1
(('low)
(if (-> obj string-max-length-default)
(set! (-> obj string-max-length) arg2)
)
)
(('rel)
(set! (-> obj string-max-length) (* (-> obj string-max-length) arg2))
)
(else
(set! (-> obj string-max-length) arg2)
)
)
(set! (-> obj string-default) #f)
(set! (-> obj string-max-length-default) #f)
)
(('string-min-length)
(case arg1
(('low)
(if (-> obj string-min-length-default)
(set! (-> obj string-min-length) arg2)
)
)
(('rel)
(set! (-> obj string-min-length) (* (-> obj string-min-length) arg2))
)
(else
(set! (-> obj string-min-length) arg2)
)
)
(set! (-> obj string-default) #f)
(set! (-> obj string-min-length-default) #f)
)
(('string-max-height)
(case arg1
(('low)
(if (-> obj string-max-height-default)
(set! (-> obj string-max-height) arg2)
)
)
(('rel)
(set! (-> obj string-max-height) (* (-> obj string-max-height) arg2))
)
(else
(set! (-> obj string-max-height) arg2)
)
)
(set! (-> obj string-default) #f)
(set! (-> obj string-max-height-default) #f)
)
(('string-min-height)
(case arg1
(('low)
(if (-> obj string-min-height-default)
(set! (-> obj string-min-height) arg2)
)
)
(('rel)
(set! (-> obj string-min-height) (* (-> obj string-min-height) arg2))
)
(else
(set! (-> obj string-min-height) arg2)
)
)
(set! (-> obj string-default) #f)
(set! (-> obj string-min-height-default) #f)
)
(('string-cliff-height)
(set! (-> obj string-cliff-height) arg2)
(set! (-> obj string-default) #f)
)
(('string-camera-ceiling)
(set! (-> obj string-camera-ceiling) arg2)
(set! (-> obj string-default) #f)
)
(('gun-max-height)
(set! (-> obj gun-max-height) arg2)
)
(('gun-min-height)
(set! (-> obj gun-min-height) arg2)
)
(('string-local-down)
(vector-normalize-copy! (-> obj string-local-down) (the-as vector arg2) 1.0)
)
(('slave-options)
(case arg1
(('set)
(logior! (-> obj slave-options) arg3)
)
(('clear)
(logclear! (-> obj slave-options) arg3)
)
(('abs)
(set! (-> obj slave-options) (the-as cam-slave-options arg3))
)
)
)
(('rapid-tracking)
(set! (-> obj slave-options) (logior (cam-slave-options RAPID_TRACKING) (-> obj slave-options)))
)
(('bike-mode)
(logior! (-> obj slave-options) (cam-slave-options BIKE_MODE))
)
(('vertical-follow-matches-camera)
(set! (-> obj slave-options)
(logior (cam-slave-options VERTICAL_FOLLOW_MATCHES_CAMERA) (-> obj slave-options))
)
)
(('matrix-blend-max-angle)
(set! (-> obj matrix-blend-max-angle) arg2)
)
(('matrix-blend-max-partial)
(set! (-> obj matrix-blend-max-partial) arg2)
)
(('string-spline-max-move-player)
(set! (-> obj string-spline-max-move-player) arg2)
)
(('string-spline-accel)
(set! (-> obj string-spline-accel) arg2)
)
(('string-spline-max-move-player)
(set! (-> obj string-spline-max-move-player) arg2)
)
(('string-spline-accel-player)
(set! (-> obj string-spline-accel-player) arg2)
)
(('target-height)
(set! (-> obj target-height) arg2)
)
(('head-offset)
(set! (-> obj head-offset) arg2)
)
(('foot-offset)
(set! (-> obj foot-offset) arg2)
)
(('teleport-on-entity-change)
(set! (-> obj teleport-on-entity-change) (the-as symbol arg2))
)
(('entity-name)
(when (or *target* (and *camera* (not (send-event *camera* 'query-state cam-free-floating))))
(set! (-> obj entity-name) (the-as string arg1))
(set! arg3 (cond
((= arg3 -1)
0
)
(else
(empty)
arg3
)
)
)
(set! (-> obj entity-mask) (the-as uint arg3))
(set! (-> obj mode-name) #f)
)
)
(('mode-name)
(set! (-> obj mode-name) (the-as symbol arg1))
(set! (-> obj entity-name) #f)
)
(('master-options)
(case arg1
(('set)
(logior! (-> obj master-options) arg3)
)
(('clear)
(logclear! (-> obj master-options) arg3)
)
(('abs)
(set! (-> obj master-options) (the-as cam-master-options arg3))
)
)
)
(('immediate-string-min-max)
(logior! (-> obj master-options) (cam-master-options IMMEDIATE_STRING_MIN_MAX))
)
(('no-intro)
(set! (-> obj no-intro) (the-as symbol arg2))
)
(('mouse-input)
(set! (-> obj mouse-input) (the-as symbol arg2))
)
(('cpad1-skip-buttons)
(set! (-> obj cpad1-skip-buttons) (the-as symbol arg2))
)
(('interp-time)
(let* ((v1-91 arg1)
(f0-34 (if (= v1-91 'hi)
1.0
0.0
)
)
)
(when (>= f0-34 (the float (-> obj 1Tinterp-time-priority)))
(set! (-> obj interp-time) (the-as uint (the int arg2)))
(set! (-> obj 1Tinterp-time-priority) (the-as uint (the int f0-34)))
)
)
)
(('string-startup-vector)
(set! (-> obj string-use-startup-vector) #t)
(set! (-> obj string-startup-vector quad) (-> (the-as vector arg2) quad))
)
(('look-at-point)
(set! (-> obj use-look-at-point) #t)
(set! (-> obj look-at-point quad) (-> (the-as vector arg2) quad))
)
(('point-of-interest)
(set! (-> obj use-point-of-interest) #t)
(set! (-> obj point-of-interest quad) (-> (the-as vector arg2) quad))
(set! (-> obj handle-of-interest) (the-as handle #f))
)
(('mouse-tumble-point)
(set! (-> obj use-mouse-tumble-point) #t)
(set! (-> obj mouse-tumble-point quad) (-> (the-as vector arg2) quad))
)
(('handle-of-interest)
(let ((a0-118 (new 'static 'handle :process arg1 :pid arg3)))
(when (handle->process a0-118)
(set! (-> obj use-point-of-interest) #f)
(set! (-> obj handle-of-interest) a0-118)
)
)
)
(('butt-handle)
(let ((a0-122 (new 'static 'handle :process arg1 :pid arg3)))
(when (handle->process a0-122)
(set! (-> obj butt-handle) a0-122)
(set! (-> obj butt-angle) arg2)
)
)
)
(('extra-follow-height)
(set! (-> obj extra-follow-height) arg2)
)
)
(none)
)
(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
"Originally called `setting-set` see (anon-function 48 script)"
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
0
(none)
)
(defmethod set-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
(remove-setting obj arg0 arg1)
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
0
(none)
)
(defmethod persist-with-delay setting-control ((obj setting-control) (arg0 symbol) (arg1 time-frame) (arg2 symbol) (arg3 symbol) (arg4 float) (arg5 int))
"Originally called `setting-pers` see (anon-function 46 script)"
(let ((v1-1 (schedule-callback (-> obj engine-pers) arg0 arg1)))
(when v1-1
(set! (-> v1-1 param 0) arg2)
(set! (-> v1-1 param 1) arg3)
(set! (-> v1-1 param 2) arg4)
(set! (-> v1-1 param 3) arg5)
)
)
0
(none)
)
(defmethod remove-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol))
(when arg0
(let ((s5-0 (-> obj engine))
(s4-0 (-> arg0 connection-list next1))
)
(while s4-0
(if (and ((method-of-type connection belongs-to-engine?) (the-as connection s4-0) s5-0)
(or (= arg1 #t) (= arg1 (-> (the-as connection s4-0) param0)))
)
((method-of-type connection move-to-dead) (the-as connection s4-0))
)
(set! s4-0 (-> s4-0 next1))
)
)
)
0
(none)
)
(defmethod kill-persister setting-control ((obj setting-control) (arg0 engine-pers) (arg1 object))
"Calls [[engine-pers::kill-matching]]"
(kill-matching
(-> obj engine-pers)
(lambda ((arg0 engine-pers) (arg1 connection-pers) (arg2 object) (arg3 object))
(and (= (-> arg1 key) arg2) (= (-> arg1 param 0) arg3))
)
arg0
arg1
)
0
(none)
)
(defmethod setting-control-method-14 setting-control ((obj setting-control) (arg0 object))
(let ((v1-1 (-> obj engine-hi alive-list next0)))
(-> obj engine-hi)
(let ((a2-2 (-> v1-1 next0)))
(while (!= v1-1 (-> obj engine-hi alive-list-end))
(if (= (-> (the-as connection v1-1) param0) arg0)
(return v1-1)
)
(set! v1-1 a2-2)
(-> obj engine-hi)
(set! a2-2 (-> a2-2 next0))
)
)
)
(the-as connectable #f)
)
(defmethod remove-setting-by-arg0 setting-control ((obj setting-control) (arg0 object))
"Calls [[engine::remove-by-param0]] on `engine-hi`"
(remove-by-param0 (-> obj engine-hi) arg0)
0
(none)
)
(defmethod set-setting-by-param setting-control ((obj setting-control) (arg0 symbol) (arg1 object) (arg2 object) (arg3 object))
"Same as [[setting-control::set-setting]] but will [[engine::remove-by-param0]] using the symbol provided"
(remove-by-param0 (-> obj engine-hi) arg0)
(add-connection (-> obj engine-hi) *dproc* arg0 arg1 arg2 arg3)
)
(defmethod apply-settings setting-control ((obj setting-control))
(speech-control-method-11 *speech-control*)
(let ((s5-0 (-> obj user-current)))
(let ((s4-0 (-> obj user-target)))
(mem-copy! (the-as pointer s4-0) (the-as pointer (-> obj user-default)) 528)
(set! (-> s4-0 ambient-volume) (* (-> obj user-default sfx-volume) (-> obj user-default ambient-volume)))
(user-setting-data-method-9 s4-0 (-> obj engine) (-> obj engine-pers) (-> obj engine-hi))
(when (= (-> s5-0 sound-mode) 1)
(case (-> s5-0 music)
(('sewer)
(set! (-> s4-0 music-volume) (* 1.2 (-> s4-0 music-volume)))
)
(else
(set! (-> s4-0 music-volume) (* 1.111111 (-> s4-0 music-volume)))
)
)
)
(set! (-> s5-0 border-mode) (-> s4-0 border-mode))
(when (!= (-> s5-0 borrow) (-> s4-0 borrow))
(set! (-> s5-0 borrow) (-> s4-0 borrow))
(update-task-masks 'event)
)
(set! (-> s5-0 region-mode) (-> s4-0 region-mode))
(set! (-> s5-0 unknown-int32-00) (-> s4-0 unknown-int32-00))
(set! (-> s5-0 vibration) (-> s4-0 vibration))
(set! (-> s5-0 auto-save) (-> s4-0 auto-save))
(set! (-> s5-0 play-hints) (-> s4-0 play-hints))
(set! (-> s5-0 sound-bank-load) (-> s4-0 sound-bank-load))
(set! (-> s5-0 subtitle) (-> s4-0 subtitle))
(set! (-> s5-0 beard) (if (logtest? (-> *game-info* secrets) (game-secrets toggle-beard))
(not (-> s4-0 beard))
(-> s4-0 beard)
)
)
(set! (-> s5-0 movie) (-> s4-0 movie))
(set! (-> s5-0 movie-name) (-> s4-0 movie-name))
(set! (-> s5-0 talking) (-> s4-0 talking))
(set! (-> s5-0 spooling) (-> s4-0 spooling))
(set! (-> s5-0 spool-anim) (-> s4-0 spool-anim))
(set! (-> s5-0 hint) (-> s4-0 hint))
(set! (-> s5-0 ambient) (-> s4-0 ambient))
(set! (-> s5-0 allow-pause) (-> s4-0 allow-pause))
(set! (-> s5-0 allow-progress) (-> s4-0 allow-progress))
(set! (-> s5-0 allow-look-around) (-> s4-0 allow-look-around))
(set! (-> s5-0 allow-continue) (-> s4-0 allow-continue))
(set! (-> s5-0 allow-timeout) (-> s4-0 allow-timeout))
(set! (-> s5-0 allow-error) (-> s4-0 allow-error))
(set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod))
(if (and (-> s4-0 mirror) (= (level-status *level* 'ctywide) 'active))
(set! (-> s5-0 mirror) #f)
(set! (-> s5-0 mirror) (-> s4-0 mirror))
)
(set! (-> s5-0 ocean-off) (-> s4-0 ocean-off))
(set! (-> s5-0 weather) (-> s4-0 weather))
(set! (-> s5-0 mouse) (-> s4-0 mouse))
(set! (-> s5-0 cursor) (-> s4-0 cursor))
(set! (-> s5-0 ambient-volume-move) (-> s4-0 ambient-volume-move))
(set! (-> s5-0 music-volume-movie) (-> s4-0 music-volume-movie))
(set! (-> s5-0 sfx-movie-volume) (-> s4-0 sfx-movie-volume))
(set! (-> s5-0 dialog-volume-hint) (-> s4-0 dialog-volume-hint))
(set! (-> s5-0 process-mask) (-> s4-0 process-mask))
(set! (-> s5-0 movie-skip-frame) (-> s4-0 movie-skip-frame))
(set! (-> s5-0 extra-bank) (-> s4-0 extra-bank))
(set! (-> s5-0 task-mask) (-> s4-0 task-mask))
(set! (-> s5-0 task) (-> s4-0 task))
(set! (-> s5-0 task-manager) (-> s4-0 task-manager))
(when (!= (-> s5-0 exclusive-task) (-> s4-0 exclusive-task))
(set! (-> s5-0 exclusive-task) (-> s4-0 exclusive-task))
(update-task-masks 'event)
)
(set! (-> s5-0 exclusive-load) (-> s4-0 exclusive-load))
(set! (-> s5-0 duck) (-> s4-0 duck))
(set! (-> s5-0 jump) (-> s4-0 jump))
(set! (-> s5-0 double-jump) (-> s4-0 double-jump))
(set! (-> s5-0 darkjak) (-> s4-0 darkjak))
(set! (-> s5-0 endlessfall) (-> s4-0 endlessfall))
(set! (-> s5-0 pilot) (-> s4-0 pilot))
(set! (-> s5-0 pilot-exit) (-> s4-0 pilot-exit))
(set! (-> s5-0 attack) (-> s4-0 attack))
(set! (-> s5-0 board) (-> s4-0 board))
(set! (-> s5-0 gun) (-> s4-0 gun))
(set! (-> s5-0 doorway) (-> s4-0 doorway))
(set! (-> s5-0 airlock) (-> s4-0 airlock))
(set! (-> s5-0 gun-buoy) (-> s4-0 gun-buoy))
(set! (-> s5-0 ignore-target) (-> s4-0 ignore-target))
(set! (-> s5-0 speech-control) (-> s4-0 speech-control))
(set! (-> s5-0 vehicle-hijacking) (-> s4-0 vehicle-hijacking))
(set! (-> s5-0 speed-mult) (-> s4-0 speed-mult))
(set! (-> s5-0 features) (-> s4-0 features))
(set! (-> s5-0 rain) (-> s4-0 rain))
(set! (-> s5-0 snow) (-> s4-0 snow))
(set! (-> s5-0 gen) (-> s4-0 gen))
(set! (-> s5-0 minimap) (-> s4-0 minimap))
(set! (-> s5-0 race-minimap) (-> s4-0 race-minimap))
(set! (-> s5-0 half-speed) (-> s4-0 half-speed))
(set! (-> s5-0 render) (-> s4-0 render))
)
(set! (-> *kernel-context* prevent-from-run) (-> s5-0 process-mask))
(let ((v1-84 (task-mask)))
(dotimes (a0-13 (-> *level* length))
(let ((a1-6 (-> *level* level a0-13)))
(if (= (-> a1-6 status) 'active)
(set! v1-84
(the-as task-mask (logior (the-as int v1-84) (logand (-> a1-6 info base-task-mask) (task-mask primary0))))
)
)
)
)
(dotimes (a0-16 (-> *level* length))
(let ((a1-15 (-> *level* level a0-16)))
(if (= (-> a1-15 status) 'active)
(set! (-> a1-15 task-mask)
(logior (logior (logand (-> a1-15 task-mask) (task-mask task0 task1 task2 task3 task4 task5 task6 task7 done))
(logand (task-mask ctywide never movie0 movie1 movie2) (-> s5-0 task-mask))
)
(logclear 8192 (the-as int v1-84))
)
)
)
)
)
)
(set! (-> *level* border?) (-> s5-0 border-mode))
(when *target*
(if (-> s5-0 duck)
(logclear! (-> *target* state-flags) (state-flags prevent-duck))
(logior! (-> *target* state-flags) (state-flags prevent-duck))
)
(if (-> s5-0 jump)
(logclear! (-> *target* state-flags) (state-flags prevent-jump))
(logior! (-> *target* state-flags) (state-flags prevent-jump))
)
(if (-> s5-0 double-jump)
(logclear! (-> *target* state-flags) (state-flags prevent-double-jump))
(set! (-> *target* state-flags) (logior (state-flags prevent-double-jump) (-> *target* state-flags)))
)
(if (-> s5-0 attack)
(logclear! (-> *target* state-flags) (state-flags prevent-attack))
(logior! (-> *target* state-flags) (state-flags prevent-attack))
)
(if (-> s5-0 board)
(logclear! (-> *target* state-flags) (state-flags prevent-board))
(set! (-> *target* state-flags) (logior (state-flags prevent-board) (-> *target* state-flags)))
)
(if (-> s5-0 gun)
(logclear! (-> *target* state-flags) (state-flags prevent-gun))
(set! (-> *target* state-flags) (logior (state-flags prevent-gun) (-> *target* state-flags)))
)
)
)
(-> obj cam-current)
(let ((s4-1 (-> obj cam-target)))
(mem-copy! (the-as pointer s4-1) (the-as pointer (-> obj cam-default)) 780)
(cam-setting-data-method-9 s4-1 (-> obj engine) (-> obj engine-pers) (-> obj engine-hi))
)
(-> obj user-current)
)
(defmethod update setting-control ((obj setting-control))
(local-vars (v1-41 symbol))
(with-pp
(run-pending-updates! (-> obj engine-pers) (-> *display* base-clock frame-counter))
(apply-settings obj)
(let ((s5-0 (-> obj user-current)))
(let ((s4-0 (-> obj user-target)))
(when *sound-player-enable*
(when (!= (-> s5-0 sfx-volume) (-> s4-0 sfx-volume))
(seek! (-> s5-0 sfx-volume) (-> s4-0 sfx-volume) (-> pp clock seconds-per-frame))
(sound-set-volume (sound-group sfx) (-> s5-0 sfx-volume))
)
(when (!= (-> s5-0 music-volume) (-> s4-0 music-volume))
(seek! (-> s5-0 music-volume) (-> s4-0 music-volume) (-> pp clock seconds-per-frame))
(sound-set-volume (sound-group music) (* 0.75 (-> s5-0 music-volume)))
)
(when (!= (-> s5-0 dialog-volume) (-> s4-0 dialog-volume))
(seek! (-> s5-0 dialog-volume) (-> s4-0 dialog-volume) (-> pp clock seconds-per-frame))
(sound-set-volume (sound-group dialog dialog2) (-> s5-0 dialog-volume))
)
(when (!= (-> s5-0 ambient-volume) (-> s4-0 ambient-volume))
(seek! (-> s5-0 ambient-volume) (-> s4-0 ambient-volume) (-> pp clock seconds-per-frame))
(sound-set-volume (sound-group ambient) (-> s5-0 ambient-volume))
)
)
(when (!= (-> s5-0 language) (-> s4-0 language))
(set! (-> s5-0 language) (-> s4-0 language))
(case (-> s5-0 language)
(((language-enum uk-english))
(set-language (language-enum english))
)
(else
(set-language (-> s5-0 language))
)
)
)
(set! (-> s5-0 subtitle-language) (-> s4-0 subtitle-language))
(when (!= (-> s5-0 stereo-mode) (-> s4-0 stereo-mode))
(set! (-> s5-0 stereo-mode) (-> s4-0 stereo-mode))
(sound-set-stereo-mode (the-as stereo-mode (-> s5-0 stereo-mode)))
)
(when (and (!= (-> s4-0 music) (-> s5-0 music))
(and (zero? (rpc-busy? 1))
(or (not (-> s4-0 music))
(and (< 0.0 (-> s5-0 music-volume)) (not (load-in-progress? *level*)) (not (-> s5-0 movie)))
)
(begin
(countdown (v1-40 3)
(when (not (-> *level* sound-bank v1-40))
(set! v1-41 #f)
(goto cfg-37)
)
)
(set! v1-41 #t)
(label cfg-37)
(and v1-41 (not *master-exit*))
)
)
)
(cond
((-> s4-0 music)
(format 0 "Load music ~A~%" (-> s4-0 music))
(set! (-> s5-0 sound-flava) (the-as uint 0))
(sound-music-load (string->sound-name (symbol->string (-> s4-0 music))))
)
(else
(format 0 "Unload music~%")
(sound-music-unload)
)
)
(set! (-> s5-0 music) (-> s4-0 music))
)
(set! (-> s4-0 sound-excitement) (fmax 0.0 (fmin 0.99 (-> s4-0 sound-excitement))))
(set! (-> s4-0 sound-reverb) (fmax 0.0 (fmin 1.0 (-> s4-0 sound-reverb))))
(when (and (nonzero? (-> obj user-default sound-stinger))
(>= (- (-> *display* base-clock frame-counter) (-> obj sound-stinger-time)) (seconds 0.5))
)
(set! (-> obj user-default sound-stinger) 0)
0
)
(when *sound-player-enable*
(cond
((!= (-> s5-0 sound-flava) (-> s4-0 sound-flava))
(set! (-> s5-0 sound-flava) (-> s4-0 sound-flava))
(sound-set-midi-reg 14 (the-as int (-> s5-0 sound-flava)))
)
((!= (-> s5-0 sound-reverb) (-> s4-0 sound-reverb))
(set! (-> s5-0 sound-reverb) (-> s4-0 sound-reverb))
(sound-set-reverb 4 (-> s5-0 sound-reverb) (-> s5-0 sound-reverb) (the-as uint 3))
)
((!= (-> s5-0 sound-mode) (-> s4-0 sound-mode))
(set! (-> s5-0 sound-mode) (-> s4-0 sound-mode))
(sound-set-midi-reg 3 (the-as int (-> s5-0 sound-mode)))
)
((!= (-> s5-0 sound-tune) (-> s4-0 sound-tune))
(set! (-> s5-0 sound-tune) (-> s4-0 sound-tune))
(sound-set-midi-reg 4 (the-as int (-> s5-0 sound-tune)))
)
((!= (-> s5-0 sound-stinger) (-> s4-0 sound-stinger))
(set! (-> s5-0 sound-stinger) (-> s4-0 sound-stinger))
(sound-set-midi-reg 0 (-> s5-0 sound-stinger))
(set! (-> obj sound-stinger-time) (-> *display* base-clock frame-counter))
)
((!= (the int (* 4.0 (-> s4-0 sound-excitement))) (the int (* 4.0 (-> obj sound-excitement-targ))))
(let ((v1-87 (max 0 (min 3 (the int (* 4.0 (-> s4-0 sound-excitement)))))))
(when (and (< (-> obj sound-excitement-targ) (-> s4-0 sound-excitement))
(< (the-as int (-> obj sound-excitement-level)) v1-87)
(zero? (-> obj user-default sound-stinger))
)
(set! (-> obj sound-stinger-time) (-> *display* base-clock frame-counter))
(set! (-> obj sound-stinger-change-time v1-87) (-> *display* base-clock frame-counter))
(set! (-> obj user-default sound-stinger) (+ v1-87 9))
)
(cond
((< (the-as int (-> obj sound-excitement-level)) v1-87)
(set! (-> obj sound-excitement-level) (the-as uint v1-87))
)
((< v1-87 (the-as int (+ (-> obj sound-excitement-level) -1)))
(set! (-> obj sound-excitement-level) (the-as uint (+ v1-87 1)))
)
((zero? v1-87)
(set! (-> obj sound-excitement-level) (the-as uint v1-87))
)
)
)
(set! (-> obj sound-excitement-change-time) (-> *display* base-clock frame-counter))
(set! (-> obj sound-excitement-targ) (-> s4-0 sound-excitement))
)
((and (!= (the int (* 4.0 (-> s5-0 sound-excitement))) (the int (* 4.0 (-> obj sound-excitement-targ))))
(>= (- (-> *display* base-clock frame-counter) (-> obj sound-excitement-change-time)) (seconds 0.8))
)
(max 0 (min 3 (the int (* 4.0 (-> obj sound-excitement-targ)))))
(sound-set-midi-reg 2 (the int (* 100.0 (-> s5-0 sound-excitement))))
(set! (-> s5-0 sound-excitement) (-> obj sound-excitement-targ))
(sound-set-midi-reg 16 (the int (* 100.0 (-> s5-0 sound-excitement))))
)
)
)
(set! (-> s5-0 mode-sound-bank) (-> s4-0 mode-sound-bank))
(when (!= (-> s5-0 aspect-ratio) (-> s4-0 aspect-ratio))
(set! (-> s5-0 aspect-ratio) (-> s4-0 aspect-ratio))
(set-aspect-ratio (-> s5-0 aspect-ratio))
)
(when (!= (-> s5-0 use-progressive-scan) (-> s4-0 use-progressive-scan))
(set! (-> s5-0 use-progressive-scan) (-> s4-0 use-progressive-scan))
(set! (-> *video-params* set-video-mode) #t)
)
(when (!= (-> s5-0 video-mode) (-> s4-0 video-mode))
(set! (-> s5-0 video-mode) (-> s4-0 video-mode))
(set-video-mode (-> s5-0 video-mode))
)
(when (!= (-> s5-0 display-dx) (-> s4-0 display-dx))
(set! (-> s5-0 display-dx) (-> s4-0 display-dx))
(set! (-> *video-params* display-dx) (/ (-> s4-0 display-dx) 2))
)
(when (!= (-> s5-0 display-dy) (-> s4-0 display-dy))
(set! (-> s5-0 display-dy) (-> s4-0 display-dy))
(set! (-> *video-params* display-dy) (* (/ (-> s4-0 display-dy) 2) 2))
)
(set! (-> *blit-displays-work* horizontal-flip-flag)
(the-as basic (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)))
)
(set! (-> s5-0 allow-blackout) (-> s4-0 allow-blackout))
(set! (-> s5-0 bg-a-speed) (-> s4-0 bg-a-speed))
(set! (-> s5-0 bg-a-force) (-> s4-0 bg-a-force))
(set! (-> s5-0 bg-r) (-> s4-0 bg-r))
(set! (-> s5-0 bg-g) (-> s4-0 bg-g))
(set! (-> s5-0 bg-b) (-> s4-0 bg-b))
(seek! (-> s5-0 bg-a) (-> s4-0 bg-a) (* (-> s4-0 bg-a-speed) (-> pp clock seconds-per-frame)))
(let ((v1-133 *display*))
(let ((f0-71 (-> s5-0 bg-a)))
(if (!= (-> s5-0 bg-a-force) 0.0)
(set! f0-71 (-> s5-0 bg-a-force))
)
(if (not (-> s5-0 allow-blackout))
(set! f0-71 0.0)
)
(set! (-> v1-133 bgcolor)
(logior (logand (-> v1-133 bgcolor) -256) (shr (shl (the int (* 255.0 (-> s5-0 bg-r))) 56) 56))
)
(set! (-> v1-133 bgcolor)
(logior (logand (-> v1-133 bgcolor) -65281) (shr (shl (the int (* 255.0 (-> s5-0 bg-g))) 56) 48))
)
(set! (-> v1-133 bgcolor)
(logior (logand (-> v1-133 bgcolor) -16711681) (shr (shl (the int (* 255.0 (-> s5-0 bg-b))) 56) 40))
)
(set! (-> v1-133 pmode alp) (the int (* 255.0 (- 1.0 f0-71))))
)
(set! (-> v1-133 run-half-speed) (the-as basic (-> s5-0 half-speed)))
)
(set! (-> s5-0 spotlight-color) (-> s4-0 spotlight-color))
)
(set! (-> *texture-pool* common-page-mask) (-> s5-0 unknown-int32-00))
(set! (-> *cpad-list* cpads 0 buzz) (the-as basic (-> s5-0 vibration)))
(let ((v1-137 *ocean*))
(case (-> s5-0 ocean-off)
((#t)
(set! (-> v1-137 off) #t)
)
(('mid)
(set! (-> v1-137 mid-off) #t)
)
(('near)
(set! (-> v1-137 near-off) #t)
)
)
)
(set! (-> *mouse* active) (-> s5-0 mouse))
(set! (-> *mouse* cursor) (the-as basic (and (-> s5-0 mouse) (-> s5-0 cursor))))
)
(let ((s5-1 (-> obj cam-current)))
(let ((s4-1 (-> obj cam-target)))
(set! (-> s5-1 entity-or-mode-changed) #f)
(if (and (not (name= (-> s5-1 entity-name) (-> s4-1 entity-name)))
(or (not *target*) (zero? (logand (-> *target* focus-status) (-> s4-1 entity-mask))))
)
(set! (-> s4-1 entity-or-mode-changed) #t)
)
(if (!= (-> s5-1 mode-name) (-> s4-1 mode-name))
(set! (-> s4-1 entity-or-mode-changed) #t)
)
(set! (-> s5-1 teleport-on-entity-change) (-> s4-1 teleport-on-entity-change))
(cam-master-set-entity s4-1)
(cond
((not (-> s4-1 entity-or-mode-changed))
)
((or (= (-> s5-1 cam-mode) cam-eye) (= (-> s4-1 cam-mode) cam-eye))
(set! (-> s4-1 no-intro) #t)
(set! (-> s4-1 interp-time) (the-as uint 60))
(set! (-> s4-1 1Tinterp-time-priority) (the-as uint 2))
)
((= (-> s4-1 cam-mode) cam-endlessfall)
(set! (-> s4-1 no-intro) #t)
(set! (-> s4-1 interp-time) (the-as uint 30))
(set! (-> s4-1 1Tinterp-time-priority) (the-as uint 2))
)
((or (= (-> s5-1 cam-mode) cam-free-floating) (= (-> s4-1 cam-mode) cam-free-floating))
(set! (-> s4-1 interp-time) (the-as uint 0))
(set! (-> s4-1 1Tinterp-time-priority) (the-as uint 2))
)
)
(set! (-> s5-1 entity-name) (-> s4-1 entity-name))
(set! (-> s5-1 entity-mask) (-> s4-1 entity-mask))
(set! (-> s5-1 mode-name) (-> s4-1 mode-name))
(let ((v1-173 (-> s4-1 entity-or-mode-changed)))
(set! (-> s5-1 entity-or-mode-changed) v1-173)
(when v1-173
(set! (-> s5-1 real-entity-name) (-> s4-1 real-entity-name))
(set! (-> s5-1 cam-mode) (-> s4-1 cam-mode))
)
)
(+! (-> s5-1 fov) (fmax -182.04445 (fmin 182.04445 (* 0.1 (- (-> s4-1 fov) (-> s5-1 fov))))))
(set! (-> s5-1 pov-handle) (-> s4-1 pov-handle))
(set! (-> s5-1 pov-bone) (-> s4-1 pov-bone))
(set! (-> s5-1 pov-offset quad) (-> s4-1 pov-offset quad))
(set! (-> s5-1 string-default) (-> s4-1 string-default))
(set! (-> s5-1 string-max-length-default) (-> s4-1 string-max-length-default))
(set! (-> s5-1 string-min-length-default) (-> s4-1 string-min-length-default))
(set! (-> s5-1 string-max-height-default) (-> s4-1 string-max-height-default))
(set! (-> s5-1 string-min-height-default) (-> s4-1 string-min-height-default))
(set! (-> s5-1 string-max-length) (-> s4-1 string-max-length))
(set! (-> s5-1 string-min-length) (-> s4-1 string-min-length))
(set! (-> s5-1 string-max-height) (-> s4-1 string-max-height))
(set! (-> s5-1 string-min-height) (-> s4-1 string-min-height))
(set! (-> s5-1 string-cliff-height) (-> s4-1 string-cliff-height))
(set! (-> s5-1 string-camera-ceiling) (-> s4-1 string-camera-ceiling))
(cond
((-> s5-1 string-default)
(set! (-> s5-1 gun-min-height) (-> s4-1 gun-min-height))
(set! (-> s5-1 gun-max-height) (-> s4-1 gun-max-height))
)
(else
(set! (-> s5-1 gun-min-height) (-> s4-1 string-min-height))
(set! (-> s5-1 gun-max-height) (-> s4-1 string-max-height))
)
)
(set! (-> s5-1 string-local-down quad) (-> s4-1 string-local-down quad))
(set! (-> s5-1 slave-options) (-> s4-1 slave-options))
(seek! (-> s5-1 matrix-blend-max-angle) (-> s4-1 matrix-blend-max-angle) 182.04445)
(seek! (-> s5-1 matrix-blend-max-partial) (-> s4-1 matrix-blend-max-partial) 0.05)
(set! (-> s5-1 string-spline-max-move) (-> s4-1 string-spline-max-move))
(set! (-> s5-1 string-spline-accel) (-> s4-1 string-spline-accel))
(set! (-> s5-1 string-spline-max-move-player) (-> s4-1 string-spline-max-move-player))
(set! (-> s5-1 string-spline-accel-player) (-> s4-1 string-spline-accel-player))
(set! (-> s5-1 target-height) (-> s4-1 target-height))
(set! (-> s5-1 head-offset) (-> s4-1 head-offset))
(set! (-> s5-1 foot-offset) (-> s4-1 foot-offset))
(set! (-> s5-1 master-options) (-> s4-1 master-options))
(set! (-> s5-1 no-intro) (-> s4-1 no-intro))
(set! (-> s5-1 mouse-input) (-> s4-1 mouse-input))
(set! (-> s5-1 cpad1-skip-buttons) (-> s4-1 cpad1-skip-buttons))
(set! (-> s5-1 interp-time) (-> s4-1 interp-time))
(set! (-> s5-1 1Tinterp-time-priority) (-> s4-1 1Tinterp-time-priority))
(set! (-> s5-1 string-use-startup-vector) (-> s4-1 string-use-startup-vector))
(set! (-> s5-1 string-startup-vector quad) (-> s4-1 string-startup-vector quad))
(set! (-> s5-1 use-look-at-point) (-> s4-1 use-look-at-point))
(set! (-> s5-1 look-at-point quad) (-> s4-1 look-at-point quad))
(set! (-> s5-1 use-point-of-interest) (-> s4-1 use-point-of-interest))
(set! (-> s5-1 point-of-interest quad) (-> s4-1 point-of-interest quad))
(set! (-> s5-1 use-mouse-tumble-point) (-> s4-1 use-mouse-tumble-point))
(set! (-> s5-1 mouse-tumble-point quad) (-> s4-1 mouse-tumble-point quad))
(set! (-> s5-1 handle-of-interest) (-> s4-1 handle-of-interest))
(let* ((s3-1 (handle->process (-> s5-1 handle-of-interest)))
(a0-147 (the-as process-focusable (if (type? s3-1 process-focusable)
(the-as process-focusable s3-1)
)
)
)
)
(when (the-as process a0-147)
(set! (-> s5-1 use-point-of-interest) #t)
(set! (-> s5-1 point-of-interest quad) (-> (get-trans a0-147 4) quad))
)
)
(set! (-> obj cam-default point-of-interest quad) (-> s5-1 point-of-interest quad))
(set! (-> s5-1 butt-handle) (-> s4-1 butt-handle))
(set! (-> s5-1 butt-angle) (-> s4-1 butt-angle))
(set! (-> s5-1 extra-follow-height) (-> s4-1 extra-follow-height))
)
(if (-> s5-1 entity-or-mode-changed)
(cam-master-activate-slave #f)
)
)
(-> obj user-current)
)
)
(when (zero? *setting-control*)
(kmemopen global "settings")
(set! *setting-control* (new 'global 'setting-control 64))
(kmemclose)
(let ((gp-0 (-> *setting-control* user-default))
(s5-0 (-> *setting-control* user-current))
)
(let ((f0-1 (the float (scf-get-volume))))
(set! (-> gp-0 ocean-off) #f)
(set! (-> gp-0 weather) #t)
(set! (-> gp-0 cursor) #f)
(set! (-> gp-0 mouse) #f)
(set! (-> gp-0 allow-look-around) #t)
(set! (-> gp-0 border-mode) #f)
(set! (-> gp-0 region-mode) #t)
(set! (-> gp-0 borrow) '())
(set! (-> gp-0 sfx-volume) (* 0.01000001 f0-1))
(set! (-> gp-0 music-volume) (* 0.01000001 f0-1))
(set! (-> gp-0 dialog-volume) (* 0.01000001 f0-1))
(set! (-> gp-0 ambient-volume) (* 0.01000001 f0-1))
(set! (-> gp-0 sfx-movie-volume) (* 0.006000006 f0-1))
(set! (-> gp-0 music-volume-movie) (* 0.0 f0-1))
(set! (-> gp-0 ambient-volume-move) (* 0.006000006 f0-1))
(set! (-> gp-0 dialog-volume-hint) (* 0.008000008 f0-1))
)
(set! (-> gp-0 spotlight-color) (new 'static 'rgba :r #xf0 :g #xf0 :b #xf0 :a #x80))
(set! (-> gp-0 task-mask) (task-mask ctywide never))
(set! (-> gp-0 task-manager) (the-as (pointer process) #f))
(set! (-> gp-0 task) #f)
(set! (-> gp-0 exclusive-task) 0)
(set! (-> gp-0 exclusive-load) #f)
(set! (-> gp-0 minimap) (the-as uint 160))
(set! (-> gp-0 race-minimap) -1)
(set! (-> gp-0 language) (scf-get-language))
(set! (-> gp-0 subtitle-language) (-> gp-0 language))
(set! (-> gp-0 process-mask) (process-mask execute sleep))
(set! (-> gp-0 use-progressive-scan) #f)
(set! (-> gp-0 display-dx) 0)
(set! (-> gp-0 display-dy) 0)
(set! (-> gp-0 vibration)
(if (or (= *kernel-boot-message* 'demo) (= *kernel-boot-message* 'demo-shared) (nonzero? (scf-get-territory)))
#f
#t
)
)
(set! (-> gp-0 unknowng-symbol-00) #f)
(set! (-> gp-0 auto-save) #f)
(set! (-> gp-0 play-hints) #t)
(set! (-> gp-0 sound-bank-load) #t)
(set! (-> gp-0 subtitle)
(if (or (= *kernel-boot-message* 'demo) (or (= *kernel-boot-message* 'demo-shared) (!= (scf-get-territory) 1)))
#f
#t
)
)
(let ((v1-31 (scf-get-territory)))
(set! (-> gp-0 beard) (if (or (= v1-31 2) (= v1-31 3))
#f
#t
)
)
)
(set! (-> gp-0 movie) (the-as (pointer process) #f))
(set! (-> gp-0 movie-name) #f)
(set! (-> gp-0 talking) (the-as (pointer process) #f))
(set! (-> gp-0 spooling) (the-as (pointer process) #f))
(set! (-> gp-0 spool-anim) #f)
(set! (-> gp-0 hint) (the-as (pointer process) #f))
(set! (-> gp-0 ambient) (the-as (pointer process) #f))
(set! (-> gp-0 duck) #t)
(set! (-> gp-0 jump) #t)
(set! (-> gp-0 double-jump) #t)
(set! (-> gp-0 darkjak) #t)
(set! (-> gp-0 endlessfall) #t)
(set! (-> gp-0 pilot) #t)
(set! (-> gp-0 pilot-exit) #t)
(set! (-> gp-0 attack) #t)
(set! (-> gp-0 board) #t)
(set! (-> gp-0 gun) #t)
(set! (-> gp-0 doorway) #f)
(set! (-> gp-0 airlock) #t)
(set! (-> gp-0 gun-buoy) #t)
(set! (-> gp-0 speech-control) #t)
(set! (-> gp-0 vehicle-hijacking) #t)
(set! (-> gp-0 ignore-target) #f)
(set! (-> gp-0 gen) #t)
(set! (-> gp-0 half-speed) #f)
(set! (-> gp-0 render) #t)
(set! (-> gp-0 speed-mult) 1.0)
(set! (-> gp-0 rain) 0.0)
(set! (-> gp-0 snow) 0.0)
(set! (-> gp-0 features) (the-as game-feature -1))
(set! (-> gp-0 sound-flava) (the-as uint 0))
(set! (-> gp-0 sound-flava-priority) 0.0)
(set! (-> gp-0 sound-reverb) 0.0)
(set! (-> gp-0 mode-sound-bank) (the-as uint #f))
(set! (-> gp-0 music) #f)
(set! (-> gp-0 extra-bank) '())
(set! (-> gp-0 bg-a-speed) 8.0)
(set! (-> gp-0 under-water-pitch-mod) 0.0)
(set! (-> gp-0 allow-pause) #t)
(set! (-> gp-0 allow-progress) #t)
(set! (-> gp-0 allow-continue) #t)
(set! (-> gp-0 allow-timeout) #f)
(set! (-> gp-0 allow-error) #t)
(set! (-> gp-0 mirror) #f)
(set! (-> gp-0 unknown-int32-00) 1)
(set! (-> gp-0 stereo-mode) 1)
(set! (-> gp-0 movie-skip-frame) -1.0)
(set! (-> gp-0 allow-blackout) #t)
(set! (-> gp-0 bg-a) 1.0)
(case (scf-get-aspect)
((2)
(set! (-> gp-0 aspect-ratio) 'aspect16x9)
)
(else
(set! (-> gp-0 aspect-ratio) 'aspect4x3)
)
)
(if (zero? *boot-video-mode*)
(set! (-> gp-0 video-mode) 'ntsc)
(set! (-> gp-0 video-mode) 'pal)
)
(set! (-> s5-0 borrow) (-> gp-0 borrow))
(set! (-> s5-0 sfx-volume) (+ -0.01 (-> gp-0 sfx-volume)))
(set! (-> s5-0 music-volume) (+ -0.01 (-> gp-0 music-volume)))
(set! (-> s5-0 dialog-volume) (+ -0.01 (-> gp-0 dialog-volume)))
(set! (-> s5-0 ambient-volume) (+ -0.01 (-> gp-0 ambient-volume)))
(set! (-> s5-0 sfx-movie-volume) (-> gp-0 sfx-movie-volume))
(set! (-> s5-0 music-volume-movie) (-> gp-0 music-volume-movie))
(set! (-> s5-0 ambient-volume-move) (-> gp-0 ambient-volume-move))
(set! (-> s5-0 dialog-volume-hint) (-> gp-0 dialog-volume-hint))
(set! (-> s5-0 spotlight-color) (-> gp-0 spotlight-color))
(set! (-> s5-0 movie) (-> gp-0 movie))
(set! (-> s5-0 movie-name) (-> gp-0 movie-name))
(set! (-> s5-0 talking) (-> gp-0 talking))
(set! (-> s5-0 spooling) (-> gp-0 spooling))
(set! (-> s5-0 spool-anim) (-> gp-0 spool-anim))
(set! (-> s5-0 hint) (-> gp-0 hint))
(set! (-> s5-0 ambient) (-> gp-0 ambient))
(set! (-> s5-0 language) (+ (-> gp-0 language) -1))
(set! (-> s5-0 subtitle-language) (-> gp-0 subtitle-language))
(set! (-> s5-0 aspect-ratio) #f)
(set! (-> s5-0 use-progressive-scan) #f)
(set! (-> s5-0 video-mode) #f)
(set! (-> s5-0 music) #f)
(set! (-> s5-0 extra-bank) '())
(set! (-> s5-0 allow-blackout) (-> gp-0 allow-blackout))
(set! (-> s5-0 bg-a-speed) (-> gp-0 bg-a-speed))
(set! (-> s5-0 under-water-pitch-mod) (-> gp-0 under-water-pitch-mod))
(set! (-> s5-0 allow-pause) (-> gp-0 allow-pause))
(set! (-> s5-0 allow-progress) (-> gp-0 allow-progress))
(set! (-> s5-0 allow-continue) (-> gp-0 allow-continue))
(set! (-> s5-0 allow-look-around) (-> gp-0 allow-look-around))
(set! (-> s5-0 allow-timeout) (-> gp-0 allow-timeout))
(set! (-> s5-0 allow-error) (-> gp-0 allow-error))
(set! (-> s5-0 mirror) (-> gp-0 mirror))
(set! (-> s5-0 ocean-off) (-> gp-0 ocean-off))
(set! (-> s5-0 weather) (-> gp-0 weather))
(set! (-> s5-0 mouse) (-> gp-0 mouse))
(set! (-> s5-0 cursor) (-> gp-0 cursor))
(set! (-> s5-0 mode-sound-bank) (the-as uint #f))
(set! (-> s5-0 sound-reverb) (+ 0.01 (-> gp-0 sound-reverb)))
(set! (-> s5-0 stereo-mode) 1)
(set! (-> s5-0 duck) (-> gp-0 duck))
(set! (-> s5-0 jump) (-> gp-0 jump))
(set! (-> s5-0 double-jump) (-> gp-0 double-jump))
(set! (-> s5-0 darkjak) (-> gp-0 darkjak))
(set! (-> s5-0 endlessfall) (-> gp-0 endlessfall))
(set! (-> s5-0 pilot) (-> gp-0 pilot))
(set! (-> s5-0 pilot-exit) (-> gp-0 pilot-exit))
(set! (-> s5-0 attack) (-> gp-0 attack))
(set! (-> s5-0 gun) (-> gp-0 gun))
(set! (-> s5-0 doorway) (-> gp-0 doorway))
(set! (-> s5-0 board) (-> gp-0 board))
(set! (-> s5-0 gen) (-> gp-0 gen))
(set! (-> s5-0 half-speed) (-> gp-0 half-speed))
(set! (-> s5-0 render) (-> gp-0 render))
(set! (-> s5-0 speed-mult) (-> gp-0 speed-mult))
(set! (-> s5-0 rain) (-> gp-0 rain))
(set! (-> s5-0 snow) (-> gp-0 snow))
(set! (-> s5-0 movie-skip-frame) (-> gp-0 movie-skip-frame))
(set! (-> s5-0 airlock) (-> gp-0 airlock))
(set! (-> s5-0 gun-buoy) (-> gp-0 gun-buoy))
(set! (-> s5-0 ignore-target) (-> gp-0 ignore-target))
(set! (-> s5-0 speech-control) (-> gp-0 speech-control))
(set! (-> s5-0 vehicle-hijacking) (-> gp-0 vehicle-hijacking))
(set! (-> s5-0 features) (-> gp-0 features))
(set! (-> s5-0 task-mask) (-> gp-0 task-mask))
(set! (-> s5-0 task) (-> gp-0 task))
(set! (-> s5-0 exclusive-task) (-> gp-0 exclusive-task))
(set! (-> s5-0 exclusive-load) (-> gp-0 exclusive-load))
(set! (-> s5-0 task-manager) (-> gp-0 task-manager))
(set! (-> s5-0 bg-a) (-> gp-0 bg-a))
)
(let ((v1-127 (-> *setting-control* cam-default)))
(let ((a0-29 (-> *setting-control* cam-current)))
(set! (-> v1-127 fov) 11650.845)
(set! (-> v1-127 pov-handle) (the-as handle #f))
(set! (-> v1-127 pov-bone) 0)
(vector-reset! (-> v1-127 pov-offset))
(set! (-> v1-127 string-default) #t)
(set! (-> v1-127 string-max-length-default) #t)
(set! (-> v1-127 string-min-length-default) #t)
(set! (-> v1-127 string-max-height-default) #t)
(set! (-> v1-127 string-min-height-default) #t)
(set! (-> v1-127 string-max-length) 51200.0)
(set! (-> v1-127 string-min-length) 20480.0)
(set! (-> v1-127 string-max-height) 12288.0)
(set! (-> v1-127 string-min-height) 4096.0)
(set! (-> v1-127 string-cliff-height) 163840.0)
(set! (-> v1-127 string-camera-ceiling) 4096000000.0)
(set! (-> v1-127 gun-min-height) -4096.0)
(set! (-> v1-127 gun-max-height) 32768.0)
(set-vector! (-> v1-127 string-local-down) 0.0 -1.0 0.0 1.0)
(set! (-> v1-127 slave-options) (cam-slave-options JUMP_PITCHES COLLIDE LINE_OF_SIGHT))
(set! (-> v1-127 matrix-blend-max-angle) 364.0889)
(set! (-> v1-127 matrix-blend-max-partial) 0.25)
(set! (-> v1-127 string-spline-max-move) 2457.6)
(set! (-> v1-127 string-spline-accel) 20.48)
(set! (-> v1-127 string-spline-max-move-player) 2457.6)
(set! (-> v1-127 string-spline-accel-player) 102.4)
(set! (-> v1-127 target-height) (-> *CAMERA_MASTER-bank* target-height))
(set! (-> v1-127 head-offset) (-> *CAMERA_MASTER-bank* onscreen-head-height))
(set! (-> v1-127 foot-offset) (-> *CAMERA_MASTER-bank* onscreen-foot-height))
(set! (-> v1-127 teleport-on-entity-change) #f)
(set! (-> v1-127 entity-name) #f)
(set! (-> v1-127 entity-mask) (the-as uint 32))
(set! (-> v1-127 entity-or-mode-changed) #f)
(set! (-> v1-127 master-options) (cam-master-options READ_BUTTONS))
(set! (-> v1-127 mode-name) #f)
(set! (-> v1-127 real-entity-name) #f)
(set! (-> v1-127 cam-mode) #f)
(set! (-> v1-127 no-intro) #f)
(set! (-> v1-127 mouse-input) #f)
(set! (-> v1-127 cpad1-skip-buttons) #f)
(set! (-> v1-127 interp-time) (the-as uint 450))
(set! (-> v1-127 1Tinterp-time-priority) (the-as uint 0))
(set! (-> v1-127 string-use-startup-vector) #f)
(set! (-> v1-127 use-look-at-point) #f)
(set! (-> v1-127 use-point-of-interest) #f)
(set! (-> v1-127 use-mouse-tumble-point) #f)
(set! (-> v1-127 handle-of-interest) (the-as handle #f))
(set! (-> a0-29 mouse-input) (-> v1-127 mouse-input))
(set! (-> a0-29 cpad1-skip-buttons) (-> v1-127 cpad1-skip-buttons))
(set! (-> a0-29 teleport-on-entity-change) (-> v1-127 teleport-on-entity-change))
(set! (-> a0-29 entity-name) (-> v1-127 entity-name))
(set! (-> a0-29 entity-mask) (-> v1-127 entity-mask))
(set! (-> a0-29 mode-name) (-> v1-127 mode-name))
(set! (-> a0-29 real-entity-name) (-> v1-127 real-entity-name))
(set! (-> a0-29 cam-mode) (-> v1-127 cam-mode))
(set! (-> a0-29 string-use-startup-vector) (-> v1-127 string-use-startup-vector))
(set! (-> a0-29 use-point-of-interest) (-> v1-127 use-point-of-interest))
(set! (-> a0-29 use-mouse-tumble-point) (-> v1-127 use-mouse-tumble-point))
(set! (-> a0-29 handle-of-interest) (-> v1-127 handle-of-interest))
)
(set! (-> v1-127 butt-handle) (the-as handle #f))
(set! (-> v1-127 butt-angle) 32768.0)
(set! (-> v1-127 extra-follow-height) 0.0)
)
)