From df991470f7e52b8e21f8c955e981c19001c047f4 Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Sun, 12 Jun 2022 17:23:08 +0100 Subject: [PATCH] cleanup `settings` stuff (#1444) * rename `setting-control` methods * macros around settings stuff * fix some `process-spawn`s * update source 1 * update remaining stuff + fix silly bug * clang * AGH --- decompiler/IR2/FormExpressionAnalysis.cpp | 71 ++- decompiler/analysis/insert_lets.cpp | 13 +- decompiler/config/all-types.gc | 10 +- .../jak1_ntsc_black_label/art_info.jsonc | 3 +- .../jak1_ntsc_black_label/label_types.jsonc | 2 +- .../jak1_ntsc_black_label/type_casts.jsonc | 5 +- goal_src/engine/ambient/ambient.gc | 30 +- goal_src/engine/camera/pov-camera.gc | 8 +- goal_src/engine/debug/anim-tester.gc | 14 +- goal_src/engine/game/collectables.gc | 23 +- goal_src/engine/game/game-info.gc | 6 +- goal_src/engine/game/game-save.gc | 8 +- goal_src/engine/game/generic-obs.gc | 8 +- goal_src/engine/game/main.gc | 6 +- goal_src/engine/game/settings-h.gc | 89 ++- goal_src/engine/game/settings.gc | 153 +++-- goal_src/engine/game/task/process-taskable.gc | 131 ++-- goal_src/engine/game/voicebox.gc | 4 +- goal_src/engine/level/level.gc | 2 +- goal_src/engine/level/load-boundary.gc | 15 +- goal_src/engine/load/loader.gc | 6 +- goal_src/engine/sound/gsound.gc | 8 +- goal_src/engine/target/logic-target.gc | 6 +- goal_src/engine/target/target-death.gc | 36 +- goal_src/engine/target/target2.gc | 77 +-- goal_src/engine/ui/progress/progress.gc | 12 +- goal_src/levels/common/battlecontroller.gc | 4 +- goal_src/levels/common/plat-button.gc | 8 +- goal_src/levels/demo/demo-obs.gc | 6 +- goal_src/levels/demo/static-screen.gc | 4 +- goal_src/levels/finalboss/final-door.gc | 4 +- goal_src/levels/finalboss/robotboss.gc | 4 +- goal_src/levels/finalboss/sage-finalboss.gc | 472 +++++++------- goal_src/levels/flut_common/target-flut.gc | 12 +- goal_src/levels/jungle/fisher.gc | 4 +- goal_src/levels/jungleb/plant-boss.gc | 8 +- goal_src/levels/misty/muse.gc | 19 +- goal_src/levels/misty/sidekick-human.gc | 444 +++++++------ goal_src/levels/ogre/flying-lurker.gc | 6 +- goal_src/levels/ogre/ogreboss.gc | 4 +- goal_src/levels/racer_common/racer-part.gc | 194 +++--- goal_src/levels/racer_common/racer-states.gc | 4 +- goal_src/levels/rolling/rolling-obs.gc | 4 +- goal_src/levels/snow/snow-obs.gc | 8 +- goal_src/levels/snow/snow-ram-boss.gc | 30 +- goal_src/levels/snow/snow-ram.gc | 40 +- goal_src/levels/sunken/helix-water.gc | 40 +- goal_src/levels/sunken/target-tube.gc | 8 +- goal_src/levels/swamp/billy.gc | 4 +- goal_src/levels/title/title-obs.gc | 54 +- goal_src/levels/training/training-obs.gc | 12 +- goal_src/levels/village1/fishermans-boat.gc | 2 +- goal_src/levels/village1/sage.gc | 600 +++++++++--------- .../levels/village1/sequence-a-village1.gc | 6 +- goal_src/levels/village2/swamp-blimp.gc | 12 +- goal_src/levels/village3/village3-obs.gc | 8 +- .../levels/village_common/villagep-obs.gc | 20 +- goal_src/pc/progress-pc.gc | 6 +- .../decompiler/reference/decompiler-macros.gc | 82 +++ .../reference/engine/ambient/ambient_REF.gc | 30 +- .../reference/engine/camera/pov-camera_REF.gc | 8 +- .../reference/engine/debug/anim-tester_REF.gc | 14 +- .../reference/engine/game/collectables_REF.gc | 23 +- .../reference/engine/game/game-info_REF.gc | 6 +- .../reference/engine/game/game-save_REF.gc | 8 +- .../reference/engine/game/generic-obs_REF.gc | 8 +- .../reference/engine/game/main_REF.gc | 6 +- .../reference/engine/game/settings-h_REF.gc | 10 +- .../reference/engine/game/settings_REF.gc | 14 +- .../engine/game/task/process-taskable_REF.gc | 129 ++-- .../reference/engine/game/voicebox_REF.gc | 4 +- .../reference/engine/level/level_REF.gc | 2 +- .../engine/level/load-boundary_REF.gc | 11 +- .../reference/engine/load/loader_REF.gc | 6 +- .../reference/engine/sound/gsound_REF.gc | 10 +- .../engine/target/logic-target_REF.gc | 6 +- .../engine/target/target-death_REF.gc | 36 +- .../reference/engine/target/target2_REF.gc | 77 +-- .../engine/ui/progress/progress_REF.gc | 12 +- .../levels/common/battlecontroller_REF.gc | 4 +- .../levels/common/plat-button_REF.gc | 8 +- .../reference/levels/demo/demo-obs_REF.gc | 6 +- .../levels/demo/static-screen_REF.gc | 4 +- .../levels/finalboss/final-door_REF.gc | 4 +- .../levels/finalboss/robotboss_REF.gc | 4 +- .../levels/finalboss/sage-finalboss_REF.gc | 472 +++++++------- .../levels/flut_common/target-flut_REF.gc | 12 +- .../reference/levels/jungle/fisher_REF.gc | 4 +- .../levels/jungleb/plant-boss_REF.gc | 8 +- .../reference/levels/misty/muse_REF.gc | 19 +- .../levels/misty/sidekick-human_REF.gc | 444 +++++++------ .../levels/ogre/flying-lurker_REF.gc | 6 +- .../reference/levels/ogre/ogreboss_REF.gc | 4 +- .../levels/racer_common/racer-part_REF.gc | 194 +++--- .../levels/racer_common/racer-states_REF.gc | 4 +- .../levels/rolling/rolling-obs_REF.gc | 4 +- .../reference/levels/snow/snow-obs_REF.gc | 8 +- .../levels/snow/snow-ram-boss_REF.gc | 30 +- .../reference/levels/snow/snow-ram_REF.gc | 40 +- .../levels/sunken/helix-water_REF.gc | 40 +- .../levels/sunken/target-tube_REF.gc | 8 +- .../reference/levels/swamp/billy_REF.gc | 4 +- .../reference/levels/title/title-obs_REF.gc | 54 +- .../levels/training/training-obs_REF.gc | 12 +- .../levels/village1/fishermans-boat_REF.gc | 2 +- .../reference/levels/village1/sage_REF.gc | 600 +++++++++--------- .../village1/sequence-a-village1_REF.gc | 6 +- .../levels/village2/swamp-blimp_REF.gc | 12 +- .../levels/village3/village3-obs_REF.gc | 8 +- .../levels/village_common/villagep-obs_REF.gc | 20 +- 110 files changed, 2678 insertions(+), 2666 deletions(-) diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index 6f0ecea42f..557376e5d8 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -2792,6 +2792,26 @@ Form* get_set_next_state(FormElement* set_elt, const Env& env) { // FunctionCallElement /////////////////// +namespace { + +std::optional get_form_reg_acc(Form* in) { + auto as_simple_atom = dynamic_cast(in->try_as_single_active_element()); + if (as_simple_atom) { + if (as_simple_atom->atom().is_var()) { + return as_simple_atom->atom().var(); + } + } + + auto as_expr = dynamic_cast(in->try_as_single_active_element()); + if (as_expr && as_expr->expr().is_identity()) { + auto atom = as_expr->expr().get_arg(0); + if (atom.is_var()) { + return atom.var(); + } + } +} +} // namespace + void FunctionCallElement::update_from_stack(const Env& env, FormPool& pool, FormStack& stack, @@ -2980,9 +3000,56 @@ void FunctionCallElement::update_from_stack(const Env& env, .at(0); // fmt::print("GOT: {}\n", pop->to_string(env)); arg_forms.at(0) = pop; + auto head = mr.maps.forms.at(1); - new_form = pool.alloc_element( - GenericOperator::make_function(mr.maps.forms.at(1)), arg_forms); + auto head_obj = head->to_form(env); + if (head_obj.is_symbol() && tp_type.method_from_type().base_type() == "setting-control" && + arg_forms.at(0)->to_form(env).is_symbol("*setting-control*") && + arg_forms.size() > 1) { + auto arg1_reg = get_form_reg_acc(arg_forms.at(1)); + if (arg1_reg && arg1_reg->reg().is_s6()) { + std::string new_head; + if (head_obj.is_symbol("add-setting")) { + new_head = "add-setting!"; + } else if (head_obj.is_symbol("set-setting")) { + new_head = "set-setting!"; + } else if (head_obj.is_symbol("remove-setting")) { + new_head = "remove-setting!"; + } + if (!new_head.empty()) { + auto oldp = head->parent_element; + head = pool.form(new_head); + head->parent_element = oldp; + arg_forms.erase(arg_forms.begin()); + arg_forms.erase(arg_forms.begin()); + if (arg_forms.size() > 3) { + auto argi = arg_forms.at(3); + auto argi_o = argi->to_form(env); + if (argi_o.is_int()) { + auto argset = arg_forms.at(0)->to_string(env); + if (argset == "'process-mask") { + auto en = env.dts->ts.try_enum_lookup("process-mask"); + if (en) { + arg_forms.at(3) = + cast_to_bitfield_enum(env.dts->ts.try_enum_lookup("process-mask"), pool, + env, argi_o.as_int()); + } + } else if (argset == "'sound-flava") { + auto en = env.dts->ts.try_enum_lookup("music-flava"); + if (en) { + arg_forms.at(3) = cast_to_int_enum( + env.dts->ts.try_enum_lookup("music-flava"), pool, env, argi_o.as_int()); + } + } + } + arg_forms.at(3)->parent_element = argi->parent_element; + } + } + } + } + + new_form = + pool.alloc_element(GenericOperator::make_function(head), arg_forms); result->push_back(new_form); ASSERT(!go_next_state); return; diff --git a/decompiler/analysis/insert_lets.cpp b/decompiler/analysis/insert_lets.cpp index 6e58a4068d..e3ae2ac3c4 100644 --- a/decompiler/analysis/insert_lets.cpp +++ b/decompiler/analysis/insert_lets.cpp @@ -483,8 +483,8 @@ FormElement* rewrite_as_send_event(LetElement* in, nullptr); if (!std::get<0>(mr_with_shell).matched) { - lg::error("shell match failed, dont know this form: {}", - body->at(3 + param_count)->to_string(env)); + // lg::error("shell match failed, dont know this form: {}", + // body->at(3 + param_count)->to_string(env)); return nullptr; } @@ -1415,7 +1415,7 @@ FormElement* rewrite_proc_new(LetElement* in, const Env& env, FormPool& pool) { &cast_type); if (!std::get<0>(mr_with_shell).matched) { - lg::error("shell match failed, dont know this form: {}", macro_form->to_string(env)); + // lg::error("shell match failed, dont know this form: {}", macro_form->to_string(env)); return nullptr; } @@ -1571,8 +1571,8 @@ FormElement* rewrite_attack_info(LetElement* in, const Env& env, FormPool& pool) nullptr); if (!std::get<0>(mr_with_shell).matched) { - lg::error("shell match failed, dont know this form: {}", - in->body()->at(in->body()->size() - 1)->to_string(env)); + // lg::error("shell match failed, dont know this form: {}", + // in->body()->at(in->body()->size() - 1)->to_string(env)); return nullptr; } @@ -1741,7 +1741,8 @@ FormElement* rewrite_rand_float_gen(LetElement* in, const Env& env, FormPool& po nullptr); if (!std::get<0>(mr_res).matched) { - lg::error("shell match failed, dont know this form: {}", in->body()->at(0)->to_string(env)); + // lg::error("shell match failed, dont know this form: {}", + // in->body()->at(0)->to_string(env)); return nullptr; } diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index c5b057256f..8edc5c5314 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -6097,11 +6097,11 @@ :flag-assert #xe00000278 (:methods (new (symbol type int) _type_ 0) - (push-setting! (_type_ process symbol object object object) none 9) - (set-setting! (_type_ process symbol symbol float int) none 10) - (clear-pending-settings-from-process (_type_ process symbol) none 11) - (copy-settings-from-target! (_type_) setting-data 12) - (update-per-frame-settings! (_type_) setting-data 13) + (add-setting (_type_ process symbol object object object) none 9) + (set-setting (_type_ process symbol object object object) none 10) + (remove-setting (_type_ process symbol) none 11) + (apply-settings (_type_) setting-data 12) + (update (_type_) setting-data 13) ) ) diff --git a/decompiler/config/jak1_ntsc_black_label/art_info.jsonc b/decompiler/config/jak1_ntsc_black_label/art_info.jsonc index 9a4a9ab374..19d3993682 100644 --- a/decompiler/config/jak1_ntsc_black_label/art_info.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/art_info.jsonc @@ -12,7 +12,8 @@ "target": "eichar-ag", "target2": "eichar-ag", "target-death": "eichar-ag", - "powerups": "eichar-ag" + "powerups": "eichar-ag", + "snow-ram": "ram-ag" }, "functions": { diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index 63893a209c..ff53c9e3cb 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -1934,7 +1934,7 @@ ["L741", "float", true], ["L742", "float", true], ["L743", "float", true], - ["L744", "(pointer int32)", 1], + ["L744", "float", true], ["L745", "uint64", true], ["L746", "uint64", true], ["L757", "uint64", true] diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index f61fd85974..46f154f621 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -1284,7 +1284,6 @@ [171, "v1", "anim-test-seq-item"], [173, "v1", "anim-test-seq-item"] ], - "anim-tester-start": [[20, "t9", "(function process function none)"]], "anim-tester-set-name": [ [[34, 51], "s3", "anim-test-obj"], [[40, 63], "s5", "anim-test-sequence"] @@ -5948,7 +5947,6 @@ ], "(method 56 ram-boss)": [ - [24, "v0", "ram-boss-proj"], [58, "v1", "(pointer ram-boss-proj)"] ], @@ -5958,7 +5956,6 @@ ], "(code ram-give-fuel-cell)": [ - [47, "v0", "snowcam"], [69, "v1", "(pointer snowcam)"] ], @@ -6471,7 +6468,7 @@ [14, "t9", "(function process-drawable int process-drawable)"] ], - "(code helix-button-activate)": [[37, "v0", "sunkencam"]], + "(code helix-button-activate)": [[58, "v1", "(pointer sunkencam)"]], "(code target-flut-jump)": [[137, "v1", "float"]], diff --git a/goal_src/engine/ambient/ambient.gc b/goal_src/engine/ambient/ambient.gc index 9932523135..c7492a2f2f 100644 --- a/goal_src/engine/ambient/ambient.gc +++ b/goal_src/engine/ambient/ambient.gc @@ -301,7 +301,7 @@ (set! (-> self total-off-time) 0) (set! (-> self last-time) (-> *display* base-frame-counter)) (set! *hint-semaphore* (the-as (pointer level-hint) (process->ppointer self))) - (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) + (add-setting! 'hint (process->ppointer self) 0.0 0) (set! (-> self voicebox) (the-as handle #f)) (let ((s5-1 (res-lump-struct arg2 'play-mode structure)) (a0-6 (the-as string ((method-of-type res-lump get-property-struct) @@ -342,12 +342,12 @@ (set! (-> self last-time) (-> *display* base-frame-counter)) (set! (-> self trans) arg1) (set! *hint-semaphore* (the-as (pointer level-hint) (process->ppointer self))) - (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) + (add-setting! 'hint (process->ppointer self) 0.0 0) (set! (-> self mode) arg2) (if (or (= arg2 'camera) (= arg2 'ambient) (= arg2 'stinger)) - (push-setting! *setting-control* self 'ambient (process->ppointer self) 0.0 0) + (add-setting! 'ambient (process->ppointer self) 0.0 0) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (set! (-> self event-hook) (lambda :behavior level-hint ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) @@ -473,9 +473,9 @@ (if (nonzero? (-> self sound-id)) (sound-stop (-> self sound-id)) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'dialog-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'dialog-volume) (if (= (ppointer->process *hint-semaphore*) self) (set! *hint-semaphore* (the-as (pointer level-hint) #f)) ) @@ -511,9 +511,9 @@ ) (cond ((= (current-str-id) s5-2) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! *setting-control* self 'dialog-volume 'rel (-> *setting-control* current dialog-volume-hint) 0) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'dialog-volume 'rel (-> *setting-control* current dialog-volume-hint) 0) (while (= (current-str-id) s5-2) (suspend) ) @@ -536,8 +536,8 @@ (if (nonzero? (-> self sound-id)) (sound-stop (-> self sound-id)) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) (if (= (ppointer->process *hint-semaphore*) self) (set! *hint-semaphore* (the-as (pointer level-hint) #f)) ) @@ -575,8 +575,8 @@ (cond ((= (current-str-id) (-> self sound-id)) (when (or (= (-> self mode) 'stinger) (= (-> self mode) 'camera)) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) ) (while (= (current-str-id) (-> self sound-id)) (suspend) @@ -594,7 +594,7 @@ (defstate level-hint-error (level-hint) :event (-> level-hint-normal event) :code (behavior ((arg0 string) (arg1 string)) - (clear-pending-settings-from-process *setting-control* self 'hint) + (remove-setting! 'hint) (let ((s4-0 (-> *display* base-frame-counter))) (until (>= (- (-> *display* base-frame-counter) s4-0) (seconds 1)) (when (and *debug-segment* (not (paused?)) (not (str-is-playing?)) (bottom-hud-hidden?)) diff --git a/goal_src/engine/camera/pov-camera.gc b/goal_src/engine/camera/pov-camera.gc index 496faccade..c641328d40 100644 --- a/goal_src/engine/camera/pov-camera.gc +++ b/goal_src/engine/camera/pov-camera.gc @@ -103,13 +103,13 @@ (if (= (-> self anim-name type) string) (restore-load-state-and-cleanup *load-state*) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) (none) ) :code (behavior () - (push-setting! *setting-control* self 'music-volume 'rel (-> self music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> self sfx-volume-movie) 0) + (add-setting! 'music-volume 'rel (-> self music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> self sfx-volume-movie) 0) (cond ((= (-> self anim-name type) string) (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) diff --git a/goal_src/engine/debug/anim-tester.gc b/goal_src/engine/debug/anim-tester.gc index 7e8e73b595..1a00c3395a 100644 --- a/goal_src/engine/debug/anim-tester.gc +++ b/goal_src/engine/debug/anim-tester.gc @@ -2643,19 +2643,7 @@ (defun anim-tester-start () (anim-tester-stop) - (let ((gp-0 (get-process *16k-dead-pool* anim-tester #x4000))) - (set! *anim-tester* - (the-as (pointer anim-tester) - (when gp-0 - (let ((t9-2 (method-of-type anim-tester activate))) - (t9-2 (the-as anim-tester gp-0) *default-pool* 'anim-tester (the-as pointer #x70004000)) - ) - ((the-as (function process function none) run-function-in-process) gp-0 initialize-anim-tester) - (-> gp-0 ppointer) - ) - ) - ) - ) + (set! *anim-tester* (process-spawn anim-tester :init initialize-anim-tester :from *16k-dead-pool*)) (set! *camera-orbit-target* *anim-tester*) (send-event *camera* 'change-state cam-orbit 0) #f diff --git a/goal_src/engine/game/collectables.gc b/goal_src/engine/game/collectables.gc index 13af9a83d9..9e1f4d938a 100644 --- a/goal_src/engine/game/collectables.gc +++ b/goal_src/engine/game/collectables.gc @@ -1446,8 +1446,8 @@ ) ) ) - (push-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (add-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (logclear! (-> self mask) (process-mask actor-pause)) (go-virtual pickup #f (process->handle arg0)) ) @@ -1660,16 +1660,9 @@ (set! (-> self draw bounds w) 32768.0) (logior! (-> self skel status) (janim-status inited)) (send-event *target* 'blend-shape #t) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! - *setting-control* - self - 'ambient-volume - 'rel - (-> *setting-control* current ambient-volume-movie) - 0 - ) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'ambient-volume 'rel (-> *setting-control* current ambient-volume-movie) 0) (process-spawn othercam self 10 #f #t :to self) (auto-save-command 'auto-save 0 0 *default-pool*) (ja-play-spooled-anim @@ -1678,9 +1671,9 @@ (the-as art-joint-anim #f) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) (send-event *target* 'blend-shape #f) (send-event *target* 'end-mode) (send-event *camera* 'no-intro) diff --git a/goal_src/engine/game/game-info.gc b/goal_src/engine/game/game-info.gc index 1317ffff94..109ed91c57 100644 --- a/goal_src/engine/game/game-info.gc +++ b/goal_src/engine/game/game-info.gc @@ -286,9 +286,9 @@ ((= v1-65 'play) ;; don't allow pausing/start menu (when *target* - (set-setting! *setting-control* *target* 'allow-pause #f 0.0 0) - (set-setting! *setting-control* *target* 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting *setting-control* *target* 'allow-pause #f 0.0 0) + (set-setting *setting-control* *target* 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) ) ;; send the auto-save process a 'die message diff --git a/goal_src/engine/game/game-save.gc b/goal_src/engine/game/game-save.gc index f528b3eb88..2622a9de25 100644 --- a/goal_src/engine/game/game-save.gc +++ b/goal_src/engine/game/game-save.gc @@ -1631,13 +1631,13 @@ (go-virtual error (mc-status-code bad-version)) ) ) - (set-setting! *setting-control* self 'music-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'sfx-volume 'abs 0.0 0) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) (set! (-> *game-info* mode) 'play) (initialize! *game-info* 'game (-> self save) (the-as string #f)) (set-master-mode 'game) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 16) + (apply-settings *setting-control*) (dotimes (gp-1 15) (suspend) ) diff --git a/goal_src/engine/game/generic-obs.gc b/goal_src/engine/game/generic-obs.gc index 051753c994..267dcec07d 100644 --- a/goal_src/engine/game/generic-obs.gc +++ b/goal_src/engine/game/generic-obs.gc @@ -1106,10 +1106,10 @@ (dummy-30 (-> self entity-override) (entity-perm-status bit-3) #t) ) (if (not (-> self border-value)) - (push-setting! *setting-control* self 'border-mode (-> self border-value) 0.0 0) + (add-setting! 'border-mode (-> self border-value) 0.0 0) ) - (push-setting! *setting-control* self 'process-mask 'set 0.0 (-> self mask-to-clear)) - (push-setting! *setting-control* self 'movie (process->ppointer self) 0.0 0) + (add-setting! 'process-mask 'set 0.0 (-> self mask-to-clear)) + (add-setting! 'movie (process->ppointer self) 0.0 0) (hide-hud-quick) (none) ) @@ -1132,7 +1132,7 @@ ) ) ) - (clear-pending-settings-from-process *setting-control* self 'process-mask) + (remove-setting! 'process-mask) (send-event *camera* 'clear-entity) (suspend) (suspend) diff --git a/goal_src/engine/game/main.gc b/goal_src/engine/game/main.gc index 9d78f57752..963d293857 100644 --- a/goal_src/engine/game/main.gc +++ b/goal_src/engine/game/main.gc @@ -152,7 +152,7 @@ ) ) ;; apply settings now. - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) 0 (none) ) @@ -508,7 +508,7 @@ (set-blackout-frames (seconds 100)) (set! (-> *setting-control* default allow-pause) #f) (set! (-> *setting-control* default allow-progress) #f) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (set! (-> *setting-control* default sfx-volume) 0.0) (set! (-> *setting-control* default music-volume) 0.0) (set! (-> *setting-control* default dialog-volume) 0.0) @@ -587,7 +587,7 @@ ;; the size is 0, so this doesn't actually do anything. ;; (dma-send-to-spr (the-as uint #x70000000) (the-as uint *terrain-context*) (the-as uint 0) #t) (set! *teleport* #t) - (update-per-frame-settings! *setting-control*) + (update *setting-control*) (init-time-of-day-context *time-of-day-context*) (display-sync disp) (swap-display disp) diff --git a/goal_src/engine/game/settings-h.gc b/goal_src/engine/game/settings-h.gc index 7705643b9d..a6a8005ff1 100644 --- a/goal_src/engine/game/settings-h.gc +++ b/goal_src/engine/game/settings-h.gc @@ -121,11 +121,11 @@ :flag-assert #xe00000278 (:methods (new (symbol type int) _type_ 0) - (push-setting! (_type_ process symbol object object object) none 9) - (set-setting! (_type_ process symbol symbol float int) none 10) - (clear-pending-settings-from-process (_type_ process symbol) none 11) - (copy-settings-from-target! (_type_) setting-data 12) - (update-per-frame-settings! (_type_) setting-data 13) + (add-setting (_type_ process symbol object object object) none 9) + (set-setting (_type_ process symbol object object object) none 10) + (remove-setting (_type_ process symbol) none 11) + (apply-settings (_type_) setting-data 12) + (update (_type_) setting-data 13) ) ) @@ -137,6 +137,85 @@ ) ) +(defmacro setting-control-func! (func s &rest args) + (let ((argb #f) + (argi 0) + (argf 0.0) + (setting (car s))) + (cond + ; ((or (eq? setting 'border-mode) + ; (eq? setting 'allow-look-around) + ; (eq? setting 'ocean-off) + ; (eq? setting 'music) + ; (eq? setting 'vibration) + ; (eq? setting 'auto-save) + ; (eq? setting 'allow-pause) + ; (eq? setting 'allow-progress) + ; (eq? setting 'play-hints) + ; (eq? setting 'movie) + ; (eq? setting 'talking) + ; (eq? setting 'spooling) + ; (eq? setting 'hint) + ; (eq? setting 'ambient) + ; ) + ; (set! argb (car args)) + ; ) + ; ((or (eq? setting 'bg-r) + ; (eq? setting 'bg-g) + ; (eq? setting 'bg-b) + ; (eq? setting 'bg-a) + ; (eq? setting 'bg-a-speed) + ; (eq? setting 'bg-a-force) + ; ) + ; (set! argf (car args)) + ; ) + ; ((or (eq? setting 'language) + ; ) + ; (set! argi (car args)) + ; ) + ; ((or (eq? setting 'sound-flava) + ; ) + ; (set! argi (car args)) + ; (set! argf (cadr args)) + ; ) + ; ((or (eq? setting 'process-mask) + ; (eq? setting 'common-page) + ; ) + ; (set! argb (car args)) + ; (set! argi (cadr args)) + ; ) + ; ((or (eq? setting 'sfx-volume) + ; (eq? setting 'music-volume) + ; (eq? setting 'ambient-volume) + ; (eq? setting 'dialog-volume) + ; (eq? setting 'sfx-volume-movie) + ; (eq? setting 'music-volume-movie) + ; (eq? setting 'ambient-volume-movie) + ; (eq? setting 'dialog-volume-hint) + ; ) + ; (set! argb (car args)) + ; (set! argf (cadr args)) + ; ) + (#t + (set! argb (car args)) + (set! argf (cadr args)) + (set! argi (caddr args)) + ) + ) + `(,func *setting-control* (with-pp pp) ,s ,argb ,argf ,argi) + ) + ) + +(defmacro add-setting! (s &rest args) + `(setting-control-func! add-setting ,s ,@args) + ) +(defmacro set-setting! (s &rest args) + `(setting-control-func! set-setting ,s ,@args) + ) +(defmacro remove-setting! (s) + `(remove-setting *setting-control* (with-pp pp) ,s) + ) + ;; used for memory card time information (deftype scf-time (structure) ((stat uint8 :offset-assert 0) diff --git a/goal_src/engine/game/settings.gc b/goal_src/engine/game/settings.gc index d12444c07e..4b0dd9e91f 100644 --- a/goal_src/engine/game/settings.gc +++ b/goal_src/engine/game/settings.gc @@ -30,15 +30,15 @@ (set! (-> obj music) (the-as symbol (-> conn param1))) ) (('process-mask) - (case (-> conn param1) + (case (the-as object (-> conn param1)) (('set) - (logior! (-> obj process-mask) (the-as process-mask (-> conn param3))) + (logior! (-> obj process-mask) (the-as int (-> conn param3))) ) (('clear) - (logclear! (-> obj process-mask) (the-as process-mask (-> conn param3))) + (logclear! (-> obj process-mask) (the-as uint (-> conn param3))) ) (('abs) - (set! (-> obj process-mask) (the-as process-mask (-> conn param3))) + (set! (-> obj process-mask) (the-as process-mask (the-as int (-> conn param3)))) ) ) ) @@ -46,90 +46,84 @@ (when (or (zero? (logand (-> *kernel-context* prevent-from-run) (process-mask progress))) (= (get-process conn) (ppointer->process *progress-process*)) ) - (let ((v1-20 (the-as symbol (-> conn param1)))) - (if (= v1-20 'rel) - (set! (-> obj sfx-volume) - (* (* 0.01 (the-as float (-> conn param2))) (-> obj sfx-volume)) - ) - (set! (-> obj sfx-volume) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj sfx-volume) (* 0.01 (the-as float (-> conn param2)) (-> obj sfx-volume))) + ) + (else + (set! (-> obj sfx-volume) (the-as float (-> conn param2))) + ) ) ) ) (('music-volume) - (let ((v1-25 (the-as symbol (-> conn param1)))) - (if (= v1-25 'rel) - (set! (-> obj music-volume) - (* (* 0.01 (the-as float (-> conn param2))) (-> obj music-volume)) - ) - (set! (-> obj music-volume) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj music-volume) (* 0.01 (the-as float (-> conn param2)) (-> obj music-volume))) + ) + (else + (set! (-> obj music-volume) (the-as float (-> conn param2))) + ) ) ) (('ambient-volume) - (let ((v1-30 (the-as symbol (-> conn param1)))) - (if (= v1-30 'rel) - (set! (-> obj ambient-volume) - (* (* 0.01 (the-as float (-> conn param2))) (-> obj ambient-volume)) - ) - (set! (-> obj ambient-volume) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj ambient-volume) (* 0.01 (the-as float (-> conn param2)) (-> obj ambient-volume))) + ) + (else + (set! (-> obj ambient-volume) (the-as float (-> conn param2))) + ) ) ) (('dialog-volume) - (let ((v1-35 (the-as symbol (-> conn param1)))) - (if (= v1-35 'rel) - (set! (-> obj dialog-volume) - (* (* 0.01 (the-as float (-> conn param2))) (-> obj dialog-volume)) - ) - (set! (-> obj dialog-volume) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj dialog-volume) (* 0.01 (the-as float (-> conn param2)) (-> obj dialog-volume))) + ) + (else + (set! (-> obj dialog-volume) (the-as float (-> conn param2))) + ) ) ) (('sfx-volume-movie) - (let ((v1-40 (the-as symbol (-> conn param1)))) - (if (= v1-40 'rel) - (set! (-> obj sfx-volume-movie) - (* (* 0.01 (the-as float (-> conn param2))) (-> obj sfx-volume-movie)) - ) - (set! (-> obj sfx-volume-movie) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj sfx-volume-movie) (* 0.01 (the-as float (-> conn param2)) (-> obj sfx-volume-movie))) + ) + (else + (set! (-> obj sfx-volume-movie) (the-as float (-> conn param2))) + ) ) ) (('music-volume-movie) - (let ((v1-45 (the-as symbol (-> conn param1)))) - (if (= v1-45 'rel) - (set! (-> obj music-volume-movie) - (* (* 0.01 (the-as float (-> conn param2))) - (-> obj music-volume-movie) - ) - ) - (set! (-> obj music-volume-movie) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj music-volume-movie) (* 0.01 (the-as float (-> conn param2)) (-> obj music-volume-movie))) + ) + (else + (set! (-> obj music-volume-movie) (the-as float (-> conn param2))) + ) ) ) (('ambient-volume-movie) - (let ((v1-50 (the-as symbol (-> conn param1)))) - (if (= v1-50 'rel) - (set! (-> obj ambient-volume-movie) - (* (* 0.01 (the-as float (-> conn param2))) - (-> obj ambient-volume-movie) - ) - ) - (set! (-> obj ambient-volume-movie) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj ambient-volume-movie) (* 0.01 (the-as float (-> conn param2)) (-> obj ambient-volume-movie))) + ) + (else + (set! (-> obj ambient-volume-movie) (the-as float (-> conn param2))) + ) ) ) (('dialog-volume-hint) - (let ((v1-55 (the-as symbol (-> conn param1)))) - (if (= v1-55 'rel) - (set! (-> obj dialog-volume-hint) - (* (* 0.01 (the-as float (-> conn param2))) - (-> obj dialog-volume-hint) - ) - ) - (set! (-> obj dialog-volume-hint) (the-as float (-> conn param2))) - ) + (case (the-as symbol (-> conn param1)) + (('rel) + (set! (-> obj dialog-volume-hint) (* 0.01 (the-as float (-> conn param2)) (-> obj dialog-volume-hint))) + ) + (else + (set! (-> obj dialog-volume-hint) (the-as float (-> conn param2))) + ) ) ) (('sound-flava) @@ -157,7 +151,7 @@ (set! (-> obj bg-a-force) (the-as float (-> conn param2))) ) (('language) - (set! (-> obj language) (the-as language-enum (-> conn param3))) + (set! (-> obj language) (the-as language-enum (the-as int (-> conn param3)))) ) (('vibration) (set! (-> obj vibration) (the-as symbol (-> conn param1))) @@ -190,12 +184,12 @@ (set! (-> obj ambient) (the-as (pointer progress) (-> conn param1))) ) (('common-page) - (case (-> conn param1) + (case (the-as object (-> conn param1)) (('set) (logior! (-> obj common-page) (the-as int (-> conn param3))) ) (('clear) - (logclear! (-> obj common-page) (the-as int (-> conn param3))) + (logclear! (-> obj common-page) (the-as uint (-> conn param3))) ) ) ) @@ -207,23 +201,24 @@ obj ) -(defmethod push-setting! setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) - "Set the setting. The set is linked to this process and will be reverted if the process dies" +(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) + "add a setting for the process." (add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4) 0 (none) ) -(defmethod set-setting! setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 symbol) (arg3 float) (arg4 int)) - "Replace all settings from this process with this one." - (clear-pending-settings-from-process obj arg0 arg1) +(defmethod set-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) + "(re-)sets a setting for the process." + (remove-setting obj arg0 arg1) (add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4) 0 (none) ) -(defmethod clear-pending-settings-from-process setting-control ((obj setting-control) (arg0 process) (arg1 symbol)) - "Remove requests to change settings from the given process." +(defmethod remove-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol)) + "remove a setting from the specified process. + if arg1 = #t then remove ALL settings for that process" (when arg0 (let ((s5-0 (-> obj engine)) (s4-0 (-> arg0 connection-list next1)) @@ -243,7 +238,7 @@ ) -(defmethod copy-settings-from-target! setting-control ((obj setting-control)) +(defmethod apply-settings setting-control ((obj setting-control)) "Update the current settings. This only updates settings that are 'safe' to do multiple times per frame." (let ((gp-0 (-> obj current))) (let ((s5-0 (-> obj target))) @@ -282,10 +277,10 @@ ) -(defmethod update-per-frame-settings! setting-control ((obj setting-control)) +(defmethod update setting-control ((obj setting-control)) "Do a per-frame update of all settings" ;; compute all settings - (copy-settings-from-target! obj) + (apply-settings obj) ;; now handle the special ones. (let ((gp-0 (-> obj current))) diff --git a/goal_src/engine/game/task/process-taskable.gc b/goal_src/engine/game/task/process-taskable.gc index 96d762a458..df5b53eabf 100644 --- a/goal_src/engine/game/task/process-taskable.gc +++ b/goal_src/engine/game/task/process-taskable.gc @@ -160,57 +160,55 @@ ) (defmethod dummy-46 process-taskable ((obj process-taskable)) - (with-pp - (when (nonzero? (-> obj sound-flava)) - (let ((s5-1 (vector-! - (new 'stack-no-clear 'vector) - (target-pos 0) - (the-as vector (-> obj root-override root-prim prim-core)) - ) + (when (nonzero? (-> obj sound-flava)) + (let ((s5-1 (vector-! + (new 'stack-no-clear 'vector) + (target-pos 0) + (the-as vector (-> obj root-override root-prim prim-core)) ) - ) - (set! (-> s5-1 y) (* 4.0 (-> s5-1 y))) - (cond - ;; s5-1 can be nan on the first frame after something spawns - ((less-than-hack (vector-length s5-1) 102400.0) - (when (not (-> obj have-flava)) - (set! (-> obj have-flava) #t) - (set-setting! *setting-control* pp 'sound-flava #f 20.0 (the-as int (-> obj sound-flava))) - ) - ) - ((-> obj have-flava) - (clear-pending-settings-from-process *setting-control* pp 'sound-flava) - (set! (-> obj have-flava) #f) - ) + ) ) + (set! (-> s5-1 y) (* 4.0 (-> s5-1 y))) + (cond + ;; s5-1 can be nan on the first frame after something spawns + ((less-than-hack (vector-length s5-1) 102400.0) + (when (not (-> obj have-flava)) + (set! (-> obj have-flava) #t) + (set-setting! 'sound-flava #f 20.0 (-> obj sound-flava)) + ) + ) + ((-> obj have-flava) + (remove-setting! 'sound-flava) + (set! (-> obj have-flava) #f) + ) ) ) - (when (-> obj music) - (let ((s5-3 (vector-! - (new 'stack-no-clear 'vector) - (target-pos 0) - (the-as vector (-> obj root-override root-prim prim-core)) - ) - ) - ) - (set! (-> s5-3 y) (* 4.0 (-> s5-3 y))) - (cond - ((< (vector-length s5-3) 102400.0) - (when (not (-> obj have-music)) - (set! (-> obj have-music) #t) - (set-setting! *setting-control* pp 'music (-> obj music) 0.0 0) - ) - ) - ((-> obj have-music) - (clear-pending-settings-from-process *setting-control* pp 'music) - (set! (-> obj have-music) #f) - ) - ) - ) - ) - 0 - (none) ) + (when (-> obj music) + (let ((s5-3 (vector-! + (new 'stack-no-clear 'vector) + (target-pos 0) + (the-as vector (-> obj root-override root-prim prim-core)) + ) + ) + ) + (set! (-> s5-3 y) (* 4.0 (-> s5-3 y))) + (cond + ((< (vector-length s5-3) 102400.0) + (when (not (-> obj have-music)) + (set! (-> obj have-music) #t) + (set-setting! 'music (-> obj music) 0.0 0) + ) + ) + ((-> obj have-music) + (remove-setting! 'music) + (set! (-> obj have-music) #f) + ) + ) + ) + ) + 0 + (none) ) (defmethod get-art-elem process-taskable ((obj process-taskable)) @@ -437,16 +435,9 @@ (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) (send-event *target* 'blend-shape #t) ) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! - *setting-control* - self - 'ambient-volume - 'rel - (-> *setting-control* current ambient-volume-movie) - 0 - ) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'ambient-volume 'rel (-> *setting-control* current ambient-volume-movie) 0) (if (-> self blend-on-exit) (set! (-> self blend-on-exit) arg0) ) @@ -464,9 +455,9 @@ (the-as (function process-drawable symbol) false-func) ) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) (send-event *target* 'blend-shape #f) ) (else @@ -644,8 +635,8 @@ (defbehavior process-taskable-clean-up-after-talking process-taskable () (logclear! (-> self draw status) (draw-status hidden)) (logclear! (-> self skel status) (janim-status inited)) - (clear-pending-settings-from-process *setting-control* self 'border-mode) - (clear-pending-settings-from-process *setting-control* self 'talking) + (remove-setting! 'border-mode) + (remove-setting! 'talking) (none) ) @@ -903,9 +894,9 @@ (logior! (-> self skel status) (janim-status inited)) (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) - (set-setting! *setting-control* self 'border-mode #f 0.0 0) - (set-setting! *setting-control* self 'talking (the-as symbol (process->ppointer self)) 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'border-mode #f 0.0 0) + (set-setting! 'talking (process->ppointer self) 0.0 0) + (apply-settings *setting-control*) ) ) (none) @@ -1184,10 +1175,10 @@ (('logo) ) (else - (push-setting! *setting-control* self 'process-mask 'set 0.0 (-> self mask-to-clear)) - (push-setting! *setting-control* self 'movie (process->ppointer self) 0.0 0) + (add-setting! 'process-mask 'set 0.0 (-> self mask-to-clear)) + (add-setting! 'movie (process->ppointer self) 0.0 0) (if (not (-> self border-value)) - (push-setting! *setting-control* self 'border-mode (-> self border-value) 0.0 0) + (add-setting! 'border-mode (-> self border-value) 0.0 0) ) ) ) @@ -1201,12 +1192,12 @@ (vector-normalize-copy! (-> self old-mat-z) (-> v1-19 vector 2) -1.0) ) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (none) ) :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (none) ) :code (behavior () diff --git a/goal_src/engine/game/voicebox.gc b/goal_src/engine/game/voicebox.gc index a59cb77847..a6e76fb3ed 100644 --- a/goal_src/engine/game/voicebox.gc +++ b/goal_src/engine/game/voicebox.gc @@ -131,7 +131,7 @@ (none) ) :code (behavior () - (set-setting! *setting-control* self 'sound-flava #f 20.0 6) + (set-setting! 'sound-flava #f 20.0 (music-flava assistant)) (if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9))) (send-event (ppointer->process (-> self parent-override)) @@ -178,7 +178,7 @@ :virtual #t :trans voicebox-track :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self seeker target) 1.0) (while (and (< (-> self blend) 0.9999) diff --git a/goal_src/engine/level/level.gc b/goal_src/engine/level/level.gc index 0c1c34d72c..7b3c549f74 100644 --- a/goal_src/engine/level/level.gc +++ b/goal_src/engine/level/level.gc @@ -1865,7 +1865,7 @@ (new 'static 'boxed-array :type symbol :length 0 :allocated-length 2) ;; compute the settings for this frame - (update-per-frame-settings! *setting-control*) + (update *setting-control*) ;; run the art loading system (update *art-control* #t) diff --git a/goal_src/engine/level/load-boundary.gc b/goal_src/engine/level/load-boundary.gc index 0744a536c5..8e56a6bed9 100644 --- a/goal_src/engine/level/load-boundary.gc +++ b/goal_src/engine/level/load-boundary.gc @@ -2130,21 +2130,10 @@ ) ) ((= v1-4 'setting-reset) - (set-setting! - *setting-control* - pp - (the-as symbol (command-get-param (car gp-0) #f)) - (the-as symbol (command-get-param (car (cdr gp-0)) #f)) - 0.0 - 0 - ) + (set-setting! (the-as symbol (command-get-param (car gp-0) #f)) (command-get-param (car (cdr gp-0)) #f) 0.0 0) ) ((= v1-4 'setting-unset) - (clear-pending-settings-from-process - *setting-control* - pp - (the-as symbol (command-get-param (car gp-0) #f)) - ) + (remove-setting! (the-as symbol (command-get-param (car gp-0) #f))) ) ((= v1-4 'blackout) (set-blackout-frames diff --git a/goal_src/engine/load/loader.gc b/goal_src/engine/load/loader.gc index 452c22785d..84e99c6e15 100644 --- a/goal_src/engine/load/loader.gc +++ b/goal_src/engine/load/loader.gc @@ -892,11 +892,11 @@ (set! sv-56 0) (set! spool-sound (new-sound-id)) (backup-load-state-and-set-cmds *load-state* (-> arg0 command-list)) - (set-setting! *setting-control* self 'spooling (the-as symbol (process->ppointer self)) 0.0 0) + (set-setting! 'spooling (the-as symbol (process->ppointer self)) 0.0 0) (logior! (-> self skel status) (janim-status inited drawn done)) (kill-current-level-hint '() '() 'die) (level-hint-surpress!) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (when (or (handle->process (-> *art-control* spool-lock)) (!= *master-mode* 'game)) (cond (arg1 @@ -1063,7 +1063,7 @@ (if (zero? (logand (-> self skel status) (janim-status inited))) (logclear! (-> self skel status) (janim-status inited)) ) - (clear-pending-settings-from-process *setting-control* self 'spooling) + (remove-setting! 'spooling) (cond ((and arg1 (>= arg2 0)) (ja-channel-push! 1 (seconds 0.1)) diff --git a/goal_src/engine/sound/gsound.gc b/goal_src/engine/sound/gsound.gc index b30771c4a9..4e6784b8e0 100644 --- a/goal_src/engine/sound/gsound.gc +++ b/goal_src/engine/sound/gsound.gc @@ -499,11 +499,9 @@ (defun sound-volume-off () "Set all sound volume to zero" - (with-pp - (set-setting! *setting-control* pp 'music-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'sfx-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'ambient-volume 'abs 0.0 0) - ) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) 0 ) diff --git a/goal_src/engine/target/logic-target.gc b/goal_src/engine/target/logic-target.gc index 459d167c4c..b0884e8362 100644 --- a/goal_src/engine/target/logic-target.gc +++ b/goal_src/engine/target/logic-target.gc @@ -1921,9 +1921,9 @@ ) (defbehavior init-target target ((arg0 continue-point)) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (if (not arg0) (set! arg0 (get-or-create-continue! *game-info*)) ) diff --git a/goal_src/engine/target/target-death.gc b/goal_src/engine/target/target-death.gc index 1848835481..f8a74c4da9 100644 --- a/goal_src/engine/target/target-death.gc +++ b/goal_src/engine/target/target-death.gc @@ -50,13 +50,13 @@ (set! (-> *level* border?) (-> *level* play?)) (set! (-> *setting-control* default border-mode) (-> *level* play?)) ) - (clear-pending-settings-from-process *setting-control* self 'allow-pause) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) - (clear-pending-settings-from-process *setting-control* self 'bg-a) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'allow-pause) + (remove-setting! 'allow-progress) + (remove-setting! 'bg-a) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (remove-setting! 'music) (none) ) :code (behavior ((arg0 continue-point)) @@ -64,14 +64,14 @@ (if (-> *art-control* reserve-buffer) (reserve-free *art-control* (-> *art-control* reserve-buffer heap)) ) - (push-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (add-setting! 'bg-a 'abs 1.0 0) (set! (-> *setting-control* current bg-a) 1.0) - (set-setting! *setting-control* self 'sfx-volume 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* self 'ambient-volume 'abs (the-as float 0.0) 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) (let ((v1-20 (lookup-level-info (-> arg0 level)))) (when v1-20 - (set-setting! *setting-control* self 'music (-> v1-20 music-bank) (the-as float 0.0) 0) - (set-setting! *setting-control* self 'music-volume 'abs (the-as float 0.0) 0) + (set-setting! 'music (-> v1-20 music-bank) 0.0 0) + (set-setting! 'music-volume 'abs 0.0 0) ) ) (set! (-> *level* border?) #f) @@ -116,7 +116,7 @@ (= (-> *setting-control* current music) (-> v1-52 music-bank)) (zero? (logand (-> arg0 flags) (continue-flags sage-intro title))) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) + (remove-setting! 'music-volume) ) ) (suspend) @@ -1072,8 +1072,8 @@ :exit (behavior () (logclear! (-> self state-flags) (state-flags sf03 sf15)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'process-mask) + (remove-setting! 'allow-progress) (restore-collide-with-as (-> self control)) (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1)) (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) @@ -1088,8 +1088,8 @@ ) (set! (-> self neck flex-blend) 0.0) (target-timed-invulnerable-off self) - (set-setting! *setting-control* self 'process-mask 'set (the-as float 0.0) #x14a0000) - (copy-settings-from-target! *setting-control*) + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) (set! (-> self control transv quad) (the-as uint128 0)) (logior! (-> self state-flags) (state-flags sf15)) (case arg0 @@ -1335,7 +1335,7 @@ (-> *death-spool-array* (death-movie-remap (-> *game-info* death-movie-tick) (-> *death-spool-array* length))) ) ) - (set-setting! *setting-control* self 'allow-progress #f (the-as float 0.0) 0) + (set-setting! 'allow-progress #f 0.0 0) (target-death-anim gp-18) (when (and (< (rand-vu-int-count (-> *game-info* death-movie-tick)) (* (-> *death-spool-array* length) 2)) (zero? (logand (-> self water flags) (water-flags wt09))) diff --git a/goal_src/engine/target/target2.gc b/goal_src/engine/target/target2.gc index 7e8a618f10..d0a080b36d 100644 --- a/goal_src/engine/target/target2.gc +++ b/goal_src/engine/target/target2.gc @@ -33,7 +33,7 @@ (until (ja-done? 0) (TODO-RENAME-9 (-> self align)) (TODO-RENAME-10 (-> self align) 4 (the-as float 1.0) (the-as float 1.0) (the-as float 1.0)) - (send-event *camera* 'joystick (-> (new 'static 'array int32 1 0) 0) (-> (new 'static 'array int32 1 0) 0)) + (send-event *camera* 'joystick 0.0 0.0) (suspend) (ja :num! (seek!)) ) @@ -295,7 +295,7 @@ (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf)) ) ) - (set-setting! *setting-control* self 'common-page 'set (the-as float (-> (new 'static 'array int32 1 0) 0)) 1) + (set-setting! 'common-page 'set 0.0 1) (suspend) (go hud-coming-in) (suspend) @@ -793,7 +793,7 @@ (none) ) :code (behavior () - (set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0))) + (set-forward-vel (the-as float 0.0)) (let ((gp-0 0)) (while (zero? (logand (-> self control status) (cshape-moving-flags onsurf))) (target-falling-anim-trans) @@ -923,7 +923,7 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self control unknown-surface00) *pole-mods*) (logior! (-> self control root-prim prim-core action) (collide-action ca-8)) - (target-collide-set! 'pole (the-as float (-> (new 'static 'array int32 1 0) 0))) + (target-collide-set! 'pole (the-as float 0.0)) (set! (-> self control unknown-vector102 quad) (-> self control transv quad)) (set! (-> self control transv quad) (the-as uint128 0)) (send-event *camera* 'ease-in) @@ -931,7 +931,7 @@ (none) ) :exit (behavior () - (target-collide-set! 'normal (the-as float (-> (new 'static 'array int32 1 0) 0))) + (target-collide-set! 'normal (the-as float 0.0)) (logclear! (-> self control root-prim prim-core action) (collide-action ca-8)) (set! (-> self control unknown-handle10) (the-as handle #f)) (none) @@ -1588,7 +1588,7 @@ ) :frame-num (ja-aframe (the-as float (if (= arg1 (-> *FACT-bank* eco-full-inc)) - (-> (new 'static 'array int32 1 0) 0) + 0.0 6.0 ) ) @@ -1806,7 +1806,7 @@ (f28-0 0.0) (f26-0 (lerp-scale (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (-> self control unknown-float01) (the-as float 16384.0) (the-as float 32768.0) @@ -1848,7 +1848,7 @@ ) (let* ((f0-30 (- (-> self water height) (-> self control trans y))) (f24-1 (lerp-scale - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 1.0) f0-30 (lerp (-> self water wade-height) (-> self water swim-height) (the-as float 0.25)) @@ -1868,7 +1868,7 @@ f26-0 (lerp-scale (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (-> self control unknown-float01) (the-as float 16384.0) (the-as float 32768.0) @@ -1882,7 +1882,7 @@ ) ) ) - (ja :chan 5 :frame-interp (lerp f26-0 (the-as float (-> (new 'static 'array int32 1 0) 0)) f24-1)) + (ja :chan 5 :frame-interp (lerp f26-0 (the-as float 0.0) f24-1)) ) (ja :chan 1 :num! (chan 0)) (ja :chan 2 :num! (chan 0)) @@ -1951,11 +1951,7 @@ (set! (-> self control unknown-float00) (fabs (-> self control unknown-float130))) (if (= (-> self next-state name) 'target-swim-down) (seek! (-> self control unknown-float131) (the-as float -6144.0) (* 4096.0 (-> *display* seconds-per-frame))) - (seek! - (-> self control unknown-float131) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (* 2048.0 (-> *display* seconds-per-frame)) - ) + (seek! (-> self control unknown-float131) (the-as float 0.0) (* 2048.0 (-> *display* seconds-per-frame))) ) (let ((f0-20 (-> self control unknown-float131))) (set! (-> self control unknown-vector11 y) f0-20) @@ -2035,12 +2031,7 @@ ) (go target-swim-walk) ) - (target-swim-tilt - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 2.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 1.0) - ) + (target-swim-tilt (the-as float 0.0) (the-as float 2.0) (the-as float 0.0) (the-as float 1.0)) (none) ) :code (behavior () @@ -2156,12 +2147,7 @@ (set! (-> self control unknown-uint20) (the-as uint (-> *display* base-frame-counter))) ) ) - (target-swim-tilt - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 2.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 1.0) - ) + (target-swim-tilt (the-as float 0.0) (the-as float 2.0) (the-as float 0.0) (the-as float 1.0)) (none) ) :code (behavior () @@ -2261,23 +2247,13 @@ ((>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.1)) (set! (-> self control unknown-surface00) *dive-mods*) (if (= (-> self next-state name) 'target-swim-down) - (target-swim-tilt - (the-as float -0.9) - (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 0.5) - ) + (target-swim-tilt (the-as float -0.9) (the-as float 1.0) (the-as float 0.0) (the-as float 0.5)) ) ) (else (set! (-> self control unknown-surface00) *dive-bottom-mods*) (if (or (= (-> self next-state name) 'target-swim-down) (= (-> self next-state name) 'target-swim-stance)) - (target-swim-tilt - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 2.0) - (the-as float -1.0) - (the-as float 1.0) - ) + (target-swim-tilt (the-as float 0.0) (the-as float 2.0) (the-as float -1.0) (the-as float 1.0)) ) ) ) @@ -2358,9 +2334,7 @@ (f26-0 f28-0) (f24-1 (+ f24-0 f30-0)) ) - (set! f30-0 - (seek f30-0 (the-as float (-> (new 'static 'array int32 1 0) 0)) (* 32768.0 (-> *display* seconds-per-frame))) - ) + (set! f30-0 (seek f30-0 (the-as float 0.0) (* 32768.0 (-> *display* seconds-per-frame)))) (vector+! (-> self control transv) (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f24-1) @@ -2373,7 +2347,7 @@ (the-as float 0.4) (the-as float 1.0) (vector-length (-> self control transv)) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 16384.0) ) ) @@ -2418,11 +2392,11 @@ (target-swim-tilt (the-as float (if (< 8192.0 (-> self water swim-depth)) 0.5 - (-> (new 'static 'array int32 1 0) 0) + 0.0 ) ) (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 0.1) ) (if (and (zero? (logand (-> self water flags) (water-flags wt12))) @@ -2451,11 +2425,11 @@ (target-swim-tilt (the-as float (if (< 8192.0 (-> self water swim-depth)) 0.3 - (-> (new 'static 'array int32 1 0) 0) + 0.0 ) ) (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 0.1) ) (if (zero? (logand (-> self water flags) (water-flags wt12))) @@ -2559,7 +2533,7 @@ :enter (behavior ((arg0 float)) (set! (-> self control unknown-dword31) 0) (set! (-> self control unknown-dword33) 0) - (set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0))) + (set-forward-vel (the-as float 0.0)) (set! (-> self control unknown-surface00) *walk-mods*) (none) ) @@ -2619,7 +2593,7 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self control unknown-surface00) *turn-around-mods*) (ja-channel-push! 1 (seconds 0.15)) - (set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0))) + (set-forward-vel (the-as float 0.0)) (ja-no-eval :group! eichar-duck-stance-ja :num! (seek! (ja-aframe (the-as float 15.0) 0) 3.0) :frame-num 0.0) (until (ja-done? 0) (suspend) @@ -2646,10 +2620,7 @@ ((and sv-44 (< (- (-> (the-as target s4-0) control trans y) (-> (the-as target s4-0) control unknown-vector52 y)) arg2) ) - (vector-xz-normalize! - (-> (the-as target s4-0) control transv) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - ) + (vector-xz-normalize! (-> (the-as target s4-0) control transv) (the-as float 0.0)) (case (-> (the-as target s4-0) current-level name) (('jungleb) (let ((v1-16 (vector-! (new-stack-vector0) (-> (the-as target s4-0) control trans) sv-40))) diff --git a/goal_src/engine/ui/progress/progress.gc b/goal_src/engine/ui/progress/progress.gc index 121f5f8e0f..f6c9f24950 100644 --- a/goal_src/engine/ui/progress/progress.gc +++ b/goal_src/engine/ui/progress/progress.gc @@ -626,7 +626,7 @@ (defun deactivate-progress () (when (and *progress-process* (= (-> *progress-process* 0 next-state name) 'progress-gone)) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (dotimes (gp-0 (-> *progress-process* 0 nb-of-particles)) (kill-and-free-particles (-> *progress-process* 0 particles gp-0 part)) (set! (-> *progress-process* 0 particles gp-0 part matrix) -1) @@ -874,7 +874,7 @@ (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf)) ) ) - (set-setting! *setting-control* self 'common-page 'set 0.0 1) + (set-setting! 'common-page 'set 0.0 1) (suspend) (go progress-coming-in) ) @@ -887,8 +887,8 @@ (defstate progress-gone (progress) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (logior! (-> self mask) (process-mask sleep)) (suspend) 0 @@ -2181,8 +2181,8 @@ (behavior () (sound-group-pause (the-as uint 255)) (logclear! (-> *setting-control* default process-mask) (process-mask pause menu)) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 16) + (apply-settings *setting-control*) (sound-play-by-name (static-sound-name "select-menu") (new-sound-id) 1024 0 0 1 #t) (set-blackout-frames 0) (set! *pause-lock* #f) diff --git a/goal_src/levels/common/battlecontroller.gc b/goal_src/levels/common/battlecontroller.gc index 35e91e2767..cf1ab456c7 100644 --- a/goal_src/levels/common/battlecontroller.gc +++ b/goal_src/levels/common/battlecontroller.gc @@ -323,7 +323,7 @@ battlecontroller-default-event-handler ) (defbehavior battlecontroller-battle-begin battlecontroller () - (set-setting! *setting-control* self 'music 'danger 0.0 0) + (set-setting! 'music 'danger 0.0 0) (let ((gp-0 (entity-actor-count (-> self entity) 'kill-actor))) (dotimes (s5-0 gp-0) (let ((v1-2 (entity-actor-lookup (-> self entity) 'kill-actor s5-0))) @@ -358,7 +358,7 @@ battlecontroller-default-event-handler ) (defbehavior battlecontroller-off battlecontroller () - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (let ((gp-0 (entity-actor-count (-> self entity) 'kill-actor))) (dotimes (s5-0 gp-0) (let ((v1-2 (entity-actor-lookup (-> self entity) 'kill-actor s5-0))) diff --git a/goal_src/levels/common/plat-button.gc b/goal_src/levels/common/plat-button.gc index 5a8ef6d248..461f69784e 100644 --- a/goal_src/levels/common/plat-button.gc +++ b/goal_src/levels/common/plat-button.gc @@ -182,12 +182,12 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (process-entity-status! self (entity-perm-status bit-3) #t) (plat-button-camera-on) - (set-setting! *setting-control* self 'allow-look-around #f 0.0 0) + (set-setting! 'allow-look-around #f 0.0 0) (none) ) :exit (behavior () (plat-button-camera-off) - (clear-pending-settings-from-process *setting-control* self 'allow-look-around) + (remove-setting! 'allow-look-around) (none) ) :trans (behavior () @@ -256,12 +256,12 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (process-entity-status! self (entity-perm-status bit-3) #t) (plat-button-camera-on) - (set-setting! *setting-control* self 'allow-look-around #f 0.0 0) + (set-setting! 'allow-look-around #f 0.0 0) (none) ) :exit (behavior () (plat-button-camera-off) - (clear-pending-settings-from-process *setting-control* self 'allow-look-around) + (remove-setting! 'allow-look-around) (none) ) :trans (behavior () diff --git a/goal_src/levels/demo/demo-obs.gc b/goal_src/levels/demo/demo-obs.gc index befb57aae8..1b7dd64ae4 100644 --- a/goal_src/levels/demo/demo-obs.gc +++ b/goal_src/levels/demo/demo-obs.gc @@ -15,9 +15,9 @@ (if *time-of-day-proc* (set! (-> *time-of-day-proc* 0 hour) 12) ) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (ja-channel-set! 0) (ja-post) (load-state-want-levels 'demo 'village1) diff --git a/goal_src/levels/demo/static-screen.gc b/goal_src/levels/demo/static-screen.gc index fff3df3428..52112b91d4 100644 --- a/goal_src/levels/demo/static-screen.gc +++ b/goal_src/levels/demo/static-screen.gc @@ -105,7 +105,7 @@ :enter (behavior ((arg0 int) (arg1 time-frame) (arg2 symbol)) (set! (-> *setting-control* current bg-a) 1.0) (set! (-> *setting-control* default bg-a) 0.0) - (push-setting! *setting-control* self 'common-page 'set 0.0 (ash 1 (+ arg0 1))) + (add-setting! 'common-page 'set 0.0 (ash 1 (+ arg0 1))) (none) ) :trans (behavior () @@ -131,7 +131,7 @@ (while (!= (-> *setting-control* current bg-a) (-> *setting-control* default bg-a)) (suspend) ) - (clear-pending-settings-from-process *setting-control* self 'common-page) + (remove-setting! 'common-page) (suspend) 0 (none) diff --git a/goal_src/levels/finalboss/final-door.gc b/goal_src/levels/finalboss/final-door.gc index 2041b98465..e239c1ef93 100644 --- a/goal_src/levels/finalboss/final-door.gc +++ b/goal_src/levels/finalboss/final-door.gc @@ -312,14 +312,14 @@ (send-event *camera* 'change-to-entity-by-name "camera-403") (set! (-> self control unknown-surface00) *empty-mods*) (logior! (-> self state-flags) (state-flags sf04 sf08)) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (none) ) :exit (behavior () (send-event *camera* 'change-state *camera-base-mode* (seconds 0.2)) (logclear! (-> self state-flags) (state-flags sf04 sf08)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (none) ) :trans (behavior () diff --git a/goal_src/levels/finalboss/robotboss.gc b/goal_src/levels/finalboss/robotboss.gc index e79bc10294..fcc465b634 100644 --- a/goal_src/levels/finalboss/robotboss.gc +++ b/goal_src/levels/finalboss/robotboss.gc @@ -1759,7 +1759,7 @@ (set! (-> self loc-t-start) (-> *display* game-frame-counter)) (set! (-> self loc-t-duration) (seconds 3)) (set! (-> self desired-pool-y) -22528.0) - (set-setting! *setting-control* self 'sound-flava #f (the-as float 40.0) 48) + (set-setting! 'sound-flava #f 40.0 (music-flava finalboss-end)) (none) ) :trans (behavior () @@ -2167,7 +2167,7 @@ (set! (-> self loc-t-duration) (seconds 3)) (set! (-> self desired-pool-y) -26624.0) (play-ambient (-> self ambient) "GOL-AM01" #t (the-as vector #f)) - (set-setting! *setting-control* self 'sound-flava #f (the-as float 40.0) 47) + (set-setting! 'sound-flava #f 40.0 (music-flava finalboss-middle)) (none) ) :trans (behavior () diff --git a/goal_src/levels/finalboss/sage-finalboss.gc b/goal_src/levels/finalboss/sage-finalboss.gc index 2e7a4eb193..df3f4745af 100644 --- a/goal_src/levels/finalboss/sage-finalboss.gc +++ b/goal_src/levels/finalboss/sage-finalboss.gc @@ -303,243 +303,241 @@ ) (defmethod play-anim! sage-finalboss ((obj sage-finalboss) (arg0 symbol)) - (with-pp - (case (current-status (-> obj tasks)) - (((task-status unknown)) - (when arg0 - (close-current! (-> obj tasks)) - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) - ) - (new 'static 'spool-anim - :name "green-sagecage-daxter-sacrifice" - :index 8 - :parts 6 - :command-list '((1 blackout 0) (236 joint "cameraB") (439 joint "camera")) - ) + (case (current-status (-> obj tasks)) + (((task-status unknown)) + (when arg0 + (close-current! (-> obj tasks)) + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) ) - (((task-status need-introduction)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) - (close-current! (-> obj tasks)) - (set! (-> obj jak-white) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *jak-white-sg* #f :to obj)) - ) - (send-event - (handle->process (-> obj jak-white)) - 'eval - (lambda :behavior sage-finalboss () (set-vector! (-> self draw color-emissive) 0.5 0.5 0.5 0.0) (none)) - ) - (send-event (handle->process (-> obj jak-white)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj jak-white)) 'origin-joint-index 3) - (send-event (handle->process (-> obj jak-white)) 'blend-shape #t) - (set! (-> obj robotboss) - (ppointer->handle - (manipy-spawn (-> obj root-override trans) (-> obj entity) *robotboss-cinematic-sg* #f :to obj) - ) - ) - (send-event (handle->process (-> obj robotboss)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj robotboss)) 'origin-joint-index 3) - (let ((v1-67 (handle->process (-> obj robotboss)))) - (if (the-as manipy v1-67) - (set! (-> (the-as manipy v1-67) draw bounds w) 2048000.0) - ) - ) - (set! (-> obj silodoor) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *silodoor-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj silodoor)) 'anim-mode 'clone-anim) - (let ((v1-84 (handle->process (-> obj silodoor)))) - (if (the-as manipy v1-84) - (set! (-> (the-as silodoor v1-84) draw bounds w) 2048000.0) - ) - ) - (send-event (process-by-name "silodoor-5" *active-pool*) 'hide) - (set-setting! *setting-control* pp 'music #f 0.0 0) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) + (new 'static 'spool-anim + :name "green-sagecage-daxter-sacrifice" + :index 8 + :parts 6 + :command-list '((1 blackout 0) (236 joint "cameraB") (439 joint "camera")) + ) + ) + (((task-status need-introduction)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) + (close-current! (-> obj tasks)) + (set! (-> obj jak-white) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *jak-white-sg* #f :to obj)) + ) + (send-event + (handle->process (-> obj jak-white)) + 'eval + (lambda :behavior sage-finalboss () (set-vector! (-> self draw color-emissive) 0.5 0.5 0.5 0.0) (none)) ) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-a" - :index 9 - :parts 8 - :command-list '((0 send-event self activate-particle 0) - (0 send-event self activate-particle 1) - (0 send-event self activate-particle 7) - (1 blackout 0) - (61 joint "cameraB") - (71 send-event self activate-particle 2) - (156 joint "camera") - (216 joint "cameraB") - (259 send-event self deactivate-particle 2) - (259 send-event self activate-particle 3) - (268 send-event self activate-particle 4) - (270 send-event self deactivate-particle 3) - (270 send-event self deactivate-particle 0) - (270 send-event self deactivate-particle 1) - (271 joint "camera") - (269 send-event self activate-particle 5) - (272 send-event self flash) - (272 eval (lambda :behavior sage-finalboss - () - (let ((a0-1 (get-task-control (game-task finalboss-movies)))) - (save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0) - ) - (none) + (send-event (handle->process (-> obj jak-white)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj jak-white)) 'origin-joint-index 3) + (send-event (handle->process (-> obj jak-white)) 'blend-shape #t) + (set! (-> obj robotboss) + (ppointer->handle + (manipy-spawn (-> obj root-override trans) (-> obj entity) *robotboss-cinematic-sg* #f :to obj) + ) + ) + (send-event (handle->process (-> obj robotboss)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj robotboss)) 'origin-joint-index 3) + (let ((v1-67 (handle->process (-> obj robotboss)))) + (if (the-as manipy v1-67) + (set! (-> (the-as manipy v1-67) draw bounds w) 2048000.0) + ) + ) + (set! (-> obj silodoor) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *silodoor-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj silodoor)) 'anim-mode 'clone-anim) + (let ((v1-84 (handle->process (-> obj silodoor)))) + (if (the-as manipy v1-84) + (set! (-> (the-as silodoor v1-84) draw bounds w) 2048000.0) + ) + ) + (send-event (process-by-name "silodoor-5" *active-pool*) 'hide) + (set-setting! 'music #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-a" + :index 9 + :parts 8 + :command-list '((0 send-event self activate-particle 0) + (0 send-event self activate-particle 1) + (0 send-event self activate-particle 7) + (1 blackout 0) + (61 joint "cameraB") + (71 send-event self activate-particle 2) + (156 joint "camera") + (216 joint "cameraB") + (259 send-event self deactivate-particle 2) + (259 send-event self activate-particle 3) + (268 send-event self activate-particle 4) + (270 send-event self deactivate-particle 3) + (270 send-event self deactivate-particle 0) + (270 send-event self deactivate-particle 1) + (271 joint "camera") + (269 send-event self activate-particle 5) + (272 send-event self flash) + (272 eval (lambda :behavior sage-finalboss + () + (let ((a0-1 (get-task-control (game-task finalboss-movies)))) + (save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0) ) - ) - (273 send-event self deactivate-particle 5) - (333 joint "cameraB") - (395 joint "camera") - (453 joint "cameraB") - (478 send-event self deactivate-particle 4) - (478 send-event self activate-particle 6) - (482 send-event self deactivate-particle 6) - (583 joint "camera") - (640 send-event self deactivate-particle 7) - ) - ) - ) - (((task-status need-reminder-a)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) - (close-current! (-> obj tasks)) - (play-reminder obj) - (dummy-45 obj) - (set! (-> obj kick-the-credits) #t) - (set! (-> obj robotplat) - (ppointer->handle - (manipy-spawn (-> obj root-override trans) (-> obj entity) *plat-eco-finalboss-lit-sg* #f :to obj) - ) - ) - (send-event (handle->process (-> obj robotplat)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj robotplat)) 'origin-joint-index 3) - (set! (-> obj old-target-pos trans quad) - (-> (new 'static 'vector :x 11368946.0 :y 2215900.2 :z -19405602.0 :w 1.0) quad) - ) - (quaternion-copy! (-> obj old-target-pos quat) (new 'static 'quaternion :y -0.8472 :w 0.5312)) - (set-setting! *setting-control* pp 'music #f 0.0 0) - (set-setting! *setting-control* pp 'sfx-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'ambient-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-b" - :index 10 - :parts 27 - :command-list '((0 kill "crate-3250") - (0 kill "crate-3251") - (0 kill "crate-3252") - (0 kill "crate-3253") - (0 kill "crate-3254") - (0 kill "crate-3255") - (0 kill "crate-3256") - (0 kill "crate-3257") - (0 kill "crate-3258") - (0 kill "crate-3259") - (0 kill "plat-eco-finalboss-1") - (1 blackout 0) - (61 joint "cameraB") - (136 joint "camera") - (510 joint "cameraB") - (641 joint "camera") - (751 joint "cameraB") - (1096 joint "camera") - (1321 joint "cameraB") - (1521 joint "camera") - (1636 joint "cameraB") - (1751 joint "camera") - (1916 joint "cameraB") - (1996 joint "camera") - (2256 joint "cameraB") - ) - ) - ) - (((task-status need-reminder)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) - (close-current! (-> obj tasks)) - (dummy-45 obj) - (send-event *camera* 'teleport) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (cond - ((target-has-all-the-cells?) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-enough-cells" - :index 12 - :parts 6 - :command-list '((0 send-event self fade) - (1 blackout 0) - (65 joint "cameraB") - (104 joint "camera") - (134 joint "cameraB") - (165 joint "camera") - (292 joint "cameraB") - (488 joint "camera") - (488 auto-save auto-save) + (none) + ) ) + (273 send-event self deactivate-particle 5) + (333 joint "cameraB") + (395 joint "camera") + (453 joint "cameraB") + (478 send-event self deactivate-particle 4) + (478 send-event self activate-particle 6) + (482 send-event self deactivate-particle 6) + (583 joint "camera") + (640 send-event self deactivate-particle 7) + ) + ) + ) + (((task-status need-reminder-a)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) + (close-current! (-> obj tasks)) + (play-reminder obj) + (dummy-45 obj) + (set! (-> obj kick-the-credits) #t) + (set! (-> obj robotplat) + (ppointer->handle + (manipy-spawn (-> obj root-override trans) (-> obj entity) *plat-eco-finalboss-lit-sg* #f :to obj) + ) + ) + (send-event (handle->process (-> obj robotplat)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj robotplat)) 'origin-joint-index 3) + (set! (-> obj old-target-pos trans quad) + (-> (new 'static 'vector :x 11368946.0 :y 2215900.2 :z -19405602.0 :w 1.0) quad) + ) + (quaternion-copy! (-> obj old-target-pos quat) (new 'static 'quaternion :y -0.8472 :w 0.5312)) + (set-setting! 'music #f 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-b" + :index 10 + :parts 27 + :command-list '((0 kill "crate-3250") + (0 kill "crate-3251") + (0 kill "crate-3252") + (0 kill "crate-3253") + (0 kill "crate-3254") + (0 kill "crate-3255") + (0 kill "crate-3256") + (0 kill "crate-3257") + (0 kill "crate-3258") + (0 kill "crate-3259") + (0 kill "plat-eco-finalboss-1") + (1 blackout 0) + (61 joint "cameraB") + (136 joint "camera") + (510 joint "cameraB") + (641 joint "camera") + (751 joint "cameraB") + (1096 joint "camera") + (1321 joint "cameraB") + (1521 joint "camera") + (1636 joint "cameraB") + (1751 joint "camera") + (1916 joint "cameraB") + (1996 joint "camera") + (2256 joint "cameraB") + ) + ) + ) + (((task-status need-reminder)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) + (close-current! (-> obj tasks)) + (dummy-45 obj) + (send-event *camera* 'teleport) + (set-setting! 'allow-progress #f 0.0 0) + ) + (cond + ((target-has-all-the-cells?) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-enough-cells" + :index 12 + :parts 6 + :command-list '((0 send-event self fade) + (1 blackout 0) + (65 joint "cameraB") + (104 joint "camera") + (134 joint "cameraB") + (165 joint "camera") + (292 joint "cameraB") + (488 joint "camera") + (488 auto-save auto-save) ) ) - (else - (if arg0 - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-need-cells" - :index 11 - :parts 8 - :command-list '((0 send-event self fade) - (1 blackout 0) - (65 joint "cameraB") - (104 joint "camera") - (134 joint "cameraB") - (165 joint "camera") - (292 joint "cameraB") - (488 joint "camera") - (488 auto-save auto-save) - ) + ) + (else + (if arg0 + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-need-cells" + :index 11 + :parts 8 + :command-list '((0 send-event self fade) + (1 blackout 0) + (65 joint "cameraB") + (104 joint "camera") + (134 joint "cameraB") + (165 joint "camera") + (292 joint "cameraB") + (488 joint "camera") + (488 auto-save auto-save) ) ) ) ) - (((task-status need-reward-speech)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) - (close-current! (-> obj tasks)) - (dummy-45 obj) - (set! (-> obj left-door) (the-as entity-actor (entity-by-name "power-left-2"))) - (set! (-> obj right-door) (the-as entity-actor (entity-by-name "power-right-2"))) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (new 'static 'spool-anim - :name "green-sagecage-outro-big-finish" - :index 13 - :parts 7 - :command-list '((1 blackout 0) - (61 joint "cameraB") - (102 joint "camera") - (145 joint "cameraB") - (220 send-event "power-left-2" open) - (220 send-event "power-right-2" open) - (235 joint "camera") - (243 send-event self activate-particle 8) - (322 joint "cameraB") - (428 joint "camera") - (519 joint "cameraB") - (602 joint "camera") - ) + ) + (((task-status need-reward-speech)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) + (close-current! (-> obj tasks)) + (dummy-45 obj) + (set! (-> obj left-door) (the-as entity-actor (entity-by-name "power-left-2"))) + (set! (-> obj right-door) (the-as entity-actor (entity-by-name "power-right-2"))) + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-big-finish" + :index 13 + :parts 7 + :command-list '((1 blackout 0) + (61 joint "cameraB") + (102 joint "camera") + (145 joint "cameraB") + (220 send-event "power-left-2" open) + (220 send-event "power-right-2" open) + (235 joint "camera") + (243 send-event self activate-particle 8) + (322 joint "cameraB") + (428 joint "camera") + (519 joint "cameraB") + (602 joint "camera") ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) - ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (current-status (-> obj tasks))) ) - (-> obj draw art-group data 4) - ) + ) + (-> obj draw art-group data 4) ) ) ) @@ -906,18 +904,18 @@ (set! (-> self credits-played) #t) (set-blackout-frames 0) (set-blackout-frames (seconds 0.05)) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (set-setting! *setting-control* self 'music 'ogreboss 0.0 0) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'music 'ogreboss 0.0 0) (set! (-> self state-time) (-> *display* game-frame-counter)) (logior! (-> self draw status) (draw-status hidden)) (let ((gp-0 (-> self mask))) (load-state-want-display-level 'finalboss 'special) (logclear! (-> self mask) (process-mask pause progress)) - (push-setting! *setting-control* self 'process-mask 'set 0.0 8212) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask pause progress target)) + (apply-settings *setting-control*) (let ((f30-0 0.0) (f28-0 0.5) ) @@ -947,11 +945,11 @@ (set! (-> self mask) gp-0) ) (load-state-want-display-level 'finalboss 'display) - (clear-pending-settings-from-process *setting-control* self 'allow-pause) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (clear-pending-settings-from-process *setting-control* self 'music) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'allow-pause) + (remove-setting! 'allow-progress) + (remove-setting! 'process-mask) + (remove-setting! 'music) + (apply-settings *setting-control*) (set-blackout-frames (seconds 0.05)) (let ((gp-1 (-> *display* base-frame-counter))) (until (>= (- (-> *display* base-frame-counter) gp-1) (seconds 0.05)) @@ -1003,7 +1001,7 @@ :enter (behavior () (sage-finalboss-extra-enter) ((-> (method-of-type process-taskable hidden) enter)) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (none) ) :trans (behavior () diff --git a/goal_src/levels/flut_common/target-flut.gc b/goal_src/levels/flut_common/target-flut.gc index ff03503705..e4f49d5aae 100644 --- a/goal_src/levels/flut_common/target-flut.gc +++ b/goal_src/levels/flut_common/target-flut.gc @@ -418,7 +418,7 @@ (target-collide-set! 'normal (the-as float 0.0)) (set! (-> self control reaction) target-collision-reaction) (set! (-> self control unknown-vector12 quad) (the-as uint128 0)) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (target-exit) ) (none) @@ -427,7 +427,7 @@ (target-exit) (set! *display-profile* #f) (set! *display-entity-errors* #f) - (set-setting! *setting-control* self 'sound-flava #f (the-as float 30.0) 2) + (set-setting! 'sound-flava #f 30.0 (music-flava flutflut)) (if (zero? (-> self flut)) (set! (-> self flut) (new 'process 'flut-info)) ) @@ -1764,8 +1764,8 @@ :exit (behavior () (logclear! (-> self state-flags) (state-flags sf03 sf15)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (none) ) :trans (-> target-hit trans) @@ -1774,8 +1774,8 @@ (logior! (-> self state-flags) (state-flags sf15)) (set! (-> self neck flex-blend) 0.0) (target-timed-invulnerable-off self) - (push-setting! *setting-control* self 'process-mask 'set 0.0 #x14a0000) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) (set! (-> self control transv quad) (the-as uint128 0)) (cond ((or (= arg0 'none) (= arg0 'water-vol) (= arg0 'sharkey)) diff --git a/goal_src/levels/jungle/fisher.gc b/goal_src/levels/jungle/fisher.gc index 237c12a6d3..e83f537b88 100644 --- a/goal_src/levels/jungle/fisher.gc +++ b/goal_src/levels/jungle/fisher.gc @@ -1545,7 +1545,7 @@ ) ) :enter (behavior () - (set-setting! *setting-control* self 'ambient-volume 'rel 50.0 0) + (set-setting! 'ambient-volume 'rel 50.0 0) (send-event *target* 'reset-pickup 'eco) (ja-channel-set! 0) (clear-collide-with-as (-> self root-override)) @@ -1567,7 +1567,7 @@ (none) ) :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'ambient-volume) (let* ((v1-2 *camera-other-matrix*) (a3-0 (-> *camera-combiner* inv-camera-rot)) (a0-2 (-> a3-0 vector 0 quad)) diff --git a/goal_src/levels/jungleb/plant-boss.gc b/goal_src/levels/jungleb/plant-boss.gc index 5c017c7c86..79903cc20c 100644 --- a/goal_src/levels/jungleb/plant-boss.gc +++ b/goal_src/levels/jungleb/plant-boss.gc @@ -929,7 +929,7 @@ (defstate plant-boss-far-idle (plant-boss) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (let ((gp-0 (-> self child))) (while gp-0 (let ((s5-0 (ppointer->process gp-0))) @@ -973,7 +973,7 @@ (defstate plant-boss-intro (plant-boss) :code (behavior () - (set-setting! *setting-control* self 'music 'danger (the-as float 0.0) 0) + (set-setting! 'music 'danger 0.0 0) (send-event *target* 'reset-pickup 'eco) (let ((v1-9 (-> self entity extra perm))) (logior! (-> v1-9 status) (entity-perm-status user-set-from-cstage)) @@ -1064,7 +1064,7 @@ (defstate plant-boss-idle (plant-boss) :event plant-boss-default-event-handler :enter (behavior () - (set-setting! *setting-control* self 'music 'danger (the-as float 0.0) 0) + (set-setting! 'music 'danger 0.0 0) (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self body flex-blend) 0.0) (set! (-> self neck flex-blend) 1.0) @@ -1668,7 +1668,7 @@ (set! (-> (find-prim-by-id (-> self root-override) (the-as uint 16)) prim-core action) (collide-action)) 0 (logior! (-> self mask) (process-mask actor-pause)) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (go plant-boss-dead-idle) (none) ) diff --git a/goal_src/levels/misty/muse.gc b/goal_src/levels/misty/muse.gc index 1d1745fcf0..4e077e73d9 100644 --- a/goal_src/levels/misty/muse.gc +++ b/goal_src/levels/misty/muse.gc @@ -369,16 +369,9 @@ nav-enemy-default-event-handler (lambda :behavior muse () (spool-push *art-control* (-> self victory-anim name) 0 self -1.0) (none)) ) ) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! - *setting-control* - self - 'ambient-volume - 'rel - (-> *setting-control* current ambient-volume-movie) - 0 - ) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'ambient-volume 'rel (-> *setting-control* current ambient-volume-movie) 0) (logclear! (-> self mask) (process-mask enemy)) (process-spawn othercam self 3 #f #t :to self) (auto-save-command 'auto-save 0 0 *default-pool*) @@ -388,9 +381,9 @@ nav-enemy-default-event-handler (the-as art-joint-anim muse-idle-ja) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) (send-event *target* 'blend-shape #f) (cond ((!= *kernel-boot-message* 'play) diff --git a/goal_src/levels/misty/sidekick-human.gc b/goal_src/levels/misty/sidekick-human.gc index 3d9e46b1f0..15ee3a5f7e 100644 --- a/goal_src/levels/misty/sidekick-human.gc +++ b/goal_src/levels/misty/sidekick-human.gc @@ -1235,153 +1235,151 @@ ) (defmethod play-anim! sequenceB ((obj sequenceB) (arg0 symbol)) - (with-pp - (cond - (arg0 - (send-event *target* 'sidekick #f) - (set! (-> obj bonelurker) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) - (set-setting! *setting-control* pp 'music-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'sfx-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'ambient-volume-movie 'abs (the-as float 0.0) 0) - (dotimes (s5-1 9) - (let ((s4-0 (-> *lurker-army* s5-1))) - (cond - ((= (-> s4-0 skel) 'bonelurker) - (set! (-> obj lurker-army s5-1) - (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *bonelurker-sg* #f :to obj)) - ) - (let ((s3-1 (handle->process (-> obj lurker-army s5-1)))) - (when s3-1 - (set! (-> (the-as babak s3-1) draw light-index) (the-as uint 1)) - (set! (-> (the-as babak s3-1) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) + (cond + (arg0 + (send-event *target* 'sidekick #f) + (set! (-> obj bonelurker) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) + (set-setting! 'music-volume-movie 'abs 0.0 0) + (set-setting! 'sfx-volume-movie 'abs 0.0 0) + (set-setting! 'ambient-volume-movie 'abs 0.0 0) + (dotimes (s5-1 9) + (let ((s4-0 (-> *lurker-army* s5-1))) + (cond + ((= (-> s4-0 skel) 'bonelurker) + (set! (-> obj lurker-army s5-1) + (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *bonelurker-sg* #f :to obj)) ) + (let ((s3-1 (handle->process (-> obj lurker-army s5-1)))) + (when s3-1 + (set! (-> (the-as babak s3-1) draw light-index) (the-as uint 1)) + (set! (-> (the-as babak s3-1) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) ) ) - (else - (set! (-> obj lurker-army s5-1) - (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *babak-sg* #f :to obj)) - ) - (let ((s3-3 (handle->process (-> obj lurker-army s5-1)))) - (when s3-3 - (set! (-> (the-as babak s3-3) draw light-index) (the-as uint 1)) - (set! (-> (the-as babak s3-3) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) + ) + (else + (set! (-> obj lurker-army s5-1) + (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *babak-sg* #f :to obj)) ) + (let ((s3-3 (handle->process (-> obj lurker-army s5-1)))) + (when s3-3 + (set! (-> (the-as babak s3-3) draw light-index) (the-as uint 1)) + (set! (-> (the-as babak s3-3) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) ) - (send-event (handle->process (-> obj lurker-army s5-1)) 'art-joint-anim "idle" 0) ) + (send-event (handle->process (-> obj lurker-army s5-1)) 'art-joint-anim "idle" 0) ) - (send-event (handle->process (-> obj lurker-army s5-1)) 'rot (-> s4-0 rot)) ) + (send-event (handle->process (-> obj lurker-army s5-1)) 'rot (-> s4-0 rot)) ) ) - ((!= (level-status *level* 'intro) 'active) - (return (get-art-elem obj)) - ) ) - (new 'static 'spool-anim - :name "sidekick-human-intro-sequence-b" - :index 5 - :parts 11 - :command-list '((0 blackout 0) - (0 setting-reset ocean-off near) - (0 want-levels misty intro) - (0 display-level intro special) - (0 kill "money-1404") - (0 kill "money-1405") - (0 kill "money-1406") - (0 kill "money-1407") - (0 kill "money-1551") - (0 kill "money-1552") - (0 kill "money-1553") - (0 kill "balloonlurker-9") - (0 kill "balloonlurker-10") - (0 kill "balloonlurker-11") - (0 kill "balloonlurker-12") - (0 kill "balloonlurker-13") - (0 kill "balloonlurker-14") - (0 kill "keg-conveyor-8") - (0 kill "mistycannon-8") - (0 kill "muse-2") - (0 kill "mud-1") - (0 kill "mud-2") - (0 kill "mud-3") - (0 kill "mud-4") - (0 kill "mud-5") - (0 kill "mud-6") - (0 kill "mud-7") - (0 kill "mud-8") - (0 kill "mud-9") - (0 kill "mud-10") - (0 kill "mud-11") - (0 kill "dark-eco-pool-11") - (0 kill "sharkey-32") - (0 kill "sharkey-34") - (0 kill "sharkey-39") - (0 kill "sharkey-41") - (0 kill "bonelurker-14") - (0 kill "bonelurker-15") - (0 kill "bonelurker-16") - (0 kill "bonelurker-17") - (0 kill "bonelurker-18") - (0 kill "bonelurker-19") - (0 kill "bonelurker-20") - (0 kill "bonelurker-21") - (0 kill "bonelurker-22") - (0 kill "bonelurker-23") - (0 kill "bonelurker-24") - (0 kill "bonelurker-26") - (0 kill "babak-with-cannon-5") - (0 kill "babak-200") - (0 kill "babak-201") - (0 kill "babak-202") - (0 kill "babak-203") - (0 kill "babak-204") - (0 kill "babak-205") - (0 kill "babak-206") - (0 kill "babak-207") - (0 kill "babak-208") - (0 kill "babak-209") - (0 kill "babak-212") - (0 kill "quicksandlurker-5") - (0 kill "boatpaddle-4") - (0 kill "silostep-7") - (0 kill "silostep-8") - (0 kill "silostep-9") - (0 kill "silostep-10") - (0 kill "orb-cache-top-15") - (0 kill "windturbine-11") - (0 kill "teetertotter-5") - (0 kill "bone-platform-4") - (0 kill "misty-battle-controller-1") - (30 send-event self offset-army) - (196 joint "cameraB") - (196 shadow target #f) - (196 shadow self #f) - (380 send-event self evilbro) - (385 send-event "evilbro" draw #t) - (385 send-event "evilsis" draw #t) - (397 joint "camera") - (410 setting-reset ocean-off #t) - (456 joint "cameraB") - (546 joint "camera") - (701 joint "cameraB") - (701 setting-reset ocean-off near) - (776 joint "camera") - (776 setting-reset ocean-off #t) - (937 joint "cameraB") - (1027 joint "camera") - (1122 joint "cameraB") - (1221 joint "cameraB") - (1221 setting-reset ocean-off near) - (1280 alive "sequenceC-1") - (1281 save) - (1281 shadow target #t) - (1281 setting-unset ocean-off) - ) + ((!= (level-status *level* 'intro) 'active) + (return (get-art-elem obj)) + ) + ) + (new 'static 'spool-anim + :name "sidekick-human-intro-sequence-b" + :index 5 + :parts 11 + :command-list '((0 blackout 0) + (0 setting-reset ocean-off near) + (0 want-levels misty intro) + (0 display-level intro special) + (0 kill "money-1404") + (0 kill "money-1405") + (0 kill "money-1406") + (0 kill "money-1407") + (0 kill "money-1551") + (0 kill "money-1552") + (0 kill "money-1553") + (0 kill "balloonlurker-9") + (0 kill "balloonlurker-10") + (0 kill "balloonlurker-11") + (0 kill "balloonlurker-12") + (0 kill "balloonlurker-13") + (0 kill "balloonlurker-14") + (0 kill "keg-conveyor-8") + (0 kill "mistycannon-8") + (0 kill "muse-2") + (0 kill "mud-1") + (0 kill "mud-2") + (0 kill "mud-3") + (0 kill "mud-4") + (0 kill "mud-5") + (0 kill "mud-6") + (0 kill "mud-7") + (0 kill "mud-8") + (0 kill "mud-9") + (0 kill "mud-10") + (0 kill "mud-11") + (0 kill "dark-eco-pool-11") + (0 kill "sharkey-32") + (0 kill "sharkey-34") + (0 kill "sharkey-39") + (0 kill "sharkey-41") + (0 kill "bonelurker-14") + (0 kill "bonelurker-15") + (0 kill "bonelurker-16") + (0 kill "bonelurker-17") + (0 kill "bonelurker-18") + (0 kill "bonelurker-19") + (0 kill "bonelurker-20") + (0 kill "bonelurker-21") + (0 kill "bonelurker-22") + (0 kill "bonelurker-23") + (0 kill "bonelurker-24") + (0 kill "bonelurker-26") + (0 kill "babak-with-cannon-5") + (0 kill "babak-200") + (0 kill "babak-201") + (0 kill "babak-202") + (0 kill "babak-203") + (0 kill "babak-204") + (0 kill "babak-205") + (0 kill "babak-206") + (0 kill "babak-207") + (0 kill "babak-208") + (0 kill "babak-209") + (0 kill "babak-212") + (0 kill "quicksandlurker-5") + (0 kill "boatpaddle-4") + (0 kill "silostep-7") + (0 kill "silostep-8") + (0 kill "silostep-9") + (0 kill "silostep-10") + (0 kill "orb-cache-top-15") + (0 kill "windturbine-11") + (0 kill "teetertotter-5") + (0 kill "bone-platform-4") + (0 kill "misty-battle-controller-1") + (30 send-event self offset-army) + (196 joint "cameraB") + (196 shadow target #f) + (196 shadow self #f) + (380 send-event self evilbro) + (385 send-event "evilbro" draw #t) + (385 send-event "evilsis" draw #t) + (397 joint "camera") + (410 setting-reset ocean-off #t) + (456 joint "cameraB") + (546 joint "camera") + (701 joint "cameraB") + (701 setting-reset ocean-off near) + (776 joint "camera") + (776 setting-reset ocean-off #t) + (937 joint "cameraB") + (1027 joint "camera") + (1122 joint "cameraB") + (1221 joint "cameraB") + (1221 setting-reset ocean-off near) + (1280 alive "sequenceC-1") + (1281 save) + (1281 shadow target #t) + (1281 setting-unset ocean-off) ) ) ) @@ -1558,98 +1556,96 @@ ) (defmethod play-anim! sequenceC ((obj sequenceC) (arg0 symbol)) - (with-pp - (when arg0 - (set-setting! *setting-control* pp 'music-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'sfx-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'ambient-volume-movie 'abs (the-as float 0.0) 0) - (set! (-> obj bonelurker) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) - (set! (-> obj darkecocan) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *darkecocan-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj darkecocan)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj darkecocan)) 'center-joint 3) - (send-event (handle->process (-> obj darkecocan)) 'trans-hook sequenceC-can-trans-hook) - (send-event - (handle->process (-> obj darkecocan)) - 'eval - (lambda :behavior sequenceC - () - ((method-of-type lod-set setup-lods!) - (the-as lod-set (&-> (the-as process-taskable (-> self parent 0)) stack 288)) - *darkecocan-glow-sg* - (-> self draw art-group) - (-> (the-as process-taskable (-> self parent 0)) entity) - ) - (let ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) - (set! (-> self part) v0-1) - v0-1 - ) + (when arg0 + (set-setting! 'music-volume-movie 'abs 0.0 0) + (set-setting! 'sfx-volume-movie 'abs 0.0 0) + (set-setting! 'ambient-volume-movie 'abs 0.0 0) + (set! (-> obj bonelurker) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) + (set! (-> obj darkecocan) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *darkecocan-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj darkecocan)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj darkecocan)) 'center-joint 3) + (send-event (handle->process (-> obj darkecocan)) 'trans-hook sequenceC-can-trans-hook) + (send-event + (handle->process (-> obj darkecocan)) + 'eval + (lambda :behavior sequenceC + () + ((method-of-type lod-set setup-lods!) + (the-as lod-set (&-> (the-as process-taskable (-> self parent 0)) stack 288)) + *darkecocan-glow-sg* + (-> self draw art-group) + (-> (the-as process-taskable (-> self parent 0)) entity) + ) + (let ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) + (set! (-> self part) v0-1) + v0-1 ) ) ) - (the-as basic (new 'static 'spool-anim - :name "sidekick-human-intro-sequence-c" - :index 6 - :parts 22 - :command-list '((0 blackout 0) - (0 kill "fuel-cell-11") - (0 kill "fuel-cell-50") - (0 kill "money-1561") - (0 kill "money-1562") - (0 kill "money-1563") - (0 kill "money-1564") - (0 kill "money-1565") - (5 alive "dark-eco-pool-11") - (151 joint "cameraB") - (200 want-levels misty village1) - (236 joint "camera") - (301 joint "cameraB") - (421 joint "camera") - (460 shadow self #f) - (470 shadow self #t) - (496 joint "cameraB") - (611 joint "camera") - (721 joint "cameraB") - (1176 joint "camera") - (1271 joint "cameraB") - (1331 joint "camera") - (1386 joint "cameraB") - (1461 joint "camera") - (1524 joint "cameraB") - (1558 joint "camera") - (1602 joint "cameraB") - (1628 joint "camera") - (1676 joint "cameraB") - (1728 joint "camera") - (1791 joint "cameraB") - (1831 joint "camera") - (1942 joint "cameraB") - (2000 display-level village1 special) - (2028 joint "camera") - (2096 joint "cameraB") - (2154 joint "camera") - (2226 joint "cameraB") - (2266 joint "camera") - (2307 joint "cameraB") - (2431 joint "camera") - (2476 joint "cameraB") - (2530 display-level misty movie) - (2530 want-force-vis misty #t) - (2530 dead "dark-eco-pool-11") - (2534 display-level village1 display) - (2535 want-vis vi1) - (2536 joint "camera") - (2580 alive "sage-23") - (2596 save) - ) - ) - ) ) + (the-as basic (new 'static 'spool-anim + :name "sidekick-human-intro-sequence-c" + :index 6 + :parts 22 + :command-list '((0 blackout 0) + (0 kill "fuel-cell-11") + (0 kill "fuel-cell-50") + (0 kill "money-1561") + (0 kill "money-1562") + (0 kill "money-1563") + (0 kill "money-1564") + (0 kill "money-1565") + (5 alive "dark-eco-pool-11") + (151 joint "cameraB") + (200 want-levels misty village1) + (236 joint "camera") + (301 joint "cameraB") + (421 joint "camera") + (460 shadow self #f) + (470 shadow self #t) + (496 joint "cameraB") + (611 joint "camera") + (721 joint "cameraB") + (1176 joint "camera") + (1271 joint "cameraB") + (1331 joint "camera") + (1386 joint "cameraB") + (1461 joint "camera") + (1524 joint "cameraB") + (1558 joint "camera") + (1602 joint "cameraB") + (1628 joint "camera") + (1676 joint "cameraB") + (1728 joint "camera") + (1791 joint "cameraB") + (1831 joint "camera") + (1942 joint "cameraB") + (2000 display-level village1 special) + (2028 joint "camera") + (2096 joint "cameraB") + (2154 joint "camera") + (2226 joint "cameraB") + (2266 joint "camera") + (2307 joint "cameraB") + (2431 joint "camera") + (2476 joint "cameraB") + (2530 display-level misty movie) + (2530 want-force-vis misty #t) + (2530 dead "dark-eco-pool-11") + (2534 display-level village1 display) + (2535 want-vis vi1) + (2536 joint "camera") + (2580 alive "sage-23") + (2596 save) + ) + ) + ) ) (defmethod get-art-elem sequenceC ((obj sequenceC)) diff --git a/goal_src/levels/ogre/flying-lurker.gc b/goal_src/levels/ogre/flying-lurker.gc index 86217b9c58..68d567af17 100644 --- a/goal_src/levels/ogre/flying-lurker.gc +++ b/goal_src/levels/ogre/flying-lurker.gc @@ -45,7 +45,7 @@ (defstate plunger-lurker-plunge (plunger-lurker) :code (behavior () - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) (while (or (not *target*) (logtest? (-> *target* state-flags) (state-flags sf03 sf15))) @@ -934,12 +934,12 @@ (defstate flying-lurker-start (flying-lurker) :event flying-lurker-handler :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (none) ) :code (behavior () (when (play-movie?) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (flying-lurker-play-intro) ) (flying-lurker-inc-try-count) diff --git a/goal_src/levels/ogre/ogreboss.gc b/goal_src/levels/ogre/ogreboss.gc index 64f2c3db1a..5b7a449c9b 100644 --- a/goal_src/levels/ogre/ogreboss.gc +++ b/goal_src/levels/ogre/ogreboss.gc @@ -1199,7 +1199,7 @@ (send-event *target* 'continue (get-continue-by-name *game-info* "ogre-start")) (ogreboss-inc-try-count) ) - (set-setting! *setting-control* self 'music 'ogreboss (the-as float 0.0) 0) + (set-setting! 'music 'ogreboss 0.0 0) (go ogreboss-wait-for-player) (none) ) @@ -2012,7 +2012,7 @@ process-drawable-fuel-cell-handler ) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (ogreboss-reset-camera) (let ((gp-0 (new 'stack-no-clear 'event-message-block))) (set! (-> gp-0 from) self) diff --git a/goal_src/levels/racer_common/racer-part.gc b/goal_src/levels/racer_common/racer-part.gc index 3735fa77ea..0c0c3ee1af 100644 --- a/goal_src/levels/racer_common/racer-part.gc +++ b/goal_src/levels/racer_common/racer-part.gc @@ -329,63 +329,61 @@ ) (defmethod init-particles! hud-bike-heat ((obj hud-bike-heat) (arg0 int)) - (with-pp - (push-setting! *setting-control* pp 'common-page 'set 0.0 2) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-0 (-> obj nb-of-particles))) - (set! (-> obj particles s5-0) (new 'static 'hud-particle)) - (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 111) obj)) - (set! (-> obj particles s5-0 init-pos x) 13.0) - (set! (-> obj particles s5-0 init-pos y) 370.0) - (set! (-> obj particles s5-0 init-pos z) 10.0) - (set! (-> obj particles s5-0 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) + (add-setting! 'common-page 'set 0.0 2) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 111) obj)) + (set! (-> obj particles s5-0 init-pos x) 13.0) + (set! (-> obj particles s5-0 init-pos y) 370.0) + (set! (-> obj particles s5-0 init-pos z) 10.0) + (set! (-> obj particles s5-0 part matrix) -1) ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-1 (-> obj nb-of-particles))) - (set! (-> obj particles s5-1) (new 'static 'hud-particle)) - (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 112) obj)) - (set! (-> obj particles s5-1 init-pos x) 70.0) - (set! (-> obj particles s5-1 init-pos y) 370.0) - (set! (-> obj particles s5-1 init-pos z) 6.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-2 (-> obj nb-of-particles))) - (set! (-> obj particles s5-2) (new 'static 'hud-particle)) - (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 113) obj)) - (set! (-> obj particles s5-2 init-pos x) 20.0) - (set! (-> obj particles s5-2 init-pos y) 370.0) - (set! (-> obj particles s5-2 init-pos z) 1.0) - (set! (-> obj particles s5-2 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-3 (-> obj nb-of-particles))) - (set! (-> obj particles s5-3) (new 'static 'hud-particle)) - (set! (-> obj particles s5-3 part) (create-launch-control (-> *part-group-id-table* 114) obj)) - (set! (-> obj particles s5-3 init-pos x) 70.0) - (set! (-> obj particles s5-3 init-pos y) 370.0) - (set! (-> obj particles s5-3 init-pos z) 7.0) - (set! (-> obj particles s5-3 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (dotimes (s5-4 (-> obj nb-of-particles)) - (if (= (-> obj particles s5-4 part matrix) -1) - (set! (-> obj particles s5-4 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set! (-> obj x-sgn) -1) - (set! (-> obj y-sgn) 1) - (set! (-> obj force-on-screen) #t) - 0 - (none) + (+! (-> obj nb-of-particles) 1) ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 112) obj)) + (set! (-> obj particles s5-1 init-pos x) 70.0) + (set! (-> obj particles s5-1 init-pos y) 370.0) + (set! (-> obj particles s5-1 init-pos z) 6.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 113) obj)) + (set! (-> obj particles s5-2 init-pos x) 20.0) + (set! (-> obj particles s5-2 init-pos y) 370.0) + (set! (-> obj particles s5-2 init-pos z) 1.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-3 (-> obj nb-of-particles))) + (set! (-> obj particles s5-3) (new 'static 'hud-particle)) + (set! (-> obj particles s5-3 part) (create-launch-control (-> *part-group-id-table* 114) obj)) + (set! (-> obj particles s5-3 init-pos x) 70.0) + (set! (-> obj particles s5-3 init-pos y) 370.0) + (set! (-> obj particles s5-3 init-pos z) 7.0) + (set! (-> obj particles s5-3 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-4 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-4 part matrix) -1) + (set! (-> obj particles s5-4 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) 1) + (set! (-> obj force-on-screen) #t) + 0 + (none) ) (deftype hud-bike-speed (hud) @@ -406,52 +404,50 @@ ) (defmethod init-particles! hud-bike-speed ((obj hud-bike-speed) (arg0 int)) - (with-pp - (push-setting! *setting-control* pp 'common-page 'set 0.0 2) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-0 (-> obj nb-of-particles))) - (set! (-> obj particles s5-0) (new 'static 'hud-particle)) - (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 108) obj)) - (set! (-> obj particles s5-0 init-pos x) 433.0) - (set! (-> obj particles s5-0 init-pos y) 370.0) - (set! (-> obj particles s5-0 init-pos z) 3.0) - (set! (-> obj particles s5-0 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) + (add-setting! 'common-page 'set 0.0 2) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 108) obj)) + (set! (-> obj particles s5-0 init-pos x) 433.0) + (set! (-> obj particles s5-0 init-pos y) 370.0) + (set! (-> obj particles s5-0 init-pos z) 3.0) + (set! (-> obj particles s5-0 part matrix) -1) ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-1 (-> obj nb-of-particles))) - (set! (-> obj particles s5-1) (new 'static 'hud-particle)) - (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 109) obj)) - (set! (-> obj particles s5-1 init-pos x) 378.0) - (set! (-> obj particles s5-1 init-pos y) 370.0) - (set! (-> obj particles s5-1 init-pos z) 5.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-2 (-> obj nb-of-particles))) - (set! (-> obj particles s5-2) (new 'static 'hud-particle)) - (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 110) obj)) - (set! (-> obj particles s5-2 init-pos x) 415.0) - (set! (-> obj particles s5-2 init-pos y) 370.0) - (set! (-> obj particles s5-2 init-pos z) 1.0) - (set! (-> obj particles s5-2 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (dotimes (s5-3 (-> obj nb-of-particles)) - (if (= (-> obj particles s5-3 part matrix) -1) - (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set! (-> obj x-sgn) 1) - (set! (-> obj y-sgn) 1) - (set! (-> obj force-on-screen) #t) - 0 - (none) + (+! (-> obj nb-of-particles) 1) ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 109) obj)) + (set! (-> obj particles s5-1 init-pos x) 378.0) + (set! (-> obj particles s5-1 init-pos y) 370.0) + (set! (-> obj particles s5-1 init-pos z) 5.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 110) obj)) + (set! (-> obj particles s5-2 init-pos x) 415.0) + (set! (-> obj particles s5-2 init-pos y) 370.0) + (set! (-> obj particles s5-2 init-pos z) 1.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) 1) + (set! (-> obj force-on-screen) #t) + 0 + (none) ) (#when PC_PORT diff --git a/goal_src/levels/racer_common/racer-states.gc b/goal_src/levels/racer_common/racer-states.gc index 93219a0093..814013601c 100644 --- a/goal_src/levels/racer_common/racer-states.gc +++ b/goal_src/levels/racer_common/racer-states.gc @@ -147,7 +147,7 @@ (sound-stop (-> self racer engine-sound-id)) (set! (-> self racer engine-sound-id) (new 'static 'sound-id)) (set! (-> self control unknown-vector12 quad) (the-as uint128 0)) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (target-exit) ) (none) @@ -156,7 +156,7 @@ (target-exit) (set! *display-profile* #f) (set! *display-entity-errors* #f) - (set-setting! *setting-control* self 'sound-flava #f 30.0 1) + (set-setting! 'sound-flava #f 30.0 (music-flava racer)) (if (zero? (-> self racer)) (set! (-> self racer) (new 'process 'racer-info)) ) diff --git a/goal_src/levels/rolling/rolling-obs.gc b/goal_src/levels/rolling/rolling-obs.gc index 0f4049929d..7630480ae2 100644 --- a/goal_src/levels/rolling/rolling-obs.gc +++ b/goal_src/levels/rolling/rolling-obs.gc @@ -1304,7 +1304,7 @@ :to self ) (sleep (-> self ticker) (seconds 6000)) - (set-setting! *setting-control* self 'sound-flava #f 40.0 42) + (set-setting! 'sound-flava #f 40.0 (music-flava rolling-gorge)) (none) ) :exit (behavior () @@ -1321,7 +1321,7 @@ ) (send-event (handle->process (-> self end-banner)) 'break-and-die) (send-event (handle->process (-> self start-banner)) 'unbreak) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (none) ) :trans (the-as (function none :behavior gorge-start) gorge-trans) diff --git a/goal_src/levels/snow/snow-obs.gc b/goal_src/levels/snow/snow-obs.gc index 169adf975d..5e5c77c2ca 100644 --- a/goal_src/levels/snow/snow-obs.gc +++ b/goal_src/levels/snow/snow-obs.gc @@ -76,16 +76,16 @@ ) ) ) - (push-setting! *setting-control* self 'music-volume 'abs 0.0 0) - (push-setting! *setting-control* self 'sfx-volume 'rel 50.0 0) + (add-setting! 'music-volume 'abs 0.0 0) + (add-setting! 'sfx-volume 'rel 50.0 0) (ja-play-spooled-anim (the-as spool-anim (-> self anim-name)) (the-as art-joint-anim #f) (the-as art-joint-anim #f) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) (let ((a0-21 (handle->process gp-2))) (if a0-21 (send-event a0-21 'stop-cloning) diff --git a/goal_src/levels/snow/snow-ram-boss.gc b/goal_src/levels/snow/snow-ram-boss.gc index 3764955b4c..f3ffb4027e 100644 --- a/goal_src/levels/snow/snow-ram-boss.gc +++ b/goal_src/levels/snow/snow-ram-boss.gc @@ -1215,24 +1215,18 @@ (set! (-> obj proj-stoked) #t) (let ((s5-0 (new 'stack-no-clear 'vector))) (set! (-> s5-0 quad) (the-as uint128 0)) - (let* ((s4-0 (the-as ram-boss-proj (get-process *default-dead-pool* ram-boss-proj #x4000))) - (v1-9 (when s4-0 - (let ((t9-1 (method-of-type ram-boss-proj activate))) - (t9-1 s4-0 obj 'ram-boss-proj (the-as pointer #x70004000)) - ) - (run-now-in-process - s4-0 - projectile-init-by-other - (-> obj entity) - (-> obj collide-info trans) - s5-0 - 0 - (process->handle *target*) - ) - (-> s4-0 ppointer) - ) - ) - ) + (let ((v1-9 (process-spawn + ram-boss-proj + :init projectile-init-by-other + (-> obj entity) + (-> obj collide-info trans) + s5-0 + 0 + (process->handle *target*) + :to obj + ) + ) + ) (set! (-> (the-as (pointer ram-boss-proj) v1-9) 0 notify-handle) (process->handle obj)) ) ) diff --git a/goal_src/levels/snow/snow-ram.gc b/goal_src/levels/snow/snow-ram.gc index d1bd2b93b4..08bb1be6ce 100644 --- a/goal_src/levels/snow/snow-ram.gc +++ b/goal_src/levels/snow/snow-ram.gc @@ -214,7 +214,7 @@ (ja-channel-push! 1 (seconds 0.075)) (loop (sound-play-by-name (static-sound-name "set-ram") (new-sound-id) 1024 0 0 1 #t) - (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! ram-cock-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (suspend) (ja :num! (seek!)) @@ -222,7 +222,7 @@ (let ((gp-1 #f)) (sound-play-by-name (static-sound-name "slam-crash") (new-sound-id) 1024 0 0 1 #t) (logclear! (-> self mask) (process-mask actor-pause)) - (ja-no-eval :group! (-> self draw art-group data 5) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! ram-release-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (let ((f30-0 (ja-aframe-num 0))) (when (and (not gp-1) (>= f30-0 61.0)) @@ -277,7 +277,7 @@ (go ram-give-fuel-cell) ) (ja-channel-push! 1 0) - (ja :group! (-> self draw art-group data 6) :num! min) + (ja :group! ram-idle-ja :num! min) (transform-post) (logior! (-> self mask) (process-mask sleep-code)) (suspend) @@ -304,30 +304,24 @@ :code (behavior () (set! (-> self give-fuel-cell?) #f) (ja-channel-push! 1 0) - (ja :group! (-> self draw art-group data 6) :num! min) + (ja :group! ram-idle-ja :num! min) (transform-post) (when (and (not (task-complete? *game-info* (-> self entity extra perm task))) (-> self give-fuel-cell-anim)) (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) - (let* ((gp-1 (the-as snowcam (get-process *default-dead-pool* snowcam #x4000))) - (v1-14 (when gp-1 - (let ((t9-6 (method-of-type snowcam activate))) - (t9-6 gp-1 self 'snowcam (the-as pointer #x70004000)) - ) - (run-now-in-process - gp-1 - pov-camera-init-by-other - (-> self root-override trans) - *snowcam-sg* - (-> self give-fuel-cell-anim) - 0 - self - '() - ) - (-> gp-1 ppointer) - ) - ) - ) + (let ((v1-14 (process-spawn + snowcam + :init pov-camera-init-by-other + (-> self root-override trans) + *snowcam-sg* + (-> self give-fuel-cell-anim) + 0 + self + '() + :to self + ) + ) + ) (set! (-> (the-as (pointer snowcam) v1-14) 0 seq) (the-as uint 1)) ) (sound-play-by-name (static-sound-name "cell-prize") (new-sound-id) 1024 0 0 1 #t) diff --git a/goal_src/levels/sunken/helix-water.gc b/goal_src/levels/sunken/helix-water.gc index 57612d8118..8f02b53be7 100644 --- a/goal_src/levels/sunken/helix-water.gc +++ b/goal_src/levels/sunken/helix-water.gc @@ -289,27 +289,21 @@ ) ) ) - (let* ((gp-0 (the-as sunkencam (get-process *default-dead-pool* sunkencam #x4000))) - (v1-11 - (when gp-0 - (let ((t9-2 (method-of-type sunkencam activate))) - (t9-2 gp-0 self 'sunkencam (the-as pointer #x70004000)) - ) - (run-now-in-process - gp-0 - pov-camera-init-by-other - (-> self spawn-trans) - *sunkencam-sg* - "qbert-show-door-open" - 0 - #f - '() - ) - (-> gp-0 ppointer-override) - ) - ) - ) - (set! (-> v1-11 0 seq) (the-as uint 2)) + (let ((v1-11 + (process-spawn + sunkencam + :init pov-camera-init-by-other + (-> self spawn-trans) + *sunkencam-sg* + "qbert-show-door-open" + 0 + #f + '() + :to self + ) + ) + ) + (set! (-> (the-as (pointer sunkencam) v1-11) 0 seq) (the-as uint 2)) ) (let ((a1-5 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-5 from) self) @@ -624,7 +618,7 @@ (go helix-water-activated) ) ((= v1-0 'music) - (set-setting! *setting-control* self 'music 'danger 0.0 0) + (set-setting! 'music 'danger 0.0 0) ) ) ) @@ -650,7 +644,7 @@ (case arg2 (('notify) (when (= (-> arg0 type) launcherdoor) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (go helix-water-idle) ) ) diff --git a/goal_src/levels/sunken/target-tube.gc b/goal_src/levels/sunken/target-tube.gc index 0d2f4f492e..847bcb7b4f 100644 --- a/goal_src/levels/sunken/target-tube.gc +++ b/goal_src/levels/sunken/target-tube.gc @@ -822,8 +822,8 @@ :exit (behavior () (logclear! (-> self state-flags) (state-flags sf03 sf15)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) ((-> target-tube-start exit)) (none) ) @@ -831,8 +831,8 @@ (local-vars (v1-40 symbol)) (set! (-> self neck flex-blend) 0.0) (target-timed-invulnerable-off self) - (push-setting! *setting-control* self 'process-mask 'set 0.0 #x14a0000) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) (set! (-> self control transv quad) (the-as uint128 0)) (set! (-> self control unknown-surface00) *neutral-mods*) (ja-channel-push! 1 (seconds 0.1)) diff --git a/goal_src/levels/swamp/billy.gc b/goal_src/levels/swamp/billy.gc index 2842acb68e..aac55fb58a 100644 --- a/goal_src/levels/swamp/billy.gc +++ b/goal_src/levels/swamp/billy.gc @@ -884,7 +884,7 @@ ) ) :enter (behavior () - (push-setting! *setting-control* self 'music 'danger 0.0 0) + (add-setting! 'music 'danger 0.0 0) (ja-channel-set! 0) (clear-collide-with-as (-> self root-override)) (init! (-> self query) (the-as string #f) 40 150 25 #t (lookup-text! *common-text* (game-text-id quit) #f)) @@ -940,7 +940,7 @@ (restore-collide-with-as (-> self root-override)) (restore-load-state-and-cleanup *load-state*) (set! (-> *ACTOR-bank* birth-max) 1000) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (none) ) :trans (behavior () diff --git a/goal_src/levels/title/title-obs.gc b/goal_src/levels/title/title-obs.gc index 2ad977293b..870cf4f92e 100644 --- a/goal_src/levels/title/title-obs.gc +++ b/goal_src/levels/title/title-obs.gc @@ -189,7 +189,7 @@ :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (if (= v1-0 'update) - (clear-pending-settings-from-process *setting-control* self 'process-mask) + (remove-setting! 'process-mask) ) ) ) @@ -224,7 +224,7 @@ (suspend) ) (set! (-> *setting-control* current bg-a) 1.0) - (set-setting! *setting-control* self 'bg-a 'abs 0.0 0) + (set-setting! 'bg-a 'abs 0.0 0) (set! (-> self camera-anim) (ppointer->handle (process-spawn logo-slave (-> self entity) *logo-cam-sg* :to self)) ) @@ -292,8 +292,8 @@ (the-as (function process-drawable symbol) false-func) ) (set! *spawn-actors* #f) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask progress)) + (apply-settings *setting-control*) (deactivate (handle->process (-> self black))) (deactivate (handle->process (-> self volumes))) (send-event (ppointer->process (-> self parent)) 'wait) @@ -455,14 +455,14 @@ :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (if (= v1-0 'blackout) - (set-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (set-setting! 'bg-a 'abs 1.0 0) ) ) ) ) :enter (behavior () - (set-setting! *setting-control* self 'bg-a 'abs 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'bg-a 'abs 0.0 0) + (apply-settings *setting-control*) (set! (-> self state-time) (-> *display* base-frame-counter)) (if *time-of-day-proc* (set! (-> *time-of-day-proc* 0 hour) 12) @@ -481,7 +481,7 @@ (cpad-pressed? 0 start circle x) (member (level-status *level* 'village1) '(loaded active)) ) - (set-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (set-setting! 'bg-a 'abs 1.0 0) ) (when (and (= (-> *setting-control* current bg-a) 1.0) (and (member (level-status *level* 'village1) '(active loaded)) @@ -550,7 +550,7 @@ (the-as (function process-drawable symbol) false-func) ) (set! (-> self done?) #t) - (set-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (set-setting! 'bg-a 'abs 1.0 0) (anim-loop) (none) ) @@ -646,13 +646,13 @@ (defstate target-title (target) :event target-generic-event-handler :enter (behavior () - (set-setting! *setting-control* self 'music-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'sfx-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'ambient-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (set-setting! *setting-control* self 'border-mode #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'border-mode #f 0.0 0) + (apply-settings *setting-control*) (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self manipy) (the-as (pointer manipy) #f)) (ja-channel-set! 0) @@ -723,16 +723,16 @@ (if (zero? (-> s5-2 handle)) (set! gp-1 8) ) - (set-setting! *setting-control* self 'allow-progress #t 0.0 0) + (set-setting! 'allow-progress #t 0.0 0) (set-blackout-frames 0) (set! (-> *setting-control* default bg-a-force) 0.0) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (set! (-> *setting-control* current bg-a) 0.0) (set! (-> *setting-control* current bg-a-force) 0.0) (activate-progress *dproc* (the-as progress-screen gp-1)) ) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (while *progress-process* (suspend) ) @@ -783,8 +783,8 @@ ) ) :enter (behavior () - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (none) ) :exit (-> target-title exit) @@ -811,10 +811,10 @@ ) ) :enter (behavior () - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'ambient-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'allow-progress) (sound-group-continue (the-as uint 2)) (when *time-of-day-proc* (set! (-> *time-of-day-proc* 0 time-ratio) 18000.0) @@ -827,7 +827,7 @@ (set! (-> *time-of-day-proc* 0 time-ratio) 300.0) (set! *time-of-day-fast* #f) ) - (clear-pending-settings-from-process *setting-control* self 'allow-pause) + (remove-setting! 'allow-pause) ((-> target-title exit)) (none) ) diff --git a/goal_src/levels/training/training-obs.gc b/goal_src/levels/training/training-obs.gc index 26a9517cee..dae9b03d5b 100644 --- a/goal_src/levels/training/training-obs.gc +++ b/goal_src/levels/training/training-obs.gc @@ -107,15 +107,15 @@ ) ) ) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (let* ((a0-15 *setting-control*) - (t9-6 (method-of-object a0-15 set-setting!)) + (t9-6 (method-of-object a0-15 set-setting)) (a2-3 'movie) (a3-1 (process->ppointer self)) ) - (t9-6 a0-15 self a2-3 (the-as symbol a3-1) 0.0 0) + (t9-6 a0-15 self a2-3 a3-1 0.0 0) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (dotimes (gp-1 2) (while (or (-> *setting-control* current talking) (-> *setting-control* current spooling) @@ -129,8 +129,8 @@ (while (< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1)) (suspend) ) - (clear-pending-settings-from-process *setting-control* self 'movie) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'movie) + (apply-settings *setting-control*) (suspend) (suspend) ) diff --git a/goal_src/levels/village1/fishermans-boat.gc b/goal_src/levels/village1/fishermans-boat.gc index b2de7ed37f..dd7a549fb3 100644 --- a/goal_src/levels/village1/fishermans-boat.gc +++ b/goal_src/levels/village1/fishermans-boat.gc @@ -1487,7 +1487,7 @@ (set! (-> self anchored) #t) (set! (-> self propeller enable) #t) (fishermans-boat-play-sounds) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (process-spawn-function process (lambda :behavior fishermans-boat diff --git a/goal_src/levels/village1/sage.gc b/goal_src/levels/village1/sage.gc index b356a838a6..deb39e091d 100644 --- a/goal_src/levels/village1/sage.gc +++ b/goal_src/levels/village1/sage.gc @@ -27,312 +27,310 @@ ) (defmethod play-anim! sage ((obj sage) (arg0 symbol)) - (with-pp - (when (!= *kernel-boot-message* 'play) - (close-specific-task! (game-task intro) (task-status need-resolution)) - (return (new 'static 'spool-anim - :name "sage-introduction-misty-cannon" - :index 8 - :parts 12 - :command-list '((1 blackout 0) - (100 want-levels village1 misty) - (261 joint "cameraB") - (521 joint "camera") - (776 joint "cameraB") - (810 joint "camera") - (1171 joint "cameraB") - (1235 joint "camera") - (1235 save) - (1418 blackout 30) - ) + (when (!= *kernel-boot-message* 'play) + (close-specific-task! (game-task intro) (task-status need-resolution)) + (return (new 'static 'spool-anim + :name "sage-introduction-misty-cannon" + :index 8 + :parts 12 + :command-list '((1 blackout 0) + (100 want-levels village1 misty) + (261 joint "cameraB") + (521 joint "camera") + (776 joint "cameraB") + (810 joint "camera") + (1171 joint "cameraB") + (1235 joint "camera") + (1235 save) + (1418 blackout 30) ) ) - ) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (case (current-task (-> obj tasks)) - (((game-task intro)) - (when arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - (set-setting! *setting-control* pp 'music-volume-movie 'abs 0.0 0) - (copy-settings-from-target! *setting-control*) ) - (new 'static 'spool-anim - :name "sage-intro-sequence-d1" - :index 16 - :parts 17 - :command-list '((0 display-level misty #f) - (0 display-level village1 display) - (0 want-vis vi1) - (0 save) - (0 want-force-inside village1 #t) - (0 want-force-vis village1 #t) - (0 kill "assistant-11") - (0 kill "reflector-middle-2") - (0 kill "eco-11") - (0 kill "eco-10") - (0 kill "sharkey-12") - (0 kill "reflector-end-1") - (0 kill "water-vol-10") - (0 kill "water-vol-8") - (0 kill "water-vol-7") - (0 kill "fishermans-boat-2") - (0 kill "revcycleprop-2") - (0 kill "revcycle-8") - (0 kill "ropebridge-5") - (0 kill "ropebridge-4") - (0 kill "villagea-water-2") - (0 time-of-day 7) - (1 time-of-day -1) - (3 blackout 0) - (25 blackout 0) - (25 want-force-vis village1 #f) - (56 joint "cameraB") - (100 want-force-inside village1 #f) - (107 joint "camera") - (137 joint "cameraB") - (202 joint "camera") - (286 joint "cameraB") - (554 joint "camera") - (633 joint "cameraB") - (711 joint "camera") - (796 joint "cameraB") - (921 joint "camera") - (1021 shadow self #f) - (1021 joint "cameraB") - (1081 joint "camera") - (1183 joint "cameraB") - (1221 joint "camera") - (1496 shadow self #t) - (1496 joint "cameraB") - (1496 time-of-day 18) - (1721 joint "camera") - (1721 time-of-day 7) - (1722 time-of-day -1) - ) + ) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (case (current-task (-> obj tasks)) + (((game-task intro)) + (when arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + (set-setting! 'music-volume-movie 'abs 0.0 0) + (apply-settings *setting-control*) + ) + (new 'static 'spool-anim + :name "sage-intro-sequence-d1" + :index 16 + :parts 17 + :command-list '((0 display-level misty #f) + (0 display-level village1 display) + (0 want-vis vi1) + (0 save) + (0 want-force-inside village1 #t) + (0 want-force-vis village1 #t) + (0 kill "assistant-11") + (0 kill "reflector-middle-2") + (0 kill "eco-11") + (0 kill "eco-10") + (0 kill "sharkey-12") + (0 kill "reflector-end-1") + (0 kill "water-vol-10") + (0 kill "water-vol-8") + (0 kill "water-vol-7") + (0 kill "fishermans-boat-2") + (0 kill "revcycleprop-2") + (0 kill "revcycle-8") + (0 kill "ropebridge-5") + (0 kill "ropebridge-4") + (0 kill "villagea-water-2") + (0 time-of-day 7) + (1 time-of-day -1) + (3 blackout 0) + (25 blackout 0) + (25 want-force-vis village1 #f) + (56 joint "cameraB") + (100 want-force-inside village1 #f) + (107 joint "camera") + (137 joint "cameraB") + (202 joint "camera") + (286 joint "cameraB") + (554 joint "camera") + (633 joint "cameraB") + (711 joint "camera") + (796 joint "cameraB") + (921 joint "camera") + (1021 shadow self #f) + (1021 joint "cameraB") + (1081 joint "camera") + (1183 joint "cameraB") + (1221 joint "camera") + (1496 shadow self #t) + (1496 joint "cameraB") + (1496 time-of-day 18) + (1721 joint "camera") + (1721 time-of-day 7) + (1722 time-of-day -1) ) ) - (((game-task beach-ecorocks)) - (when arg0 - (let* ((s5-1 (-> obj tasks)) - (s4-0 (method-of-object s5-1 save-reminder)) - ) - (s4-0 s5-1 (the int (the-as float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 1) - ) - (close-status! (-> obj tasks) (task-status need-introduction)) - ) - (new 'static 'spool-anim - :name "sage-intro-sequence-e" - :index 14 - :parts 13 - :command-list '((0 want-levels village1 beach) - (0 blackout 0) - (197 joint "cameraB") - (361 joint "camera") - (660 joint "cameraB") - (937 display-level beach movie) - (937 want-force-vis beach #t) - (938 alive "ecoventrock-3") - (938 alive "ecoventrock-4") - (938 alive "ecoventrock-5") - (938 alive "ecoventrock-6") - (938 alive "ecoventrock-7") - (938 alive "harvester-87") - (938 alive "harvester-88") - (938 alive "harvester-89") - (938 alive "harvester-90") - (938 alive "harvester-91") - (940 joint "camera") - (1160 joint "cameraB") - (1162 dead "ecoventrock-3") - (1162 dead "ecoventrock-4") - (1162 dead "ecoventrock-5") - (1162 dead "ecoventrock-6") - (1162 dead "ecoventrock-7") - (1162 dead "harvester-87") - (1162 dead "harvester-88") - (1162 dead "harvester-89") - (1162 dead "harvester-90") - (1162 dead "harvester-91") - (1310 joint "camera") - (1313 want-force-vis beach #f) - (1313 display-level beach #f) - (1313 send-event "warp-gate-switch-3" 'hide) - ) - ) - ) - (else - (if arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - ) - (new 'static 'spool-anim - :name "sage-introduction-misty-cannon" - :index 8 - :parts 12 - :command-list '((0 want-levels village1 beach) - (261 joint "cameraB") - (521 joint "camera") - (776 joint "cameraB") - (810 joint "camera") - (1171 joint "cameraB") - (1235 joint "camera") - ) - ) - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (if arg0 - (set! (-> obj reminder-played) #t) - ) - (case (get-reminder (-> obj tasks) 0) - ((3) - (new 'static 'spool-anim :name "sage-reminder-2-generic" :index 13 :parts 4 :command-list '()) - ) - ((2) - (new 'static 'spool-anim :name "sage-reminder-1-generic" :index 12 :parts 3 :command-list '()) - ) - ((1) - (new 'static 'spool-anim - :name "sage-reminder-1-misty-cannon" - :index 9 - :parts 5 - :command-list '((86 joint "cameraB") (320 joint "camera")) - ) - ) - (else - (new 'static 'spool-anim - :name "sage-reminder-1-ecorocks" - :index 11 - :parts 4 - :command-list '((0 want-levels village1 beach) - (245 display-level beach movie) - (245 want-force-vis beach #t) - (246 alive "ecoventrock-3") - (246 alive "ecoventrock-4") - (246 alive "ecoventrock-5") - (246 alive "ecoventrock-6") - (246 alive "ecoventrock-7") - (246 alive "harvester-87") - (246 alive "harvester-88") - (246 alive "harvester-89") - (246 alive "harvester-90") - (246 alive "harvester-91") - (246 joint "cameraB") - (365 want-force-vis beach #f) - (365 display-level beach #f) - (366 joint "camera") - ) - ) - ) - ) - ) - (((task-status need-reward-speech)) - (when arg0 - (set-setting! *setting-control* pp 'music-volume-movie 'abs 0.0 0) - (copy-settings-from-target! *setting-control*) - (close-status! (-> obj tasks) (task-status need-reward-speech)) - (set! (-> obj assistant) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *assistant-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj assistant)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj assistant)) 'blend-shape #t) - (send-event (handle->process (-> obj assistant)) 'center-joint 3) - (let ((v1-68 (handle->process (-> obj assistant)))) - (if v1-68 - (set! (-> (the-as assistant v1-68) draw light-index) (the-as uint 1)) - ) - ) - (set! (-> obj draw bounds w) 40960.0) - ) - (new 'static 'spool-anim - :name "sage-intro-sequence-d2" - :index 15 - :parts 20 - :command-list '((0 want-levels village1 beach) - (0 kill "assistant-11") - (0 kill "reflector-middle-2") - (0 kill "eco-11") - (0 kill "eco-10") - (0 kill "sharkey-12") - (0 kill "reflector-end-1") - (0 kill "water-vol-10") - (0 kill "water-vol-8") - (0 kill "water-vol-7") - (0 kill "fishermans-boat-2") - (0 kill "revcycleprop-2") - (0 kill "revcycle-8") - (113 joint "cameraB") - (232 joint "camera") - (289 joint "cameraB") - (338 joint "camera") - (405 joint "cameraB") - (560 joint "camera") - (660 joint "cameraB") - (699 joint "camera") - (837 joint "cameraB") - (837 shadow self #f) - (910 joint "camera") - (945 alive "farmer-3") - (945 alive "hutlamp-2") - (950 joint "cameraB") - (974 display-level beach movie) - (974 want-force-vis beach #t) - (1011 alive "bird-lady-4") - (1015 joint "camera") - (1018 dead "farmer-3") - (1018 dead "hutlamp-2") - (1075 alive "explorer-4") - (1080 joint "cameraB") - (1080 want-force-vis beach #f) - (1080 display-level beach #f) - (1082 dead "bird-lady-4") - (1133 joint "camera") - (1135 dead "explorer-4") - (1244 display-level beach movie) - (1244 want-force-vis beach #t) - (1245 alive "fuel-cell-42") - (1246 joint "cameraB") - (1369 joint "camera") - (1438 alive "fuel-cell-42") - (1438 want-force-vis beach #f) - (1438 dead "fuel-cell-42") - (1438 kill "villagea-water-2") - (1438 kill "crate-3147") - (1438 kill "crate-3146") - (1438 kill "crate-3143") - (1438 kill "sagesail-6") - (1438 kill "windmill-sail-4") - (1438 kill "ropebridge-4") - (1438 kill "ropebridge-5") - (1438 kill "windspinner-8") - (1438 kill "windspinner-9") - (1438 joint "cameraB") - (1439 want-levels village1 training) - (1439 save) - (1529 joint "camera") - (1691 joint "cameraB") - (1753 joint "camera") - (1874 joint "cameraB") - (2057 joint "camera") - (2176 joint "cameraB") - (2226 joint "camera") - (2226 shadow self #t) - ) - ) - ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) - ) - ) - (get-art-elem obj) ) + (((game-task beach-ecorocks)) + (when arg0 + (let* ((s5-1 (-> obj tasks)) + (s4-0 (method-of-object s5-1 save-reminder)) + ) + (s4-0 s5-1 (the int (the-as float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 1) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "sage-intro-sequence-e" + :index 14 + :parts 13 + :command-list '((0 want-levels village1 beach) + (0 blackout 0) + (197 joint "cameraB") + (361 joint "camera") + (660 joint "cameraB") + (937 display-level beach movie) + (937 want-force-vis beach #t) + (938 alive "ecoventrock-3") + (938 alive "ecoventrock-4") + (938 alive "ecoventrock-5") + (938 alive "ecoventrock-6") + (938 alive "ecoventrock-7") + (938 alive "harvester-87") + (938 alive "harvester-88") + (938 alive "harvester-89") + (938 alive "harvester-90") + (938 alive "harvester-91") + (940 joint "camera") + (1160 joint "cameraB") + (1162 dead "ecoventrock-3") + (1162 dead "ecoventrock-4") + (1162 dead "ecoventrock-5") + (1162 dead "ecoventrock-6") + (1162 dead "ecoventrock-7") + (1162 dead "harvester-87") + (1162 dead "harvester-88") + (1162 dead "harvester-89") + (1162 dead "harvester-90") + (1162 dead "harvester-91") + (1310 joint "camera") + (1313 want-force-vis beach #f) + (1313 display-level beach #f) + (1313 send-event "warp-gate-switch-3" 'hide) + ) + ) + ) + (else + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "sage-introduction-misty-cannon" + :index 8 + :parts 12 + :command-list '((0 want-levels village1 beach) + (261 joint "cameraB") + (521 joint "camera") + (776 joint "cameraB") + (810 joint "camera") + (1171 joint "cameraB") + (1235 joint "camera") + ) + ) + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (if arg0 + (set! (-> obj reminder-played) #t) + ) + (case (get-reminder (-> obj tasks) 0) + ((3) + (new 'static 'spool-anim :name "sage-reminder-2-generic" :index 13 :parts 4 :command-list '()) + ) + ((2) + (new 'static 'spool-anim :name "sage-reminder-1-generic" :index 12 :parts 3 :command-list '()) + ) + ((1) + (new 'static 'spool-anim + :name "sage-reminder-1-misty-cannon" + :index 9 + :parts 5 + :command-list '((86 joint "cameraB") (320 joint "camera")) + ) + ) + (else + (new 'static 'spool-anim + :name "sage-reminder-1-ecorocks" + :index 11 + :parts 4 + :command-list '((0 want-levels village1 beach) + (245 display-level beach movie) + (245 want-force-vis beach #t) + (246 alive "ecoventrock-3") + (246 alive "ecoventrock-4") + (246 alive "ecoventrock-5") + (246 alive "ecoventrock-6") + (246 alive "ecoventrock-7") + (246 alive "harvester-87") + (246 alive "harvester-88") + (246 alive "harvester-89") + (246 alive "harvester-90") + (246 alive "harvester-91") + (246 joint "cameraB") + (365 want-force-vis beach #f) + (365 display-level beach #f) + (366 joint "camera") + ) + ) + ) + ) + ) + (((task-status need-reward-speech)) + (when arg0 + (set-setting! 'music-volume-movie 'abs 0.0 0) + (apply-settings *setting-control*) + (close-status! (-> obj tasks) (task-status need-reward-speech)) + (set! (-> obj assistant) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *assistant-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj assistant)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj assistant)) 'blend-shape #t) + (send-event (handle->process (-> obj assistant)) 'center-joint 3) + (let ((v1-68 (handle->process (-> obj assistant)))) + (if v1-68 + (set! (-> (the-as assistant v1-68) draw light-index) (the-as uint 1)) + ) + ) + (set! (-> obj draw bounds w) 40960.0) + ) + (new 'static 'spool-anim + :name "sage-intro-sequence-d2" + :index 15 + :parts 20 + :command-list '((0 want-levels village1 beach) + (0 kill "assistant-11") + (0 kill "reflector-middle-2") + (0 kill "eco-11") + (0 kill "eco-10") + (0 kill "sharkey-12") + (0 kill "reflector-end-1") + (0 kill "water-vol-10") + (0 kill "water-vol-8") + (0 kill "water-vol-7") + (0 kill "fishermans-boat-2") + (0 kill "revcycleprop-2") + (0 kill "revcycle-8") + (113 joint "cameraB") + (232 joint "camera") + (289 joint "cameraB") + (338 joint "camera") + (405 joint "cameraB") + (560 joint "camera") + (660 joint "cameraB") + (699 joint "camera") + (837 joint "cameraB") + (837 shadow self #f) + (910 joint "camera") + (945 alive "farmer-3") + (945 alive "hutlamp-2") + (950 joint "cameraB") + (974 display-level beach movie) + (974 want-force-vis beach #t) + (1011 alive "bird-lady-4") + (1015 joint "camera") + (1018 dead "farmer-3") + (1018 dead "hutlamp-2") + (1075 alive "explorer-4") + (1080 joint "cameraB") + (1080 want-force-vis beach #f) + (1080 display-level beach #f) + (1082 dead "bird-lady-4") + (1133 joint "camera") + (1135 dead "explorer-4") + (1244 display-level beach movie) + (1244 want-force-vis beach #t) + (1245 alive "fuel-cell-42") + (1246 joint "cameraB") + (1369 joint "camera") + (1438 alive "fuel-cell-42") + (1438 want-force-vis beach #f) + (1438 dead "fuel-cell-42") + (1438 kill "villagea-water-2") + (1438 kill "crate-3147") + (1438 kill "crate-3146") + (1438 kill "crate-3143") + (1438 kill "sagesail-6") + (1438 kill "windmill-sail-4") + (1438 kill "ropebridge-4") + (1438 kill "ropebridge-5") + (1438 kill "windspinner-8") + (1438 kill "windspinner-9") + (1438 joint "cameraB") + (1439 want-levels village1 training) + (1439 save) + (1529 joint "camera") + (1691 joint "cameraB") + (1753 joint "camera") + (1874 joint "cameraB") + (2057 joint "camera") + (2176 joint "cameraB") + (2226 joint "camera") + (2226 shadow self #t) + ) + ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (current-status (-> obj tasks))) + ) + ) + (get-art-elem obj) ) ) ) @@ -510,7 +508,7 @@ ((-> (method-of-type process-taskable play-anim) exit)) (case (get-task-status (game-task intro)) (((task-status need-resolution)) - (clear-pending-settings-from-process *setting-control* self 'music-volume-movie) + (remove-setting! 'music-volume-movie) (close-specific-task! (game-task intro) (task-status need-resolution)) (start 'play (get-continue-by-name *game-info* "game-start")) ) diff --git a/goal_src/levels/village1/sequence-a-village1.gc b/goal_src/levels/village1/sequence-a-village1.gc index 611590207e..64f1aa3ca0 100644 --- a/goal_src/levels/village1/sequence-a-village1.gc +++ b/goal_src/levels/village1/sequence-a-village1.gc @@ -358,9 +358,9 @@ (set! (-> self cur-trans-hook) sequenceA-village1-trans-hook) (logclear! (-> self mask) (process-mask pause actor-pause)) (set! (-> self been-kicked) #t) - (set-setting! *setting-control* self 'music-volume-movie 'abs 0.0 0) - (set-setting! *setting-control* self 'sfx-volume-movie 'abs 0.0 0) - (set-setting! *setting-control* self 'ambient-volume-movie 'abs 0.0 0) + (set-setting! 'music-volume-movie 'abs 0.0 0) + (set-setting! 'sfx-volume-movie 'abs 0.0 0) + (set-setting! 'ambient-volume-movie 'abs 0.0 0) (go-virtual hidden) (none) ) diff --git a/goal_src/levels/village2/swamp-blimp.gc b/goal_src/levels/village2/swamp-blimp.gc index 721fbd5a45..11f122b306 100644 --- a/goal_src/levels/village2/swamp-blimp.gc +++ b/goal_src/levels/village2/swamp-blimp.gc @@ -634,18 +634,18 @@ (defstate swamp-tetherrock-break (swamp-tetherrock) :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'movie) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'movie) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (none) ) :code (behavior () (let ((gp-0 (tetherrock-get-info (-> self entity)))) (hide-hud-quick) (process-grab? *target*) - (set-setting! *setting-control* self 'movie (the-as symbol (process->ppointer self)) 0.0 0) - (set-setting! *setting-control* self 'process-mask 'set 0.0 #x80800) - (copy-settings-from-target! *setting-control*) + (set-setting! 'movie (process->ppointer self) 0.0 0) + (set-setting! 'process-mask 'set 0.0 (process-mask movie platform)) + (apply-settings *setting-control*) (let* ((s4-0 (get-task-control (game-task swamp-tether-1))) (s5-0 (+ (get-reminder s4-0 0) 1)) ) diff --git a/goal_src/levels/village3/village3-obs.gc b/goal_src/levels/village3/village3-obs.gc index 0dff7b83bd..b7458be5d0 100644 --- a/goal_src/levels/village3/village3-obs.gc +++ b/goal_src/levels/village3/village3-obs.gc @@ -263,7 +263,7 @@ (when (send-event *target* 'clone-anim self) (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) (send-event *target* 'blend-shape #t) - (set-setting! *setting-control* self 'sound-flava #f 30.0 4) + (set-setting! 'sound-flava #f 30.0 (music-flava to-snow)) (logclear! (-> self mask) (process-mask enemy)) (process-spawn othercam self 4 #f #t :to self) (ja-play-spooled-anim @@ -272,7 +272,7 @@ (the-as art-joint-anim (-> self draw art-group data 4)) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (send-event *target* 'blend-shape #f) (when *target* (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) @@ -306,7 +306,7 @@ (send-event *target* 'trans 'save (-> self old-target-pos)) (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) (send-event *target* 'blend-shape #t) - (set-setting! *setting-control* self 'sound-flava #f 30.0 4) + (set-setting! 'sound-flava #f 30.0 (music-flava to-snow)) (logclear! (-> self mask) (process-mask enemy)) (process-spawn othercam self 4 #f #t :to self) (ja-play-spooled-anim @@ -315,7 +315,7 @@ (the-as art-joint-anim (-> self draw art-group data 3)) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (send-event *target* 'blend-shape #f) (when *target* (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) diff --git a/goal_src/levels/village_common/villagep-obs.gc b/goal_src/levels/village_common/villagep-obs.gc index a7bdbad8b6..89cec6d5d5 100644 --- a/goal_src/levels/village_common/villagep-obs.gc +++ b/goal_src/levels/village_common/villagep-obs.gc @@ -103,7 +103,7 @@ ) ) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (set! (-> self state-time) (-> *display* base-frame-counter)) (loop (when (and (and *target* (>= 20480.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))) @@ -221,8 +221,8 @@ (defstate active (warp-gate) :virtual #t :enter (behavior () - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) (set! (-> self state-time) (-> *display* base-frame-counter)) (none) @@ -969,15 +969,15 @@ ) ) ) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (let* ((a0-25 *setting-control*) - (t9-14 (method-of-object a0-25 set-setting!)) + (t9-14 (method-of-object a0-25 set-setting)) (a2-5 'movie) (a3-1 (process->ppointer self)) ) - (t9-14 a0-25 self a2-5 (the-as symbol a3-1) 0.0 0) + (t9-14 a0-25 self a2-5 a3-1 0.0 0) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (while (or (-> *setting-control* current talking) (-> *setting-control* current spooling) (-> *setting-control* current hint) @@ -995,8 +995,8 @@ (suspend) (kill-current-level-hint '() '() 'die) (process-release? *target*) - (clear-pending-settings-from-process *setting-control* self 'movie) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'movie) + (apply-settings *setting-control*) (suspend) (suspend) ) @@ -1115,7 +1115,7 @@ (when (zero? (-> self index)) (let ((a0-70 (-> self entity extra perm))) (when (= (-> a0-70 user-uint8 0) 1) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (let ((gp-3 (-> *display* base-frame-counter))) (until (>= (- (-> *display* base-frame-counter) gp-3) (seconds 300)) (suspend) diff --git a/goal_src/pc/progress-pc.gc b/goal_src/pc/progress-pc.gc index 9dad72848e..a031990112 100644 --- a/goal_src/pc/progress-pc.gc +++ b/goal_src/pc/progress-pc.gc @@ -983,7 +983,7 @@ (when (find-flava-log (progress-get-music-by-index *progress-music*) (the int (-> options (-> obj option-index) param1))) (cpad-clear! 0 x) (cpad-clear! 0 circle) - (set-setting! *setting-control* obj 'music (progress-get-music-by-index *progress-music*) 0.0 0) + (set-setting *setting-control* obj 'music (progress-get-music-by-index *progress-music*) 0.0 0) (set! *progress-flava* (the int (-> options (-> obj option-index) param1))) (sound-group-continue (the-as uint 2)) (sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t) @@ -1965,8 +1965,8 @@ (lambda :behavior progress () (sound-play-by-name (static-sound-name "menu-close") (new-sound-id) 1024 0 0 1 #t) (hide-progress-icons) - (clear-pending-settings-from-process *setting-control* self 'music) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'music) + (apply-settings *setting-control*) (progress-reset-music-parms) (commit-to-file *pc-settings*) (set! (-> self particles 3 init-pos x) -320.0) diff --git a/test/decompiler/reference/decompiler-macros.gc b/test/decompiler/reference/decompiler-macros.gc index 8101f675cf..2339e21ac9 100644 --- a/test/decompiler/reference/decompiler-macros.gc +++ b/test/decompiler/reference/decompiler-macros.gc @@ -1192,5 +1192,87 @@ ) ) +;; settings-h + + +(defmacro setting-control-func! (func s &rest args) + (let ((argb #f) + (argi 0) + (argf 0.0) + (setting (cadr s))) + (cond + ; ((or (eq? setting 'border-mode) + ; (eq? setting 'allow-look-around) + ; (eq? setting 'ocean-off) + ; (eq? setting 'music) + ; (eq? setting 'vibration) + ; (eq? setting 'auto-save) + ; (eq? setting 'allow-pause) + ; (eq? setting 'allow-progress) + ; (eq? setting 'play-hints) + ; (eq? setting 'movie) + ; (eq? setting 'talking) + ; (eq? setting 'spooling) + ; (eq? setting 'hint) + ; (eq? setting 'ambient) + ; ) + ; (set! argb (car args)) + ; ) + ; ((or (eq? setting 'bg-r) + ; (eq? setting 'bg-g) + ; (eq? setting 'bg-b) + ; (eq? setting 'bg-a) + ; (eq? setting 'bg-a-speed) + ; (eq? setting 'bg-a-force) + ; ) + ; (set! argf (car args)) + ; ) + ; ((or (eq? setting 'language) + ; ) + ; (set! argi (car args)) + ; ) + ; ((or (eq? setting 'sound-flava) + ; ) + ; (set! argi (car args)) + ; (set! argf (cadr args)) + ; ) + ; ((or (eq? setting 'process-mask) + ; (eq? setting 'common-page) + ; ) + ; (set! argb (car args)) + ; (set! argi (cadr args)) + ; ) + ; ((or (eq? setting 'sfx-volume) + ; (eq? setting 'music-volume) + ; (eq? setting 'ambient-volume) + ; (eq? setting 'dialog-volume) + ; (eq? setting 'sfx-volume-movie) + ; (eq? setting 'music-volume-movie) + ; (eq? setting 'ambient-volume-movie) + ; (eq? setting 'dialog-volume-hint) + ; ) + ; (set! argb (car args)) + ; (set! argf (cadr args)) + ; ) + (#t + (set! argb (car args)) + (set! argf (cadr args)) + (set! argi (caddr args)) + ) + ) + `(,func *setting-control* (with-pp pp) ,s ,argb ,argf ,argi) + ) + ) + +(defmacro add-setting! (s &rest args) + `(setting-control-func! add-setting ,s ,@args) + ) +(defmacro set-setting! (s &rest args) + `(setting-control-func! set-setting ,s ,@args) + ) +(defmacro remove-setting! (s) + `(remove-setting *setting-control* (with-pp pp) ,s) + ) + diff --git a/test/decompiler/reference/engine/ambient/ambient_REF.gc b/test/decompiler/reference/engine/ambient/ambient_REF.gc index 3aab5d8aa8..cd41513f5a 100644 --- a/test/decompiler/reference/engine/ambient/ambient_REF.gc +++ b/test/decompiler/reference/engine/ambient/ambient_REF.gc @@ -312,7 +312,7 @@ (set! (-> self total-off-time) 0) (set! (-> self last-time) (-> *display* base-frame-counter)) (set! *hint-semaphore* (the-as (pointer level-hint) (process->ppointer self))) - (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) + (add-setting! 'hint (process->ppointer self) 0.0 0) (set! (-> self voicebox) (the-as handle #f)) (let ((s5-1 (res-lump-struct arg2 'play-mode structure)) (a0-6 (the-as string ((method-of-type res-lump get-property-struct) @@ -355,12 +355,12 @@ (set! (-> self last-time) (-> *display* base-frame-counter)) (set! (-> self trans) arg1) (set! *hint-semaphore* (the-as (pointer level-hint) (process->ppointer self))) - (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) + (add-setting! 'hint (process->ppointer self) 0.0 0) (set! (-> self mode) arg2) (if (or (= arg2 'camera) (= arg2 'ambient) (= arg2 'stinger)) - (push-setting! *setting-control* self 'ambient (process->ppointer self) 0.0 0) + (add-setting! 'ambient (process->ppointer self) 0.0 0) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (set! (-> self event-hook) (lambda :behavior level-hint ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) @@ -490,9 +490,9 @@ (if (nonzero? (-> self sound-id)) (sound-stop (-> self sound-id)) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'dialog-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'dialog-volume) (if (= (ppointer->process *hint-semaphore*) self) (set! *hint-semaphore* (the-as (pointer level-hint) #f)) ) @@ -527,9 +527,9 @@ ) (cond ((= (current-str-id) s5-2) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! *setting-control* self 'dialog-volume 'rel (-> *setting-control* current dialog-volume-hint) 0) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'dialog-volume 'rel (-> *setting-control* current dialog-volume-hint) 0) (while (= (current-str-id) s5-2) (suspend) ) @@ -553,8 +553,8 @@ (if (nonzero? (-> self sound-id)) (sound-stop (-> self sound-id)) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) (if (= (ppointer->process *hint-semaphore*) self) (set! *hint-semaphore* (the-as (pointer level-hint) #f)) ) @@ -592,8 +592,8 @@ (cond ((= (current-str-id) (-> self sound-id)) (when (or (= (-> self mode) 'stinger) (= (-> self mode) 'camera)) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) ) (while (= (current-str-id) (-> self sound-id)) (suspend) @@ -612,7 +612,7 @@ (defstate level-hint-error (level-hint) :event (-> level-hint-normal event) :code (behavior ((arg0 string) (arg1 string)) - (clear-pending-settings-from-process *setting-control* self 'hint) + (remove-setting! 'hint) (let ((s4-0 (-> *display* base-frame-counter))) (until (>= (- (-> *display* base-frame-counter) s4-0) (seconds 1)) (when (and *debug-segment* (not (paused?)) (not (str-is-playing?)) (bottom-hud-hidden?)) diff --git a/test/decompiler/reference/engine/camera/pov-camera_REF.gc b/test/decompiler/reference/engine/camera/pov-camera_REF.gc index eba69e9efd..f5182f5819 100644 --- a/test/decompiler/reference/engine/camera/pov-camera_REF.gc +++ b/test/decompiler/reference/engine/camera/pov-camera_REF.gc @@ -105,13 +105,13 @@ (if (= (-> self anim-name type) string) (restore-load-state-and-cleanup *load-state*) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) (none) ) :code (behavior () - (push-setting! *setting-control* self 'music-volume 'rel (-> self music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> self sfx-volume-movie) 0) + (add-setting! 'music-volume 'rel (-> self music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> self sfx-volume-movie) 0) (cond ((= (-> self anim-name type) string) (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) diff --git a/test/decompiler/reference/engine/debug/anim-tester_REF.gc b/test/decompiler/reference/engine/debug/anim-tester_REF.gc index e8feb511c0..0f3446418f 100644 --- a/test/decompiler/reference/engine/debug/anim-tester_REF.gc +++ b/test/decompiler/reference/engine/debug/anim-tester_REF.gc @@ -2913,19 +2913,7 @@ ;; definition for function anim-tester-start (defun anim-tester-start () (anim-tester-stop) - (let ((gp-0 (get-process *16k-dead-pool* anim-tester #x4000))) - (set! *anim-tester* - (the-as (pointer anim-tester) - (when gp-0 - (let ((t9-2 (method-of-type anim-tester activate))) - (t9-2 (the-as anim-tester gp-0) *default-pool* 'anim-tester (the-as pointer #x70004000)) - ) - ((the-as (function process function none) run-function-in-process) gp-0 initialize-anim-tester) - (-> gp-0 ppointer) - ) - ) - ) - ) + (set! *anim-tester* (process-spawn anim-tester :init initialize-anim-tester :from *16k-dead-pool*)) (set! *camera-orbit-target* *anim-tester*) (send-event *camera* 'change-state cam-orbit 0) #f diff --git a/test/decompiler/reference/engine/game/collectables_REF.gc b/test/decompiler/reference/engine/game/collectables_REF.gc index 2a2d8170f5..ea73934441 100644 --- a/test/decompiler/reference/engine/game/collectables_REF.gc +++ b/test/decompiler/reference/engine/game/collectables_REF.gc @@ -1585,8 +1585,8 @@ ) ) ) - (push-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (add-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (logclear! (-> self mask) (process-mask actor-pause)) (go-virtual pickup #f (process->handle arg0)) ) @@ -1800,16 +1800,9 @@ (set! (-> self draw bounds w) 32768.0) (logior! (-> self skel status) (janim-status inited)) (send-event *target* 'blend-shape #t) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! - *setting-control* - self - 'ambient-volume - 'rel - (-> *setting-control* current ambient-volume-movie) - 0 - ) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'ambient-volume 'rel (-> *setting-control* current ambient-volume-movie) 0) (process-spawn othercam self 10 #f #t :to self) (auto-save-command 'auto-save 0 0 *default-pool*) (ja-play-spooled-anim @@ -1818,9 +1811,9 @@ (the-as art-joint-anim #f) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) (send-event *target* 'blend-shape #f) (send-event *target* 'end-mode) (send-event *camera* 'no-intro) diff --git a/test/decompiler/reference/engine/game/game-info_REF.gc b/test/decompiler/reference/engine/game/game-info_REF.gc index 48e4220ef5..37307d1008 100644 --- a/test/decompiler/reference/engine/game/game-info_REF.gc +++ b/test/decompiler/reference/engine/game/game-info_REF.gc @@ -240,9 +240,9 @@ ) ((= v1-65 'play) (when *target* - (set-setting! *setting-control* *target* 'allow-pause #f 0.0 0) - (set-setting! *setting-control* *target* 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting *setting-control* *target* 'allow-pause #f 0.0 0) + (set-setting *setting-control* *target* 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) ) (send-event (handle->process (-> *game-info* auto-save-proc)) 'die) (set! (-> *level* border?) #f) diff --git a/test/decompiler/reference/engine/game/game-save_REF.gc b/test/decompiler/reference/engine/game/game-save_REF.gc index 0d44314e13..f494d715f8 100644 --- a/test/decompiler/reference/engine/game/game-save_REF.gc +++ b/test/decompiler/reference/engine/game/game-save_REF.gc @@ -1709,13 +1709,13 @@ auto-save-post (go-virtual error (mc-status-code bad-version)) ) ) - (set-setting! *setting-control* self 'music-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'sfx-volume 'abs 0.0 0) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) (set! (-> *game-info* mode) 'play) (initialize! *game-info* 'game (-> self save) (the-as string #f)) (set-master-mode 'game) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask progress)) + (apply-settings *setting-control*) (dotimes (gp-1 15) (suspend) ) diff --git a/test/decompiler/reference/engine/game/generic-obs_REF.gc b/test/decompiler/reference/engine/game/generic-obs_REF.gc index 05201d6e36..bb247d9a28 100644 --- a/test/decompiler/reference/engine/game/generic-obs_REF.gc +++ b/test/decompiler/reference/engine/game/generic-obs_REF.gc @@ -1181,10 +1181,10 @@ (dummy-30 (-> self entity-override) (entity-perm-status bit-3) #t) ) (if (not (-> self border-value)) - (push-setting! *setting-control* self 'border-mode (-> self border-value) 0.0 0) + (add-setting! 'border-mode (-> self border-value) 0.0 0) ) - (push-setting! *setting-control* self 'process-mask 'set 0.0 (-> self mask-to-clear)) - (push-setting! *setting-control* self 'movie (process->ppointer self) 0.0 0) + (add-setting! 'process-mask 'set 0.0 (-> self mask-to-clear)) + (add-setting! 'movie (process->ppointer self) 0.0 0) (hide-hud-quick) (none) ) @@ -1207,7 +1207,7 @@ ) ) ) - (clear-pending-settings-from-process *setting-control* self 'process-mask) + (remove-setting! 'process-mask) (send-event *camera* 'clear-entity) (suspend) (suspend) diff --git a/test/decompiler/reference/engine/game/main_REF.gc b/test/decompiler/reference/engine/game/main_REF.gc index 9e3a8ffdf5..9b5332fc59 100644 --- a/test/decompiler/reference/engine/game/main_REF.gc +++ b/test/decompiler/reference/engine/game/main_REF.gc @@ -125,7 +125,7 @@ (hide-progress-screen) ) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) 0 (none) ) @@ -911,7 +911,7 @@ (set-blackout-frames (seconds 100)) (set! (-> *setting-control* default allow-pause) #f) (set! (-> *setting-control* default allow-progress) #f) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (set! (-> *setting-control* default sfx-volume) 0.0) (set! (-> *setting-control* default music-volume) 0.0) (set! (-> *setting-control* default dialog-volume) 0.0) @@ -970,7 +970,7 @@ (let ((disp *display*)) (dma-send-to-spr (the-as uint #x70000000) (the-as uint *terrain-context*) (the-as uint 0) #t) (set! *teleport* #t) - (update-per-frame-settings! *setting-control*) + (update *setting-control*) (init-time-of-day-context *time-of-day-context*) (display-sync disp) (swap-display disp) diff --git a/test/decompiler/reference/engine/game/settings-h_REF.gc b/test/decompiler/reference/engine/game/settings-h_REF.gc index 0782a75509..b96e193214 100644 --- a/test/decompiler/reference/engine/game/settings-h_REF.gc +++ b/test/decompiler/reference/engine/game/settings-h_REF.gc @@ -106,11 +106,11 @@ :flag-assert #xe00000278 (:methods (new (symbol type int) _type_ 0) - (push-setting! (_type_ process symbol object object object) none 9) - (set-setting! (_type_ process symbol symbol float int) none 10) - (clear-pending-settings-from-process (_type_ process symbol) none 11) - (copy-settings-from-target! (_type_) setting-data 12) - (update-per-frame-settings! (_type_) setting-data 13) + (add-setting (_type_ process symbol object object object) none 9) + (set-setting (_type_ process symbol object object object) none 10) + (remove-setting (_type_ process symbol) none 11) + (apply-settings (_type_) setting-data 12) + (update (_type_) setting-data 13) ) ) diff --git a/test/decompiler/reference/engine/game/settings_REF.gc b/test/decompiler/reference/engine/game/settings_REF.gc index 7d884ff617..6161724b93 100644 --- a/test/decompiler/reference/engine/game/settings_REF.gc +++ b/test/decompiler/reference/engine/game/settings_REF.gc @@ -194,7 +194,7 @@ ;; definition for method 9 of type setting-control ;; INFO: Return type mismatch int vs none. -(defmethod push-setting! setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) +(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4) 0 (none) @@ -202,8 +202,8 @@ ;; definition for method 10 of type setting-control ;; INFO: Return type mismatch int vs none. -(defmethod set-setting! setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 symbol) (arg3 float) (arg4 int)) - (clear-pending-settings-from-process obj arg0 arg1) +(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) @@ -211,7 +211,7 @@ ;; definition for method 11 of type setting-control ;; INFO: Return type mismatch int vs none. -(defmethod clear-pending-settings-from-process setting-control ((obj setting-control) (arg0 process) (arg1 symbol)) +(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)) @@ -231,7 +231,7 @@ ) ;; definition for method 12 of type setting-control -(defmethod copy-settings-from-target! setting-control ((obj setting-control)) +(defmethod apply-settings setting-control ((obj setting-control)) (let ((gp-0 (-> obj current))) (let ((s5-0 (-> obj target))) (mem-copy! (the-as pointer s5-0) (the-as pointer (-> obj default)) 196) @@ -263,8 +263,8 @@ ) ;; definition for method 13 of type setting-control -(defmethod update-per-frame-settings! setting-control ((obj setting-control)) - (copy-settings-from-target! obj) +(defmethod update setting-control ((obj setting-control)) + (apply-settings obj) (let ((gp-0 (-> obj current))) (let ((s5-1 (-> obj target))) (when *sound-player-enable* diff --git a/test/decompiler/reference/engine/game/task/process-taskable_REF.gc b/test/decompiler/reference/engine/game/task/process-taskable_REF.gc index d85c894325..de85b7022c 100644 --- a/test/decompiler/reference/engine/game/task/process-taskable_REF.gc +++ b/test/decompiler/reference/engine/game/task/process-taskable_REF.gc @@ -152,56 +152,54 @@ ;; definition for method 46 of type process-taskable ;; INFO: Return type mismatch int vs none. (defmethod dummy-46 process-taskable ((obj process-taskable)) - (with-pp - (when (nonzero? (-> obj sound-flava)) - (let ((s5-1 (vector-! - (new 'stack-no-clear 'vector) - (target-pos 0) - (the-as vector (-> obj root-override root-prim prim-core)) - ) + (when (nonzero? (-> obj sound-flava)) + (let ((s5-1 (vector-! + (new 'stack-no-clear 'vector) + (target-pos 0) + (the-as vector (-> obj root-override root-prim prim-core)) ) - ) - (set! (-> s5-1 y) (* 4.0 (-> s5-1 y))) - (cond - ((< (vector-length s5-1) 102400.0) - (when (not (-> obj have-flava)) - (set! (-> obj have-flava) #t) - (set-setting! *setting-control* pp 'sound-flava #f 20.0 (the-as int (-> obj sound-flava))) - ) - ) - ((-> obj have-flava) - (clear-pending-settings-from-process *setting-control* pp 'sound-flava) - (set! (-> obj have-flava) #f) - ) + ) ) + (set! (-> s5-1 y) (* 4.0 (-> s5-1 y))) + (cond + ((< (vector-length s5-1) 102400.0) + (when (not (-> obj have-flava)) + (set! (-> obj have-flava) #t) + (set-setting! 'sound-flava #f 20.0 (-> obj sound-flava)) + ) + ) + ((-> obj have-flava) + (remove-setting! 'sound-flava) + (set! (-> obj have-flava) #f) + ) ) ) - (when (-> obj music) - (let ((s5-3 (vector-! - (new 'stack-no-clear 'vector) - (target-pos 0) - (the-as vector (-> obj root-override root-prim prim-core)) - ) - ) - ) - (set! (-> s5-3 y) (* 4.0 (-> s5-3 y))) - (cond - ((< (vector-length s5-3) 102400.0) - (when (not (-> obj have-music)) - (set! (-> obj have-music) #t) - (set-setting! *setting-control* pp 'music (-> obj music) 0.0 0) - ) - ) - ((-> obj have-music) - (clear-pending-settings-from-process *setting-control* pp 'music) - (set! (-> obj have-music) #f) - ) - ) - ) - ) - 0 - (none) ) + (when (-> obj music) + (let ((s5-3 (vector-! + (new 'stack-no-clear 'vector) + (target-pos 0) + (the-as vector (-> obj root-override root-prim prim-core)) + ) + ) + ) + (set! (-> s5-3 y) (* 4.0 (-> s5-3 y))) + (cond + ((< (vector-length s5-3) 102400.0) + (when (not (-> obj have-music)) + (set! (-> obj have-music) #t) + (set-setting! 'music (-> obj music) 0.0 0) + ) + ) + ((-> obj have-music) + (remove-setting! 'music) + (set! (-> obj have-music) #f) + ) + ) + ) + ) + 0 + (none) ) ;; definition for method 31 of type process-taskable @@ -454,16 +452,9 @@ (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) (send-event *target* 'blend-shape #t) ) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! - *setting-control* - self - 'ambient-volume - 'rel - (-> *setting-control* current ambient-volume-movie) - 0 - ) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'ambient-volume 'rel (-> *setting-control* current ambient-volume-movie) 0) (if (-> self blend-on-exit) (set! (-> self blend-on-exit) arg0) ) @@ -481,9 +472,9 @@ (the-as (function process-drawable symbol) false-func) ) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) (send-event *target* 'blend-shape #f) ) (else @@ -666,8 +657,8 @@ (defbehavior process-taskable-clean-up-after-talking process-taskable () (logclear! (-> self draw status) (draw-status hidden)) (logclear! (-> self skel status) (janim-status inited)) - (clear-pending-settings-from-process *setting-control* self 'border-mode) - (clear-pending-settings-from-process *setting-control* self 'talking) + (remove-setting! 'border-mode) + (remove-setting! 'talking) (none) ) @@ -938,9 +929,9 @@ (logior! (-> self skel status) (janim-status inited)) (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) - (set-setting! *setting-control* self 'border-mode #f 0.0 0) - (set-setting! *setting-control* self 'talking (the-as symbol (process->ppointer self)) 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'border-mode #f 0.0 0) + (set-setting! 'talking (process->ppointer self) 0.0 0) + (apply-settings *setting-control*) ) ) (none) @@ -1235,10 +1226,10 @@ (('logo) ) (else - (push-setting! *setting-control* self 'process-mask 'set 0.0 (-> self mask-to-clear)) - (push-setting! *setting-control* self 'movie (process->ppointer self) 0.0 0) + (add-setting! 'process-mask 'set 0.0 (-> self mask-to-clear)) + (add-setting! 'movie (process->ppointer self) 0.0 0) (if (not (-> self border-value)) - (push-setting! *setting-control* self 'border-mode (-> self border-value) 0.0 0) + (add-setting! 'border-mode (-> self border-value) 0.0 0) ) ) ) @@ -1252,12 +1243,12 @@ (vector-normalize-copy! (-> self old-mat-z) (-> v1-19 vector 2) -1.0) ) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (none) ) :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (none) ) :code (behavior () diff --git a/test/decompiler/reference/engine/game/voicebox_REF.gc b/test/decompiler/reference/engine/game/voicebox_REF.gc index 7c446cbb15..a521272b00 100644 --- a/test/decompiler/reference/engine/game/voicebox_REF.gc +++ b/test/decompiler/reference/engine/game/voicebox_REF.gc @@ -149,7 +149,7 @@ (none) ) :code (behavior () - (set-setting! *setting-control* self 'sound-flava #f 20.0 6) + (set-setting! 'sound-flava #f 20.0 (music-flava assistant)) (if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9))) (send-event (ppointer->process (-> self parent-override)) @@ -198,7 +198,7 @@ :virtual #t :trans voicebox-track :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self seeker target) 1.0) (while (and (< (-> self blend) 0.9999) diff --git a/test/decompiler/reference/engine/level/level_REF.gc b/test/decompiler/reference/engine/level/level_REF.gc index 7a15ccf1c1..2b41c115a8 100644 --- a/test/decompiler/reference/engine/level/level_REF.gc +++ b/test/decompiler/reference/engine/level/level_REF.gc @@ -1500,7 +1500,7 @@ (defmethod level-update level-group ((obj level-group)) (camera-pos) (new 'static 'boxed-array :type symbol :length 0 :allocated-length 2) - (update-per-frame-settings! *setting-control*) + (update *setting-control*) (update *art-control* #t) (clear-rec *art-control*) (dotimes (s5-0 2) diff --git a/test/decompiler/reference/engine/level/load-boundary_REF.gc b/test/decompiler/reference/engine/level/load-boundary_REF.gc index f09d65911e..d7744ed144 100644 --- a/test/decompiler/reference/engine/level/load-boundary_REF.gc +++ b/test/decompiler/reference/engine/level/load-boundary_REF.gc @@ -2062,17 +2062,10 @@ ) ) ((= v1-4 'setting-reset) - (set-setting! - *setting-control* - pp - (the-as symbol (command-get-param (car gp-0) #f)) - (the-as symbol (command-get-param (car (cdr gp-0)) #f)) - 0.0 - 0 - ) + (set-setting! (the-as symbol (command-get-param (car gp-0) #f)) (command-get-param (car (cdr gp-0)) #f) 0.0 0) ) ((= v1-4 'setting-unset) - (clear-pending-settings-from-process *setting-control* pp (the-as symbol (command-get-param (car gp-0) #f))) + (remove-setting! (the-as symbol (command-get-param (car gp-0) #f))) ) ((= v1-4 'blackout) (set-blackout-frames (the-as time-frame (the int (* 5.0000005 (the float (command-get-int (car gp-0) 0)))))) diff --git a/test/decompiler/reference/engine/load/loader_REF.gc b/test/decompiler/reference/engine/load/loader_REF.gc index c12c753e40..45a74b83ed 100644 --- a/test/decompiler/reference/engine/load/loader_REF.gc +++ b/test/decompiler/reference/engine/load/loader_REF.gc @@ -824,11 +824,11 @@ (set! sv-56 0) (set! spool-sound (new-sound-id)) (backup-load-state-and-set-cmds *load-state* (-> arg0 command-list)) - (set-setting! *setting-control* self 'spooling (the-as symbol (process->ppointer self)) 0.0 0) + (set-setting! 'spooling (process->ppointer self) 0.0 0) (logior! (-> self skel status) (janim-status inited drawn done)) (kill-current-level-hint '() '() 'die) (level-hint-surpress!) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (when (or (handle->process (-> *art-control* spool-lock)) (!= *master-mode* 'game)) (cond (arg1 @@ -963,7 +963,7 @@ (if (zero? (logand (-> self skel status) (janim-status inited))) (logclear! (-> self skel status) (janim-status inited)) ) - (clear-pending-settings-from-process *setting-control* self 'spooling) + (remove-setting! 'spooling) (cond ((and arg1 (>= arg2 0)) (ja-channel-push! 1 (seconds 0.1)) diff --git a/test/decompiler/reference/engine/sound/gsound_REF.gc b/test/decompiler/reference/engine/sound/gsound_REF.gc index c524ece89f..e05e41167d 100644 --- a/test/decompiler/reference/engine/sound/gsound_REF.gc +++ b/test/decompiler/reference/engine/sound/gsound_REF.gc @@ -593,12 +593,10 @@ ;; definition for function sound-volume-off (defun sound-volume-off () - (with-pp - (set-setting! *setting-control* pp 'music-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'sfx-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'ambient-volume 'abs 0.0 0) - 0 - ) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + 0 ) ;; definition for symbol *ambient-spec*, type sound-spec diff --git a/test/decompiler/reference/engine/target/logic-target_REF.gc b/test/decompiler/reference/engine/target/logic-target_REF.gc index 2b804b7788..f971de318b 100644 --- a/test/decompiler/reference/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/engine/target/logic-target_REF.gc @@ -1985,9 +1985,9 @@ ;; INFO: Return type mismatch object vs none. ;; Used lq/sq (defbehavior init-target target ((arg0 continue-point)) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (if (not arg0) (set! arg0 (get-or-create-continue! *game-info*)) ) diff --git a/test/decompiler/reference/engine/target/target-death_REF.gc b/test/decompiler/reference/engine/target/target-death_REF.gc index c824283cd8..93adfbfe34 100644 --- a/test/decompiler/reference/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/engine/target/target-death_REF.gc @@ -49,13 +49,13 @@ (set! (-> *level* border?) (-> *level* play?)) (set! (-> *setting-control* default border-mode) (-> *level* play?)) ) - (clear-pending-settings-from-process *setting-control* self 'allow-pause) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) - (clear-pending-settings-from-process *setting-control* self 'bg-a) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'allow-pause) + (remove-setting! 'allow-progress) + (remove-setting! 'bg-a) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (remove-setting! 'music) (none) ) :code (behavior ((arg0 continue-point)) @@ -63,14 +63,14 @@ (if (-> *art-control* reserve-buffer) (reserve-free *art-control* (-> *art-control* reserve-buffer heap)) ) - (push-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (add-setting! 'bg-a 'abs 1.0 0) (set! (-> *setting-control* current bg-a) 1.0) - (set-setting! *setting-control* self 'sfx-volume 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* self 'ambient-volume 'abs (the-as float 0.0) 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) (let ((v1-20 (lookup-level-info (-> arg0 level)))) (when v1-20 - (set-setting! *setting-control* self 'music (-> v1-20 music-bank) (the-as float 0.0) 0) - (set-setting! *setting-control* self 'music-volume 'abs (the-as float 0.0) 0) + (set-setting! 'music (-> v1-20 music-bank) 0.0 0) + (set-setting! 'music-volume 'abs 0.0 0) ) ) (set! (-> *level* border?) #f) @@ -115,7 +115,7 @@ (= (-> *setting-control* current music) (-> v1-52 music-bank)) (zero? (logand (-> arg0 flags) (continue-flags sage-intro title))) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) + (remove-setting! 'music-volume) ) ) (suspend) @@ -1056,8 +1056,8 @@ :exit (behavior () (logclear! (-> self state-flags) (state-flags sf03 sf15)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'process-mask) + (remove-setting! 'allow-progress) (restore-collide-with-as (-> self control)) (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1)) (set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max)) @@ -1072,8 +1072,8 @@ ) (set! (-> self neck flex-blend) 0.0) (target-timed-invulnerable-off self) - (set-setting! *setting-control* self 'process-mask 'set (the-as float 0.0) #x14a0000) - (copy-settings-from-target! *setting-control*) + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) (set! (-> self control transv quad) (the-as uint128 0)) (logior! (-> self state-flags) (state-flags sf15)) (case arg0 @@ -1319,7 +1319,7 @@ (-> *death-spool-array* (death-movie-remap (-> *game-info* death-movie-tick) (-> *death-spool-array* length))) ) ) - (set-setting! *setting-control* self 'allow-progress #f (the-as float 0.0) 0) + (set-setting! 'allow-progress #f 0.0 0) (target-death-anim gp-18) (when (and (< (rand-vu-int-count (-> *game-info* death-movie-tick)) (* (-> *death-spool-array* length) 2)) (zero? (logand (-> self water flags) (water-flags wt09))) diff --git a/test/decompiler/reference/engine/target/target2_REF.gc b/test/decompiler/reference/engine/target/target2_REF.gc index 15396b2c4c..36d8d19b44 100644 --- a/test/decompiler/reference/engine/target/target2_REF.gc +++ b/test/decompiler/reference/engine/target/target2_REF.gc @@ -24,7 +24,7 @@ (until (ja-done? 0) (TODO-RENAME-9 (-> self align)) (TODO-RENAME-10 (-> self align) 4 (the-as float 1.0) (the-as float 1.0) (the-as float 1.0)) - (send-event *camera* 'joystick (-> (new 'static 'array int32 1 0) 0) (-> (new 'static 'array int32 1 0) 0)) + (send-event *camera* 'joystick 0.0 0.0) (suspend) (ja :num! (seek!)) ) @@ -311,7 +311,7 @@ (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf)) ) ) - (set-setting! *setting-control* self 'common-page 'set (the-as float (-> (new 'static 'array int32 1 0) 0)) 1) + (set-setting! 'common-page 'set 0.0 1) (suspend) (go hud-coming-in) (suspend) @@ -823,7 +823,7 @@ (none) ) :code (behavior () - (set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0))) + (set-forward-vel (the-as float 0.0)) (let ((gp-0 0)) (while (zero? (logand (-> self control status) (cshape-moving-flags onsurf))) (target-falling-anim-trans) @@ -954,7 +954,7 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self control unknown-surface00) *pole-mods*) (logior! (-> self control root-prim prim-core action) (collide-action ca-8)) - (target-collide-set! 'pole (the-as float (-> (new 'static 'array int32 1 0) 0))) + (target-collide-set! 'pole (the-as float 0.0)) (set! (-> self control unknown-vector102 quad) (-> self control transv quad)) (set! (-> self control transv quad) (the-as uint128 0)) (send-event *camera* 'ease-in) @@ -962,7 +962,7 @@ (none) ) :exit (behavior () - (target-collide-set! 'normal (the-as float (-> (new 'static 'array int32 1 0) 0))) + (target-collide-set! 'normal (the-as float 0.0)) (logclear! (-> self control root-prim prim-core action) (collide-action ca-8)) (set! (-> self control unknown-handle10) (the-as handle #f)) (none) @@ -1630,7 +1630,7 @@ ) :frame-num (ja-aframe (the-as float (if (= arg1 (-> *FACT-bank* eco-full-inc)) - (-> (new 'static 'array int32 1 0) 0) + 0.0 6.0 ) ) @@ -1850,7 +1850,7 @@ (f28-0 0.0) (f26-0 (lerp-scale (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (-> self control unknown-float01) (the-as float 16384.0) (the-as float 32768.0) @@ -1892,7 +1892,7 @@ ) (let* ((f0-30 (- (-> self water height) (-> self control trans y))) (f24-1 (lerp-scale - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 1.0) f0-30 (lerp (-> self water wade-height) (-> self water swim-height) (the-as float 0.25)) @@ -1912,7 +1912,7 @@ f26-0 (lerp-scale (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (-> self control unknown-float01) (the-as float 16384.0) (the-as float 32768.0) @@ -1926,7 +1926,7 @@ ) ) ) - (ja :chan 5 :frame-interp (lerp f26-0 (the-as float (-> (new 'static 'array int32 1 0) 0)) f24-1)) + (ja :chan 5 :frame-interp (lerp f26-0 (the-as float 0.0) f24-1)) ) (ja :chan 1 :num! (chan 0)) (ja :chan 2 :num! (chan 0)) @@ -1996,11 +1996,7 @@ (set! (-> self control unknown-float00) (fabs (-> self control unknown-float130))) (if (= (-> self next-state name) 'target-swim-down) (seek! (-> self control unknown-float131) (the-as float -6144.0) (* 4096.0 (-> *display* seconds-per-frame))) - (seek! - (-> self control unknown-float131) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (* 2048.0 (-> *display* seconds-per-frame)) - ) + (seek! (-> self control unknown-float131) (the-as float 0.0) (* 2048.0 (-> *display* seconds-per-frame))) ) (let ((f0-20 (-> self control unknown-float131))) (set! (-> self control unknown-vector11 y) f0-20) @@ -2081,12 +2077,7 @@ ) (go target-swim-walk) ) - (target-swim-tilt - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 2.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 1.0) - ) + (target-swim-tilt (the-as float 0.0) (the-as float 2.0) (the-as float 0.0) (the-as float 1.0)) (none) ) :code (behavior () @@ -2203,12 +2194,7 @@ (set! (-> self control unknown-uint20) (the-as uint (-> *display* base-frame-counter))) ) ) - (target-swim-tilt - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 2.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 1.0) - ) + (target-swim-tilt (the-as float 0.0) (the-as float 2.0) (the-as float 0.0) (the-as float 1.0)) (none) ) :code (behavior () @@ -2309,23 +2295,13 @@ ((>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.1)) (set! (-> self control unknown-surface00) *dive-mods*) (if (= (-> self next-state name) 'target-swim-down) - (target-swim-tilt - (the-as float -0.9) - (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 0.5) - ) + (target-swim-tilt (the-as float -0.9) (the-as float 1.0) (the-as float 0.0) (the-as float 0.5)) ) ) (else (set! (-> self control unknown-surface00) *dive-bottom-mods*) (if (or (= (-> self next-state name) 'target-swim-down) (= (-> self next-state name) 'target-swim-stance)) - (target-swim-tilt - (the-as float (-> (new 'static 'array int32 1 0) 0)) - (the-as float 2.0) - (the-as float -1.0) - (the-as float 1.0) - ) + (target-swim-tilt (the-as float 0.0) (the-as float 2.0) (the-as float -1.0) (the-as float 1.0)) ) ) ) @@ -2406,9 +2382,7 @@ (f26-0 f28-0) (f24-1 (+ f24-0 f30-0)) ) - (set! f30-0 - (seek f30-0 (the-as float (-> (new 'static 'array int32 1 0) 0)) (* 32768.0 (-> *display* seconds-per-frame))) - ) + (set! f30-0 (seek f30-0 (the-as float 0.0) (* 32768.0 (-> *display* seconds-per-frame)))) (vector+! (-> self control transv) (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f24-1) @@ -2421,7 +2395,7 @@ (the-as float 0.4) (the-as float 1.0) (vector-length (-> self control transv)) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 16384.0) ) ) @@ -2467,11 +2441,11 @@ (target-swim-tilt (the-as float (if (< 8192.0 (-> self water swim-depth)) 0.5 - (-> (new 'static 'array int32 1 0) 0) + 0.0 ) ) (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 0.1) ) (if (and (zero? (logand (-> self water flags) (water-flags wt12))) @@ -2500,11 +2474,11 @@ (target-swim-tilt (the-as float (if (< 8192.0 (-> self water swim-depth)) 0.3 - (-> (new 'static 'array int32 1 0) 0) + 0.0 ) ) (the-as float 1.0) - (the-as float (-> (new 'static 'array int32 1 0) 0)) + (the-as float 0.0) (the-as float 0.1) ) (if (zero? (logand (-> self water flags) (water-flags wt12))) @@ -2611,7 +2585,7 @@ :enter (behavior ((arg0 float)) (set! (-> self control unknown-dword31) 0) (set! (-> self control unknown-dword33) 0) - (set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0))) + (set-forward-vel (the-as float 0.0)) (set! (-> self control unknown-surface00) *walk-mods*) (none) ) @@ -2672,7 +2646,7 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self control unknown-surface00) *turn-around-mods*) (ja-channel-push! 1 (seconds 0.15)) - (set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0))) + (set-forward-vel (the-as float 0.0)) (ja-no-eval :group! eichar-duck-stance-ja :num! (seek! (ja-aframe (the-as float 15.0) 0) 3.0) :frame-num 0.0) (until (ja-done? 0) (suspend) @@ -2699,10 +2673,7 @@ ((and sv-44 (< (- (-> (the-as target s4-0) control trans y) (-> (the-as target s4-0) control unknown-vector52 y)) arg2) ) - (vector-xz-normalize! - (-> (the-as target s4-0) control transv) - (the-as float (-> (new 'static 'array int32 1 0) 0)) - ) + (vector-xz-normalize! (-> (the-as target s4-0) control transv) (the-as float 0.0)) (case (-> (the-as target s4-0) current-level name) (('jungleb) (let ((v1-16 (vector-! (new-stack-vector0) (-> (the-as target s4-0) control trans) sv-40))) diff --git a/test/decompiler/reference/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/engine/ui/progress/progress_REF.gc index 8ccea39449..cd0b39e847 100644 --- a/test/decompiler/reference/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/engine/ui/progress/progress_REF.gc @@ -857,7 +857,7 @@ ;; INFO: Return type mismatch int vs none. (defun deactivate-progress () (when (and *progress-process* (= (-> *progress-process* 0 next-state name) 'progress-gone)) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (dotimes (gp-0 (-> *progress-process* 0 nb-of-particles)) (kill-and-free-particles (-> *progress-process* 0 particles gp-0 part)) (set! (-> *progress-process* 0 particles gp-0 part matrix) -1) @@ -1103,7 +1103,7 @@ (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf)) ) ) - (set-setting! *setting-control* self 'common-page 'set (the-as float 0.0) 1) + (set-setting! 'common-page 'set 0.0 1) (suspend) (go progress-coming-in) ) @@ -1116,8 +1116,8 @@ ;; failed to figure out what this is: (defstate progress-gone (progress) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (logior! (-> self mask) (process-mask sleep)) (suspend) 0 @@ -2417,8 +2417,8 @@ :enter (behavior () (sound-group-pause (the-as uint 255)) (logclear! (-> *setting-control* default process-mask) (process-mask pause menu)) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask progress)) + (apply-settings *setting-control*) (sound-play-by-name (static-sound-name "select-menu") (new-sound-id) 1024 0 0 1 #t) (set-blackout-frames 0) (set! *pause-lock* #f) diff --git a/test/decompiler/reference/levels/common/battlecontroller_REF.gc b/test/decompiler/reference/levels/common/battlecontroller_REF.gc index 19b94bd94c..2cf47f62e1 100644 --- a/test/decompiler/reference/levels/common/battlecontroller_REF.gc +++ b/test/decompiler/reference/levels/common/battlecontroller_REF.gc @@ -391,7 +391,7 @@ battlecontroller-default-event-handler ;; definition for function battlecontroller-battle-begin ;; INFO: Return type mismatch int vs none. (defbehavior battlecontroller-battle-begin battlecontroller () - (set-setting! *setting-control* self 'music 'danger 0.0 0) + (set-setting! 'music 'danger 0.0 0) (let ((gp-0 (entity-actor-count (-> self entity) 'kill-actor))) (dotimes (s5-0 gp-0) (let ((v1-2 (entity-actor-lookup (-> self entity) 'kill-actor s5-0))) @@ -428,7 +428,7 @@ battlecontroller-default-event-handler ;; definition for function battlecontroller-off ;; INFO: Return type mismatch int vs none. (defbehavior battlecontroller-off battlecontroller () - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (let ((gp-0 (entity-actor-count (-> self entity) 'kill-actor))) (dotimes (s5-0 gp-0) (let ((v1-2 (entity-actor-lookup (-> self entity) 'kill-actor s5-0))) diff --git a/test/decompiler/reference/levels/common/plat-button_REF.gc b/test/decompiler/reference/levels/common/plat-button_REF.gc index 6d4db629ca..471539f5ef 100644 --- a/test/decompiler/reference/levels/common/plat-button_REF.gc +++ b/test/decompiler/reference/levels/common/plat-button_REF.gc @@ -204,12 +204,12 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (process-entity-status! self (entity-perm-status bit-3) #t) (plat-button-camera-on) - (set-setting! *setting-control* self 'allow-look-around #f 0.0 0) + (set-setting! 'allow-look-around #f 0.0 0) (none) ) :exit (behavior () (plat-button-camera-off) - (clear-pending-settings-from-process *setting-control* self 'allow-look-around) + (remove-setting! 'allow-look-around) (none) ) :trans (behavior () @@ -279,12 +279,12 @@ (set! (-> self state-time) (-> *display* base-frame-counter)) (process-entity-status! self (entity-perm-status bit-3) #t) (plat-button-camera-on) - (set-setting! *setting-control* self 'allow-look-around #f 0.0 0) + (set-setting! 'allow-look-around #f 0.0 0) (none) ) :exit (behavior () (plat-button-camera-off) - (clear-pending-settings-from-process *setting-control* self 'allow-look-around) + (remove-setting! 'allow-look-around) (none) ) :trans (behavior () diff --git a/test/decompiler/reference/levels/demo/demo-obs_REF.gc b/test/decompiler/reference/levels/demo/demo-obs_REF.gc index 2c58e03adb..93bfa22b37 100644 --- a/test/decompiler/reference/levels/demo/demo-obs_REF.gc +++ b/test/decompiler/reference/levels/demo/demo-obs_REF.gc @@ -8,9 +8,9 @@ (if *time-of-day-proc* (set! (-> *time-of-day-proc* 0 hour) 12) ) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (ja-channel-set! 0) (ja-post) (load-state-want-levels 'demo 'village1) diff --git a/test/decompiler/reference/levels/demo/static-screen_REF.gc b/test/decompiler/reference/levels/demo/static-screen_REF.gc index e672208814..8ca811c2b1 100644 --- a/test/decompiler/reference/levels/demo/static-screen_REF.gc +++ b/test/decompiler/reference/levels/demo/static-screen_REF.gc @@ -117,7 +117,7 @@ :enter (behavior ((arg0 int) (arg1 time-frame) (arg2 symbol)) (set! (-> *setting-control* current bg-a) 1.0) (set! (-> *setting-control* default bg-a) 0.0) - (push-setting! *setting-control* self 'common-page 'set 0.0 (ash 1 (+ arg0 1))) + (add-setting! 'common-page 'set 0.0 (ash 1 (+ arg0 1))) (none) ) :trans (behavior () @@ -143,7 +143,7 @@ (while (!= (-> *setting-control* current bg-a) (-> *setting-control* default bg-a)) (suspend) ) - (clear-pending-settings-from-process *setting-control* self 'common-page) + (remove-setting! 'common-page) (suspend) 0 (none) diff --git a/test/decompiler/reference/levels/finalboss/final-door_REF.gc b/test/decompiler/reference/levels/finalboss/final-door_REF.gc index b200fc3e7e..f53b5017b0 100644 --- a/test/decompiler/reference/levels/finalboss/final-door_REF.gc +++ b/test/decompiler/reference/levels/finalboss/final-door_REF.gc @@ -389,14 +389,14 @@ (send-event *camera* 'change-to-entity-by-name "camera-403") (set! (-> self control unknown-surface00) *empty-mods*) (logior! (-> self state-flags) (state-flags sf04 sf08)) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (none) ) :exit (behavior () (send-event *camera* 'change-state *camera-base-mode* (seconds 0.2)) (logclear! (-> self state-flags) (state-flags sf04 sf08)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (none) ) :trans (behavior () diff --git a/test/decompiler/reference/levels/finalboss/robotboss_REF.gc b/test/decompiler/reference/levels/finalboss/robotboss_REF.gc index acefe0b4f7..8fcc22a366 100644 --- a/test/decompiler/reference/levels/finalboss/robotboss_REF.gc +++ b/test/decompiler/reference/levels/finalboss/robotboss_REF.gc @@ -1815,7 +1815,7 @@ (set! (-> self loc-t-start) (-> *display* game-frame-counter)) (set! (-> self loc-t-duration) (seconds 3)) (set! (-> self desired-pool-y) -22528.0) - (set-setting! *setting-control* self 'sound-flava #f (the-as float 40.0) 48) + (set-setting! 'sound-flava #f 40.0 (music-flava finalboss-end)) (none) ) :trans (behavior () @@ -2230,7 +2230,7 @@ (set! (-> self loc-t-duration) (seconds 3)) (set! (-> self desired-pool-y) -26624.0) (play-ambient (-> self ambient) "GOL-AM01" #t (the-as vector #f)) - (set-setting! *setting-control* self 'sound-flava #f (the-as float 40.0) 47) + (set-setting! 'sound-flava #f 40.0 (music-flava finalboss-middle)) (none) ) :trans (behavior () diff --git a/test/decompiler/reference/levels/finalboss/sage-finalboss_REF.gc b/test/decompiler/reference/levels/finalboss/sage-finalboss_REF.gc index 7bf62e17f3..751e7ec653 100644 --- a/test/decompiler/reference/levels/finalboss/sage-finalboss_REF.gc +++ b/test/decompiler/reference/levels/finalboss/sage-finalboss_REF.gc @@ -363,243 +363,241 @@ ;; definition for method 32 of type sage-finalboss ;; Used lq/sq (defmethod play-anim! sage-finalboss ((obj sage-finalboss) (arg0 symbol)) - (with-pp - (case (current-status (-> obj tasks)) - (((task-status unknown)) - (when arg0 - (close-current! (-> obj tasks)) - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) - ) - (new 'static 'spool-anim - :name "green-sagecage-daxter-sacrifice" - :index 8 - :parts 6 - :command-list '((1 blackout 0) (236 joint "cameraB") (439 joint "camera")) - ) + (case (current-status (-> obj tasks)) + (((task-status unknown)) + (when arg0 + (close-current! (-> obj tasks)) + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) ) - (((task-status need-introduction)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) - (close-current! (-> obj tasks)) - (set! (-> obj jak-white) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *jak-white-sg* #f :to obj)) - ) - (send-event - (handle->process (-> obj jak-white)) - 'eval - (lambda :behavior sage-finalboss () (set-vector! (-> self draw color-emissive) 0.5 0.5 0.5 0.0) (none)) - ) - (send-event (handle->process (-> obj jak-white)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj jak-white)) 'origin-joint-index 3) - (send-event (handle->process (-> obj jak-white)) 'blend-shape #t) - (set! (-> obj robotboss) - (ppointer->handle - (manipy-spawn (-> obj root-override trans) (-> obj entity) *robotboss-cinematic-sg* #f :to obj) - ) - ) - (send-event (handle->process (-> obj robotboss)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj robotboss)) 'origin-joint-index 3) - (let ((v1-67 (handle->process (-> obj robotboss)))) - (if (the-as manipy v1-67) - (set! (-> (the-as manipy v1-67) draw bounds w) 2048000.0) - ) - ) - (set! (-> obj silodoor) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *silodoor-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj silodoor)) 'anim-mode 'clone-anim) - (let ((v1-84 (handle->process (-> obj silodoor)))) - (if (the-as manipy v1-84) - (set! (-> (the-as silodoor v1-84) draw bounds w) 2048000.0) - ) - ) - (send-event (process-by-name "silodoor-5" *active-pool*) 'hide) - (set-setting! *setting-control* pp 'music #f 0.0 0) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) + (new 'static 'spool-anim + :name "green-sagecage-daxter-sacrifice" + :index 8 + :parts 6 + :command-list '((1 blackout 0) (236 joint "cameraB") (439 joint "camera")) + ) + ) + (((task-status need-introduction)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) + (close-current! (-> obj tasks)) + (set! (-> obj jak-white) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *jak-white-sg* #f :to obj)) + ) + (send-event + (handle->process (-> obj jak-white)) + 'eval + (lambda :behavior sage-finalboss () (set-vector! (-> self draw color-emissive) 0.5 0.5 0.5 0.0) (none)) ) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-a" - :index 9 - :parts 8 - :command-list '((0 send-event self activate-particle 0) - (0 send-event self activate-particle 1) - (0 send-event self activate-particle 7) - (1 blackout 0) - (61 joint "cameraB") - (71 send-event self activate-particle 2) - (156 joint "camera") - (216 joint "cameraB") - (259 send-event self deactivate-particle 2) - (259 send-event self activate-particle 3) - (268 send-event self activate-particle 4) - (270 send-event self deactivate-particle 3) - (270 send-event self deactivate-particle 0) - (270 send-event self deactivate-particle 1) - (271 joint "camera") - (269 send-event self activate-particle 5) - (272 send-event self flash) - (272 eval (lambda :behavior sage-finalboss - () - (let ((a0-1 (get-task-control (game-task finalboss-movies)))) - (save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0) - ) - (none) + (send-event (handle->process (-> obj jak-white)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj jak-white)) 'origin-joint-index 3) + (send-event (handle->process (-> obj jak-white)) 'blend-shape #t) + (set! (-> obj robotboss) + (ppointer->handle + (manipy-spawn (-> obj root-override trans) (-> obj entity) *robotboss-cinematic-sg* #f :to obj) + ) + ) + (send-event (handle->process (-> obj robotboss)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj robotboss)) 'origin-joint-index 3) + (let ((v1-67 (handle->process (-> obj robotboss)))) + (if (the-as manipy v1-67) + (set! (-> (the-as manipy v1-67) draw bounds w) 2048000.0) + ) + ) + (set! (-> obj silodoor) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *silodoor-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj silodoor)) 'anim-mode 'clone-anim) + (let ((v1-84 (handle->process (-> obj silodoor)))) + (if (the-as manipy v1-84) + (set! (-> (the-as silodoor v1-84) draw bounds w) 2048000.0) + ) + ) + (send-event (process-by-name "silodoor-5" *active-pool*) 'hide) + (set-setting! 'music #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-a" + :index 9 + :parts 8 + :command-list '((0 send-event self activate-particle 0) + (0 send-event self activate-particle 1) + (0 send-event self activate-particle 7) + (1 blackout 0) + (61 joint "cameraB") + (71 send-event self activate-particle 2) + (156 joint "camera") + (216 joint "cameraB") + (259 send-event self deactivate-particle 2) + (259 send-event self activate-particle 3) + (268 send-event self activate-particle 4) + (270 send-event self deactivate-particle 3) + (270 send-event self deactivate-particle 0) + (270 send-event self deactivate-particle 1) + (271 joint "camera") + (269 send-event self activate-particle 5) + (272 send-event self flash) + (272 eval (lambda :behavior sage-finalboss + () + (let ((a0-1 (get-task-control (game-task finalboss-movies)))) + (save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0) ) - ) - (273 send-event self deactivate-particle 5) - (333 joint "cameraB") - (395 joint "camera") - (453 joint "cameraB") - (478 send-event self deactivate-particle 4) - (478 send-event self activate-particle 6) - (482 send-event self deactivate-particle 6) - (583 joint "camera") - (640 send-event self deactivate-particle 7) - ) - ) - ) - (((task-status need-reminder-a)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) - (close-current! (-> obj tasks)) - (play-reminder obj) - (dummy-45 obj) - (set! (-> obj kick-the-credits) #t) - (set! (-> obj robotplat) - (ppointer->handle - (manipy-spawn (-> obj root-override trans) (-> obj entity) *plat-eco-finalboss-lit-sg* #f :to obj) - ) - ) - (send-event (handle->process (-> obj robotplat)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj robotplat)) 'origin-joint-index 3) - (set! (-> obj old-target-pos trans quad) - (-> (new 'static 'vector :x 11368946.0 :y 2215900.2 :z -19405602.0 :w 1.0) quad) - ) - (quaternion-copy! (-> obj old-target-pos quat) (new 'static 'quaternion :y -0.8472 :w 0.5312)) - (set-setting! *setting-control* pp 'music #f 0.0 0) - (set-setting! *setting-control* pp 'sfx-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'ambient-volume 'abs 0.0 0) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-b" - :index 10 - :parts 27 - :command-list '((0 kill "crate-3250") - (0 kill "crate-3251") - (0 kill "crate-3252") - (0 kill "crate-3253") - (0 kill "crate-3254") - (0 kill "crate-3255") - (0 kill "crate-3256") - (0 kill "crate-3257") - (0 kill "crate-3258") - (0 kill "crate-3259") - (0 kill "plat-eco-finalboss-1") - (1 blackout 0) - (61 joint "cameraB") - (136 joint "camera") - (510 joint "cameraB") - (641 joint "camera") - (751 joint "cameraB") - (1096 joint "camera") - (1321 joint "cameraB") - (1521 joint "camera") - (1636 joint "cameraB") - (1751 joint "camera") - (1916 joint "cameraB") - (1996 joint "camera") - (2256 joint "cameraB") - ) - ) - ) - (((task-status need-reminder)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) - (close-current! (-> obj tasks)) - (dummy-45 obj) - (send-event *camera* 'teleport) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (cond - ((target-has-all-the-cells?) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-enough-cells" - :index 12 - :parts 6 - :command-list '((0 send-event self fade) - (1 blackout 0) - (65 joint "cameraB") - (104 joint "camera") - (134 joint "cameraB") - (165 joint "camera") - (292 joint "cameraB") - (488 joint "camera") - (488 auto-save auto-save) + (none) + ) ) + (273 send-event self deactivate-particle 5) + (333 joint "cameraB") + (395 joint "camera") + (453 joint "cameraB") + (478 send-event self deactivate-particle 4) + (478 send-event self activate-particle 6) + (482 send-event self deactivate-particle 6) + (583 joint "camera") + (640 send-event self deactivate-particle 7) + ) + ) + ) + (((task-status need-reminder-a)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0) + (close-current! (-> obj tasks)) + (play-reminder obj) + (dummy-45 obj) + (set! (-> obj kick-the-credits) #t) + (set! (-> obj robotplat) + (ppointer->handle + (manipy-spawn (-> obj root-override trans) (-> obj entity) *plat-eco-finalboss-lit-sg* #f :to obj) + ) + ) + (send-event (handle->process (-> obj robotplat)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj robotplat)) 'origin-joint-index 3) + (set! (-> obj old-target-pos trans quad) + (-> (new 'static 'vector :x 11368946.0 :y 2215900.2 :z -19405602.0 :w 1.0) quad) + ) + (quaternion-copy! (-> obj old-target-pos quat) (new 'static 'quaternion :y -0.8472 :w 0.5312)) + (set-setting! 'music #f 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-b" + :index 10 + :parts 27 + :command-list '((0 kill "crate-3250") + (0 kill "crate-3251") + (0 kill "crate-3252") + (0 kill "crate-3253") + (0 kill "crate-3254") + (0 kill "crate-3255") + (0 kill "crate-3256") + (0 kill "crate-3257") + (0 kill "crate-3258") + (0 kill "crate-3259") + (0 kill "plat-eco-finalboss-1") + (1 blackout 0) + (61 joint "cameraB") + (136 joint "camera") + (510 joint "cameraB") + (641 joint "camera") + (751 joint "cameraB") + (1096 joint "camera") + (1321 joint "cameraB") + (1521 joint "camera") + (1636 joint "cameraB") + (1751 joint "camera") + (1916 joint "cameraB") + (1996 joint "camera") + (2256 joint "cameraB") + ) + ) + ) + (((task-status need-reminder)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) + (close-current! (-> obj tasks)) + (dummy-45 obj) + (send-event *camera* 'teleport) + (set-setting! 'allow-progress #f 0.0 0) + ) + (cond + ((target-has-all-the-cells?) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-enough-cells" + :index 12 + :parts 6 + :command-list '((0 send-event self fade) + (1 blackout 0) + (65 joint "cameraB") + (104 joint "camera") + (134 joint "cameraB") + (165 joint "camera") + (292 joint "cameraB") + (488 joint "camera") + (488 auto-save auto-save) ) ) - (else - (if arg0 - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (new 'static 'spool-anim - :name "green-sagecage-outro-beat-boss-need-cells" - :index 11 - :parts 8 - :command-list '((0 send-event self fade) - (1 blackout 0) - (65 joint "cameraB") - (104 joint "camera") - (134 joint "cameraB") - (165 joint "camera") - (292 joint "cameraB") - (488 joint "camera") - (488 auto-save auto-save) - ) + ) + (else + (if arg0 + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-beat-boss-need-cells" + :index 11 + :parts 8 + :command-list '((0 send-event self fade) + (1 blackout 0) + (65 joint "cameraB") + (104 joint "camera") + (134 joint "cameraB") + (165 joint "camera") + (292 joint "cameraB") + (488 joint "camera") + (488 auto-save auto-save) ) ) ) ) - (((task-status need-reward-speech)) - (when arg0 - (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) - (close-current! (-> obj tasks)) - (dummy-45 obj) - (set! (-> obj left-door) (the-as entity-actor (entity-by-name "power-left-2"))) - (set! (-> obj right-door) (the-as entity-actor (entity-by-name "power-right-2"))) - (set-setting! *setting-control* pp 'allow-progress #f 0.0 0) - ) - (new 'static 'spool-anim - :name "green-sagecage-outro-big-finish" - :index 13 - :parts 7 - :command-list '((1 blackout 0) - (61 joint "cameraB") - (102 joint "camera") - (145 joint "cameraB") - (220 send-event "power-left-2" open) - (220 send-event "power-right-2" open) - (235 joint "camera") - (243 send-event self activate-particle 8) - (322 joint "cameraB") - (428 joint "camera") - (519 joint "cameraB") - (602 joint "camera") - ) + ) + (((task-status need-reward-speech)) + (when arg0 + (set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667) + (close-current! (-> obj tasks)) + (dummy-45 obj) + (set! (-> obj left-door) (the-as entity-actor (entity-by-name "power-left-2"))) + (set! (-> obj right-door) (the-as entity-actor (entity-by-name "power-right-2"))) + (set-setting! 'allow-progress #f 0.0 0) + ) + (new 'static 'spool-anim + :name "green-sagecage-outro-big-finish" + :index 13 + :parts 7 + :command-list '((1 blackout 0) + (61 joint "cameraB") + (102 joint "camera") + (145 joint "cameraB") + (220 send-event "power-left-2" open) + (220 send-event "power-right-2" open) + (235 joint "camera") + (243 send-event self activate-particle 8) + (322 joint "cameraB") + (428 joint "camera") + (519 joint "cameraB") + (602 joint "camera") ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) - ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (current-status (-> obj tasks))) ) - (-> obj draw art-group data 4) - ) + ) + (-> obj draw art-group data 4) ) ) ) @@ -971,18 +969,18 @@ (set! (-> self credits-played) #t) (set-blackout-frames 0) (set-blackout-frames (seconds 0.05)) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (set-setting! *setting-control* self 'music 'ogreboss 0.0 0) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'music 'ogreboss 0.0 0) (set! (-> self state-time) (-> *display* game-frame-counter)) (logior! (-> self draw status) (draw-status hidden)) (let ((gp-0 (-> self mask))) (load-state-want-display-level 'finalboss 'special) (logclear! (-> self mask) (process-mask pause progress)) - (push-setting! *setting-control* self 'process-mask 'set 0.0 8212) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask pause progress target)) + (apply-settings *setting-control*) (let ((f30-0 0.0) (f28-0 0.5) ) @@ -1012,11 +1010,11 @@ (set! (-> self mask) gp-0) ) (load-state-want-display-level 'finalboss 'display) - (clear-pending-settings-from-process *setting-control* self 'allow-pause) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (clear-pending-settings-from-process *setting-control* self 'music) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'allow-pause) + (remove-setting! 'allow-progress) + (remove-setting! 'process-mask) + (remove-setting! 'music) + (apply-settings *setting-control*) (set-blackout-frames (seconds 0.05)) (let ((gp-1 (-> *display* base-frame-counter))) (until (>= (- (-> *display* base-frame-counter) gp-1) (seconds 0.05)) @@ -1074,7 +1072,7 @@ :enter (behavior () (sage-finalboss-extra-enter) ((-> (method-of-type process-taskable hidden) enter)) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (none) ) :trans (behavior () diff --git a/test/decompiler/reference/levels/flut_common/target-flut_REF.gc b/test/decompiler/reference/levels/flut_common/target-flut_REF.gc index 95373716e9..822af88926 100644 --- a/test/decompiler/reference/levels/flut_common/target-flut_REF.gc +++ b/test/decompiler/reference/levels/flut_common/target-flut_REF.gc @@ -454,7 +454,7 @@ (target-collide-set! 'normal (the-as float 0.0)) (set! (-> self control reaction) target-collision-reaction) (set! (-> self control unknown-vector12 quad) (the-as uint128 0)) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (target-exit) ) (none) @@ -463,7 +463,7 @@ (target-exit) (set! *display-profile* #f) (set! *display-entity-errors* #f) - (set-setting! *setting-control* self 'sound-flava #f (the-as float 30.0) 2) + (set-setting! 'sound-flava #f 30.0 (music-flava flutflut)) (if (zero? (-> self flut)) (set! (-> self flut) (new 'process 'flut-info)) ) @@ -1811,8 +1811,8 @@ :exit (behavior () (logclear! (-> self state-flags) (state-flags sf03 sf15)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (none) ) :trans (-> target-hit trans) @@ -1821,8 +1821,8 @@ (logior! (-> self state-flags) (state-flags sf15)) (set! (-> self neck flex-blend) 0.0) (target-timed-invulnerable-off self) - (push-setting! *setting-control* self 'process-mask 'set 0.0 #x14a0000) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) (set! (-> self control transv quad) (the-as uint128 0)) (cond ((or (= arg0 'none) (= arg0 'water-vol) (= arg0 'sharkey)) diff --git a/test/decompiler/reference/levels/jungle/fisher_REF.gc b/test/decompiler/reference/levels/jungle/fisher_REF.gc index 9328e5f65a..686210cf38 100644 --- a/test/decompiler/reference/levels/jungle/fisher_REF.gc +++ b/test/decompiler/reference/levels/jungle/fisher_REF.gc @@ -1651,7 +1651,7 @@ ) ) :enter (behavior () - (set-setting! *setting-control* self 'ambient-volume 'rel 50.0 0) + (set-setting! 'ambient-volume 'rel 50.0 0) (send-event *target* 'reset-pickup 'eco) (ja-channel-set! 0) (clear-collide-with-as (-> self root-override)) @@ -1673,7 +1673,7 @@ (none) ) :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'ambient-volume) (let* ((v1-2 *camera-other-matrix*) (a3-0 (-> *camera-combiner* inv-camera-rot)) (a0-2 (-> a3-0 vector 0 quad)) diff --git a/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc b/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc index cec42fcb5f..47f4eac8c0 100644 --- a/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc +++ b/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc @@ -1014,7 +1014,7 @@ ;; failed to figure out what this is: (defstate plant-boss-far-idle (plant-boss) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (let ((gp-0 (-> self child))) (while gp-0 (let ((s5-0 (ppointer->process gp-0))) @@ -1059,7 +1059,7 @@ ;; failed to figure out what this is: (defstate plant-boss-intro (plant-boss) :code (behavior () - (set-setting! *setting-control* self 'music 'danger (the-as float 0.0) 0) + (set-setting! 'music 'danger 0.0 0) (send-event *target* 'reset-pickup 'eco) (let ((v1-9 (-> self entity extra perm))) (logior! (-> v1-9 status) (entity-perm-status user-set-from-cstage)) @@ -1151,7 +1151,7 @@ (defstate plant-boss-idle (plant-boss) :event plant-boss-default-event-handler :enter (behavior () - (set-setting! *setting-control* self 'music 'danger (the-as float 0.0) 0) + (set-setting! 'music 'danger 0.0 0) (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self body flex-blend) 0.0) (set! (-> self neck flex-blend) 1.0) @@ -1762,7 +1762,7 @@ (set! (-> (find-prim-by-id (-> self root-override) (the-as uint 16)) prim-core action) (collide-action)) 0 (logior! (-> self mask) (process-mask actor-pause)) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (go plant-boss-dead-idle) (none) ) diff --git a/test/decompiler/reference/levels/misty/muse_REF.gc b/test/decompiler/reference/levels/misty/muse_REF.gc index 8cb90b060d..33c62daff1 100644 --- a/test/decompiler/reference/levels/misty/muse_REF.gc +++ b/test/decompiler/reference/levels/misty/muse_REF.gc @@ -413,16 +413,9 @@ nav-enemy-default-event-handler (lambda :behavior muse () (spool-push *art-control* (-> self victory-anim name) 0 self -1.0) (none)) ) ) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! - *setting-control* - self - 'ambient-volume - 'rel - (-> *setting-control* current ambient-volume-movie) - 0 - ) + (add-setting! 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (add-setting! 'ambient-volume 'rel (-> *setting-control* current ambient-volume-movie) 0) (logclear! (-> self mask) (process-mask enemy)) (process-spawn othercam self 3 #f #t :to self) (auto-save-command 'auto-save 0 0 *default-pool*) @@ -432,9 +425,9 @@ nav-enemy-default-event-handler (the-as art-joint-anim muse-idle-ja) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) (send-event *target* 'blend-shape #f) (cond ((!= *kernel-boot-message* 'play) diff --git a/test/decompiler/reference/levels/misty/sidekick-human_REF.gc b/test/decompiler/reference/levels/misty/sidekick-human_REF.gc index d01a0f56f9..ef6666bf3d 100644 --- a/test/decompiler/reference/levels/misty/sidekick-human_REF.gc +++ b/test/decompiler/reference/levels/misty/sidekick-human_REF.gc @@ -1345,153 +1345,151 @@ ;; definition for method 32 of type sequenceB (defmethod play-anim! sequenceB ((obj sequenceB) (arg0 symbol)) - (with-pp - (cond - (arg0 - (send-event *target* 'sidekick #f) - (set! (-> obj bonelurker) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) - (set-setting! *setting-control* pp 'music-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'sfx-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'ambient-volume-movie 'abs (the-as float 0.0) 0) - (dotimes (s5-1 9) - (let ((s4-0 (-> *lurker-army* s5-1))) - (cond - ((= (-> s4-0 skel) 'bonelurker) - (set! (-> obj lurker-army s5-1) - (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *bonelurker-sg* #f :to obj)) - ) - (let ((s3-1 (handle->process (-> obj lurker-army s5-1)))) - (when s3-1 - (set! (-> (the-as babak s3-1) draw light-index) (the-as uint 1)) - (set! (-> (the-as babak s3-1) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) + (cond + (arg0 + (send-event *target* 'sidekick #f) + (set! (-> obj bonelurker) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) + (set-setting! 'music-volume-movie 'abs 0.0 0) + (set-setting! 'sfx-volume-movie 'abs 0.0 0) + (set-setting! 'ambient-volume-movie 'abs 0.0 0) + (dotimes (s5-1 9) + (let ((s4-0 (-> *lurker-army* s5-1))) + (cond + ((= (-> s4-0 skel) 'bonelurker) + (set! (-> obj lurker-army s5-1) + (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *bonelurker-sg* #f :to obj)) ) + (let ((s3-1 (handle->process (-> obj lurker-army s5-1)))) + (when s3-1 + (set! (-> (the-as babak s3-1) draw light-index) (the-as uint 1)) + (set! (-> (the-as babak s3-1) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) ) ) - (else - (set! (-> obj lurker-army s5-1) - (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *babak-sg* #f :to obj)) - ) - (let ((s3-3 (handle->process (-> obj lurker-army s5-1)))) - (when s3-3 - (set! (-> (the-as babak s3-3) draw light-index) (the-as uint 1)) - (set! (-> (the-as babak s3-3) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) + ) + (else + (set! (-> obj lurker-army s5-1) + (ppointer->handle (manipy-spawn (-> s4-0 pos) (-> obj entity) *babak-sg* #f :to obj)) ) + (let ((s3-3 (handle->process (-> obj lurker-army s5-1)))) + (when s3-3 + (set! (-> (the-as babak s3-3) draw light-index) (the-as uint 1)) + (set! (-> (the-as babak s3-3) draw level-index) (the-as uint (-> (level-get *level* 'misty) index))) ) - (send-event (handle->process (-> obj lurker-army s5-1)) 'art-joint-anim "idle" 0) ) + (send-event (handle->process (-> obj lurker-army s5-1)) 'art-joint-anim "idle" 0) ) - (send-event (handle->process (-> obj lurker-army s5-1)) 'rot (-> s4-0 rot)) ) + (send-event (handle->process (-> obj lurker-army s5-1)) 'rot (-> s4-0 rot)) ) ) - ((!= (level-status *level* 'intro) 'active) - (return (get-art-elem obj)) - ) ) - (new 'static 'spool-anim - :name "sidekick-human-intro-sequence-b" - :index 5 - :parts 11 - :command-list '((0 blackout 0) - (0 setting-reset ocean-off near) - (0 want-levels misty intro) - (0 display-level intro special) - (0 kill "money-1404") - (0 kill "money-1405") - (0 kill "money-1406") - (0 kill "money-1407") - (0 kill "money-1551") - (0 kill "money-1552") - (0 kill "money-1553") - (0 kill "balloonlurker-9") - (0 kill "balloonlurker-10") - (0 kill "balloonlurker-11") - (0 kill "balloonlurker-12") - (0 kill "balloonlurker-13") - (0 kill "balloonlurker-14") - (0 kill "keg-conveyor-8") - (0 kill "mistycannon-8") - (0 kill "muse-2") - (0 kill "mud-1") - (0 kill "mud-2") - (0 kill "mud-3") - (0 kill "mud-4") - (0 kill "mud-5") - (0 kill "mud-6") - (0 kill "mud-7") - (0 kill "mud-8") - (0 kill "mud-9") - (0 kill "mud-10") - (0 kill "mud-11") - (0 kill "dark-eco-pool-11") - (0 kill "sharkey-32") - (0 kill "sharkey-34") - (0 kill "sharkey-39") - (0 kill "sharkey-41") - (0 kill "bonelurker-14") - (0 kill "bonelurker-15") - (0 kill "bonelurker-16") - (0 kill "bonelurker-17") - (0 kill "bonelurker-18") - (0 kill "bonelurker-19") - (0 kill "bonelurker-20") - (0 kill "bonelurker-21") - (0 kill "bonelurker-22") - (0 kill "bonelurker-23") - (0 kill "bonelurker-24") - (0 kill "bonelurker-26") - (0 kill "babak-with-cannon-5") - (0 kill "babak-200") - (0 kill "babak-201") - (0 kill "babak-202") - (0 kill "babak-203") - (0 kill "babak-204") - (0 kill "babak-205") - (0 kill "babak-206") - (0 kill "babak-207") - (0 kill "babak-208") - (0 kill "babak-209") - (0 kill "babak-212") - (0 kill "quicksandlurker-5") - (0 kill "boatpaddle-4") - (0 kill "silostep-7") - (0 kill "silostep-8") - (0 kill "silostep-9") - (0 kill "silostep-10") - (0 kill "orb-cache-top-15") - (0 kill "windturbine-11") - (0 kill "teetertotter-5") - (0 kill "bone-platform-4") - (0 kill "misty-battle-controller-1") - (30 send-event self offset-army) - (196 joint "cameraB") - (196 shadow target #f) - (196 shadow self #f) - (380 send-event self evilbro) - (385 send-event "evilbro" draw #t) - (385 send-event "evilsis" draw #t) - (397 joint "camera") - (410 setting-reset ocean-off #t) - (456 joint "cameraB") - (546 joint "camera") - (701 joint "cameraB") - (701 setting-reset ocean-off near) - (776 joint "camera") - (776 setting-reset ocean-off #t) - (937 joint "cameraB") - (1027 joint "camera") - (1122 joint "cameraB") - (1221 joint "cameraB") - (1221 setting-reset ocean-off near) - (1280 alive "sequenceC-1") - (1281 save) - (1281 shadow target #t) - (1281 setting-unset ocean-off) - ) + ((!= (level-status *level* 'intro) 'active) + (return (get-art-elem obj)) + ) + ) + (new 'static 'spool-anim + :name "sidekick-human-intro-sequence-b" + :index 5 + :parts 11 + :command-list '((0 blackout 0) + (0 setting-reset ocean-off near) + (0 want-levels misty intro) + (0 display-level intro special) + (0 kill "money-1404") + (0 kill "money-1405") + (0 kill "money-1406") + (0 kill "money-1407") + (0 kill "money-1551") + (0 kill "money-1552") + (0 kill "money-1553") + (0 kill "balloonlurker-9") + (0 kill "balloonlurker-10") + (0 kill "balloonlurker-11") + (0 kill "balloonlurker-12") + (0 kill "balloonlurker-13") + (0 kill "balloonlurker-14") + (0 kill "keg-conveyor-8") + (0 kill "mistycannon-8") + (0 kill "muse-2") + (0 kill "mud-1") + (0 kill "mud-2") + (0 kill "mud-3") + (0 kill "mud-4") + (0 kill "mud-5") + (0 kill "mud-6") + (0 kill "mud-7") + (0 kill "mud-8") + (0 kill "mud-9") + (0 kill "mud-10") + (0 kill "mud-11") + (0 kill "dark-eco-pool-11") + (0 kill "sharkey-32") + (0 kill "sharkey-34") + (0 kill "sharkey-39") + (0 kill "sharkey-41") + (0 kill "bonelurker-14") + (0 kill "bonelurker-15") + (0 kill "bonelurker-16") + (0 kill "bonelurker-17") + (0 kill "bonelurker-18") + (0 kill "bonelurker-19") + (0 kill "bonelurker-20") + (0 kill "bonelurker-21") + (0 kill "bonelurker-22") + (0 kill "bonelurker-23") + (0 kill "bonelurker-24") + (0 kill "bonelurker-26") + (0 kill "babak-with-cannon-5") + (0 kill "babak-200") + (0 kill "babak-201") + (0 kill "babak-202") + (0 kill "babak-203") + (0 kill "babak-204") + (0 kill "babak-205") + (0 kill "babak-206") + (0 kill "babak-207") + (0 kill "babak-208") + (0 kill "babak-209") + (0 kill "babak-212") + (0 kill "quicksandlurker-5") + (0 kill "boatpaddle-4") + (0 kill "silostep-7") + (0 kill "silostep-8") + (0 kill "silostep-9") + (0 kill "silostep-10") + (0 kill "orb-cache-top-15") + (0 kill "windturbine-11") + (0 kill "teetertotter-5") + (0 kill "bone-platform-4") + (0 kill "misty-battle-controller-1") + (30 send-event self offset-army) + (196 joint "cameraB") + (196 shadow target #f) + (196 shadow self #f) + (380 send-event self evilbro) + (385 send-event "evilbro" draw #t) + (385 send-event "evilsis" draw #t) + (397 joint "camera") + (410 setting-reset ocean-off #t) + (456 joint "cameraB") + (546 joint "camera") + (701 joint "cameraB") + (701 setting-reset ocean-off near) + (776 joint "camera") + (776 setting-reset ocean-off #t) + (937 joint "cameraB") + (1027 joint "camera") + (1122 joint "cameraB") + (1221 joint "cameraB") + (1221 setting-reset ocean-off near) + (1280 alive "sequenceC-1") + (1281 save) + (1281 shadow target #t) + (1281 setting-unset ocean-off) ) ) ) @@ -1678,98 +1676,96 @@ ;; definition for method 32 of type sequenceC ;; INFO: Return type mismatch spool-anim vs basic. (defmethod play-anim! sequenceC ((obj sequenceC) (arg0 symbol)) - (with-pp - (when arg0 - (set-setting! *setting-control* pp 'music-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'sfx-volume-movie 'abs (the-as float 0.0) 0) - (set-setting! *setting-control* pp 'ambient-volume-movie 'abs (the-as float 0.0) 0) - (set! (-> obj bonelurker) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) - (set! (-> obj darkecocan) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *darkecocan-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj darkecocan)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj darkecocan)) 'center-joint 3) - (send-event (handle->process (-> obj darkecocan)) 'trans-hook sequenceC-can-trans-hook) - (send-event - (handle->process (-> obj darkecocan)) - 'eval - (lambda :behavior sequenceC - () - ((method-of-type lod-set setup-lods!) - (the-as lod-set (&-> (the-as process-taskable (-> self parent 0)) stack 288)) - *darkecocan-glow-sg* - (-> self draw art-group) - (-> (the-as process-taskable (-> self parent 0)) entity) - ) - (let ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) - (set! (-> self part) v0-1) - v0-1 - ) + (when arg0 + (set-setting! 'music-volume-movie 'abs 0.0 0) + (set-setting! 'sfx-volume-movie 'abs 0.0 0) + (set-setting! 'ambient-volume-movie 'abs 0.0 0) + (set! (-> obj bonelurker) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *bonelurker-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) + (set! (-> obj darkecocan) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *darkecocan-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj darkecocan)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj darkecocan)) 'center-joint 3) + (send-event (handle->process (-> obj darkecocan)) 'trans-hook sequenceC-can-trans-hook) + (send-event + (handle->process (-> obj darkecocan)) + 'eval + (lambda :behavior sequenceC + () + ((method-of-type lod-set setup-lods!) + (the-as lod-set (&-> (the-as process-taskable (-> self parent 0)) stack 288)) + *darkecocan-glow-sg* + (-> self draw art-group) + (-> (the-as process-taskable (-> self parent 0)) entity) + ) + (let ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) + (set! (-> self part) v0-1) + v0-1 ) ) ) - (the-as basic (new 'static 'spool-anim - :name "sidekick-human-intro-sequence-c" - :index 6 - :parts 22 - :command-list '((0 blackout 0) - (0 kill "fuel-cell-11") - (0 kill "fuel-cell-50") - (0 kill "money-1561") - (0 kill "money-1562") - (0 kill "money-1563") - (0 kill "money-1564") - (0 kill "money-1565") - (5 alive "dark-eco-pool-11") - (151 joint "cameraB") - (200 want-levels misty village1) - (236 joint "camera") - (301 joint "cameraB") - (421 joint "camera") - (460 shadow self #f) - (470 shadow self #t) - (496 joint "cameraB") - (611 joint "camera") - (721 joint "cameraB") - (1176 joint "camera") - (1271 joint "cameraB") - (1331 joint "camera") - (1386 joint "cameraB") - (1461 joint "camera") - (1524 joint "cameraB") - (1558 joint "camera") - (1602 joint "cameraB") - (1628 joint "camera") - (1676 joint "cameraB") - (1728 joint "camera") - (1791 joint "cameraB") - (1831 joint "camera") - (1942 joint "cameraB") - (2000 display-level village1 special) - (2028 joint "camera") - (2096 joint "cameraB") - (2154 joint "camera") - (2226 joint "cameraB") - (2266 joint "camera") - (2307 joint "cameraB") - (2431 joint "camera") - (2476 joint "cameraB") - (2530 display-level misty movie) - (2530 want-force-vis misty #t) - (2530 dead "dark-eco-pool-11") - (2534 display-level village1 display) - (2535 want-vis vi1) - (2536 joint "camera") - (2580 alive "sage-23") - (2596 save) - ) - ) - ) ) + (the-as basic (new 'static 'spool-anim + :name "sidekick-human-intro-sequence-c" + :index 6 + :parts 22 + :command-list '((0 blackout 0) + (0 kill "fuel-cell-11") + (0 kill "fuel-cell-50") + (0 kill "money-1561") + (0 kill "money-1562") + (0 kill "money-1563") + (0 kill "money-1564") + (0 kill "money-1565") + (5 alive "dark-eco-pool-11") + (151 joint "cameraB") + (200 want-levels misty village1) + (236 joint "camera") + (301 joint "cameraB") + (421 joint "camera") + (460 shadow self #f) + (470 shadow self #t) + (496 joint "cameraB") + (611 joint "camera") + (721 joint "cameraB") + (1176 joint "camera") + (1271 joint "cameraB") + (1331 joint "camera") + (1386 joint "cameraB") + (1461 joint "camera") + (1524 joint "cameraB") + (1558 joint "camera") + (1602 joint "cameraB") + (1628 joint "camera") + (1676 joint "cameraB") + (1728 joint "camera") + (1791 joint "cameraB") + (1831 joint "camera") + (1942 joint "cameraB") + (2000 display-level village1 special) + (2028 joint "camera") + (2096 joint "cameraB") + (2154 joint "camera") + (2226 joint "cameraB") + (2266 joint "camera") + (2307 joint "cameraB") + (2431 joint "camera") + (2476 joint "cameraB") + (2530 display-level misty movie) + (2530 want-force-vis misty #t) + (2530 dead "dark-eco-pool-11") + (2534 display-level village1 display) + (2535 want-vis vi1) + (2536 joint "camera") + (2580 alive "sage-23") + (2596 save) + ) + ) + ) ) ;; definition for method 31 of type sequenceC diff --git a/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc b/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc index 68be9b05ba..2c71de5c32 100644 --- a/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc +++ b/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc @@ -50,7 +50,7 @@ ;; failed to figure out what this is: (defstate plunger-lurker-plunge (plunger-lurker) :code (behavior () - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) (while (or (not *target*) (logtest? (-> *target* state-flags) (state-flags sf03 sf15))) @@ -993,12 +993,12 @@ (defstate flying-lurker-start (flying-lurker) :event flying-lurker-handler :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (none) ) :code (behavior () (when (play-movie?) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (flying-lurker-play-intro) ) (flying-lurker-inc-try-count) diff --git a/test/decompiler/reference/levels/ogre/ogreboss_REF.gc b/test/decompiler/reference/levels/ogre/ogreboss_REF.gc index 9605ca5704..118891e897 100644 --- a/test/decompiler/reference/levels/ogre/ogreboss_REF.gc +++ b/test/decompiler/reference/levels/ogre/ogreboss_REF.gc @@ -1293,7 +1293,7 @@ (send-event *target* 'continue (get-continue-by-name *game-info* "ogre-start")) (ogreboss-inc-try-count) ) - (set-setting! *setting-control* self 'music 'ogreboss (the-as float 0.0) 0) + (set-setting! 'music 'ogreboss 0.0 0) (go ogreboss-wait-for-player) (none) ) @@ -2146,7 +2146,7 @@ process-drawable-fuel-cell-handler ) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (ogreboss-reset-camera) (let ((gp-0 (new 'stack-no-clear 'event-message-block))) (set! (-> gp-0 from) self) diff --git a/test/decompiler/reference/levels/racer_common/racer-part_REF.gc b/test/decompiler/reference/levels/racer_common/racer-part_REF.gc index f7bbe90a1d..d397e38775 100644 --- a/test/decompiler/reference/levels/racer_common/racer-part_REF.gc +++ b/test/decompiler/reference/levels/racer_common/racer-part_REF.gc @@ -360,63 +360,61 @@ ;; definition for method 20 of type hud-bike-heat ;; INFO: Return type mismatch int vs none. (defmethod init-particles! hud-bike-heat ((obj hud-bike-heat) (arg0 int)) - (with-pp - (push-setting! *setting-control* pp 'common-page 'set 0.0 2) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-0 (-> obj nb-of-particles))) - (set! (-> obj particles s5-0) (new 'static 'hud-particle)) - (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 111) obj)) - (set! (-> obj particles s5-0 init-pos x) 13.0) - (set! (-> obj particles s5-0 init-pos y) 370.0) - (set! (-> obj particles s5-0 init-pos z) 10.0) - (set! (-> obj particles s5-0 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) + (add-setting! 'common-page 'set 0.0 2) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 111) obj)) + (set! (-> obj particles s5-0 init-pos x) 13.0) + (set! (-> obj particles s5-0 init-pos y) 370.0) + (set! (-> obj particles s5-0 init-pos z) 10.0) + (set! (-> obj particles s5-0 part matrix) -1) ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-1 (-> obj nb-of-particles))) - (set! (-> obj particles s5-1) (new 'static 'hud-particle)) - (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 112) obj)) - (set! (-> obj particles s5-1 init-pos x) 70.0) - (set! (-> obj particles s5-1 init-pos y) 370.0) - (set! (-> obj particles s5-1 init-pos z) 6.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-2 (-> obj nb-of-particles))) - (set! (-> obj particles s5-2) (new 'static 'hud-particle)) - (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 113) obj)) - (set! (-> obj particles s5-2 init-pos x) 20.0) - (set! (-> obj particles s5-2 init-pos y) 370.0) - (set! (-> obj particles s5-2 init-pos z) 1.0) - (set! (-> obj particles s5-2 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-3 (-> obj nb-of-particles))) - (set! (-> obj particles s5-3) (new 'static 'hud-particle)) - (set! (-> obj particles s5-3 part) (create-launch-control (-> *part-group-id-table* 114) obj)) - (set! (-> obj particles s5-3 init-pos x) 70.0) - (set! (-> obj particles s5-3 init-pos y) 370.0) - (set! (-> obj particles s5-3 init-pos z) 7.0) - (set! (-> obj particles s5-3 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (dotimes (s5-4 (-> obj nb-of-particles)) - (if (= (-> obj particles s5-4 part matrix) -1) - (set! (-> obj particles s5-4 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set! (-> obj x-sgn) -1) - (set! (-> obj y-sgn) 1) - (set! (-> obj force-on-screen) #t) - 0 - (none) + (+! (-> obj nb-of-particles) 1) ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 112) obj)) + (set! (-> obj particles s5-1 init-pos x) 70.0) + (set! (-> obj particles s5-1 init-pos y) 370.0) + (set! (-> obj particles s5-1 init-pos z) 6.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 113) obj)) + (set! (-> obj particles s5-2 init-pos x) 20.0) + (set! (-> obj particles s5-2 init-pos y) 370.0) + (set! (-> obj particles s5-2 init-pos z) 1.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-3 (-> obj nb-of-particles))) + (set! (-> obj particles s5-3) (new 'static 'hud-particle)) + (set! (-> obj particles s5-3 part) (create-launch-control (-> *part-group-id-table* 114) obj)) + (set! (-> obj particles s5-3 init-pos x) 70.0) + (set! (-> obj particles s5-3 init-pos y) 370.0) + (set! (-> obj particles s5-3 init-pos z) 7.0) + (set! (-> obj particles s5-3 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-4 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-4 part matrix) -1) + (set! (-> obj particles s5-4 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) 1) + (set! (-> obj force-on-screen) #t) + 0 + (none) ) ;; definition of type hud-bike-speed @@ -449,52 +447,50 @@ ;; definition for method 20 of type hud-bike-speed ;; INFO: Return type mismatch int vs none. (defmethod init-particles! hud-bike-speed ((obj hud-bike-speed) (arg0 int)) - (with-pp - (push-setting! *setting-control* pp 'common-page 'set 0.0 2) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-0 (-> obj nb-of-particles))) - (set! (-> obj particles s5-0) (new 'static 'hud-particle)) - (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 108) obj)) - (set! (-> obj particles s5-0 init-pos x) 433.0) - (set! (-> obj particles s5-0 init-pos y) 370.0) - (set! (-> obj particles s5-0 init-pos z) 3.0) - (set! (-> obj particles s5-0 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) + (add-setting! 'common-page 'set 0.0 2) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! (-> obj particles s5-0 part) (create-launch-control (-> *part-group-id-table* 108) obj)) + (set! (-> obj particles s5-0 init-pos x) 433.0) + (set! (-> obj particles s5-0 init-pos y) 370.0) + (set! (-> obj particles s5-0 init-pos z) 3.0) + (set! (-> obj particles s5-0 part matrix) -1) ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-1 (-> obj nb-of-particles))) - (set! (-> obj particles s5-1) (new 'static 'hud-particle)) - (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 109) obj)) - (set! (-> obj particles s5-1 init-pos x) 378.0) - (set! (-> obj particles s5-1 init-pos y) 370.0) - (set! (-> obj particles s5-1 init-pos z) 5.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-2 (-> obj nb-of-particles))) - (set! (-> obj particles s5-2) (new 'static 'hud-particle)) - (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 110) obj)) - (set! (-> obj particles s5-2 init-pos x) 415.0) - (set! (-> obj particles s5-2 init-pos y) 370.0) - (set! (-> obj particles s5-2 init-pos z) 1.0) - (set! (-> obj particles s5-2 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (dotimes (s5-3 (-> obj nb-of-particles)) - (if (= (-> obj particles s5-3 part matrix) -1) - (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set! (-> obj x-sgn) 1) - (set! (-> obj y-sgn) 1) - (set! (-> obj force-on-screen) #t) - 0 - (none) + (+! (-> obj nb-of-particles) 1) ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! (-> obj particles s5-1 part) (create-launch-control (-> *part-group-id-table* 109) obj)) + (set! (-> obj particles s5-1 init-pos x) 378.0) + (set! (-> obj particles s5-1 init-pos y) 370.0) + (set! (-> obj particles s5-1 init-pos z) 5.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! (-> obj particles s5-2 part) (create-launch-control (-> *part-group-id-table* 110) obj)) + (set! (-> obj particles s5-2 init-pos x) 415.0) + (set! (-> obj particles s5-2 init-pos y) 370.0) + (set! (-> obj particles s5-2 init-pos z) 1.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) 1) + (set! (-> obj force-on-screen) #t) + 0 + (none) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/levels/racer_common/racer-states_REF.gc b/test/decompiler/reference/levels/racer_common/racer-states_REF.gc index bd2d439c27..5879d8c17d 100644 --- a/test/decompiler/reference/levels/racer_common/racer-states_REF.gc +++ b/test/decompiler/reference/levels/racer_common/racer-states_REF.gc @@ -140,7 +140,7 @@ (sound-stop (-> self racer engine-sound-id)) (set! (-> self racer engine-sound-id) (new 'static 'sound-id)) (set! (-> self control unknown-vector12 quad) (the-as uint128 0)) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (target-exit) ) (none) @@ -149,7 +149,7 @@ (target-exit) (set! *display-profile* #f) (set! *display-entity-errors* #f) - (set-setting! *setting-control* self 'sound-flava #f 30.0 1) + (set-setting! 'sound-flava #f 30.0 (music-flava racer)) (if (zero? (-> self racer)) (set! (-> self racer) (new 'process 'racer-info)) ) diff --git a/test/decompiler/reference/levels/rolling/rolling-obs_REF.gc b/test/decompiler/reference/levels/rolling/rolling-obs_REF.gc index fd36a7f8c2..fdb6f38f57 100644 --- a/test/decompiler/reference/levels/rolling/rolling-obs_REF.gc +++ b/test/decompiler/reference/levels/rolling/rolling-obs_REF.gc @@ -1517,7 +1517,7 @@ :to self ) (sleep (-> self ticker) (seconds 6000)) - (set-setting! *setting-control* self 'sound-flava #f 40.0 42) + (set-setting! 'sound-flava #f 40.0 (music-flava rolling-gorge)) (none) ) :exit (behavior () @@ -1534,7 +1534,7 @@ ) (send-event (handle->process (-> self end-banner)) 'break-and-die) (send-event (handle->process (-> self start-banner)) 'unbreak) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (none) ) :trans (the-as (function none :behavior gorge-start) gorge-trans) diff --git a/test/decompiler/reference/levels/snow/snow-obs_REF.gc b/test/decompiler/reference/levels/snow/snow-obs_REF.gc index cdfd07e9cd..017302f5eb 100644 --- a/test/decompiler/reference/levels/snow/snow-obs_REF.gc +++ b/test/decompiler/reference/levels/snow/snow-obs_REF.gc @@ -82,16 +82,16 @@ ) ) ) - (push-setting! *setting-control* self 'music-volume 'abs 0.0 0) - (push-setting! *setting-control* self 'sfx-volume 'rel 50.0 0) + (add-setting! 'music-volume 'abs 0.0 0) + (add-setting! 'sfx-volume 'rel 50.0 0) (ja-play-spooled-anim (the-as spool-anim (-> self anim-name)) (the-as art-joint-anim #f) (the-as art-joint-anim #f) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) (let ((a0-21 (handle->process gp-2))) (if a0-21 (send-event a0-21 'stop-cloning) diff --git a/test/decompiler/reference/levels/snow/snow-ram-boss_REF.gc b/test/decompiler/reference/levels/snow/snow-ram-boss_REF.gc index cc35c6fac5..909378e075 100644 --- a/test/decompiler/reference/levels/snow/snow-ram-boss_REF.gc +++ b/test/decompiler/reference/levels/snow/snow-ram-boss_REF.gc @@ -1310,24 +1310,18 @@ (set! (-> obj proj-stoked) #t) (let ((s5-0 (new 'stack-no-clear 'vector))) (set! (-> s5-0 quad) (the-as uint128 0)) - (let* ((s4-0 (the-as ram-boss-proj (get-process *default-dead-pool* ram-boss-proj #x4000))) - (v1-9 (when s4-0 - (let ((t9-1 (method-of-type ram-boss-proj activate))) - (t9-1 s4-0 obj 'ram-boss-proj (the-as pointer #x70004000)) - ) - (run-now-in-process - s4-0 - projectile-init-by-other - (-> obj entity) - (-> obj collide-info trans) - s5-0 - 0 - (process->handle *target*) - ) - (-> s4-0 ppointer) - ) - ) - ) + (let ((v1-9 (process-spawn + ram-boss-proj + :init projectile-init-by-other + (-> obj entity) + (-> obj collide-info trans) + s5-0 + 0 + (process->handle *target*) + :to obj + ) + ) + ) (set! (-> (the-as (pointer ram-boss-proj) v1-9) 0 notify-handle) (process->handle obj)) ) ) diff --git a/test/decompiler/reference/levels/snow/snow-ram_REF.gc b/test/decompiler/reference/levels/snow/snow-ram_REF.gc index 998730b04f..d935774c2f 100644 --- a/test/decompiler/reference/levels/snow/snow-ram_REF.gc +++ b/test/decompiler/reference/levels/snow/snow-ram_REF.gc @@ -219,7 +219,7 @@ (ja-channel-push! 1 (seconds 0.075)) (loop (sound-play-by-name (static-sound-name "set-ram") (new-sound-id) 1024 0 0 1 #t) - (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! ram-cock-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (suspend) (ja :num! (seek!)) @@ -227,7 +227,7 @@ (let ((gp-1 #f)) (sound-play-by-name (static-sound-name "slam-crash") (new-sound-id) 1024 0 0 1 #t) (logclear! (-> self mask) (process-mask actor-pause)) - (ja-no-eval :group! (-> self draw art-group data 5) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! ram-release-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (let ((f30-0 (ja-aframe-num 0))) (when (and (not gp-1) (>= f30-0 61.0)) @@ -283,7 +283,7 @@ (go ram-give-fuel-cell) ) (ja-channel-push! 1 0) - (ja :group! (-> self draw art-group data 6) :num! min) + (ja :group! ram-idle-ja :num! min) (transform-post) (logior! (-> self mask) (process-mask sleep-code)) (suspend) @@ -311,30 +311,24 @@ :code (behavior () (set! (-> self give-fuel-cell?) #f) (ja-channel-push! 1 0) - (ja :group! (-> self draw art-group data 6) :num! min) + (ja :group! ram-idle-ja :num! min) (transform-post) (when (and (not (task-complete? *game-info* (-> self entity extra perm task))) (-> self give-fuel-cell-anim)) (logclear! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #t) - (let* ((gp-1 (the-as snowcam (get-process *default-dead-pool* snowcam #x4000))) - (v1-14 (when gp-1 - (let ((t9-6 (method-of-type snowcam activate))) - (t9-6 gp-1 self 'snowcam (the-as pointer #x70004000)) - ) - (run-now-in-process - gp-1 - pov-camera-init-by-other - (-> self root-override trans) - *snowcam-sg* - (-> self give-fuel-cell-anim) - 0 - self - '() - ) - (-> gp-1 ppointer) - ) - ) - ) + (let ((v1-14 (process-spawn + snowcam + :init pov-camera-init-by-other + (-> self root-override trans) + *snowcam-sg* + (-> self give-fuel-cell-anim) + 0 + self + '() + :to self + ) + ) + ) (set! (-> (the-as (pointer snowcam) v1-14) 0 seq) (the-as uint 1)) ) (sound-play-by-name (static-sound-name "cell-prize") (new-sound-id) 1024 0 0 1 #t) diff --git a/test/decompiler/reference/levels/sunken/helix-water_REF.gc b/test/decompiler/reference/levels/sunken/helix-water_REF.gc index ad61e48320..366e22004e 100644 --- a/test/decompiler/reference/levels/sunken/helix-water_REF.gc +++ b/test/decompiler/reference/levels/sunken/helix-water_REF.gc @@ -330,27 +330,21 @@ ) ) ) - (let* ((gp-0 (the-as sunkencam (get-process *default-dead-pool* sunkencam #x4000))) - (v1-11 - (when gp-0 - (let ((t9-2 (method-of-type sunkencam activate))) - (t9-2 gp-0 self 'sunkencam (the-as pointer #x70004000)) - ) - (run-now-in-process - gp-0 - pov-camera-init-by-other - (-> self spawn-trans) - *sunkencam-sg* - "qbert-show-door-open" - 0 - #f - '() - ) - (-> gp-0 ppointer-override) - ) - ) - ) - (set! (-> v1-11 0 seq) (the-as uint 2)) + (let ((v1-11 + (process-spawn + sunkencam + :init pov-camera-init-by-other + (-> self spawn-trans) + *sunkencam-sg* + "qbert-show-door-open" + 0 + #f + '() + :to self + ) + ) + ) + (set! (-> (the-as (pointer sunkencam) v1-11) 0 seq) (the-as uint 2)) ) (let ((a1-5 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-5 from) self) @@ -672,7 +666,7 @@ (go helix-water-activated) ) ((= v1-0 'music) - (set-setting! *setting-control* self 'music 'danger 0.0 0) + (set-setting! 'music 'danger 0.0 0) ) ) ) @@ -699,7 +693,7 @@ (case arg2 (('notify) (when (= (-> arg0 type) launcherdoor) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (go helix-water-idle) ) ) diff --git a/test/decompiler/reference/levels/sunken/target-tube_REF.gc b/test/decompiler/reference/levels/sunken/target-tube_REF.gc index 915931d02b..efe50297b7 100644 --- a/test/decompiler/reference/levels/sunken/target-tube_REF.gc +++ b/test/decompiler/reference/levels/sunken/target-tube_REF.gc @@ -859,8 +859,8 @@ :exit (behavior () (logclear! (-> self state-flags) (state-flags sf03 sf15)) (target-exit) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) ((-> target-tube-start exit)) (none) ) @@ -868,8 +868,8 @@ (local-vars (v1-40 symbol)) (set! (-> self neck flex-blend) 0.0) (target-timed-invulnerable-off self) - (push-setting! *setting-control* self 'process-mask 'set 0.0 #x14a0000) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) (set! (-> self control transv quad) (the-as uint128 0)) (set! (-> self control unknown-surface00) *neutral-mods*) (ja-channel-push! 1 (seconds 0.1)) diff --git a/test/decompiler/reference/levels/swamp/billy_REF.gc b/test/decompiler/reference/levels/swamp/billy_REF.gc index 2e1587ebb0..2f54b46301 100644 --- a/test/decompiler/reference/levels/swamp/billy_REF.gc +++ b/test/decompiler/reference/levels/swamp/billy_REF.gc @@ -952,7 +952,7 @@ ) ) :enter (behavior () - (push-setting! *setting-control* self 'music 'danger 0.0 0) + (add-setting! 'music 'danger 0.0 0) (ja-channel-set! 0) (clear-collide-with-as (-> self root-override)) (init! (-> self query) (the-as string #f) 40 150 25 #t (lookup-text! *common-text* (game-text-id quit) #f)) @@ -1008,7 +1008,7 @@ (restore-collide-with-as (-> self root-override)) (restore-load-state-and-cleanup *load-state*) (set! (-> *ACTOR-bank* birth-max) 1000) - (clear-pending-settings-from-process *setting-control* self 'music) + (remove-setting! 'music) (none) ) :trans (behavior () diff --git a/test/decompiler/reference/levels/title/title-obs_REF.gc b/test/decompiler/reference/levels/title/title-obs_REF.gc index e46e45e002..02e3ef860a 100644 --- a/test/decompiler/reference/levels/title/title-obs_REF.gc +++ b/test/decompiler/reference/levels/title/title-obs_REF.gc @@ -227,7 +227,7 @@ :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (if (= v1-0 'update) - (clear-pending-settings-from-process *setting-control* self 'process-mask) + (remove-setting! 'process-mask) ) ) ) @@ -262,7 +262,7 @@ (suspend) ) (set! (-> *setting-control* current bg-a) 1.0) - (set-setting! *setting-control* self 'bg-a 'abs 0.0 0) + (set-setting! 'bg-a 'abs 0.0 0) (set! (-> self camera-anim) (ppointer->handle (process-spawn logo-slave (-> self entity) *logo-cam-sg* :to self)) ) @@ -330,8 +330,8 @@ (the-as (function process-drawable symbol) false-func) ) (set! *spawn-actors* #f) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) + (add-setting! 'process-mask 'set 0.0 (process-mask progress)) + (apply-settings *setting-control*) (deactivate (handle->process (-> self black))) (deactivate (handle->process (-> self volumes))) (send-event (ppointer->process (-> self parent)) 'wait) @@ -496,14 +496,14 @@ :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (if (= v1-0 'blackout) - (set-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (set-setting! 'bg-a 'abs 1.0 0) ) ) ) ) :enter (behavior () - (set-setting! *setting-control* self 'bg-a 'abs 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'bg-a 'abs 0.0 0) + (apply-settings *setting-control*) (set! (-> self state-time) (-> *display* base-frame-counter)) (if *time-of-day-proc* (set! (-> *time-of-day-proc* 0 hour) 12) @@ -522,7 +522,7 @@ (cpad-pressed? 0 start circle x) (member (level-status *level* 'village1) '(loaded active)) ) - (set-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (set-setting! 'bg-a 'abs 1.0 0) ) (when (and (= (-> *setting-control* current bg-a) 1.0) (and (member (level-status *level* 'village1) '(active loaded)) @@ -591,7 +591,7 @@ (the-as (function process-drawable symbol) false-func) ) (set! (-> self done?) #t) - (set-setting! *setting-control* self 'bg-a 'abs 1.0 0) + (set-setting! 'bg-a 'abs 1.0 0) (anim-loop) (none) ) @@ -691,13 +691,13 @@ (defstate target-title (target) :event target-generic-event-handler :enter (behavior () - (set-setting! *setting-control* self 'music-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'sfx-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'ambient-volume 'abs 0.0 0) - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (set-setting! *setting-control* self 'border-mode #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'border-mode #f 0.0 0) + (apply-settings *setting-control*) (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self manipy) (the-as (pointer manipy) #f)) (ja-channel-set! 0) @@ -768,16 +768,16 @@ (if (zero? (-> s5-2 handle)) (set! gp-1 8) ) - (set-setting! *setting-control* self 'allow-progress #t 0.0 0) + (set-setting! 'allow-progress #t 0.0 0) (set-blackout-frames 0) (set! (-> *setting-control* default bg-a-force) 0.0) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (set! (-> *setting-control* current bg-a) 0.0) (set! (-> *setting-control* current bg-a-force) 0.0) (activate-progress *dproc* (the-as progress-screen gp-1)) ) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (while *progress-process* (suspend) ) @@ -829,8 +829,8 @@ ) ) :enter (behavior () - (set-setting! *setting-control* self 'allow-pause #f 0.0 0) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (none) ) :exit (-> target-title exit) @@ -858,10 +858,10 @@ ) ) :enter (behavior () - (clear-pending-settings-from-process *setting-control* self 'ambient-volume) - (clear-pending-settings-from-process *setting-control* self 'sfx-volume) - (clear-pending-settings-from-process *setting-control* self 'music-volume) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'ambient-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'music-volume) + (remove-setting! 'allow-progress) (sound-group-continue (the-as uint 2)) (when *time-of-day-proc* (set! (-> *time-of-day-proc* 0 time-ratio) 18000.0) @@ -874,7 +874,7 @@ (set! (-> *time-of-day-proc* 0 time-ratio) 300.0) (set! *time-of-day-fast* #f) ) - (clear-pending-settings-from-process *setting-control* self 'allow-pause) + (remove-setting! 'allow-pause) ((-> target-title exit)) (none) ) diff --git a/test/decompiler/reference/levels/training/training-obs_REF.gc b/test/decompiler/reference/levels/training/training-obs_REF.gc index a1637a0f2d..04cd20263e 100644 --- a/test/decompiler/reference/levels/training/training-obs_REF.gc +++ b/test/decompiler/reference/levels/training/training-obs_REF.gc @@ -128,15 +128,15 @@ ) ) ) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (let* ((a0-15 *setting-control*) - (t9-6 (method-of-object a0-15 set-setting!)) + (t9-6 (method-of-object a0-15 set-setting)) (a2-3 'movie) (a3-1 (process->ppointer self)) ) - (t9-6 a0-15 self a2-3 (the-as symbol a3-1) 0.0 0) + (t9-6 a0-15 self a2-3 a3-1 0.0 0) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (dotimes (gp-1 2) (while (or (-> *setting-control* current talking) (-> *setting-control* current spooling) @@ -150,8 +150,8 @@ (while (< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1)) (suspend) ) - (clear-pending-settings-from-process *setting-control* self 'movie) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'movie) + (apply-settings *setting-control*) (suspend) (suspend) ) diff --git a/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc b/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc index 17170a9431..5adfed4380 100644 --- a/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc +++ b/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc @@ -1632,7 +1632,7 @@ (set! (-> self anchored) #t) (set! (-> self propeller enable) #t) (fishermans-boat-play-sounds) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (process-spawn-function process (lambda :behavior fishermans-boat diff --git a/test/decompiler/reference/levels/village1/sage_REF.gc b/test/decompiler/reference/levels/village1/sage_REF.gc index 689b3313d9..7f57a35865 100644 --- a/test/decompiler/reference/levels/village1/sage_REF.gc +++ b/test/decompiler/reference/levels/village1/sage_REF.gc @@ -33,312 +33,310 @@ ;; definition for method 32 of type sage (defmethod play-anim! sage ((obj sage) (arg0 symbol)) - (with-pp - (when (!= *kernel-boot-message* 'play) - (close-specific-task! (game-task intro) (task-status need-resolution)) - (return (new 'static 'spool-anim - :name "sage-introduction-misty-cannon" - :index 8 - :parts 12 - :command-list '((1 blackout 0) - (100 want-levels village1 misty) - (261 joint "cameraB") - (521 joint "camera") - (776 joint "cameraB") - (810 joint "camera") - (1171 joint "cameraB") - (1235 joint "camera") - (1235 save) - (1418 blackout 30) - ) + (when (!= *kernel-boot-message* 'play) + (close-specific-task! (game-task intro) (task-status need-resolution)) + (return (new 'static 'spool-anim + :name "sage-introduction-misty-cannon" + :index 8 + :parts 12 + :command-list '((1 blackout 0) + (100 want-levels village1 misty) + (261 joint "cameraB") + (521 joint "camera") + (776 joint "cameraB") + (810 joint "camera") + (1171 joint "cameraB") + (1235 joint "camera") + (1235 save) + (1418 blackout 30) ) ) - ) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (case (current-task (-> obj tasks)) - (((game-task intro)) - (when arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - (set-setting! *setting-control* pp 'music-volume-movie 'abs 0.0 0) - (copy-settings-from-target! *setting-control*) ) - (new 'static 'spool-anim - :name "sage-intro-sequence-d1" - :index 16 - :parts 17 - :command-list '((0 display-level misty #f) - (0 display-level village1 display) - (0 want-vis vi1) - (0 save) - (0 want-force-inside village1 #t) - (0 want-force-vis village1 #t) - (0 kill "assistant-11") - (0 kill "reflector-middle-2") - (0 kill "eco-11") - (0 kill "eco-10") - (0 kill "sharkey-12") - (0 kill "reflector-end-1") - (0 kill "water-vol-10") - (0 kill "water-vol-8") - (0 kill "water-vol-7") - (0 kill "fishermans-boat-2") - (0 kill "revcycleprop-2") - (0 kill "revcycle-8") - (0 kill "ropebridge-5") - (0 kill "ropebridge-4") - (0 kill "villagea-water-2") - (0 time-of-day 7) - (1 time-of-day -1) - (3 blackout 0) - (25 blackout 0) - (25 want-force-vis village1 #f) - (56 joint "cameraB") - (100 want-force-inside village1 #f) - (107 joint "camera") - (137 joint "cameraB") - (202 joint "camera") - (286 joint "cameraB") - (554 joint "camera") - (633 joint "cameraB") - (711 joint "camera") - (796 joint "cameraB") - (921 joint "camera") - (1021 shadow self #f) - (1021 joint "cameraB") - (1081 joint "camera") - (1183 joint "cameraB") - (1221 joint "camera") - (1496 shadow self #t) - (1496 joint "cameraB") - (1496 time-of-day 18) - (1721 joint "camera") - (1721 time-of-day 7) - (1722 time-of-day -1) - ) + ) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (case (current-task (-> obj tasks)) + (((game-task intro)) + (when arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + (set-setting! 'music-volume-movie 'abs 0.0 0) + (apply-settings *setting-control*) + ) + (new 'static 'spool-anim + :name "sage-intro-sequence-d1" + :index 16 + :parts 17 + :command-list '((0 display-level misty #f) + (0 display-level village1 display) + (0 want-vis vi1) + (0 save) + (0 want-force-inside village1 #t) + (0 want-force-vis village1 #t) + (0 kill "assistant-11") + (0 kill "reflector-middle-2") + (0 kill "eco-11") + (0 kill "eco-10") + (0 kill "sharkey-12") + (0 kill "reflector-end-1") + (0 kill "water-vol-10") + (0 kill "water-vol-8") + (0 kill "water-vol-7") + (0 kill "fishermans-boat-2") + (0 kill "revcycleprop-2") + (0 kill "revcycle-8") + (0 kill "ropebridge-5") + (0 kill "ropebridge-4") + (0 kill "villagea-water-2") + (0 time-of-day 7) + (1 time-of-day -1) + (3 blackout 0) + (25 blackout 0) + (25 want-force-vis village1 #f) + (56 joint "cameraB") + (100 want-force-inside village1 #f) + (107 joint "camera") + (137 joint "cameraB") + (202 joint "camera") + (286 joint "cameraB") + (554 joint "camera") + (633 joint "cameraB") + (711 joint "camera") + (796 joint "cameraB") + (921 joint "camera") + (1021 shadow self #f) + (1021 joint "cameraB") + (1081 joint "camera") + (1183 joint "cameraB") + (1221 joint "camera") + (1496 shadow self #t) + (1496 joint "cameraB") + (1496 time-of-day 18) + (1721 joint "camera") + (1721 time-of-day 7) + (1722 time-of-day -1) ) ) - (((game-task beach-ecorocks)) - (when arg0 - (let* ((s5-1 (-> obj tasks)) - (s4-0 (method-of-object s5-1 save-reminder)) - ) - (s4-0 s5-1 (the int (the-as float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 1) - ) - (close-status! (-> obj tasks) (task-status need-introduction)) - ) - (new 'static 'spool-anim - :name "sage-intro-sequence-e" - :index 14 - :parts 13 - :command-list '((0 want-levels village1 beach) - (0 blackout 0) - (197 joint "cameraB") - (361 joint "camera") - (660 joint "cameraB") - (937 display-level beach movie) - (937 want-force-vis beach #t) - (938 alive "ecoventrock-3") - (938 alive "ecoventrock-4") - (938 alive "ecoventrock-5") - (938 alive "ecoventrock-6") - (938 alive "ecoventrock-7") - (938 alive "harvester-87") - (938 alive "harvester-88") - (938 alive "harvester-89") - (938 alive "harvester-90") - (938 alive "harvester-91") - (940 joint "camera") - (1160 joint "cameraB") - (1162 dead "ecoventrock-3") - (1162 dead "ecoventrock-4") - (1162 dead "ecoventrock-5") - (1162 dead "ecoventrock-6") - (1162 dead "ecoventrock-7") - (1162 dead "harvester-87") - (1162 dead "harvester-88") - (1162 dead "harvester-89") - (1162 dead "harvester-90") - (1162 dead "harvester-91") - (1310 joint "camera") - (1313 want-force-vis beach #f) - (1313 display-level beach #f) - (1313 send-event "warp-gate-switch-3" 'hide) - ) - ) - ) - (else - (if arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - ) - (new 'static 'spool-anim - :name "sage-introduction-misty-cannon" - :index 8 - :parts 12 - :command-list '((0 want-levels village1 beach) - (261 joint "cameraB") - (521 joint "camera") - (776 joint "cameraB") - (810 joint "camera") - (1171 joint "cameraB") - (1235 joint "camera") - ) - ) - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (if arg0 - (set! (-> obj reminder-played) #t) - ) - (case (get-reminder (-> obj tasks) 0) - ((3) - (new 'static 'spool-anim :name "sage-reminder-2-generic" :index 13 :parts 4 :command-list '()) - ) - ((2) - (new 'static 'spool-anim :name "sage-reminder-1-generic" :index 12 :parts 3 :command-list '()) - ) - ((1) - (new 'static 'spool-anim - :name "sage-reminder-1-misty-cannon" - :index 9 - :parts 5 - :command-list '((86 joint "cameraB") (320 joint "camera")) - ) - ) - (else - (new 'static 'spool-anim - :name "sage-reminder-1-ecorocks" - :index 11 - :parts 4 - :command-list '((0 want-levels village1 beach) - (245 display-level beach movie) - (245 want-force-vis beach #t) - (246 alive "ecoventrock-3") - (246 alive "ecoventrock-4") - (246 alive "ecoventrock-5") - (246 alive "ecoventrock-6") - (246 alive "ecoventrock-7") - (246 alive "harvester-87") - (246 alive "harvester-88") - (246 alive "harvester-89") - (246 alive "harvester-90") - (246 alive "harvester-91") - (246 joint "cameraB") - (365 want-force-vis beach #f) - (365 display-level beach #f) - (366 joint "camera") - ) - ) - ) - ) - ) - (((task-status need-reward-speech)) - (when arg0 - (set-setting! *setting-control* pp 'music-volume-movie 'abs 0.0 0) - (copy-settings-from-target! *setting-control*) - (close-status! (-> obj tasks) (task-status need-reward-speech)) - (set! (-> obj assistant) - (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *assistant-sg* #f :to obj)) - ) - (send-event (handle->process (-> obj assistant)) 'anim-mode 'clone-anim) - (send-event (handle->process (-> obj assistant)) 'blend-shape #t) - (send-event (handle->process (-> obj assistant)) 'center-joint 3) - (let ((v1-68 (handle->process (-> obj assistant)))) - (if v1-68 - (set! (-> (the-as assistant v1-68) draw light-index) (the-as uint 1)) - ) - ) - (set! (-> obj draw bounds w) 40960.0) - ) - (new 'static 'spool-anim - :name "sage-intro-sequence-d2" - :index 15 - :parts 20 - :command-list '((0 want-levels village1 beach) - (0 kill "assistant-11") - (0 kill "reflector-middle-2") - (0 kill "eco-11") - (0 kill "eco-10") - (0 kill "sharkey-12") - (0 kill "reflector-end-1") - (0 kill "water-vol-10") - (0 kill "water-vol-8") - (0 kill "water-vol-7") - (0 kill "fishermans-boat-2") - (0 kill "revcycleprop-2") - (0 kill "revcycle-8") - (113 joint "cameraB") - (232 joint "camera") - (289 joint "cameraB") - (338 joint "camera") - (405 joint "cameraB") - (560 joint "camera") - (660 joint "cameraB") - (699 joint "camera") - (837 joint "cameraB") - (837 shadow self #f) - (910 joint "camera") - (945 alive "farmer-3") - (945 alive "hutlamp-2") - (950 joint "cameraB") - (974 display-level beach movie) - (974 want-force-vis beach #t) - (1011 alive "bird-lady-4") - (1015 joint "camera") - (1018 dead "farmer-3") - (1018 dead "hutlamp-2") - (1075 alive "explorer-4") - (1080 joint "cameraB") - (1080 want-force-vis beach #f) - (1080 display-level beach #f) - (1082 dead "bird-lady-4") - (1133 joint "camera") - (1135 dead "explorer-4") - (1244 display-level beach movie) - (1244 want-force-vis beach #t) - (1245 alive "fuel-cell-42") - (1246 joint "cameraB") - (1369 joint "camera") - (1438 alive "fuel-cell-42") - (1438 want-force-vis beach #f) - (1438 dead "fuel-cell-42") - (1438 kill "villagea-water-2") - (1438 kill "crate-3147") - (1438 kill "crate-3146") - (1438 kill "crate-3143") - (1438 kill "sagesail-6") - (1438 kill "windmill-sail-4") - (1438 kill "ropebridge-4") - (1438 kill "ropebridge-5") - (1438 kill "windspinner-8") - (1438 kill "windspinner-9") - (1438 joint "cameraB") - (1439 want-levels village1 training) - (1439 save) - (1529 joint "camera") - (1691 joint "cameraB") - (1753 joint "camera") - (1874 joint "cameraB") - (2057 joint "camera") - (2176 joint "cameraB") - (2226 joint "camera") - (2226 shadow self #t) - ) - ) - ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) - ) - ) - (get-art-elem obj) ) + (((game-task beach-ecorocks)) + (when arg0 + (let* ((s5-1 (-> obj tasks)) + (s4-0 (method-of-object s5-1 save-reminder)) + ) + (s4-0 s5-1 (the int (the-as float (send-event *target* 'query 'pickup (pickup-type fuel-cell)))) 1) + ) + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "sage-intro-sequence-e" + :index 14 + :parts 13 + :command-list '((0 want-levels village1 beach) + (0 blackout 0) + (197 joint "cameraB") + (361 joint "camera") + (660 joint "cameraB") + (937 display-level beach movie) + (937 want-force-vis beach #t) + (938 alive "ecoventrock-3") + (938 alive "ecoventrock-4") + (938 alive "ecoventrock-5") + (938 alive "ecoventrock-6") + (938 alive "ecoventrock-7") + (938 alive "harvester-87") + (938 alive "harvester-88") + (938 alive "harvester-89") + (938 alive "harvester-90") + (938 alive "harvester-91") + (940 joint "camera") + (1160 joint "cameraB") + (1162 dead "ecoventrock-3") + (1162 dead "ecoventrock-4") + (1162 dead "ecoventrock-5") + (1162 dead "ecoventrock-6") + (1162 dead "ecoventrock-7") + (1162 dead "harvester-87") + (1162 dead "harvester-88") + (1162 dead "harvester-89") + (1162 dead "harvester-90") + (1162 dead "harvester-91") + (1310 joint "camera") + (1313 want-force-vis beach #f) + (1313 display-level beach #f) + (1313 send-event "warp-gate-switch-3" 'hide) + ) + ) + ) + (else + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "sage-introduction-misty-cannon" + :index 8 + :parts 12 + :command-list '((0 want-levels village1 beach) + (261 joint "cameraB") + (521 joint "camera") + (776 joint "cameraB") + (810 joint "camera") + (1171 joint "cameraB") + (1235 joint "camera") + ) + ) + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (if arg0 + (set! (-> obj reminder-played) #t) + ) + (case (get-reminder (-> obj tasks) 0) + ((3) + (new 'static 'spool-anim :name "sage-reminder-2-generic" :index 13 :parts 4 :command-list '()) + ) + ((2) + (new 'static 'spool-anim :name "sage-reminder-1-generic" :index 12 :parts 3 :command-list '()) + ) + ((1) + (new 'static 'spool-anim + :name "sage-reminder-1-misty-cannon" + :index 9 + :parts 5 + :command-list '((86 joint "cameraB") (320 joint "camera")) + ) + ) + (else + (new 'static 'spool-anim + :name "sage-reminder-1-ecorocks" + :index 11 + :parts 4 + :command-list '((0 want-levels village1 beach) + (245 display-level beach movie) + (245 want-force-vis beach #t) + (246 alive "ecoventrock-3") + (246 alive "ecoventrock-4") + (246 alive "ecoventrock-5") + (246 alive "ecoventrock-6") + (246 alive "ecoventrock-7") + (246 alive "harvester-87") + (246 alive "harvester-88") + (246 alive "harvester-89") + (246 alive "harvester-90") + (246 alive "harvester-91") + (246 joint "cameraB") + (365 want-force-vis beach #f) + (365 display-level beach #f) + (366 joint "camera") + ) + ) + ) + ) + ) + (((task-status need-reward-speech)) + (when arg0 + (set-setting! 'music-volume-movie 'abs 0.0 0) + (apply-settings *setting-control*) + (close-status! (-> obj tasks) (task-status need-reward-speech)) + (set! (-> obj assistant) + (ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *assistant-sg* #f :to obj)) + ) + (send-event (handle->process (-> obj assistant)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj assistant)) 'blend-shape #t) + (send-event (handle->process (-> obj assistant)) 'center-joint 3) + (let ((v1-68 (handle->process (-> obj assistant)))) + (if v1-68 + (set! (-> (the-as assistant v1-68) draw light-index) (the-as uint 1)) + ) + ) + (set! (-> obj draw bounds w) 40960.0) + ) + (new 'static 'spool-anim + :name "sage-intro-sequence-d2" + :index 15 + :parts 20 + :command-list '((0 want-levels village1 beach) + (0 kill "assistant-11") + (0 kill "reflector-middle-2") + (0 kill "eco-11") + (0 kill "eco-10") + (0 kill "sharkey-12") + (0 kill "reflector-end-1") + (0 kill "water-vol-10") + (0 kill "water-vol-8") + (0 kill "water-vol-7") + (0 kill "fishermans-boat-2") + (0 kill "revcycleprop-2") + (0 kill "revcycle-8") + (113 joint "cameraB") + (232 joint "camera") + (289 joint "cameraB") + (338 joint "camera") + (405 joint "cameraB") + (560 joint "camera") + (660 joint "cameraB") + (699 joint "camera") + (837 joint "cameraB") + (837 shadow self #f) + (910 joint "camera") + (945 alive "farmer-3") + (945 alive "hutlamp-2") + (950 joint "cameraB") + (974 display-level beach movie) + (974 want-force-vis beach #t) + (1011 alive "bird-lady-4") + (1015 joint "camera") + (1018 dead "farmer-3") + (1018 dead "hutlamp-2") + (1075 alive "explorer-4") + (1080 joint "cameraB") + (1080 want-force-vis beach #f) + (1080 display-level beach #f) + (1082 dead "bird-lady-4") + (1133 joint "camera") + (1135 dead "explorer-4") + (1244 display-level beach movie) + (1244 want-force-vis beach #t) + (1245 alive "fuel-cell-42") + (1246 joint "cameraB") + (1369 joint "camera") + (1438 alive "fuel-cell-42") + (1438 want-force-vis beach #f) + (1438 dead "fuel-cell-42") + (1438 kill "villagea-water-2") + (1438 kill "crate-3147") + (1438 kill "crate-3146") + (1438 kill "crate-3143") + (1438 kill "sagesail-6") + (1438 kill "windmill-sail-4") + (1438 kill "ropebridge-4") + (1438 kill "ropebridge-5") + (1438 kill "windspinner-8") + (1438 kill "windspinner-9") + (1438 joint "cameraB") + (1439 want-levels village1 training) + (1439 save) + (1529 joint "camera") + (1691 joint "cameraB") + (1753 joint "camera") + (1874 joint "cameraB") + (2057 joint "camera") + (2176 joint "cameraB") + (2226 joint "camera") + (2226 shadow self #t) + ) + ) + ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (current-status (-> obj tasks))) + ) + ) + (get-art-elem obj) ) ) ) @@ -521,7 +519,7 @@ ((-> (method-of-type process-taskable play-anim) exit)) (case (get-task-status (game-task intro)) (((task-status need-resolution)) - (clear-pending-settings-from-process *setting-control* self 'music-volume-movie) + (remove-setting! 'music-volume-movie) (close-specific-task! (game-task intro) (task-status need-resolution)) (start 'play (get-continue-by-name *game-info* "game-start")) ) diff --git a/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc b/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc index 9f7fb065dc..929c6589fa 100644 --- a/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc +++ b/test/decompiler/reference/levels/village1/sequence-a-village1_REF.gc @@ -381,9 +381,9 @@ (set! (-> self cur-trans-hook) sequenceA-village1-trans-hook) (logclear! (-> self mask) (process-mask pause actor-pause)) (set! (-> self been-kicked) #t) - (set-setting! *setting-control* self 'music-volume-movie 'abs 0.0 0) - (set-setting! *setting-control* self 'sfx-volume-movie 'abs 0.0 0) - (set-setting! *setting-control* self 'ambient-volume-movie 'abs 0.0 0) + (set-setting! 'music-volume-movie 'abs 0.0 0) + (set-setting! 'sfx-volume-movie 'abs 0.0 0) + (set-setting! 'ambient-volume-movie 'abs 0.0 0) (go-virtual hidden) (none) ) diff --git a/test/decompiler/reference/levels/village2/swamp-blimp_REF.gc b/test/decompiler/reference/levels/village2/swamp-blimp_REF.gc index ea5cf030e3..8cf7eff5ba 100644 --- a/test/decompiler/reference/levels/village2/swamp-blimp_REF.gc +++ b/test/decompiler/reference/levels/village2/swamp-blimp_REF.gc @@ -798,18 +798,18 @@ ;; failed to figure out what this is: (defstate swamp-tetherrock-break (swamp-tetherrock) :exit (behavior () - (clear-pending-settings-from-process *setting-control* self 'movie) - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'movie) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) (none) ) :code (behavior () (let ((gp-0 (tetherrock-get-info (-> self entity)))) (hide-hud-quick) (process-grab? *target*) - (set-setting! *setting-control* self 'movie (the-as symbol (process->ppointer self)) 0.0 0) - (set-setting! *setting-control* self 'process-mask 'set 0.0 #x80800) - (copy-settings-from-target! *setting-control*) + (set-setting! 'movie (process->ppointer self) 0.0 0) + (set-setting! 'process-mask 'set 0.0 (process-mask movie platform)) + (apply-settings *setting-control*) (let* ((s4-0 (get-task-control (game-task swamp-tether-1))) (s5-0 (+ (get-reminder s4-0 0) 1)) ) diff --git a/test/decompiler/reference/levels/village3/village3-obs_REF.gc b/test/decompiler/reference/levels/village3/village3-obs_REF.gc index 9ab4a66398..66fdfc7507 100644 --- a/test/decompiler/reference/levels/village3/village3-obs_REF.gc +++ b/test/decompiler/reference/levels/village3/village3-obs_REF.gc @@ -285,7 +285,7 @@ (when (send-event *target* 'clone-anim self) (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) (send-event *target* 'blend-shape #t) - (set-setting! *setting-control* self 'sound-flava #f 30.0 4) + (set-setting! 'sound-flava #f 30.0 (music-flava to-snow)) (logclear! (-> self mask) (process-mask enemy)) (process-spawn othercam self 4 #f #t :to self) (ja-play-spooled-anim @@ -294,7 +294,7 @@ (the-as art-joint-anim (-> self draw art-group data 4)) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (send-event *target* 'blend-shape #f) (when *target* (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) @@ -329,7 +329,7 @@ (send-event *target* 'trans 'save (-> self old-target-pos)) (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) (send-event *target* 'blend-shape #t) - (set-setting! *setting-control* self 'sound-flava #f 30.0 4) + (set-setting! 'sound-flava #f 30.0 (music-flava to-snow)) (logclear! (-> self mask) (process-mask enemy)) (process-spawn othercam self 4 #f #t :to self) (ja-play-spooled-anim @@ -338,7 +338,7 @@ (the-as art-joint-anim (-> self draw art-group data 3)) (the-as (function process-drawable symbol) false-func) ) - (clear-pending-settings-from-process *setting-control* self 'sound-flava) + (remove-setting! 'sound-flava) (send-event *target* 'blend-shape #f) (when *target* (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) diff --git a/test/decompiler/reference/levels/village_common/villagep-obs_REF.gc b/test/decompiler/reference/levels/village_common/villagep-obs_REF.gc index 597b512d3c..07c9294b2d 100644 --- a/test/decompiler/reference/levels/village_common/villagep-obs_REF.gc +++ b/test/decompiler/reference/levels/village_common/villagep-obs_REF.gc @@ -130,7 +130,7 @@ ) ) :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (set! (-> self state-time) (-> *display* base-frame-counter)) (loop (when (and (and *target* (>= 20480.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))) @@ -252,8 +252,8 @@ (defstate active (warp-gate) :virtual #t :enter (behavior () - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) - (copy-settings-from-target! *setting-control*) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) (set! (-> self state-time) (-> *display* base-frame-counter)) (none) @@ -1032,15 +1032,15 @@ ) ) ) - (set-setting! *setting-control* self 'allow-progress #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) (let* ((a0-25 *setting-control*) - (t9-14 (method-of-object a0-25 set-setting!)) + (t9-14 (method-of-object a0-25 set-setting)) (a2-5 'movie) (a3-1 (process->ppointer self)) ) - (t9-14 a0-25 self a2-5 (the-as symbol a3-1) 0.0 0) + (t9-14 a0-25 self a2-5 a3-1 0.0 0) ) - (copy-settings-from-target! *setting-control*) + (apply-settings *setting-control*) (while (or (-> *setting-control* current talking) (-> *setting-control* current spooling) (-> *setting-control* current hint) @@ -1058,8 +1058,8 @@ (suspend) (kill-current-level-hint '() '() 'die) (process-release? *target*) - (clear-pending-settings-from-process *setting-control* self 'movie) - (copy-settings-from-target! *setting-control*) + (remove-setting! 'movie) + (apply-settings *setting-control*) (suspend) (suspend) ) @@ -1178,7 +1178,7 @@ (when (zero? (-> self index)) (let ((a0-70 (-> self entity extra perm))) (when (= (-> a0-70 user-uint8 0) 1) - (clear-pending-settings-from-process *setting-control* self 'allow-progress) + (remove-setting! 'allow-progress) (let ((gp-3 (-> *display* base-frame-counter))) (until (>= (- (-> *display* base-frame-counter) gp-3) (seconds 300)) (suspend)