From 993f348c93beee6b8925b2550f4382b1778b4856 Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Sat, 16 Oct 2021 15:12:01 -0400 Subject: [PATCH] [decomp] recognize most cases send-event macro (#906) * recognize send-event macro * missing forward def * resolve merge conflicts --- decompiler/IR2/Form.cpp | 2 + decompiler/IR2/Form.h | 1 + decompiler/IR2/IR2_common.h | 1 + decompiler/analysis/insert_lets.cpp | 159 + decompiler/util/data_decompile.cpp | 32 +- goal_src/engine/camera/cam-interface.gc | 8 +- goal_src/engine/debug/anim-tester.gc | 2757 +++++++------- goal_src/engine/game/game-info.gc | 79 +- goal_src/engine/game/projectiles.gc | 221 +- goal_src/engine/game/task/process-taskable.gc | 172 +- goal_src/engine/target/logic-target.gc | 73 +- goal_src/engine/ui/hud-classes.gc | 794 ++-- goal_src/kernel/gstate.gc | 2 +- goal_src/levels/beach/beach-part.gc | 23 +- goal_src/levels/beach/beach-rocks.gc | 51 +- goal_src/levels/beach/bird-lady-beach.gc | 217 +- goal_src/levels/beach/mayor.gc | 3198 ++++++++--------- goal_src/levels/beach/sculptor.gc | 331 +- goal_src/levels/citadel/assistant-citadel.gc | 27 +- goal_src/levels/citadel/citb-drop-plat-CIT.gc | 35 +- goal_src/levels/common/basebutton.gc | 88 +- goal_src/levels/common/baseplat.gc | 9 +- goal_src/levels/common/battlecontroller.gc | 39 +- goal_src/levels/common/nav-enemy.gc | 60 +- goal_src/levels/common/plat-button.gc | 17 +- goal_src/levels/common/sharkey.gc | 7 +- goal_src/levels/common/water-anim.gc | 476 +-- goal_src/levels/finalboss/final-door.gc | 51 +- goal_src/levels/finalboss/green-eco-lurker.gc | 162 +- goal_src/levels/finalboss/light-eco.gc | 26 +- goal_src/levels/finalboss/robotboss-misc.gc | 140 +- goal_src/levels/finalboss/robotboss-weapon.gc | 95 +- goal_src/levels/finalboss/robotboss.gc | 201 +- goal_src/levels/flut_common/flutflut.gc | 50 +- goal_src/levels/intro/evilbro.gc | 72 +- goal_src/levels/jungle/bouncer.gc | 20 +- goal_src/levels/jungle/jungle-elevator.gc | 29 +- goal_src/levels/jungleb/aphid.gc | 57 +- goal_src/levels/jungleb/plat-flip.gc | 20 +- goal_src/levels/lavatube/lavatube-part.gc | 40 +- goal_src/levels/maincave/baby-spider.gc | 18 +- goal_src/levels/maincave/spiderwebs.gc | 44 +- goal_src/levels/misty/bonelurker.gc | 8 +- goal_src/levels/misty/misty-part.gc | 80 +- goal_src/levels/misty/muse.gc | 57 +- goal_src/levels/misty/sidekick-human.gc | 337 +- goal_src/levels/ogre/flying-lurker.gc | 235 +- goal_src/levels/sunken/qbert-plat.gc | 156 +- goal_src/levels/sunken/square-platform.gc | 8 +- goal_src/levels/sunken/wall-plat.gc | 24 +- goal_src/levels/sunken/wedge-plats.gc | 16 +- goal_src/levels/swamp/swamp-bat.gc | 15 +- goal_src/levels/swamp/swamp-rat-nest.gc | 38 +- goal_src/levels/swamp/swamp-rat.gc | 49 +- goal_src/levels/training/training-part.gc | 81 +- goal_src/levels/village1/explorer.gc | 215 +- goal_src/levels/village1/fishermans-boat.gc | 261 +- goal_src/levels/village1/sage.gc | 33 +- goal_src/levels/village1/village1-part.gc | 136 +- goal_src/levels/village1/village1-part2.gc | 75 +- goal_src/levels/village1/yakow.gc | 15 +- .../levels/village2/assistant-village2.gc | 90 +- goal_src/levels/village2/gambler.gc | 370 +- goal_src/levels/village2/geologist.gc | 298 +- goal_src/levels/village2/sage-bluehut.gc | 17 +- goal_src/levels/village2/sunken-elevator.gc | 25 +- goal_src/levels/village2/village2-part.gc | 182 +- goal_src/levels/village2/warrior.gc | 32 +- goal_src/levels/village3/miners.gc | 95 +- goal_src/levels/village3/sage-village3.gc | 72 +- goal_src/levels/village3/village3-part.gc | 281 +- goal_src/levels/village_common/oracle.gc | 1265 +++---- .../decompiler/reference/decompiler-macros.gc | 16 + .../engine/ambient/weather-part_REF.gc | 117 +- .../engine/camera/cam-interface_REF.gc | 8 +- .../reference/engine/debug/anim-tester_REF.gc | 2635 +++++++------- .../engine/entity/actor-link-h_REF.gc | 42 +- .../engine/game/effect-control_REF.gc | 8 +- .../reference/engine/game/game-info_REF.gc | 1204 +++---- .../reference/engine/game/projectiles_REF.gc | 217 +- .../engine/game/task/process-taskable_REF.gc | 76 +- .../engine/target/logic-target_REF.gc | 73 +- .../reference/engine/ui/hud-classes_REF.gc | 794 ++-- .../reference/levels/beach/beach-part_REF.gc | 3 +- .../reference/levels/beach/beach-rocks_REF.gc | 13 +- .../levels/beach/bird-lady-beach_REF.gc | 195 +- .../reference/levels/beach/mayor_REF.gc | 3198 ++++++++--------- .../reference/levels/beach/sculptor_REF.gc | 331 +- .../levels/citadel/assistant-citadel_REF.gc | 7 +- .../levels/citadel/citb-drop-plat-CIT_REF.gc | 35 +- .../reference/levels/common/basebutton_REF.gc | 35 +- .../reference/levels/common/baseplat_REF.gc | 9 +- .../levels/common/battlecontroller_REF.gc | 39 +- .../reference/levels/common/nav-enemy_REF.gc | 60 +- .../levels/common/plat-button_REF.gc | 17 +- .../reference/levels/common/sharkey_REF.gc | 7 +- .../reference/levels/common/water-anim_REF.gc | 69 +- .../levels/finalboss/final-door_REF.gc | 51 +- .../levels/finalboss/green-eco-lurker_REF.gc | 162 +- .../levels/finalboss/light-eco_REF.gc | 26 +- .../levels/finalboss/robotboss-misc_REF.gc | 140 +- .../levels/finalboss/robotboss-weapon_REF.gc | 95 +- .../levels/finalboss/robotboss_REF.gc | 201 +- .../levels/flut_common/flutflut_REF.gc | 33 +- .../reference/levels/intro/evilbro_REF.gc | 49 +- .../reference/levels/jungle/bouncer_REF.gc | 20 +- .../reference/levels/jungle/fisher-JUN_REF.gc | 165 +- .../levels/jungle/jungle-elevator_REF.gc | 15 +- .../reference/levels/jungleb/aphid_REF.gc | 34 +- .../reference/levels/jungleb/plat-flip_REF.gc | 8 +- .../levels/lavatube/lavatube-part_REF.gc | 6 +- .../levels/maincave/baby-spider_REF.gc | 18 +- .../levels/maincave/spiderwebs_REF.gc | 44 +- .../reference/levels/misty/bonelurker_REF.gc | 8 +- .../reference/levels/misty/misty-part_REF.gc | 12 +- .../reference/levels/misty/muse_REF.gc | 57 +- .../levels/misty/sidekick-human_REF.gc | 337 +- .../levels/ogre/flying-lurker_REF.gc | 150 +- .../reference/levels/sunken/qbert-plat_REF.gc | 156 +- .../levels/sunken/square-platform_REF.gc | 8 +- .../reference/levels/sunken/wall-plat_REF.gc | 24 +- .../levels/sunken/wedge-plats_REF.gc | 16 +- .../reference/levels/swamp/swamp-bat_REF.gc | 15 +- .../levels/swamp/swamp-rat-nest_REF.gc | 38 +- .../reference/levels/swamp/swamp-rat_REF.gc | 49 +- .../levels/training/training-part_REF.gc | 3 +- .../reference/levels/village1/explorer_REF.gc | 215 +- .../levels/village1/fishermans-boat_REF.gc | 261 +- .../reference/levels/village1/sage_REF.gc | 33 +- .../levels/village1/village1-part2_REF.gc | 3 +- .../levels/village1/village1-part_REF.gc | 3 +- .../reference/levels/village1/yakow_REF.gc | 15 +- .../levels/village2/assistant-village2_REF.gc | 90 +- .../reference/levels/village2/gambler_REF.gc | 370 +- .../levels/village2/geologist_REF.gc | 298 +- .../levels/village2/sage-bluehut_REF.gc | 17 +- .../levels/village2/sunken-elevator_REF.gc | 7 +- .../levels/village2/village2-part_REF.gc | 12 +- .../reference/levels/village2/warrior_REF.gc | 32 +- .../reference/levels/village3/miners_REF.gc | 95 +- .../levels/village3/sage-village3_REF.gc | 72 +- .../levels/village3/village3-part_REF.gc | 27 +- .../levels/village_common/oracle_REF.gc | 1235 +++---- 143 files changed, 11526 insertions(+), 16877 deletions(-) diff --git a/decompiler/IR2/Form.cpp b/decompiler/IR2/Form.cpp index 0cb41548fc..0778f8b3e8 100644 --- a/decompiler/IR2/Form.cpp +++ b/decompiler/IR2/Form.cpp @@ -1846,6 +1846,8 @@ std::string fixed_operator_to_string(FixedOperatorKind kind) { return "process->handle"; case FixedOperatorKind::PPOINTER_TO_PROCESS: return "ppointer->process"; + case FixedOperatorKind::SEND_EVENT: + return "send-event"; default: assert(false); return ""; diff --git a/decompiler/IR2/Form.h b/decompiler/IR2/Form.h index 8568b878ab..f146c75e5a 100644 --- a/decompiler/IR2/Form.h +++ b/decompiler/IR2/Form.h @@ -1452,6 +1452,7 @@ class StackStructureDefElement : public FormElement { std::vector* result, bool allow_side_effects) override; const TypeSpec& type() const { return m_entry.ref_type; } + const StackStructureEntry& entry() const { return m_entry; } private: StackStructureEntry m_entry; diff --git a/decompiler/IR2/IR2_common.h b/decompiler/IR2/IR2_common.h index cbf1c3fdda..d4bb795ba6 100644 --- a/decompiler/IR2/IR2_common.h +++ b/decompiler/IR2/IR2_common.h @@ -165,6 +165,7 @@ enum class FixedOperatorKind { PROCESS_TO_HANDLE, PPOINTER_TO_PROCESS, VECTOR_4_DOT, + SEND_EVENT, INVALID }; diff --git a/decompiler/analysis/insert_lets.cpp b/decompiler/analysis/insert_lets.cpp index 77c45a63e4..1651798cf1 100644 --- a/decompiler/analysis/insert_lets.cpp +++ b/decompiler/analysis/insert_lets.cpp @@ -170,6 +170,160 @@ FormElement* rewrite_as_dotimes(LetElement* in, const Env& env, FormPool& pool) mr.maps.forms.at(1), body); } +FormElement* rewrite_as_send_event(LetElement* in, const Env& env, FormPool& pool) { + if (in->entries().size() != 1) { + return nullptr; + } + + // (let ((block-var (new 'stack-no-clear 'event-message-block)) + auto block_var = in->entries().at(0).dest; + auto block_var_name = env.get_variable_name(block_var); + auto block_src = in->entries().at(0).src->try_as_element(); + if (!block_src) { + return nullptr; + } + + auto& e = block_src->entry(); + if (e.ref_type != TypeSpec("event-message-block")) { + return nullptr; + } + + if (e.hint.container_type != StackStructureHint::ContainerType::NONE) { + return nullptr; + } + + auto body = in->body(); + if (body->size() < 4) { // from, num-params, message, call + // fmt::print(" fail: size\n"); + return nullptr; + } + + //////////////////////////////////////////////////////// + // (set! (-> block-var from) ) + Matcher set_from_matcher = + Matcher::set(Matcher::deref(Matcher::any_reg(0), false, {DerefTokenMatcher::string("from")}), + Matcher::any_reg(1)); + Form set_from_hack_body; + set_from_hack_body.elts().push_back(body->at(0)); + auto from_mr = match(set_from_matcher, &set_from_hack_body); + if (!from_mr.matched) { + // fmt::print(" fail: from1\n"); + return nullptr; + } + + if (env.get_variable_name(*from_mr.maps.regs.at(0)) != block_var_name) { + // fmt::print(" fail: from2\n"); + return nullptr; + } + + auto from_var = *from_mr.maps.regs.at(1); + if (from_var.reg() != Register(Reg::GPR, Reg::S6)) { + // fmt::print(" fail: from3\n"); + return nullptr; + } + + //////////////////////////////////////////////////////// + // (set! (-> a1-14 num-params) param-count) where param-count is a constant integer + Matcher set_num_params_matcher = Matcher::set( + Matcher::deref(Matcher::any_reg(0), false, {DerefTokenMatcher::string("num-params")}), + Matcher::any_integer(1)); + Form set_num_params_hack_body; + set_num_params_hack_body.elts().push_back(body->at(1)); + auto num_params_mr = match(set_num_params_matcher, &set_num_params_hack_body); + if (!num_params_mr.matched) { + // fmt::print(" fail: pc1\n"); + return nullptr; + } + if (env.get_variable_name(*num_params_mr.maps.regs.at(0)) != block_var_name) { + // fmt::print(" fail: pc2\n"); + return nullptr; + } + int param_count = num_params_mr.maps.ints.at(1); + assert(param_count >= 0 && param_count < 7); + if (body->size() != 4 + param_count) { + // fmt::print(" fail: pc3\n"); + return nullptr; + } + + //////////////////////////////////////////////////////// + // (set! (-> a1-14 message) the-message-name) + Matcher set_message_matcher = Matcher::set( + Matcher::deref(Matcher::any_reg(0), false, {DerefTokenMatcher::string("message")}), + Matcher::any(1)); + Form set_message_hack_body; + set_message_hack_body.elts().push_back(body->at(2)); + auto set_message_mr = match(set_message_matcher, &set_message_hack_body); + if (!set_message_mr.matched) { + // fmt::print(" fail: msg1\n"); + return nullptr; + } + if (env.get_variable_name(*set_message_mr.maps.regs.at(0)) != block_var_name) { + // fmt::print(" fail: msg2\n"); + return nullptr; + } + Form* message_name = set_message_mr.maps.forms.at(1); + + //////////////////////////////////////////////////////// + // (set! (-> a1-14 param X) the-param-value) + std::vector param_values; + for (int param_idx = 0; param_idx < param_count; param_idx++) { + auto set_form = body->at(3 + param_idx); + Matcher set_param_matcher = Matcher::set( + Matcher::deref(Matcher::any_reg(0), false, + {DerefTokenMatcher::string("param"), DerefTokenMatcher::integer(param_idx)}), + Matcher::any(1)); + Form set_param_hack_body; + set_param_hack_body.elts().push_back(set_form); + auto set_param_mr = match(set_param_matcher, &set_param_hack_body); + if (!set_param_mr.matched) { + // fmt::print(" fail: pv {} 1: {}\n", param_idx, set_form->to_string(env)); + return nullptr; + } + if (env.get_variable_name(*set_param_mr.maps.regs.at(0)) != block_var_name) { + // fmt::print(" fail: pv {} 2\n", param_idx); + return nullptr; + } + + auto param_val = set_param_mr.maps.forms.at(1); + auto param_val_cast = param_val->try_as_element(); + // strip uint cast, if we have it. + if (param_val_cast && param_val_cast->type() == TypeSpec("uint")) { + param_val = param_val_cast->source(); + } + param_values.push_back(param_val); + } + + //////////////////////////////////////////////////////// + // (send-event-function ) + Matcher call_matcher = Matcher::op(GenericOpMatcher::func(Matcher::symbol("send-event-function")), + {Matcher::any(0), Matcher::any_reg(1)}); + Form call_hack_body; + call_hack_body.elts().push_back(body->at(3 + param_count)); + auto call_mr = match(call_matcher, &call_hack_body); + if (!call_mr.matched) { + // fmt::print(" fail: call1: {}\n", body->at(3 + param_count)->to_string(env)); + return nullptr; + } + + if (env.get_variable_name(*call_mr.maps.regs.at(1)) != block_var_name) { + // fmt::print(" fail: call2\n"); + return nullptr; + } + + Form* send_destination = call_mr.maps.forms.at(0); + + // time to build the macro! + std::vector macro_args = {send_destination, message_name}; + for (int i = 0; i < param_count; i++) { + macro_args.push_back(param_values.at(i)); + } + + auto oper = GenericOperator::make_fixed(FixedOperatorKind::SEND_EVENT); + return pool.alloc_element(oper, macro_args); + + return nullptr; +} + FormElement* rewrite_as_countdown(LetElement* in, const Env& env, FormPool& pool) { // dotimes OpenGOAL: /* @@ -664,6 +818,11 @@ FormElement* rewrite_let(LetElement* in, const Env& env, FormPool& pool) { return as_set_vector2; } + auto as_send_event = rewrite_as_send_event(in, env, pool); + if (as_send_event) { + return as_send_event; + } + // nothing matched. return nullptr; } diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index 90ccb2fb85..302db31f5f 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -10,6 +10,7 @@ #include "decompiler/IR2/Form.h" #include "decompiler/analysis/final_output.h" #include "decompiler/util/sparticle_decompile.h" +#include "common/util/assert.h" namespace decompiler { @@ -890,12 +891,31 @@ goos::Object decompile_value(const TypeSpec& type, auto as_bitfield = dynamic_cast(ts.lookup_type(type)); if (as_bitfield) { - assert((int)bytes.size() == as_bitfield->get_load_size()); - assert(bytes.size() <= 8); - u64 value = 0; - memcpy(&value, bytes.data(), bytes.size()); - auto defs = decompile_bitfield_from_int(type, ts, value); - return bitfield_defs_print(type, defs); + if (as_bitfield->get_name() == "sound-name") { + assert(bytes.size() == 16); + char name[17]; + memcpy(name, bytes.data(), 16); + name[16] = '\0'; + + bool got_zero = false; + for (int i = 0; i < 16; i++) { + if (name[i] == 0) { + got_zero = true; + } else { + if (got_zero) { + assert(false); + } + } + } + return pretty_print::to_symbol(fmt::format("(static-sound-name \"{}\")", name)); + } else { + assert((int)bytes.size() == as_bitfield->get_load_size()); + assert(bytes.size() <= 8); + u64 value = 0; + memcpy(&value, bytes.data(), bytes.size()); + auto defs = decompile_bitfield_from_int(type, ts, value); + return bitfield_defs_print(type, defs); + } } // try as common integer types: diff --git a/goal_src/engine/camera/cam-interface.gc b/goal_src/engine/camera/cam-interface.gc index cf3d072349..2ba06297f2 100644 --- a/goal_src/engine/camera/cam-interface.gc +++ b/goal_src/engine/camera/cam-interface.gc @@ -70,13 +70,7 @@ ) (quaternion-copy! (-> gp-0 quat) (-> arg0 quat)) (vector-identity! (-> gp-0 scale)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'teleport-to-transformq) - (set! (-> a1-2 param 0) (the-as uint gp-0)) - (send-event-function *camera* a1-2) - ) + (send-event *camera* 'teleport-to-transformq gp-0) ) 0 (none) diff --git a/goal_src/engine/debug/anim-tester.gc b/goal_src/engine/debug/anim-tester.gc index 72452a5ce0..1dd33485a1 100644 --- a/goal_src/engine/debug/anim-tester.gc +++ b/goal_src/engine/debug/anim-tester.gc @@ -1040,578 +1040,548 @@ ) (defun anim-test-obj-list-handler ((arg0 int) (arg1 list-control)) - (with-pp - (let ((s5-0 (-> arg1 the-node)) - (v1-0 arg0) - ) - (cond - ((zero? v1-0) - (let* - ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-0 (-> s3-0 base)) - ) - (let ((s2-0 draw-string-xy)) - (format - (clear *temp-string*) - "~S~S~S" - (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - ">" - " " - ) - (if (logtest? (-> (the-as anim-test-obj s5-0) flags) 1) - "*" - " " - ) - (-> (the-as anim-test-obj s5-0) privname) - ) - (s2-0 - *temp-string* - s3-0 - (-> arg1 xpos) - (-> arg1 ypos) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) - ) - ) - (let ((a3-2 (-> s3-0 base))) - (let ((v1-8 (the-as object (-> s3-0 base)))) - (set! - (-> (the-as dma-packet v1-8) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) - (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-0 - (the-as (pointer dma-tag) a3-2) - ) + (let ((s5-0 (-> arg1 the-node)) + (v1-0 arg0) ) + (cond + ((zero? v1-0) + (let* + ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-0 (-> s3-0 base)) ) - ) - ((= v1-0 1) - (return #t) - ) - ((= v1-0 4) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (if (> (-> arg1 highlight-index) 0) - (+! (-> arg1 highlight-index) -1) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~S~S~S" + (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + ">" + " " ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (if (< (-> arg1 highlight-index) (glst-num-elements (-> arg1 list))) - (+! (-> arg1 highlight-index) 1) + (if (logtest? (-> (the-as anim-test-obj s5-0) flags) 1) + "*" + " " ) + (-> (the-as anim-test-obj s5-0) privname) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (let ((v1-38 (the-as object (-> arg1 list-owner)))) - (set! (-> arg1 current-index) (-> arg1 the-index)) - (set! - (-> (the-as anim-tester v1-38) current-obj) - (-> (the-as anim-test-obj s5-0) privname) - ) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'reset) - (set! (-> a1-4 param 0) (the-as uint #f)) - (send-event-function (ppointer->process *anim-tester*) a1-4) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (set! (-> *debug-menu-context* is-hidden) #f) - (set! (-> *anim-tester* 0 edit-mode) 0) - (set! *camera-read-buttons* #t) - (logior! (-> *anim-tester* 0 flags) 4) - ) - ) - ) - ((= v1-0 2) - (let ((v1-64 (+ (length (-> (the-as anim-test-obj s5-0) privname)) 2))) - (set! v1-64 (cond - ((< (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) v1-64) - (empty) - v1-64 - ) - (else - (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) - ) - ) - ) - (set! (-> arg1 return-int) v1-64) - ) - ) - ((= v1-0 3) - (let* - ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s5-2 (-> s4-1 base)) - ) - (draw-string-xy - "----pick-object---" - s4-1 + (s2-0 + *temp-string* + s3-0 (-> arg1 xpos) (-> arg1 ypos) - (font-color dim-white) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) + ) (font-flags shadow kerning) ) - (let ((a3-4 (-> s4-1 base))) - (let ((v1-70 (the-as object (-> s4-1 base)))) - (set! - (-> (the-as dma-packet v1-70) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) - (set! (-> s4-1 base) (&+ (the-as pointer v1-70) 16)) + ) + (let ((a3-2 (-> s3-0 base))) + (let ((v1-8 (the-as object (-> s3-0 base)))) + (set! + (-> (the-as dma-packet v1-8) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s5-2 - (the-as (pointer dma-tag) a3-4) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-2) + ) + ) + ) + ) + ((= v1-0 1) + (return #t) + ) + ((= v1-0 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (if (> (-> arg1 highlight-index) 0) + (+! (-> arg1 highlight-index) -1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (if (< (-> arg1 highlight-index) (glst-num-elements (-> arg1 list))) + (+! (-> arg1 highlight-index) 1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (let ((v1-38 (the-as object (-> arg1 list-owner)))) + (set! (-> arg1 current-index) (-> arg1 the-index)) + (set! + (-> (the-as anim-tester v1-38) current-obj) + (-> (the-as anim-test-obj s5-0) privname) ) ) + (send-event (ppointer->process *anim-tester*) 'reset #f) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *debug-menu-context* is-hidden) #f) + (set! (-> *anim-tester* 0 edit-mode) 0) + (set! *camera-read-buttons* #t) + (logior! (-> *anim-tester* 0 flags) 4) + ) + ) + ) + ((= v1-0 2) + (let ((v1-64 (+ (length (-> (the-as anim-test-obj s5-0) privname)) 2))) + (set! v1-64 (cond + ((< (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) v1-64) + (empty) + v1-64 + ) + (else + (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) + ) + ) + ) + (set! (-> arg1 return-int) v1-64) + ) + ) + ((= v1-0 3) + (let* + ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s5-2 (-> s4-1 base)) + ) + (draw-string-xy + "----pick-object---" + s4-1 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-4 (-> s4-1 base))) + (let ((v1-70 (the-as object (-> s4-1 base)))) + (set! + (-> (the-as dma-packet v1-70) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-70) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s5-2 + (the-as (pointer dma-tag) a3-4) + ) ) ) ) ) - #f ) + #f ) (defun anim-test-anim-list-handler ((arg0 int) (arg1 list-control)) - (with-pp - (let* ((s5-0 (the-as anim-test-obj (-> arg1 the-node))) - (v1-0 (the-as object (-> s5-0 list-con user-info-u))) - ) - (cond - ((zero? arg0) - (let* - ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-0 (-> s3-0 base)) + (let* ((s5-0 (the-as anim-test-obj (-> arg1 the-node))) + (v1-0 (the-as object (-> s5-0 list-con user-info-u))) + ) + (cond + ((zero? arg0) + (let* + ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-0 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~S~S" + (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + "> " + " " + ) + (-> s5-0 privname) ) - (let ((s2-0 draw-string-xy)) - (format - (clear *temp-string*) - "~S~S" - (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - "> " - " " - ) - (-> s5-0 privname) - ) - (s2-0 - *temp-string* - s3-0 - (-> arg1 xpos) - (-> arg1 ypos) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) + (s2-0 + *temp-string* + s3-0 + (-> arg1 xpos) + (-> arg1 ypos) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) ) + (font-flags shadow kerning) ) - (let ((a3-2 (-> s3-0 base))) - (let ((v1-6 (the-as object (-> s3-0 base)))) - (set! - (-> (the-as dma-packet v1-6) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag)) - (set! (-> s3-0 base) (&+ (the-as pointer v1-6) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-0 - (the-as (pointer dma-tag) a3-2) + ) + (let ((a3-2 (-> s3-0 base))) + (let ((v1-6 (the-as object (-> s3-0 base)))) + (set! + (-> (the-as dma-packet v1-6) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) + (set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-6) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-2) ) ) ) - ((= arg0 1) - (return (zero? (logand (-> s5-0 flags) 1))) - ) - ((= arg0 4) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((v1-15 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-15 tailpred) v1-15)) - (let - ((v1-17 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + ) + ((= arg0 1) + (return (zero? (logand (-> s5-0 flags) 1))) + ) + ((= arg0 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (let ((v1-15 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-15 tailpred) v1-15)) + (let + ((v1-17 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the previous node in the list" - (set! v1-17 (-> (the-as anim-test-obj v1-17) prev)) - (let ((a0-23 (the-as anim-test-obj v1-17))) - "is this node the start of the list. #t = start" - (if (not (-> a0-23 prev)) - (goto cfg-25) - ) - ) - (when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1)) - (set! - (-> arg1 highlight-index) - (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-17)) - ) + ) + (while #t + "return the previous node in the list" + (set! v1-17 (-> (the-as anim-test-obj v1-17) prev)) + (let ((a0-23 (the-as anim-test-obj v1-17))) + "is this node the start of the list. #t = start" + (if (not (-> a0-23 prev)) (goto cfg-25) ) ) + (when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1)) + (set! + (-> arg1 highlight-index) + (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-17)) + ) + (goto cfg-25) + ) ) ) ) - (label cfg-25) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (let ((v1-21 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-21 tailpred) v1-21)) - (let - ((v1-23 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + (label cfg-25) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (let ((v1-21 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-21 tailpred) v1-21)) + (let + ((v1-23 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the next node in the list" - (set! v1-23 (-> (the-as anim-test-obj v1-23) next)) - (let ((a0-40 (the-as anim-test-obj v1-23))) - "is this node the end of the list. #t = end" - (if (not (-> a0-40 next)) - (goto cfg-39) - ) - ) - (when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1)) - (set! - (-> arg1 highlight-index) - (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-23)) - ) + ) + (while #t + "return the next node in the list" + (set! v1-23 (-> (the-as anim-test-obj v1-23) next)) + (let ((a0-40 (the-as anim-test-obj v1-23))) + "is this node the end of the list. #t = end" + (if (not (-> a0-40 next)) (goto cfg-39) ) ) + (when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1)) + (set! + (-> arg1 highlight-index) + (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-23)) + ) + (goto cfg-39) + ) ) ) ) - (label cfg-39) - ) - ((= (-> arg1 user-info) 1) - ) - (else - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (set! (-> arg1 current-index) (-> arg1 the-index)) - (set! - (-> (the-as anim-test-obj v1-0) anim-index) - (-> arg1 current-index) - ) - (set! - (-> (the-as anim-test-obj v1-0) anim-hindex) - (-> arg1 highlight-index) - ) - (set! - (-> (the-as anim-test-obj v1-0) flags) - (logand -3 (-> (the-as anim-test-obj v1-0) flags)) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'change-anim) - (set! (-> a1-17 param 0) (the-as uint #f)) - (send-event-function (ppointer->process *anim-tester*) a1-17) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons square) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons square) - ) - (set! (-> *debug-menu-context* is-hidden) #f) - (set! (-> *anim-tester* 0 edit-mode) 0) - (set! *camera-read-buttons* #t) - (logior! (-> *anim-tester* 0 flags) 4) - ) - ) ) + (label cfg-39) ) - ) - ((= arg0 2) - (let ((v1-55 (+ (length (-> s5-0 privname)) 2))) - (set! v1-55 (cond - ((< (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) v1-55) - (empty) - v1-55 - ) - (else - (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) - ) - ) - ) - (set! (-> arg1 return-int) v1-55) + ((= (-> arg1 user-info) 1) ) - ) - ((= arg0 3) - (let* - ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s5-1 (-> s4-1 base)) - ) - (draw-string-xy - "----pick-joint-anim----" - s4-1 - (-> arg1 xpos) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - (let ((a3-4 (-> s4-1 base))) - (let ((v1-62 (the-as object (-> s4-1 base)))) + (else + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (set! (-> arg1 current-index) (-> arg1 the-index)) (set! - (-> (the-as dma-packet v1-62) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) + (-> (the-as anim-test-obj v1-0) anim-index) + (-> arg1 current-index) ) - (set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag)) - (set! (-> s4-1 base) (&+ (the-as pointer v1-62) 16)) + (set! + (-> (the-as anim-test-obj v1-0) anim-hindex) + (-> arg1 highlight-index) + ) + (set! + (-> (the-as anim-test-obj v1-0) flags) + (logand -3 (-> (the-as anim-test-obj v1-0) flags)) + ) + (send-event (ppointer->process *anim-tester*) 'change-anim #f) ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s5-1 - (the-as (pointer dma-tag) a3-4) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *debug-menu-context* is-hidden) #f) + (set! (-> *anim-tester* 0 edit-mode) 0) + (set! *camera-read-buttons* #t) + (logior! (-> *anim-tester* 0 flags) 4) ) ) ) ) ) + ((= arg0 2) + (let ((v1-55 (+ (length (-> s5-0 privname)) 2))) + (set! v1-55 (cond + ((< (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) v1-55) + (empty) + v1-55 + ) + (else + (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) + ) + ) + ) + (set! (-> arg1 return-int) v1-55) + ) + ) + ((= arg0 3) + (let* + ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s5-1 (-> s4-1 base)) + ) + (draw-string-xy + "----pick-joint-anim----" + s4-1 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-4 (-> s4-1 base))) + (let ((v1-62 (the-as object (-> s4-1 base)))) + (set! + (-> (the-as dma-packet v1-62) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-62) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s5-1 + (the-as (pointer dma-tag) a3-4) + ) + ) + ) + ) ) - #f ) + #f ) (defun anim-test-sequence-list-handler ((arg0 int) (arg1 list-control)) - (with-pp - (let* ((s5-0 (the-as anim-test-sequence (-> arg1 the-node))) - (v1-0 (-> s5-0 parent)) - ) - (cond - ((zero? arg0) - (let* - ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-0 (-> s3-0 base)) + (let* ((s5-0 (the-as anim-test-sequence (-> arg1 the-node))) + (v1-0 (-> s5-0 parent)) + ) + (cond + ((zero? arg0) + (let* + ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-0 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~S~S~S" + (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + ">" + " " + ) + (if (logtest? (-> s5-0 flags) 4) + "*" + " " + ) + (-> s5-0 privname) ) - (let ((s2-0 draw-string-xy)) - (format - (clear *temp-string*) - "~S~S~S" - (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - ">" - " " - ) - (if (logtest? (-> s5-0 flags) 4) - "*" - " " - ) - (-> s5-0 privname) - ) - (s2-0 - *temp-string* - s3-0 - (-> arg1 xpos) - (-> arg1 ypos) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) + (s2-0 + *temp-string* + s3-0 + (-> arg1 xpos) + (-> arg1 ypos) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) ) + (font-flags shadow kerning) ) - (let ((a3-2 (-> s3-0 base))) - (let ((v1-8 (the-as object (-> s3-0 base)))) - (set! - (-> (the-as dma-packet v1-8) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) - (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-0 - (the-as (pointer dma-tag) a3-2) + ) + (let ((a3-2 (-> s3-0 base))) + (let ((v1-8 (the-as object (-> s3-0 base)))) + (set! + (-> (the-as dma-packet v1-8) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-2) ) ) ) - ((= arg0 1) - (return (logtest? (-> s5-0 flags) 1)) - ) - ((= arg0 4) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((v1-17 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-17 tailpred) v1-17)) - (let - ((v1-19 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + ) + ((= arg0 1) + (return (logtest? (-> s5-0 flags) 1)) + ) + ((= arg0 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (let ((v1-17 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-17 tailpred) v1-17)) + (let + ((v1-19 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the previous node in the list" - (set! v1-19 (-> (the-as anim-test-sequence v1-19) prev)) - (let ((a0-24 (the-as anim-test-sequence v1-19))) - "is this node the start of the list. #t = start" - (if (not (-> a0-24 prev)) - (goto cfg-28) - ) - ) - (when (logtest? (-> (the-as anim-test-sequence v1-19) flags) 1) - (set! - (-> arg1 highlight-index) - (glst-get-node-index - (-> arg1 list) - (the-as anim-test-sequence v1-19) - ) - ) + ) + (while #t + "return the previous node in the list" + (set! v1-19 (-> (the-as anim-test-sequence v1-19) prev)) + (let ((a0-24 (the-as anim-test-sequence v1-19))) + "is this node the start of the list. #t = start" + (if (not (-> a0-24 prev)) (goto cfg-28) ) ) + (when (logtest? (-> (the-as anim-test-sequence v1-19) flags) 1) + (set! + (-> arg1 highlight-index) + (glst-get-node-index + (-> arg1 list) + (the-as anim-test-sequence v1-19) + ) + ) + (goto cfg-28) + ) ) ) ) - (label cfg-28) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (let ((v1-23 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-23 tailpred) v1-23)) - (let - ((v1-25 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + (label cfg-28) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (let ((v1-23 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-23 tailpred) v1-23)) + (let + ((v1-25 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the next node in the list" - (set! v1-25 (-> (the-as anim-test-sequence v1-25) next)) - (let ((a0-42 (the-as anim-test-sequence v1-25))) - "is this node the end of the list. #t = end" - (if (not (-> a0-42 next)) - (goto cfg-42) - ) - ) - (when (logtest? (-> (the-as anim-test-sequence v1-25) flags) 1) - (set! - (-> arg1 highlight-index) - (glst-get-node-index - (-> arg1 list) - (the-as anim-test-sequence v1-25) - ) - ) + ) + (while #t + "return the next node in the list" + (set! v1-25 (-> (the-as anim-test-sequence v1-25) next)) + (let ((a0-42 (the-as anim-test-sequence v1-25))) + "is this node the end of the list. #t = end" + (if (not (-> a0-42 next)) (goto cfg-42) ) ) + (when (logtest? (-> (the-as anim-test-sequence v1-25) flags) 1) + (set! + (-> arg1 highlight-index) + (glst-get-node-index + (-> arg1 list) + (the-as anim-test-sequence v1-25) + ) + ) + (goto cfg-42) + ) ) ) ) - (label cfg-42) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (set! (-> arg1 current-index) (-> arg1 the-index)) - (set! (-> v1-0 seq-index) (-> arg1 current-index)) - (set! (-> v1-0 seq-hindex) (-> arg1 highlight-index)) - (logior! (-> v1-0 flags) 2) - (set! (-> *anim-tester* 0 edit-mode) 4) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'change-anim) - (set! (-> a1-15 param 0) (the-as uint #f)) - (send-event-function (ppointer->process *anim-tester*) a1-15) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (set! (-> *debug-menu-context* is-hidden) #f) - (set! (-> *anim-tester* 0 edit-mode) 0) - (set! *camera-read-buttons* #t) - (logior! (-> *anim-tester* 0 flags) 4) ) + (label cfg-42) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (set! (-> arg1 current-index) (-> arg1 the-index)) + (set! (-> v1-0 seq-index) (-> arg1 current-index)) + (set! (-> v1-0 seq-hindex) (-> arg1 highlight-index)) + (logior! (-> v1-0 flags) 2) + (set! (-> *anim-tester* 0 edit-mode) 4) + (send-event (ppointer->process *anim-tester*) 'change-anim #f) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *debug-menu-context* is-hidden) #f) + (set! (-> *anim-tester* 0 edit-mode) 0) + (set! *camera-read-buttons* #t) + (logior! (-> *anim-tester* 0 flags) 4) ) ) - ((= arg0 2) - (let ((v1-57 (+ (length (-> s5-0 privname)) 2))) - (set! v1-57 (cond - ((< (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) v1-57) - (empty) - v1-57 - ) - (else - (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) - ) + ) + ((= arg0 2) + (let ((v1-57 (+ (length (-> s5-0 privname)) 2))) + (set! v1-57 (cond + ((< (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) v1-57) + (empty) + v1-57 ) - ) - (set! (-> arg1 return-int) v1-57) + (else + (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) + ) + ) ) + (set! (-> arg1 return-int) v1-57) ) - ((= arg0 3) - (let* - ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s5-1 (-> s4-1 base)) - ) - (draw-string-xy - "----pick-sequence---" - s4-1 - (-> arg1 xpos) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - (let ((a3-4 (-> s4-1 base))) - (let ((v1-64 (the-as object (-> s4-1 base)))) - (set! - (-> (the-as dma-packet v1-64) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-64) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-64) vif1) (new 'static 'vif-tag)) - (set! (-> s4-1 base) (&+ (the-as pointer v1-64) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s5-1 - (the-as (pointer dma-tag) a3-4) + ) + ((= arg0 3) + (let* + ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s5-1 (-> s4-1 base)) + ) + (draw-string-xy + "----pick-sequence---" + s4-1 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-4 (-> s4-1 base))) + (let ((v1-64 (the-as object (-> s4-1 base)))) + (set! + (-> (the-as dma-packet v1-64) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) + (set! (-> (the-as dma-packet v1-64) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-64) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-64) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s5-1 + (the-as (pointer dma-tag) a3-4) ) ) ) ) ) - #f ) + #f ) (define @@ -1718,27 +1688,20 @@ (defun anim-test-edit-seq-insert-item ((arg0 anim-test-seq-item) (arg1 anim-test-sequence)) - (with-pp - (let ((s4-0 (new 'debug 'anim-test-seq-item 1 ""))) - (anim-test-seq-item-copy! s4-0 arg0) - (when (logtest? (-> s4-0 flags) 1) - (set! (-> s4-0 flags) (logand -2 (-> s4-0 flags))) - (logior! (-> s4-0 flags) 4) - (let ((v1-8 s4-0)) - (set! (-> v1-8 privname) "--blank--") - ) + (let ((s4-0 (new 'debug 'anim-test-seq-item 1 ""))) + (anim-test-seq-item-copy! s4-0 arg0) + (when (logtest? (-> s4-0 flags) 1) + (set! (-> s4-0 flags) (logand -2 (-> s4-0 flags))) + (logior! (-> s4-0 flags) 4) + (let ((v1-8 s4-0)) + (set! (-> v1-8 privname) "--blank--") ) - (glst-insert-before (-> arg1 item-list) arg0 s4-0) ) - (anim-test-seq-mark-as-edited arg1) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-4) - ) - (none) + (glst-insert-before (-> arg1 item-list) arg0 s4-0) ) + (anim-test-seq-mark-as-edited arg1) + (send-event (ppointer->process *anim-tester*) 'change-anim) + (none) ) ;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? @@ -1749,663 +1712,615 @@ (sv-192 (function string dma-buffer int int font-color font-flags none)) (sv-208 (function _varargs_ object)) ) - (with-pp - (let ((gp-0 (-> arg1 the-node)) - (s4-0 (the-as object (-> arg1 list-owner))) - (s2-0 - (and - (logtest? (-> *anim-tester* 0 flags) 8) - (zero? (-> *anim-tester* 0 item-field)) - ) - ) - ) - (cond - ((zero? arg0) - (let - ((s3-0 - (new - 'stack - 'font-context - *font-default-matrix* - (-> arg1 xpos) - (-> arg1 ypos) - (-> (new 'static 'array float 1 0.0) 0) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) + (let ((gp-0 (-> arg1 the-node)) + (s4-0 (the-as object (-> arg1 list-owner))) + (s2-0 + (and + (logtest? (-> *anim-tester* 0 flags) 8) + (zero? (-> *anim-tester* 0 item-field)) ) ) ) - (when (not s2-0) - (when (= (-> arg1 the-index) (-> arg1 highlight-index)) - (let* - ((a1-2 - (-> - anim-test-field-highlight-lw - (-> *anim-tester* 0 item-field) - left - ) - ) - (v1-24 - (-> - anim-test-field-highlight-lw - (-> *anim-tester* 0 item-field) - width - ) - ) - (s0-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s1-0 (-> s0-0 base)) - ) - (draw-sprite2d-xy - s0-0 - (+ (* a1-2 (-> *DISP_LIST-bank* CHAR_WIDTH)) 2 (-> arg1 xpos)) - (+ (-> arg1 ypos) -1) - (+ (* v1-24 (-> *DISP_LIST-bank* CHAR_WIDTH)) 4) - (+ (-> *DISP_LIST-bank* TV_SPACING) 1) - (new 'static 'rgba :r #xc0 :g #xc0 :a #xff) - ) - (let ((a3-4 (-> s0-0 base))) - (let ((v1-29 (the-as object (-> s0-0 base)))) - (set! - (-> (the-as dma-packet v1-29) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-29) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-29) vif1) (new 'static 'vif-tag)) - (set! (-> s0-0 base) (&+ (the-as pointer v1-29) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s1-0 - (the-as (pointer dma-tag) a3-4) - ) - ) + (cond + ((zero? arg0) + (let + ((s3-0 + (new + 'stack + 'font-context + *font-default-matrix* + (-> arg1 xpos) + (-> arg1 ypos) + (-> (new 'static 'array float 1 0.0) 0) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) ) + (font-flags shadow kerning) ) ) - (let* - ((s0-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s1-1 (-> s0-1 base)) - ) - (set! sv-192 draw-string-xy) - (set! sv-208 format) - (let ((a0-18 (clear *temp-string*)) - (a1-7 "~S~S~-27S") - (a2-11 (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - ">" - " " - ) - ) - (a3-6 - (if - (= - (-> arg1 the-index) - (-> (the-as anim-test-sequence s4-0) playing-item) - ) - "*" - " " - ) - ) - (t0-2 (-> (the-as anim-test-seq-item gp-0) privname)) - ) - (sv-208 a0-18 a1-7 a2-11 a3-6 t0-2) - ) - (let ((a0-19 *temp-string*) - (a1-8 s0-1) - (a2-12 (-> arg1 xpos)) - (a3-7 (-> arg1 ypos)) - (t0-4 (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (t1-2 3) - ) - (sv-192 - a0-19 - a1-8 - a2-12 - a3-7 - (the-as font-color t0-4) - (the-as font-flags t1-2) - ) - ) - (let ((a3-8 (-> s0-1 base))) - (let ((v1-44 (the-as object (-> s0-1 base)))) - (set! - (-> (the-as dma-packet v1-44) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-44) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-44) vif1) (new 'static 'vif-tag)) - (set! (-> s0-1 base) (&+ (the-as pointer v1-44) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s1-1 - (the-as (pointer dma-tag) a3-8) - ) - ) - ) - (when (not s2-0) + ) + (when (not s2-0) + (when (= (-> arg1 the-index) (-> arg1 highlight-index)) (let* - ((s2-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-1 (the-as anim-test-sequence (-> s2-2 base))) + ((a1-2 + (-> + anim-test-field-highlight-lw + (-> *anim-tester* 0 item-field) + left + ) + ) + (v1-24 + (-> + anim-test-field-highlight-lw + (-> *anim-tester* 0 item-field) + width + ) + ) + (s0-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s1-0 (-> s0-0 base)) ) - (when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) - (let ((v1-57 s3-0) - (a1-13 - (+ - (-> arg1 xpos) - (* - (-> *ANIM_TESTER-bank* EDIT_STATS_X) - (-> *DISP_LIST-bank* CHAR_WIDTH) - ) - ) - ) - (a0-29 (-> arg1 ypos)) - ) - (set! (-> v1-57 origin x) (the float a1-13)) - (set! (-> v1-57 origin y) (the float a0-29)) - ) - (cond - ((and - (< (-> (the-as anim-test-seq-item gp-0) speed) 0) - (< -100 (-> (the-as anim-test-seq-item gp-0) speed)) - ) - (let ((s1-2 draw-string-adv)) - (let ((s0-2 format) - (a0-33 (clear *temp-string*)) - (a1-14 "-0.~1d") - (v1-61 (abs (-> (the-as anim-test-seq-item gp-0) speed))) - ) - (s0-2 a0-33 a1-14 (/ (mod v1-61 100) 10)) - ) - (s1-2 *temp-string* s2-2 s3-0) - ) - ) - (else - (let ((s1-3 draw-string-adv)) - (let ((s0-3 format) - (a0-36 (clear *temp-string*)) - (a1-16 "~2d.~1d") - (a2-21 (/ (-> (the-as anim-test-seq-item gp-0) speed) 100)) - (v1-64 (abs (-> (the-as anim-test-seq-item gp-0) speed))) - ) - (s0-3 a0-36 a1-16 a2-21 (/ (mod v1-64 100) 10)) - ) - (s1-3 *temp-string* s2-2 s3-0) - ) - ) - ) - (let ((s1-4 draw-string-adv)) - (format - (clear *temp-string*) - " ~4d" - (-> (the-as anim-test-seq-item gp-0) blend) - ) - (s1-4 *temp-string* s2-2 s3-0) - ) - (anim-tester-disp-frame-num - " " - (-> (the-as anim-test-seq-item gp-0) first-frame) - (-> (the-as anim-test-seq-item gp-0) artist-base) - s3-0 - ) - (anim-tester-disp-frame-num - " " - (-> (the-as anim-test-seq-item gp-0) last-frame) - (-> (the-as anim-test-seq-item gp-0) artist-base) - s3-0 - ) - (let ((s1-5 draw-string-adv)) - (format - (clear *temp-string*) - " ~S~S~S~S" - (if (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 2) - "B" - "-" - ) - "-" - "-" - "-" - ) - (s1-5 *temp-string* s2-2 s3-0) - ) + (draw-sprite2d-xy + s0-0 + (+ (* a1-2 (-> *DISP_LIST-bank* CHAR_WIDTH)) 2 (-> arg1 xpos)) + (+ (-> arg1 ypos) -1) + (+ (* v1-24 (-> *DISP_LIST-bank* CHAR_WIDTH)) 4) + (+ (-> *DISP_LIST-bank* TV_SPACING) 1) + (new 'static 'rgba :r #xc0 :g #xc0 :a #xff) ) - (let* ((a1-24 (-> anim-test-field-highlight-lw 9 left)) - (v1-69 s3-0) - (a1-26 - (+ (-> arg1 xpos) (* a1-24 (-> *DISP_LIST-bank* CHAR_WIDTH))) - ) - (a0-47 (-> arg1 ypos)) - ) - (set! (-> v1-69 origin x) (the float a1-26)) - (set! (-> v1-69 origin y) (the float a0-47)) - ) - (draw-string-adv "MID" s2-2 s3-0) - (let ((a3-15 (-> s2-2 base))) - (let ((v1-70 (the-as object (-> s2-2 base)))) + (let ((a3-4 (-> s0-0 base))) + (let ((v1-29 (the-as object (-> s0-0 base)))) (set! - (-> (the-as dma-packet v1-70) dma) + (-> (the-as dma-packet v1-29) dma) (new 'static 'dma-tag :id (dma-tag-id next)) ) - (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) - (set! (-> s2-2 base) (&+ (the-as pointer v1-70) 16)) + (set! (-> (the-as dma-packet v1-29) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-29) vif1) (new 'static 'vif-tag)) + (set! (-> s0-0 base) (&+ (the-as pointer v1-29) 16)) ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) frame bucket-group) (bucket-id debug-draw0) - (the-as pointer s4-1) - (the-as (pointer dma-tag) a3-15) + s1-0 + (the-as (pointer dma-tag) a3-4) ) ) ) ) ) - ) - ((= arg0 1) - (return #t) - ) - ((= arg0 4) - (cond - ((logtest? (-> *anim-tester* 0 flags) 8) - (let ((v1-88 (-> *anim-tester* 0 item-field))) + (let* + ((s0-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s1-1 (-> s0-1 base)) + ) + (set! sv-192 draw-string-xy) + (set! sv-208 format) + (let ((a0-18 (clear *temp-string*)) + (a1-7 "~S~S~-27S") + (a2-11 (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + ">" + " " + ) + ) + (a3-6 + (if + (= + (-> arg1 the-index) + (-> (the-as anim-test-sequence s4-0) playing-item) + ) + "*" + " " + ) + ) + (t0-2 (-> (the-as anim-test-seq-item gp-0) privname)) + ) + (sv-208 a0-18 a1-7 a2-11 a3-6 t0-2) + ) + (let ((a0-19 *temp-string*) + (a1-8 s0-1) + (a2-12 (-> arg1 xpos)) + (a3-7 (-> arg1 ypos)) + (t0-4 (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) + ) + (t1-2 3) + ) + (sv-192 + a0-19 + a1-8 + a2-12 + a3-7 + (the-as font-color t0-4) + (the-as font-flags t1-2) + ) + ) + (let ((a3-8 (-> s0-1 base))) + (let ((v1-44 (the-as object (-> s0-1 base)))) + (set! + (-> (the-as dma-packet v1-44) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-44) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-44) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-44) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s1-1 + (the-as (pointer dma-tag) a3-8) + ) + ) + ) + (when (not s2-0) + (let* + ((s2-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-1 (the-as anim-test-sequence (-> s2-2 base))) + ) + (when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) + (let ((v1-57 s3-0) + (a1-13 + (+ + (-> arg1 xpos) + (* + (-> *ANIM_TESTER-bank* EDIT_STATS_X) + (-> *DISP_LIST-bank* CHAR_WIDTH) + ) + ) + ) + (a0-29 (-> arg1 ypos)) + ) + (set! (-> v1-57 origin x) (the float a1-13)) + (set! (-> v1-57 origin y) (the float a0-29)) + ) (cond - ((zero? v1-88) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) - (let - ((v0-24 - (the-as - anim-test-obj - (glst-get-node-by-index - (-> *anim-tester* 0 pick-con list) - (-> *anim-tester* 0 pick-con highlight-index) + ((and + (< (-> (the-as anim-test-seq-item gp-0) speed) 0) + (< -100 (-> (the-as anim-test-seq-item gp-0) speed)) + ) + (let ((s1-2 draw-string-adv)) + (let ((s0-2 format) + (a0-33 (clear *temp-string*)) + (a1-14 "-0.~1d") + (v1-61 (abs (-> (the-as anim-test-seq-item gp-0) speed))) ) + (s0-2 a0-33 a1-14 (/ (mod v1-61 100) 10)) + ) + (s1-2 *temp-string* s2-2 s3-0) + ) + ) + (else + (let ((s1-3 draw-string-adv)) + (let ((s0-3 format) + (a0-36 (clear *temp-string*)) + (a1-16 "~2d.~1d") + (a2-21 (/ (-> (the-as anim-test-seq-item gp-0) speed) 100)) + (v1-64 (abs (-> (the-as anim-test-seq-item gp-0) speed))) + ) + (s0-3 a0-36 a1-16 a2-21 (/ (mod v1-64 100) 10)) + ) + (s1-3 *temp-string* s2-2 s3-0) + ) + ) + ) + (let ((s1-4 draw-string-adv)) + (format + (clear *temp-string*) + " ~4d" + (-> (the-as anim-test-seq-item gp-0) blend) + ) + (s1-4 *temp-string* s2-2 s3-0) + ) + (anim-tester-disp-frame-num + " " + (-> (the-as anim-test-seq-item gp-0) first-frame) + (-> (the-as anim-test-seq-item gp-0) artist-base) + s3-0 + ) + (anim-tester-disp-frame-num + " " + (-> (the-as anim-test-seq-item gp-0) last-frame) + (-> (the-as anim-test-seq-item gp-0) artist-base) + s3-0 + ) + (let ((s1-5 draw-string-adv)) + (format + (clear *temp-string*) + " ~S~S~S~S" + (if (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 2) + "B" + "-" + ) + "-" + "-" + "-" + ) + (s1-5 *temp-string* s2-2 s3-0) + ) + ) + (let* ((a1-24 (-> anim-test-field-highlight-lw 9 left)) + (v1-69 s3-0) + (a1-26 + (+ (-> arg1 xpos) (* a1-24 (-> *DISP_LIST-bank* CHAR_WIDTH))) + ) + (a0-47 (-> arg1 ypos)) + ) + (set! (-> v1-69 origin x) (the float a1-26)) + (set! (-> v1-69 origin y) (the float a0-47)) + ) + (draw-string-adv "MID" s2-2 s3-0) + (let ((a3-15 (-> s2-2 base))) + (let ((v1-70 (the-as object (-> s2-2 base)))) + (set! + (-> (the-as dma-packet v1-70) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) + (set! (-> s2-2 base) (&+ (the-as pointer v1-70) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + (the-as pointer s4-1) + (the-as (pointer dma-tag) a3-15) + ) + ) + ) + ) + ) + ) + ((= arg0 1) + (return #t) + ) + ((= arg0 4) + (cond + ((logtest? (-> *anim-tester* 0 flags) 8) + (let ((v1-88 (-> *anim-tester* 0 item-field))) + (cond + ((zero? v1-88) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + (let + ((v0-24 + (the-as + anim-test-obj + (glst-get-node-by-index + (-> *anim-tester* 0 pick-con list) + (-> *anim-tester* 0 pick-con highlight-index) ) ) ) - (when (and v0-24 (let ((v1-101 (&-> v0-24 obj-art-group))) - "is the list empty, #t = empty" - (not (= (-> v1-101 2) v1-101)) - ) - ) - (let ((v1-103 (&-> v0-24 obj-art-group))) - "return the start of the list" - (let ((a1-30 (-> v1-103 0))) - (anim-test-seq-item-copy! - (the-as anim-test-seq-item gp-0) - (the-as anim-test-seq-item a1-30) - ) + ) + (when (and v0-24 (let ((v1-101 (&-> v0-24 obj-art-group))) + "is the list empty, #t = empty" + (not (= (-> v1-101 2) v1-101)) + ) + ) + (let ((v1-103 (&-> v0-24 obj-art-group))) + "return the start of the list" + (let ((a1-30 (-> v1-103 0))) + (anim-test-seq-item-copy! + (the-as anim-test-seq-item gp-0) + (the-as anim-test-seq-item a1-30) ) ) + ) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + ) + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons square) + ) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + ) + ) + ) + ((= v1-88 9) + (cond + ((zero? + (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) + ) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (let ((v1-124 (the-as anim-test-seq-item gp-0))) + "return the previous node in the list" + (let* ((s3-1 (-> v1-124 prev)) + (v1-125 s3-1) + ) + "is this node the start of the list. #t = start" + (when (not (not (-> v1-125 prev))) + (glst-remove + (-> (the-as anim-test-sequence s4-0) item-list) + (the-as anim-test-seq-item gp-0) + ) + (glst-insert-before + (-> (the-as anim-test-sequence s4-0) item-list) + s3-1 + (the-as anim-test-seq-item gp-0) + ) + (+! (-> arg1 current-index) -1) + (+! (-> arg1 highlight-index) -1) (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (send-event (ppointer->process *anim-tester*) 'change-anim) ) ) ) - ((logtest? - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons square) - ) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) - ) ) - ) - ((= v1-88 9) - (cond - ((zero? - (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - ) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((v1-124 (the-as anim-test-seq-item gp-0))) - "return the previous node in the list" - (let* ((s3-1 (-> v1-124 prev)) - (v1-125 s3-1) - ) - "is this node the start of the list. #t = start" - (when (not (not (-> v1-125 prev))) - (glst-remove - (-> (the-as anim-test-sequence s4-0) item-list) - (the-as anim-test-seq-item gp-0) - ) - (glst-insert-before - (-> (the-as anim-test-sequence s4-0) item-list) - s3-1 - (the-as anim-test-seq-item gp-0) - ) - (+! (-> arg1 current-index) -1) - (+! (-> arg1 highlight-index) -1) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (let ((a1-33 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-33 from) pp) - (set! (-> a1-33 num-params) 0) - (set! (-> a1-33 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-33) - ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (let ((v1-142 (the-as anim-test-seq-item gp-0))) + "return the next node in the list" + (let* ((s3-2 (the-as anim-test-seq-item (-> v1-142 next))) + (v1-143 s3-2) + ) + "is this node the end of the list. #t = end" + (when + (and + (not (not (-> v1-143 next))) + (zero? (logand (-> s3-2 flags) 1)) ) - ) - ) - ) - ((logtest? - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons down) - ) - (let ((v1-142 (the-as anim-test-seq-item gp-0))) - "return the next node in the list" - (let* ((s3-2 (the-as anim-test-seq-item (-> v1-142 next))) - (v1-143 s3-2) - ) - "is this node the end of the list. #t = end" - (when - (and - (not (not (-> v1-143 next))) - (zero? (logand (-> s3-2 flags) 1)) - ) - (glst-remove - (-> (the-as anim-test-sequence s4-0) item-list) - (the-as anim-test-seq-item gp-0) - ) - (glst-insert-after - (-> (the-as anim-test-sequence s4-0) item-list) - s3-2 - (the-as anim-test-seq-item gp-0) - ) - (+! (-> arg1 current-index) 1) - (+! (-> arg1 highlight-index) 1) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (let ((a1-36 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-36 from) pp) - (set! (-> a1-36 num-params) 0) - (set! (-> a1-36 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-36) - ) + (glst-remove + (-> (the-as anim-test-sequence s4-0) item-list) + (the-as anim-test-seq-item gp-0) ) + (glst-insert-after + (-> (the-as anim-test-sequence s4-0) item-list) + s3-2 + (the-as anim-test-seq-item gp-0) + ) + (+! (-> arg1 current-index) 1) + (+! (-> arg1 highlight-index) 1) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (send-event (ppointer->process *anim-tester*) 'change-anim) ) ) ) ) ) - ((or (= v1-88 1) (= v1-88 2) (= v1-88 3) (= v1-88 4)) - (cond - ((zero? - (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - ) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) + ) + ((or (= v1-88 1) (= v1-88 2) (= v1-88 3) (= v1-88 4)) + (cond + ((zero? + (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) ) - ((begin - (set! (-> arg1 current-index) (-> arg1 the-index)) - (<= (-> *anim-tester* 0 inc-timer) 0) - ) - (if (> (-> *anim-tester* 0 inc-delay) 0) - (+! (-> *anim-tester* 0 inc-delay) -1) - ) - (set! - (-> *anim-tester* 0 inc-timer) - (-> *anim-tester* 0 inc-delay) - ) - (case (-> *anim-tester* 0 item-field) - ((1) - (cond - ((logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons down) - ) - (+! (-> (the-as anim-test-seq-item gp-0) speed) -10) - (anim-test-seq-mark-as-edited - (the-as anim-test-sequence s4-0) - ) - (if (< (-> (the-as anim-test-seq-item gp-0) speed) -300) - (set! (-> (the-as anim-test-seq-item gp-0) speed) -300) - ) - ) - ((logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons up) - ) - (+! (-> (the-as anim-test-seq-item gp-0) speed) 10) - (anim-test-seq-mark-as-edited - (the-as anim-test-sequence s4-0) - ) - (if (< 1000 (-> (the-as anim-test-seq-item gp-0) speed)) - (set! (-> (the-as anim-test-seq-item gp-0) speed) 1000) - ) - ) - ) - ) - ((2) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + ) + ((begin + (set! (-> arg1 current-index) (-> arg1 the-index)) + (<= (-> *anim-tester* 0 inc-timer) 0) + ) + (if (> (-> *anim-tester* 0 inc-delay) 0) + (+! (-> *anim-tester* 0 inc-delay) -1) + ) + (set! (-> *anim-tester* 0 inc-timer) (-> *anim-tester* 0 inc-delay)) + (case (-> *anim-tester* 0 item-field) + ((1) (cond ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down) ) - (+! (-> (the-as anim-test-seq-item gp-0) blend) -1) + (+! (-> (the-as anim-test-seq-item gp-0) speed) -10) (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (when (< (-> (the-as anim-test-seq-item gp-0) blend) 0) - (set! (-> (the-as anim-test-seq-item gp-0) blend) 0) - 0 + (if (< (-> (the-as anim-test-seq-item gp-0) speed) -300) + (set! (-> (the-as anim-test-seq-item gp-0) speed) -300) ) ) ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up) ) - (+! (-> (the-as anim-test-seq-item gp-0) blend) 1) + (+! (-> (the-as anim-test-seq-item gp-0) speed) 10) (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (if (< 9999 (-> (the-as anim-test-seq-item gp-0) blend)) - (set! (-> (the-as anim-test-seq-item gp-0) blend) 9999) + (if (< 1000 (-> (the-as anim-test-seq-item gp-0) speed)) + (set! (-> (the-as anim-test-seq-item gp-0) speed) 1000) ) ) ) ) - ((3) - (let ((f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame))) - (set! + ((2) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons down) + ) + (+! (-> (the-as anim-test-seq-item gp-0) blend) -1) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (when (< (-> (the-as anim-test-seq-item gp-0) blend) 0) + (set! (-> (the-as anim-test-seq-item gp-0) blend) 0) + 0 + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons up) + ) + (+! (-> (the-as anim-test-seq-item gp-0) blend) 1) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (if (< 9999 (-> (the-as anim-test-seq-item gp-0) blend)) + (set! (-> (the-as anim-test-seq-item gp-0) blend) 9999) + ) + ) + ) + ) + ((3) + (let ((f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame))) + (set! + (-> (the-as anim-test-seq-item gp-0) first-frame) + (anim-tester-adjust-frame (-> (the-as anim-test-seq-item gp-0) first-frame) - (anim-tester-adjust-frame - (-> (the-as anim-test-seq-item gp-0) first-frame) - (-> (the-as anim-test-seq-item gp-0) num-frames) - ) - ) - (if (!= f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame)) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (-> (the-as anim-test-seq-item gp-0) num-frames) ) ) + (if (!= f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame)) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + ) ) - ((4) - (let ((f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame))) - (set! + ) + ((4) + (let ((f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame))) + (set! + (-> (the-as anim-test-seq-item gp-0) last-frame) + (anim-tester-adjust-frame (-> (the-as anim-test-seq-item gp-0) last-frame) - (anim-tester-adjust-frame - (-> (the-as anim-test-seq-item gp-0) last-frame) - (-> (the-as anim-test-seq-item gp-0) num-frames) - ) - ) - (if (!= f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame)) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (-> (the-as anim-test-seq-item gp-0) num-frames) ) ) - ) - ) - ) - (else - (+! (-> *anim-tester* 0 inc-timer) -1) - ) - ) - (when - (or - (logtest? - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons down) - ) - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - ) - (set! - (-> *anim-tester* 0 inc-delay) - (-> *DISP_LIST-bank* INC_DELAY) - ) - (set! (-> *anim-tester* 0 inc-timer) 0) - 0 - ) - ) - ) - ) - ) - (else - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (if (> (-> arg1 highlight-index) 0) - (+! (-> arg1 highlight-index) -1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (if - (< - (the-as int (the-as anim-test-seq-item (-> arg1 highlight-index))) - (glst-num-elements (-> arg1 list)) - ) - (+! (-> arg1 highlight-index) 1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (+! (-> *anim-tester* 0 item-field) -1) - (if (< (-> *anim-tester* 0 item-field) 0) - (set! (-> *anim-tester* 0 item-field) 11) - ) - (if (= (-> *anim-tester* 0 item-field) 8) - (set! (-> *anim-tester* 0 item-field) 5) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (+! (-> *anim-tester* 0 item-field) 1) - (when (>= (-> *anim-tester* 0 item-field) 12) - (set! (-> *anim-tester* 0 item-field) 0) - 0 - ) - (if (= (-> *anim-tester* 0 item-field) 6) - (set! (-> *anim-tester* 0 item-field) 9) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons square) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons square) - ) - (set! (-> *anim-tester* 0 edit-mode) 3) - (logior! (-> *anim-tester* 0 flags) 4) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (cond - ((logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1) - (let ((v1-318 (-> *anim-tester* 0 item-field))) - (if (= v1-318 10) - (anim-test-edit-seq-insert-item - (the-as anim-test-seq-item gp-0) - (the-as anim-test-sequence s4-0) + (if (!= f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame)) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + ) ) ) ) ) (else - (let ((v1-322 (-> *anim-tester* 0 item-field))) - (cond - ((zero? v1-322) - (anim-tester-pick-item-setup + (+! (-> *anim-tester* 0 inc-timer) -1) + ) + ) + (when + (or + (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + ) + (set! (-> *anim-tester* 0 inc-delay) (-> *DISP_LIST-bank* INC_DELAY)) + (set! (-> *anim-tester* 0 inc-timer) 0) + 0 + ) + ) + ) + ) + ) + (else + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (if (> (-> arg1 highlight-index) 0) + (+! (-> arg1 highlight-index) -1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (if + (< + (the-as int (the-as anim-test-seq-item (-> arg1 highlight-index))) + (glst-num-elements (-> arg1 list)) + ) + (+! (-> arg1 highlight-index) 1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) + (+! (-> *anim-tester* 0 item-field) -1) + (if (< (-> *anim-tester* 0 item-field) 0) + (set! (-> *anim-tester* 0 item-field) 11) + ) + (if (= (-> *anim-tester* 0 item-field) 8) + (set! (-> *anim-tester* 0 item-field) 5) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) + (+! (-> *anim-tester* 0 item-field) 1) + (when (>= (-> *anim-tester* 0 item-field) 12) + (set! (-> *anim-tester* 0 item-field) 0) + 0 + ) + (if (= (-> *anim-tester* 0 item-field) 6) + (set! (-> *anim-tester* 0 item-field) 9) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *anim-tester* 0 edit-mode) 3) + (logior! (-> *anim-tester* 0 flags) 4) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (cond + ((logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1) + (let ((v1-318 (-> *anim-tester* 0 item-field))) + (if (= v1-318 10) + (anim-test-edit-seq-insert-item + (the-as anim-test-seq-item gp-0) + (the-as anim-test-sequence s4-0) + ) + ) + ) + ) + (else + (let ((v1-322 (-> *anim-tester* 0 item-field))) + (cond + ((zero? v1-322) + (anim-tester-pick-item-setup + (the-as anim-test-seq-item gp-0) + (the-as anim-test-sequence s4-0) + ) + ) + ((= v1-322 10) + (anim-test-edit-seq-insert-item + (the-as anim-test-seq-item gp-0) + (the-as anim-test-sequence s4-0) + ) + ) + ((= v1-322 11) + (when + (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (glst-remove + (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0) - (the-as anim-test-sequence s4-0) ) ) - ((= v1-322 10) - (anim-test-edit-seq-insert-item - (the-as anim-test-seq-item gp-0) - (the-as anim-test-sequence s4-0) - ) - ) - ((= v1-322 11) - (when - (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (glst-remove - (-> (the-as anim-test-sequence s4-0) item-list) - (the-as anim-test-seq-item gp-0) - ) - ) - (let ((a1-46 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-46 from) pp) - (set! (-> a1-46 num-params) 0) - (set! (-> a1-46 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-46) - ) - ) - (else - (when - (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 4)) - (let ((v1-334 (-> *anim-tester* 0 item-field))) - (the-as int (cond - ((= v1-334 5) - (anim-test-seq-mark-as-edited - (the-as anim-test-sequence s4-0) - ) - (let - ((v1-331 - (logxor - (-> (the-as anim-test-seq-item gp-0) flags) - 2 - ) - ) - ) - (set! - (-> (the-as anim-test-seq-item gp-0) flags) - v1-331 - ) - v1-331 - ) - ) - ((= v1-334 6) - (the-as int #f) - ) - ((= v1-334 7) - (the-as int #f) - ) - ((= v1-334 8) - (the-as int #f) - ) - (else - (logior! (-> *anim-tester* 0 flags) 8) - (set! - (-> *anim-tester* 0 inc-delay) - (-> *DISP_LIST-bank* INC_DELAY) - ) - (set! (-> *anim-tester* 0 inc-timer) 0) - 0 - ) - ) + (send-event (ppointer->process *anim-tester*) 'change-anim) + ) + (else + (when + (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 4)) + (case (-> *anim-tester* 0 item-field) + ((5) + (anim-test-seq-mark-as-edited + (the-as anim-test-sequence s4-0) + ) + (let + ((v1-331 + (logxor (-> (the-as anim-test-seq-item gp-0) flags) 2) + ) + ) + (set! (-> (the-as anim-test-seq-item gp-0) flags) v1-331) + v1-331 + ) ) + ((6) + (the-as int #f) + ) + ((7) + (the-as int #f) + ) + ((8) + (the-as int #f) + ) + (else + (logior! (-> *anim-tester* 0 flags) 8) + (set! + (-> *anim-tester* 0 inc-delay) + (-> *DISP_LIST-bank* INC_DELAY) + ) + (set! (-> *anim-tester* 0 inc-timer) 0) + 0 ) ) ) @@ -2418,116 +2333,95 @@ ) ) ) - ((= arg0 2) - (set! (-> arg1 return-int) (-> *ANIM_TESTER-bank* EDIT_LIST_MIN_WIDTH)) - ) - ((= arg0 3) - (let* - ((s3-3 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (gp-2 (-> s3-3 base)) + ) + ((= arg0 2) + (set! (-> arg1 return-int) (-> *ANIM_TESTER-bank* EDIT_LIST_MIN_WIDTH)) + ) + ((= arg0 3) + (let* + ((s3-3 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (gp-2 (-> s3-3 base)) + ) + (let ((s1-6 draw-string-xy)) + (format + (clear *temp-string*) + "--Seq--(~-17S)--" + (-> (the-as anim-test-sequence s4-0) privname) ) - (let ((s1-6 draw-string-xy)) - (format - (clear *temp-string*) - "--Seq--(~-17S)--" - (-> (the-as anim-test-sequence s4-0) privname) + (s1-6 + *temp-string* + s3-3 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + ) + (let ((a3-17 (-> s3-3 base))) + (let ((v1-355 (the-as object (-> s3-3 base)))) + (set! + (-> (the-as dma-packet v1-355) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) - (s1-6 - *temp-string* - s3-3 - (-> arg1 xpos) + (set! (-> (the-as dma-packet v1-355) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-355) vif1) (new 'static 'vif-tag)) + (set! (-> s3-3 base) (&+ (the-as pointer v1-355) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-2 + (the-as (pointer dma-tag) a3-17) + ) + ) + ) + (cond + (s2-0 + (display-list-control (-> *anim-tester* 0 pick-con)) + ) + (else + (let* + ((s4-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (gp-3 (-> s4-2 base)) + ) + (draw-string-xy + "-spd-blnd-1st-lst-flgs-mov-" + s4-2 + (+ + (-> arg1 xpos) + (* + (-> *ANIM_TESTER-bank* EDIT_STATS_X) + (-> *DISP_LIST-bank* CHAR_WIDTH) + ) + ) (-> arg1 ypos) (font-color dim-white) (font-flags shadow kerning) ) - ) - (let ((a3-17 (-> s3-3 base))) - (let ((v1-355 (the-as object (-> s3-3 base)))) - (set! - (-> (the-as dma-packet v1-355) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) + (let ((a3-21 (-> s4-2 base))) + (let ((v1-367 (the-as object (-> s4-2 base)))) + (set! + (-> (the-as dma-packet v1-367) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-367) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-367) vif1) (new 'static 'vif-tag)) + (set! (-> s4-2 base) (&+ (the-as pointer v1-367) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-3 + (the-as (pointer dma-tag) a3-21) ) - (set! (-> (the-as dma-packet v1-355) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-355) vif1) (new 'static 'vif-tag)) - (set! (-> s3-3 base) (&+ (the-as pointer v1-355) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-2 - (the-as (pointer dma-tag) a3-17) ) ) ) - (the-as none (cond - (s2-0 - (display-list-control (-> *anim-tester* 0 pick-con)) - ) - (else - (let* - ((s4-2 - (-> - *display* - frames - (-> *display* on-screen) - frame - debug-buf - ) - ) - (gp-3 (-> s4-2 base)) - ) - (draw-string-xy - "-spd-blnd-1st-lst-flgs-mov-" - s4-2 - (+ - (-> arg1 xpos) - (* - (-> *ANIM_TESTER-bank* EDIT_STATS_X) - (-> *DISP_LIST-bank* CHAR_WIDTH) - ) - ) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - (let ((a3-21 (-> s4-2 base))) - (let ((v1-367 (the-as object (-> s4-2 base)))) - (set! - (-> (the-as dma-packet v1-367) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! - (-> (the-as dma-packet v1-367) vif0) - (new 'static 'vif-tag) - ) - (set! - (-> (the-as dma-packet v1-367) vif1) - (new 'static 'vif-tag) - ) - (set! (-> s4-2 base) (&+ (the-as pointer v1-367) 16)) - ) - (dma-bucket-insert-tag - (-> - *display* - frames - (-> *display* on-screen) - frame - bucket-group - ) - (bucket-id debug-draw0) - gp-3 - (the-as (pointer dma-tag) a3-21) - ) - ) - ) - ) - ) - ) ) ) ) - #f ) + #f ) (defbehavior anim-tester-interface anim-tester () @@ -3151,7 +3045,6 @@ (gp-0 s4-0 s3-0 s2-0 *temp-string*) ) (format (clear *temp-string*) "data/~s.obinf" (-> arg0 privname)) - ;; TODO: manually fixed (let ((gp-2 (new 'stack 'file-stream *temp-string* 'write))) (format gp-2 "major-version 0~%") (format gp-2 "minor-version 0~%") @@ -3249,139 +3142,131 @@ (defun anim-tester-add-newobj ((arg0 anim-tester) (arg1 string) (arg2 art-group)) (local-vars (sv-96 art-element) (sv-112 art-element) (sv-128 anim-test-obj)) - (with-pp - (let ((s2-0 (the-as anim-test-obj #f)) - (s5-0 (the-as anim-test-obj #f)) + (let ((s2-0 (the-as anim-test-obj #f)) + (s5-0 (the-as anim-test-obj #f)) + ) + (let ((s1-0 (the-as art-element #f)) + (s0-0 (the-as structure #f)) ) - (let ((s1-0 (the-as art-element #f)) - (s0-0 (the-as structure #f)) - ) - (dotimes (s3-0 (-> arg2 length)) - (cond - ((and (= (-> arg2 data s3-0 type) merc-ctrl) (not s2-0)) - (set! sv-96 (-> arg2 data s3-0)) - (set! s0-0 (and s2-0 s0-0)) - (if s0-0 - (anim-test-obj-remove-invalid s2-0) + (dotimes (s3-0 (-> arg2 length)) + (cond + ((and (= (-> arg2 data s3-0 type) merc-ctrl) (not s2-0)) + (set! sv-96 (-> arg2 data s3-0)) + (set! s0-0 (and s2-0 s0-0)) + (if s0-0 + (anim-test-obj-remove-invalid s2-0) + ) + (let ((t9-1 anim-tester-load-object-seqs)) + (-> sv-96 name) + (t9-1) + ) + (set! + s2-0 + (the-as + anim-test-obj + (glst-find-node-by-name (-> arg0 obj-list) (-> sv-96 name)) ) - (let ((t9-1 anim-tester-load-object-seqs)) - (-> sv-96 name) - (t9-1) + ) + (set! s0-0 (if s2-0 + #t + #f + ) + ) + (cond + ((the-as symbol s0-0) ) + (else + (set! s2-0 (new 'global 'anim-test-obj 1 (-> sv-96 name) arg2)) + (glst-add-tail (-> arg0 obj-list) s2-0) + ) + ) + (anim-test-obj-init s2-0 (the-as list-control arg0)) + (set! (-> s2-0 obj-art-group) arg2) + (set! (-> s2-0 mesh-geo) (the-as merc-ctrl sv-96)) + (set! (-> s2-0 joint-geo) (the-as art-joint-geo s1-0)) + (if (not s5-0) + (set! s5-0 s2-0) + ) + ) + ((= (-> arg2 data s3-0 type) art-joint-geo) + (if (and s2-0 (not (-> s2-0 joint-geo))) + (set! (-> s2-0 joint-geo) (the-as art-joint-geo (-> arg2 data s3-0))) + ) + (if (not s1-0) + (set! s1-0 (-> arg2 data s3-0)) + ) + ) + ((= (-> arg2 data s3-0 type) art-joint-anim) + (when s2-0 + (set! sv-112 (-> arg2 data s3-0)) (set! - s2-0 + sv-128 (the-as anim-test-obj - (glst-find-node-by-name (-> arg0 obj-list) (-> sv-96 name)) + (glst-find-node-by-name (-> s2-0 seq-list) (-> sv-112 name)) ) ) - (set! s0-0 (if s2-0 - #t - #f - ) - ) - (cond - ((the-as symbol s0-0) - ) - (else - (set! s2-0 (new 'global 'anim-test-obj 1 (-> sv-96 name) arg2)) - (glst-add-tail (-> arg0 obj-list) s2-0) - ) - ) - (anim-test-obj-init s2-0 (the-as list-control arg0)) - (set! (-> s2-0 obj-art-group) arg2) - (set! (-> s2-0 mesh-geo) (the-as merc-ctrl sv-96)) - (set! (-> s2-0 joint-geo) (the-as art-joint-geo s1-0)) - (if (not s5-0) - (set! s5-0 s2-0) - ) - ) - ((= (-> arg2 data s3-0 type) art-joint-geo) - (if (and s2-0 (not (-> s2-0 joint-geo))) - (set! (-> s2-0 joint-geo) (the-as art-joint-geo (-> arg2 data s3-0))) - ) - (if (not s1-0) - (set! s1-0 (-> arg2 data s3-0)) - ) - ) - ((= (-> arg2 data s3-0 type) art-joint-anim) - (when s2-0 - (set! sv-112 (-> arg2 data s3-0)) + (when (not sv-128) (set! sv-128 (the-as anim-test-obj - (glst-find-node-by-name (-> s2-0 seq-list) (-> sv-112 name)) + (new 'debug 'anim-test-sequence 1 (-> sv-112 name)) ) ) - (when (not sv-128) - (set! - sv-128 - (the-as - anim-test-obj - (new 'debug 'anim-test-sequence 1 (-> sv-112 name)) - ) - ) - (glst-add-tail (-> s2-0 seq-list) sv-128) - (anim-test-sequence-init (the-as anim-test-sequence sv-128) s2-0) - (let ((a1-11 (new 'debug 'anim-test-seq-item 1 (-> sv-112 name)))) - (glst-add-tail (the-as glst-list (&-> sv-128 obj-art-group)) a1-11) - ) + (glst-add-tail (-> s2-0 seq-list) sv-128) + (anim-test-sequence-init (the-as anim-test-sequence sv-128) s2-0) + (let ((a1-11 (new 'debug 'anim-test-seq-item 1 (-> sv-112 name)))) + (glst-add-tail (the-as glst-list (&-> sv-128 obj-art-group)) a1-11) ) - (set! (-> sv-128 list-con user-info) (the-as int s2-0)) - (set! - (-> sv-128 flags) - (logior (-> (the-as anim-test-sequence sv-128) flags) 2) - ) - (let ((v1-48 (-> (the-as anim-test-sequence sv-128) item-list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-48 tailpred) v1-48)) - (let ((v1-51 (-> (the-as anim-test-sequence sv-128) item-list))) - "return the start of the list" - (let ((v1-52 (-> v1-51 head))) - (set! - (-> (the-as anim-test-seq-item v1-52) num-frames) - (the float (-> (the-as art-joint-anim sv-112) data 0 length)) - ) - (set! - (-> (the-as anim-test-seq-item v1-52) artist-base) - (-> (the-as art-joint-anim sv-112) artist-base) - ) - (set! - (-> (the-as anim-test-seq-item v1-52) parent) - (the-as anim-test-sequence sv-128) - ) + ) + (set! (-> sv-128 list-con user-info) (the-as int s2-0)) + (set! + (-> sv-128 flags) + (logior (-> (the-as anim-test-sequence sv-128) flags) 2) + ) + (let ((v1-48 (-> (the-as anim-test-sequence sv-128) item-list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-48 tailpred) v1-48)) + (let ((v1-51 (-> (the-as anim-test-sequence sv-128) item-list))) + "return the start of the list" + (let ((v1-52 (-> v1-51 head))) + (set! + (-> (the-as anim-test-seq-item v1-52) num-frames) + (the float (-> (the-as art-joint-anim sv-112) data 0 length)) + ) + (set! + (-> (the-as anim-test-seq-item v1-52) artist-base) + (-> (the-as art-joint-anim sv-112) artist-base) + ) + (set! + (-> (the-as anim-test-seq-item v1-52) parent) + (the-as anim-test-sequence sv-128) ) ) - sv-128 ) + sv-128 ) ) ) - (else - ) + ) + (else ) ) ) - (if s2-0 - (anim-test-obj-remove-invalid s2-0) - ) - (when s5-0 - (set! (-> arg0 current-obj) (-> s5-0 privname)) - (set! - (-> arg0 list-con current-index) - (glst-get-node-index (-> arg0 obj-list) s5-0) - ) - ) ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) pp) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'reset) - (set! (-> a1-13 param 0) (the-as uint #f)) - (send-event-function arg0 a1-13) + (if s2-0 + (anim-test-obj-remove-invalid s2-0) + ) + (when s5-0 + (set! (-> arg0 current-obj) (-> s5-0 privname)) + (set! + (-> arg0 list-con current-index) + (glst-get-node-index (-> arg0 obj-list) s5-0) + ) ) ) + (send-event arg0 'reset #f) ) (defun anim-tester-stop () @@ -3393,54 +3278,45 @@ ) (defun anim-tester-start () - (with-pp - (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-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 - gp-0 - ) - *default-pool* - 'anim-tester - (the-as - pointer - #x70004000 + activate ) ) ) - ((the-as - (function process function none) - run-function-in-process + (t9-2 + (the-as + anim-tester + gp-0 + ) + *default-pool* + 'anim-tester + (the-as + pointer + #x70004000 ) - gp-0 - initialize-anim-tester ) - (-> gp-0 ppointer) ) - ) - ) + ((the-as + (function process function none) + run-function-in-process + ) + gp-0 + initialize-anim-tester + ) + (-> gp-0 ppointer) + ) + ) ) - (set! *camera-orbit-target* *anim-tester*) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 2) - (set! (-> a1-3 message) 'change-state) - (set! (-> a1-3 param 0) (the-as uint cam-orbit)) - (set! (-> a1-3 param 1) (the-as uint 0)) - (send-event-function *camera* a1-3) - ) - #f ) + (set! *camera-orbit-target* *anim-tester*) + (send-event *camera* 'change-state cam-orbit 0) + #f ) (defun anim-tester-add-object ((arg0 string)) @@ -3559,204 +3435,87 @@ ) (defun anim-tester-add-sequence ((arg0 string)) - (with-pp - (cond - ((zero? (length arg0)) - (format #t "ERROR: no name~%") + (cond + ((zero? (length arg0)) + (format #t "ERROR: no name~%") + ) + ((and *anim-tester* (let ((v1-6 (-> *anim-tester* 0 obj-list))) + "is the list empty, #t = empty" + (not (= (-> v1-6 tailpred) v1-6)) + ) ) - ((and *anim-tester* (let ((v1-6 (-> *anim-tester* 0 obj-list))) - "is the list empty, #t = empty" - (not (= (-> v1-6 tailpred) v1-6)) - ) - ) - (let - ((s5-0 - (the-as - anim-test-obj - (glst-find-node-by-name - (-> *anim-tester* 0 obj-list) - (-> *anim-tester* 0 current-obj) - ) + (let + ((s5-0 + (the-as + anim-test-obj + (glst-find-node-by-name + (-> *anim-tester* 0 obj-list) + (-> *anim-tester* 0 current-obj) ) ) ) - (cond - (s5-0 - (let ((s4-0 (glst-find-node-by-name (-> s5-0 seq-list) arg0))) - (cond - (s4-0 - (format - #t - "ERROR: there is already a sequence with the name ~S~%" - arg0 + ) + (cond + (s5-0 + (let ((s4-0 (glst-find-node-by-name (-> s5-0 seq-list) arg0))) + (cond + (s4-0 + (format + #t + "ERROR: there is already a sequence with the name ~S~%" + arg0 + ) + (set! + (-> s5-0 list-con current-index) + (glst-get-node-index (-> s5-0 seq-list) s4-0) + ) + (send-event (ppointer->process *anim-tester*) 'edit-sequence) + ) + (else + (let ((gp-1 (new 'global 'anim-test-sequence 1 arg0))) + (glst-add-tail (-> s5-0 seq-list) gp-1) + (set! + (-> gp-1 list-con listfunc) + anim-test-edit-sequence-list-handler ) + (set! (-> gp-1 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X)) + (set! (-> gp-1 list-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y)) + (set! (-> gp-1 list-con list) (-> gp-1 item-list)) + (set! (-> gp-1 list-con list-owner) (the-as uint gp-1)) + (set! (-> gp-1 parent) s5-0) + (anim-test-seq-mark-as-edited gp-1) + (logior! (-> gp-1 flags) 1) (set! (-> s5-0 list-con current-index) - (glst-get-node-index (-> s5-0 seq-list) s4-0) + (glst-get-node-index (-> s5-0 seq-list) gp-1) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'edit-sequence) - (send-event-function (ppointer->process *anim-tester*) a1-5) - ) - ) - (else - (let ((gp-1 (new 'global 'anim-test-sequence 1 arg0))) - (glst-add-tail (-> s5-0 seq-list) gp-1) - (set! - (-> gp-1 list-con listfunc) - anim-test-edit-sequence-list-handler - ) - (set! (-> gp-1 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X)) - (set! (-> gp-1 list-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y)) - (set! (-> gp-1 list-con list) (-> gp-1 item-list)) - (set! (-> gp-1 list-con list-owner) (the-as uint gp-1)) - (set! (-> gp-1 parent) s5-0) - (anim-test-seq-mark-as-edited gp-1) - (logior! (-> gp-1 flags) 1) - (set! - (-> s5-0 list-con current-index) - (glst-get-node-index (-> s5-0 seq-list) gp-1) - ) - (set! (-> s5-0 seq-index) (-> s5-0 list-con current-index)) - (set! (-> s5-0 seq-hindex) (-> s5-0 list-con current-index)) - (let ((s5-1 (new 'debug 'anim-test-seq-item 1 "**END**"))) - (logior! (-> s5-1 flags) 1) - (glst-add-tail (-> gp-1 item-list) s5-1) - (set! (-> s5-1 parent) gp-1) - ) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) pp) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'edit-sequence) - (send-event-function (ppointer->process *anim-tester*) a1-11) + (set! (-> s5-0 seq-index) (-> s5-0 list-con current-index)) + (set! (-> s5-0 seq-hindex) (-> s5-0 list-con current-index)) + (let ((s5-1 (new 'debug 'anim-test-seq-item 1 "**END**"))) + (logior! (-> s5-1 flags) 1) + (glst-add-tail (-> gp-1 item-list) s5-1) + (set! (-> s5-1 parent) gp-1) ) ) + (send-event (ppointer->process *anim-tester*) 'edit-sequence) ) ) ) - (else - (format #t "ERROR:no object selected~%") - ) + ) + (else + (format #t "ERROR:no object selected~%") ) ) ) - (else - (format #t "ERROR:no object loaded~%") - ) ) - (none) + (else + (format #t "ERROR:no object loaded~%") + ) ) + (none) ) ) -(defmethod inspect anim-tester ((obj anim-tester)) - (format #t "--anim-tester--~%") - (let ((v1-0 (-> obj obj-list))) - "return the start of the list" - (let ((s5-0 (the-as anim-test-obj (-> v1-0 head)))) - (while (let ((v1-36 s5-0)) - "is this node the end of the list. #t = end" - (not (not (-> v1-36 next))) - ) - (format #t "object ~A~%" (-> s5-0 privname)) - (let ((v1-2 (-> s5-0 seq-list))) - "return the start of the list" - (let ((s4-0 (the-as anim-test-sequence (-> v1-2 head)))) - (while (let ((v1-29 s4-0)) - "is this node the end of the list. #t = end" - (not (not (-> v1-29 next))) - ) - (format #t " seq ~A" (-> s4-0 privname)) - (format #t " ~S" (if (logtest? (-> s4-0 flags) 2) - "VALID" - "-" - ) - ) - (format #t " ~S" (if (logtest? (-> s4-0 flags) 4) - "EDITED" - "-" - ) - ) - (format #t " ~S" (if (logtest? (-> s4-0 flags) 1) - "USER_GENERATED" - "-" - ) - ) - (format #t "~%") - (let ((v1-10 (-> s4-0 item-list))) - "return the start of the list" - (let ((s3-0 (the-as anim-test-seq-item (-> v1-10 head)))) - (while (let ((v1-22 s3-0)) - "is this node the end of the list. #t = end" - (not (not (-> v1-22 next))) - ) - (format - #t - " item ~A SP=~f BL=~d FIRST=" - (-> s3-0 privname) - (* - (-> (new 'static 'array float 1 0.01) 0) - (the float (-> s3-0 speed)) - ) - (-> s3-0 blend) - ) - (anim-tester-num-print #t (-> s3-0 first-frame)) - (format #t " LAST=") - (anim-tester-num-print #t (-> s3-0 last-frame)) - (format #t " ~S" (if (logtest? (-> s3-0 flags) 1) - "END_MARKER" - "-" - ) - ) - (format #t " ~S" (if (logtest? (-> s3-0 flags) 2) - "WAIT_FOR_BLEND" - "-" - ) - ) - (format #t " ~S" (if (logtest? (-> s3-0 flags) 4) - "BLANK" - "-" - ) - ) - (format #t "~%") - "return the next node in the list" - (set! s3-0 (the-as anim-test-seq-item (-> s3-0 next))) - ) - ) - ) - "return the next node in the list" - (set! s4-0 (the-as anim-test-sequence (-> s4-0 next))) - ) - ) - ) - "return the next node in the list" - (set! s5-0 (the-as anim-test-obj (-> s5-0 next))) - ) - ) - ) - (format #t "-------------~%") - (format #t "current-obj=~A~%" (-> obj current-obj)) - (format - #t - "speed=~f~%" - (* (-> (new 'static 'array float 1 0.01) 0) (the float (-> obj speed))) - ) - (format #t "--flags:--~%") - (the-as - anim-tester - (format #t " CONNECTED: ~A~%" (if (logtest? (-> obj flags) 1) - "TRUE" - "f" - ) - ) - ) - ) - -;; TODO - manually added -(set! *anim-tester* #f) diff --git a/goal_src/engine/game/game-info.gc b/goal_src/engine/game/game-info.gc index 0c19195041..f1924530cf 100644 --- a/goal_src/engine/game/game-info.gc +++ b/goal_src/engine/game/game-info.gc @@ -745,12 +745,7 @@ (set! (-> obj eco-pickup-time) (-> *display* game-frame-counter)) ;; send a reset-collide message. Not sure why we do this. - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) pp) - (set! (-> a1-24 num-params) 0) - (set! (-> a1-24 message) 'reset-collide) - (send-event-function (-> obj process) a1-24) - ) + (send-event (-> obj process) 'reset-collide) ) ;; this logic prevents eco from respawning before you are out. @@ -814,61 +809,27 @@ ) ;; send the touch tracker the target - (let ((a1-44 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-44 from) pp) - (set! (-> a1-44 num-params) 1) - (set! (-> a1-44 message) 'target) - (set! (-> a1-44 param 0) (the-as uint s5-1)) - (send-event-function (ppointer->process s4-3) a1-44) - ) + (send-event (ppointer->process s4-3) 'target s5-1) ;; tell it we have blue eco. - (let ((a1-45 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-45 from) pp) - (set! (-> a1-45 num-params) 1) - (set! (-> a1-45 message) 'event) - (set! (-> a1-45 param 0) (the-as uint 'eco-blue)) - (send-event-function (ppointer->process s4-3) a1-45) - ) + (send-event (ppointer->process s4-3) 'event 'eco-blue) ;; give it a function to call to see if it's time to exit - (let ((a1-46 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-46 from) pp) - (set! (-> a1-46 num-params) 1) - (set! (-> a1-46 message) 'exit) - (set! (-> a1-46 param 0) - (the-as uint (lambda () - ;; check to see if target has powerup 3. - (with-pp - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'query) - (set! (-> a1-0 param 0) (the-as uint 'powerup)) - (set! (-> a1-0 param 1) (the-as uint 3)) - (send-event-function *target* a1-0) - ) - ) - ) - ) - ) - (send-event-function (ppointer->process s4-3) a1-46) - ) - ;; set up some collision thing. - (let ((a1-47 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-47 from) pp) - (set! (-> a1-47 num-params) 1) - (set! (-> a1-47 message) 'eval) - (set! (-> a1-47 param 0) - (the-as uint - (lambda :behavior process-drawable () - (set! (-> (the-as collide-shape (-> self root)) root-prim collide-with) - (the-as uint #x800e) - ) - (none) - ) - ) - ) - (send-event-function (ppointer->process s4-3) a1-47) - ) + (send-event (ppointer->process s4-3) + 'exit + (lambda () + (send-event *target* 'query 'powerup 3) + ) + ;; set up some collision thing. + (send-event (ppointer->process s4-3) + 'eval + (lambda :behavior process-drawable + () + (set! (-> (the-as collide-shape (-> self root)) root-prim collide-with) + (the-as uint #x800e) + ) + (none) + ) + ) + ) ) ;; create a process that just keeps sending 'effect 'eco-blue diff --git a/goal_src/engine/game/projectiles.gc b/goal_src/engine/game/projectiles.gc index a58b53144d..0248026931 100644 --- a/goal_src/engine/game/projectiles.gc +++ b/goal_src/engine/game/projectiles.gc @@ -210,108 +210,101 @@ (sv-80 int) (sv-224 symbol) ) - (with-pp - (set! sv-64 (new-stack-vector0)) - (set! sv-68 (new-stack-vector0)) - (set! sv-72 (new 'stack-no-clear 'matrix)) - (set! sv-80 0) - (set! (-> sv-72 vector 0 quad) (-> arg3 quad)) - (vector-float*! - (new 'stack-no-clear 'vector) - (-> arg1 move-vec) - (-> arg1 best-u) - ) - (TODO-RENAME-28 arg0) - (dummy-56 arg0 (-> arg1 best-tri pat)) - (case (-> arg1 best-tri pat material) - (((pat-material stopproj)) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'die) - (send-event-function (-> arg0 process) a1-3) - ) - ) - ) - (vector-! - sv-64 - (the-as vector (-> arg1 best-from-prim prim-core)) - (-> arg1 best-tri intersect) - ) - (set! (-> sv-64 w) 1.0) - (vector-normalize! sv-64 1.0) - (set! (-> arg0 coverage) (vector-dot sv-64 (-> arg1 best-tri normal))) - (let ((v1-22 (-> sv-64 quad))) - (set! (-> sv-68 quad) v1-22) - ) - (when (= (-> arg1 best-u) 0.0) - (vector-float*! (new 'stack-no-clear 'vector) sv-68 32.0) - (TODO-RENAME-28 arg0) - ) - (set! (-> arg0 surface-normal quad) (-> sv-68 quad)) - (set! (-> arg0 poly-normal quad) (-> arg1 best-tri normal quad)) - (set! - (-> arg0 surface-angle) - (vector-dot sv-68 (-> arg0 dynam gravity-normal)) - ) - (set! - (-> arg0 poly-angle) - (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal)) - ) - (set! - (-> arg0 touch-angle) - (vector-dot - sv-68 - (vector-normalize! - (vector-negate! (new-stack-vector0) (the-as vector sv-72)) - 1.0 - ) - ) - ) - (if (< (-> arg0 poly-angle) -0.2) - (set! sv-80 (logior sv-80 16)) - ) - (set! - sv-224 - (< - (fabs (-> arg0 surface-angle)) - (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle) - ) - ) - (if (zero? (logand (-> arg0 prev-status) 1)) - (set! - (-> arg0 ground-impact-vel) - (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))) - ) - ) - (set! sv-80 (logior sv-80 4)) - (if (-> arg1 best-to-prim) - (set! sv-80 (logior sv-80 32)) - ) - (cond - (sv-224 - (set! sv-80 (logior sv-80 8)) - (set! (-> arg0 cur-pat mode) 1) - (set! (-> arg0 local-normal quad) (-> sv-68 quad)) - ) - (else - (set! sv-80 (logior sv-80 1)) - (set! (-> arg0 local-normal quad) (-> sv-68 quad)) - ) - ) - (vector-reflect-flat-above! arg2 (the-as vector sv-72) sv-68) - (when (and (not sv-224) (>= (-> arg0 coverage) 0.9)) - (set! sv-80 (logior sv-80 2)) - (set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad)) - (when (!= (-> arg0 poly-pat mode) (pat-mode wall)) - (set! (-> arg0 ground-pat) (-> arg0 poly-pat)) - (set! (-> arg0 ground-touch-point quad) (-> arg1 best-tri intersect quad)) - ) - ) - (logior! (-> arg0 status) sv-80) - sv-80 - (none) + (set! sv-64 (new-stack-vector0)) + (set! sv-68 (new-stack-vector0)) + (set! sv-72 (new 'stack-no-clear 'matrix)) + (set! sv-80 0) + (set! (-> sv-72 vector 0 quad) (-> arg3 quad)) + (vector-float*! + (new 'stack-no-clear 'vector) + (-> arg1 move-vec) + (-> arg1 best-u) ) + (TODO-RENAME-28 arg0) + (dummy-56 arg0 (-> arg1 best-tri pat)) + (case (-> arg1 best-tri pat material) + (((pat-material stopproj)) + (send-event (-> arg0 process) 'die) + ) + ) + (vector-! + sv-64 + (the-as vector (-> arg1 best-from-prim prim-core)) + (-> arg1 best-tri intersect) + ) + (set! (-> sv-64 w) 1.0) + (vector-normalize! sv-64 1.0) + (set! (-> arg0 coverage) (vector-dot sv-64 (-> arg1 best-tri normal))) + (let ((v1-22 (-> sv-64 quad))) + (set! (-> sv-68 quad) v1-22) + ) + (when (= (-> arg1 best-u) 0.0) + (vector-float*! (new 'stack-no-clear 'vector) sv-68 32.0) + (TODO-RENAME-28 arg0) + ) + (set! (-> arg0 surface-normal quad) (-> sv-68 quad)) + (set! (-> arg0 poly-normal quad) (-> arg1 best-tri normal quad)) + (set! + (-> arg0 surface-angle) + (vector-dot sv-68 (-> arg0 dynam gravity-normal)) + ) + (set! + (-> arg0 poly-angle) + (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal)) + ) + (set! + (-> arg0 touch-angle) + (vector-dot + sv-68 + (vector-normalize! + (vector-negate! (new-stack-vector0) (the-as vector sv-72)) + 1.0 + ) + ) + ) + (if (< (-> arg0 poly-angle) -0.2) + (set! sv-80 (logior sv-80 16)) + ) + (set! + sv-224 + (< + (fabs (-> arg0 surface-angle)) + (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle) + ) + ) + (if (zero? (logand (-> arg0 prev-status) 1)) + (set! + (-> arg0 ground-impact-vel) + (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))) + ) + ) + (set! sv-80 (logior sv-80 4)) + (if (-> arg1 best-to-prim) + (set! sv-80 (logior sv-80 32)) + ) + (cond + (sv-224 + (set! sv-80 (logior sv-80 8)) + (set! (-> arg0 cur-pat mode) 1) + (set! (-> arg0 local-normal quad) (-> sv-68 quad)) + ) + (else + (set! sv-80 (logior sv-80 1)) + (set! (-> arg0 local-normal quad) (-> sv-68 quad)) + ) + ) + (vector-reflect-flat-above! arg2 (the-as vector sv-72) sv-68) + (when (and (not sv-224) (>= (-> arg0 coverage) 0.9)) + (set! sv-80 (logior sv-80 2)) + (set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad)) + (when (!= (-> arg0 poly-pat mode) (pat-mode wall)) + (set! (-> arg0 ground-pat) (-> arg0 poly-pat)) + (set! (-> arg0 ground-touch-point quad) (-> arg1 best-tri intersect quad)) + ) + ) + (logior! (-> arg0 status) sv-80) + sv-80 + (none) ) (set! @@ -937,16 +930,8 @@ ) ) (let ((v1-14 (-> self notify-handle))) - (when (handle->process v1-14) - (let - ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 2) - (set! (-> a1-7 message) 'notify) - (set! (-> a1-7 param 0) (the-as uint 'attack)) - (set! (-> a1-7 param 1) (the-as uint arg0)) - (send-event-function (-> v1-14 process 0) a1-7) - ) + (if (handle->process v1-14) + (send-event (-> v1-14 process 0) 'notify 'attack arg0) ) ) (+! (-> self hits) 1) @@ -1247,14 +1232,8 @@ :code (behavior () (let ((v1-0 (-> self notify-handle))) - (when (handle->process v1-0) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'notify) - (set! (-> a1-4 param 0) (the-as uint 'die)) - (send-event-function (-> v1-0 process 0) a1-4) - ) + (if (handle->process v1-0) + (send-event (-> v1-0 process 0) 'notify 'die) ) ) (dummy-18 self) @@ -1853,7 +1832,3 @@ (none) ) ) - - - - diff --git a/goal_src/engine/game/task/process-taskable.gc b/goal_src/engine/game/task/process-taskable.gc index 4cc8bdab7b..cea1c46b35 100644 --- a/goal_src/engine/game/task/process-taskable.gc +++ b/goal_src/engine/game/task/process-taskable.gc @@ -6,8 +6,7 @@ ;; dgos: GAME, ENGINE ;; DECOMP BEGINS -;; definition for method 52 of type process-taskable -;; INFO: Return type mismatch int vs none. + (defmethod dummy-52 process-taskable ((obj process-taskable)) (let ((v1-1 (-> obj draw shadow-ctrl))) (when v1-1 @@ -22,8 +21,6 @@ (none) ) -;; definition for method 9 of type gui-query -;; INFO: Return type mismatch int vs none. (defmethod init! gui-query @@ -46,7 +43,6 @@ (none) ) -;; definition for method 10 of type gui-query (defmethod get-response gui-query ((obj gui-query)) (kill-current-level-hint '() '(sidekick voicebox stinger) 'exit) (level-hint-surpress!) @@ -171,8 +167,6 @@ (-> obj decision) ) -;; definition for method 7 of type process-taskable -;; INFO: Return type mismatch process-drawable vs process-taskable. (defmethod relocate process-taskable ((obj process-taskable) (arg0 int)) (the-as process-taskable @@ -180,8 +174,6 @@ ) ) -;; 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)) @@ -253,8 +245,6 @@ ) ) -;; definition for method 31 of type process-taskable -;; INFO: Return type mismatch art-joint-anim vs art-element. (defmethod get-art-elem process-taskable ((obj process-taskable)) (the-as art-element (if (> (-> obj skel active-channels) 0) (-> obj skel root-channel 0 frame-group) @@ -262,14 +252,10 @@ ) ) -;; definition for method 32 of type process-taskable -;; INFO: Return type mismatch symbol vs basic. (defmethod play-anim! process-taskable ((obj process-taskable) (arg0 symbol)) (the-as basic #f) ) -;; definition for method 33 of type process-taskable -;; INFO: Return type mismatch int vs none. (defmethod dummy-33 process-taskable ((obj process-taskable)) (let ((s5-0 (play-anim! obj #f))) (if (type-type? (-> s5-0 type) spool-anim) @@ -280,7 +266,6 @@ (none) ) -;; definition for method 51 of type process-taskable (defmethod close-anim-file! process-taskable ((obj process-taskable)) (let* ((gp-0 (play-anim! obj #f)) (v1-2 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) spool-anim)) @@ -294,8 +279,6 @@ ) ) -;; definition for method 34 of type process-taskable -;; INFO: Return type mismatch symbol vs spool-anim. (defmethod get-accept-anim process-taskable @@ -303,8 +286,6 @@ (the-as spool-anim #f) ) -;; definition for method 35 of type process-taskable -;; INFO: Return type mismatch int vs none. (defmethod push-accept-anim process-taskable ((obj process-taskable)) (let ((s5-0 (get-accept-anim obj #f))) (if (type-type? (-> s5-0 type) spool-anim) @@ -315,8 +296,6 @@ (none) ) -;; definition for method 36 of type process-taskable -;; INFO: Return type mismatch symbol vs spool-anim. (defmethod get-reject-anim process-taskable @@ -324,8 +303,6 @@ (the-as spool-anim #f) ) -;; definition for method 37 of type process-taskable -;; INFO: Return type mismatch int vs none. (defmethod push-reject-anim process-taskable ((obj process-taskable)) (let ((s5-0 (get-reject-anim obj #f))) (if (type-type? (-> s5-0 type) spool-anim) @@ -336,7 +313,6 @@ (none) ) -;; definition for method 38 of type process-taskable (defmethod dummy-38 process-taskable ((obj process-taskable)) (if (nonzero? (-> obj cell-for-task)) (go (method-of-object obj give-cell)) @@ -345,7 +321,6 @@ (none) ) -;; definition for function process-taskable-anim-loop (defbehavior process-taskable-anim-loop process-taskable () (when (!= (if (> (-> self skel active-channels) 0) (-> self skel root-channel 0 frame-group) @@ -375,20 +350,12 @@ (none) ) -;; failed to figure out what this is: (defstate release (process-taskable) :virtual #t :trans (behavior () (when (process-release? *target*) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'trans) - (set! (-> a1-0 param 0) (the-as uint 'restore)) - (set! (-> a1-0 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-0) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) (if (should-display? self) (go-virtual idle) (go-virtual hidden) @@ -404,7 +371,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; failed to figure out what this is: (defstate give-cell (process-taskable) :virtual #t :trans @@ -413,32 +379,13 @@ ((nonzero? (-> self cell-for-task)) (let ((gp-0 (handle->process (-> self cell-x)))) (when gp-0 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'trans) - (set! (-> a1-1 param 0) (the-as uint 'reset)) - (send-event-function *target* a1-1) - ) - (let ((s5-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-0 from) self) - (set! (-> s5-0 num-params) 1) - (set! (-> s5-0 message) 'pickup) - (set! (-> s5-0 param 0) (the-as uint (target-pos 0))) - (send-event-function gp-0 s5-0) - ) + (send-event *target* 'trans 'reset) + (send-event gp-0 'pickup (target-pos 0)) (go-virtual idle) ) ) (format #t "ERROR: ~S no cell spawned~%" (-> self name)) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'get-pickup) - (set! (-> a1-4 param 0) (the-as uint 6)) - (set! (-> a1-4 param 1) (the-as uint (the float (-> self cell-for-task)))) - (send-event-function *target* a1-4) - ) + (send-event *target* 'get-pickup 6 (the float (-> self cell-for-task))) ) (else (format @@ -460,7 +407,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; failed to figure out what this is: (defstate lose (process-taskable) :virtual #t :enter @@ -472,10 +418,7 @@ (behavior () (if (and - (>= - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) - 1500 - ) + (>= (- (-> *display* base-frame-counter) (-> self state-time)) 1500) (or (not *target*) (< @@ -498,7 +441,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; failed to figure out what this is: (defstate enter-playing (process-taskable) :virtual #t :code @@ -507,7 +449,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; definition for function process-taskable-play-anim-enter (defbehavior process-taskable-play-anim-enter process-taskable () (init! (-> self query) (the-as string #f) 40 150 25 #t (the-as string #f)) (logior! (-> self skel status) 8) @@ -548,7 +489,6 @@ #f ) -;; definition for function process-taskable-play-anim-exit (defbehavior process-taskable-play-anim-exit process-taskable () (set! (-> self skel status) (logand -9 (-> self skel status))) (let ((a0-4 (handle->process (-> self camera)))) @@ -561,7 +501,6 @@ (none) ) -;; definition for function process-taskable-play-anim-trans (defbehavior process-taskable-play-anim-trans process-taskable () (if (nonzero? *camera-look-through-other*) (set! *camera-look-through-other* 2) @@ -571,7 +510,6 @@ (none) ) -;; definition for function process-taskable-play-anim-code (defbehavior process-taskable-play-anim-code process-taskable ((arg0 art-joint-anim) (arg1 basic)) @@ -631,20 +569,8 @@ (format #t "WARNING: ~A stall on not cloning.~%" (-> self name)) (suspend) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'matrix) - (set! (-> a1-10 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'blend-shape) - (set! (-> a1-11 param 0) (the-as uint #t)) - (send-event-function *target* a1-11) - ) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) ) (push-setting! *setting-control* @@ -692,13 +618,7 @@ (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) - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) self) - (set! (-> a1-20 num-params) 1) - (set! (-> a1-20 message) 'blend-shape) - (set! (-> a1-20 param 0) (the-as uint #f)) - (send-event-function *target* a1-20) - ) + (send-event *target* 'blend-shape #f) ) (else (when (not arg1) @@ -799,7 +719,6 @@ ) ) -;; failed to figure out what this is: (defstate play-accept (process-taskable) :virtual #t :enter @@ -831,7 +750,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; failed to figure out what this is: (defstate play-reject (process-taskable) :virtual #t :enter @@ -860,7 +778,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; failed to figure out what this is: (defstate query (process-taskable) :virtual #t :enter @@ -916,7 +833,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; failed to figure out what this is: (defstate play-anim (process-taskable) :virtual #t :event @@ -982,7 +898,6 @@ (the-as (function none :behavior process-taskable) ja-post) ) -;; definition for function process-taskable-clean-up-after-talking (defbehavior process-taskable-clean-up-after-talking process-taskable () (set! (-> self draw status) (logand -3 (-> self draw status))) (set! (-> self skel status) (logand -2 (-> self skel status))) @@ -991,12 +906,10 @@ (none) ) -;; definition for method 39 of type process-taskable (defmethod should-display? process-taskable ((obj process-taskable)) #t ) -;; definition for function process-taskable-hide-handler (defbehavior process-taskable-hide-handler process-taskable ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -1016,8 +929,6 @@ (none) ) -;; definition for function process-taskable-hide-enter -;; INFO: Return type mismatch none vs int. (defbehavior process-taskable-hide-enter process-taskable () (set! (-> self state-time) (-> *display* base-frame-counter)) (let ((v1-3 (-> self draw shadow-ctrl))) @@ -1030,8 +941,6 @@ (the-as int (ja-post)) ) -;; definition for function process-taskable-hide-exit -;; INFO: Return type mismatch int vs none. (defbehavior process-taskable-hide-exit process-taskable ((arg0 symbol)) (cond (arg0 @@ -1053,7 +962,6 @@ (none) ) -;; failed to figure out what this is: (defstate hidden (process-taskable) :virtual #t :event @@ -1073,11 +981,7 @@ ) :trans (behavior () - (if - (>= - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) - 300 - ) + (if (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300) (process-entity-status! self (entity-perm-status bit-3) #f) ) (if (or (-> self been-kicked) (should-display? self)) @@ -1089,7 +993,6 @@ (the-as (function none :behavior process-taskable) anim-loop) ) -;; definition for method 50 of type process-taskable ;; WARN: disable def twice: 4. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod TODO-RENAME-50 process-taskable ((obj process-taskable)) (if *target* @@ -1113,7 +1016,6 @@ ) ) -;; failed to figure out what this is: (defstate hidden-other (process-taskable) :virtual #t :event @@ -1133,11 +1035,7 @@ ) :trans (behavior () - (if - (>= - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) - 300 - ) + (if (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300) (process-entity-status! self (entity-perm-status bit-3) #f) ) (cond @@ -1157,7 +1055,6 @@ (the-as (function none :behavior process-taskable) anim-loop) ) -;; failed to figure out what this is: (defstate be-clone (process-taskable) :virtual #t :event @@ -1246,12 +1143,10 @@ ) ) -;; definition for method 47 of type process-taskable (defmethod target-above-threshold? process-taskable ((obj process-taskable)) #t ) -;; failed to figure out what this is: (defstate idle (process-taskable) :virtual #t :event @@ -1359,11 +1254,7 @@ ) :trans (behavior () - (when - (>= - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) - 60 - ) + (when (>= (- (-> *display* base-frame-counter) (-> self state-time)) 60) (logior! (-> self mask) (process-mask actor-pause)) (process-entity-status! self (entity-perm-status bit-3) #f) ) @@ -1475,14 +1366,7 @@ (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 2) - (set! (-> a1-12 message) 'trans) - (set! (-> a1-12 param 0) (the-as uint 'save)) - (set! (-> a1-12 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-12) - ) + (send-event *target* 'trans 'save (-> self old-target-pos)) (go-virtual play-anim) ) ) @@ -1505,14 +1389,7 @@ ) ) (set! (-> self been-kicked) #f) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) self) - (set! (-> a1-14 num-params) 2) - (set! (-> a1-14 message) 'trans) - (set! (-> a1-14 param 0) (the-as uint 'save)) - (set! (-> a1-14 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-14) - ) + (send-event *target* 'trans 'save (-> self old-target-pos)) (go-virtual play-anim) ) ((-> self cur-trans-hook)) @@ -1537,8 +1414,6 @@ ) ) -;; definition for method 41 of type process-taskable -;; INFO: Return type mismatch int vs none. (defmethod initialize-collision process-taskable @@ -1568,8 +1443,6 @@ (none) ) -;; definition for method 40 of type process-taskable -;; INFO: Return type mismatch int vs none. (defmethod dummy-40 process-taskable @@ -1636,7 +1509,6 @@ (none) ) -;; definition for method 42 of type process-taskable (defmethod dummy-42 process-taskable ((obj process-taskable)) (cond ((not (should-display? obj)) @@ -1652,14 +1524,10 @@ (none) ) -;; definition for method 43 of type process-taskable -;; INFO: Return type mismatch int vs symbol. (defmethod TODO-RENAME-43 process-taskable ((obj process-taskable)) (the-as symbol 0) ) -;; definition for method 9 of type ambient-control -;; INFO: Return type mismatch int vs none. (defmethod dummy-9 ambient-control @@ -1674,7 +1542,6 @@ (none) ) -;; definition for method 10 of type ambient-control (defmethod TODO-RENAME-10 ambient-control @@ -1698,7 +1565,6 @@ arg0 ) -;; definition for method 11 of type ambient-control (defmethod play-ambient ambient-control @@ -1717,7 +1583,6 @@ #f ) -;; definition for function vector-for-ambient (defun vector-for-ambient ((arg0 process-drawable) (arg1 vector)) (if *target* (vector-! arg1 (target-pos 0) (-> arg0 root trans)) @@ -1726,7 +1591,6 @@ arg1 ) -;; definition for function othercam-calc (defun othercam-calc ((arg0 float)) (let ((f0-3 (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0)))) (set! (-> *camera-other-fov* data) f0-3) @@ -1734,7 +1598,6 @@ ) ) -;; failed to figure out what this is: (defstate othercam-running (othercam) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -1973,8 +1836,6 @@ ) ) -;; definition for function othercam-init-by-other -;; INFO: Return type mismatch int vs none. (defbehavior othercam-init-by-other othercam ((arg0 process-taskable) (arg1 symbol) (arg2 symbol) (arg3 symbol)) @@ -1999,7 +1860,6 @@ (none) ) -;; definition for method 48 of type process-taskable (defmethod draw-npc-shadow process-taskable ((obj process-taskable)) (let ((gp-0 (-> obj draw shadow-ctrl))) (cond @@ -2021,3 +1881,7 @@ ) (none) ) + + + + diff --git a/goal_src/engine/target/logic-target.gc b/goal_src/engine/target/logic-target.gc index a24aa4f0dc..bb27ff560c 100644 --- a/goal_src/engine/target/logic-target.gc +++ b/goal_src/engine/target/logic-target.gc @@ -1328,18 +1328,12 @@ (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)) ) ) - (when + (if (and (or (not gp-0) (!= (-> gp-0 name) (-> self current-level name))) (-> self current-level) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'level-enter) - (set! (-> a1-5 param 0) (the-as uint (-> self current-level name))) - (send-event-function self a1-5) - ) + (send-event self 'level-enter (-> self current-level name)) ) ) 0 @@ -1410,7 +1404,7 @@ (zero? (-> self control unknown-int40)) (zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie))) ) - (when + (if (and (= (-> self cam-user-mode) 'normal) (logtest? (-> self control unknown-surface00 flags) 1) @@ -1430,13 +1424,7 @@ ) ) ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'change-mode) - (set! (-> a1-7 param 0) (the-as uint 'look-around)) - (send-event-function self a1-7) - ) + (send-event self 'change-mode 'look-around) ) ) (when @@ -1455,14 +1443,8 @@ (not *pause-lock*) (zero? (logand (-> self state-flags) 768)) ) - (when (!= (-> self next-state name) 'target-falling) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'change-mode) - (set! (-> a1-8 param 0) (the-as uint 'falling)) - (send-event-function self a1-8) - ) + (if (!= (-> self next-state name) 'target-falling) + (send-event self 'change-mode 'falling) ) (let ((gp-0 (new-stack-vector0))) (let @@ -1519,12 +1501,7 @@ ) (TODO-RENAME-30 (-> self control) gp-1) ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) self) - (set! (-> a1-24 num-params) 0) - (set! (-> a1-24 message) 'reset-follow) - (send-event-function *camera* a1-24) - ) + (send-event *camera* 'reset-follow) (set! (-> self control surf) *standard-ground-surface*) ) (let @@ -1750,13 +1727,8 @@ (defbehavior target-compute-edge target () (let ((s5-0 *edge-grab-info*)) - (when (not (dummy-9 s5-0)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function self a1-0) - ) + (if (not (dummy-9 s5-0)) + (send-event self 'end-mode) ) (if *display-edge-collision-marks* (dummy-10 s5-0) @@ -1811,7 +1783,7 @@ (-> self control rider-time) (the-as uint (-> *display* base-frame-counter)) ) - (when + (if (and (>= (- @@ -1828,12 +1800,7 @@ 150 ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'end-mode) - (send-event-function self a1-5) - ) + (send-event self 'end-mode) ) ) (else @@ -1876,13 +1843,8 @@ (defbehavior target-compute-edge-rider target () (let ((gp-0 *edge-grab-info*)) - (when (not (dummy-9 gp-0)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function self a1-0) - ) + (if (not (dummy-9 gp-0)) + (send-event self 'end-mode) ) (if *display-edge-collision-marks* (dummy-10 gp-0) @@ -1954,14 +1916,7 @@ (vector+! v1-8 s3-0 s2-0) (vector-float*! v1-8 v1-8 0.5) (set! (-> v1-8 y) (+ -6144.0 (-> v1-8 y))) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 2) - (set! (-> a1-5 message) 'ease-in) - (set! (-> a1-5 param 0) (the-as uint 0.5)) - (set! (-> a1-5 param 1) (the-as uint v1-8)) - (send-event-function *camera* a1-5) - ) + (send-event *camera* 'ease-in 0.5 v1-8) ) (vector-segment-distance-point! (the-as vector (&-> (-> self control) unknown-cspace00 bone)) diff --git a/goal_src/engine/ui/hud-classes.gc b/goal_src/engine/ui/hud-classes.gc index a24c316b22..7b70c108c4 100644 --- a/goal_src/engine/ui/hud-classes.gc +++ b/goal_src/engine/ui/hud-classes.gc @@ -735,152 +735,144 @@ ) (defmethod init-particles! hud-money-all ((obj hud-money-all) (arg0 int)) - (with-pp - (when (< (-> obj nb-of-icons) 6) - (let ((s4-0 (-> obj nb-of-icons))) - (set! (-> obj icons s4-0) (new 'static 'hud-icon)) - (let* ((s2-0 (get-process *default-dead-pool* manipy #x4000)) - (s3-0 (when s2-0 - (let ((t9-1 (method-of-type manipy activate))) - (t9-1 - (the-as manipy s2-0) - obj - 'manipy - (the-as pointer #x70004000) - ) + (when (< (-> obj nb-of-icons) 6) + (let ((s4-0 (-> obj nb-of-icons))) + (set! (-> obj icons s4-0) (new 'static 'hud-icon)) + (let* ((s2-0 (get-process *default-dead-pool* manipy #x4000)) + (s3-0 (when s2-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s2-0) + obj + 'manipy + (the-as pointer #x70004000) ) - (run-now-in-process - s2-0 - manipy-init - (new 'static 'vector :w 1.0) - #f - *money-sg* - #f - ) - (-> s2-0 ppointer) ) - ) + (run-now-in-process + s2-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s2-0 ppointer) + ) ) - (when s3-0 - (set! - (-> (the-as process-drawable (-> s3-0 0)) draw dma-add-func) - dma-add-process-drawable-hud - ) - (set-vector! - (-> (the-as process-drawable (-> s3-0 0)) root trans) - 0.0 - 0.0 - 0.0 - 1.0 - ) - (set-vector! - (-> (the-as process-drawable (-> s3-0 0)) root scale) - 0.0095 - -0.011 - 0.0095 - 1.0 - ) - (when #f - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'trans-hook) - (set! (-> a1-4 param 0) (the-as uint #f)) - (send-event-function (ppointer->process s3-0) a1-4) - ) - ) + ) + (when s3-0 + (set! + (-> (the-as process-drawable (-> s3-0 0)) draw dma-add-func) + dma-add-process-drawable-hud ) - (set! (-> obj icons s4-0 icon) (the-as (pointer manipy) s3-0)) - (when s3-0 - (logior! (-> s3-0 0 mask) (process-mask pause)) - (logclear! (-> s3-0 0 mask) (process-mask menu progress)) - (set! (-> (the-as process-drawable (-> s3-0 0)) root trans z) 1024.0) - (set! (-> obj icons s4-0 icon-x) 170) - (set! (-> obj icons s4-0 icon-y) 0) - (set! (-> obj icons s4-0 icon-z) 0) - (set! (-> obj icons s4-0 scale-x) 0.0095) - (set! (-> obj icons s4-0 scale-y) -0.011) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (if #f + (send-event (ppointer->process s3-0) 'trans-hook #f) ) ) - ) - (+! (-> obj nb-of-icons) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s4-1 (-> obj nb-of-particles))) - (set! (-> obj particles s4-1) (new 'static 'hud-particle)) - (set! - (-> obj particles s4-1 part) - (create-launch-control (-> *part-group-id-table* 705) obj) - ) - (set! (-> obj particles s4-1 init-pos x) 172.0) - (set! (-> obj particles s4-1 init-pos y) 330.0) - (set! (-> obj particles s4-1 init-pos z) 2.0) - (set! (-> obj particles s4-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - (dotimes (s4-3 (-> obj nb-of-particles)) - (if (= (-> obj particles s4-3 part matrix) -1) - (set! (-> obj particles s4-3 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set! (-> obj text-x) 251) - (set! (-> obj text-y) 305) - (set! (-> obj x-sgn) 0) - (set! (-> obj y-sgn) 1) - (hide-bottom-hud) - (let ((s4-4 0) - (s3-2 0) - (s2-2 0) - ) - (dotimes (s1-0 (length *level-task-data*)) - (let ((v1-83 (-> *level-task-data* s1-0))) - (when (!= v1-83 #f) - (when - (or - (= *kernel-boot-message* 'play) - (= (-> v1-83 level-name-id) (game-text-id misty-level-name)) - ) - (if (= s1-0 arg0) - (set! s2-2 (the-as int (-> *game-info* money-per-level s1-0))) - ) - (+! s3-2 (-> *game-info* money-per-level s1-0)) - (+! s4-4 (-> (get-game-count s1-0) money-count)) - ) - ) - ) - ) - (cond - ((= s3-2 s4-4) - (set! (-> obj total-orbs) s4-4) - (set! (-> obj total-orbs) s4-4) - (set! (-> obj level-index) -1) - ) - ((begin - (set! (-> obj total-orbs) s2-2) - (< arg0 (length *level-task-data*)) - ) - (set! (-> obj level-index) arg0) - ) - (else - (set! (-> obj level-index) -1) + (set! (-> obj icons s4-0 icon) (the-as (pointer manipy) s3-0)) + (when s3-0 + (logior! (-> s3-0 0 mask) (process-mask pause)) + (logclear! (-> s3-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s3-0 0)) root trans z) 1024.0) + (set! (-> obj icons s4-0 icon-x) 170) + (set! (-> obj icons s4-0 icon-y) 0) + (set! (-> obj icons s4-0 icon-z) 0) + (set! (-> obj icons s4-0 scale-x) 0.0095) + (set! (-> obj icons s4-0 scale-y) -0.011) ) ) ) - (set! (-> obj start-time) (the-as uint (-> *display* base-frame-counter))) - (sound-play-by-name - (static-sound-name "get-all-orbs") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) - ) - 0 - (none) + (+! (-> obj nb-of-icons) 1) ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s4-1 (-> obj nb-of-particles))) + (set! (-> obj particles s4-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s4-1 part) + (create-launch-control (-> *part-group-id-table* 705) obj) + ) + (set! (-> obj particles s4-1 init-pos x) 172.0) + (set! (-> obj particles s4-1 init-pos y) 330.0) + (set! (-> obj particles s4-1 init-pos z) 2.0) + (set! (-> obj particles s4-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (dotimes (s4-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s4-3 part matrix) -1) + (set! (-> obj particles s4-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 251) + (set! (-> obj text-y) 305) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) 1) + (hide-bottom-hud) + (let ((s4-4 0) + (s3-2 0) + (s2-2 0) + ) + (dotimes (s1-0 (length *level-task-data*)) + (let ((v1-83 (-> *level-task-data* s1-0))) + (when (!= v1-83 #f) + (when + (or + (= *kernel-boot-message* 'play) + (= (-> v1-83 level-name-id) (game-text-id misty-level-name)) + ) + (if (= s1-0 arg0) + (set! s2-2 (the-as int (-> *game-info* money-per-level s1-0))) + ) + (+! s3-2 (-> *game-info* money-per-level s1-0)) + (+! s4-4 (-> (get-game-count s1-0) money-count)) + ) + ) + ) + ) + (cond + ((= s3-2 s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj level-index) -1) + ) + ((begin + (set! (-> obj total-orbs) s2-2) + (< arg0 (length *level-task-data*)) + ) + (set! (-> obj level-index) arg0) + ) + (else + (set! (-> obj level-index) -1) + ) + ) + ) + (set! (-> obj start-time) (the-as uint (-> *display* base-frame-counter))) + (sound-play-by-name + (static-sound-name "get-all-orbs") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + 0 + (none) ) (defmethod @@ -1028,104 +1020,96 @@ ) (defmethod init-particles! hud-money ((obj hud-money) (arg0 int)) - (with-pp - (when (< (-> obj nb-of-icons) 6) - (let ((s5-0 (-> obj nb-of-icons))) - (set! (-> obj icons s5-0) (new 'static 'hud-icon)) - (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) - (s4-0 (when s3-0 - (let ((t9-1 (method-of-type manipy activate))) - (t9-1 - (the-as manipy s3-0) - obj - 'manipy - (the-as pointer #x70004000) - ) + (when (< (-> obj nb-of-icons) 6) + (let ((s5-0 (-> obj nb-of-icons))) + (set! (-> obj icons s5-0) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) ) - (run-now-in-process - s3-0 - manipy-init - (new 'static 'vector :w 1.0) - #f - *money-sg* - #f - ) - (-> s3-0 ppointer) ) - ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s3-0 ppointer) + ) ) - (when s4-0 - (set! - (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) - dma-add-process-drawable-hud - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root trans) - 0.0 - 0.0 - 0.0 - 1.0 - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root scale) - 0.0095 - -0.011 - 0.0095 - 1.0 - ) - (when #f - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'trans-hook) - (set! (-> a1-4 param 0) (the-as uint #f)) - (send-event-function (ppointer->process s4-0) a1-4) - ) - ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud ) - (set! (-> obj icons s5-0 icon) (the-as (pointer manipy) s4-0)) - (when s4-0 - (logior! (-> s4-0 0 mask) (process-mask pause)) - (logclear! (-> s4-0 0 mask) (process-mask menu progress)) - (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 1024.0) - (set! (-> obj icons s5-0 icon-x) 399) - (set! (-> obj icons s5-0 icon-y) 79) - (set! (-> obj icons s5-0 icon-z) 0) - (set! (-> obj icons s5-0 scale-x) 0.0095) - (set! (-> obj icons s5-0 scale-y) -0.011) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (if #f + (send-event (ppointer->process s4-0) 'trans-hook #f) ) ) - ) - (+! (-> obj nb-of-icons) 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* 79) obj) + (set! (-> obj icons s5-0 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 1024.0) + (set! (-> obj icons s5-0 icon-x) 399) + (set! (-> obj icons s5-0 icon-y) 79) + (set! (-> obj icons s5-0 icon-z) 0) + (set! (-> obj icons s5-0 scale-x) 0.0095) + (set! (-> obj icons s5-0 scale-y) -0.011) ) - (set! (-> obj particles s5-1 init-pos x) 400.0) - (set! (-> obj particles s5-1 init-pos y) 58.0) - (set! (-> obj particles s5-1 init-pos z) 2.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - (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 text-x) 420) - (set! (-> obj text-y) 45) - (set! (-> obj x-sgn) 1) - (set! (-> obj y-sgn) -1) - (set! (-> obj increment-on-event) #t) - 0 - (none) + (+! (-> obj nb-of-icons) 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* 79) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 400.0) + (set! (-> obj particles s5-1 init-pos y) 58.0) + (set! (-> obj particles s5-1 init-pos z) 2.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (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 text-x) 420) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + 0 + (none) ) (defmethod animate! hud-money ((obj hud-money) (arg0 symbol) (arg1 symbol)) @@ -1610,113 +1594,105 @@ ) (defmethod init-particles! hud-fuel-cell ((obj hud-fuel-cell) (arg0 int)) - (with-pp - (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* 80) obj) - ) - (set! (-> obj particles s5-0 init-pos x) 256.0) - (set! (-> obj particles s5-0 init-pos y) 224.0) - (set! (-> obj particles s5-0 init-pos z) 1.0) - (set! (-> obj particles s5-0 part matrix) -1) + (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* 80) obj) ) - (+! (-> obj nb-of-particles) 1) + (set! (-> obj particles s5-0 init-pos x) 256.0) + (set! (-> obj particles s5-0 init-pos y) 224.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) ) - (dotimes (s5-1 (-> obj nb-of-particles)) - (if (= (-> obj particles s5-1 part matrix) -1) - (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (when (< (-> obj nb-of-icons) 6) - (let ((s5-2 (-> obj nb-of-icons))) - (set! (-> obj icons s5-2) (new 'static 'hud-icon)) - (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) - (s4-0 (when s3-0 - (let ((t9-3 (method-of-type manipy activate))) - (t9-3 - (the-as manipy s3-0) - obj - 'manipy - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s3-0 - manipy-init - (new 'static 'vector :w 1.0) - #f - *fuelcell-naked-sg* - #f - ) - (-> s3-0 ppointer) - ) - ) - ) - (when s4-0 - (set! - (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) - dma-add-process-drawable-hud - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root trans) - 0.0 - 0.0 - 0.0 - 1.0 - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root scale) - 0.009 - 0.009 - 0.009 - 1.0 - ) - (when #f - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'trans-hook) - (set! (-> a1-5 param 0) (the-as uint #f)) - (send-event-function (ppointer->process s4-0) a1-5) - ) - ) - ) - (set! (-> obj icons s5-2 icon) (the-as (pointer manipy) s4-0)) - (when s4-0 - (logior! (-> s4-0 0 mask) (process-mask pause)) - (logclear! (-> s4-0 0 mask) (process-mask menu progress)) - (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 2048.0) - (set! (-> obj icons s5-2 icon-x) 256) - (set! (-> obj icons s5-2 icon-y) 62) - (set! (-> obj icons s5-2 icon-z) 0) - (set! (-> obj icons s5-2 scale-x) 0.009) - (set! (-> obj icons s5-2 scale-y) 0.009) - ) - ) - ) - (+! (-> obj nb-of-icons) 1) - ) - (set! (-> obj text-x) 276) - (set! (-> obj text-y) 45) - (set! (-> obj x-sgn) 0) - (set! (-> obj y-sgn) -1) - (set! (-> obj increment-on-event) #t) - (set! (-> obj skip-particle) -2) - (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - (let ((s5-4 (new 'stack-no-clear 'quaternion))) - (quaternion-axis-angle! s5-4 0.0 1.0 0.0 16384.0) - (quaternion*! - (-> obj icons 0 icon 0 root quat) - s5-4 - (-> obj icons 0 icon 0 root quat) - ) - ) - 0 - (none) + (+! (-> obj nb-of-particles) 1) ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (when (< (-> obj nb-of-icons) 6) + (let ((s5-2 (-> obj nb-of-icons))) + (set! (-> obj icons s5-2) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-3 (method-of-type manipy activate))) + (t9-3 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *fuelcell-naked-sg* + #f + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.009 + 0.009 + 0.009 + 1.0 + ) + (if #f + (send-event (ppointer->process s4-0) 'trans-hook #f) + ) + ) + (set! (-> obj icons s5-2 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 2048.0) + (set! (-> obj icons s5-2 icon-x) 256) + (set! (-> obj icons s5-2 icon-y) 62) + (set! (-> obj icons s5-2 icon-z) 0) + (set! (-> obj icons s5-2 scale-x) 0.009) + (set! (-> obj icons s5-2 scale-y) 0.009) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (set! (-> obj text-x) 276) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + (set! (-> obj skip-particle) -2) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (let ((s5-4 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! s5-4 0.0 1.0 0.0 16384.0) + (quaternion*! + (-> obj icons 0 icon 0 root quat) + s5-4 + (-> obj icons 0 icon 0 root quat) + ) + ) + 0 + (none) ) (defmethod @@ -2692,156 +2668,88 @@ ) (defun hide-hud () - (with-pp - (when *target* - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'hide) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'hide) ) ) - 0 - (none) ) + 0 + (none) ) (defun hide-bottom-hud () - (with-pp - (when *target* - (dotimes (gp-0 4) - (when (-> *hud-parts* parts (+ gp-0 4)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'hide) - (send-event-function - (ppointer->process (-> *hud-parts* parts (+ gp-0 4))) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 4) + (if (-> *hud-parts* parts (+ gp-0 4)) + (send-event (ppointer->process (-> *hud-parts* parts (+ gp-0 4))) 'hide) ) ) - 0 - (none) ) + 0 + (none) ) (defun disable-hud ((arg0 int)) - (with-pp - (when *target* - (dotimes (s5-0 9) - (when (-> *hud-parts* parts s5-0) - (when - (or - (!= (-> *hud-parts* parts s5-0) arg0) - (zero? (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0 value)) - ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) pp) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'hide) - (send-event-function - (ppointer->process (-> *hud-parts* parts s5-0)) - a1-1 - ) - ) - ) - (when (!= (-> *hud-parts* parts s5-0) arg0) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'disable) - (send-event-function - (ppointer->process (-> *hud-parts* parts s5-0)) - a1-2 - ) - ) + (when *target* + (dotimes (s5-0 9) + (when (-> *hud-parts* parts s5-0) + (if + (or + (!= (-> *hud-parts* parts s5-0) arg0) + (zero? (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0 value)) ) + (send-event (ppointer->process (-> *hud-parts* parts s5-0)) 'hide) + ) + (if (!= (-> *hud-parts* parts s5-0) arg0) + (send-event (ppointer->process (-> *hud-parts* parts s5-0)) 'disable) ) ) ) - 0 - (none) ) + 0 + (none) ) (defun enable-hud () - (with-pp - (when *target* - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'enable) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'enable) ) ) - 0 - (none) ) + 0 + (none) ) (defun hide-hud-quick () - (with-pp - (when *target* - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'hide-quick) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'hide-quick) ) ) - 0 - (none) ) + 0 + (none) ) (defun show-hud () - (with-pp - (when - (and - *target* - (or (not *progress-process*) (hidden? (-> *progress-process* 0))) - ) - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'show) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when + (and + *target* + (or (not *progress-process*) (hidden? (-> *progress-process* 0))) + ) + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'show) ) ) - 0 - (none) ) + 0 + (none) ) (defun set-hud-aspect-ratio ((arg0 symbol) (arg1 symbol)) diff --git a/goal_src/kernel/gstate.gc b/goal_src/kernel/gstate.gc index cad4cbf893..1b87e46190 100644 --- a/goal_src/kernel/gstate.gc +++ b/goal_src/kernel/gstate.gc @@ -453,7 +453,7 @@ It type checks the arguments for the entry function. (set! (-> event-data num-params) ,(length params)) (set! (-> event-data message) ,msg) ,@(let ((ep 0)) - (apply (lambda (x) `(set! (-> event-data param ep) ,x) (inc! ep)) params) + (apply (lambda (x) `(set! (-> event-data param ep) (the-as uint ,x)) (inc! ep)) params) ) (send-event-function ,proc event-data) ) diff --git a/goal_src/levels/beach/beach-part.gc b/goal_src/levels/beach/beach-part.gc index f5ee448ee7..3d07d64cd5 100644 --- a/goal_src/levels/beach/beach-part.gc +++ b/goal_src/levels/beach/beach-part.gc @@ -7,7 +7,6 @@ ;; DECOMP BEGINS -;; definition of type beach-part (deftype beach-part (part-spawner) () :heap-base #x60 @@ -16,6 +15,7 @@ :flag-assert #x15006000d0 ) + (set! (-> *part-id-table* 666) (new 'static 'sparticle-launcher @@ -857,31 +857,12 @@ ) ) -;; definition for symbol sound-beach-waterfall, type sound-spec (define sound-beach-waterfall (new 'static 'sound-spec :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x66 - #x61 - #x6c - #x6c - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "waterfall") :volume #x400 ) ) diff --git a/goal_src/levels/beach/beach-rocks.gc b/goal_src/levels/beach/beach-rocks.gc index ba23daf085..0d7f625182 100644 --- a/goal_src/levels/beach/beach-rocks.gc +++ b/goal_src/levels/beach/beach-rocks.gc @@ -7,6 +7,8 @@ (define-extern *lrocklrg-sg* skeleton-group) +;; DECOMP BEGINS + (let ((v1-0 (new 'static 'skeleton-group @@ -24,7 +26,6 @@ (set! *lrocklrg-sg* v1-0) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 553) (new 'static 'sparticle-launch-group @@ -43,7 +44,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2341) (new 'static 'sparticle-launcher @@ -75,7 +75,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2340) (new 'static 'sparticle-launcher @@ -108,7 +107,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2289) (new 'static 'sparticle-launcher @@ -144,7 +142,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 554) (new 'static 'sparticle-launch-group @@ -161,7 +158,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2290) (new 'static 'sparticle-launcher @@ -197,7 +193,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 555) (new 'static 'sparticle-launch-group @@ -216,7 +211,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2343) (new 'static 'sparticle-launcher @@ -244,7 +238,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2342) (new 'static 'sparticle-launcher @@ -277,7 +270,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2291) (new 'static 'sparticle-launcher @@ -313,7 +305,6 @@ ) ) -;; definition of type beach-rock (deftype beach-rock (process-drawable) ((root-override collide-shape-moving :offset 112) (trigger basic :offset-assert 176) @@ -334,21 +325,7 @@ ) ) -;; definition for method 3 of type beach-rock -(defmethod inspect beach-rock ((obj beach-rock)) - (let ((t9-0 (method-of-type process-drawable inspect))) - (t9-0 obj) - ) - (format #t "~T~Ttrigger: ~A~%" (-> obj trigger)) - (format #t "~T~Tmovie-start: ~D~%" (-> obj movie-start)) - (format #t "~T~Tpart-falling: ~A~%" (-> obj part-falling)) - (format #t "~T~Tpart-landing: ~A~%" (-> obj part-landing)) - (format #t "~T~Tprev-frame: ~f~%" (-> obj prev-frame)) - obj - ) -;; definition for method 7 of type beach-rock -;; INFO: Return type mismatch none vs beach-rock. (defmethod relocate beach-rock ((obj beach-rock) (arg0 int)) (if (nonzero? (-> obj part-falling)) (set! @@ -380,7 +357,6 @@ ) ) -;; definition for method 10 of type beach-rock (defmethod deactivate beach-rock ((obj beach-rock)) (if (nonzero? (-> obj part-falling)) (kill-and-free-particles (-> obj part-falling)) @@ -394,7 +370,6 @@ (none) ) -;; failed to figure out what this is: (defstate idle (beach-rock) :virtual #t :event @@ -427,7 +402,6 @@ ) ) -;; failed to figure out what this is: (defstate loading (beach-rock) :virtual #t :event @@ -442,7 +416,6 @@ ) ) -;; failed to figure out what this is: (defstate falling (beach-rock) :virtual #t :trans @@ -588,13 +561,8 @@ ) ) (let ((a0-28 (handle->process s5-1))) - (when a0-28 - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) self) - (set! (-> a1-14 num-params) 0) - (set! (-> a1-14 message) 'stop-cloning) - (send-event-function a0-28 a1-14) - ) + (if a0-28 + (send-event a0-28 'stop-cloning) ) ) ) @@ -610,7 +578,6 @@ (the-as (function none :behavior beach-rock) transform-post) ) -;; failed to figure out what this is: (defstate fallen (beach-rock) :virtual #t :code @@ -644,7 +611,6 @@ (the-as (function none :behavior beach-rock) ja-post) ) -;; definition for method 11 of type beach-rock (defmethod copy-defaults! beach-rock ((obj beach-rock) (arg0 res-lump)) (set! (-> obj link) (new 'process 'actor-link-info obj)) (set! (-> obj align) (new 'process 'align-control obj)) @@ -690,7 +656,6 @@ (none) ) -;; definition of type lrocklrg (deftype lrocklrg (beach-rock) () :heap-base #x60 @@ -699,15 +664,7 @@ :flag-assert #x18006000cc ) -;; definition for method 3 of type lrocklrg -(defmethod inspect lrocklrg ((obj lrocklrg)) - (let ((t9-0 (method-of-type beach-rock inspect))) - (t9-0 obj) - ) - obj - ) -;; definition for method 11 of type lrocklrg (defmethod copy-defaults! lrocklrg ((obj lrocklrg) (arg0 res-lump)) (stack-size-set! (-> obj main-thread) 512) (let diff --git a/goal_src/levels/beach/bird-lady-beach.gc b/goal_src/levels/beach/bird-lady-beach.gc index e109e76c0b..7ad5147b1e 100644 --- a/goal_src/levels/beach/bird-lady-beach.gc +++ b/goal_src/levels/beach/bird-lady-beach.gc @@ -7,7 +7,8 @@ (define-extern *bird-lady-beach-sg* skeleton-group) -;; definition of type bird-lady-beach +;; DECOMP BEGINS + (deftype bird-lady-beach (process-taskable) ((flutflut handle :offset-assert 384) (egg handle :offset-assert 392) @@ -18,7 +19,7 @@ :flag-assert #x3501200190 ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -36,7 +37,6 @@ (set! *bird-lady-beach-sg* v1-1) ) -;; failed to figure out what this is: (defstate idle (bird-lady-beach) :virtual #t :enter @@ -59,153 +59,120 @@ ) ) -;; definition for method 32 of type bird-lady-beach (defmethod play-anim! bird-lady-beach ((obj bird-lady-beach) (arg0 symbol)) - (with-pp - (case (current-status (-> obj tasks)) - ((6) - (when arg0 - (set! - (-> obj cell-for-task) - (the-as game-task (current-task (-> obj tasks))) - ) - (close-current! (-> obj tasks)) - (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj flutflut) (ppointer->handle (when s5-1 - (let - ((t9-4 - (method-of-type - manipy - activate - ) + (case (current-status (-> obj tasks)) + ((6) + (when arg0 + (set! + (-> obj cell-for-task) + (the-as game-task (current-task (-> obj tasks))) + ) + (close-current! (-> obj tasks)) + (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj flutflut) (ppointer->handle (when s5-1 + (let + ((t9-4 + (method-of-type + manipy + activate ) ) - (t9-4 - (the-as manipy s5-1) - obj - 'manipy - (the-as pointer #x70004000) - ) ) - (run-now-in-process - s5-1 - manipy-init - (-> obj root trans) - (-> obj entity) - *flutflut-naked-sg* - #f + (t9-4 + (the-as manipy s5-1) + obj + 'manipy + (the-as pointer #x70004000) ) - (-> s5-1 ppointer) ) - ) - ) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'anim-mode) - (set! (-> a1-4 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj flutflut)) a1-4) - ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'blend-shape) - (set! (-> a1-5 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj flutflut)) a1-5) - ) - (let ((s5-2 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj egg) (ppointer->handle (when s5-2 - (let - ((t9-9 - (method-of-type - manipy - activate + (run-now-in-process + s5-1 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *flutflut-naked-sg* + #f + ) + (-> s5-1 ppointer) ) - ) - ) - (t9-9 - (the-as manipy s5-2) - obj - 'manipy - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s5-2 - manipy-init - (-> obj root trans) - (-> obj entity) - *flutflutegg-sg* - #f - ) - (-> s5-2 ppointer) - ) - ) - ) - ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj egg)) a1-9) + ) ) ) - (new 'static 'spool-anim - :name "bird-lady-beach-resolution" - :index 4 - :parts 10 - :command-list - '( - ((the binteger 141) - joint - "cameraB" - ) - ((the binteger 535) - joint - "camera" - ) - ((the binteger 696) + (send-event (handle->process (-> obj flutflut)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj flutflut)) 'blend-shape #t) + (let ((s5-2 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj egg) (ppointer->handle (when s5-2 + (let + ((t9-9 + (method-of-type manipy activate) + ) + ) + (t9-9 + (the-as manipy s5-2) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s5-2 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *flutflutegg-sg* + #f + ) + (-> s5-2 ppointer) + ) + ) + ) + ) + (send-event (handle->process (-> obj egg)) 'anim-mode 'clone-anim) + ) + (new 'static 'spool-anim + :name "bird-lady-beach-resolution" + :index 4 + :parts 10 + :command-list + '( + ((the binteger 141) joint "cameraB" ) - ((the binteger 758) - joint - "camera" - ) - ((the binteger 813) joint "cameraB") + ((the binteger 535) + joint + "camera" ) - ) - ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string - (the-as task-status (current-status (-> obj tasks))) + ((the binteger 696) + joint + "cameraB" + ) + ((the binteger 758) joint "camera") ((the binteger 813) joint "cameraB") ) - ) ) - (-> obj draw art-group data 3) ) + (else + (if arg0 + (format + 0 + "ERROR: : ~S playing anim for task status ~S~%" + (-> obj name) + (task-status->string (the-as task-status (current-status (-> obj tasks)))) + ) + ) + (-> obj draw art-group data 3) ) ) ) -;; definition for method 31 of type bird-lady-beach (defmethod get-art-elem bird-lady-beach ((obj bird-lady-beach)) (-> obj draw art-group data 3) ) -;; definition for method 39 of type bird-lady-beach (defmethod should-display? bird-lady-beach ((obj bird-lady-beach)) (= (current-status (-> obj tasks)) 6) ) -;; definition for method 11 of type bird-lady-beach (defmethod copy-defaults! bird-lady-beach ((obj bird-lady-beach) (arg0 res-lump)) (dummy-40 obj @@ -220,4 +187,8 @@ (set! (-> obj sound-flava) (the-as uint 7)) (dummy-42 obj) (none) - ) \ No newline at end of file + ) + + + + diff --git a/goal_src/levels/beach/mayor.gc b/goal_src/levels/beach/mayor.gc index 856cf47cf5..19da80b392 100644 --- a/goal_src/levels/beach/mayor.gc +++ b/goal_src/levels/beach/mayor.gc @@ -96,1287 +96,38 @@ ) (defmethod play-anim! mayor ((obj mayor) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-specific-task! - (game-task jungle-lurkerm) - (task-status need-introduction) - ) - (close-specific-task! - (game-task village1-mayor-money) - (task-status need-introduction) - ) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-specific-task! + (game-task jungle-lurkerm) + (task-status need-introduction) ) - (cond - ((closed? - (-> obj tasks) - (game-task jungle-lurkerm) - (task-status need-reminder) - ) - (mayor-lurkerm-reward-speech obj arg0) - ) - (else - (new 'static 'spool-anim - :name "mayor-introduction" - :index 4 - :parts 16 - :command-list '() - ) - (new 'static 'spool-anim - :name "mayor-introduction" - :index 4 - :parts 16 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 - kill - "villagea-part-69" - ) - (0 - display-level - beach - special - ) - ((the binteger 565) - joint - "cameraB" - ) - ((the binteger 850) - joint - "camera" - ) - ((the binteger 915) joint "cameraB") - ) - ) - ) + (close-specific-task! + (game-task village1-mayor-money) + (task-status need-introduction) ) ) - (((task-status need-reminder-a) (task-status need-reminder)) - (set! (-> obj skippable) #t) (cond ((closed? (-> obj tasks) (game-task jungle-lurkerm) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "mayor-reminder-donation" - :index 6 - :parts 3 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) - ) - ) - ) - ((closed? - (-> obj tasks) - (game-task village1-mayor-money) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "mayor-reminder-beams" - :index 5 - :parts 3 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) - ) - ) - ) - ((zero? (get-reminder (-> obj tasks) 0)) - (if arg0 - (save-reminder (-> obj tasks) 1 0) - ) - (new 'static 'spool-anim - :name "mayor-reminder-beams" - :index 5 - :parts 3 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) - ) + (task-status need-reminder) ) + (mayor-lurkerm-reward-speech obj arg0) ) (else - (if arg0 - (save-reminder (-> obj tasks) 0 0) + (new 'static 'spool-anim + :name "mayor-introduction" + :index 4 + :parts 16 + :command-list '() ) (new 'static 'spool-anim - :name "mayor-reminder-donation" - :index 6 - :parts 3 + :name "mayor-introduction" + :index 4 + :parts 16 :command-list '( (0 @@ -1671,357 +422,1594 @@ kill "crate-2469" ) - (0 kill "villagea-part-69") (0 display-level beach special) + (0 + kill + "villagea-part-69" + ) + (0 + display-level + beach + special + ) + ((the binteger 565) + joint + "cameraB" + ) + ((the binteger 850) + joint + "camera" + ) + ((the binteger 915) joint "cameraB") ) ) ) ) ) - (((task-status need-reward-speech)) - (if (not arg0) - (set! (-> obj will-talk) #t) - ) - (case (current-task (-> obj tasks)) - (((game-task jungle-lurkerm)) - (mayor-lurkerm-reward-speech obj arg0) - ) - (else - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 2) - (set! (-> a1-15 message) 'get-pickup) - (set! (-> a1-15 param 0) (the-as uint 5)) - (set! - (-> a1-15 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) + (((task-status need-reminder-a) (task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((closed? + (-> obj tasks) + (game-task jungle-lurkerm) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "mayor-reminder-donation" + :index 6 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" ) - (send-event-function *target* a1-15) + (0 + kill + "villagea-part-70" ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) ) - (else - (set! (-> obj talk-message) (the-as uint 282)) - ) - ) - (new 'static 'spool-anim - :name "mayor-resolution-donation" - :index 8 - :parts 5 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ((closed? + (-> obj tasks) + (game-task village1-mayor-money) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "mayor-reminder-beams" + :index 5 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ) + ((zero? (get-reminder (-> obj tasks) 0)) + (if arg0 + (save-reminder (-> obj tasks) 1 0) + ) + (new 'static 'spool-anim + :name "mayor-reminder-beams" + :index 5 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 0) + ) + (new 'static 'spool-anim + :name "mayor-reminder-donation" + :index 6 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ) + ) + ) + (((task-status need-reward-speech)) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + (((game-task jungle-lurkerm)) + (mayor-lurkerm-reward-speech obj arg0) + ) + (else + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj talk-message) (the-as uint 282)) ) ) - ) - ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) + (new 'static 'spool-anim + :name "mayor-resolution-donation" + :index 8 + :parts 5 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) ) ) - (-> obj draw art-group data 3) ) ) + (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 3) + ) ) ) diff --git a/goal_src/levels/beach/sculptor.gc b/goal_src/levels/beach/sculptor.gc index 7964e6eef8..02da5d8079 100644 --- a/goal_src/levels/beach/sculptor.gc +++ b/goal_src/levels/beach/sculptor.gc @@ -142,34 +142,18 @@ (set! (-> (the-as muse v1-11) draw light-index) (the-as uint 3)) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'anim-mode) - (set! (-> a1-5 param 0) (the-as uint 'loop)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-5) + (send-event (handle->process (-> arg0 incomming-attack-id)) 'anim-mode 'loop) + (send-event + (handle->process (-> arg0 incomming-attack-id)) + 'art-joint-anim + "idle" + 0 ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 2) - (set! (-> a1-6 message) 'art-joint-anim) - (set! (-> a1-6 param 0) (the-as uint "idle")) - (set! (-> a1-6 param 1) (the-as uint 0)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-6) - ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'draw) - (set! (-> a1-7 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'origin-joint-index) - (set! (-> a1-8 param 0) (the-as uint 26)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-8) + (send-event (handle->process (-> arg0 incomming-attack-id)) 'draw #t) + (send-event + (handle->process (-> arg0 incomming-attack-id)) + 'origin-joint-index + 26 ) ) @@ -183,171 +167,154 @@ ) (defmethod play-anim! sculptor ((obj sculptor) (arg0 symbol)) - (with-pp - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (if arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - ) - (new 'static 'spool-anim - :name "sculptor-introduction" - :index 16 - :parts 14 - :command-list - '( - (0 - display-level - beach - special - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - ((the binteger 285) - joint - "cameraB" - ) - ((the binteger 331) - joint - "camera" - ) - ((the binteger 614) - joint - "cameraB" - ) - ((the binteger 760) - joint - "camera" - ) - ((the binteger 1183) - joint - "cameraB" - ) - ((the binteger 1278) - joint - "camera" - ) - ((the binteger 1433) joint "cameraB") - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (new 'static 'spool-anim - :name "sculptor-reminder-1" - :index 17 - :parts 2 - :command-list '() - ) - ) - (((task-status need-reward-speech)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj muse) (ppointer->handle (when s5-1 - (let - ((t9-5 - (method-of-type - manipy - activate - ) - ) - ) - (t9-5 - (the-as manipy s5-1) - obj - 'manipy - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s5-1 - manipy-init - (-> obj root-override trans) - (-> obj entity) - *sculptor-muse-sg* - #f - ) - (-> s5-1 ppointer) - ) - ) - ) - ) - (let ((v1-18 (handle->process (-> obj muse)))) - (if v1-18 - (set! (-> (the-as muse v1-18) draw light-index) (the-as uint 3)) - ) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'center-joint) - (set! (-> a1-8 param 0) (the-as uint 4)) - (send-event-function (handle->process (-> obj muse)) a1-8) - ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj muse)) a1-9) - ) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) ) (new 'static 'spool-anim - :name "sculptor-resolution" - :index 18 - :parts 4 + :name "sculptor-introduction" + :index 16 + :parts 14 :command-list '( - ((the binteger 51) joint "cameraB") ((the binteger 87) joint "camera") + (0 + display-level + beach + special + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + ((the binteger 285) + joint + "cameraB" + ) + ((the binteger 331) + joint + "camera" + ) + ((the binteger 614) + joint + "cameraB" + ) + ((the binteger 760) + joint + "camera" + ) + ((the binteger 1183) + joint + "cameraB" + ) + ((the binteger 1278) + joint + "camera" + ) + ((the binteger 1433) joint "cameraB") ) ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (new 'static 'spool-anim + :name "sculptor-reminder-1" + :index 17 + :parts 2 + :command-list '() + ) + ) + (((task-status need-reward-speech)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj muse) (ppointer->handle (when s5-1 + (let + ((t9-5 + (method-of-type manipy activate) + ) + ) + (t9-5 + (the-as manipy s5-1) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s5-1 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *sculptor-muse-sg* + #f + ) + (-> s5-1 ppointer) + ) + ) ) ) - (-> obj draw art-group data 4) + (let ((v1-18 (handle->process (-> obj muse)))) + (if v1-18 + (set! (-> (the-as muse v1-18) draw light-index) (the-as uint 3)) + ) + ) + (send-event (handle->process (-> obj muse)) 'center-joint 4) + (send-event (handle->process (-> obj muse)) 'anim-mode 'clone-anim) ) + (new 'static 'spool-anim + :name "sculptor-resolution" + :index 18 + :parts 4 + :command-list + '( + ((the binteger 51) joint "cameraB") ((the binteger 87) joint "camera") + ) + ) + ) + (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) ) ) ) diff --git a/goal_src/levels/citadel/assistant-citadel.gc b/goal_src/levels/citadel/assistant-citadel.gc index 0dc0bf489e..7b51c775de 100644 --- a/goal_src/levels/citadel/assistant-citadel.gc +++ b/goal_src/levels/citadel/assistant-citadel.gc @@ -7,7 +7,8 @@ (define-extern *assistant-lavatube-end-sg* skeleton-group) -;; definition of type assistant-lavatube-end +;; DECOMP BEGINS + (deftype assistant-lavatube-end (process-taskable) () :heap-base #x110 @@ -16,7 +17,7 @@ :flag-assert #x350110017c ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -34,7 +35,6 @@ (set! *assistant-lavatube-end-sg* v1-1) ) -;; definition for method 32 of type assistant-lavatube-end (defmethod play-anim! assistant-lavatube-end @@ -126,12 +126,10 @@ ) ) -;; definition for method 31 of type assistant-lavatube-end (defmethod get-art-elem assistant-lavatube-end ((obj assistant-lavatube-end)) (-> obj draw art-group data 3) ) -;; failed to figure out what this is: (defstate hidden (assistant-lavatube-end) :virtual #t :trans @@ -144,7 +142,10 @@ *target* (>= 61440.0 - (vector-vector-distance (-> self root trans) (-> *target* control trans)) + (vector-vector-distance + (-> self root-override trans) + (-> *target* control trans) + ) ) ) (not @@ -160,7 +161,6 @@ ) ) -;; failed to figure out what this is: (defstate idle (assistant-lavatube-end) :virtual #t :enter @@ -168,12 +168,7 @@ ((-> (method-of-type process-taskable idle) enter)) (case (get-task-status (game-task village4-button)) (((task-status need-reward-speech)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'play-anim) - (send-event-function self a1-0) - ) + (send-event self 'play-anim) ) ) (none) @@ -242,7 +237,6 @@ ) ) -;; definition for method 39 of type assistant-lavatube-end (defmethod should-display? assistant-lavatube-end ((obj assistant-lavatube-end)) (first-any (-> obj tasks) #t) (let ((v1-3 (current-status (-> obj tasks)))) @@ -253,7 +247,6 @@ ) ) -;; definition for method 11 of type assistant-lavatube-end (defmethod copy-defaults! assistant-lavatube-end @@ -272,3 +265,7 @@ (dummy-42 obj) (none) ) + + + + diff --git a/goal_src/levels/citadel/citb-drop-plat-CIT.gc b/goal_src/levels/citadel/citb-drop-plat-CIT.gc index 70786c2015..e35b945829 100644 --- a/goal_src/levels/citadel/citb-drop-plat-CIT.gc +++ b/goal_src/levels/citadel/citb-drop-plat-CIT.gc @@ -149,22 +149,11 @@ (go drop-plat-drop) ) ((or (= v1-0 'touch) (= v1-0 'attack)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 300)) - (send-event-function *target* a1-2) - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'player-stepped) - (set! (-> a1-3 param 0) (the-as uint (-> self color))) - (send-event-function - (ppointer->process (-> self parent)) - a1-3 - ) + (send-event *target* 'no-look-around 300) + (send-event + (ppointer->process (-> self parent)) + 'player-stepped + (-> self color) ) #f ) @@ -694,12 +683,7 @@ (defbehavior citb-drop-plat-drop-all-children citb-drop-plat () (dotimes (gp-0 (-> self child-count)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'drop) - (send-event-function (handle->process (-> self child-array data gp-0)) a1-0) - ) + (send-event (handle->process (-> self child-array data gp-0)) 'drop) (set! (-> self child-array data gp-0) (the-as handle #f)) ) #f @@ -718,12 +702,7 @@ (!= (-> (the-as drop-plat a0-3) color) 6) (= arg0 (-> (the-as drop-plat a0-3) color)) ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'drop) - (send-event-function a0-3 a1-2) - ) + (send-event a0-3 'drop) (set! (-> self child-array data s5-0) (the-as handle #f)) ) ) diff --git a/goal_src/levels/common/basebutton.gc b/goal_src/levels/common/basebutton.gc index 57c7d9232d..6fca010f5a 100644 --- a/goal_src/levels/common/basebutton.gc +++ b/goal_src/levels/common/basebutton.gc @@ -8,7 +8,8 @@ (define-extern *generic-button-sg* skeleton-group) (define-extern target-warp-out (state vector vector target)) -;; definition of type basebutton +;; DECOMP BEGINS + (deftype basebutton (process-drawable) ((root-override collide-shape-moving :offset 112) (down? symbol :offset-assert 176) @@ -45,7 +46,7 @@ ) ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -62,8 +63,6 @@ (set! *generic-button-sg* v1-1) ) -;; definition for method 30 of type basebutton -;; Used lq/sq (defmethod move-to-vec-or-quat! basebutton @@ -79,7 +78,6 @@ ) ) -;; failed to figure out what this is: (defstate basebutton-startup (basebutton) :virtual #t :code @@ -92,7 +90,6 @@ ) ) -;; failed to figure out what this is: (defstate basebutton-up-idle (basebutton) :virtual #t :event @@ -169,7 +166,6 @@ ) ) -;; failed to figure out what this is: (defstate basebutton-going-down (basebutton) :virtual #t :event @@ -251,7 +247,6 @@ ) ) -;; failed to figure out what this is: (defstate basebutton-down-idle (basebutton) :virtual #t :event @@ -303,7 +298,7 @@ (else (until (>= - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) + (- (-> *display* base-frame-counter) (-> self state-time)) (the int (* 300.0 (-> self timeout))) ) (suspend) @@ -335,7 +330,6 @@ ) ) -;; failed to figure out what this is: (defstate basebutton-going-up (basebutton) :virtual #t :event @@ -411,7 +405,6 @@ ) ) -;; definition for method 31 of type basebutton (defmethod press! basebutton ((obj basebutton) (arg0 symbol)) (set! (-> obj down?) arg0) (cond @@ -428,7 +421,6 @@ ) ) -;; definition for method 29 of type basebutton (defmethod TODO-RENAME-29 basebutton @@ -461,7 +453,6 @@ ) ) -;; definition for method 25 of type basebutton (defmethod reset! basebutton ((obj basebutton)) (set! (-> obj down?) #f) (set! (-> obj spawned-by-other?) #t) @@ -478,7 +469,6 @@ ) ) -;; definition for method 28 of type basebutton (defmethod arm-trigger-event! basebutton ((obj basebutton)) (let ((v0-0 'trigger)) (set! (-> obj event-going-down) v0-0) @@ -486,7 +476,6 @@ ) ) -;; definition for method 26 of type basebutton (defmethod TODO-RENAME-26 basebutton ((obj basebutton)) (dummy-14 obj *generic-button-sg* '()) (logior! (-> obj skel status) 1) @@ -533,7 +522,6 @@ (none) ) -;; definition for method 27 of type basebutton (defmethod TODO-RENAME-27 basebutton ((obj basebutton)) (let ((s5-0 @@ -596,7 +584,6 @@ ) ) -;; definition for method 11 of type basebutton (defmethod copy-defaults! basebutton ((obj basebutton) (arg0 res-lump)) (reset! obj) (set! (-> obj spawned-by-other?) #f) @@ -649,8 +636,6 @@ (none) ) -;; definition for function basebutton-init-by-other -;; Used lq/sq (defbehavior basebutton-init-by-other basebutton ((arg0 basebutton) @@ -679,7 +664,6 @@ (none) ) -;; definition for symbol *warp-info*, type (array string) (define *warp-info* (the-as (array string) @@ -696,7 +680,6 @@ ) ) -;; definition of type warp-gate (deftype warp-gate (process-drawable) ((level symbol :offset-assert 176) (level-slot int32 :offset-assert 180) @@ -715,31 +698,12 @@ ) ) -;; definition for method 3 of type warp-gate -(defmethod inspect warp-gate ((obj warp-gate)) - (let ((t9-0 (method-of-type process-drawable inspect))) - (t9-0 obj) - ) - (format #t "~T~Tlevel: ~A~%" (-> obj level)) - (format #t "~T~Tlevel-slot: ~D~%" (-> obj level-slot)) - (format #t "~T~Tmin-slot: ~D~%" (-> obj min-slot)) - (format #t "~T~Tmax-slot: ~D~%" (-> obj max-slot)) - obj - ) -;; failed to figure out what this is: (defstate use (warp-gate) :virtual #t :trans (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'joystick) - (set! (-> a1-0 param 0) (the-as uint 0.0)) - (set! (-> a1-0 param 1) (the-as uint 0.0)) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'joystick 0.0 0.0) (none) ) :code @@ -774,10 +738,7 @@ (not (member (level-status *level* (-> arg1 load-name)) '(loaded active)) ) - (< - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) - 600 - ) + (< (- (-> *display* base-frame-counter) (-> self state-time)) 600) ) (suspend) ) @@ -792,7 +753,6 @@ ) ) -;; definition for symbol *warp-jump-mods*, type surface (define *warp-jump-mods* (new 'static 'surface @@ -819,7 +779,6 @@ ) ) -;; failed to figure out what this is: (defstate target-warp-out (target) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -859,14 +818,7 @@ ) :code (behavior ((arg0 vector) (arg1 vector)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 2) - (set! (-> a1-1 message) 'change-state) - (set! (-> a1-1 param 0) (the-as uint cam-fixed)) - (set! (-> a1-1 param 1) (the-as uint 0)) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'change-state cam-fixed 0) (ja-channel-push! 1 60) (let ((gp-0 (-> self skel root-channel 0))) (set! @@ -998,23 +950,14 @@ ) ) (set! (-> gp-2 y) 0.0) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'sidekick) - (set! (-> a1-7 param 0) (the-as uint #f)) - (send-event-function *target* a1-7) - ) + (send-event *target* 'sidekick #f) (when (and (or (< (vector-dot gp-2 (-> self control transv)) 0.0) (-> self control unknown-symbol20) ) - (>= - (- (-> *display* base-frame-counter) (the-as int (-> self state-time))) - 15 - ) + (>= (- (-> *display* base-frame-counter) (-> self state-time)) 15) ) (vector-seek! (-> self draw color-mult) @@ -1024,14 +967,7 @@ (set! (-> self control transv x) (* 0.95 (-> self control transv x))) (set! (-> self control transv z) (* 0.95 (-> self control transv z))) (when (not (-> self control unknown-symbol20)) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 2) - (set! (-> a1-9 message) 'do-effect) - (set! (-> a1-9 param 0) (the-as uint 'death-warp-out)) - (set! (-> a1-9 param 1) (the-as uint -1.0)) - (send-event-function self a1-9) - ) + (send-event self 'do-effect 'death-warp-out -1.0) (let ((v0-2 #t)) (set! (-> self control unknown-symbol20) v0-2) v0-2 @@ -1073,3 +1009,7 @@ :post target-no-stick-post ) + + + + diff --git a/goal_src/levels/common/baseplat.gc b/goal_src/levels/common/baseplat.gc index 129c61f980..9a9ac398c3 100644 --- a/goal_src/levels/common/baseplat.gc +++ b/goal_src/levels/common/baseplat.gc @@ -267,14 +267,7 @@ eco-door-event-handler ) ) ) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'query) - (set! (-> a1-0 param 0) (the-as uint 'powerup)) - (set! (-> a1-0 param 1) (the-as uint 3)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'query 'powerup 3) ) ) ) diff --git a/goal_src/levels/common/battlecontroller.gc b/goal_src/levels/common/battlecontroller.gc index 1802de193c..a63d44d119 100644 --- a/goal_src/levels/common/battlecontroller.gc +++ b/goal_src/levels/common/battlecontroller.gc @@ -142,14 +142,8 @@ battlecontroller-default-event-handler (when (not (-> self camera-on)) (set! (-> self camera-on) #t) (let ((v1-4 (res-lump-struct (-> self entity) 'camera-name structure))) - (when v1-4 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'change-to-entity-by-name) - (set! (-> a1-1 param 0) (the-as uint v1-4)) - (send-event-function *camera* a1-1) - ) + (if v1-4 + (send-event *camera* 'change-to-entity-by-name v1-4) ) ) ) @@ -158,12 +152,7 @@ battlecontroller-default-event-handler (defbehavior battlecontroller-camera-off battlecontroller () (set! (-> self camera-on) #f) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'clear-entity) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'clear-entity) 0 (none) ) @@ -185,13 +174,7 @@ battlecontroller-default-event-handler (the float (-> s5-0 state)) 'interp ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'cue-jump-to-point) - (set! (-> a1-2 param 0) (the-as uint s3-0)) - (send-event-function s4-0 a1-2) - ) + (send-event s4-0 'cue-jump-to-point s3-0) ) (if (zero? (logand (-> (the-as nav-enemy s4-0) nav-enemy-flags) 2048)) (+! (-> s5-0 state) 1) @@ -199,12 +182,7 @@ battlecontroller-default-event-handler ) ) (else - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'cue-chase) - (send-event-function s4-0 a1-3) - ) + (send-event s4-0 'cue-chase) (set! (-> s5-0 creature) (the-as handle #f)) ) ) @@ -409,12 +387,7 @@ battlecontroller-default-event-handler (let ((s4-0 (battlecontroller-spawn-creature gp-1 (-> self root trans)))) (when (handle->process s4-0) (suspend) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'cue-chase) - (send-event-function (handle->process s4-0) a1-4) - ) + (send-event (handle->process s4-0) 'cue-chase) ) ) ) diff --git a/goal_src/levels/common/nav-enemy.gc b/goal_src/levels/common/nav-enemy.gc index 8cf9548560..d8c9590c51 100644 --- a/goal_src/levels/common/nav-enemy.gc +++ b/goal_src/levels/common/nav-enemy.gc @@ -186,18 +186,10 @@ nav-enemy-attack-handler nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block)) - (with-pp - (let ((v1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-0 from) pp) - (set! (-> v1-0 num-params) 1) - (set! (-> v1-0 message) 'get-attack-count) - (set! (-> v1-0 param 0) (the-as uint 1)) - (send-event-function arg0 v1-0) - ) - (logclear! (-> obj mask) (process-mask actor-pause attackable)) - (go (method-of-object obj nav-enemy-die)) - (the-as object 'die) - ) + (send-event arg0 'get-attack-count 1) + (logclear! (-> obj mask) (process-mask actor-pause attackable)) + (go (method-of-object obj nav-enemy-die)) + (the-as object 'die) ) ;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? @@ -205,27 +197,19 @@ dummy-43 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block)) - (with-pp - (the-as object (cond - ((logtest? (-> obj nav-enemy-flags) 32) - (let ((v1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-2 from) pp) - (set! (-> v1-2 num-params) 1) - (set! (-> v1-2 message) 'get-attack-count) - (set! (-> v1-2 param 0) (the-as uint 1)) - (send-event-function arg0 v1-2) - ) - (logclear! - (-> obj mask) - (process-mask actor-pause attackable) - ) - (go (method-of-object obj nav-enemy-die)) - ) - (else - (dummy-44 obj arg0 arg1) + (the-as object (cond + ((logtest? (-> obj nav-enemy-flags) 32) + (send-event arg0 'get-attack-count 1) + (logclear! + (-> obj mask) + (process-mask actor-pause attackable) ) + (go (method-of-object obj nav-enemy-die)) ) - ) + (else + (dummy-44 obj arg0 arg1) + ) + ) ) ) @@ -2194,12 +2178,7 @@ nav-enemy-default-event-handler ) :enter (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'child-die) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (send-event (ppointer->process (-> self parent)) 'child-die) (none) ) :code @@ -2216,12 +2195,7 @@ nav-enemy-default-event-handler 1000000000000000.0 600 ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'death-end) - (send-event-function self a1-2) - ) + (send-event self 'death-end) (if (logtest? (-> self enemy-info options) 2) (go-virtual nav-enemy-fuel-cell) ) diff --git a/goal_src/levels/common/plat-button.gc b/goal_src/levels/common/plat-button.gc index 6500bd6e25..56a0f7758c 100644 --- a/goal_src/levels/common/plat-button.gc +++ b/goal_src/levels/common/plat-button.gc @@ -272,14 +272,8 @@ (defbehavior plat-button-camera-on plat-button () (let ((v1-1 (res-lump-struct (-> self entity) 'camera-name structure))) - (when v1-1 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'change-to-entity-by-name) - (set! (-> a1-1 param 0) (the-as uint v1-1)) - (send-event-function *camera* a1-1) - ) + (if v1-1 + (send-event *camera* 'change-to-entity-by-name v1-1) ) ) 0 @@ -287,12 +281,7 @@ ) (defbehavior plat-button-camera-off plat-button () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'clear-entity) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'clear-entity) 0 (none) ) diff --git a/goal_src/levels/common/sharkey.gc b/goal_src/levels/common/sharkey.gc index 1177287f1a..aeb5ed9335 100644 --- a/goal_src/levels/common/sharkey.gc +++ b/goal_src/levels/common/sharkey.gc @@ -690,12 +690,7 @@ nav-enemy-default-event-handler ) ) ) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) self) - (set! (-> a1-14 num-params) 0) - (set! (-> a1-14 message) 'end-mode) - (send-event-function *target* a1-14) - ) + (send-event *target* 'end-mode) (set! (-> self mask) (logior (process-mask enemy) (-> self mask))) ) ) diff --git a/goal_src/levels/common/water-anim.gc b/goal_src/levels/common/water-anim.gc index f4f992dcd6..445b048518 100644 --- a/goal_src/levels/common/water-anim.gc +++ b/goal_src/levels/common/water-anim.gc @@ -17,6 +17,16 @@ :flag-assert #x1e007000dc ) +;; definition for method 3 of type water-anim +(defmethod inspect water-anim ((obj water-anim)) + (let ((t9-0 (method-of-type water-vol inspect))) + (t9-0 obj) + ) + (format #t "~T~Tlook: ~D~%" (-> obj look)) + (format #t "~T~Tplay-ambient-sound?: ~A~%" (-> obj play-ambient-sound?)) + obj + ) + ;; failed to figure out what this is: (let ((v1-1 @@ -892,25 +902,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 70 :fo-max 80 @@ -925,25 +917,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 50 :fo-max 60 @@ -957,25 +931,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 48 :fo-max 58 @@ -990,25 +946,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 30 :fo-max 40 @@ -1023,25 +961,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 15 :fo-max 25 @@ -1056,25 +976,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 27 :fo-max 37 @@ -1089,25 +991,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 26 :fo-max 36 @@ -1122,25 +1006,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 25 :fo-max 35 @@ -1155,25 +1021,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 45 :fo-max 55 @@ -1188,25 +1036,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 20 :fo-max 30 @@ -1220,25 +1050,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 40 :fo-max 50 @@ -1252,25 +1064,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 20 :fo-max 30 @@ -1285,25 +1079,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x77 - #x61 - #x74 - #x65 - #x72 - #x2d - #x6c - #x6f - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 27 :fo-max 37 @@ -1318,25 +1094,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 22 :fo-max 32 @@ -1356,25 +1114,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 70 :fo-max 80 @@ -1389,25 +1129,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 40 :fo-max 50 @@ -1422,25 +1144,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 37 :fo-max 47 @@ -1455,25 +1159,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 20 :fo-max 30 @@ -1487,25 +1173,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 51 :fo-max 61 @@ -1519,25 +1187,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 54 :fo-max 64 @@ -1613,25 +1263,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 17 :fo-max 27 @@ -1682,25 +1314,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x68 - #x65 - #x6c - #x69 - #x78 - #x2d - #x64 - #x61 - #x72 - #x6b - #x2d - #x65 - #x63 - #x6f - #x0 - #x0 - ) + :sound-name (static-sound-name "helix-dark-eco") :volume #x400 :fo-min #x78 :fo-max #x82 @@ -1715,25 +1329,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x61 - #x72 - #x6b - #x65 - #x63 - #x6f - #x2d - #x70 - #x6f - #x6f - #x6c - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 19 :fo-max 29 @@ -1879,7 +1475,7 @@ ) ;; definition for method 22 of type water-anim -;; INFO: Return type mismatch int vs ripple-wave-set. +;; INFO: Return type mismatch none vs ripple-wave-set. (defmethod TODO-RENAME-22 water-anim ((obj water-anim)) (let ((s5-0 (-> obj look))) (if (or (< s5-0 0) (>= s5-0 (-> *water-anim-look* length))) @@ -1924,3 +1520,7 @@ ) (the-as ripple-wave-set (ja-post)) ) + + + + diff --git a/goal_src/levels/finalboss/final-door.gc b/goal_src/levels/finalboss/final-door.gc index 86b3793249..cc66a94b9b 100644 --- a/goal_src/levels/finalboss/final-door.gc +++ b/goal_src/levels/finalboss/final-door.gc @@ -325,32 +325,18 @@ (get-task-status (game-task finalboss-movies)) (task-status need-reward-speech) ) - (let ((gp-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> gp-0 from) self) - (set! (-> gp-0 num-params) 3) - (set! (-> gp-0 message) 'change-mode) - (set! (-> gp-0 param 0) (the-as uint 'final-door)) - (set! - (-> gp-0 param 1) - (the-as - uint - (search-process-tree *active-pool* (lambda ((arg0 final-door)) - (= (-> arg0 type) power-right) - ) - ) - ) + (send-event + *target* + 'change-mode + 'final-door + (search-process-tree *active-pool* (lambda ((arg0 final-door)) + (= (-> arg0 type) power-right) + ) ) - (set! - (-> gp-0 param 2) - (the-as - uint - (search-process-tree *active-pool* (lambda ((arg0 final-door)) - (= (-> arg0 type) power-left) - ) - ) - ) + (search-process-tree *active-pool* (lambda ((arg0 final-door)) + (= (-> arg0 type) power-left) + ) ) - (send-event-function *target* gp-0) ) ) ) @@ -548,13 +534,7 @@ ) :enter (behavior ((arg0 basic) (arg1 handle)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'change-to-entity-by-name) - (set! (-> a1-1 param 0) (the-as uint "camera-403")) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'change-to-entity-by-name "camera-403") (set! (-> self control unknown-surface00) *empty-mods*) (logior! (-> self state-flags) 272) (set-setting! *setting-control* self 'allow-progress #f 0.0 0) @@ -562,14 +542,7 @@ ) :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'change-state) - (set! (-> a1-0 param 0) (the-as uint *camera-base-mode*)) - (set! (-> a1-0 param 1) (the-as uint 60)) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'change-state *camera-base-mode* 60) (set! (-> self state-flags) (logand -273 (-> self state-flags))) (target-exit) (clear-pending-settings-from-process *setting-control* self 'allow-progress) diff --git a/goal_src/levels/finalboss/green-eco-lurker.gc b/goal_src/levels/finalboss/green-eco-lurker.gc index 6674208e91..138e0d207d 100644 --- a/goal_src/levels/finalboss/green-eco-lurker.gc +++ b/goal_src/levels/finalboss/green-eco-lurker.gc @@ -364,28 +364,21 @@ dummy-43 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (cond - ((= (-> arg0 type) target) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-2) - ) + (cond + ((= (-> arg0 type) target) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) - #f - ) - (else - (nav-enemy-set-hit-from-direction arg0) - ((method-of-type nav-enemy dummy-43) obj arg0 arg1) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) + #f + ) + (else + (nav-enemy-set-hit-from-direction arg0) + ((method-of-type nav-enemy dummy-43) obj arg0 arg1) ) ) ) @@ -394,27 +387,20 @@ nav-enemy-attack-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (cond - ((= (-> arg0 type) target) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-2) - ) + (cond + ((= (-> arg0 type) target) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) - #f - ) - (else - ((method-of-type nav-enemy nav-enemy-attack-handler) obj arg0 arg1) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) + #f + ) + (else + ((method-of-type nav-enemy nav-enemy-attack-handler) obj arg0 arg1) ) ) ) @@ -423,29 +409,22 @@ dummy-44 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (when - (and - (logtest? (-> obj nav-enemy-flags) 64) - ((method-of-type touching-shapes-entry prims-touching?) - (the-as touching-shapes-entry (-> arg1 param 0)) - (-> obj collide-info) - (the-as uint 1) - ) + (when + (and + (logtest? (-> obj nav-enemy-flags) 64) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg1 param 0)) + (-> obj collide-info) + (the-as uint 1) ) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-3) - ) + ) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) ) ) @@ -454,29 +433,22 @@ nav-enemy-touch-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (when - (and - (logtest? (-> obj nav-enemy-flags) 64) - ((method-of-type touching-shapes-entry prims-touching?) - (the-as touching-shapes-entry (-> arg1 param 0)) - (-> obj collide-info) - (the-as uint 1) - ) + (when + (and + (logtest? (-> obj nav-enemy-flags) 64) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg1 param 0)) + (-> obj collide-info) + (the-as uint 1) ) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-3) - ) + ) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) ) ) @@ -1090,12 +1062,7 @@ :virtual #t :enter (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'blob-died) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (send-event (ppointer->process (-> self parent)) 'blob-died) (let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000))) (when gp-0 (let ((t9-2 (method-of-type part-tracker activate))) @@ -1265,20 +1232,10 @@ (case arg2 (('blob-died) (set! (-> self num-alive) (max 0 (+ (-> self num-alive) -1))) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'blob-died) - (send-event-function (ppointer->process (-> self parent)) a1-1) - ) + (send-event (ppointer->process (-> self parent)) 'blob-died) ) (('blob-hit-jak) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> self parent)) a1-2) - ) + (send-event (ppointer->process (-> self parent)) 'blob-hit-jak) ) ) ) @@ -1324,12 +1281,7 @@ (while (> (-> self num-alive) 0) (suspend) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'trigger) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'trigger) (until (not (-> self child)) (suspend) ) diff --git a/goal_src/levels/finalboss/light-eco.gc b/goal_src/levels/finalboss/light-eco.gc index 68bc3d4f2a..6ad887e620 100644 --- a/goal_src/levels/finalboss/light-eco.gc +++ b/goal_src/levels/finalboss/light-eco.gc @@ -537,15 +537,10 @@ (let ((v1-0 arg2)) (the-as object (when (or (= v1-0 'touch) (= v1-0 'attack)) (when (= (-> arg0 type) target) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'trigger) - (set! (-> a1-3 param 0) (the-as uint (-> self angle-bit))) - (send-event-function - (ppointer->process (-> self parent)) - a1-3 - ) + (send-event + (ppointer->process (-> self parent)) + 'trigger + (-> self angle-bit) ) (go light-eco-child-grabbed) ) @@ -755,12 +750,10 @@ (defstate light-eco-child-die (light-eco-child) :code (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'untrigger) - (set! (-> a1-0 param 0) (the-as uint (-> self angle-bit))) - (send-event-function (ppointer->process (-> self parent)) a1-0) + (send-event + (ppointer->process (-> self parent)) + 'untrigger + (-> self angle-bit) ) (dummy-48 (-> self root-override)) (logior! (-> self draw status) 2) @@ -1193,8 +1186,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x63652d6574696877) + :sound-name (static-sound-name "white-eco-lp") :volume #x400 :fo-min #x12c :fo-max #x190 diff --git a/goal_src/levels/finalboss/robotboss-misc.gc b/goal_src/levels/finalboss/robotboss-misc.gc index 57072c1416..ab864f3abf 100644 --- a/goal_src/levels/finalboss/robotboss-misc.gc +++ b/goal_src/levels/finalboss/robotboss-misc.gc @@ -713,8 +713,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x766f6d2d6f6c6973) + :sound-name (static-sound-name "silo-moves") :volume #x400 :fo-max 80 ) @@ -763,102 +762,71 @@ ) (defmethod play-anim! finalbosscam ((obj finalbosscam) (arg0 symbol)) - (with-pp - (when arg0 - (let ((s5-0 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj robotboss) (ppointer->handle (when s5-0 - (let - ((t9-1 - (method-of-type - manipy - activate - ) + (when arg0 + (let ((s5-0 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj robotboss) (ppointer->handle (when s5-0 + (let + ((t9-1 + (method-of-type + manipy + activate ) ) - (t9-1 - (the-as manipy s5-0) - obj - 'manipy - (the-as pointer #x70004000) - ) ) - (run-now-in-process - s5-0 - manipy-init - (-> obj root-override trans) - (-> obj entity) - *robotboss-sg* - #f + (t9-1 + (the-as manipy s5-0) + obj + 'manipy + (the-as pointer #x70004000) ) - (-> s5-0 ppointer) ) - ) - ) + (run-now-in-process + s5-0 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *robotboss-sg* + #f + ) + (-> s5-0 ppointer) + ) + ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'anim-mode) - (set! (-> a1-4 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj robotboss)) a1-4) - ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'center-joint) - (set! (-> a1-5 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj robotboss)) a1-5) - ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'origin-joint-index) - (set! (-> a1-6 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj robotboss)) a1-6) - ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) pp) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'trans-hook) - (set! (-> a1-7 param 0) (the-as uint robotboss-manipy-trans-hook)) - (send-event-function (handle->process (-> obj robotboss)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'eval) - (set! - (-> a1-8 param 0) - (the-as - uint - (lambda :behavior finalbosscam - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 645) self))) - (set! (-> self part) v0-0) - v0-0 - ) - ) - ) - ) - (send-event-function (handle->process (-> obj robotboss)) a1-8) - ) - (let ((v1-43 (handle->process (-> obj robotboss)))) - (if v1-43 - (set! (-> (the-as robotboss v1-43) draw bounds w) 327680.0) + ) + (send-event (handle->process (-> obj robotboss)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj robotboss)) 'center-joint 3) + (send-event (handle->process (-> obj robotboss)) 'origin-joint-index 3) + (send-event + (handle->process (-> obj robotboss)) + 'trans-hook + robotboss-manipy-trans-hook + ) + (send-event + (handle->process (-> obj robotboss)) + 'eval + (lambda :behavior finalbosscam + () + (let ((v0-0 (create-launch-control (-> *part-group-id-table* 645) self))) + (set! (-> self part) v0-0) + v0-0 ) ) ) - (the-as - basic - (new 'static 'spool-anim - :name "finalbosscam-white-eco" - :index 3 - :parts 3 - :command-list '() + (let ((v1-43 (handle->process (-> obj robotboss)))) + (if v1-43 + (set! (-> (the-as robotboss v1-43) draw bounds w) 327680.0) ) ) ) + (the-as + basic + (new 'static 'spool-anim + :name "finalbosscam-white-eco" + :index 3 + :parts 3 + :command-list '() + ) + ) ) (defmethod get-art-elem finalbosscam ((obj finalbosscam)) diff --git a/goal_src/levels/finalboss/robotboss-weapon.gc b/goal_src/levels/finalboss/robotboss-weapon.gc index d1ddfda902..165843dea5 100644 --- a/goal_src/levels/finalboss/robotboss-weapon.gc +++ b/goal_src/levels/finalboss/robotboss-weapon.gc @@ -281,13 +281,7 @@ (defstate darkecobomb-explode (darkecobomb) :code (behavior ((arg0 symbol)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'reset-pickup) - (set! (-> a1-0 param 0) (the-as uint 'eco)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'reset-pickup 'eco) (sound-play-by-name (static-sound-name "explod-bomb") (new-sound-id) @@ -298,13 +292,7 @@ (the-as vector #f) ) (activate! *camera-smush-control* 819.2 37 600 1.0 0.995) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'flash) - (set! (-> a1-3 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) (let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000))) (when s5-1 (let ((t9-6 (method-of-type part-tracker activate))) @@ -340,43 +328,15 @@ (if *target* (logior! (-> *target* mask) (process-mask sleep)) ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 0) - (set! (-> a1-7 message) 'bomb-going) - (send-event-function (ppointer->process (-> self parent)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'change-to-entity-by-name) - (set! (-> a1-8 param 0) (the-as uint "camera-402")) - (send-event-function *camera* a1-8) - ) + (send-event (ppointer->process (-> self parent)) 'bomb-going) + (send-event *camera* 'change-to-entity-by-name "camera-402") (set! (-> self state-time) (-> *display* base-frame-counter)) (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 600) (suspend) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'force-blend) - (set! (-> a1-9 param 0) (the-as uint 0)) - (send-event-function *camera* a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'change-state) - (set! (-> a1-10 param 0) (the-as uint *camera-base-mode*)) - (send-event-function *camera* a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'clear-entity) - (send-event-function *camera* a1-11) - ) + (send-event *camera* 'force-blend 0) + (send-event *camera* 'change-state *camera-base-mode*) + (send-event *camera* 'clear-entity) (if *target* (logclear! (-> *target* mask) (process-mask sleep)) ) @@ -393,12 +353,7 @@ ) ) (else - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'bomb-done) - (send-event-function (ppointer->process (-> self parent)) a1-13) - ) + (send-event (ppointer->process (-> self parent)) 'bomb-done) ) ) (deactivate self) @@ -880,8 +835,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6970732d626d6f62) + :sound-name (static-sound-name "bomb-spin") :volume #x400 :fo-max 80 ) @@ -1205,12 +1159,7 @@ ) (send-event-function *target* a1-2) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'hit-jak) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'hit-jak) ) ) (dotimes (gp-1 5) @@ -1236,12 +1185,7 @@ (set-vector! (-> self draw color-mult) f0-3 f0-3 f0-3 0.75) ) (when (>= (- (-> *display* game-frame-counter) (-> self state-time)) 600) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 0) - (set! (-> a1-7 message) 'missed-jak) - (send-event-function (ppointer->process (-> self parent)) a1-7) - ) + (send-event (ppointer->process (-> self parent)) 'missed-jak) (deactivate self) ) (none) @@ -1411,8 +1355,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x657269662d646572) + :sound-name (static-sound-name "red-fireball") :volume #x400 :fo-max 80 ) @@ -1450,12 +1393,7 @@ ) (send-event-function *target* a1-3) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'hit-jak) - (send-event-function (ppointer->process (-> self parent)) a1-4) - ) + (send-event (ppointer->process (-> self parent)) 'hit-jak) ) ) ) @@ -1480,12 +1418,7 @@ (- (-> *display* game-frame-counter) (-> self state-time)) (-> self flight-time) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'missed-jak) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'missed-jak) (deactivate self) ) (none) diff --git a/goal_src/levels/finalboss/robotboss.gc b/goal_src/levels/finalboss/robotboss.gc index 33511a695f..51d843f966 100644 --- a/goal_src/levels/finalboss/robotboss.gc +++ b/goal_src/levels/finalboss/robotboss.gc @@ -146,13 +146,7 @@ (defbehavior robotboss-shooting-trans robotboss ((arg0 int)) (let ((gp-0 (new 'stack-no-clear 'vector))) (vector<-cspace! gp-0 (-> self node-list data arg0)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'trans) - (set! (-> a1-2 param 0) (the-as uint gp-0)) - (send-event-function (handle->process (-> self shot-attractor)) a1-2) - ) + (send-event (handle->process (-> self shot-attractor)) 'trans gp-0) ) (none) ) @@ -201,20 +195,8 @@ ) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'attackable) - (set! (-> a1-5 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self shot-attractor)) a1-5) - ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'draw) - (set! (-> a1-6 param 0) (the-as uint #f)) - (send-event-function (handle->process (-> self shot-attractor)) a1-6) - ) + (send-event (handle->process (-> self shot-attractor)) 'attackable #t) + (send-event (handle->process (-> self shot-attractor)) 'draw #f) ) (defbehavior robotboss-yellow-eco-off robotboss () @@ -319,13 +301,7 @@ (vector-normalize! gp-0 (the-as float 204800.0)) (set! (-> gp-0 y) 32768.0) (vector+! gp-0 gp-0 s5-0) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'set-pivot) - (set! (-> a1-12 param 0) (the-as uint gp-0)) - (send-event-function *camera* a1-12) - ) + (send-event *camera* 'set-pivot gp-0) ) (when (-> self alts 6) (let ((a0-16 (-> self alts 6 extra process)) @@ -345,13 +321,7 @@ (set! (-> v1-23 y) (+ -20.48 (-> v1-23 y))) ) ) - (let ((a1-22 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-22 from) self) - (set! (-> a1-22 num-params) 1) - (set! (-> a1-22 message) 'move-to) - (set! (-> a1-22 param 0) (the-as uint v1-23)) - (send-event-function a0-16 a1-22) - ) + (send-event a0-16 'move-to v1-23) ) ) ) @@ -602,12 +572,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'beam-off) - (send-event-function (handle->process (-> self white-eco)) a1-4) - ) + (send-event (handle->process (-> self white-eco)) 'beam-off) (none) ) :trans @@ -1209,12 +1174,7 @@ ) ) ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'play-anim) - (send-event-function (handle->process gp-1) a1-11) - ) + (send-event (handle->process gp-1) 'play-anim) (suspend) (while (movie?) (suspend) @@ -1420,13 +1380,7 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'flash) - (set! (-> a1-9 param 0) (the-as uint 255.0)) - (send-event-function self a1-9) - ) + (send-event self 'flash 255.0) (let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000))) (when s5-1 (let ((t9-8 (method-of-type part-tracker activate))) @@ -1621,13 +1575,7 @@ (the-as uint 0) ) (set! (-> self use-interesting) #f) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'point-of-interest) - (set! (-> a1-3 param 0) (the-as uint #f)) - (send-event-function *camera* a1-3) - ) + (send-event *camera* 'point-of-interest #f) (if (nonzero? (-> self yellow-gun)) (set-mode! (-> self yellow-gun) (joint-mod-handler-mode flex-blend)) ) @@ -1703,36 +1651,17 @@ ) ) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'flash) - (set! (-> a1-8 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-8) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) + (send-event (ppointer->process gp-1) 'anim-mode 'play1) + (send-event + (ppointer->process gp-1) + 'rot-quat + (-> self root-override quat) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'play1)) - (send-event-function (ppointer->process gp-1) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'rot-quat) - (set! (-> a1-10 param 0) (the-as uint (-> self root-override quat))) - (send-event-function (ppointer->process gp-1) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'art-joint-anim) - (set! - (-> a1-11 param 0) - (the-as uint "robotboss-yelloweco-yellow-last-hit") - ) - (send-event-function (ppointer->process gp-1) a1-11) + (send-event + (ppointer->process gp-1) + 'art-joint-anim + "robotboss-yelloweco-yellow-last-hit" ) ) ) @@ -3127,33 +3056,17 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'flash) - (set! (-> a1-9 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-9) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) + (send-event (ppointer->process gp-1) 'anim-mode 'play1) + (send-event + (ppointer->process gp-1) + 'rot-quat + (-> self root-override quat) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'anim-mode) - (set! (-> a1-10 param 0) (the-as uint 'play1)) - (send-event-function (ppointer->process gp-1) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'rot-quat) - (set! (-> a1-11 param 0) (the-as uint (-> self root-override quat))) - (send-event-function (ppointer->process gp-1) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'art-joint-anim) - (set! (-> a1-12 param 0) (the-as uint "robotboss-redeco-red-last-hit")) - (send-event-function (ppointer->process gp-1) a1-12) + (send-event + (ppointer->process gp-1) + 'art-joint-anim + "robotboss-redeco-red-last-hit" ) ) ) @@ -5338,13 +5251,7 @@ (the-as uint 0) ) (set! (-> self use-interesting) #f) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'point-of-interest) - (set! (-> a1-3 param 0) (the-as uint #f)) - (send-event-function *camera* a1-3) - ) + (send-event *camera* 'point-of-interest #f) (robotboss-blue-done) (if (nonzero? (-> self looping-sound 0)) (stop! (-> self looping-sound 0)) @@ -5436,33 +5343,17 @@ ) ) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'flash) - (set! (-> a1-10 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-10) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) + (send-event (ppointer->process gp-2) 'anim-mode 'play1) + (send-event + (ppointer->process gp-2) + 'rot-quat + (-> self root-override quat) ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'play1)) - (send-event-function (ppointer->process gp-2) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'rot-quat) - (set! (-> a1-12 param 0) (the-as uint (-> self root-override quat))) - (send-event-function (ppointer->process gp-2) a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'art-joint-anim) - (set! (-> a1-13 param 0) (the-as uint "robotboss-blueeco-blue-last-hit")) - (send-event-function (ppointer->process gp-2) a1-13) + (send-event + (ppointer->process gp-2) + 'art-joint-anim + "robotboss-blueeco-blue-last-hit" ) ) ) @@ -6228,8 +6119,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x756c622d6f626f72) + :sound-name (static-sound-name "robo-blue-lp") :volume #x400 :fo-max 80 ) @@ -6245,8 +6135,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x63726f742d6f6365) + :sound-name (static-sound-name "eco-torch") :volume #x400 :fo-max 80 ) @@ -6262,8 +6151,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x7a7a75622d646572) + :sound-name (static-sound-name "red-buzz") :volume #x400 :fo-max 80 ) @@ -6278,8 +6166,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x7a7a75622d676662) + :sound-name (static-sound-name "bfg-buzz") :volume #x400 :fo-max 80 ) diff --git a/goal_src/levels/flut_common/flutflut.gc b/goal_src/levels/flut_common/flutflut.gc index 6edff8bdc8..7a38c71ac8 100644 --- a/goal_src/levels/flut_common/flutflut.gc +++ b/goal_src/levels/flut_common/flutflut.gc @@ -175,16 +175,7 @@ (task-complete? *game-info* (-> self entity extra perm task)) (not (handle->process (-> self cell))) ) - (when - (and - (-> self auto-get-off) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 0) - (set! (-> a1-6 message) 'end-mode) - (send-event-function *target* a1-6) - ) - ) + (when (and (-> self auto-get-off) (send-event *target* 'end-mode)) (set! (-> self auto-get-off) #f) (go-virtual pickup (method-of-object self idle)) ) @@ -354,14 +345,7 @@ (if (and (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 2) - (set! (-> a1-7 message) 'change-mode) - (set! (-> a1-7 param 0) (the-as uint 'flut)) - (set! (-> a1-7 param 1) (the-as uint self)) - (send-event-function *target* a1-7) - ) + (send-event *target* 'change-mode 'flut self) ) (go-virtual pickup (method-of-object self wait-for-return)) ) @@ -466,15 +450,7 @@ :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (if - (and - (or (= arg2 'touch) (= arg2 'attack)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'end-mode) - (send-event-function *target* a1-1) - ) - ) + (and (or (= arg2 'touch) (= arg2 'attack)) (send-event *target* 'end-mode)) (go-virtual pickup (method-of-object self idle)) ) (the-as object (if (= arg2 'trans) @@ -596,25 +572,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x7a - #x6f - #x6f - #x6d - #x2d - #x74 - #x65 - #x6c - #x65 - #x70 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "zoom-teleport") :volume #x400 :fo-max 30 ) diff --git a/goal_src/levels/intro/evilbro.gc b/goal_src/levels/intro/evilbro.gc index f488c8ed66..f2c5163bb2 100644 --- a/goal_src/levels/intro/evilbro.gc +++ b/goal_src/levels/intro/evilbro.gc @@ -8,7 +8,8 @@ (define-extern *evilsis-intro-sg* skeleton-group) (define-extern *evilbro-intro-sg* skeleton-group) -;; definition of type evilbro +;; DECOMP BEGINS + (deftype evilbro (process-taskable) ((evilsis entity :offset-assert 380) ) @@ -18,7 +19,7 @@ :flag-assert #x3501100180 ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -36,62 +37,44 @@ (set! *evilbro-intro-sg* v1-1) ) -;; definition for method 32 of type evilbro -;; INFO: Return type mismatch spool-anim vs basic. (defmethod play-anim! evilbro ((obj evilbro) (arg0 symbol)) - (with-pp - (cond - (arg0 - (close-specific-task! - (game-task leaving-misty) - (task-status need-introduction) - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'clone) - (set! (-> a1-2 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj evilsis extra process) a1-2) - ) - ) - (else - (set! (-> obj will-talk) #t) + (cond + (arg0 + (close-specific-task! + (game-task leaving-misty) + (task-status need-introduction) ) + (send-event (-> obj evilsis extra process) 'clone (process->handle obj)) ) - (the-as - basic - (new 'static 'spool-anim - :name "evilbro-misty-end" - :index 5 - :parts 9 - :command-list '() - ) + (else + (set! (-> obj will-talk) #t) + ) + ) + (the-as + basic + (new 'static 'spool-anim + :name "evilbro-misty-end" + :index 5 + :parts 9 + :command-list '() ) ) ) -;; definition for method 31 of type evilbro (defmethod get-art-elem evilbro ((obj evilbro)) (-> obj draw art-group data 3) ) -;; failed to figure out what this is: (defstate play-anim (evilbro) :virtual #t :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self evilsis extra process) a1-0) - ) + (send-event (-> self evilsis extra process) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (none) ) ) -;; failed to figure out what this is: (defstate idle (evilbro) :virtual #t :code @@ -232,7 +215,6 @@ ) ) -;; definition for method 11 of type evilbro (defmethod copy-defaults! evilbro ((obj evilbro) (arg0 res-lump)) (dummy-40 obj arg0 *evilbro-intro-sg* 3 40 (new 'static 'vector :w 4096.0) 5) (set! (-> obj tasks) (get-task-control (game-task leaving-misty))) @@ -241,7 +223,6 @@ (none) ) -;; definition of type evilsis (deftype evilsis (process-taskable) () :heap-base #x110 @@ -250,7 +231,7 @@ :flag-assert #x350110017c ) -;; failed to figure out what this is: + (let ((v1-7 (new 'static 'skeleton-group @@ -268,8 +249,6 @@ (set! *evilsis-intro-sg* v1-7) ) -;; definition for method 32 of type evilsis -;; INFO: Return type mismatch art-element vs basic. (defmethod play-anim! evilsis ((obj evilsis) (arg0 symbol)) (if arg0 (format @@ -282,12 +261,10 @@ (the-as basic (get-art-elem obj)) ) -;; definition for method 31 of type evilsis (defmethod get-art-elem evilsis ((obj evilsis)) (-> obj draw art-group data 3) ) -;; failed to figure out what this is: (defstate idle (evilsis) :virtual #t :trans @@ -298,10 +275,13 @@ ) ) -;; definition for method 11 of type evilsis (defmethod copy-defaults! evilsis ((obj evilsis) (arg0 res-lump)) (dummy-40 obj arg0 *evilsis-intro-sg* 3 0 (new 'static 'vector :w 4096.0) 5) (set! (-> obj tasks) (get-task-control (game-task leaving-misty))) (dummy-42 obj) (none) ) + + + + diff --git a/goal_src/levels/jungle/bouncer.gc b/goal_src/levels/jungle/bouncer.gc index 1b6ddbb070..25dde471cd 100644 --- a/goal_src/levels/jungle/bouncer.gc +++ b/goal_src/levels/jungle/bouncer.gc @@ -90,20 +90,12 @@ (when (and (= (-> arg3 param 1) 'flop) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 3) - (set! (-> a1-10 message) 'jump) - (set! - (-> a1-10 param 0) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-10 param 1) - (the-as uint (-> self spring-height)) - ) - (set! (-> a1-10 param 2) (the-as uint #f)) - (send-event-function arg0 a1-10) + (send-event + arg0 + 'jump + (-> self spring-height) + (-> self spring-height) + #f ) ) (go bouncer-fire) diff --git a/goal_src/levels/jungle/jungle-elevator.gc b/goal_src/levels/jungle/jungle-elevator.gc index 92c69592e0..48d191018d 100644 --- a/goal_src/levels/jungle/jungle-elevator.gc +++ b/goal_src/levels/jungle/jungle-elevator.gc @@ -7,7 +7,8 @@ (define-extern *plat-button-sg* skeleton-group) -;; definition of type jungle-elevator +;; DECOMP BEGINS + (deftype jungle-elevator (plat-button) ((bottom-height float :offset-assert 240) (teleport-if-below-y float :offset-assert 244) @@ -19,7 +20,7 @@ :flag-assert #x21009000fc ) -;; definition for method 26 of type jungle-elevator + (defmethod can-activate? jungle-elevator ((obj jungle-elevator)) (and ((method-of-type plat-button can-activate?) obj) @@ -27,7 +28,6 @@ ) ) -;; failed to figure out what this is: (defstate plat-button-move-downward (jungle-elevator) :virtual #t :enter @@ -41,13 +41,7 @@ (set! (-> self draw light-index) (the-as uint 255)) (set! (-> self bottom-height) (-> jungle bottom-height)) (set! (-> jungle bottom-height) (-> jungleb bottom-height)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'reset-pickup) - (set! (-> a1-0 param 0) (the-as uint 'eco)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'reset-pickup 'eco) (none) ) :exit @@ -83,12 +77,7 @@ ) (when (< (-> self path-pos) 0.9) (TODO-RENAME-28 (-> *target* control)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'reset-height) - (send-event-function *target* a1-2) - ) + (send-event *target* 'reset-height) ) (if (and @@ -104,7 +93,6 @@ ) ) -;; failed to figure out what this is: (defstate plat-button-move-upward (jungle-elevator) :virtual #t :enter @@ -151,7 +139,6 @@ ) ) -;; failed to figure out what this is: (defstate plat-button-at-end (jungle-elevator) :virtual #t :code @@ -181,7 +168,6 @@ ) ) -;; definition for method 30 of type jungle-elevator (defmethod should-teleport? jungle-elevator ((obj jungle-elevator)) (let ((f0-0 (-> (camera-pos) y))) (case (-> obj path-pos) @@ -202,7 +188,6 @@ #f ) -;; definition for method 29 of type jungle-elevator (defmethod can-target-move? jungle-elevator ((obj jungle-elevator)) (let ((s5-0 (new 'stack-no-clear 'vector))) (eval-path-curve! (-> obj path) s5-0 0.4 'interp) @@ -217,3 +202,7 @@ v0-2 ) ) + + + + diff --git a/goal_src/levels/jungleb/aphid.gc b/goal_src/levels/jungleb/aphid.gc index 2d4ff65a9e..899840aecd 100644 --- a/goal_src/levels/jungleb/aphid.gc +++ b/goal_src/levels/jungleb/aphid.gc @@ -7,7 +7,8 @@ (define-extern *aphid-sg* skeleton-group) -;; definition of type aphid +;; DECOMP BEGINS + (deftype aphid (nav-enemy) ((try int32 :offset-assert 400) ) @@ -17,7 +18,7 @@ :flag-assert #x4c01300194 ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -36,52 +37,39 @@ (set! *aphid-sg* v1-1) ) -;; definition for function aphid-invulnerable (defbehavior aphid-invulnerable aphid () (set! (-> self nav-enemy-flags) (logand -33 (-> self nav-enemy-flags))) (dummy-54 (-> self collide-info) 2 4) (none) ) -;; definition for function aphid-vulnerable (defbehavior aphid-vulnerable aphid () (logior! (-> self nav-enemy-flags) 32) (dummy-54 (-> self collide-info) 2 1) (none) ) -;; definition for method 43 of type aphid -;; INFO: Return type mismatch none vs object. ;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? (defmethod dummy-43 aphid ((obj aphid) (arg0 process) (arg1 event-message-block)) - (with-pp - (the-as object (cond - ((or - (logtest? (-> obj nav-enemy-flags) 32) - (= arg0 (ppointer->process (-> obj parent))) - ) - (let ((v1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-5 from) pp) - (set! (-> v1-5 num-params) 1) - (set! (-> v1-5 message) 'get-attack-count) - (set! (-> v1-5 param 0) (the-as uint 1)) - (send-event-function arg0 v1-5) - ) - (logclear! - (-> obj mask) - (process-mask actor-pause attackable) - ) - (go (method-of-object obj nav-enemy-die)) + (the-as object (cond + ((or + (logtest? (-> obj nav-enemy-flags) 32) + (= arg0 (ppointer->process (-> obj parent))) ) - (else - (dummy-44 obj arg0 arg1) + (send-event arg0 'get-attack-count 1) + (logclear! + (-> obj mask) + (process-mask actor-pause attackable) ) + (go (method-of-object obj nav-enemy-die)) ) - ) + (else + (dummy-44 obj arg0 arg1) + ) + ) ) ) -;; failed to figure out what this is: (defstate nav-enemy-chase (aphid) :virtual #t :exit @@ -273,7 +261,6 @@ ) ) -;; failed to figure out what this is: (defstate nav-enemy-stare (aphid) :virtual #t :code @@ -425,7 +412,6 @@ ) ) -;; failed to figure out what this is: (defstate nav-enemy-give-up (aphid) :virtual #t :code @@ -549,7 +535,6 @@ ) ) -;; definition for symbol *aphid-nav-enemy-info*, type nav-enemy-info (define *aphid-nav-enemy-info* (new 'static 'nav-enemy-info @@ -606,8 +591,6 @@ ) ) -;; definition for method 47 of type aphid -;; INFO: Return type mismatch int vs none. (defmethod initialize-collision aphid ((obj aphid)) (let ((s5-0 @@ -639,8 +622,6 @@ (none) ) -;; definition for method 48 of type aphid -;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-48 aphid ((obj aphid)) (dummy-14 obj *aphid-sg* '()) (TODO-RENAME-45 obj *aphid-nav-enemy-info*) @@ -651,8 +632,6 @@ (none) ) -;; definition for function aphid-init-by-other -;; Used lq/sq (defbehavior aphid-init-by-other aphid ((arg0 nav-enemy) (arg1 vector) (arg2 vector)) @@ -681,3 +660,7 @@ (go-virtual nav-enemy-chase) (none) ) + + + + diff --git a/goal_src/levels/jungleb/plat-flip.gc b/goal_src/levels/jungleb/plat-flip.gc index a76e853feb..e177c6d2dd 100644 --- a/goal_src/levels/jungleb/plat-flip.gc +++ b/goal_src/levels/jungleb/plat-flip.gc @@ -7,7 +7,8 @@ (define-extern *plat-flip-sg* skeleton-group) -;; definition of type plat-flip +;; DECOMP BEGINS + (deftype plat-flip (process-drawable) ((root-override collide-shape-moving :offset 112) (path-pos float :offset-assert 176) @@ -26,7 +27,7 @@ :flag-assert #x1400900100 ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -43,7 +44,6 @@ (set! *plat-flip-sg* v1-1) ) -;; failed to figure out what this is: (defstate plat-flip-idle (plat-flip) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -53,13 +53,7 @@ (activate! (-> self smush) -1.0 90 300 1.0 1.0) ) ((= v1-0 'touch) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'no-look-around) - (set! (-> a1-5 param 0) (the-as uint 450)) - (send-event-function arg0 a1-5) - ) + (send-event arg0 'no-look-around 450) (the-as smush-control #f) ) ) @@ -219,8 +213,6 @@ (the-as (function none :behavior plat-flip) rider-post) ) -;; definition for method 11 of type plat-flip -;; Used lq/sq (defmethod copy-defaults! plat-flip ((obj plat-flip) (arg0 res-lump)) (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag)) (set! (-> obj mask) (logior (process-mask platform) (-> obj mask))) @@ -319,3 +311,7 @@ (go plat-flip-idle) (none) ) + + + + diff --git a/goal_src/levels/lavatube/lavatube-part.gc b/goal_src/levels/lavatube/lavatube-part.gc index 1b6b5886f2..e9a4c9f1c5 100644 --- a/goal_src/levels/lavatube/lavatube-part.gc +++ b/goal_src/levels/lavatube/lavatube-part.gc @@ -405,25 +405,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x72 - #x65 - #x6c - #x65 - #x61 - #x73 - #x65 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -560,25 +542,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x72 - #x65 - #x6c - #x65 - #x61 - #x73 - #x65 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) diff --git a/goal_src/levels/maincave/baby-spider.gc b/goal_src/levels/maincave/baby-spider.gc index e0066d9ba4..2f23434489 100644 --- a/goal_src/levels/maincave/baby-spider.gc +++ b/goal_src/levels/maincave/baby-spider.gc @@ -1051,13 +1051,8 @@ baby-spider-default-event-handler :enter (behavior () (let ((v1-0 (-> self event-death))) - (when v1-0 - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) v1-0) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (if v1-0 + (send-event (ppointer->process (-> self parent)) v1-0) ) ) (set! (-> self draw bounds y) 8192.0) @@ -1078,13 +1073,8 @@ baby-spider-default-event-handler (behavior () (dummy-18 self) (let ((v1-2 (-> self event-death))) - (when v1-2 - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) v1-2) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (if v1-2 + (send-event (ppointer->process (-> self parent)) v1-2) ) ) (none) diff --git a/goal_src/levels/maincave/spiderwebs.gc b/goal_src/levels/maincave/spiderwebs.gc index 51deb57270..767d61f94f 100644 --- a/goal_src/levels/maincave/spiderwebs.gc +++ b/goal_src/levels/maincave/spiderwebs.gc @@ -108,24 +108,12 @@ 13516.8 (vector-vector-distance a0-8 (-> self root trans)) ) - (let - ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 3) - (set! (-> a1-3 message) 'jump) - (set! - (-> a1-3 param 0) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-3 param 1) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-3 param 2) - (the-as uint *spider-jump-mods*) - ) - (send-event-function arg0 a1-3) + (send-event + arg0 + 'jump + (-> self spring-height) + (-> self spring-height) + *spider-jump-mods* ) ) ) @@ -138,20 +126,12 @@ (if (and (= (-> arg3 param 1) 'flop) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 3) - (set! (-> a1-4 message) 'jump) - (set! - (-> a1-4 param 0) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-4 param 1) - (the-as uint (-> self spring-height)) - ) - (set! (-> a1-4 param 2) (the-as uint *spider-jump-mods*)) - (send-event-function arg0 a1-4) + (send-event + arg0 + 'jump + (-> self spring-height) + (-> self spring-height) + *spider-jump-mods* ) ) (go spiderwebs-bounce) diff --git a/goal_src/levels/misty/bonelurker.gc b/goal_src/levels/misty/bonelurker.gc index f3439c8dc8..9e623e3b69 100644 --- a/goal_src/levels/misty/bonelurker.gc +++ b/goal_src/levels/misty/bonelurker.gc @@ -188,13 +188,7 @@ 150 ) (nav-enemy-set-hit-from-direction arg0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'get-attack-count) - (set! (-> a1-1 param 0) (the-as uint 1)) - (send-event-function arg0 a1-1) - ) + (send-event arg0 'get-attack-count 1) (logclear! (-> self mask) (process-mask actor-pause)) (go-virtual nav-enemy-die) 'die diff --git a/goal_src/levels/misty/misty-part.gc b/goal_src/levels/misty/misty-part.gc index 20cc27a10c..02ad3ee8c6 100644 --- a/goal_src/levels/misty/misty-part.gc +++ b/goal_src/levels/misty/misty-part.gc @@ -1153,25 +1153,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x72 - #x65 - #x6c - #x65 - #x61 - #x73 - #x65 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -1258,25 +1240,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x72 - #x65 - #x6c - #x65 - #x61 - #x73 - #x65 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -1364,25 +1328,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x72 - #x65 - #x6c - #x65 - #x61 - #x73 - #x65 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -1470,25 +1416,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x72 - #x65 - #x6c - #x65 - #x61 - #x73 - #x65 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) diff --git a/goal_src/levels/misty/muse.gc b/goal_src/levels/misty/muse.gc index 6b8247456f..f8ca12944e 100644 --- a/goal_src/levels/misty/muse.gc +++ b/goal_src/levels/misty/muse.gc @@ -698,28 +698,9 @@ nav-enemy-default-event-handler ) ) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 2) - (set! (-> a1-10 message) 'trans) - (set! (-> a1-10 param 0) (the-as uint 'save)) - (set! (-> a1-10 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'matrix) - (set! (-> a1-11 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'blend-shape) - (set! (-> a1-12 param 0) (the-as uint #t)) - (send-event-function *target* a1-12) - ) + (send-event *target* 'trans 'save (-> self old-target-pos)) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) (if (!= *kernel-boot-message* 'play) (set! (-> self trans-hook) @@ -783,26 +764,14 @@ nav-enemy-default-event-handler self 'ambient-volume ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) self) - (set! (-> a1-24 num-params) 1) - (set! (-> a1-24 message) 'blend-shape) - (set! (-> a1-24 param 0) (the-as uint #f)) - (send-event-function *target* a1-24) - ) + (send-event *target* 'blend-shape #f) (cond ((!= *kernel-boot-message* 'play) (set-blackout-frames 0) (ja-channel-set! 0) (ja-post) (dummy-48 (-> self collide-info)) - (let ((a1-25 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-25 from) self) - (set! (-> a1-25 num-params) 1) - (set! (-> a1-25 message) 'trans) - (set! (-> a1-25 param 0) (the-as uint 'reset)) - (send-event-function *target* a1-25) - ) + (send-event *target* 'trans 'reset) (let ((gp-4 (ppointer->handle @@ -817,26 +786,14 @@ nav-enemy-default-event-handler ) ) ) - (let ((a1-27 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-27 from) self) - (set! (-> a1-27 num-params) 0) - (set! (-> a1-27 message) 'pickup) - (send-event-function (handle->process (the-as handle gp-4)) a1-27) - ) + (send-event (handle->process (the-as handle gp-4)) 'pickup) (while (handle->process (the-as handle gp-4)) (suspend) ) ) ) (else - (let ((a1-29 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-29 from) self) - (set! (-> a1-29 num-params) 2) - (set! (-> a1-29 message) 'trans) - (set! (-> a1-29 param 0) (the-as uint 'restore)) - (set! (-> a1-29 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-29) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) (set-blackout-frames 0) (set-blackout-frames 30) ) diff --git a/goal_src/levels/misty/sidekick-human.gc b/goal_src/levels/misty/sidekick-human.gc index 8258c74bde..9316c1c016 100644 --- a/goal_src/levels/misty/sidekick-human.gc +++ b/goal_src/levels/misty/sidekick-human.gc @@ -1566,13 +1566,7 @@ (-> gp-0 ppointer) ) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'trans-hook) - (set! (-> a1-3 param 0) (the-as uint evilsib-trans-hook-hover)) - (send-event-function self a1-3) - ) + (send-event self 'trans-hook evilsib-trans-hook-hover) ) 0 (none) @@ -1582,13 +1576,7 @@ (with-pp (cond (arg0 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) pp) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'sidekick) - (set! (-> a1-1 param 0) (the-as uint #f)) - (send-event-function *target* a1-1) - ) + (send-event *target* 'sidekick #f) (let ((s5-0 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj bonelurker) (ppointer->handle (when s5-0 (let @@ -1619,20 +1607,8 @@ ) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'anim-mode) - (set! (-> a1-5 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj bonelurker)) a1-5) - ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'center-joint) - (set! (-> a1-6 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj bonelurker)) a1-6) - ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) (set-setting! *setting-control* pp @@ -1753,25 +1729,18 @@ ) ) ) - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) pp) - (set! (-> a1-20 num-params) 2) - (set! (-> a1-20 message) 'art-joint-anim) - (set! (-> a1-20 param 0) (the-as uint "idle")) - (set! (-> a1-20 param 1) (the-as uint 0)) - (send-event-function - (handle->process (-> obj lurker-army s5-1)) - a1-20 - ) + (send-event + (handle->process (-> obj lurker-army s5-1)) + 'art-joint-anim + "idle" + 0 ) ) ) - (let ((a1-21 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-21 from) pp) - (set! (-> a1-21 num-params) 1) - (set! (-> a1-21 message) 'rot) - (set! (-> a1-21 param 0) (the-as uint (-> s4-0 rot))) - (send-event-function (handle->process (-> obj lurker-army s5-1)) a1-21) + (send-event + (handle->process (-> obj lurker-army s5-1)) + 'rot + (-> s4-0 rot) ) ) ) @@ -2194,14 +2163,12 @@ (case arg2 (('offset-army) (dotimes (gp-0 9) - (let ((v1-3 (-> *lurker-army* gp-0)) - (a1-1 (new 'stack-no-clear 'event-message-block)) - ) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'set-frame-num) - (set! (-> a1-1 param 0) (the-as uint (-> v1-3 start-frame))) - (send-event-function (handle->process (-> self lurker-army gp-0)) a1-1) + (let ((v1-3 (-> *lurker-army* gp-0))) + (send-event + (handle->process (-> self lurker-army gp-0)) + 'set-frame-num + (-> v1-3 start-frame) + ) ) ) #f @@ -2256,61 +2223,26 @@ ) ) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'anim-mode) - (set! (-> a1-8 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> self evilbro)) a1-8) + (send-event (handle->process (-> self evilbro)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> self evilbro)) 'blend-shape #t) + (send-event (handle->process (-> self evilbro)) 'center-joint 3) + (send-event + (handle->process (-> self evilbro)) + 'trans-hook + evilsib-trans-hook-wait ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'blend-shape) - (set! (-> a1-9 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self evilbro)) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'center-joint) - (set! (-> a1-10 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> self evilbro)) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'trans-hook) - (set! (-> a1-11 param 0) (the-as uint evilsib-trans-hook-wait)) - (send-event-function (handle->process (-> self evilbro)) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'draw) - (set! (-> a1-12 param 0) (the-as uint #f)) - (send-event-function (handle->process (-> self evilbro)) a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'eval) - (set! - (-> a1-13 param 0) - (the-as - uint - (lambda :behavior sequenceB - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self)) - ) - (set! (-> self part) v0-0) - v0-0 - ) - ) + (send-event (handle->process (-> self evilbro)) 'draw #f) + (send-event + (handle->process (-> self evilbro)) + 'eval + (lambda :behavior sequenceB + () + (let + ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self))) + (set! (-> self part) v0-0) + v0-0 ) ) - (send-event-function (handle->process (-> self evilbro)) a1-13) ) ) ) @@ -2362,61 +2294,26 @@ ) ) ) - (let ((a1-19 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-19 from) self) - (set! (-> a1-19 num-params) 1) - (set! (-> a1-19 message) 'anim-mode) - (set! (-> a1-19 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> self evilsis)) a1-19) + (send-event (handle->process (-> self evilsis)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> self evilsis)) 'blend-shape #t) + (send-event (handle->process (-> self evilsis)) 'center-joint 3) + (send-event + (handle->process (-> self evilsis)) + 'trans-hook + evilsib-trans-hook-wait ) - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) self) - (set! (-> a1-20 num-params) 1) - (set! (-> a1-20 message) 'blend-shape) - (set! (-> a1-20 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self evilsis)) a1-20) - ) - (let ((a1-21 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-21 from) self) - (set! (-> a1-21 num-params) 1) - (set! (-> a1-21 message) 'center-joint) - (set! (-> a1-21 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> self evilsis)) a1-21) - ) - (let ((a1-22 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-22 from) self) - (set! (-> a1-22 num-params) 1) - (set! (-> a1-22 message) 'trans-hook) - (set! (-> a1-22 param 0) (the-as uint evilsib-trans-hook-wait)) - (send-event-function (handle->process (-> self evilsis)) a1-22) - ) - (let ((a1-23 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-23 from) self) - (set! (-> a1-23 num-params) 1) - (set! (-> a1-23 message) 'draw) - (set! (-> a1-23 param 0) (the-as uint #f)) - (send-event-function (handle->process (-> self evilsis)) a1-23) - ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) self) - (set! (-> a1-24 num-params) 1) - (set! (-> a1-24 message) 'eval) - (set! - (-> a1-24 param 0) - (the-as - uint - (lambda :behavior sequenceB - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self)) - ) - (set! (-> self part) v0-0) - v0-0 - ) - ) + (send-event (handle->process (-> self evilsis)) 'draw #f) + (send-event + (handle->process (-> self evilsis)) + 'eval + (lambda :behavior sequenceB + () + (let + ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self))) + (set! (-> self part) v0-0) + v0-0 ) ) - (send-event-function (handle->process (-> self evilsis)) a1-24) ) ) ) @@ -2426,13 +2323,7 @@ ) :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'sidekick) - (set! (-> a1-0 param 0) (the-as uint #t)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'sidekick #t) (let ((a0-2 (handle->process (-> self bonelurker)))) (if a0-2 (deactivate a0-2) @@ -2458,22 +2349,12 @@ ((-> (method-of-type process-taskable play-anim) exit)) (let ((gp-1 (entity-by-name "sequenceC-1"))) (set-blackout-frames 6000) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'clear-entity) - (send-event-function *camera* a1-5) - ) + (send-event *camera* 'clear-entity) (entity-birth-no-kill gp-1) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 0) - (set! (-> a1-6 message) 'play-anim) - (send-event-function (if gp-1 - (-> gp-1 extra process) - ) - a1-6 - ) + (send-event (if gp-1 + (-> gp-1 extra process) + ) + 'play-anim ) ) (none) @@ -2546,13 +2427,7 @@ (-> gp-1 ppointer) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'trans-hook) - (set! (-> a1-5 param 0) (the-as uint nothing)) - (send-event-function self a1-5) - ) + (send-event self 'trans-hook nothing) ) 0 (none) @@ -2567,13 +2442,7 @@ (&-> (the-as process-taskable (-> self parent 0)) stack 288) ) ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'trans-hook) - (set! (-> a1-1 param 0) (the-as uint sequenceC-can-trans-hook-2)) - (send-event-function self a1-1) - ) + (send-event self 'trans-hook sequenceC-can-trans-hook-2) (set-vector! (-> self draw color-emissive) 0.5 0.0 0.0 0.0) ) 0 @@ -2637,20 +2506,8 @@ ) ) ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) pp) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'anim-mode) - (set! (-> a1-7 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj bonelurker)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'center-joint) - (set! (-> a1-8 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj bonelurker)) a1-8) - ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj darkecocan) (ppointer->handle (when s5-1 (let @@ -2681,55 +2538,31 @@ ) ) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) pp) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'anim-mode) - (set! (-> a1-12 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj darkecocan)) a1-12) + (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 ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) pp) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'center-joint) - (set! (-> a1-13 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj darkecocan)) a1-13) - ) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) pp) - (set! (-> a1-14 num-params) 1) - (set! (-> a1-14 message) 'trans-hook) - (set! (-> a1-14 param 0) (the-as uint sequenceC-can-trans-hook)) - (send-event-function (handle->process (-> obj darkecocan)) a1-14) - ) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'eval) - (set! - (-> a1-15 param 0) - (the-as - uint - (lambda :behavior sequenceC - () - (let - ((a0-0 (&-> (the-as process-taskable (-> self parent 0)) stack 288)) - (t9-0 (method-of-type lod-set dummy-9)) - ) - *darkecocan-glow-sg* - (-> self draw art-group) - (-> (the-as process-taskable (-> self parent 0)) entity) - (t9-0 (the-as lod-set a0-0)) - ) - (let - ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) - (set! (-> self part) v0-1) - v0-1 - ) - ) + (send-event + (handle->process (-> obj darkecocan)) + 'eval + (lambda :behavior sequenceC + () + (let ((a0-0 (&-> (the-as process-taskable (-> self parent 0)) stack 288)) + (t9-0 (method-of-type lod-set dummy-9)) + ) + *darkecocan-glow-sg* + (-> self draw art-group) + (-> (the-as process-taskable (-> self parent 0)) entity) + (t9-0 (the-as lod-set a0-0)) + ) + (let ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) + (set! (-> self part) v0-1) + v0-1 ) ) - (send-event-function (handle->process (-> obj darkecocan)) a1-15) ) ) (the-as diff --git a/goal_src/levels/ogre/flying-lurker.gc b/goal_src/levels/ogre/flying-lurker.gc index 085baea5eb..295c5c0647 100644 --- a/goal_src/levels/ogre/flying-lurker.gc +++ b/goal_src/levels/ogre/flying-lurker.gc @@ -5,8 +5,14 @@ ;; name in dgo: flying-lurker ;; dgos: L1, OGR +(define-extern *ogrecam-sg* skeleton-group) +(define-extern *plunger-lurker-sg* skeleton-group) +(define-extern *flying-lurker-sg* skeleton-group) +(declare-type flying-lurker process-drawable) +(define-extern flying-lurker-clone (state handle string flying-lurker)) + +;; DECOMP BEGINS -;; failed to figure out what this is: (let ((v1-0 (new 'static 'skeleton-group @@ -21,10 +27,9 @@ (set! (-> v1-0 janim) -1) (set! (-> v1-0 mgeo 0) (the-as uint 1)) (set! (-> v1-0 lod-dist 0) 4095996000.0) - (define *ogrecam-sg* v1-0) + (set! *ogrecam-sg* v1-0) ) -;; definition of type plunger-lurker (deftype plunger-lurker (process-drawable) ((alt-actor entity-actor :offset-assert 176) (got-hit symbol :offset-assert 180) @@ -35,17 +40,7 @@ :flag-assert #x14005000b8 ) -;; definition for method 3 of type plunger-lurker -(defmethod inspect plunger-lurker ((obj plunger-lurker)) - (let ((t9-0 (method-of-type process-drawable inspect))) - (t9-0 obj) - ) - (format #t "~T~Talt-actor: ~A~%" (-> obj alt-actor)) - (format #t "~T~Tgot-hit: ~A~%" (-> obj got-hit)) - obj - ) -;; failed to figure out what this is: (let ((v1-2 (new 'static 'skeleton-group @@ -65,10 +60,9 @@ (set! (-> v1-2 lod-dist 1) 163840.0) (set! (-> v1-2 mgeo 2) (the-as uint 3)) (set! (-> v1-2 lod-dist 2) 4095996000.0) - (define *plunger-lurker-sg* v1-2) + (set! *plunger-lurker-sg* v1-2) ) -;; failed to figure out what this is: (defstate plunger-lurker-plunge (plunger-lurker) :code (behavior () @@ -129,24 +123,14 @@ ) ) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'eval) - (set! - (-> a1-8 param 0) - (the-as - uint - (lambda :behavior manipy - () - (let ((v0-0 (logior (-> self draw status) 32))) - (set! (-> self draw status) v0-0) - v0-0 - ) - ) - ) + (send-event + (handle->process gp-1) + 'eval + (lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) 32))) + (set! (-> self draw status) v0-0) + v0-0 + ) ) - (send-event-function (handle->process gp-1) a1-8) ) (let ((a1-9 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-9 from) self) @@ -163,20 +147,8 @@ ) ) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'clone-copy-trans) - (set! (-> a1-10 param 0) (the-as uint #f)) - (send-event-function (-> gp-1 process 0) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'clone-anim)) - (send-event-function (-> gp-1 process 0) a1-11) - ) + (send-event (-> gp-1 process 0) 'clone-copy-trans #f) + (send-event (-> gp-1 process 0) 'anim-mode 'clone-anim) (ja-play-spooled-anim (new 'static 'spool-anim :name "plunger-lurker-blowup" @@ -375,7 +347,6 @@ (the-as (function none :behavior plunger-lurker) ja-post) ) -;; failed to figure out what this is: (defstate plunger-lurker-flee (plunger-lurker) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -529,7 +500,6 @@ (the-as (function none :behavior plunger-lurker) ja-post) ) -;; failed to figure out what this is: (defstate plunger-lurker-idle (plunger-lurker) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -610,7 +580,6 @@ (the-as (function none :behavior plunger-lurker) ja-post) ) -;; failed to figure out what this is: (defstate plunger-lurker-die (plunger-lurker) :code (behavior () @@ -622,7 +591,6 @@ ) ) -;; definition for method 11 of type plunger-lurker (defmethod copy-defaults! plunger-lurker ((obj plunger-lurker) (arg0 res-lump)) (stack-size-set! (-> obj main-thread) 512) (let @@ -652,7 +620,6 @@ (none) ) -;; definition of type flying-lurker (deftype flying-lurker (process-drawable) ((curve-position float :offset-assert 176) (speed float :offset-assert 180) @@ -683,34 +650,7 @@ ) ) -;; definition for method 3 of type flying-lurker -(defmethod inspect flying-lurker ((obj flying-lurker)) - (let ((t9-0 (method-of-type process-drawable inspect))) - (t9-0 obj) - ) - (format #t "~T~Tcurve-position: ~f~%" (-> obj curve-position)) - (format #t "~T~Tspeed: ~f~%" (-> obj speed)) - (format #t "~T~Ttangent: #~%" (-> obj tangent)) - (format #t "~T~Tanim-blend: ~f~%" (-> obj anim-blend)) - (format #t "~T~Ty-offset: ~f~%" (-> obj y-offset)) - (format #t "~T~Ty-offset-desired: ~f~%" (-> obj y-offset-desired)) - (format #t "~T~Ty-vel: ~f~%" (-> obj y-vel)) - (format #t "~T~Tlast-look-time: ~D~%" (-> obj last-look-time)) - (format #t "~T~Ttime-to-next-look: ~D~%" (-> obj time-to-next-look)) - (format #t "~T~Ttake-off: ~A~%" (-> obj take-off)) - (format #t "~T~Trace-seconds: ~f~%" (-> obj race-seconds)) - (format #t "~T~Trace-start-time: ~D~%" (-> obj race-start-time)) - (format #t "~T~Trank: ~D~%" (-> obj rank)) - (format #t "~T~Talt-actor: ~A~%" (-> obj alt-actor)) - (format #t "~T~Talt-trans: #~%" (-> obj alt-trans)) - (format #t "~T~Tshadow-backup: ~A~%" (-> obj shadow-backup)) - (format #t "~T~Ttry-count: ~D~%" (-> obj try-count)) - (format #t "~T~Ttry-counted: ~A~%" (-> obj try-counted)) - (format #t "~T~Tdefault-bounds: #~%" (-> obj default-bounds)) - obj - ) -;; failed to figure out what this is: (let ((v1-8 (new 'static 'skeleton-group @@ -732,12 +672,9 @@ (set! (-> v1-8 lod-dist 1) 163840.0) (set! (-> v1-8 mgeo 2) (the-as uint 3)) (set! (-> v1-8 lod-dist 2) 4095996000.0) - (define *flying-lurker-sg* v1-8) + (set! *flying-lurker-sg* v1-8) ) -;; definition for method 20 of type flying-lurker -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defmethod dummy-20 flying-lurker ((obj flying-lurker)) (with-pp (let ((s5-0 (-> obj draw shadow-ctrl)) @@ -834,8 +771,6 @@ ) ) -;; definition for function flying-lurker-inc-try-count -;; INFO: Return type mismatch int vs none. (defbehavior flying-lurker-inc-try-count flying-lurker () (when (not (-> self try-counted)) (set! (-> self try-counted) #t) @@ -849,12 +784,10 @@ (none) ) -;; definition for function play-movie? (defun play-movie? () (= (get-task-status (game-task plunger-lurker-hit)) (task-status unknown)) ) -;; failed to figure out what this is: (defstate flying-lurker-die (flying-lurker) :code (behavior () @@ -864,7 +797,6 @@ ) ) -;; failed to figure out what this is: (defstate flying-lurker-sleep (flying-lurker) :code (behavior () @@ -877,14 +809,10 @@ ) ) -;; definition for function first? (defbehavior first? flying-lurker () (not (-> self link prev)) ) -;; definition for function flying-lurker-calc-speed -;; INFO: Return type mismatch float vs none. -;; Used lq/sq (defbehavior flying-lurker-calc-speed flying-lurker ((arg0 meters) (arg1 meters) (arg2 meters) (arg3 meters)) @@ -944,8 +872,6 @@ (none) ) -;; definition for function flying-lurker-move -;; INFO: Return type mismatch float vs none. (defbehavior flying-lurker-move flying-lurker () (+! (-> self curve-position) @@ -1001,7 +927,6 @@ (none) ) -;; definition for function flying-lurker-rotate (defbehavior flying-lurker-rotate flying-lurker () (let ((gp-0 (new 'stack-no-clear 'matrix))) (let ((s5-0 (new 'stack-no-clear 'matrix))) @@ -1045,7 +970,6 @@ ) ) -;; definition for function flying-lurker-calc-anim-speed (defbehavior flying-lurker-calc-anim-speed flying-lurker () (let* ((f0-1 (fabs (-> self speed))) (f0-2 (* 0.07324219 f0-1)) @@ -1056,8 +980,6 @@ ) ) -(define-extern flying-lurker-clone (state handle string flying-lurker)) -;; failed to figure out what this is: (defstate flying-lurker-fly (flying-lurker) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -1314,8 +1236,6 @@ (the-as (function none :behavior flying-lurker) ja-post) ) -;; definition for function flying-lurker-handler -;; INFO: Return type mismatch none vs object. (defbehavior flying-lurker-handler flying-lurker ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -1410,8 +1330,6 @@ ) ) -;; definition for function flying-lurker-play-intro -;; INFO: Return type mismatch (pointer process) vs none. (defbehavior flying-lurker-play-intro flying-lurker () (logclear! (-> self mask) (process-mask actor-pause)) (close-specific-task! (game-task plunger-lurker-hit) (task-status unknown)) @@ -1485,39 +1403,17 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'eval) - (set! - (-> a1-9 param 0) - (the-as - uint - (lambda :behavior manipy - () - (let ((v0-0 (logior (-> self draw status) 32))) - (set! (-> self draw status) v0-0) - v0-0 - ) - ) - ) + (send-event + (handle->process gp-1) + 'eval + (lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) 32))) + (set! (-> self draw status) v0-0) + v0-0 + ) ) - (send-event-function (handle->process gp-1) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'clone-copy-trans) - (set! (-> a1-10 param 0) (the-as uint #f)) - (send-event-function (-> gp-1 process 0) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'clone-anim)) - (send-event-function (-> gp-1 process 0) a1-11) ) + (send-event (-> gp-1 process 0) 'clone-copy-trans #f) + (send-event (-> gp-1 process 0) 'anim-mode 'clone-anim) (let ((a1-12 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-12 from) self) (set! (-> a1-12 num-params) 2) @@ -1580,7 +1476,6 @@ (none) ) -;; failed to figure out what this is: (defstate flying-lurker-start (flying-lurker) :event flying-lurker-handler @@ -1609,64 +1504,22 @@ ) (cond ((< 0.8333333 f0-2) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 2) - (set! (-> a1-1 message) 'fly-away) - (set! (-> a1-1 param 0) (the-as uint 18)) - (set! (-> a1-1 param 1) (-> self try-count)) - (send-event-function self a1-1) - ) + (send-event self 'fly-away 18 (-> self try-count)) ) ((< 0.6666667 f0-2) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 2) - (set! (-> a1-2 message) 'fly-away) - (set! (-> a1-2 param 0) (the-as uint 33)) - (set! (-> a1-2 param 1) (-> self try-count)) - (send-event-function self a1-2) - ) + (send-event self 'fly-away 33 (-> self try-count)) ) ((< 0.5 f0-2) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 2) - (set! (-> a1-3 message) 'fly-away) - (set! (-> a1-3 param 0) (the-as uint 258)) - (set! (-> a1-3 param 1) (-> self try-count)) - (send-event-function self a1-3) - ) + (send-event self 'fly-away 258 (-> self try-count)) ) ((< 0.33333334 f0-2) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'fly-away) - (set! (-> a1-4 param 0) (the-as uint 288)) - (set! (-> a1-4 param 1) (-> self try-count)) - (send-event-function self a1-4) - ) + (send-event self 'fly-away 288 (-> self try-count)) ) ((< 0.16666667 f0-2) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 2) - (set! (-> a1-5 message) 'fly-away) - (set! (-> a1-5 param 0) (the-as uint 513)) - (set! (-> a1-5 param 1) (-> self try-count)) - (send-event-function self a1-5) - ) + (send-event self 'fly-away 513 (-> self try-count)) ) (else - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 2) - (set! (-> a1-6 message) 'fly-away) - (set! (-> a1-6 param 0) (the-as uint 528)) - (set! (-> a1-6 param 1) (-> self try-count)) - (send-event-function self a1-6) - ) + (send-event self 'fly-away 528 (-> self try-count)) ) ) ) @@ -1676,7 +1529,6 @@ (the-as (function none :behavior flying-lurker) ja-post) ) -;; failed to figure out what this is: (defstate flying-lurker-clone (flying-lurker) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -1774,7 +1626,6 @@ ) ) -;; failed to figure out what this is: (defstate flying-lurker-idle (flying-lurker) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -1912,12 +1763,7 @@ ) ) (process-release? *target*) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'saw-player) - (send-event-function self a1-1) - ) + (send-event self 'saw-player) ) (suspend) 0 @@ -1958,7 +1804,7 @@ ) ) (until (ja-done? 0) - (when + (if (and *target* (>= @@ -1969,12 +1815,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'saw-player) - (send-event-function self a1-4) - ) + (send-event self 'saw-player) ) (suspend) (let ((a0-12 (-> self skel root-channel 0))) @@ -2000,8 +1841,6 @@ (the-as (function none :behavior flying-lurker) ja-post) ) -;; definition for method 11 of type flying-lurker -;; Used lq/sq (defmethod copy-defaults! flying-lurker ((obj flying-lurker) (arg0 res-lump)) (stack-size-set! (-> obj main-thread) 512) (set! (-> obj root) (new 'process 'trsqv)) diff --git a/goal_src/levels/sunken/qbert-plat.gc b/goal_src/levels/sunken/qbert-plat.gc index 59199fa21f..31dda48571 100644 --- a/goal_src/levels/sunken/qbert-plat.gc +++ b/goal_src/levels/sunken/qbert-plat.gc @@ -212,98 +212,83 @@ ) (defmethod dummy-33 qbert-plat ((obj qbert-plat)) - (with-pp - (let* ((a1-0 (-> obj master)) - (v1-0 (if a1-0 - (-> a1-0 extra process) - ) - ) + (let* ((a1-0 (-> obj master)) + (v1-0 (if a1-0 + (-> a1-0 extra process) + ) ) - (when v1-0 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) pp) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'trigger) - (set! (-> a1-1 param 0) (the-as uint (-> obj plat-id))) - (send-event-function v1-0 a1-1) - ) - ) + ) + (if v1-0 + (send-event v1-0 'trigger (-> obj plat-id)) ) ) ) (defmethod dummy-32 qbert-plat ((obj qbert-plat)) - (with-pp - (let* ((v1-0 (-> obj master)) - (a0-1 (if v1-0 - (-> v1-0 extra process) - ) - ) + (let* ((v1-0 (-> obj master)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) ) - (when (the-as qbert-plat-master a0-1) - (let - ((v1-3 - (plat-state-set? - (the-as qbert-plat-master a0-1) - (the-as uint (-> obj plat-id)) ) + (when (the-as qbert-plat-master a0-1) + (let + ((v1-3 + (plat-state-set? + (the-as qbert-plat-master a0-1) + (the-as uint (-> obj plat-id)) ) ) - (when (!= v1-3 (-> obj on?)) - (set! (-> obj on?) v1-3) - (cond - (v1-3 - (let ((s5-0 (get-process *default-dead-pool* qbert-plat-on #x4000))) - (when s5-0 - (let ((t9-2 (method-of-type qbert-plat-on activate))) - (t9-2 - (the-as qbert-plat-on s5-0) - obj - 'qbert-plat-on - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s5-0 - qbert-plat-on-init-by-other - (-> obj entity) + ) + (when (!= v1-3 (-> obj on?)) + (set! (-> obj on?) v1-3) + (cond + (v1-3 + (let ((s5-0 (get-process *default-dead-pool* qbert-plat-on #x4000))) + (when s5-0 + (let ((t9-2 (method-of-type qbert-plat-on activate))) + (t9-2 + (the-as qbert-plat-on s5-0) obj + 'qbert-plat-on + (the-as pointer #x70004000) ) - (-> s5-0 ppointer) ) - ) - (sound-play-by-name - (static-sound-name "plat-light-on") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) + (run-now-in-process + s5-0 + qbert-plat-on-init-by-other + (-> obj entity) + obj + ) + (-> s5-0 ppointer) ) ) - (else - (let ((gp-2 (-> obj child))) - (while gp-2 - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'die) - (send-event-function (ppointer->process gp-2) a1-5) - ) - (set! gp-2 (-> gp-2 0 brother)) - ) - ) - (sound-play-by-name - (static-sound-name "plat-light-off") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) + (sound-play-by-name + (static-sound-name "plat-light-on") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (else + (let ((gp-2 (-> obj child))) + (while gp-2 + (send-event (ppointer->process gp-2) 'die) + (set! gp-2 (-> gp-2 0 brother)) ) ) + (sound-play-by-name + (static-sound-name "plat-light-off") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) ) ) ) @@ -549,12 +534,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'notify) - (send-event-function arg0 a1-4) - ) + (send-event arg0 'notify) (let ((a0-13 (= @@ -913,18 +893,8 @@ (logclear! (-> s5-0 mask) (process-mask platform)) (when (-> self puzzle-beaten?) (suspend) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'trigger) - (send-event-function gp-0 a1-0) - ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'trigger) - (send-event-function s5-0 a1-1) - ) + (send-event gp-0 'trigger) + (send-event s5-0 'trigger) ) (go qbert-plat-master-idle) ) diff --git a/goal_src/levels/sunken/square-platform.gc b/goal_src/levels/sunken/square-platform.gc index 970fc86930..a726f9d6ef 100644 --- a/goal_src/levels/sunken/square-platform.gc +++ b/goal_src/levels/sunken/square-platform.gc @@ -489,13 +489,7 @@ (go square-platform-rising) ) ((= v1-0 'touch) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'no-look-around) - (set! (-> a1-8 param 0) (the-as uint 450)) - (send-event-function arg0 a1-8) - ) + (send-event arg0 'no-look-around 450) #f ) ) diff --git a/goal_src/levels/sunken/wall-plat.gc b/goal_src/levels/sunken/wall-plat.gc index a4cba160c5..2409c51248 100644 --- a/goal_src/levels/sunken/wall-plat.gc +++ b/goal_src/levels/sunken/wall-plat.gc @@ -77,13 +77,7 @@ (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (when (= v1-0 'touch) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 450)) - (send-event-function arg0 a1-2) - ) + (send-event arg0 'no-look-around 450) #f ) ) @@ -165,13 +159,7 @@ (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (when (= v1-0 'touch) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 450)) - (send-event-function arg0 a1-2) - ) + (send-event arg0 'no-look-around 450) #f ) ) @@ -229,13 +217,7 @@ (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (when (= v1-0 'touch) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 450)) - (send-event-function arg0 a1-2) - ) + (send-event arg0 'no-look-around 450) #f ) ) diff --git a/goal_src/levels/sunken/wedge-plats.gc b/goal_src/levels/sunken/wedge-plats.gc index cf97e09bf1..f52b352e31 100644 --- a/goal_src/levels/sunken/wedge-plats.gc +++ b/goal_src/levels/sunken/wedge-plats.gc @@ -213,13 +213,7 @@ (dummy-22 self) ) ((= v1-0 'touch) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'no-look-around) - (set! (-> a1-4 param 0) (the-as uint 450)) - (send-event-function arg0 a1-4) - ) + (send-event arg0 'no-look-around 450) #f ) ) @@ -489,13 +483,7 @@ (dummy-22 self) ) ((= v1-0 'touch) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'no-look-around) - (set! (-> a1-4 param 0) (the-as uint 450)) - (send-event-function arg0 a1-4) - ) + (send-event arg0 'no-look-around 450) ) ) ) diff --git a/goal_src/levels/swamp/swamp-bat.gc b/goal_src/levels/swamp/swamp-bat.gc index 0e089a9777..a4038d5aa9 100644 --- a/goal_src/levels/swamp/swamp-bat.gc +++ b/goal_src/levels/swamp/swamp-bat.gc @@ -125,16 +125,11 @@ *entity-pool* (game-task none) ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 2) - (set! (-> a1-2 message) 'attack) - (set! (-> a1-2 param 0) (-> arg3 param 0)) - (set! - (-> a1-2 param 1) - (the-as uint (new 'static 'attack-info)) - ) - (send-event-function arg0 a1-2) + (send-event + arg0 + 'attack + (-> arg3 param 0) + (new 'static 'attack-info) ) ) ((= v1-0 'launch) diff --git a/goal_src/levels/swamp/swamp-rat-nest.gc b/goal_src/levels/swamp/swamp-rat-nest.gc index 2984049f37..21db05118c 100644 --- a/goal_src/levels/swamp/swamp-rat-nest.gc +++ b/goal_src/levels/swamp/swamp-rat-nest.gc @@ -888,14 +888,9 @@ ) ) ((= v1-0 'attack) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'hit) - (send-event-function - (ppointer->process (-> self parent-process)) - a1-1 - ) + (send-event + (ppointer->process (-> self parent-process)) + 'hit ) (let ((v1-7 (-> arg3 param 2))) (when (!= v1-7 (-> self parent-process 0 player-attack-id)) @@ -906,7 +901,7 @@ (cond ((and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow)) (swamp-rat-nest-dummy-take-damage 3) - (when + (if (< (vector-vector-distance (target-pos 0) @@ -914,14 +909,7 @@ ) (-> self top-sphere w) ) - (let - ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'no-look-around) - (set! (-> a1-3 param 0) (the-as uint 75)) - (send-event-function *target* a1-3) - ) + (send-event *target* 'no-look-around 75) ) (go swamp-rat-nest-dummy-hit) ) @@ -1541,12 +1529,7 @@ swamp-rat-nest-default-event-handler (- (-> *display* base-frame-counter) (-> self state-time)) (the int (* (-> self spawn-period-scale) (-> self spawn-period))) ) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'shake) - (send-event-function (ppointer->process (-> self dummy)) a1-0) - ) + (send-event (ppointer->process (-> self dummy)) 'shake) (swamp-rat-nest-spawn-rat) (go swamp-rat-nest-active) ) @@ -1580,13 +1563,8 @@ swamp-rat-nest-default-event-handler ) ) ) - (when a0-1 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'victory) - (send-event-function (the-as process a0-1) a1-1) - ) + (if a0-1 + (send-event (the-as process a0-1) 'victory) ) ) (set! gp-0 (-> gp-0 0 brother)) diff --git a/goal_src/levels/swamp/swamp-rat.gc b/goal_src/levels/swamp/swamp-rat.gc index cf9dd6bced..cc26069062 100644 --- a/goal_src/levels/swamp/swamp-rat.gc +++ b/goal_src/levels/swamp/swamp-rat.gc @@ -58,41 +58,30 @@ dummy-44 swamp-rat ((obj swamp-rat) (arg0 process) (arg1 event-message-block)) - (with-pp - (the-as - object + (the-as + object + (when + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg1 param 0)) + (-> obj collide-info) + (the-as uint 1) + ) (when - ((method-of-type touching-shapes-entry prims-touching?) + (nav-enemy-send-attack + arg0 (the-as touching-shapes-entry (-> arg1 param 0)) - (-> obj collide-info) - (the-as uint 1) + 'generic ) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let* ((s5-1 (-> obj parent)) - (a0-4 - (if (and (nonzero? s5-1) (type-type? pointer process-drawable)) - s5-1 - ) + (let* ((s5-1 (-> obj parent)) + (a0-4 + (if (and (nonzero? s5-1) (type-type? pointer process-drawable)) + s5-1 ) ) - (cond - (a0-4 - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'victory) - (send-event-function (the-as process a0-4) a1-4) - ) - ) - (else - (go (method-of-object obj nav-enemy-victory)) - ) - ) + ) + (if a0-4 + (send-event (the-as process a0-4) 'victory) + (go (method-of-object obj nav-enemy-victory)) ) ) ) diff --git a/goal_src/levels/training/training-part.gc b/goal_src/levels/training/training-part.gc index aae6b7fcc2..c5cb66faf9 100644 --- a/goal_src/levels/training/training-part.gc +++ b/goal_src/levels/training/training-part.gc @@ -15,7 +15,7 @@ :flag-assert #x15006000d0 ) -;; failed to figure out what this is: + (set! (-> *part-group-id-table* 146) (new 'static 'sparticle-launch-group @@ -58,7 +58,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 147) (new 'static 'sparticle-launch-group @@ -101,7 +100,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 149) (new 'static 'sparticle-launch-group @@ -136,7 +134,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 148) (new 'static 'sparticle-launch-group @@ -179,7 +176,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 752) (new 'static 'sparticle-launcher @@ -195,25 +191,7 @@ :mask #xc0 :num 0.1 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x67 - #x65 - #x79 - #x73 - #x65 - #x72 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "geyser") :volume #x400 :fo-min 50 :fo-max #xc8 @@ -243,7 +221,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 761) (new 'static 'sparticle-launcher @@ -256,7 +233,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 753) (new 'static 'sparticle-launcher @@ -295,7 +271,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 762) (new 'static 'sparticle-launcher @@ -307,7 +282,6 @@ ) ) -;; definition for function check-drop-level-training-mist (defun check-drop-level-training-mist ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -318,7 +292,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 754) (new 'static 'sparticle-launcher @@ -357,7 +330,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 763) (new 'static 'sparticle-launcher @@ -383,7 +355,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 764) (new 'static 'sparticle-launcher @@ -410,7 +381,6 @@ ) ) -;; definition for function check-drop-level-training-spout-rain (defun check-drop-level-training-spout-rain ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -454,7 +424,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 759) (new 'static 'sparticle-launcher @@ -481,7 +450,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 760) (new 'static 'sparticle-launcher @@ -506,7 +474,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 757) (new 'static 'sparticle-launcher @@ -533,7 +500,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 758) (new 'static 'sparticle-launcher @@ -558,7 +524,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 755) (new 'static 'sparticle-launcher @@ -585,7 +550,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 756) (new 'static 'sparticle-launcher @@ -610,7 +574,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 150) (new 'static 'sparticle-launch-group @@ -797,7 +760,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 770) (new 'static 'sparticle-launcher @@ -821,7 +783,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 769) (new 'static 'sparticle-launcher @@ -843,7 +804,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 766) (new 'static 'sparticle-launcher @@ -873,7 +833,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 767) (new 'static 'sparticle-launcher @@ -897,7 +856,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 768) (new 'static 'sparticle-launcher @@ -918,7 +876,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 765) (new 'static 'sparticle-launcher @@ -949,7 +906,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 151) (new 'static 'sparticle-launch-group @@ -977,7 +933,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 773) (new 'static 'sparticle-launcher @@ -1003,7 +958,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 774) (new 'static 'sparticle-launcher @@ -1017,7 +971,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 775) (new 'static 'sparticle-launcher @@ -1029,7 +982,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 771) (new 'static 'sparticle-launcher @@ -1059,7 +1011,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 776) (new 'static 'sparticle-launcher @@ -1075,7 +1026,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 772) (new 'static 'sparticle-launcher @@ -1099,7 +1049,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 152) (new 'static 'sparticle-launch-group @@ -1124,8 +1073,6 @@ ) ) -;; definition for function tra-bird-bob-func -;; INFO: Return type mismatch int vs none. (defun tra-bird-bob-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -1143,7 +1090,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 779) (new 'static 'sparticle-launcher @@ -1168,8 +1114,6 @@ ) ) -;; definition for function tra-sparticle-seagull-moon -;; INFO: Return type mismatch int vs none. (defun tra-sparticle-seagull-moon ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -1181,7 +1125,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 777) (new 'static 'sparticle-launcher @@ -1213,7 +1156,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 780) (new 'static 'sparticle-launcher @@ -1229,7 +1171,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 781) (new 'static 'sparticle-launcher @@ -1245,7 +1186,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 778) (new 'static 'sparticle-launcher @@ -1264,7 +1204,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 153) (new 'static 'sparticle-launch-group @@ -1287,7 +1226,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 789) (new 'static 'sparticle-launcher @@ -1299,7 +1237,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 790) (new 'static 'sparticle-launcher @@ -1311,7 +1248,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 791) (new 'static 'sparticle-launcher @@ -1323,7 +1259,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 782) (new 'static 'sparticle-launcher @@ -1358,7 +1293,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 783) (new 'static 'sparticle-launcher @@ -1393,7 +1327,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 784) (new 'static 'sparticle-launcher @@ -1427,7 +1360,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 785) (new 'static 'sparticle-launcher @@ -1460,7 +1392,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 786) (new 'static 'sparticle-launcher @@ -1496,7 +1427,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 787) (new 'static 'sparticle-launcher @@ -1533,7 +1463,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 154) (new 'static 'sparticle-launch-group @@ -1556,7 +1485,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 792) (new 'static 'sparticle-launcher @@ -1591,7 +1519,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 793) (new 'static 'sparticle-launcher @@ -1626,7 +1553,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 794) (new 'static 'sparticle-launcher @@ -1662,7 +1588,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 795) (new 'static 'sparticle-launcher @@ -1698,7 +1623,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 796) (new 'static 'sparticle-launcher @@ -1735,7 +1659,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 797) (new 'static 'sparticle-launcher diff --git a/goal_src/levels/village1/explorer.gc b/goal_src/levels/village1/explorer.gc index a2ca42ff0b..9aefbe2ebf 100644 --- a/goal_src/levels/village1/explorer.gc +++ b/goal_src/levels/village1/explorer.gc @@ -79,140 +79,123 @@ ) (defmethod play-anim! explorer ((obj explorer) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "explorer-introduction" + :index 9 + :parts 11 + :command-list + '( + ((the binteger 418) + joint + "cameraB" + ) + ((the binteger 695) + shadow + self + #f + ) + ((the binteger 695) + joint + "camera" + ) + ((the binteger 838) shadow self #t) ((the binteger 838) joint "cameraB") + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((zero? (get-reminder (-> obj tasks) 0)) (if arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) + (save-reminder (-> obj tasks) 1 0) ) (new 'static 'spool-anim - :name "explorer-introduction" - :index 9 - :parts 11 + :name "explorer-reminder-1" + :index 10 + :parts 5 :command-list '( - ((the binteger 418) - joint - "cameraB" - ) - ((the binteger 695) - shadow - self - #f - ) - ((the binteger 695) - joint - "camera" - ) - ((the binteger 838) - shadow - self - #t - ) - ((the binteger 838) joint "cameraB") - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (cond - ((zero? (get-reminder (-> obj tasks) 0)) - (if arg0 - (save-reminder (-> obj tasks) 1 0) - ) - (new 'static 'spool-anim - :name "explorer-reminder-1" - :index 10 - :parts 5 - :command-list - '( - (0 - send-event - target - draw - #f - ) - ((the binteger 148) - send-event - target - draw - #t - ) - ((the binteger 148) - joint - "cameraB" - ) - ((the binteger 390) + (0 send-event target draw #f ) - ((the binteger 390) - joint - "camera" - ) - ((the binteger 505) send-event target draw #t) + ((the binteger 148) + send-event + target + draw + #t ) - ) - ) - (else - (if arg0 - (save-reminder (-> obj tasks) 0 0) - ) - (new 'static 'spool-anim - :name "explorer-reminder-2" - :index 11 - :parts 3 - :command-list '() - ) - ) - ) - ) - (((task-status need-reward-speech)) - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) pp) - (set! (-> a1-7 num-params) 2) - (set! (-> a1-7 message) 'get-pickup) - (set! (-> a1-7 param 0) (the-as uint 5)) - (set! - (-> a1-7 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) + ((the binteger 148) + joint + "cameraB" + ) + ((the binteger 390) + send-event + target + draw + #f + ) + ((the binteger 390) + joint + "camera" + ) + ((the binteger 505) send-event target draw #t) ) - (send-event-function *target* a1-7) - ) - ) - (else - (set! (-> obj will-talk) #t) - (set! (-> obj talk-message) (the-as uint 282)) ) ) - (new 'static 'spool-anim - :name "explorer-resolution" - :index 12 - :parts 5 - :command-list - '( - ((the binteger 167) joint "cameraB") ((the binteger 310) joint "camera") - ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 0) + ) + (new 'static 'spool-anim + :name "explorer-reminder-2" + :index 11 + :parts 3 + :command-list '() + ) ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) - ) + ) + (((task-status need-reward-speech)) + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj will-talk) #t) + (set! (-> obj talk-message) (the-as uint 282)) ) - (-> obj draw art-group data 3) ) + (new 'static 'spool-anim + :name "explorer-resolution" + :index 12 + :parts 5 + :command-list + '( + ((the binteger 167) joint "cameraB") ((the binteger 310) joint "camera") + ) + ) + ) + (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 3) ) ) ) diff --git a/goal_src/levels/village1/fishermans-boat.gc b/goal_src/levels/village1/fishermans-boat.gc index 7ab4601d6d..0e8331df5e 100644 --- a/goal_src/levels/village1/fishermans-boat.gc +++ b/goal_src/levels/village1/fishermans-boat.gc @@ -1359,20 +1359,8 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'border) - (set! (-> a1-4 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self cam-tracker)) a1-4) - ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'mask) - (set! (-> a1-5 param 0) (the-as uint #x20800)) - (send-event-function (handle->process (-> self cam-tracker)) a1-5) - ) + (send-event (handle->process (-> self cam-tracker)) 'border #t) + (send-event (handle->process (-> self cam-tracker)) 'mask #x20800) (fishermans-boat-set-path-point (the-as vector 0)) (fishermans-boat-next-path-point) (while #t @@ -1391,12 +1379,7 @@ (set! (-> self waiting-for-player) #f) (when #t (set! (-> *camera* cam-entity) (the-as entity #t)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'clear-entity) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'clear-entity) (load-commands-set! *level* '()) (load-state-want-display-level 'village1 'display) (load-state-want-force-vis 'village1 #f) @@ -1679,20 +1662,8 @@ ) ) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'border) - (set! (-> a1-3 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self cam-tracker)) a1-3) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'mask) - (set! (-> a1-4 param 0) (the-as uint #x20800)) - (send-event-function (handle->process (-> self cam-tracker)) a1-4) - ) + (send-event (handle->process (-> self cam-tracker)) 'border #t) + (send-event (handle->process (-> self cam-tracker)) 'mask #x20800) (fishermans-boat-set-path-point (the-as vector 4)) (fishermans-boat-next-path-point) (while #t @@ -1718,12 +1689,7 @@ ) (when #t (set! (-> *camera* cam-entity) (the-as entity #t)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'clear-entity) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'clear-entity) (go fishermans-boat-docked-misty) ) ) @@ -1747,14 +1713,7 @@ (defstate fishermans-boat-player-control (fishermans-boat) :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'change-state) - (set! (-> a1-0 param 0) (the-as uint *camera-base-mode*)) - (set! (-> a1-0 param 1) (the-as uint 0)) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'change-state *camera-base-mode* 0) (set! (-> self auto-pilot) #t) (none) ) @@ -1777,22 +1736,9 @@ ) :code (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'message) - (set! (-> a1-0 param 0) (the-as uint 'release)) - (send-event-function (handle->process (-> self cam-tracker)) a1-0) - ) + (send-event (handle->process (-> self cam-tracker)) 'message 'release) (suspend) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 2) - (set! (-> a1-1 message) 'change-state) - (set! (-> a1-1 param 0) (the-as uint cam-stick)) - (set! (-> a1-1 param 1) (the-as uint 0)) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'change-state cam-stick 0) (while #t (if (and @@ -2139,20 +2085,8 @@ (set! (-> a1-0 message) 'clone-anim) (set! (-> a1-0 param 0) (the-as uint self)) (when (send-event-function *target* a1-0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'matrix) - (set! (-> a1-1 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-1) - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'blend-shape) - (set! (-> a1-2 param 0) (the-as uint #t)) - (send-event-function *target* a1-2) - ) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) (let* ((gp-0 (get-process *default-dead-pool* othercam #x4000)) (v1-20 (when gp-0 (let ((t9-5 (method-of-type othercam activate))) @@ -2174,13 +2108,8 @@ (-> gp-0 ppointer) ) ) - (a1-6 (new 'stack-no-clear 'event-message-block)) ) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'mask) - (set! (-> a1-6 param 0) (the-as uint 2048)) - (send-event-function (ppointer->process v1-20) a1-6) + (send-event (ppointer->process v1-20) 'mask 2048) ) (set! (-> self draw force-lod) 0) (ja-play-spooled-anim @@ -2190,13 +2119,7 @@ (the-as (function process-drawable symbol) false-func) ) (set! (-> self draw force-lod) -1) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'blend-shape) - (set! (-> a1-8 param 0) (the-as uint #f)) - (send-event-function *target* a1-8) - ) + (send-event *target* 'blend-shape #f) (ja-channel-set! 1) (let ((v1-33 (-> self skel root-channel 0))) (set! @@ -2216,20 +2139,8 @@ (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 2) - (set! (-> a1-12 message) 'trans) - (set! (-> a1-12 param 0) (the-as uint 'restore)) - (set! (-> a1-12 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'end-mode) - (send-event-function *target* a1-13) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) + (send-event *target* 'end-mode) (dummy-47 (-> self root-overlay)) (dummy-60 (-> *target* control) @@ -2240,12 +2151,7 @@ ) (logior! (-> *target* control status) 7) (suspend) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) self) - (set! (-> a1-15 num-params) 0) - (set! (-> a1-15 message) 'teleport-to-other-start-string) - (send-event-function *camera* a1-15) - ) + (send-event *camera* 'teleport-to-other-start-string) ) (set-continue! *game-info* "misty-start") ) @@ -2358,35 +2264,20 @@ ) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'anim-mode) - (set! (-> a1-5 param 0) (the-as uint 'clone-anim)) - (send-event-function - (handle->process (-> self evilbro)) - a1-5 - ) + (send-event + (handle->process (-> self evilbro)) + 'anim-mode + 'clone-anim ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'blend-shape) - (set! (-> a1-6 param 0) (the-as uint #t)) - (send-event-function - (handle->process (-> self evilbro)) - a1-6 - ) + (send-event + (handle->process (-> self evilbro)) + 'blend-shape + #t ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'center-joint) - (set! (-> a1-7 param 0) (the-as uint 3)) - (send-event-function - (handle->process (-> self evilbro)) - a1-7 - ) + (send-event + (handle->process (-> self evilbro)) + 'center-joint + 3 ) ) ) @@ -2437,38 +2328,20 @@ ) ) ) - (let - ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'clone-anim)) - (send-event-function - (handle->process (-> self evilsis)) - a1-11 - ) + (send-event + (handle->process (-> self evilsis)) + 'anim-mode + 'clone-anim ) - (let - ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'blend-shape) - (set! (-> a1-12 param 0) (the-as uint #t)) - (send-event-function - (handle->process (-> self evilsis)) - a1-12 - ) + (send-event + (handle->process (-> self evilsis)) + 'blend-shape + #t ) - (let - ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'center-joint) - (set! (-> a1-13 param 0) (the-as uint 3)) - (send-event-function - (handle->process (-> self evilsis)) - a1-13 - ) + (send-event + (handle->process (-> self evilsis)) + 'center-joint + 3 ) ) ) @@ -2505,20 +2378,8 @@ (set! (-> a1-0 message) 'clone-anim) (set! (-> a1-0 param 0) (the-as uint self)) (when (send-event-function *target* a1-0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'matrix) - (set! (-> a1-1 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-1) - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'blend-shape) - (set! (-> a1-2 param 0) (the-as uint #t)) - (send-event-function *target* a1-2) - ) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) (let* ((gp-0 (get-process *default-dead-pool* othercam #x4000)) (v1-20 (when gp-0 (let ((t9-5 (method-of-type othercam activate))) @@ -2540,13 +2401,8 @@ (-> gp-0 ppointer) ) ) - (a1-6 (new 'stack-no-clear 'event-message-block)) ) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'mask) - (set! (-> a1-6 param 0) (the-as uint 2048)) - (send-event-function (ppointer->process v1-20) a1-6) + (send-event (ppointer->process v1-20) 'mask 2048) ) (set! (-> self draw force-lod) 0) (ja-play-spooled-anim @@ -2556,13 +2412,7 @@ (the-as (function process-drawable symbol) false-func) ) (set! (-> self draw force-lod) -1) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'blend-shape) - (set! (-> a1-8 param 0) (the-as uint #f)) - (send-event-function *target* a1-8) - ) + (send-event *target* 'blend-shape #f) (ja-channel-set! 1) (let ((v1-33 (-> self skel root-channel 0))) (set! @@ -2582,20 +2432,8 @@ (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 2) - (set! (-> a1-12 message) 'trans) - (set! (-> a1-12 param 0) (the-as uint 'restore)) - (set! (-> a1-12 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'end-mode) - (send-event-function *target* a1-13) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) + (send-event *target* 'end-mode) (dummy-47 (-> self root-overlay)) (dummy-60 (-> *target* control) @@ -2606,12 +2444,7 @@ ) (logior! (-> *target* control status) 7) (suspend) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) self) - (set! (-> a1-15 num-params) 0) - (set! (-> a1-15 message) 'teleport-to-other-start-string) - (send-event-function *camera* a1-15) - ) + (send-event *camera* 'teleport-to-other-start-string) ) (set-continue! *game-info* "village1-hut") ) diff --git a/goal_src/levels/village1/sage.gc b/goal_src/levels/village1/sage.gc index be620ccbed..d88bbaaebb 100644 --- a/goal_src/levels/village1/sage.gc +++ b/goal_src/levels/village1/sage.gc @@ -656,27 +656,9 @@ ) ) ) - (let ((a1-16 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-16 from) pp) - (set! (-> a1-16 num-params) 1) - (set! (-> a1-16 message) 'anim-mode) - (set! (-> a1-16 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj assistant)) a1-16) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'blend-shape) - (set! (-> a1-17 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj assistant)) a1-17) - ) - (let ((a1-18 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-18 from) pp) - (set! (-> a1-18 num-params) 1) - (set! (-> a1-18 message) 'center-joint) - (set! (-> a1-18 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj assistant)) a1-18) - ) + (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)) @@ -1181,13 +1163,8 @@ (behavior () (case (get-task-status (game-task intro)) (((task-status need-reward-speech)) - (when (process-grab? *target*) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'play-anim) - (send-event-function self a1-0) - ) + (if (process-grab? *target*) + (send-event self 'play-anim) ) ) ) diff --git a/goal_src/levels/village1/village1-part.gc b/goal_src/levels/village1/village1-part.gc index fe9fb7e13a..7e27ef6e82 100644 --- a/goal_src/levels/village1/village1-part.gc +++ b/goal_src/levels/village1/village1-part.gc @@ -16,7 +16,6 @@ ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 127) (new 'static 'sparticle-launch-group @@ -44,7 +43,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 380) (new 'static 'sparticle-launcher @@ -70,7 +68,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 383) (new 'static 'sparticle-launcher @@ -84,7 +81,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 384) (new 'static 'sparticle-launcher @@ -96,7 +92,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 381) (new 'static 'sparticle-launcher @@ -126,7 +121,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 385) (new 'static 'sparticle-launcher @@ -142,7 +136,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 382) (new 'static 'sparticle-launcher @@ -166,7 +159,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 128) (new 'static 'sparticle-launch-group @@ -184,7 +176,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 386) (new 'static 'sparticle-launcher @@ -204,7 +195,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 387) (new 'static 'sparticle-launcher @@ -234,7 +224,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 389) (new 'static 'sparticle-launcher @@ -250,7 +239,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 388) (new 'static 'sparticle-launcher @@ -273,7 +261,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 129) (new 'static 'sparticle-launch-group @@ -295,7 +282,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 390) (new 'static 'sparticle-launcher @@ -322,7 +308,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 396) (new 'static 'sparticle-launcher @@ -337,7 +322,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 391) (new 'static 'sparticle-launcher @@ -364,7 +348,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 397) (new 'static 'sparticle-launcher @@ -381,7 +364,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 398) (new 'static 'sparticle-launcher @@ -396,7 +378,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 392) (new 'static 'sparticle-launcher @@ -425,7 +406,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 399) (new 'static 'sparticle-launcher @@ -442,7 +422,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 393) (new 'static 'sparticle-launcher @@ -471,7 +450,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 400) (new 'static 'sparticle-launcher @@ -490,7 +468,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 401) (new 'static 'sparticle-launcher @@ -507,7 +484,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 394) (new 'static 'sparticle-launcher @@ -535,7 +511,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 402) (new 'static 'sparticle-launcher @@ -552,7 +527,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 395) (new 'static 'sparticle-launcher @@ -581,7 +555,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 403) (new 'static 'sparticle-launcher @@ -600,7 +573,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 404) (new 'static 'sparticle-launcher @@ -617,7 +589,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 405) (new 'static 'sparticle-launcher @@ -651,7 +622,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 406) (new 'static 'sparticle-launcher @@ -680,7 +650,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 407) (new 'static 'sparticle-launcher @@ -716,7 +685,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 408) (new 'static 'sparticle-launcher @@ -749,7 +717,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 130) (new 'static 'sparticle-launch-group @@ -769,7 +736,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 131) (new 'static 'sparticle-launch-group @@ -853,7 +819,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 411) (new 'static 'sparticle-launcher @@ -869,25 +834,7 @@ :mask #x1 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x66 - #x69 - #x72 - #x65 - #x2d - #x70 - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "fire-pop") :volume #x400 ) ) @@ -912,7 +859,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2292) (new 'static 'sparticle-launcher @@ -946,7 +892,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2293) (new 'static 'sparticle-launcher @@ -960,7 +905,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 410) (new 'static 'sparticle-launcher @@ -991,7 +935,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 412) (new 'static 'sparticle-launcher @@ -1026,7 +969,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 413) (new 'static 'sparticle-launcher @@ -1051,7 +993,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 414) (new 'static 'sparticle-launcher @@ -1063,7 +1004,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 132) (new 'static 'sparticle-launch-group @@ -1129,8 +1069,6 @@ ) ) -;; definition for function bird-bob-func -;; INFO: Return type mismatch int vs none. (defun bird-bob-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -1148,7 +1086,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 415) (new 'static 'sparticle-launcher @@ -1173,8 +1110,6 @@ ) ) -;; definition for function sparticle-seagull-moon -;; INFO: Return type mismatch int vs none. (defun sparticle-seagull-moon ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -1186,7 +1121,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 416) (new 'static 'sparticle-launcher @@ -1218,7 +1152,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 418) (new 'static 'sparticle-launcher @@ -1234,7 +1167,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 419) (new 'static 'sparticle-launcher @@ -1250,7 +1182,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 417) (new 'static 'sparticle-launcher @@ -1269,7 +1200,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 133) (new 'static 'sparticle-launch-group @@ -1287,7 +1217,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 420) (new 'static 'sparticle-launcher @@ -1314,7 +1243,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 422) (new 'static 'sparticle-launcher @@ -1326,7 +1254,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 421) (new 'static 'sparticle-launcher @@ -1353,7 +1280,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 423) (new 'static 'sparticle-launcher @@ -1365,7 +1291,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 134) (new 'static 'sparticle-launch-group @@ -1389,7 +1314,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 431) (new 'static 'sparticle-launcher @@ -1416,7 +1340,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 430) (new 'static 'sparticle-launcher @@ -1448,7 +1371,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 432) (new 'static 'sparticle-launcher @@ -1460,7 +1382,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 426) (new 'static 'sparticle-launcher @@ -1494,7 +1415,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 428) (new 'static 'sparticle-launcher @@ -1528,7 +1448,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 427) (new 'static 'sparticle-launcher @@ -1562,7 +1481,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 425) (new 'static 'sparticle-launcher @@ -1596,7 +1514,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 429) (new 'static 'sparticle-launcher @@ -1630,7 +1547,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 424) (new 'static 'sparticle-launcher @@ -1658,7 +1574,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 433) (new 'static 'sparticle-launcher @@ -1670,7 +1585,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 434) (new 'static 'sparticle-launcher @@ -1696,7 +1610,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 435) (new 'static 'sparticle-launcher @@ -1722,7 +1635,6 @@ ) ) -;; definition for function check-drop-level-village1-fountain-nosplash (defun check-drop-level-village1-fountain-nosplash ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -1738,7 +1650,6 @@ ) ) -;; definition for function check-drop-level-village1-fountain (defun check-drop-level-village1-fountain ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -1767,7 +1678,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 135) (new 'static 'sparticle-launch-group @@ -1849,7 +1759,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 472) (new 'static 'sparticle-launcher @@ -1871,7 +1780,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 473) (new 'static 'sparticle-launcher @@ -1897,7 +1805,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 474) (new 'static 'sparticle-launcher @@ -1920,7 +1827,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 475) (new 'static 'sparticle-launcher @@ -1944,7 +1850,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 476) (new 'static 'sparticle-launcher @@ -1968,7 +1873,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 464) (new 'static 'sparticle-launcher @@ -1994,7 +1898,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 465) (new 'static 'sparticle-launcher @@ -2016,7 +1919,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 466) (new 'static 'sparticle-launcher @@ -2040,7 +1942,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 467) (new 'static 'sparticle-launcher @@ -2064,7 +1965,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 468) (new 'static 'sparticle-launcher @@ -2090,7 +1990,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 469) (new 'static 'sparticle-launcher @@ -2112,7 +2011,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 470) (new 'static 'sparticle-launcher @@ -2136,7 +2034,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 471) (new 'static 'sparticle-launcher @@ -2160,7 +2057,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 460) (new 'static 'sparticle-launcher @@ -2186,7 +2082,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 477) (new 'static 'sparticle-launcher @@ -2198,7 +2093,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 461) (new 'static 'sparticle-launcher @@ -2220,7 +2114,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 462) (new 'static 'sparticle-launcher @@ -2244,7 +2137,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 463) (new 'static 'sparticle-launcher @@ -2268,7 +2160,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 457) (new 'static 'sparticle-launcher @@ -2295,7 +2186,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 458) (new 'static 'sparticle-launcher @@ -2325,7 +2215,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 459) (new 'static 'sparticle-launcher @@ -2355,7 +2244,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 454) (new 'static 'sparticle-launcher @@ -2382,7 +2270,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 455) (new 'static 'sparticle-launcher @@ -2412,7 +2299,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 456) (new 'static 'sparticle-launcher @@ -2442,7 +2328,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 451) (new 'static 'sparticle-launcher @@ -2469,7 +2354,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 452) (new 'static 'sparticle-launcher @@ -2499,7 +2383,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 478) (new 'static 'sparticle-launcher @@ -2511,7 +2394,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 453) (new 'static 'sparticle-launcher @@ -2541,7 +2423,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 479) (new 'static 'sparticle-launcher @@ -2553,7 +2434,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 446) (new 'static 'sparticle-launcher @@ -2575,7 +2455,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 447) (new 'static 'sparticle-launcher @@ -2601,7 +2480,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 448) (new 'static 'sparticle-launcher @@ -2624,7 +2502,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 449) (new 'static 'sparticle-launcher @@ -2648,7 +2525,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 450) (new 'static 'sparticle-launcher @@ -2672,7 +2548,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 441) (new 'static 'sparticle-launcher @@ -2694,7 +2569,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 442) (new 'static 'sparticle-launcher @@ -2720,7 +2594,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 443) (new 'static 'sparticle-launcher @@ -2743,7 +2616,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 444) (new 'static 'sparticle-launcher @@ -2767,7 +2639,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 445) (new 'static 'sparticle-launcher @@ -2791,7 +2662,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 436) (new 'static 'sparticle-launcher @@ -2813,7 +2683,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 437) (new 'static 'sparticle-launcher @@ -2839,7 +2708,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 438) (new 'static 'sparticle-launcher @@ -2861,7 +2729,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 439) (new 'static 'sparticle-launcher @@ -2885,7 +2752,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 440) (new 'static 'sparticle-launcher diff --git a/goal_src/levels/village1/village1-part2.gc b/goal_src/levels/village1/village1-part2.gc index 8ca652c2b9..0a9808e64a 100644 --- a/goal_src/levels/village1/village1-part2.gc +++ b/goal_src/levels/village1/village1-part2.gc @@ -7,7 +7,6 @@ ;; DECOMP BEGINS -;; failed to figure out what this is: (set! (-> *part-group-id-table* 136) (new 'static 'sparticle-launch-group @@ -388,7 +387,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 137) (new 'static 'sparticle-launch-group @@ -767,7 +765,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 138) (new 'static 'sparticle-launch-group @@ -1146,7 +1143,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 482) (new 'static 'sparticle-launcher @@ -1168,7 +1164,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 483) (new 'static 'sparticle-launcher @@ -1197,7 +1192,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 480) (new 'static 'sparticle-launcher @@ -1230,7 +1224,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 481) (new 'static 'sparticle-launcher @@ -1254,7 +1247,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 484) (new 'static 'sparticle-launcher @@ -1276,7 +1268,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 485) (new 'static 'sparticle-launcher @@ -1305,7 +1296,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 486) (new 'static 'sparticle-launcher @@ -1327,7 +1317,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 487) (new 'static 'sparticle-launcher @@ -1356,7 +1345,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 488) (new 'static 'sparticle-launcher @@ -1378,7 +1366,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 489) (new 'static 'sparticle-launcher @@ -1407,7 +1394,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 490) (new 'static 'sparticle-launcher @@ -1429,7 +1415,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 491) (new 'static 'sparticle-launcher @@ -1458,7 +1443,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 492) (new 'static 'sparticle-launcher @@ -1480,7 +1464,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 493) (new 'static 'sparticle-launcher @@ -1509,7 +1492,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 494) (new 'static 'sparticle-launcher @@ -1531,7 +1513,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 495) (new 'static 'sparticle-launcher @@ -1560,7 +1541,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 496) (new 'static 'sparticle-launcher @@ -1582,7 +1562,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 497) (new 'static 'sparticle-launcher @@ -1611,7 +1590,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 498) (new 'static 'sparticle-launcher @@ -1633,7 +1611,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 499) (new 'static 'sparticle-launcher @@ -1662,7 +1639,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 139) (new 'static 'sparticle-launch-group @@ -1692,7 +1668,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 502) (new 'static 'sparticle-launcher @@ -1708,25 +1683,7 @@ :mask #x1 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x64 - #x72 - #x69 - #x70 - #x2d - #x6f - #x6e - #x2d - #x77 - #x6f - #x6f - #x64 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "drip-on-wood") :volume #x200 ) ) @@ -1747,7 +1704,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 503) (new 'static 'sparticle-launcher @@ -1772,7 +1728,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 500) (new 'static 'sparticle-launcher @@ -1804,7 +1759,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 504) (new 'static 'sparticle-launcher @@ -1818,7 +1772,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 501) (new 'static 'sparticle-launcher @@ -1848,7 +1801,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 505) (new 'static 'sparticle-launcher @@ -1860,7 +1812,6 @@ ) ) -;; definition for function check-drop-level-sagehut (defun check-drop-level-sagehut ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -1904,7 +1855,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 140) (new 'static 'sparticle-launch-group @@ -2091,7 +2041,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1973) (new 'static 'sparticle-launcher @@ -2115,7 +2064,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1972) (new 'static 'sparticle-launcher @@ -2137,7 +2085,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1969) (new 'static 'sparticle-launcher @@ -2167,7 +2114,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1970) (new 'static 'sparticle-launcher @@ -2191,7 +2137,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1971) (new 'static 'sparticle-launcher @@ -2212,7 +2157,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1968) (new 'static 'sparticle-launcher @@ -2243,7 +2187,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 141) (new 'static 'sparticle-launch-group @@ -2259,7 +2202,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 511) (new 'static 'sparticle-launcher @@ -2289,7 +2231,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 512) (new 'static 'sparticle-launcher @@ -2303,7 +2244,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 513) (new 'static 'sparticle-launcher @@ -2315,7 +2255,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 684) (new 'static 'sparticle-launch-group @@ -2338,7 +2277,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2848) (new 'static 'sparticle-launcher @@ -2371,7 +2309,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2849) (new 'static 'sparticle-launcher @@ -2408,7 +2345,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2846) (new 'static 'sparticle-launcher @@ -2441,7 +2377,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2847) (new 'static 'sparticle-launcher @@ -2478,7 +2413,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2844) (new 'static 'sparticle-launcher @@ -2511,7 +2445,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2850) (new 'static 'sparticle-launcher @@ -2524,7 +2457,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2845) (new 'static 'sparticle-launcher @@ -2561,7 +2493,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2851) (new 'static 'sparticle-launcher @@ -2573,7 +2504,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 142) (new 'static 'sparticle-launch-group @@ -2591,7 +2521,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 514) (new 'static 'sparticle-launcher @@ -2613,7 +2542,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 515) (new 'static 'sparticle-launcher @@ -2636,7 +2564,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 516) (new 'static 'sparticle-launcher diff --git a/goal_src/levels/village1/yakow.gc b/goal_src/levels/village1/yakow.gc index dfec5648d8..2fa316d407 100644 --- a/goal_src/levels/village1/yakow.gc +++ b/goal_src/levels/village1/yakow.gc @@ -944,16 +944,11 @@ yakow-default-event-handler (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self travel-speed) 0.0) (set! (-> self grazing) #t) - (let ((v1-3 (entity-actor-lookup (-> self entity) 'alt-actor 0)) - (a1-1 (new 'stack-no-clear 'event-message-block)) - ) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'update) - (send-event-function (if v1-3 - (-> v1-3 extra process) - ) - a1-1 + (let ((v1-3 (entity-actor-lookup (-> self entity) 'alt-actor 0))) + (send-event (if v1-3 + (-> v1-3 extra process) + ) + 'update ) ) (none) diff --git a/goal_src/levels/village2/assistant-village2.gc b/goal_src/levels/village2/assistant-village2.gc index 76d99c34d5..cfb9721574 100644 --- a/goal_src/levels/village2/assistant-village2.gc +++ b/goal_src/levels/village2/assistant-village2.gc @@ -141,22 +141,11 @@ (((game-task village2-levitator)) (when arg0 (close-status! (-> obj tasks) (task-status need-introduction)) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'clone) - (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj sage extra process) a1-5) - ) - (let ((s5-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-1 from) pp) - (set! (-> s5-1 num-params) 1) - (set! (-> s5-1 message) 'clone) - (set! (-> s5-1 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - s5-1 - ) + (send-event (-> obj sage extra process) 'clone (process->handle obj)) + (send-event + (-> (entity-by-type flutflut-bluehut) extra process) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -839,29 +828,12 @@ (set! (-> (the-as manipy v1-42) draw light-index) (the-as uint 1)) ) ) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) pp) - (set! (-> a1-14 num-params) 1) - (set! (-> a1-14 message) 'anim-mode) - (set! (-> a1-14 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj jaws)) a1-14) - ) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'center-joint) - (set! (-> a1-15 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj jaws)) a1-15) - ) - (let ((s5-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-4 from) pp) - (set! (-> s5-4 num-params) 1) - (set! (-> s5-4 message) 'clone) - (set! (-> s5-4 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - s5-4 - ) + (send-event (handle->process (-> obj jaws)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj jaws)) 'center-joint 3) + (send-event + (-> (entity-by-type flutflut-bluehut) extra process) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -947,15 +919,10 @@ (else (when arg0 (close-status! (-> obj tasks) (task-status need-introduction)) - (let ((s5-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-6 from) pp) - (set! (-> s5-6 num-params) 1) - (set! (-> s5-6 message) 'clone) - (set! (-> s5-6 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - s5-6 - ) + (send-event + (-> (entity-by-type flutflut-bluehut) extra process) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -1193,12 +1160,7 @@ (behavior () (case (get-task-status (game-task village2-levitator)) (((task-status need-hint) (task-status need-introduction)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'play-anim) - (send-event-function self a1-1) - ) + (send-event self 'play-anim) ) ) ((-> (method-of-type process-taskable idle) trans)) @@ -1648,21 +1610,8 @@ (deactivate a0-1) ) ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'end-mode) - (send-event-function (-> self sage extra process) a1-1) - ) - (let ((gp-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> gp-0 from) self) - (set! (-> gp-0 num-params) 0) - (set! (-> gp-0 message) 'end-mode) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - gp-0 - ) - ) + (send-event (-> self sage extra process) 'end-mode) + (send-event (-> (entity-by-type flutflut-bluehut) extra process) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (close-specific-task! (game-task village2-levitator) @@ -3093,8 +3042,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6863616d2d76656c) + :sound-name (static-sound-name "lev-mach-idle") :volume #x400 :fo-max 30 ) diff --git a/goal_src/levels/village2/gambler.gc b/goal_src/levels/village2/gambler.gc index 557899b081..e4f39efa6f 100644 --- a/goal_src/levels/village2/gambler.gc +++ b/goal_src/levels/village2/gambler.gc @@ -41,205 +41,193 @@ ) (defmethod play-anim! gambler ((obj gambler) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - (close-specific-task! - (game-task village2-gambler-money) - (task-status need-introduction) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + (close-specific-task! + (game-task village2-gambler-money) + (task-status need-introduction) + ) + ) + (new 'static 'spool-anim + :name "gambler-introduction-1" + :index 11 + :parts 9 + :command-list + '( + (0 + want-levels + village2 + rolling + ) + (0 + display-level + rolling + #f + ) + ((the binteger 29) + joint + "cameraB" + ) + ((the binteger 103) + joint + "camera" + ) + ((the binteger 231) + joint + "cameraB" + ) + ((the binteger 730) + display-level + rolling + display + ) + ((the binteger 730) + want-force-vis + rolling + #t + ) + ((the binteger 732) + alive + "gorge-pusher-5" + ) + ((the binteger 732) + alive + "gorge-pusher-6" + ) + ((the binteger 732) + alive + "gorge-start-1" + ) + ((the binteger 732) + joint + "camera" + ) + ((the binteger 945) + joint + "cameraB" + ) + ((the binteger 950) + dead + "gorge-pusher-5" + ) + ((the binteger 950) + dead + "gorge-pusher-6" + ) + ((the binteger 950) + dead + "gorge-start-1" + ) + ((the binteger 950) + display-level + rolling + #f + ) + ((the binteger 950) want-force-vis rolling #f) + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((closed? + (-> obj tasks) + (game-task rolling-race) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "gambler-reminder-money" + :index 13 + :parts 2 + :command-list '() + ) + ) + ((closed? + (-> obj tasks) + (game-task village2-gambler-money) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "gambler-reminder-race" + :index 12 + :parts 2 + :command-list '() + ) + ) + ((zero? (get-reminder (-> obj tasks) 5)) + (if arg0 + (save-reminder (-> obj tasks) 1 5) + ) + (new 'static 'spool-anim + :name "gambler-reminder-race" + :index 12 + :parts 2 + :command-list '() + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 5) + ) + (new 'static 'spool-anim + :name "gambler-reminder-money" + :index 13 + :parts 2 + :command-list '() + ) + ) + ) + ) + (((task-status need-reward-speech)) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + (((game-task rolling-race)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + ) + (new 'static 'spool-anim + :name "gambler-resolution-race" + :index 14 + :parts 3 + :command-list '() + ) + ) + (else + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj talk-message) (the-as uint 282)) ) ) (new 'static 'spool-anim - :name "gambler-introduction-1" - :index 11 - :parts 9 - :command-list - '( - (0 - want-levels - village2 - rolling - ) - (0 - display-level - rolling - #f - ) - ((the binteger 29) - joint - "cameraB" - ) - ((the binteger 103) - joint - "camera" - ) - ((the binteger 231) - joint - "cameraB" - ) - ((the binteger 730) - display-level - rolling - display - ) - ((the binteger 730) - want-force-vis - rolling - #t - ) - ((the binteger 732) - alive - "gorge-pusher-5" - ) - ((the binteger 732) - alive - "gorge-pusher-6" - ) - ((the binteger 732) - alive - "gorge-start-1" - ) - ((the binteger 732) - joint - "camera" - ) - ((the binteger 945) - joint - "cameraB" - ) - ((the binteger 950) - dead - "gorge-pusher-5" - ) - ((the binteger 950) - dead - "gorge-pusher-6" - ) - ((the binteger 950) - dead - "gorge-start-1" - ) - ((the binteger 950) - display-level - rolling - #f - ) - ((the binteger 950) want-force-vis rolling #f) - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (cond - ((closed? - (-> obj tasks) - (game-task rolling-race) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "gambler-reminder-money" - :index 13 - :parts 2 - :command-list '() - ) - ) - ((closed? - (-> obj tasks) - (game-task village2-gambler-money) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "gambler-reminder-race" - :index 12 - :parts 2 - :command-list '() - ) - ) - ((zero? (get-reminder (-> obj tasks) 5)) - (if arg0 - (save-reminder (-> obj tasks) 1 5) - ) - (new 'static 'spool-anim - :name "gambler-reminder-race" - :index 12 - :parts 2 - :command-list '() - ) - ) - (else - (if arg0 - (save-reminder (-> obj tasks) 0 5) - ) - (new 'static 'spool-anim - :name "gambler-reminder-money" - :index 13 - :parts 2 - :command-list '() - ) + :name "gambler-resolution-money" + :index 15 + :parts 2 + :command-list '() ) ) ) - (((task-status need-reward-speech)) - (if (not arg0) - (set! (-> obj will-talk) #t) - ) - (case (current-task (-> obj tasks)) - (((game-task rolling-race)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - ) - (new 'static 'spool-anim - :name "gambler-resolution-race" - :index 14 - :parts 3 - :command-list '() - ) - ) - (else - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 2) - (set! (-> a1-10 message) 'get-pickup) - (set! (-> a1-10 param 0) (the-as uint 5)) - (set! - (-> a1-10 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-10) - ) - ) - (else - (set! (-> obj talk-message) (the-as uint 282)) - ) - ) - (new 'static 'spool-anim - :name "gambler-resolution-money" - :index 15 - :parts 2 - :command-list '() - ) - ) + ) + (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 7) - ) + (-> obj draw art-group data 7) ) ) ) diff --git a/goal_src/levels/village2/geologist.gc b/goal_src/levels/village2/geologist.gc index 73e9a6a293..1b32f1a182 100644 --- a/goal_src/levels/village2/geologist.gc +++ b/goal_src/levels/village2/geologist.gc @@ -41,169 +41,157 @@ ) (defmethod play-anim! geologist ((obj geologist) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - (close-specific-task! - (game-task village2-geologist-money) - (task-status need-introduction) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + (close-specific-task! + (game-task village2-geologist-money) + (task-status need-introduction) + ) + ) + (new 'static 'spool-anim + :name "geologist-introduction" + :index 6 + :parts 13 + :command-list + '( + (0 + want-levels + village2 + rolling + ) + ((the binteger 199) + joint + "cameraB" + ) + ((the binteger 325) + joint + "camera" + ) + ((the binteger 520) + alive + "racer-2" + ) + ((the binteger 544) + joint + "cameraB" + ) + ((the binteger 546) + dead + "racer-2" + ) + ((the binteger 809) + joint + "camera" + ) + ((the binteger 1031) + joint + "cameraB" + ) + ((the binteger 1229) joint "camera") + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((closed? + (-> obj tasks) + (game-task rolling-moles) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "geologist-reminder-money" + :index 8 + :parts 2 + :command-list '() + ) + ) + ((closed? + (-> obj tasks) + (game-task village2-geologist-money) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "geologist-reminder-moles" + :index 7 + :parts 3 + :command-list '() + ) + ) + ((zero? (get-reminder (-> obj tasks) 0)) + (if arg0 + (save-reminder (-> obj tasks) 1 0) + ) + (new 'static 'spool-anim + :name "geologist-reminder-moles" + :index 7 + :parts 3 + :command-list '() + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 0) + ) + (new 'static 'spool-anim + :name "geologist-reminder-money" + :index 8 + :parts 2 + :command-list '() + ) + ) + ) + ) + (((task-status need-reward-speech)) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + (((game-task rolling-moles)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + ) + (new 'static 'spool-anim + :name "geologist-resolution-moles" + :index 9 + :parts 3 + :command-list '() + ) + ) + (else + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj talk-message) (the-as uint 282)) ) ) (new 'static 'spool-anim - :name "geologist-introduction" - :index 6 - :parts 13 - :command-list - '( - (0 - want-levels - village2 - rolling - ) - ((the binteger 199) - joint - "cameraB" - ) - ((the binteger 325) - joint - "camera" - ) - ((the binteger 520) - alive - "racer-2" - ) - ((the binteger 544) - joint - "cameraB" - ) - ((the binteger 546) - dead - "racer-2" - ) - ((the binteger 809) - joint - "camera" - ) - ((the binteger 1031) - joint - "cameraB" - ) - ((the binteger 1229) joint "camera") - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (cond - ((closed? - (-> obj tasks) - (game-task rolling-moles) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "geologist-reminder-money" - :index 8 - :parts 2 - :command-list '() - ) - ) - ((closed? - (-> obj tasks) - (game-task village2-geologist-money) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "geologist-reminder-moles" - :index 7 - :parts 3 - :command-list '() - ) - ) - ((zero? (get-reminder (-> obj tasks) 0)) - (if arg0 - (save-reminder (-> obj tasks) 1 0) - ) - (new 'static 'spool-anim - :name "geologist-reminder-moles" - :index 7 - :parts 3 - :command-list '() - ) - ) - (else - (if arg0 - (save-reminder (-> obj tasks) 0 0) - ) - (new 'static 'spool-anim - :name "geologist-reminder-money" - :index 8 - :parts 2 - :command-list '() - ) + :name "geologist-resolution-money" + :index 10 + :parts 2 + :command-list '() ) ) ) - (((task-status need-reward-speech)) - (if (not arg0) - (set! (-> obj will-talk) #t) - ) - (case (current-task (-> obj tasks)) - (((game-task rolling-moles)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - ) - (new 'static 'spool-anim - :name "geologist-resolution-moles" - :index 9 - :parts 3 - :command-list '() - ) - ) - (else - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 2) - (set! (-> a1-10 message) 'get-pickup) - (set! (-> a1-10 param 0) (the-as uint 5)) - (set! - (-> a1-10 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-10) - ) - ) - (else - (set! (-> obj talk-message) (the-as uint 282)) - ) - ) - (new 'static 'spool-anim - :name "geologist-resolution-money" - :index 10 - :parts 2 - :command-list '() - ) - ) + ) + (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 5) - ) + (-> obj draw art-group data 5) ) ) ) diff --git a/goal_src/levels/village2/sage-bluehut.gc b/goal_src/levels/village2/sage-bluehut.gc index d51b2c335a..9991b9aecb 100644 --- a/goal_src/levels/village2/sage-bluehut.gc +++ b/goal_src/levels/village2/sage-bluehut.gc @@ -78,14 +78,8 @@ ) (close-status! (-> obj tasks) (task-status need-introduction)) (let ((s5-2 (-> obj assistant extra process))) - (when (and s5-2 (should-display? (the-as assistant-bluehut s5-2))) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'clone) - (set! (-> a1-6 param 0) (the-as uint (process->handle obj))) - (send-event-function s5-2 a1-6) - ) + (if (and s5-2 (should-display? (the-as assistant-bluehut s5-2))) + (send-event s5-2 'clone (process->handle obj)) ) ) (set! (-> obj draw bounds w) 40960.0) @@ -316,12 +310,7 @@ :virtual #t :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self assistant extra process) a1-0) - ) + (send-event (-> self assistant extra process) 'end-mode) (set! (-> self draw bounds w) 10240.0) ((-> (method-of-type process-taskable play-anim) exit)) (none) diff --git a/goal_src/levels/village2/sunken-elevator.gc b/goal_src/levels/village2/sunken-elevator.gc index d62dec95b2..b32ab6cc61 100644 --- a/goal_src/levels/village2/sunken-elevator.gc +++ b/goal_src/levels/village2/sunken-elevator.gc @@ -7,7 +7,8 @@ (define-extern *sunken-elevator-sg* skeleton-group) -;; definition of type sunken-elevator +;; DECOMP BEGINS + (deftype sunken-elevator (plat-button) ((play-at-top-going-up-camera? symbol :offset-assert 240) (teleport-if-below-y float :offset-assert 244) @@ -19,7 +20,7 @@ :flag-assert #x21009000fc ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -37,7 +38,6 @@ (set! *sunken-elevator-sg* v1-1) ) -;; definition for method 30 of type sunken-elevator (defmethod should-teleport? sunken-elevator ((obj sunken-elevator)) (let ((f0-0 (-> (camera-pos) y))) (case (-> obj path-pos) @@ -56,7 +56,6 @@ #f ) -;; failed to figure out what this is: (defstate plat-button-pressed (sunken-elevator) :virtual #t :enter @@ -141,7 +140,6 @@ ) ) -;; failed to figure out what this is: (defstate plat-button-move-upward (sunken-elevator) :virtual #t :enter @@ -197,7 +195,6 @@ ) ) -;; failed to figure out what this is: (defstate plat-button-move-downward (sunken-elevator) :virtual #t :trans @@ -223,19 +220,12 @@ ) (when (< (-> self path-pos) 0.9) (TODO-RENAME-28 (-> *target* control)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'reset-height) - (send-event-function *target* a1-2) - ) + (send-event *target* 'reset-height) ) (none) ) ) -;; definition for method 29 of type sunken-elevator -;; INFO: Return type mismatch float vs symbol. (defmethod can-target-move? sunken-elevator ((obj sunken-elevator)) (set! (-> obj play-at-top-going-up-camera?) #f) (let ((s5-0 (new 'stack-no-clear 'vector))) @@ -249,7 +239,6 @@ ) ) -;; definition for method 27 of type sunken-elevator (defmethod TODO-RENAME-27 sunken-elevator ((obj sunken-elevator)) (ja-channel-set! 1) (cond @@ -293,10 +282,12 @@ (none) ) -;; definition for method 31 of type sunken-elevator -;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-31 sunken-elevator ((obj sunken-elevator)) (dummy-14 obj *sunken-elevator-sg* '()) 0 (none) ) + + + + diff --git a/goal_src/levels/village2/village2-part.gc b/goal_src/levels/village2/village2-part.gc index 77960386de..1f22008395 100644 --- a/goal_src/levels/village2/village2-part.gc +++ b/goal_src/levels/village2/village2-part.gc @@ -16,7 +16,6 @@ ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 264) (new 'static 'sparticle-launch-group @@ -34,7 +33,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1129) (new 'static 'sparticle-launcher @@ -54,7 +52,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1127) (new 'static 'sparticle-launcher @@ -84,7 +81,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1130) (new 'static 'sparticle-launcher @@ -100,7 +96,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1128) (new 'static 'sparticle-launcher @@ -123,7 +118,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 265) (new 'static 'sparticle-launch-group @@ -148,7 +142,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1133) (new 'static 'sparticle-launcher @@ -171,7 +164,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1136) (new 'static 'sparticle-launcher @@ -185,7 +177,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1134) (new 'static 'sparticle-launcher @@ -208,7 +199,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1135) (new 'static 'sparticle-launcher @@ -231,7 +221,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1131) (new 'static 'sparticle-launcher @@ -257,7 +246,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1132) (new 'static 'sparticle-launcher @@ -280,7 +268,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 266) (new 'static 'sparticle-launch-group @@ -304,7 +291,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 267) (new 'static 'sparticle-launch-group @@ -323,7 +309,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 268) (new 'static 'sparticle-launch-group @@ -347,7 +332,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 269) (new 'static 'sparticle-launch-group @@ -371,7 +355,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 270) (new 'static 'sparticle-launch-group @@ -388,7 +371,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1144) (new 'static 'sparticle-launcher @@ -412,7 +394,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1149) (new 'static 'sparticle-launcher @@ -424,7 +405,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1147) (new 'static 'sparticle-launcher @@ -447,7 +427,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1150) (new 'static 'sparticle-launcher @@ -459,7 +438,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1137) (new 'static 'sparticle-launcher @@ -493,7 +471,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1145) (new 'static 'sparticle-launcher @@ -527,7 +504,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1138) (new 'static 'sparticle-launcher @@ -561,7 +537,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1139) (new 'static 'sparticle-launcher @@ -597,7 +572,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1146) (new 'static 'sparticle-launcher @@ -633,7 +607,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1148) (new 'static 'sparticle-launcher @@ -669,7 +642,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1151) (new 'static 'sparticle-launcher @@ -684,7 +656,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1152) (new 'static 'sparticle-launcher @@ -697,7 +668,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1140) (new 'static 'sparticle-launcher @@ -731,7 +701,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1141) (new 'static 'sparticle-launcher @@ -765,7 +734,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1142) (new 'static 'sparticle-launcher @@ -799,7 +767,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1143) (new 'static 'sparticle-launcher @@ -833,7 +800,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 634) (new 'static 'sparticle-launch-group @@ -851,7 +817,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 271) (new 'static 'sparticle-launch-group @@ -885,7 +850,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1156) (new 'static 'sparticle-launcher @@ -911,7 +875,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1171) (new 'static 'sparticle-launcher @@ -923,7 +886,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1160) (new 'static 'sparticle-launcher @@ -949,7 +911,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1164) (new 'static 'sparticle-launcher @@ -975,7 +936,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1153) (new 'static 'sparticle-launcher @@ -1008,7 +968,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1154) (new 'static 'sparticle-launcher @@ -1041,7 +1000,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1155) (new 'static 'sparticle-launcher @@ -1077,7 +1035,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1172) (new 'static 'sparticle-launcher @@ -1092,7 +1049,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1173) (new 'static 'sparticle-launcher @@ -1105,7 +1061,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1157) (new 'static 'sparticle-launcher @@ -1139,7 +1094,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1158) (new 'static 'sparticle-launcher @@ -1173,7 +1127,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1159) (new 'static 'sparticle-launcher @@ -1210,7 +1163,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1161) (new 'static 'sparticle-launcher @@ -1244,7 +1196,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1162) (new 'static 'sparticle-launcher @@ -1278,7 +1229,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1163) (new 'static 'sparticle-launcher @@ -1315,7 +1265,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1165) (new 'static 'sparticle-launcher @@ -1349,7 +1298,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1166) (new 'static 'sparticle-launcher @@ -1383,7 +1331,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1167) (new 'static 'sparticle-launcher @@ -1420,7 +1367,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1168) (new 'static 'sparticle-launcher @@ -1455,7 +1401,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1169) (new 'static 'sparticle-launcher @@ -1491,7 +1436,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1174) (new 'static 'sparticle-launcher @@ -1507,7 +1451,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1175) (new 'static 'sparticle-launcher @@ -1522,7 +1465,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1170) (new 'static 'sparticle-launcher @@ -1557,7 +1499,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1176) (new 'static 'sparticle-launcher @@ -1571,7 +1512,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1177) (new 'static 'sparticle-launcher @@ -1593,7 +1533,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 272) (new 'static 'sparticle-launch-group @@ -1619,7 +1558,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1178) (new 'static 'sparticle-launcher @@ -1652,7 +1590,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1183) (new 'static 'sparticle-launcher @@ -1666,7 +1603,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1184) (new 'static 'sparticle-launcher @@ -1678,7 +1614,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1179) (new 'static 'sparticle-launcher @@ -1711,7 +1646,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1185) (new 'static 'sparticle-launcher @@ -1723,7 +1657,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1180) (new 'static 'sparticle-launcher @@ -1754,7 +1687,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1181) (new 'static 'sparticle-launcher @@ -1787,7 +1719,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1182) (new 'static 'sparticle-launcher @@ -1820,7 +1751,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 273) (new 'static 'sparticle-launch-group @@ -1846,7 +1776,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1186) (new 'static 'sparticle-launcher @@ -1879,7 +1808,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1187) (new 'static 'sparticle-launcher @@ -1912,7 +1840,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1188) (new 'static 'sparticle-launcher @@ -1943,7 +1870,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1189) (new 'static 'sparticle-launcher @@ -1976,7 +1902,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1190) (new 'static 'sparticle-launcher @@ -2009,7 +1934,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 274) (new 'static 'sparticle-launch-group @@ -2028,7 +1952,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1191) (new 'static 'sparticle-launcher @@ -2061,7 +1984,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1192) (new 'static 'sparticle-launcher @@ -2096,7 +2018,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 275) (new 'static 'sparticle-launch-group @@ -2117,7 +2038,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1195) (new 'static 'sparticle-launcher @@ -2152,7 +2072,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1196) (new 'static 'sparticle-launcher @@ -2167,7 +2086,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1193) (new 'static 'sparticle-launcher @@ -2183,25 +2101,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x70 - #x61 - #x72 - #x6b - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2231,7 +2131,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1194) (new 'static 'sparticle-launcher @@ -2247,25 +2146,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x70 - #x61 - #x72 - #x6b - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2295,7 +2176,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 276) (new 'static 'sparticle-launch-group @@ -2324,7 +2204,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1201) (new 'static 'sparticle-launcher @@ -2355,7 +2234,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1202) (new 'static 'sparticle-launcher @@ -2381,7 +2259,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1200) (new 'static 'sparticle-launcher @@ -2410,7 +2287,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1205) (new 'static 'sparticle-launcher @@ -2426,7 +2302,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1203) (new 'static 'sparticle-launcher @@ -2461,7 +2336,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1206) (new 'static 'sparticle-launcher @@ -2477,7 +2351,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1204) (new 'static 'sparticle-launcher @@ -2514,7 +2387,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1199) (new 'static 'sparticle-launcher @@ -2539,7 +2411,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1197) (new 'static 'sparticle-launcher @@ -2555,25 +2426,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x70 - #x61 - #x72 - #x6b - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2600,7 +2453,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1198) (new 'static 'sparticle-launcher @@ -2616,25 +2468,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x70 - #x61 - #x72 - #x6b - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2662,7 +2496,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1207) (new 'static 'sparticle-launcher @@ -2687,7 +2520,6 @@ ) ) -;; definition for function check-drop-level-sagehut2 (defun check-drop-level-sagehut2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -2723,7 +2555,6 @@ (none) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 678) (new 'static 'sparticle-launch-group @@ -2782,7 +2613,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2795) (new 'static 'sparticle-launcher @@ -2808,7 +2638,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2794) (new 'static 'sparticle-launcher @@ -2834,7 +2663,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2793) (new 'static 'sparticle-launcher @@ -2862,7 +2690,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2792) (new 'static 'sparticle-launcher @@ -2884,7 +2711,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2791) (new 'static 'sparticle-launcher diff --git a/goal_src/levels/village2/warrior.gc b/goal_src/levels/village2/warrior.gc index 85ec2d7833..8584bd4723 100644 --- a/goal_src/levels/village2/warrior.gc +++ b/goal_src/levels/village2/warrior.gc @@ -154,26 +154,11 @@ (arg0 (set! (-> obj cell-for-task) (current-task (-> obj tasks))) (close-current! (-> obj tasks)) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'get-pickup) - (set! (-> a1-4 param 0) (the-as uint 5)) - (set! - (-> a1-4 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-4) - ) - (let ((s5-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-1 from) pp) - (set! (-> s5-1 num-params) 1) - (set! (-> s5-1 message) 'clone) - (set! (-> s5-1 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type allpontoons) extra process) - s5-1 - ) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + (send-event + (-> (entity-by-type allpontoons) extra process) + 'clone + (process->handle obj) ) (dotimes (s5-2 (entity-actor-count (-> obj entity) 'alt-actor)) (entity-birth-no-kill @@ -237,12 +222,7 @@ :virtual #t :exit (behavior () - (let ((gp-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> gp-0 from) self) - (set! (-> gp-0 num-params) 0) - (set! (-> gp-0 message) 'end-mode) - (send-event-function (-> (entity-by-type allpontoons) extra process) gp-0) - ) + (send-event (-> (entity-by-type allpontoons) extra process) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (none) ) diff --git a/goal_src/levels/village3/miners.gc b/goal_src/levels/village3/miners.gc index d8d3f0a580..1bbd21455d 100644 --- a/goal_src/levels/village3/miners.gc +++ b/goal_src/levels/village3/miners.gc @@ -359,12 +359,10 @@ 1 ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'clone) - (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-5) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (close-specific-task! (game-task village3-miner-money1) @@ -447,12 +445,10 @@ 1 ) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) pp) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'clone) - (set! (-> a1-12 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-12) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (close-status! (-> obj tasks) (task-status need-introduction)) ) @@ -500,12 +496,10 @@ ) (else (when arg0 - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) pp) - (set! (-> a1-14 num-params) 1) - (set! (-> a1-14 message) 'clone) - (set! (-> a1-14 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-14) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (close-status! (-> obj tasks) (task-status need-introduction)) ) @@ -619,13 +613,11 @@ ) ) ((= s4-2 1) - (when arg0 - (let ((a1-18 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-18 from) pp) - (set! (-> a1-18 num-params) 1) - (set! (-> a1-18 message) 'clone) - (set! (-> a1-18 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-18) + (if arg0 + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -636,13 +628,11 @@ ) ) ((= s4-2 2) - (when arg0 - (let ((a1-19 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-19 from) pp) - (set! (-> a1-19 num-params) 1) - (set! (-> a1-19 message) 'clone) - (set! (-> a1-19 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-19) + (if arg0 + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -653,13 +643,11 @@ ) ) (else - (when arg0 - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) pp) - (set! (-> a1-20 num-params) 1) - (set! (-> a1-20 message) 'clone) - (set! (-> a1-20 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-20) + (if arg0 + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -684,26 +672,14 @@ (let ((s4-3 (get-reminder (-> obj tasks) 2))) (cond (arg0 - (let ((a1-22 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-22 from) pp) - (set! (-> a1-22 num-params) 1) - (set! (-> a1-22 message) 'clone) - (set! (-> a1-22 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-22) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (set! (-> obj cell-for-task) (current-task (-> obj tasks))) (close-current! (-> obj tasks)) - (let ((a1-23 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-23 from) pp) - (set! (-> a1-23 num-params) 2) - (set! (-> a1-23 message) 'get-pickup) - (set! (-> a1-23 param 0) (the-as uint 5)) - (set! - (-> a1-23 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-23) - ) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) (save-reminder (-> obj tasks) (+ s4-3 1) 2) ) (else @@ -753,12 +729,7 @@ :virtual #t :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self other-miner ppointer 3) a1-0) - ) + (send-event (-> self other-miner ppointer 3) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (none) ) diff --git a/goal_src/levels/village3/sage-village3.gc b/goal_src/levels/village3/sage-village3.gc index 88acf748b6..2ab9952c4e 100644 --- a/goal_src/levels/village3/sage-village3.gc +++ b/goal_src/levels/village3/sage-village3.gc @@ -89,12 +89,10 @@ (((game-task village3-button)) (when arg0 (close-status! (-> obj tasks) (task-status need-introduction)) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'clone) - (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj assistant extra process) a1-5) + (send-event + (-> obj assistant extra process) + 'clone + (process->handle obj) ) (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj evilbro) (ppointer->handle (when s5-1 @@ -133,27 +131,9 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj evilbro)) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'blend-shape) - (set! (-> a1-10 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj evilbro)) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) pp) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'center-joint) - (set! (-> a1-11 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj evilbro)) a1-11) - ) + (send-event (handle->process (-> obj evilbro)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj evilbro)) 'blend-shape #t) + (send-event (handle->process (-> obj evilbro)) 'center-joint 3) (let ((s5-2 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj evilsis) (ppointer->handle (when s5-2 (let @@ -191,27 +171,9 @@ ) ) ) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'anim-mode) - (set! (-> a1-15 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj evilsis)) a1-15) - ) - (let ((a1-16 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-16 from) pp) - (set! (-> a1-16 num-params) 1) - (set! (-> a1-16 message) 'blend-shape) - (set! (-> a1-16 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj evilsis)) a1-16) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'center-joint) - (set! (-> a1-17 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj evilsis)) a1-17) - ) + (send-event (handle->process (-> obj evilsis)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj evilsis)) 'blend-shape #t) + (send-event (handle->process (-> obj evilsis)) 'center-joint 3) (set! (-> obj draw bounds w) 40960.0) ) (new 'static 'spool-anim @@ -573,12 +535,7 @@ (behavior () (case (get-task-status (game-task village3-button)) (((task-status need-introduction)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'play-anim) - (send-event-function self a1-0) - ) + (send-event self 'play-anim) ) ) ((-> (method-of-type process-taskable idle) trans)) @@ -591,12 +548,7 @@ :exit (behavior () (set! (-> self draw bounds w) 10240.0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self assistant extra process) a1-0) - ) + (send-event (-> self assistant extra process) 'end-mode) (let ((a0-2 (handle->process (-> self evilbro)))) (if a0-2 (deactivate a0-2) diff --git a/goal_src/levels/village3/village3-part.gc b/goal_src/levels/village3/village3-part.gc index 6ea95beb70..d4c1b3eb81 100644 --- a/goal_src/levels/village3/village3-part.gc +++ b/goal_src/levels/village3/village3-part.gc @@ -16,7 +16,6 @@ ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 476) (new 'static 'sparticle-launch-group @@ -34,7 +33,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1797) (new 'static 'sparticle-launcher @@ -62,7 +60,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1798) (new 'static 'sparticle-launcher @@ -92,7 +89,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 477) (new 'static 'sparticle-launch-group @@ -109,7 +105,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 478) (new 'static 'sparticle-launch-group @@ -126,7 +121,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 479) (new 'static 'sparticle-launch-group @@ -143,7 +137,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 480) (new 'static 'sparticle-launch-group @@ -160,7 +153,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 481) (new 'static 'sparticle-launch-group @@ -177,7 +169,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 482) (new 'static 'sparticle-launch-group @@ -194,7 +185,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 483) (new 'static 'sparticle-launch-group @@ -211,7 +201,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 484) (new 'static 'sparticle-launch-group @@ -228,7 +217,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 485) (new 'static 'sparticle-launch-group @@ -245,7 +233,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 486) (new 'static 'sparticle-launch-group @@ -262,7 +249,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 487) (new 'static 'sparticle-launch-group @@ -279,7 +265,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1810) (new 'static 'sparticle-launcher @@ -311,7 +296,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1808) (new 'static 'sparticle-launcher @@ -343,7 +327,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1809) (new 'static 'sparticle-launcher @@ -375,7 +358,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1807) (new 'static 'sparticle-launcher @@ -407,7 +389,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1812) (new 'static 'sparticle-launcher @@ -423,7 +404,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1806) (new 'static 'sparticle-launcher @@ -455,7 +435,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1814) (new 'static 'sparticle-launcher @@ -471,7 +450,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1805) (new 'static 'sparticle-launcher @@ -503,7 +481,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1804) (new 'static 'sparticle-launcher @@ -535,7 +512,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1815) (new 'static 'sparticle-launcher @@ -551,7 +527,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1803) (new 'static 'sparticle-launcher @@ -583,7 +558,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1816) (new 'static 'sparticle-launcher @@ -599,7 +573,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1802) (new 'static 'sparticle-launcher @@ -631,7 +604,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1817) (new 'static 'sparticle-launcher @@ -647,7 +619,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1813) (new 'static 'sparticle-launcher @@ -660,7 +631,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1801) (new 'static 'sparticle-launcher @@ -692,7 +662,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1799) (new 'static 'sparticle-launcher @@ -724,7 +693,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1811) (new 'static 'sparticle-launcher @@ -738,7 +706,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1800) (new 'static 'sparticle-launcher @@ -769,7 +736,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 488) (new 'static 'sparticle-launch-group @@ -853,7 +819,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2359) (new 'static 'sparticle-launcher @@ -869,25 +834,7 @@ :mask #x1 :num 1.0 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x66 - #x69 - #x72 - #x65 - #x2d - #x70 - #x6f - #x70 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "fire-pop") :volume #x400 ) ) @@ -912,7 +859,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2357) (new 'static 'sparticle-launcher @@ -946,7 +892,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2362) (new 'static 'sparticle-launcher @@ -960,7 +905,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2358) (new 'static 'sparticle-launcher @@ -991,7 +935,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2360) (new 'static 'sparticle-launcher @@ -1026,7 +969,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2361) (new 'static 'sparticle-launcher @@ -1052,7 +994,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2363) (new 'static 'sparticle-launcher @@ -1064,7 +1005,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 489) (new 'static 'sparticle-launch-group @@ -1126,7 +1066,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 490) (new 'static 'sparticle-launch-group @@ -1188,7 +1127,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1836) (new 'static 'sparticle-launcher @@ -1213,7 +1151,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1837) (new 'static 'sparticle-launcher @@ -1233,7 +1170,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1838) (new 'static 'sparticle-launcher @@ -1246,7 +1182,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1833) (new 'static 'sparticle-launcher @@ -1278,7 +1213,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1839) (new 'static 'sparticle-launcher @@ -1302,7 +1236,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1840) (new 'static 'sparticle-launcher @@ -1316,7 +1249,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1834) (new 'static 'sparticle-launcher @@ -1349,7 +1281,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1835) (new 'static 'sparticle-launcher @@ -1385,7 +1316,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1829) (new 'static 'sparticle-launcher @@ -1418,7 +1348,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1828) (new 'static 'sparticle-launcher @@ -1454,7 +1383,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1827) (new 'static 'sparticle-launcher @@ -1486,7 +1414,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1826) (new 'static 'sparticle-launcher @@ -1521,7 +1448,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1824) (new 'static 'sparticle-launcher @@ -1557,7 +1483,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1823) (new 'static 'sparticle-launcher @@ -1591,7 +1516,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1825) (new 'static 'sparticle-launcher @@ -1629,7 +1553,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1832) (new 'static 'sparticle-launcher @@ -1664,7 +1587,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1831) (new 'static 'sparticle-launcher @@ -1698,7 +1620,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1841) (new 'static 'sparticle-launcher @@ -1711,7 +1632,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1830) (new 'static 'sparticle-launcher @@ -1747,7 +1667,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 491) (new 'static 'sparticle-launch-group @@ -1767,7 +1686,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 492) (new 'static 'sparticle-launch-group @@ -1787,7 +1705,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 493) (new 'static 'sparticle-launch-group @@ -1807,7 +1724,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1842) (new 'static 'sparticle-launcher @@ -1822,25 +1738,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1868,7 +1766,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1843) (new 'static 'sparticle-launcher @@ -1883,25 +1780,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1929,7 +1808,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1844) (new 'static 'sparticle-launcher @@ -1944,25 +1822,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1990,7 +1850,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1845) (new 'static 'sparticle-launcher @@ -2005,25 +1864,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -2051,7 +1892,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1846) (new 'static 'sparticle-launcher @@ -2066,25 +1906,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -2112,7 +1934,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 494) (new 'static 'sparticle-launch-group @@ -2132,7 +1953,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 495) (new 'static 'sparticle-launch-group @@ -2152,7 +1972,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 496) (new 'static 'sparticle-launch-group @@ -2172,7 +1991,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 497) (new 'static 'sparticle-launch-group @@ -2192,7 +2010,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 498) (new 'static 'sparticle-launch-group @@ -2212,7 +2029,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1847) (new 'static 'sparticle-launcher @@ -2227,25 +2043,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -2274,7 +2072,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 499) (new 'static 'sparticle-launch-group @@ -2304,7 +2101,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1851) (new 'static 'sparticle-launcher @@ -2337,7 +2133,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1853) (new 'static 'sparticle-launcher @@ -2364,7 +2159,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1852) (new 'static 'sparticle-launcher @@ -2393,7 +2187,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1850) (new 'static 'sparticle-launcher @@ -2421,7 +2214,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1856) (new 'static 'sparticle-launcher @@ -2433,7 +2225,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1855) (new 'static 'sparticle-launcher @@ -2447,7 +2238,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1857) (new 'static 'sparticle-launcher @@ -2462,7 +2252,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1858) (new 'static 'sparticle-launcher @@ -2476,7 +2265,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1848) (new 'static 'sparticle-launcher @@ -2500,7 +2288,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1849) (new 'static 'sparticle-launcher @@ -2526,7 +2313,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 500) (new 'static 'sparticle-launch-group @@ -2716,7 +2502,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1863) (new 'static 'sparticle-launcher @@ -2738,7 +2523,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1860) (new 'static 'sparticle-launcher @@ -2768,7 +2552,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1861) (new 'static 'sparticle-launcher @@ -2792,7 +2575,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1862) (new 'static 'sparticle-launcher @@ -2812,7 +2594,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1859) (new 'static 'sparticle-launcher @@ -2843,7 +2624,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 501) (new 'static 'sparticle-launch-group @@ -2860,7 +2640,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1864) (new 'static 'sparticle-launcher @@ -2894,7 +2673,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1866) (new 'static 'sparticle-launcher @@ -2906,7 +2684,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1865) (new 'static 'sparticle-launcher @@ -2932,7 +2709,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 502) (new 'static 'sparticle-launch-group @@ -2952,7 +2728,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1867) (new 'static 'sparticle-launcher @@ -2967,25 +2742,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -3013,7 +2770,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 503) (new 'static 'sparticle-launch-group @@ -3034,7 +2790,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1868) (new 'static 'sparticle-launcher @@ -3049,25 +2804,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x73 - #x74 - #x65 - #x61 - #x6d - #x2d - #x73 - #x68 - #x6f - #x72 - #x74 - #x0 - #x0 - #x0 - #x0 - #x0 - ) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) diff --git a/goal_src/levels/village_common/oracle.gc b/goal_src/levels/village_common/oracle.gc index ba88a47939..e82ed3a51f 100644 --- a/goal_src/levels/village_common/oracle.gc +++ b/goal_src/levels/village_common/oracle.gc @@ -7,7 +7,8 @@ (define-extern *oracle-sg* skeleton-group) -;; definition of type oracle +;; DECOMP BEGINS + (deftype oracle (process-taskable) ((first-task uint8 :offset-assert 380) (second-task uint8 :offset-assert 381) @@ -20,7 +21,7 @@ :flag-assert #x3501200190 ) -;; failed to figure out what this is: + (let ((v1-1 (new 'static 'skeleton-group @@ -37,529 +38,509 @@ (set! *oracle-sg* v1-1) ) -;; definition for method 32 of type oracle (defmethod play-anim! oracle ((obj oracle) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - ((2 3) - (when arg0 - (close-specific-task! - (the-as game-task (-> obj first-task)) - (task-status need-introduction) - ) - (close-specific-task! - (the-as game-task (-> obj second-task)) - (task-status need-introduction) - ) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-specific-task! + (the-as game-task (-> obj first-task)) + (task-status need-introduction) ) - (case (-> (level-get-target-inside *level*) name) - (('village1) - (new 'static 'spool-anim - :name "oracle-intro-1" - :index 9 - :parts 5 - :command-list '() - ) - ) - (('village2) - (new 'static 'spool-anim - :name "oracle-intro-2" - :index 11 - :parts 4 - :command-list - '( - (0 - kill - "pontoonten-20" - ) - (0 - kill - "pontoonten-19" - ) - (0 - kill - "pontoonten-18" - ) - (0 - kill - "pontoonten-15" - ) - (0 - kill - "pontoonten-14" - ) - (0 - kill - "pontoonfive-14" - ) - (0 - kill - "pontoonfive-15" - ) - (0 - kill - "pontoonfive-19" - ) - (0 - kill - "pontoonfive-20" - ) - (0 - kill - "med-res-level-12" - ) - (0 - kill - "med-res-level-13" - ) - (0 - kill - "med-res-level-15" - ) - (0 - kill - "money-2844" - ) - (0 - kill - "money-2845" - ) - (0 - kill - "money-2846" - ) - (0 - kill - "money-2847" - ) - (0 - kill - "money-2848" - ) - (0 - kill - "money-2849" - ) - (0 - kill - "money-2850" - ) - (0 - kill - "money-2854" - ) - (0 - kill - "money-2855" - ) - (0 - kill - "money-2856" - ) - (0 - kill - "money-2860" - ) - (0 - kill - "money-2861" - ) - (0 - kill - "money-2862" - ) - (0 - kill - "eco-27" - ) - (0 - kill - "eco-26" - ) - (0 - kill - "sharkey-25" - ) - (0 - kill - "barrel-13" - ) - (0 - kill - "barrel-14" - ) - (0 - kill - "barrel-15" - ) - (0 - kill - "barrel-16" - ) - (0 - kill - "barrel-17" - ) - (0 - kill - "barrel-18" - ) - (0 - kill - "barrel-19" - ) - (0 - kill - "barrel-20" - ) - (0 - kill - "barrel-21" - ) - (0 - kill - "barrel-22" - ) - (0 - kill - "barrel-23" - ) - (0 - kill - "villageb-part-18" - ) - (0 - kill - "villageb-part-19" - ) - (0 - kill - "villageb-part-20" - ) - (0 - kill - "villageb-part-21" - ) - (0 - kill - "villageb-part-28" - ) - (0 - kill - "villageb-part-29" - ) - (0 - kill - "villageb-part-30" - ) - (0 - kill - "villageb-part-31" - ) - (0 - kill - "villageb-part-32" - ) - (0 - kill - "villageb-part-33" - ) - (0 - kill - "villageb-part-35" - ) - (0 - kill - "villageb-part-37" - ) - (0 - kill - "villageb-part-38" - ) - (0 - kill - "villageb-part-47" - ) - (0 - kill - "villageb-part-48" - ) - (0 - kill - "villageb-part-49" - ) - (0 - kill - "villageb-part-50" - ) - (0 - kill - "villageb-part-56" - ) - (0 - kill - "villageb-part-62" - ) - (0 - kill - "villageb-part-63" - ) - (0 - kill - "villageb-ogreboss-1" - ) - (0 - kill - "crate-3127" - ) - (0 - kill - "crate-3128" - ) - (0 - kill - "crate-3129" - ) - (0 - kill - "crate-3133" - ) - (0 - kill - "geologist-1" - ) - (0 - kill - "fireboulder-2" - ) - (0 - kill - "fireboulder-3" - ) - (0 - kill - "fireboulder-4" - ) - (0 - kill - "water-vol-100" - ) - (0 - kill - "water-vol-101" - ) - (0 - kill - "water-vol-102" - ) - (0 - kill - "water-vol-103" - ) - (0 - kill - "water-vol-284" - ) - (0 - kill - "water-vol-285" - ) - (0 - kill - "water-vol-286" - ) - (0 - kill - "ceilingflag-6" - ) - (0 - kill - "ceilingflag-7" - ) - (0 - kill - "ceilingflag-8" - ) - (0 - kill - "ceilingflag-9" - ) - (0 - kill - "orb-cache-top-14" - ) - (0 - setting-reset - ocean-off - near - ) - ((the binteger 399) setting-unset ocean-off) - ) - ) - ) - (('village3) - (new 'static 'spool-anim - :name "oracle-intro-3" - :index 13 - :parts 4 - :command-list '() - ) - ) + (close-specific-task! + (the-as game-task (-> obj second-task)) + (task-status need-introduction) ) ) - ((5) - (set! (-> obj skippable) #t) (case (-> (level-get-target-inside *level*) name) (('village1) (new 'static 'spool-anim - :name "oracle-reminder-1" - :index 10 - :parts 4 + :name "oracle-intro-1" + :index 9 + :parts 5 :command-list '() ) ) (('village2) (new 'static 'spool-anim - :name "oracle-reminder-2" - :index 12 - :parts 2 - :command-list '() + :name "oracle-intro-2" + :index 11 + :parts 4 + :command-list + '( + (0 + kill + "pontoonten-20" + ) + (0 + kill + "pontoonten-19" + ) + (0 + kill + "pontoonten-18" + ) + (0 + kill + "pontoonten-15" + ) + (0 + kill + "pontoonten-14" + ) + (0 + kill + "pontoonfive-14" + ) + (0 + kill + "pontoonfive-15" + ) + (0 + kill + "pontoonfive-19" + ) + (0 + kill + "pontoonfive-20" + ) + (0 + kill + "med-res-level-12" + ) + (0 + kill + "med-res-level-13" + ) + (0 + kill + "med-res-level-15" + ) + (0 + kill + "money-2844" + ) + (0 + kill + "money-2845" + ) + (0 + kill + "money-2846" + ) + (0 + kill + "money-2847" + ) + (0 + kill + "money-2848" + ) + (0 + kill + "money-2849" + ) + (0 + kill + "money-2850" + ) + (0 + kill + "money-2854" + ) + (0 + kill + "money-2855" + ) + (0 + kill + "money-2856" + ) + (0 + kill + "money-2860" + ) + (0 + kill + "money-2861" + ) + (0 + kill + "money-2862" + ) + (0 + kill + "eco-27" + ) + (0 + kill + "eco-26" + ) + (0 + kill + "sharkey-25" + ) + (0 + kill + "barrel-13" + ) + (0 + kill + "barrel-14" + ) + (0 + kill + "barrel-15" + ) + (0 + kill + "barrel-16" + ) + (0 + kill + "barrel-17" + ) + (0 + kill + "barrel-18" + ) + (0 + kill + "barrel-19" + ) + (0 + kill + "barrel-20" + ) + (0 + kill + "barrel-21" + ) + (0 + kill + "barrel-22" + ) + (0 + kill + "barrel-23" + ) + (0 + kill + "villageb-part-18" + ) + (0 + kill + "villageb-part-19" + ) + (0 + kill + "villageb-part-20" + ) + (0 + kill + "villageb-part-21" + ) + (0 + kill + "villageb-part-28" + ) + (0 + kill + "villageb-part-29" + ) + (0 + kill + "villageb-part-30" + ) + (0 + kill + "villageb-part-31" + ) + (0 + kill + "villageb-part-32" + ) + (0 + kill + "villageb-part-33" + ) + (0 + kill + "villageb-part-35" + ) + (0 + kill + "villageb-part-37" + ) + (0 + kill + "villageb-part-38" + ) + (0 + kill + "villageb-part-47" + ) + (0 + kill + "villageb-part-48" + ) + (0 + kill + "villageb-part-49" + ) + (0 + kill + "villageb-part-50" + ) + (0 + kill + "villageb-part-56" + ) + (0 + kill + "villageb-part-62" + ) + (0 + kill + "villageb-part-63" + ) + (0 + kill + "villageb-ogreboss-1" + ) + (0 + kill + "crate-3127" + ) + (0 + kill + "crate-3128" + ) + (0 + kill + "crate-3129" + ) + (0 + kill + "crate-3133" + ) + (0 + kill + "geologist-1" + ) + (0 + kill + "fireboulder-2" + ) + (0 + kill + "fireboulder-3" + ) + (0 + kill + "fireboulder-4" + ) + (0 + kill + "water-vol-100" + ) + (0 + kill + "water-vol-101" + ) + (0 + kill + "water-vol-102" + ) + (0 + kill + "water-vol-103" + ) + (0 + kill + "water-vol-284" + ) + (0 + kill + "water-vol-285" + ) + (0 + kill + "water-vol-286" + ) + (0 + kill + "ceilingflag-6" + ) + (0 + kill + "ceilingflag-7" + ) + (0 + kill + "ceilingflag-8" + ) + (0 + kill + "ceilingflag-9" + ) + (0 + kill + "orb-cache-top-14" + ) + (0 + setting-reset + ocean-off + near + ) + ((the binteger 399) setting-unset ocean-off) + ) ) ) (('village3) (new 'static 'spool-anim - :name "oracle-reminder-3" - :index 14 - :parts 2 + :name "oracle-intro-3" + :index 13 + :parts 4 :command-list '() ) ) ) ) - ((6) - (cond - (arg0 - (set! - (-> obj cell-for-task) - (the-as game-task (current-task (-> obj tasks))) - ) - (close-current! (-> obj tasks)) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 2) - (set! (-> a1-5 message) 'get-pickup) - (set! (-> a1-5 param 0) (the-as uint 5)) - (set! - (-> a1-5 param 1) - (the-as uint (- (-> *GAME-bank* money-oracle-inc))) - ) - (send-event-function *target* a1-5) - ) - (cond - ((= (current-task (-> obj tasks)) (-> obj first-task)) - (let ((a0-25 (handle->process (-> obj right-eye-cell)))) - (if a0-25 - (deactivate a0-25) - ) - ) - ) - (else - (let ((a0-29 (handle->process (-> obj left-eye-cell)))) - (if a0-29 - (deactivate a0-29) - ) - ) - ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (case (-> (level-get-target-inside *level*) name) + (('village1) + (new 'static 'spool-anim + :name "oracle-reminder-1" + :index 10 + :parts 4 + :command-list '() ) ) - (else - (set! (-> obj will-talk) #t) - (set! (-> obj talk-message) (the-as uint 283)) + (('village2) + (new 'static 'spool-anim + :name "oracle-reminder-2" + :index 12 + :parts 2 + :command-list '() ) ) - (cond - ((= (current-task (-> obj tasks)) (-> obj first-task)) - (case (-> (level-get-target-inside *level*) name) - (('village1) - (new 'static 'spool-anim - :name "oracle-right-eye-1" - :index 3 - :parts 2 - :command-list '() - ) - ) - (('village2) - (new 'static 'spool-anim - :name "oracle-right-eye-2" - :index 5 - :parts 2 - :command-list '() + (('village3) + (new 'static 'spool-anim + :name "oracle-reminder-3" + :index 14 + :parts 2 + :command-list '() + ) + ) + ) + ) + (((task-status need-reward-speech)) + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-oracle-inc))) + (cond + ((= (current-task (-> obj tasks)) (-> obj first-task)) + (let ((a0-25 (handle->process (-> obj right-eye-cell)))) + (if a0-25 + (deactivate a0-25) ) ) - (('village3) - (new 'static 'spool-anim - :name "oracle-right-eye-3" - :index 7 - :parts 2 - :command-list '() + ) + (else + (let ((a0-29 (handle->process (-> obj left-eye-cell)))) + (if a0-29 + (deactivate a0-29) ) ) ) ) - (else - (case (-> (level-get-target-inside *level*) name) - (('village1) - (new 'static 'spool-anim - :name "oracle-left-eye-1" - :index 4 - :parts 2 - :command-list '() - ) - ) - (('village2) + ) + (else + (set! (-> obj will-talk) #t) + (set! (-> obj talk-message) (the-as uint 283)) + ) + ) + (cond + ((= (current-task (-> obj tasks)) (-> obj first-task)) + (case (-> (level-get-target-inside *level*) name) + (('village1) (new 'static 'spool-anim - :name "oracle-left-eye-2" - :index 6 + :name "oracle-right-eye-1" + :index 3 :parts 2 :command-list '() ) ) - (('village3) + (('village2) + (new 'static 'spool-anim + :name "oracle-right-eye-2" + :index 5 + :parts 2 + :command-list '() + ) + ) + (('village3) + (new 'static 'spool-anim + :name "oracle-right-eye-3" + :index 7 + :parts 2 + :command-list '() + ) + ) + ) + ) + (else + (case (-> (level-get-target-inside *level*) name) + (('village1) (new 'static 'spool-anim - :name "oracle-left-eye-3" - :index 8 + :name "oracle-left-eye-1" + :index 4 :parts 2 :command-list '() ) ) + (('village2) + (new 'static 'spool-anim + :name "oracle-left-eye-2" + :index 6 + :parts 2 + :command-list '() + ) + ) + (('village3) + (new 'static 'spool-anim + :name "oracle-left-eye-3" + :index 8 + :parts 2 + :command-list '() + ) ) ) ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string - (the-as task-status (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 2) ) + (-> obj draw art-group data 2) ) ) ) -;; definition for method 31 of type oracle (defmethod get-art-elem oracle ((obj oracle)) (-> obj draw art-group data 2) ) -;; failed to figure out what this is: (defstate idle (oracle) :virtual #t :exit @@ -576,190 +557,100 @@ ) ) -;; definition for method 11 of type oracle (defmethod copy-defaults! oracle ((obj oracle) (arg0 res-lump)) - (with-pp - (dummy-40 - obj - arg0 - *oracle-sg* - 3 - 4 - (new 'static 'vector :y -4096.0 :w 4096.0) - -1 - ) - (set! - (-> obj sound) - (new - 'process - 'ambient-sound - (new 'static 'sound-spec - :mask #x80 - :num 1.0 - :group #x1 - :sound-name-char - (new 'static 'array uint8 16 - #x6f - #x72 - #x61 - #x63 - #x6c - #x65 - #x2d - #x73 - #x6c - #x65 - #x65 - #x70 - #x0 - #x0 - #x0 - #x0 - ) - :volume #x400 - :fo-max 50 - ) - (-> obj root trans) + (dummy-40 + obj + arg0 + *oracle-sg* + 3 + 4 + (new 'static 'vector :y -4096.0 :w 4096.0) + -1 + ) + (set! + (-> obj sound) + (new + 'process + 'ambient-sound + (new 'static 'sound-spec + :mask #x80 + :num 1.0 + :group #x1 + :sound-name (static-sound-name "oracle-sleep") + :volume #x400 + :fo-max 50 ) + (-> obj root-override trans) ) - (set! (-> obj first-task) (the-as uint (-> arg0 extra perm task))) - (set! (-> obj second-task) (res-lump-value arg0 'alt-task uint)) - (set! - (-> obj tasks) - (get-task-control (the-as game-task (-> obj first-task))) - ) - (set! (-> obj right-eye-cell) (the-as handle #f)) - (set! (-> obj left-eye-cell) (the-as handle #f)) - (logior! (-> obj draw status) 32) - (let ((s4-0 (new 'stack-no-clear 'vector)) - (s5-1 (lambda :behavior oracle () (let* ((gp-0 (-> self root)) - (v1-1 - (if - (and - (nonzero? gp-0) - (type-type? - (-> gp-0 type) - collide-shape - ) + ) + (set! (-> obj first-task) (the-as uint (-> arg0 extra perm task))) + (set! (-> obj second-task) (res-lump-value arg0 'alt-task uint)) + (set! + (-> obj tasks) + (get-task-control (the-as game-task (-> obj first-task))) + ) + (set! (-> obj right-eye-cell) (the-as handle #f)) + (set! (-> obj left-eye-cell) (the-as handle #f)) + (logior! (-> obj draw status) 32) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-1 (lambda :behavior oracle () (let* ((gp-0 (-> self root-override)) + (v1-1 + (if + (and + (nonzero? gp-0) + (type-type? + (-> gp-0 type) + collide-shape ) - gp-0 ) - ) - (a1-1 (if v1-1 - (-> - (the-as - collide-shape - v1-1 - ) - root-prim - prim-core - ) - (-> self root trans) - ) + gp-0 ) ) - (spawn - (-> self part) - (the-as vector a1-1) - ) + (a1-1 (if v1-1 + (-> + v1-1 + root-prim + prim-core + ) + (-> + self + root-override + trans + ) + ) + ) + ) + (spawn + (-> self part) + (the-as vector a1-1) ) - 0 - (none) - ) - ) - ) - (ja-post) - (when - (not - (task-closed? - (the-as game-task (-> obj first-task)) - (task-status need-resolution) - ) - ) - (vector<-cspace! s4-0 (-> obj node-list data 5)) - (let ((s3-0 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj right-eye-cell) (ppointer->handle (when s3-0 - (let - ((t9-8 - (method-of-type - manipy - activate - ) - ) - ) - (t9-8 - (the-as manipy s3-0) - obj - 'manipy - (the-as - pointer - #x70004000 - ) - ) - ) - (run-now-in-process - s3-0 - manipy-init - s4-0 - (-> obj entity) - *fuel-cell-sg* - (new 'static 'vector - :w 4915.2 - ) - ) - (-> s3-0 ppointer) - ) - ) - ) - ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'eval) - (set! - (-> a1-9 param 0) - (the-as - uint - (lambda :behavior oracle - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) - (set! (-> self part) v0-0) - (the-as sparticle-launch-group v0-0) - ) + ) + 0 + (none) + ) ) ) - ) - (send-event-function (handle->process (-> obj right-eye-cell)) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'trans-hook) - (set! (-> a1-10 param 0) (the-as uint s5-1)) - (send-event-function (handle->process (-> obj right-eye-cell)) a1-10) + (ja-post) + (when + (not + (task-closed? + (the-as game-task (-> obj first-task)) + (task-status need-resolution) ) ) - (when - (not - (task-closed? - (the-as game-task (-> obj second-task)) - (task-status need-resolution) - ) - ) - (vector<-cspace! s4-0 (-> obj node-list data 6)) - (let ((s3-1 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj left-eye-cell) (ppointer->handle (when s3-1 + (vector<-cspace! s4-0 (-> obj node-list data 5)) + (let ((s3-0 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj right-eye-cell) (ppointer->handle (when s3-0 (let - ((t9-15 + ((t9-8 (method-of-type manipy activate ) ) ) - (t9-15 - (the-as manipy s3-1) + (t9-8 + (the-as manipy s3-0) obj 'manipy (the-as @@ -769,7 +660,7 @@ ) ) (run-now-in-process - s3-1 + s3-0 manipy-init s4-0 (-> obj entity) @@ -778,43 +669,83 @@ :w 4915.2 ) ) - (-> s3-1 ppointer) + (-> s3-0 ppointer) ) ) - ) - ) - (let ((a1-16 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-16 from) pp) - (set! (-> a1-16 num-params) 1) - (set! (-> a1-16 message) 'eval) - (set! - (-> a1-16 param 0) - (the-as - uint - (lambda :behavior oracle - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) - (set! (-> self part) v0-0) - (the-as sparticle-launch-group v0-0) - ) - ) - ) - ) - (send-event-function (handle->process (-> obj left-eye-cell)) a1-16) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'trans-hook) - (set! (-> a1-17 param 0) (the-as uint s5-1)) - (send-event-function (handle->process (-> obj left-eye-cell)) a1-17) ) ) + (send-event + (handle->process (-> obj right-eye-cell)) + 'eval + (lambda :behavior oracle + () + (let ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) + (set! (-> self part) v0-0) + (the-as sparticle-launch-group v0-0) + ) + ) + ) + (send-event (handle->process (-> obj right-eye-cell)) 'trans-hook s5-1) + ) + (when + (not + (task-closed? + (the-as game-task (-> obj second-task)) + (task-status need-resolution) + ) + ) + (vector<-cspace! s4-0 (-> obj node-list data 6)) + (let ((s3-1 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj left-eye-cell) (ppointer->handle (when s3-1 + (let + ((t9-15 + (method-of-type + manipy + activate + ) + ) + ) + (t9-15 + (the-as manipy s3-1) + obj + 'manipy + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s3-1 + manipy-init + s4-0 + (-> obj entity) + *fuel-cell-sg* + (new 'static 'vector + :w 4915.2 + ) + ) + (-> s3-1 ppointer) + ) + ) + ) + ) + (send-event + (handle->process (-> obj left-eye-cell)) + 'eval + (lambda :behavior oracle + () + (let ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) + (set! (-> self part) v0-0) + (the-as sparticle-launch-group v0-0) + ) + ) + ) + (send-event (handle->process (-> obj left-eye-cell)) 'trans-hook s5-1) ) - (dummy-42 obj) - (none) ) + (dummy-42 obj) + (none) ) diff --git a/test/decompiler/reference/decompiler-macros.gc b/test/decompiler/reference/decompiler-macros.gc index d8ac32995d..5b3c3ea957 100644 --- a/test/decompiler/reference/decompiler-macros.gc +++ b/test/decompiler/reference/decompiler-macros.gc @@ -762,3 +762,19 @@ (set! ,dest ,src) ) ) + +(defmacro send-event (proc msg &rest params) + "Send an event to a process. This should be used over send-event-function" + + `(with-pp + (let ((event-data (new 'stack-no-clear 'event-message-block))) + (set! (-> event-data from) pp) + (set! (-> event-data num-params) ,(length params)) + (set! (-> event-data message) ,msg) + ,@(let ((ep 0)) + (apply (lambda (x) `(set! (-> event-data param ep) (the-as uint ,x)) (inc! ep)) params) + ) + (send-event-function ,proc event-data) + ) + ) + ) \ No newline at end of file diff --git a/test/decompiler/reference/engine/ambient/weather-part_REF.gc b/test/decompiler/reference/engine/ambient/weather-part_REF.gc index cc717fffeb..919e046514 100644 --- a/test/decompiler/reference/engine/ambient/weather-part_REF.gc +++ b/test/decompiler/reference/engine/ambient/weather-part_REF.gc @@ -691,74 +691,65 @@ ;; definition for function update-rain ;; INFO: Return type mismatch int vs none. (defun update-rain ((arg0 target)) - (with-pp - (let ((a2-0 (new 'stack-no-clear 'vector))) - (set! (-> a2-0 x) (-> arg0 control transv x)) - (set! (-> a2-0 y) 0.0) - (set! (-> a2-0 z) (-> arg0 control transv z)) - (set! (-> a2-0 w) 1.0) - (let - ((gp-0 - (vector+float*! - (new 'stack-no-clear 'vector) - (-> arg0 control trans) - a2-0 - 0.0 - ) + (let ((a2-0 (new 'stack-no-clear 'vector))) + (set! (-> a2-0 x) (-> arg0 control transv x)) + (set! (-> a2-0 y) 0.0) + (set! (-> a2-0 z) (-> arg0 control transv z)) + (set! (-> a2-0 w) 1.0) + (let + ((gp-0 + (vector+float*! + (new 'stack-no-clear 'vector) + (-> arg0 control trans) + a2-0 + 0.0 ) ) - (let* ((s5-0 (matrix-local->world #f #f)) - (f28-0 - (lerp-scale 122.88 245.76 (fabs (-> s5-0 vector 2 y)) 0.0 0.7) - ) - (f30-0 - (lerp-scale 2048.0 245.76 (fabs (-> s5-0 vector 2 y)) 0.0 0.7) - ) - ) - (let ((f26-0 (lerp-scale 0.0 0.1 (-> s5-0 vector 2 y) 0.3 0.7)) - (f0-10 (lerp-scale 1.0 0.1 (-> s5-0 vector 2 y) 0.3 0.7)) - ) - (when (< 0.0 f26-0) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 2) - (set! (-> a1-6 message) 'part-water-drip) - (set! (-> a1-6 param 0) (the-as uint f26-0)) - (set! (-> a1-6 param 1) (the-as uint f0-10)) - (send-event-function *camera* a1-6) - ) - ) - ) - (set! (-> *part-id-table* 37 init-specs 4 initial-valuef) f28-0) - (set! (-> *part-id-table* 37 init-specs 4 random-rangef) f28-0) - (set! (-> *part-id-table* 38 init-specs 4 initial-valuef) f28-0) - (set! (-> *part-id-table* 38 init-specs 4 random-rangef) f28-0) - (set! (-> *part-id-table* 37 init-specs 5 initial-valuef) f30-0) - (set! (-> *part-id-table* 37 init-specs 5 random-rangef) f30-0) - (set! (-> *part-id-table* 38 init-specs 5 initial-valuef) f30-0) - (set! (-> *part-id-table* 38 init-specs 5 random-rangef) f30-0) - ) - (sp-launch-particles-var - *sp-particle-system-2d* - (-> *part-id-table* 37) - gp-0 - (the-as sparticle-launch-state #f) - (the-as sparticle-launch-control #f) - 1.0 - ) - (sp-launch-particles-var - *sp-particle-system-2d* - (-> *part-id-table* 38) - gp-0 - (the-as sparticle-launch-state #f) - (the-as sparticle-launch-control #f) - 1.0 - ) + ) + (let* ((s5-0 (matrix-local->world #f #f)) + (f28-0 + (lerp-scale 122.88 245.76 (fabs (-> s5-0 vector 2 y)) 0.0 0.7) + ) + (f30-0 + (lerp-scale 2048.0 245.76 (fabs (-> s5-0 vector 2 y)) 0.0 0.7) + ) + ) + (let ((f26-0 (lerp-scale 0.0 0.1 (-> s5-0 vector 2 y) 0.3 0.7)) + (f0-10 (lerp-scale 1.0 0.1 (-> s5-0 vector 2 y) 0.3 0.7)) + ) + (if (< 0.0 f26-0) + (send-event *camera* 'part-water-drip f26-0 f0-10) + ) + ) + (set! (-> *part-id-table* 37 init-specs 4 initial-valuef) f28-0) + (set! (-> *part-id-table* 37 init-specs 4 random-rangef) f28-0) + (set! (-> *part-id-table* 38 init-specs 4 initial-valuef) f28-0) + (set! (-> *part-id-table* 38 init-specs 4 random-rangef) f28-0) + (set! (-> *part-id-table* 37 init-specs 5 initial-valuef) f30-0) + (set! (-> *part-id-table* 37 init-specs 5 random-rangef) f30-0) + (set! (-> *part-id-table* 38 init-specs 5 initial-valuef) f30-0) + (set! (-> *part-id-table* 38 init-specs 5 random-rangef) f30-0) + ) + (sp-launch-particles-var + *sp-particle-system-2d* + (-> *part-id-table* 37) + gp-0 + (the-as sparticle-launch-state #f) + (the-as sparticle-launch-control #f) + 1.0 + ) + (sp-launch-particles-var + *sp-particle-system-2d* + (-> *part-id-table* 38) + gp-0 + (the-as sparticle-launch-state #f) + (the-as sparticle-launch-control #f) + 1.0 ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function cam-master-effect diff --git a/test/decompiler/reference/engine/camera/cam-interface_REF.gc b/test/decompiler/reference/engine/camera/cam-interface_REF.gc index 1f91f317b3..82b7952dbc 100644 --- a/test/decompiler/reference/engine/camera/cam-interface_REF.gc +++ b/test/decompiler/reference/engine/camera/cam-interface_REF.gc @@ -65,13 +65,7 @@ ) (quaternion-copy! (-> gp-0 quat) (-> arg0 quat)) (vector-identity! (-> gp-0 scale)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'teleport-to-transformq) - (set! (-> a1-2 param 0) (the-as uint gp-0)) - (send-event-function *camera* a1-2) - ) + (send-event *camera* 'teleport-to-transformq gp-0) ) 0 (none) diff --git a/test/decompiler/reference/engine/debug/anim-tester_REF.gc b/test/decompiler/reference/engine/debug/anim-tester_REF.gc index 72254bd43d..70ce19a7a2 100644 --- a/test/decompiler/reference/engine/debug/anim-tester_REF.gc +++ b/test/decompiler/reference/engine/debug/anim-tester_REF.gc @@ -1304,580 +1304,550 @@ ;; definition for function anim-test-obj-list-handler (defun anim-test-obj-list-handler ((arg0 int) (arg1 list-control)) - (with-pp - (let ((s5-0 (-> arg1 the-node)) - (v1-0 arg0) - ) - (cond - ((zero? v1-0) - (let* - ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-0 (-> s3-0 base)) - ) - (let ((s2-0 draw-string-xy)) - (format - (clear *temp-string*) - "~S~S~S" - (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - ">" - " " - ) - (if (logtest? (-> (the-as anim-test-obj s5-0) flags) 1) - "*" - " " - ) - (-> (the-as anim-test-obj s5-0) privname) - ) - (s2-0 - *temp-string* - s3-0 - (-> arg1 xpos) - (-> arg1 ypos) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) - ) - ) - (let ((a3-2 (-> s3-0 base))) - (let ((v1-8 (the-as object (-> s3-0 base)))) - (set! - (-> (the-as dma-packet v1-8) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) - (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-0 - (the-as (pointer dma-tag) a3-2) - ) + (let ((s5-0 (-> arg1 the-node)) + (v1-0 arg0) ) + (cond + ((zero? v1-0) + (let* + ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-0 (-> s3-0 base)) ) - ) - ((= v1-0 1) - (return #t) - ) - ((= v1-0 4) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (if (> (-> arg1 highlight-index) 0) - (+! (-> arg1 highlight-index) -1) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~S~S~S" + (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + ">" + " " ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (if (< (-> arg1 highlight-index) (glst-num-elements (-> arg1 list))) - (+! (-> arg1 highlight-index) 1) + (if (logtest? (-> (the-as anim-test-obj s5-0) flags) 1) + "*" + " " ) + (-> (the-as anim-test-obj s5-0) privname) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (let ((v1-38 (the-as object (-> arg1 list-owner)))) - (set! (-> arg1 current-index) (-> arg1 the-index)) - (set! - (-> (the-as anim-tester v1-38) current-obj) - (-> (the-as anim-test-obj s5-0) privname) - ) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'reset) - (set! (-> a1-4 param 0) (the-as uint #f)) - (send-event-function (ppointer->process *anim-tester*) a1-4) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (set! (-> *debug-menu-context* is-hidden) #f) - (set! (-> *anim-tester* 0 edit-mode) 0) - (set! *camera-read-buttons* #t) - (logior! (-> *anim-tester* 0 flags) 4) - ) - ) - ) - ((= v1-0 2) - (let ((v1-64 (+ (length (-> (the-as anim-test-obj s5-0) privname)) 2))) - (set! v1-64 (cond - ((< (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) v1-64) - (empty) - v1-64 - ) - (else - (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) - ) - ) - ) - (set! (-> arg1 return-int) v1-64) - ) - ) - ((= v1-0 3) - (let* - ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s5-2 (-> s4-1 base)) - ) - (draw-string-xy - "----pick-object---" - s4-1 + (s2-0 + *temp-string* + s3-0 (-> arg1 xpos) (-> arg1 ypos) - (font-color dim-white) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) + ) (font-flags shadow kerning) ) - (let ((a3-4 (-> s4-1 base))) - (let ((v1-70 (the-as object (-> s4-1 base)))) - (set! - (-> (the-as dma-packet v1-70) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) - (set! (-> s4-1 base) (&+ (the-as pointer v1-70) 16)) + ) + (let ((a3-2 (-> s3-0 base))) + (let ((v1-8 (the-as object (-> s3-0 base)))) + (set! + (-> (the-as dma-packet v1-8) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s5-2 - (the-as (pointer dma-tag) a3-4) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-2) + ) + ) + ) + ) + ((= v1-0 1) + (return #t) + ) + ((= v1-0 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (if (> (-> arg1 highlight-index) 0) + (+! (-> arg1 highlight-index) -1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (if (< (-> arg1 highlight-index) (glst-num-elements (-> arg1 list))) + (+! (-> arg1 highlight-index) 1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (let ((v1-38 (the-as object (-> arg1 list-owner)))) + (set! (-> arg1 current-index) (-> arg1 the-index)) + (set! + (-> (the-as anim-tester v1-38) current-obj) + (-> (the-as anim-test-obj s5-0) privname) ) ) + (send-event (ppointer->process *anim-tester*) 'reset #f) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *debug-menu-context* is-hidden) #f) + (set! (-> *anim-tester* 0 edit-mode) 0) + (set! *camera-read-buttons* #t) + (logior! (-> *anim-tester* 0 flags) 4) + ) + ) + ) + ((= v1-0 2) + (let ((v1-64 (+ (length (-> (the-as anim-test-obj s5-0) privname)) 2))) + (set! v1-64 (cond + ((< (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) v1-64) + (empty) + v1-64 + ) + (else + (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) + ) + ) + ) + (set! (-> arg1 return-int) v1-64) + ) + ) + ((= v1-0 3) + (let* + ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s5-2 (-> s4-1 base)) + ) + (draw-string-xy + "----pick-object---" + s4-1 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-4 (-> s4-1 base))) + (let ((v1-70 (the-as object (-> s4-1 base)))) + (set! + (-> (the-as dma-packet v1-70) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-70) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s5-2 + (the-as (pointer dma-tag) a3-4) + ) ) ) ) ) - #f ) + #f ) ;; definition for function anim-test-anim-list-handler (defun anim-test-anim-list-handler ((arg0 int) (arg1 list-control)) - (with-pp - (let* ((s5-0 (the-as anim-test-obj (-> arg1 the-node))) - (v1-0 (the-as object (-> s5-0 list-con user-info-u))) - ) - (cond - ((zero? arg0) - (let* - ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-0 (-> s3-0 base)) + (let* ((s5-0 (the-as anim-test-obj (-> arg1 the-node))) + (v1-0 (the-as object (-> s5-0 list-con user-info-u))) + ) + (cond + ((zero? arg0) + (let* + ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-0 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~S~S" + (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + "> " + " " + ) + (-> s5-0 privname) ) - (let ((s2-0 draw-string-xy)) - (format - (clear *temp-string*) - "~S~S" - (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - "> " - " " - ) - (-> s5-0 privname) - ) - (s2-0 - *temp-string* - s3-0 - (-> arg1 xpos) - (-> arg1 ypos) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) + (s2-0 + *temp-string* + s3-0 + (-> arg1 xpos) + (-> arg1 ypos) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) ) + (font-flags shadow kerning) ) - (let ((a3-2 (-> s3-0 base))) - (let ((v1-6 (the-as object (-> s3-0 base)))) - (set! - (-> (the-as dma-packet v1-6) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag)) - (set! (-> s3-0 base) (&+ (the-as pointer v1-6) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-0 - (the-as (pointer dma-tag) a3-2) + ) + (let ((a3-2 (-> s3-0 base))) + (let ((v1-6 (the-as object (-> s3-0 base)))) + (set! + (-> (the-as dma-packet v1-6) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) + (set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-6) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-2) ) ) ) - ((= arg0 1) - (return (zero? (logand (-> s5-0 flags) 1))) - ) - ((= arg0 4) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((v1-15 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-15 tailpred) v1-15)) - (let - ((v1-17 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + ) + ((= arg0 1) + (return (zero? (logand (-> s5-0 flags) 1))) + ) + ((= arg0 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (let ((v1-15 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-15 tailpred) v1-15)) + (let + ((v1-17 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the previous node in the list" - (set! v1-17 (-> (the-as anim-test-obj v1-17) prev)) - (let ((a0-23 (the-as anim-test-obj v1-17))) - "is this node the start of the list. #t = start" - (if (not (-> a0-23 prev)) - (goto cfg-25) - ) - ) - (when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1)) - (set! - (-> arg1 highlight-index) - (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-17)) - ) + ) + (while #t + "return the previous node in the list" + (set! v1-17 (-> (the-as anim-test-obj v1-17) prev)) + (let ((a0-23 (the-as anim-test-obj v1-17))) + "is this node the start of the list. #t = start" + (if (not (-> a0-23 prev)) (goto cfg-25) ) ) + (when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1)) + (set! + (-> arg1 highlight-index) + (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-17)) + ) + (goto cfg-25) + ) ) ) ) - (label cfg-25) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (let ((v1-21 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-21 tailpred) v1-21)) - (let - ((v1-23 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + (label cfg-25) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (let ((v1-21 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-21 tailpred) v1-21)) + (let + ((v1-23 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the next node in the list" - (set! v1-23 (-> (the-as anim-test-obj v1-23) next)) - (let ((a0-40 (the-as anim-test-obj v1-23))) - "is this node the end of the list. #t = end" - (if (not (-> a0-40 next)) - (goto cfg-39) - ) - ) - (when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1)) - (set! - (-> arg1 highlight-index) - (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-23)) - ) + ) + (while #t + "return the next node in the list" + (set! v1-23 (-> (the-as anim-test-obj v1-23) next)) + (let ((a0-40 (the-as anim-test-obj v1-23))) + "is this node the end of the list. #t = end" + (if (not (-> a0-40 next)) (goto cfg-39) ) ) + (when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1)) + (set! + (-> arg1 highlight-index) + (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-23)) + ) + (goto cfg-39) + ) ) ) ) - (label cfg-39) - ) - ((= (-> arg1 user-info) 1) - ) - (else - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (set! (-> arg1 current-index) (-> arg1 the-index)) - (set! - (-> (the-as anim-test-obj v1-0) anim-index) - (-> arg1 current-index) - ) - (set! - (-> (the-as anim-test-obj v1-0) anim-hindex) - (-> arg1 highlight-index) - ) - (set! - (-> (the-as anim-test-obj v1-0) flags) - (logand -3 (-> (the-as anim-test-obj v1-0) flags)) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'change-anim) - (set! (-> a1-17 param 0) (the-as uint #f)) - (send-event-function (ppointer->process *anim-tester*) a1-17) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons square) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons square) - ) - (set! (-> *debug-menu-context* is-hidden) #f) - (set! (-> *anim-tester* 0 edit-mode) 0) - (set! *camera-read-buttons* #t) - (logior! (-> *anim-tester* 0 flags) 4) - ) - ) ) + (label cfg-39) ) - ) - ((= arg0 2) - (let ((v1-55 (+ (length (-> s5-0 privname)) 2))) - (set! v1-55 (cond - ((< (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) v1-55) - (empty) - v1-55 - ) - (else - (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) - ) - ) - ) - (set! (-> arg1 return-int) v1-55) + ((= (-> arg1 user-info) 1) ) - ) - ((= arg0 3) - (let* - ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s5-1 (-> s4-1 base)) - ) - (draw-string-xy - "----pick-joint-anim----" - s4-1 - (-> arg1 xpos) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - (let ((a3-4 (-> s4-1 base))) - (let ((v1-62 (the-as object (-> s4-1 base)))) + (else + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (set! (-> arg1 current-index) (-> arg1 the-index)) (set! - (-> (the-as dma-packet v1-62) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) + (-> (the-as anim-test-obj v1-0) anim-index) + (-> arg1 current-index) ) - (set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag)) - (set! (-> s4-1 base) (&+ (the-as pointer v1-62) 16)) + (set! + (-> (the-as anim-test-obj v1-0) anim-hindex) + (-> arg1 highlight-index) + ) + (set! + (-> (the-as anim-test-obj v1-0) flags) + (logand -3 (-> (the-as anim-test-obj v1-0) flags)) + ) + (send-event (ppointer->process *anim-tester*) 'change-anim #f) ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s5-1 - (the-as (pointer dma-tag) a3-4) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *debug-menu-context* is-hidden) #f) + (set! (-> *anim-tester* 0 edit-mode) 0) + (set! *camera-read-buttons* #t) + (logior! (-> *anim-tester* 0 flags) 4) ) ) ) ) ) + ((= arg0 2) + (let ((v1-55 (+ (length (-> s5-0 privname)) 2))) + (set! v1-55 (cond + ((< (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) v1-55) + (empty) + v1-55 + ) + (else + (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) + ) + ) + ) + (set! (-> arg1 return-int) v1-55) + ) + ) + ((= arg0 3) + (let* + ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s5-1 (-> s4-1 base)) + ) + (draw-string-xy + "----pick-joint-anim----" + s4-1 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-4 (-> s4-1 base))) + (let ((v1-62 (the-as object (-> s4-1 base)))) + (set! + (-> (the-as dma-packet v1-62) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-62) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s5-1 + (the-as (pointer dma-tag) a3-4) + ) + ) + ) + ) ) - #f ) + #f ) ;; definition for function anim-test-sequence-list-handler (defun anim-test-sequence-list-handler ((arg0 int) (arg1 list-control)) - (with-pp - (let* ((s5-0 (the-as anim-test-sequence (-> arg1 the-node))) - (v1-0 (-> s5-0 parent)) - ) - (cond - ((zero? arg0) - (let* - ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-0 (-> s3-0 base)) + (let* ((s5-0 (the-as anim-test-sequence (-> arg1 the-node))) + (v1-0 (-> s5-0 parent)) + ) + (cond + ((zero? arg0) + (let* + ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-0 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~S~S~S" + (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + ">" + " " + ) + (if (logtest? (-> s5-0 flags) 4) + "*" + " " + ) + (-> s5-0 privname) ) - (let ((s2-0 draw-string-xy)) - (format - (clear *temp-string*) - "~S~S~S" - (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - ">" - " " - ) - (if (logtest? (-> s5-0 flags) 4) - "*" - " " - ) - (-> s5-0 privname) - ) - (s2-0 - *temp-string* - s3-0 - (-> arg1 xpos) - (-> arg1 ypos) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) + (s2-0 + *temp-string* + s3-0 + (-> arg1 xpos) + (-> arg1 ypos) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) ) + (font-flags shadow kerning) ) - (let ((a3-2 (-> s3-0 base))) - (let ((v1-8 (the-as object (-> s3-0 base)))) - (set! - (-> (the-as dma-packet v1-8) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) - (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-0 - (the-as (pointer dma-tag) a3-2) + ) + (let ((a3-2 (-> s3-0 base))) + (let ((v1-8 (the-as object (-> s3-0 base)))) + (set! + (-> (the-as dma-packet v1-8) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-2) ) ) ) - ((= arg0 1) - (return (logtest? (-> s5-0 flags) 1)) - ) - ((= arg0 4) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((v1-17 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-17 tailpred) v1-17)) - (let - ((v1-19 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + ) + ((= arg0 1) + (return (logtest? (-> s5-0 flags) 1)) + ) + ((= arg0 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (let ((v1-17 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-17 tailpred) v1-17)) + (let + ((v1-19 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the previous node in the list" - (set! v1-19 (-> (the-as anim-test-sequence v1-19) prev)) - (let ((a0-24 (the-as anim-test-sequence v1-19))) - "is this node the start of the list. #t = start" - (if (not (-> a0-24 prev)) - (goto cfg-28) - ) - ) - (when (logtest? (-> (the-as anim-test-sequence v1-19) flags) 1) - (set! - (-> arg1 highlight-index) - (glst-get-node-index - (-> arg1 list) - (the-as anim-test-sequence v1-19) - ) - ) + ) + (while #t + "return the previous node in the list" + (set! v1-19 (-> (the-as anim-test-sequence v1-19) prev)) + (let ((a0-24 (the-as anim-test-sequence v1-19))) + "is this node the start of the list. #t = start" + (if (not (-> a0-24 prev)) (goto cfg-28) ) ) + (when (logtest? (-> (the-as anim-test-sequence v1-19) flags) 1) + (set! + (-> arg1 highlight-index) + (glst-get-node-index + (-> arg1 list) + (the-as anim-test-sequence v1-19) + ) + ) + (goto cfg-28) + ) ) ) ) - (label cfg-28) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (let ((v1-23 (-> arg1 list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-23 tailpred) v1-23)) - (let - ((v1-25 - (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) - ) + (label cfg-28) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (let ((v1-23 (-> arg1 list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-23 tailpred) v1-23)) + (let + ((v1-25 + (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index)) ) - (while #t - "return the next node in the list" - (set! v1-25 (-> (the-as anim-test-sequence v1-25) next)) - (let ((a0-42 (the-as anim-test-sequence v1-25))) - "is this node the end of the list. #t = end" - (if (not (-> a0-42 next)) - (goto cfg-42) - ) - ) - (when (logtest? (-> (the-as anim-test-sequence v1-25) flags) 1) - (set! - (-> arg1 highlight-index) - (glst-get-node-index - (-> arg1 list) - (the-as anim-test-sequence v1-25) - ) - ) + ) + (while #t + "return the next node in the list" + (set! v1-25 (-> (the-as anim-test-sequence v1-25) next)) + (let ((a0-42 (the-as anim-test-sequence v1-25))) + "is this node the end of the list. #t = end" + (if (not (-> a0-42 next)) (goto cfg-42) ) ) + (when (logtest? (-> (the-as anim-test-sequence v1-25) flags) 1) + (set! + (-> arg1 highlight-index) + (glst-get-node-index + (-> arg1 list) + (the-as anim-test-sequence v1-25) + ) + ) + (goto cfg-42) + ) ) ) ) - (label cfg-42) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (set! (-> arg1 current-index) (-> arg1 the-index)) - (set! (-> v1-0 seq-index) (-> arg1 current-index)) - (set! (-> v1-0 seq-hindex) (-> arg1 highlight-index)) - (logior! (-> v1-0 flags) 2) - (set! (-> *anim-tester* 0 edit-mode) 4) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'change-anim) - (set! (-> a1-15 param 0) (the-as uint #f)) - (send-event-function (ppointer->process *anim-tester*) a1-15) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (set! (-> *debug-menu-context* is-hidden) #f) - (set! (-> *anim-tester* 0 edit-mode) 0) - (set! *camera-read-buttons* #t) - (logior! (-> *anim-tester* 0 flags) 4) ) + (label cfg-42) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (set! (-> arg1 current-index) (-> arg1 the-index)) + (set! (-> v1-0 seq-index) (-> arg1 current-index)) + (set! (-> v1-0 seq-hindex) (-> arg1 highlight-index)) + (logior! (-> v1-0 flags) 2) + (set! (-> *anim-tester* 0 edit-mode) 4) + (send-event (ppointer->process *anim-tester*) 'change-anim #f) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *debug-menu-context* is-hidden) #f) + (set! (-> *anim-tester* 0 edit-mode) 0) + (set! *camera-read-buttons* #t) + (logior! (-> *anim-tester* 0 flags) 4) ) ) - ((= arg0 2) - (let ((v1-57 (+ (length (-> s5-0 privname)) 2))) - (set! v1-57 (cond - ((< (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) v1-57) - (empty) - v1-57 - ) - (else - (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) - ) + ) + ((= arg0 2) + (let ((v1-57 (+ (length (-> s5-0 privname)) 2))) + (set! v1-57 (cond + ((< (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) v1-57) + (empty) + v1-57 ) - ) - (set! (-> arg1 return-int) v1-57) + (else + (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) + ) + ) ) + (set! (-> arg1 return-int) v1-57) ) - ((= arg0 3) - (let* - ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s5-1 (-> s4-1 base)) - ) - (draw-string-xy - "----pick-sequence---" - s4-1 - (-> arg1 xpos) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - (let ((a3-4 (-> s4-1 base))) - (let ((v1-64 (the-as object (-> s4-1 base)))) - (set! - (-> (the-as dma-packet v1-64) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-64) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-64) vif1) (new 'static 'vif-tag)) - (set! (-> s4-1 base) (&+ (the-as pointer v1-64) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s5-1 - (the-as (pointer dma-tag) a3-4) + ) + ((= arg0 3) + (let* + ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s5-1 (-> s4-1 base)) + ) + (draw-string-xy + "----pick-sequence---" + s4-1 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-4 (-> s4-1 base))) + (let ((v1-64 (the-as object (-> s4-1 base)))) + (set! + (-> (the-as dma-packet v1-64) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) ) + (set! (-> (the-as dma-packet v1-64) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-64) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-64) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s5-1 + (the-as (pointer dma-tag) a3-4) ) ) ) ) ) - #f ) + #f ) ;; definition for symbol anim-test-field-highlight-lw, type (inline-array list-field) @@ -1992,27 +1962,20 @@ (defun anim-test-edit-seq-insert-item ((arg0 anim-test-seq-item) (arg1 anim-test-sequence)) - (with-pp - (let ((s4-0 (new 'debug 'anim-test-seq-item 1 ""))) - (anim-test-seq-item-copy! s4-0 arg0) - (when (logtest? (-> s4-0 flags) 1) - (set! (-> s4-0 flags) (logand -2 (-> s4-0 flags))) - (logior! (-> s4-0 flags) 4) - (let ((v1-8 s4-0)) - (set! (-> v1-8 privname) "--blank--") - ) + (let ((s4-0 (new 'debug 'anim-test-seq-item 1 ""))) + (anim-test-seq-item-copy! s4-0 arg0) + (when (logtest? (-> s4-0 flags) 1) + (set! (-> s4-0 flags) (logand -2 (-> s4-0 flags))) + (logior! (-> s4-0 flags) 4) + (let ((v1-8 s4-0)) + (set! (-> v1-8 privname) "--blank--") ) - (glst-insert-before (-> arg1 item-list) arg0 s4-0) ) - (anim-test-seq-mark-as-edited arg1) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-4) - ) - (none) + (glst-insert-before (-> arg1 item-list) arg0 s4-0) ) + (anim-test-seq-mark-as-edited arg1) + (send-event (ppointer->process *anim-tester*) 'change-anim) + (none) ) ;; definition for function anim-test-edit-sequence-list-handler @@ -2025,654 +1988,615 @@ (sv-192 (function string dma-buffer int int font-color font-flags none)) (sv-208 (function _varargs_ object)) ) - (with-pp - (let ((gp-0 (-> arg1 the-node)) - (s4-0 (the-as object (-> arg1 list-owner))) - (s2-0 - (and - (logtest? (-> *anim-tester* 0 flags) 8) - (zero? (-> *anim-tester* 0 item-field)) - ) - ) - ) - (cond - ((zero? arg0) - (let - ((s3-0 - (new - 'stack - 'font-context - *font-default-matrix* - (-> arg1 xpos) - (-> arg1 ypos) - (-> (new 'static 'array float 1 0.0) 0) - (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (font-flags shadow kerning) + (let ((gp-0 (-> arg1 the-node)) + (s4-0 (the-as object (-> arg1 list-owner))) + (s2-0 + (and + (logtest? (-> *anim-tester* 0 flags) 8) + (zero? (-> *anim-tester* 0 item-field)) ) ) ) - (when (not s2-0) - (when (= (-> arg1 the-index) (-> arg1 highlight-index)) - (let* - ((a1-2 - (-> - anim-test-field-highlight-lw - (-> *anim-tester* 0 item-field) - left - ) - ) - (v1-24 - (-> - anim-test-field-highlight-lw - (-> *anim-tester* 0 item-field) - width - ) - ) - (s0-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s1-0 (-> s0-0 base)) - ) - (draw-sprite2d-xy - s0-0 - (+ (* a1-2 (-> *DISP_LIST-bank* CHAR_WIDTH)) 2 (-> arg1 xpos)) - (+ (-> arg1 ypos) -1) - (+ (* v1-24 (-> *DISP_LIST-bank* CHAR_WIDTH)) 4) - (+ (-> *DISP_LIST-bank* TV_SPACING) 1) - (new 'static 'rgba :r #xc0 :g #xc0 :a #xff) - ) - (let ((a3-4 (-> s0-0 base))) - (let ((v1-29 (the-as object (-> s0-0 base)))) - (set! - (-> (the-as dma-packet v1-29) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-29) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-29) vif1) (new 'static 'vif-tag)) - (set! (-> s0-0 base) (&+ (the-as pointer v1-29) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s1-0 - (the-as (pointer dma-tag) a3-4) - ) - ) + (cond + ((zero? arg0) + (let + ((s3-0 + (new + 'stack + 'font-context + *font-default-matrix* + (-> arg1 xpos) + (-> arg1 ypos) + (-> (new 'static 'array float 1 0.0) 0) + (the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) ) + (font-flags shadow kerning) ) ) - (let* - ((s0-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s1-1 (-> s0-1 base)) - ) - (set! sv-192 draw-string-xy) - (set! sv-208 format) - (let ((a0-18 (clear *temp-string*)) - (a1-7 "~S~S~-27S") - (a2-11 (if (= (-> arg1 the-index) (-> arg1 highlight-index)) - ">" - " " - ) - ) - (a3-6 - (if - (= - (-> arg1 the-index) - (-> (the-as anim-test-sequence s4-0) playing-item) - ) - "*" - " " - ) - ) - (t0-2 (-> (the-as anim-test-seq-item gp-0) privname)) - ) - (sv-208 a0-18 a1-7 a2-11 a3-6 t0-2) - ) - (let ((a0-19 *temp-string*) - (a1-8 s0-1) - (a2-12 (-> arg1 xpos)) - (a3-7 (-> arg1 ypos)) - (t0-4 (if (= (-> arg1 the-index) (-> arg1 current-index)) - 15 - 12 - ) - ) - (t1-2 3) - ) - (sv-192 - a0-19 - a1-8 - a2-12 - a3-7 - (the-as font-color t0-4) - (the-as font-flags t1-2) - ) - ) - (let ((a3-8 (-> s0-1 base))) - (let ((v1-44 (the-as object (-> s0-1 base)))) - (set! - (-> (the-as dma-packet v1-44) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-44) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-44) vif1) (new 'static 'vif-tag)) - (set! (-> s0-1 base) (&+ (the-as pointer v1-44) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s1-1 - (the-as (pointer dma-tag) a3-8) - ) - ) - ) - (when (not s2-0) + ) + (when (not s2-0) + (when (= (-> arg1 the-index) (-> arg1 highlight-index)) (let* - ((s2-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (s4-1 (the-as anim-test-sequence (-> s2-2 base))) + ((a1-2 + (-> + anim-test-field-highlight-lw + (-> *anim-tester* 0 item-field) + left + ) + ) + (v1-24 + (-> + anim-test-field-highlight-lw + (-> *anim-tester* 0 item-field) + width + ) + ) + (s0-0 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s1-0 (-> s0-0 base)) ) - (when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) - (let ((v1-57 s3-0) - (a1-13 - (+ - (-> arg1 xpos) - (* - (-> *ANIM_TESTER-bank* EDIT_STATS_X) - (-> *DISP_LIST-bank* CHAR_WIDTH) - ) - ) - ) - (a0-29 (-> arg1 ypos)) - ) - (set! (-> v1-57 origin x) (the float a1-13)) - (set! (-> v1-57 origin y) (the float a0-29)) - ) - (cond - ((and - (< (-> (the-as anim-test-seq-item gp-0) speed) 0) - (< -100 (-> (the-as anim-test-seq-item gp-0) speed)) - ) - (let ((s1-2 draw-string-adv)) - (let ((s0-2 format) - (a0-33 (clear *temp-string*)) - (a1-14 "-0.~1d") - (v1-61 (abs (-> (the-as anim-test-seq-item gp-0) speed))) - ) - (s0-2 a0-33 a1-14 (/ (mod v1-61 100) 10)) - ) - (s1-2 *temp-string* s2-2 s3-0) - ) - ) - (else - (let ((s1-3 draw-string-adv)) - (let ((s0-3 format) - (a0-36 (clear *temp-string*)) - (a1-16 "~2d.~1d") - (a2-21 (/ (-> (the-as anim-test-seq-item gp-0) speed) 100)) - (v1-64 (abs (-> (the-as anim-test-seq-item gp-0) speed))) - ) - (s0-3 a0-36 a1-16 a2-21 (/ (mod v1-64 100) 10)) - ) - (s1-3 *temp-string* s2-2 s3-0) - ) - ) - ) - (let ((s1-4 draw-string-adv)) - (format - (clear *temp-string*) - " ~4d" - (-> (the-as anim-test-seq-item gp-0) blend) - ) - (s1-4 *temp-string* s2-2 s3-0) - ) - (anim-tester-disp-frame-num - " " - (-> (the-as anim-test-seq-item gp-0) first-frame) - (-> (the-as anim-test-seq-item gp-0) artist-base) - s3-0 - ) - (anim-tester-disp-frame-num - " " - (-> (the-as anim-test-seq-item gp-0) last-frame) - (-> (the-as anim-test-seq-item gp-0) artist-base) - s3-0 - ) - (let ((s1-5 draw-string-adv)) - (format - (clear *temp-string*) - " ~S~S~S~S" - (if (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 2) - "B" - "-" - ) - "-" - "-" - "-" - ) - (s1-5 *temp-string* s2-2 s3-0) - ) + (draw-sprite2d-xy + s0-0 + (+ (* a1-2 (-> *DISP_LIST-bank* CHAR_WIDTH)) 2 (-> arg1 xpos)) + (+ (-> arg1 ypos) -1) + (+ (* v1-24 (-> *DISP_LIST-bank* CHAR_WIDTH)) 4) + (+ (-> *DISP_LIST-bank* TV_SPACING) 1) + (new 'static 'rgba :r #xc0 :g #xc0 :a #xff) ) - (let* ((a1-24 (-> anim-test-field-highlight-lw 9 left)) - (v1-69 s3-0) - (a1-26 - (+ (-> arg1 xpos) (* a1-24 (-> *DISP_LIST-bank* CHAR_WIDTH))) - ) - (a0-47 (-> arg1 ypos)) - ) - (set! (-> v1-69 origin x) (the float a1-26)) - (set! (-> v1-69 origin y) (the float a0-47)) - ) - (draw-string-adv "MID" s2-2 s3-0) - (let ((a3-15 (-> s2-2 base))) - (let ((v1-70 (the-as object (-> s2-2 base)))) + (let ((a3-4 (-> s0-0 base))) + (let ((v1-29 (the-as object (-> s0-0 base)))) (set! - (-> (the-as dma-packet v1-70) dma) + (-> (the-as dma-packet v1-29) dma) (new 'static 'dma-tag :id (dma-tag-id next)) ) - (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) - (set! (-> s2-2 base) (&+ (the-as pointer v1-70) 16)) + (set! (-> (the-as dma-packet v1-29) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-29) vif1) (new 'static 'vif-tag)) + (set! (-> s0-0 base) (&+ (the-as pointer v1-29) 16)) ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) frame bucket-group) (bucket-id debug-draw0) - (the-as pointer s4-1) - (the-as (pointer dma-tag) a3-15) + s1-0 + (the-as (pointer dma-tag) a3-4) ) ) ) ) ) - ) - ((= arg0 1) - (return #t) - ) - ((= arg0 4) - (cond - ((logtest? (-> *anim-tester* 0 flags) 8) - (let ((v1-88 (-> *anim-tester* 0 item-field))) + (let* + ((s0-1 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s1-1 (-> s0-1 base)) + ) + (set! sv-192 draw-string-xy) + (set! sv-208 format) + (let ((a0-18 (clear *temp-string*)) + (a1-7 "~S~S~-27S") + (a2-11 (if (= (-> arg1 the-index) (-> arg1 highlight-index)) + ">" + " " + ) + ) + (a3-6 + (if + (= + (-> arg1 the-index) + (-> (the-as anim-test-sequence s4-0) playing-item) + ) + "*" + " " + ) + ) + (t0-2 (-> (the-as anim-test-seq-item gp-0) privname)) + ) + (sv-208 a0-18 a1-7 a2-11 a3-6 t0-2) + ) + (let ((a0-19 *temp-string*) + (a1-8 s0-1) + (a2-12 (-> arg1 xpos)) + (a3-7 (-> arg1 ypos)) + (t0-4 (if (= (-> arg1 the-index) (-> arg1 current-index)) + 15 + 12 + ) + ) + (t1-2 3) + ) + (sv-192 + a0-19 + a1-8 + a2-12 + a3-7 + (the-as font-color t0-4) + (the-as font-flags t1-2) + ) + ) + (let ((a3-8 (-> s0-1 base))) + (let ((v1-44 (the-as object (-> s0-1 base)))) + (set! + (-> (the-as dma-packet v1-44) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-44) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-44) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-44) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s1-1 + (the-as (pointer dma-tag) a3-8) + ) + ) + ) + (when (not s2-0) + (let* + ((s2-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (s4-1 (the-as anim-test-sequence (-> s2-2 base))) + ) + (when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) + (let ((v1-57 s3-0) + (a1-13 + (+ + (-> arg1 xpos) + (* + (-> *ANIM_TESTER-bank* EDIT_STATS_X) + (-> *DISP_LIST-bank* CHAR_WIDTH) + ) + ) + ) + (a0-29 (-> arg1 ypos)) + ) + (set! (-> v1-57 origin x) (the float a1-13)) + (set! (-> v1-57 origin y) (the float a0-29)) + ) (cond - ((zero? v1-88) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) - (let - ((v0-24 - (the-as - anim-test-obj - (glst-get-node-by-index - (-> *anim-tester* 0 pick-con list) - (-> *anim-tester* 0 pick-con highlight-index) + ((and + (< (-> (the-as anim-test-seq-item gp-0) speed) 0) + (< -100 (-> (the-as anim-test-seq-item gp-0) speed)) + ) + (let ((s1-2 draw-string-adv)) + (let ((s0-2 format) + (a0-33 (clear *temp-string*)) + (a1-14 "-0.~1d") + (v1-61 (abs (-> (the-as anim-test-seq-item gp-0) speed))) ) + (s0-2 a0-33 a1-14 (/ (mod v1-61 100) 10)) + ) + (s1-2 *temp-string* s2-2 s3-0) + ) + ) + (else + (let ((s1-3 draw-string-adv)) + (let ((s0-3 format) + (a0-36 (clear *temp-string*)) + (a1-16 "~2d.~1d") + (a2-21 (/ (-> (the-as anim-test-seq-item gp-0) speed) 100)) + (v1-64 (abs (-> (the-as anim-test-seq-item gp-0) speed))) + ) + (s0-3 a0-36 a1-16 a2-21 (/ (mod v1-64 100) 10)) + ) + (s1-3 *temp-string* s2-2 s3-0) + ) + ) + ) + (let ((s1-4 draw-string-adv)) + (format + (clear *temp-string*) + " ~4d" + (-> (the-as anim-test-seq-item gp-0) blend) + ) + (s1-4 *temp-string* s2-2 s3-0) + ) + (anim-tester-disp-frame-num + " " + (-> (the-as anim-test-seq-item gp-0) first-frame) + (-> (the-as anim-test-seq-item gp-0) artist-base) + s3-0 + ) + (anim-tester-disp-frame-num + " " + (-> (the-as anim-test-seq-item gp-0) last-frame) + (-> (the-as anim-test-seq-item gp-0) artist-base) + s3-0 + ) + (let ((s1-5 draw-string-adv)) + (format + (clear *temp-string*) + " ~S~S~S~S" + (if (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 2) + "B" + "-" + ) + "-" + "-" + "-" + ) + (s1-5 *temp-string* s2-2 s3-0) + ) + ) + (let* ((a1-24 (-> anim-test-field-highlight-lw 9 left)) + (v1-69 s3-0) + (a1-26 + (+ (-> arg1 xpos) (* a1-24 (-> *DISP_LIST-bank* CHAR_WIDTH))) + ) + (a0-47 (-> arg1 ypos)) + ) + (set! (-> v1-69 origin x) (the float a1-26)) + (set! (-> v1-69 origin y) (the float a0-47)) + ) + (draw-string-adv "MID" s2-2 s3-0) + (let ((a3-15 (-> s2-2 base))) + (let ((v1-70 (the-as object (-> s2-2 base)))) + (set! + (-> (the-as dma-packet v1-70) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag)) + (set! (-> s2-2 base) (&+ (the-as pointer v1-70) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + (the-as pointer s4-1) + (the-as (pointer dma-tag) a3-15) + ) + ) + ) + ) + ) + ) + ((= arg0 1) + (return #t) + ) + ((= arg0 4) + (cond + ((logtest? (-> *anim-tester* 0 flags) 8) + (let ((v1-88 (-> *anim-tester* 0 item-field))) + (cond + ((zero? v1-88) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + (let + ((v0-24 + (the-as + anim-test-obj + (glst-get-node-by-index + (-> *anim-tester* 0 pick-con list) + (-> *anim-tester* 0 pick-con highlight-index) ) ) ) - (when (and v0-24 (let ((v1-101 (&-> v0-24 obj-art-group))) - "is the list empty, #t = empty" - (not (= (-> v1-101 2) v1-101)) - ) - ) - (let ((v1-103 (&-> v0-24 obj-art-group))) - "return the start of the list" - (let ((a1-30 (-> v1-103 0))) - (anim-test-seq-item-copy! - (the-as anim-test-seq-item gp-0) - (the-as anim-test-seq-item a1-30) - ) + ) + (when (and v0-24 (let ((v1-101 (&-> v0-24 obj-art-group))) + "is the list empty, #t = empty" + (not (= (-> v1-101 2) v1-101)) + ) + ) + (let ((v1-103 (&-> v0-24 obj-art-group))) + "return the start of the list" + (let ((a1-30 (-> v1-103 0))) + (anim-test-seq-item-copy! + (the-as anim-test-seq-item gp-0) + (the-as anim-test-seq-item a1-30) ) ) + ) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + ) + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons square) + ) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + ) + ) + ) + ((= v1-88 9) + (cond + ((zero? + (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) + ) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (let ((v1-124 (the-as anim-test-seq-item gp-0))) + "return the previous node in the list" + (let* ((s3-1 (-> v1-124 prev)) + (v1-125 s3-1) + ) + "is this node the start of the list. #t = start" + (when (not (not (-> v1-125 prev))) + (glst-remove + (-> (the-as anim-test-sequence s4-0) item-list) + (the-as anim-test-seq-item gp-0) + ) + (glst-insert-before + (-> (the-as anim-test-sequence s4-0) item-list) + s3-1 + (the-as anim-test-seq-item gp-0) + ) + (+! (-> arg1 current-index) -1) + (+! (-> arg1 highlight-index) -1) (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (send-event (ppointer->process *anim-tester*) 'change-anim) ) ) ) - ((logtest? - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons square) - ) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) - ) ) - ) - ((= v1-88 9) - (cond - ((zero? - (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - ) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((v1-124 (the-as anim-test-seq-item gp-0))) - "return the previous node in the list" - (let* ((s3-1 (-> v1-124 prev)) - (v1-125 s3-1) - ) - "is this node the start of the list. #t = start" - (when (not (not (-> v1-125 prev))) - (glst-remove - (-> (the-as anim-test-sequence s4-0) item-list) - (the-as anim-test-seq-item gp-0) - ) - (glst-insert-before - (-> (the-as anim-test-sequence s4-0) item-list) - s3-1 - (the-as anim-test-seq-item gp-0) - ) - (+! (-> arg1 current-index) -1) - (+! (-> arg1 highlight-index) -1) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (let ((a1-33 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-33 from) pp) - (set! (-> a1-33 num-params) 0) - (set! (-> a1-33 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-33) - ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (let ((v1-142 (the-as anim-test-seq-item gp-0))) + "return the next node in the list" + (let* ((s3-2 (the-as anim-test-seq-item (-> v1-142 next))) + (v1-143 s3-2) + ) + "is this node the end of the list. #t = end" + (when + (and + (not (not (-> v1-143 next))) + (zero? (logand (-> s3-2 flags) 1)) ) - ) - ) - ) - ((logtest? - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons down) - ) - (let ((v1-142 (the-as anim-test-seq-item gp-0))) - "return the next node in the list" - (let* ((s3-2 (the-as anim-test-seq-item (-> v1-142 next))) - (v1-143 s3-2) - ) - "is this node the end of the list. #t = end" - (when - (and - (not (not (-> v1-143 next))) - (zero? (logand (-> s3-2 flags) 1)) - ) - (glst-remove - (-> (the-as anim-test-sequence s4-0) item-list) - (the-as anim-test-seq-item gp-0) - ) - (glst-insert-after - (-> (the-as anim-test-sequence s4-0) item-list) - s3-2 - (the-as anim-test-seq-item gp-0) - ) - (+! (-> arg1 current-index) 1) - (+! (-> arg1 highlight-index) 1) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (let ((a1-36 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-36 from) pp) - (set! (-> a1-36 num-params) 0) - (set! (-> a1-36 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-36) - ) + (glst-remove + (-> (the-as anim-test-sequence s4-0) item-list) + (the-as anim-test-seq-item gp-0) ) + (glst-insert-after + (-> (the-as anim-test-sequence s4-0) item-list) + s3-2 + (the-as anim-test-seq-item gp-0) + ) + (+! (-> arg1 current-index) 1) + (+! (-> arg1 highlight-index) 1) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (send-event (ppointer->process *anim-tester*) 'change-anim) ) ) ) ) ) - ((or (= v1-88 1) (= v1-88 2) (= v1-88 3) (= v1-88 4)) - (cond - ((zero? - (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - ) - (set! - (-> *anim-tester* 0 flags) - (logand -9 (-> *anim-tester* 0 flags)) - ) + ) + ((or (= v1-88 1) (= v1-88 2) (= v1-88 3) (= v1-88 4)) + (cond + ((zero? + (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) ) - ((begin - (set! (-> arg1 current-index) (-> arg1 the-index)) - (<= (-> *anim-tester* 0 inc-timer) 0) - ) - (if (> (-> *anim-tester* 0 inc-delay) 0) - (+! (-> *anim-tester* 0 inc-delay) -1) - ) - (set! - (-> *anim-tester* 0 inc-timer) - (-> *anim-tester* 0 inc-delay) - ) - (case (-> *anim-tester* 0 item-field) - ((1) - (cond - ((logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons down) - ) - (+! (-> (the-as anim-test-seq-item gp-0) speed) -10) - (anim-test-seq-mark-as-edited - (the-as anim-test-sequence s4-0) - ) - (if (< (-> (the-as anim-test-seq-item gp-0) speed) -300) - (set! (-> (the-as anim-test-seq-item gp-0) speed) -300) - ) - ) - ((logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons up) - ) - (+! (-> (the-as anim-test-seq-item gp-0) speed) 10) - (anim-test-seq-mark-as-edited - (the-as anim-test-sequence s4-0) - ) - (if (< 1000 (-> (the-as anim-test-seq-item gp-0) speed)) - (set! (-> (the-as anim-test-seq-item gp-0) speed) 1000) - ) - ) - ) - ) - ((2) + (set! + (-> *anim-tester* 0 flags) + (logand -9 (-> *anim-tester* 0 flags)) + ) + ) + ((begin + (set! (-> arg1 current-index) (-> arg1 the-index)) + (<= (-> *anim-tester* 0 inc-timer) 0) + ) + (if (> (-> *anim-tester* 0 inc-delay) 0) + (+! (-> *anim-tester* 0 inc-delay) -1) + ) + (set! (-> *anim-tester* 0 inc-timer) (-> *anim-tester* 0 inc-delay)) + (case (-> *anim-tester* 0 item-field) + ((1) (cond ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down) ) - (+! (-> (the-as anim-test-seq-item gp-0) blend) -1) + (+! (-> (the-as anim-test-seq-item gp-0) speed) -10) (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (when (< (-> (the-as anim-test-seq-item gp-0) blend) 0) - (set! (-> (the-as anim-test-seq-item gp-0) blend) 0) - 0 + (if (< (-> (the-as anim-test-seq-item gp-0) speed) -300) + (set! (-> (the-as anim-test-seq-item gp-0) speed) -300) ) ) ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up) ) - (+! (-> (the-as anim-test-seq-item gp-0) blend) 1) + (+! (-> (the-as anim-test-seq-item gp-0) speed) 10) (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (if (< 9999 (-> (the-as anim-test-seq-item gp-0) blend)) - (set! (-> (the-as anim-test-seq-item gp-0) blend) 9999) + (if (< 1000 (-> (the-as anim-test-seq-item gp-0) speed)) + (set! (-> (the-as anim-test-seq-item gp-0) speed) 1000) ) ) ) ) - ((3) - (let ((f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame))) - (set! + ((2) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons down) + ) + (+! (-> (the-as anim-test-seq-item gp-0) blend) -1) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (when (< (-> (the-as anim-test-seq-item gp-0) blend) 0) + (set! (-> (the-as anim-test-seq-item gp-0) blend) 0) + 0 + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons up) + ) + (+! (-> (the-as anim-test-seq-item gp-0) blend) 1) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (if (< 9999 (-> (the-as anim-test-seq-item gp-0) blend)) + (set! (-> (the-as anim-test-seq-item gp-0) blend) 9999) + ) + ) + ) + ) + ((3) + (let ((f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame))) + (set! + (-> (the-as anim-test-seq-item gp-0) first-frame) + (anim-tester-adjust-frame (-> (the-as anim-test-seq-item gp-0) first-frame) - (anim-tester-adjust-frame - (-> (the-as anim-test-seq-item gp-0) first-frame) - (-> (the-as anim-test-seq-item gp-0) num-frames) - ) - ) - (if (!= f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame)) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (-> (the-as anim-test-seq-item gp-0) num-frames) ) ) + (if (!= f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame)) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + ) ) - ((4) - (let ((f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame))) - (set! + ) + ((4) + (let ((f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame))) + (set! + (-> (the-as anim-test-seq-item gp-0) last-frame) + (anim-tester-adjust-frame (-> (the-as anim-test-seq-item gp-0) last-frame) - (anim-tester-adjust-frame - (-> (the-as anim-test-seq-item gp-0) last-frame) - (-> (the-as anim-test-seq-item gp-0) num-frames) - ) - ) - (if (!= f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame)) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (-> (the-as anim-test-seq-item gp-0) num-frames) ) ) - ) - ) - ) - (else - (+! (-> *anim-tester* 0 inc-timer) -1) - ) - ) - (when - (or - (logtest? - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons down) - ) - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - ) - (set! - (-> *anim-tester* 0 inc-delay) - (-> *DISP_LIST-bank* INC_DELAY) - ) - (set! (-> *anim-tester* 0 inc-timer) 0) - 0 - ) - ) - ) - ) - ) - (else - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (if (> (-> arg1 highlight-index) 0) - (+! (-> arg1 highlight-index) -1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (if - (< - (the-as int (the-as anim-test-seq-item (-> arg1 highlight-index))) - (glst-num-elements (-> arg1 list)) - ) - (+! (-> arg1 highlight-index) 1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (+! (-> *anim-tester* 0 item-field) -1) - (if (< (-> *anim-tester* 0 item-field) 0) - (set! (-> *anim-tester* 0 item-field) 11) - ) - (if (= (-> *anim-tester* 0 item-field) 8) - (set! (-> *anim-tester* 0 item-field) 5) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (+! (-> *anim-tester* 0 item-field) 1) - (when (>= (-> *anim-tester* 0 item-field) 12) - (set! (-> *anim-tester* 0 item-field) 0) - 0 - ) - (if (= (-> *anim-tester* 0 item-field) 6) - (set! (-> *anim-tester* 0 item-field) 9) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons square) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons square) - ) - (set! (-> *anim-tester* 0 edit-mode) 3) - (logior! (-> *anim-tester* 0 flags) 4) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (cond - ((logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1) - (let ((v1-318 (-> *anim-tester* 0 item-field))) - (if (= v1-318 10) - (anim-test-edit-seq-insert-item - (the-as anim-test-seq-item gp-0) - (the-as anim-test-sequence s4-0) + (if (!= f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame)) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + ) ) ) ) ) (else - (let ((v1-322 (-> *anim-tester* 0 item-field))) - (cond - ((zero? v1-322) - (anim-tester-pick-item-setup + (+! (-> *anim-tester* 0 inc-timer) -1) + ) + ) + (when + (or + (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + ) + (set! (-> *anim-tester* 0 inc-delay) (-> *DISP_LIST-bank* INC_DELAY)) + (set! (-> *anim-tester* 0 inc-timer) 0) + 0 + ) + ) + ) + ) + ) + (else + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (if (> (-> arg1 highlight-index) 0) + (+! (-> arg1 highlight-index) -1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (if + (< + (the-as int (the-as anim-test-seq-item (-> arg1 highlight-index))) + (glst-num-elements (-> arg1 list)) + ) + (+! (-> arg1 highlight-index) 1) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) + (+! (-> *anim-tester* 0 item-field) -1) + (if (< (-> *anim-tester* 0 item-field) 0) + (set! (-> *anim-tester* 0 item-field) 11) + ) + (if (= (-> *anim-tester* 0 item-field) 8) + (set! (-> *anim-tester* 0 item-field) 5) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) + (+! (-> *anim-tester* 0 item-field) 1) + (when (>= (-> *anim-tester* 0 item-field) 12) + (set! (-> *anim-tester* 0 item-field) 0) + 0 + ) + (if (= (-> *anim-tester* 0 item-field) 6) + (set! (-> *anim-tester* 0 item-field) 9) + ) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (set! (-> *anim-tester* 0 edit-mode) 3) + (logior! (-> *anim-tester* 0 flags) 4) + ) + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (cond + ((logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1) + (let ((v1-318 (-> *anim-tester* 0 item-field))) + (if (= v1-318 10) + (anim-test-edit-seq-insert-item + (the-as anim-test-seq-item gp-0) + (the-as anim-test-sequence s4-0) + ) + ) + ) + ) + (else + (let ((v1-322 (-> *anim-tester* 0 item-field))) + (cond + ((zero? v1-322) + (anim-tester-pick-item-setup + (the-as anim-test-seq-item gp-0) + (the-as anim-test-sequence s4-0) + ) + ) + ((= v1-322 10) + (anim-test-edit-seq-insert-item + (the-as anim-test-seq-item gp-0) + (the-as anim-test-sequence s4-0) + ) + ) + ((= v1-322 11) + (when + (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) + (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) + (glst-remove + (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0) - (the-as anim-test-sequence s4-0) ) ) - ((= v1-322 10) - (anim-test-edit-seq-insert-item - (the-as anim-test-seq-item gp-0) - (the-as anim-test-sequence s4-0) - ) - ) - ((= v1-322 11) - (when - (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1)) - (anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0)) - (glst-remove - (-> (the-as anim-test-sequence s4-0) item-list) - (the-as anim-test-seq-item gp-0) - ) - ) - (let ((a1-46 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-46 from) pp) - (set! (-> a1-46 num-params) 0) - (set! (-> a1-46 message) 'change-anim) - (send-event-function (ppointer->process *anim-tester*) a1-46) - ) - ) - (else - (when - (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 4)) - (case (-> *anim-tester* 0 item-field) - ((5) - (anim-test-seq-mark-as-edited - (the-as anim-test-sequence s4-0) - ) - (let - ((v1-331 - (logxor (-> (the-as anim-test-seq-item gp-0) flags) 2) - ) + (send-event (ppointer->process *anim-tester*) 'change-anim) + ) + (else + (when + (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 4)) + (case (-> *anim-tester* 0 item-field) + ((5) + (anim-test-seq-mark-as-edited + (the-as anim-test-sequence s4-0) + ) + (let + ((v1-331 + (logxor (-> (the-as anim-test-seq-item gp-0) flags) 2) ) - (set! (-> (the-as anim-test-seq-item gp-0) flags) v1-331) - v1-331 ) + (set! (-> (the-as anim-test-seq-item gp-0) flags) v1-331) + v1-331 ) - ((6) - (the-as int #f) ) - ((7) - (the-as int #f) - ) - ((8) - (the-as int #f) - ) - (else - (logior! (-> *anim-tester* 0 flags) 8) - (set! - (-> *anim-tester* 0 inc-delay) - (-> *DISP_LIST-bank* INC_DELAY) - ) - (set! (-> *anim-tester* 0 inc-timer) 0) - 0 + ((6) + (the-as int #f) + ) + ((7) + (the-as int #f) + ) + ((8) + (the-as int #f) + ) + (else + (logior! (-> *anim-tester* 0 flags) 8) + (set! + (-> *anim-tester* 0 inc-delay) + (-> *DISP_LIST-bank* INC_DELAY) ) + (set! (-> *anim-tester* 0 inc-timer) 0) + 0 ) ) ) @@ -2685,95 +2609,95 @@ ) ) ) - ((= arg0 2) - (set! (-> arg1 return-int) (-> *ANIM_TESTER-bank* EDIT_LIST_MIN_WIDTH)) - ) - ((= arg0 3) - (let* - ((s3-3 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (gp-2 (-> s3-3 base)) - ) - (let ((s1-6 draw-string-xy)) - (format - (clear *temp-string*) - "--Seq--(~-17S)--" - (-> (the-as anim-test-sequence s4-0) privname) - ) - (s1-6 - *temp-string* - s3-3 - (-> arg1 xpos) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - ) - (let ((a3-17 (-> s3-3 base))) - (let ((v1-355 (the-as object (-> s3-3 base)))) - (set! - (-> (the-as dma-packet v1-355) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-355) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-355) vif1) (new 'static 'vif-tag)) - (set! (-> s3-3 base) (&+ (the-as pointer v1-355) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-2 - (the-as (pointer dma-tag) a3-17) - ) - ) - ) - (cond - (s2-0 - (display-list-control (-> *anim-tester* 0 pick-con)) - ) - (else - (let* - ((s4-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) - (gp-3 (-> s4-2 base)) - ) - (draw-string-xy - "-spd-blnd-1st-lst-flgs-mov-" - s4-2 - (+ - (-> arg1 xpos) - (* - (-> *ANIM_TESTER-bank* EDIT_STATS_X) - (-> *DISP_LIST-bank* CHAR_WIDTH) - ) - ) - (-> arg1 ypos) - (font-color dim-white) - (font-flags shadow kerning) - ) - (let ((a3-21 (-> s4-2 base))) - (let ((v1-367 (the-as object (-> s4-2 base)))) - (set! - (-> (the-as dma-packet v1-367) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-367) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-367) vif1) (new 'static 'vif-tag)) - (set! (-> s4-2 base) (&+ (the-as pointer v1-367) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-3 - (the-as (pointer dma-tag) a3-21) - ) - ) - ) - ) - ) - ) + ) + ((= arg0 2) + (set! (-> arg1 return-int) (-> *ANIM_TESTER-bank* EDIT_LIST_MIN_WIDTH)) + ) + ((= arg0 3) + (let* + ((s3-3 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (gp-2 (-> s3-3 base)) + ) + (let ((s1-6 draw-string-xy)) + (format + (clear *temp-string*) + "--Seq--(~-17S)--" + (-> (the-as anim-test-sequence s4-0) privname) + ) + (s1-6 + *temp-string* + s3-3 + (-> arg1 xpos) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + ) + (let ((a3-17 (-> s3-3 base))) + (let ((v1-355 (the-as object (-> s3-3 base)))) + (set! + (-> (the-as dma-packet v1-355) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-355) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-355) vif1) (new 'static 'vif-tag)) + (set! (-> s3-3 base) (&+ (the-as pointer v1-355) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-2 + (the-as (pointer dma-tag) a3-17) + ) + ) + ) + (cond + (s2-0 + (display-list-control (-> *anim-tester* 0 pick-con)) + ) + (else + (let* + ((s4-2 (-> *display* frames (-> *display* on-screen) frame debug-buf)) + (gp-3 (-> s4-2 base)) + ) + (draw-string-xy + "-spd-blnd-1st-lst-flgs-mov-" + s4-2 + (+ + (-> arg1 xpos) + (* + (-> *ANIM_TESTER-bank* EDIT_STATS_X) + (-> *DISP_LIST-bank* CHAR_WIDTH) + ) + ) + (-> arg1 ypos) + (font-color dim-white) + (font-flags shadow kerning) + ) + (let ((a3-21 (-> s4-2 base))) + (let ((v1-367 (the-as object (-> s4-2 base)))) + (set! + (-> (the-as dma-packet v1-367) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-367) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-367) vif1) (new 'static 'vif-tag)) + (set! (-> s4-2 base) (&+ (the-as pointer v1-367) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-3 + (the-as (pointer dma-tag) a3-21) + ) + ) + ) + ) + ) ) ) - #f ) + #f ) ;; definition for function anim-tester-interface @@ -3510,139 +3434,131 @@ ;; Used lq/sq (defun anim-tester-add-newobj ((arg0 anim-tester) (arg1 string) (arg2 art-group)) (local-vars (sv-96 art-element) (sv-112 art-element) (sv-128 anim-test-obj)) - (with-pp - (let ((s2-0 (the-as anim-test-obj #f)) - (s5-0 (the-as anim-test-obj #f)) + (let ((s2-0 (the-as anim-test-obj #f)) + (s5-0 (the-as anim-test-obj #f)) + ) + (let ((s1-0 (the-as art-element #f)) + (s0-0 (the-as structure #f)) ) - (let ((s1-0 (the-as art-element #f)) - (s0-0 (the-as structure #f)) - ) - (dotimes (s3-0 (-> arg2 length)) - (cond - ((and (= (-> arg2 data s3-0 type) merc-ctrl) (not s2-0)) - (set! sv-96 (-> arg2 data s3-0)) - (set! s0-0 (and s2-0 s0-0)) - (if s0-0 - (anim-test-obj-remove-invalid s2-0) + (dotimes (s3-0 (-> arg2 length)) + (cond + ((and (= (-> arg2 data s3-0 type) merc-ctrl) (not s2-0)) + (set! sv-96 (-> arg2 data s3-0)) + (set! s0-0 (and s2-0 s0-0)) + (if s0-0 + (anim-test-obj-remove-invalid s2-0) + ) + (let ((t9-1 anim-tester-load-object-seqs)) + (-> sv-96 name) + (t9-1) + ) + (set! + s2-0 + (the-as + anim-test-obj + (glst-find-node-by-name (-> arg0 obj-list) (-> sv-96 name)) ) - (let ((t9-1 anim-tester-load-object-seqs)) - (-> sv-96 name) - (t9-1) + ) + (set! s0-0 (if s2-0 + #t + #f + ) + ) + (cond + ((the-as symbol s0-0) ) + (else + (set! s2-0 (new 'global 'anim-test-obj 1 (-> sv-96 name) arg2)) + (glst-add-tail (-> arg0 obj-list) s2-0) + ) + ) + (anim-test-obj-init s2-0 (the-as list-control arg0)) + (set! (-> s2-0 obj-art-group) arg2) + (set! (-> s2-0 mesh-geo) (the-as merc-ctrl sv-96)) + (set! (-> s2-0 joint-geo) (the-as art-joint-geo s1-0)) + (if (not s5-0) + (set! s5-0 s2-0) + ) + ) + ((= (-> arg2 data s3-0 type) art-joint-geo) + (if (and s2-0 (not (-> s2-0 joint-geo))) + (set! (-> s2-0 joint-geo) (the-as art-joint-geo (-> arg2 data s3-0))) + ) + (if (not s1-0) + (set! s1-0 (-> arg2 data s3-0)) + ) + ) + ((= (-> arg2 data s3-0 type) art-joint-anim) + (when s2-0 + (set! sv-112 (-> arg2 data s3-0)) (set! - s2-0 + sv-128 (the-as anim-test-obj - (glst-find-node-by-name (-> arg0 obj-list) (-> sv-96 name)) + (glst-find-node-by-name (-> s2-0 seq-list) (-> sv-112 name)) ) ) - (set! s0-0 (if s2-0 - #t - #f - ) - ) - (cond - ((the-as symbol s0-0) - ) - (else - (set! s2-0 (new 'global 'anim-test-obj 1 (-> sv-96 name) arg2)) - (glst-add-tail (-> arg0 obj-list) s2-0) - ) - ) - (anim-test-obj-init s2-0 (the-as list-control arg0)) - (set! (-> s2-0 obj-art-group) arg2) - (set! (-> s2-0 mesh-geo) (the-as merc-ctrl sv-96)) - (set! (-> s2-0 joint-geo) (the-as art-joint-geo s1-0)) - (if (not s5-0) - (set! s5-0 s2-0) - ) - ) - ((= (-> arg2 data s3-0 type) art-joint-geo) - (if (and s2-0 (not (-> s2-0 joint-geo))) - (set! (-> s2-0 joint-geo) (the-as art-joint-geo (-> arg2 data s3-0))) - ) - (if (not s1-0) - (set! s1-0 (-> arg2 data s3-0)) - ) - ) - ((= (-> arg2 data s3-0 type) art-joint-anim) - (when s2-0 - (set! sv-112 (-> arg2 data s3-0)) + (when (not sv-128) (set! sv-128 (the-as anim-test-obj - (glst-find-node-by-name (-> s2-0 seq-list) (-> sv-112 name)) + (new 'debug 'anim-test-sequence 1 (-> sv-112 name)) ) ) - (when (not sv-128) - (set! - sv-128 - (the-as - anim-test-obj - (new 'debug 'anim-test-sequence 1 (-> sv-112 name)) - ) - ) - (glst-add-tail (-> s2-0 seq-list) sv-128) - (anim-test-sequence-init (the-as anim-test-sequence sv-128) s2-0) - (let ((a1-11 (new 'debug 'anim-test-seq-item 1 (-> sv-112 name)))) - (glst-add-tail (the-as glst-list (&-> sv-128 obj-art-group)) a1-11) - ) + (glst-add-tail (-> s2-0 seq-list) sv-128) + (anim-test-sequence-init (the-as anim-test-sequence sv-128) s2-0) + (let ((a1-11 (new 'debug 'anim-test-seq-item 1 (-> sv-112 name)))) + (glst-add-tail (the-as glst-list (&-> sv-128 obj-art-group)) a1-11) ) - (set! (-> sv-128 list-con user-info) (the-as int s2-0)) - (set! - (-> sv-128 flags) - (logior (-> (the-as anim-test-sequence sv-128) flags) 2) - ) - (let ((v1-48 (-> (the-as anim-test-sequence sv-128) item-list))) - "is the list empty, #t = empty" - (when (not (= (-> v1-48 tailpred) v1-48)) - (let ((v1-51 (-> (the-as anim-test-sequence sv-128) item-list))) - "return the start of the list" - (let ((v1-52 (-> v1-51 head))) - (set! - (-> (the-as anim-test-seq-item v1-52) num-frames) - (the float (-> (the-as art-joint-anim sv-112) data 0 length)) - ) - (set! - (-> (the-as anim-test-seq-item v1-52) artist-base) - (-> (the-as art-joint-anim sv-112) artist-base) - ) - (set! - (-> (the-as anim-test-seq-item v1-52) parent) - (the-as anim-test-sequence sv-128) - ) + ) + (set! (-> sv-128 list-con user-info) (the-as int s2-0)) + (set! + (-> sv-128 flags) + (logior (-> (the-as anim-test-sequence sv-128) flags) 2) + ) + (let ((v1-48 (-> (the-as anim-test-sequence sv-128) item-list))) + "is the list empty, #t = empty" + (when (not (= (-> v1-48 tailpred) v1-48)) + (let ((v1-51 (-> (the-as anim-test-sequence sv-128) item-list))) + "return the start of the list" + (let ((v1-52 (-> v1-51 head))) + (set! + (-> (the-as anim-test-seq-item v1-52) num-frames) + (the float (-> (the-as art-joint-anim sv-112) data 0 length)) + ) + (set! + (-> (the-as anim-test-seq-item v1-52) artist-base) + (-> (the-as art-joint-anim sv-112) artist-base) + ) + (set! + (-> (the-as anim-test-seq-item v1-52) parent) + (the-as anim-test-sequence sv-128) ) ) - sv-128 ) + sv-128 ) ) ) - (else - ) + ) + (else ) ) ) - (if s2-0 - (anim-test-obj-remove-invalid s2-0) - ) - (when s5-0 - (set! (-> arg0 current-obj) (-> s5-0 privname)) - (set! - (-> arg0 list-con current-index) - (glst-get-node-index (-> arg0 obj-list) s5-0) - ) - ) ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) pp) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'reset) - (set! (-> a1-13 param 0) (the-as uint #f)) - (send-event-function arg0 a1-13) + (if s2-0 + (anim-test-obj-remove-invalid s2-0) + ) + (when s5-0 + (set! (-> arg0 current-obj) (-> s5-0 privname)) + (set! + (-> arg0 list-con current-index) + (glst-get-node-index (-> arg0 obj-list) s5-0) + ) ) ) + (send-event arg0 'reset #f) ) ;; definition for function anim-tester-stop @@ -3656,54 +3572,45 @@ ;; definition for function anim-tester-start (defun anim-tester-start () - (with-pp - (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-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 - gp-0 - ) - *default-pool* - 'anim-tester - (the-as - pointer - #x70004000 + activate ) ) ) - ((the-as - (function process function none) - run-function-in-process + (t9-2 + (the-as + anim-tester + gp-0 + ) + *default-pool* + 'anim-tester + (the-as + pointer + #x70004000 ) - gp-0 - initialize-anim-tester ) - (-> gp-0 ppointer) ) - ) - ) + ((the-as + (function process function none) + run-function-in-process + ) + gp-0 + initialize-anim-tester + ) + (-> gp-0 ppointer) + ) + ) ) - (set! *camera-orbit-target* *anim-tester*) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 2) - (set! (-> a1-3 message) 'change-state) - (set! (-> a1-3 param 0) (the-as uint cam-orbit)) - (set! (-> a1-3 param 1) (the-as uint 0)) - (send-event-function *camera* a1-3) - ) - #f ) + (set! *camera-orbit-target* *anim-tester*) + (send-event *camera* 'change-state cam-orbit 0) + #f ) ;; definition for function anim-tester-add-object @@ -3827,96 +3734,84 @@ ;; definition for function anim-tester-add-sequence ;; INFO: Return type mismatch object vs none. (defun anim-tester-add-sequence ((arg0 string)) - (with-pp - (cond - ((zero? (length arg0)) - (format #t "ERROR: no name~%") + (cond + ((zero? (length arg0)) + (format #t "ERROR: no name~%") + ) + ((and *anim-tester* (let ((v1-6 (-> *anim-tester* 0 obj-list))) + "is the list empty, #t = empty" + (not (= (-> v1-6 tailpred) v1-6)) + ) ) - ((and *anim-tester* (let ((v1-6 (-> *anim-tester* 0 obj-list))) - "is the list empty, #t = empty" - (not (= (-> v1-6 tailpred) v1-6)) - ) - ) - (let - ((s5-0 - (the-as - anim-test-obj - (glst-find-node-by-name - (-> *anim-tester* 0 obj-list) - (-> *anim-tester* 0 current-obj) - ) + (let + ((s5-0 + (the-as + anim-test-obj + (glst-find-node-by-name + (-> *anim-tester* 0 obj-list) + (-> *anim-tester* 0 current-obj) ) ) ) - (cond - (s5-0 - (let ((s4-0 (glst-find-node-by-name (-> s5-0 seq-list) arg0))) - (cond - (s4-0 - (format - #t - "ERROR: there is already a sequence with the name ~S~%" - arg0 + ) + (cond + (s5-0 + (let ((s4-0 (glst-find-node-by-name (-> s5-0 seq-list) arg0))) + (cond + (s4-0 + (format + #t + "ERROR: there is already a sequence with the name ~S~%" + arg0 + ) + (set! + (-> s5-0 list-con current-index) + (glst-get-node-index (-> s5-0 seq-list) s4-0) + ) + (send-event (ppointer->process *anim-tester*) 'edit-sequence) + ) + (else + (let ((gp-1 (new 'global 'anim-test-sequence 1 arg0))) + (glst-add-tail (-> s5-0 seq-list) gp-1) + (set! + (-> gp-1 list-con listfunc) + anim-test-edit-sequence-list-handler ) + (set! (-> gp-1 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X)) + (set! (-> gp-1 list-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y)) + (set! (-> gp-1 list-con list) (-> gp-1 item-list)) + (set! (-> gp-1 list-con list-owner) (the-as uint gp-1)) + (set! (-> gp-1 parent) s5-0) + (anim-test-seq-mark-as-edited gp-1) + (logior! (-> gp-1 flags) 1) (set! (-> s5-0 list-con current-index) - (glst-get-node-index (-> s5-0 seq-list) s4-0) + (glst-get-node-index (-> s5-0 seq-list) gp-1) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'edit-sequence) - (send-event-function (ppointer->process *anim-tester*) a1-5) - ) - ) - (else - (let ((gp-1 (new 'global 'anim-test-sequence 1 arg0))) - (glst-add-tail (-> s5-0 seq-list) gp-1) - (set! - (-> gp-1 list-con listfunc) - anim-test-edit-sequence-list-handler - ) - (set! (-> gp-1 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X)) - (set! (-> gp-1 list-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y)) - (set! (-> gp-1 list-con list) (-> gp-1 item-list)) - (set! (-> gp-1 list-con list-owner) (the-as uint gp-1)) - (set! (-> gp-1 parent) s5-0) - (anim-test-seq-mark-as-edited gp-1) - (logior! (-> gp-1 flags) 1) - (set! - (-> s5-0 list-con current-index) - (glst-get-node-index (-> s5-0 seq-list) gp-1) - ) - (set! (-> s5-0 seq-index) (-> s5-0 list-con current-index)) - (set! (-> s5-0 seq-hindex) (-> s5-0 list-con current-index)) - (let ((s5-1 (new 'debug 'anim-test-seq-item 1 "**END**"))) - (logior! (-> s5-1 flags) 1) - (glst-add-tail (-> gp-1 item-list) s5-1) - (set! (-> s5-1 parent) gp-1) - ) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) pp) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'edit-sequence) - (send-event-function (ppointer->process *anim-tester*) a1-11) + (set! (-> s5-0 seq-index) (-> s5-0 list-con current-index)) + (set! (-> s5-0 seq-hindex) (-> s5-0 list-con current-index)) + (let ((s5-1 (new 'debug 'anim-test-seq-item 1 "**END**"))) + (logior! (-> s5-1 flags) 1) + (glst-add-tail (-> gp-1 item-list) s5-1) + (set! (-> s5-1 parent) gp-1) ) ) + (send-event (ppointer->process *anim-tester*) 'edit-sequence) ) ) ) - (else - (format #t "ERROR:no object selected~%") - ) + ) + (else + (format #t "ERROR:no object selected~%") ) ) ) - (else - (format #t "ERROR:no object loaded~%") - ) ) - (none) + (else + (format #t "ERROR:no object loaded~%") + ) ) + (none) ) ) diff --git a/test/decompiler/reference/engine/entity/actor-link-h_REF.gc b/test/decompiler/reference/engine/entity/actor-link-h_REF.gc index a3cbb08967..b6277e4eb2 100644 --- a/test/decompiler/reference/engine/entity/actor-link-h_REF.gc +++ b/test/decompiler/reference/engine/entity/actor-link-h_REF.gc @@ -265,47 +265,33 @@ ;; definition for method 23 of type actor-link-info ;; INFO: Return type mismatch int vs none. (defmethod send-to-next actor-link-info ((obj actor-link-info) (arg0 symbol)) - (with-pp - (let ((a0-1 (-> obj next))) - (when a0-1 - (let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process))) - (when a0-2 - (let ((v1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-4 from) pp) - (set! (-> v1-4 num-params) 0) - (set! (-> v1-4 message) arg0) - (send-event-function a0-2 v1-4) - ) - ) + (let ((a0-1 (-> obj next))) + (when a0-1 + (let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process))) + (if a0-2 + (send-event a0-2 arg0) ) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for method 24 of type actor-link-info ;; INFO: Return type mismatch int vs none. (defmethod send-to-prev actor-link-info ((obj actor-link-info) (arg0 symbol)) - (with-pp - (let ((a0-1 (-> obj prev))) - (when a0-1 - (let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process))) - (when a0-2 - (let ((v1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-4 from) pp) - (set! (-> v1-4 num-params) 0) - (set! (-> v1-4 message) arg0) - (send-event-function a0-2 v1-4) - ) - ) + (let ((a0-1 (-> obj prev))) + (when a0-1 + (let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process))) + (if a0-2 + (send-event a0-2 arg0) ) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for method 22 of type actor-link-info diff --git a/test/decompiler/reference/engine/game/effect-control_REF.gc b/test/decompiler/reference/engine/game/effect-control_REF.gc index af21783ffc..de8cce0569 100644 --- a/test/decompiler/reference/engine/game/effect-control_REF.gc +++ b/test/decompiler/reference/engine/game/effect-control_REF.gc @@ -674,13 +674,7 @@ ) ) ) - (let ((a1-46 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-46 from) pp) - (set! (-> a1-46 num-params) 1) - (set! (-> a1-46 message) 'death-start) - (set! (-> a1-46 param 0) (the-as uint s3-0)) - (send-event-function (-> obj process) a1-46) - ) + (send-event (-> obj process) 'death-start (the-as death-info s3-0)) ) (else (dummy-12 diff --git a/test/decompiler/reference/engine/game/game-info_REF.gc b/test/decompiler/reference/engine/game/game-info_REF.gc index f04f100987..5c2fd3ac58 100644 --- a/test/decompiler/reference/engine/game/game-info_REF.gc +++ b/test/decompiler/reference/engine/game/game-info_REF.gc @@ -173,202 +173,187 @@ (continue-point-override string) ) (local-vars (v0-0 int) (sv-96 symbol)) - (with-pp - (case cause - (('dead) - (+! (-> obj total-deaths) 1) - (+! (-> obj continue-deaths) 1) - (+! (-> obj fuel-cell-deaths) 1) - (when *target* - (let ((lev-info (-> *target* current-level info))) - (set! - v0-0 - (when (>= (-> *level-task-data-remap* length) (-> lev-info index)) - (set! - v0-0 - (seekl - (the-as - int - (-> - obj - deaths-per-level - (-> *level-task-data-remap* (+ (-> lev-info index) -1)) - ) - ) - 255 - 1 - ) - ) - (set! - (-> - obj - deaths-per-level - (-> *level-task-data-remap* (+ (-> lev-info index) -1)) - ) - (the-as uint v0-0) - ) + (case cause + (('dead) + (+! (-> obj total-deaths) 1) + (+! (-> obj continue-deaths) 1) + (+! (-> obj fuel-cell-deaths) 1) + (when *target* + (let ((lev-info (-> *target* current-level info))) + (set! + v0-0 + (when (>= (-> *level-task-data-remap* length) (-> lev-info index)) + (set! v0-0 - ) - ) - ) - ) - (case (-> obj mode) - (('play) - (if (< 0.0 (-> obj life)) - (set! cause 'life) - (set! cause 'try) - ) - ) - (else - (set! obj obj) - (goto cfg-50) - ) - ) - ) - ) - (kill-current-level-hint '() '() 'die) - (case cause - (('game) - (reset-all-hint-controls) - (set-continue! obj (cond - (continue-point-override - (empty) - continue-point-override - ) - ((!= *kernel-boot-message* 'play) - "demo-start" - ) - (*debug-segment* - "village1-hut" - ) - (else - "title-start" - ) - ) - ) - (set! (-> obj auto-save-count) 0) - (set! (-> *setting-control* default auto-save) #f) - (set! (-> obj money) 0.0) - (set! (-> obj fuel) 0.0) - (set! (-> obj money-total) 0.0) - (set! (-> obj buzzer-total) 0.0) - (set! (-> obj perm-list length) 0) - (clear-all! (-> obj text-ids-seen)) - (set! (-> obj death-movie-tick) (rand-vu-int-count 10)) - (set! (-> obj total-deaths) 0) - (set! (-> obj continue-deaths) 0) - (set! (-> obj fuel-cell-deaths) 0) - (set! (-> obj death-pos length) 0) - (set! (-> obj game-start-time) (-> *display* base-frame-counter)) - (set! (-> obj fuel-cell-pickup-time) (-> *display* base-frame-counter)) - (set! (-> obj continue-time) (-> *display* base-frame-counter)) - (set! (-> obj death-time) (-> *display* base-frame-counter)) - (set! (-> obj hit-time) (-> *display* base-frame-counter)) - (dotimes (v1-50 116) - (set! (-> obj fuel-cell-time 0) 0) - (nop!) - ) - (dotimes (v1-53 32) - (set! (-> obj money-per-level v1-53) (the-as uint 0)) - (set! (-> obj deaths-per-level v1-53) (the-as uint 0)) - (set! (-> obj enter-level-time v1-53) 0) - (set! (-> obj in-level-time v1-53) 0) - (set! (-> obj level-opened v1-53) (the-as uint 0)) - (nop!) - ) - ) - ) - (case cause - (('game 'try) - (case (-> obj mode) - (('play) - (set! *display-profile* #f) - (set! *display-entity-errors* #f) - ) - ) - (set! (-> obj life-max) (-> *GAME-bank* life-max-default)) - (set! (-> obj life) (-> *GAME-bank* life-start-default)) - ) - ) - (let ((v1-65 (-> obj mode))) - (cond - ((= v1-65 'debug) - (reset-actors cause) - (if save-to-load - (load-game! obj save-to-load) - ) - ) - ((= 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*) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) pp) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'die) - (send-event-function - (handle->process (-> *game-info* auto-save-proc)) - a1-11 - ) - ) - (set! (-> *level* border?) #f) - (set! (-> *setting-control* default border-mode) #f) - (set! *spawn-actors* #f) - (set-blackout-frames 30) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) pp) - (set! (-> a1-12 num-params) 0) - (set! (-> a1-12 message) 'reset) - (send-event-function *target* a1-12) - ) - (let ((s3-1 (get-process *4k-dead-pool* process #x4000))) - (when s3-1 - (let ((t9-15 (method-of-type process activate))) - (t9-15 s3-1 *default-pool* 'process (the-as pointer #x70004000)) - ) - (let - ((s2-0 + (seekl (the-as - (function cpu-thread function object object object object pointer) - set-to-run - ) - ) - (s1-0 (-> s3-1 main-thread)) - (s0-0 - (lambda - ((arg0 symbol) (arg1 symbol) (arg2 continue-point) (arg3 symbol)) - (stop arg0) - (reset-actors arg1) - (set-continue! *game-info* arg2) - (when arg3 - (load-game! *game-info* (the-as game-save arg3)) - (set! arg2 (get-or-create-continue! *game-info*)) + int + (-> + obj + deaths-per-level + (-> *level-task-data-remap* (+ (-> lev-info index) -1)) ) - (suspend) - (start arg0 arg2) - (none) ) + 255 + 1 ) ) - (set! sv-96 (-> obj mode)) - (let ((t0-2 (get-or-create-continue! obj)) - (t1-2 save-to-load) - ) - (s2-0 s1-0 s0-0 sv-96 cause t0-2 t1-2) + (set! + (-> + obj + deaths-per-level + (-> *level-task-data-remap* (+ (-> lev-info index) -1)) + ) + (the-as uint v0-0) ) + v0-0 ) - (-> s3-1 ppointer) ) ) - (set-master-mode 'game) + ) + (case (-> obj mode) + (('play) + (if (< 0.0 (-> obj life)) + (set! cause 'life) + (set! cause 'try) + ) + ) + (else + (set! obj obj) + (goto cfg-50) + ) ) ) - ) - (label cfg-50) - obj ) + (kill-current-level-hint '() '() 'die) + (case cause + (('game) + (reset-all-hint-controls) + (set-continue! obj (cond + (continue-point-override + (empty) + continue-point-override + ) + ((!= *kernel-boot-message* 'play) + "demo-start" + ) + (*debug-segment* + "village1-hut" + ) + (else + "title-start" + ) + ) + ) + (set! (-> obj auto-save-count) 0) + (set! (-> *setting-control* default auto-save) #f) + (set! (-> obj money) 0.0) + (set! (-> obj fuel) 0.0) + (set! (-> obj money-total) 0.0) + (set! (-> obj buzzer-total) 0.0) + (set! (-> obj perm-list length) 0) + (clear-all! (-> obj text-ids-seen)) + (set! (-> obj death-movie-tick) (rand-vu-int-count 10)) + (set! (-> obj total-deaths) 0) + (set! (-> obj continue-deaths) 0) + (set! (-> obj fuel-cell-deaths) 0) + (set! (-> obj death-pos length) 0) + (set! (-> obj game-start-time) (-> *display* base-frame-counter)) + (set! (-> obj fuel-cell-pickup-time) (-> *display* base-frame-counter)) + (set! (-> obj continue-time) (-> *display* base-frame-counter)) + (set! (-> obj death-time) (-> *display* base-frame-counter)) + (set! (-> obj hit-time) (-> *display* base-frame-counter)) + (dotimes (v1-50 116) + (set! (-> obj fuel-cell-time 0) 0) + (nop!) + ) + (dotimes (v1-53 32) + (set! (-> obj money-per-level v1-53) (the-as uint 0)) + (set! (-> obj deaths-per-level v1-53) (the-as uint 0)) + (set! (-> obj enter-level-time v1-53) 0) + (set! (-> obj in-level-time v1-53) 0) + (set! (-> obj level-opened v1-53) (the-as uint 0)) + (nop!) + ) + ) + ) + (case cause + (('game 'try) + (case (-> obj mode) + (('play) + (set! *display-profile* #f) + (set! *display-entity-errors* #f) + ) + ) + (set! (-> obj life-max) (-> *GAME-bank* life-max-default)) + (set! (-> obj life) (-> *GAME-bank* life-start-default)) + ) + ) + (let ((v1-65 (-> obj mode))) + (cond + ((= v1-65 'debug) + (reset-actors cause) + (if save-to-load + (load-game! obj save-to-load) + ) + ) + ((= 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*) + ) + (send-event (handle->process (-> *game-info* auto-save-proc)) 'die) + (set! (-> *level* border?) #f) + (set! (-> *setting-control* default border-mode) #f) + (set! *spawn-actors* #f) + (set-blackout-frames 30) + (send-event *target* 'reset) + (let ((s3-1 (get-process *4k-dead-pool* process #x4000))) + (when s3-1 + (let ((t9-15 (method-of-type process activate))) + (t9-15 s3-1 *default-pool* 'process (the-as pointer #x70004000)) + ) + (let + ((s2-0 + (the-as + (function cpu-thread function object object object object pointer) + set-to-run + ) + ) + (s1-0 (-> s3-1 main-thread)) + (s0-0 + (lambda + ((arg0 symbol) (arg1 symbol) (arg2 continue-point) (arg3 symbol)) + (stop arg0) + (reset-actors arg1) + (set-continue! *game-info* arg2) + (when arg3 + (load-game! *game-info* (the-as game-save arg3)) + (set! arg2 (get-or-create-continue! *game-info*)) + ) + (suspend) + (start arg0 arg2) + (none) + ) + ) + ) + (set! sv-96 (-> obj mode)) + (let ((t0-2 (get-or-create-continue! obj)) + (t1-2 save-to-load) + ) + (s2-0 s1-0 s0-0 sv-96 cause t0-2 t1-2) + ) + ) + (-> s3-1 ppointer) + ) + ) + (set-master-mode 'game) + ) + ) + ) + (label cfg-50) + obj ) ;; definition for method 10 of type game-info @@ -572,300 +557,25 @@ (amount float) (source-handle handle) ) - (with-pp - (case kind - (((pickup-type eco-green)) - (cond - ((>= amount 0.0) - (when (< 0.0 amount) - (if - (or - (!= - (handle->process source-handle) - (handle->process (-> obj eco-source)) - ) - (>= - (- - (-> *display* base-frame-counter) - (the-as int (-> obj eco-source-time)) - ) - 150 - ) + (case kind + (((pickup-type eco-green)) + (cond + ((>= amount 0.0) + (when (< 0.0 amount) + (if + (or + (!= + (handle->process source-handle) + (handle->process (-> obj eco-source)) ) - (sound-play-by-name - (static-sound-name "get-green-eco") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) - ) - ) - (when (handle->process source-handle) - (set! (-> obj eco-source) source-handle) - (set! - (-> obj eco-source-time) - (the-as uint (-> *display* base-frame-counter)) - ) - ) - ) - (if (= (-> obj health) (-> obj health-max)) - (pickup-collectable! - obj - (pickup-type eco-pill) - (-> *FACT-bank* eco-pill-max-default) - (process->handle (-> obj process)) - ) - ) - (set! - (-> obj health-pickup-time) - (the-as uint (-> *display* base-frame-counter)) - ) - (set! (-> obj health) (seek (-> obj health) (-> obj health-max) amount)) - ) - (else - (set! (-> obj health) (seek (-> obj health) 0.0 (- amount))) - (if (>= amount -10.0) - (pickup-collectable! obj (pickup-type eco-pill) 0.0 source-handle) - ) - (if (= (-> obj health) 0.0) - (adjust - (-> (the-as target (-> obj process)) game) - 'life - (- (-> *GAME-bank* life-single-inc)) - source-handle - ) - ) - ) - ) - (b! - (and - (logtest? - (-> - (the-as collide-shape (-> obj process root)) - root-prim - prim-core - action - ) - 512 - ) - (type-type? (-> (handle->process source-handle) type) vent) - ) - cfg-80 - :delay - (nop!) - ) - (-> obj health) - ) - (((pickup-type eco-pill)) - (when (>= amount 0.0) - (set! - (-> obj eco-pill-pickup-time) - (the-as uint (-> *display* base-frame-counter)) - ) - (set! - (-> obj eco-pill) - (seek (-> obj eco-pill) (-> obj eco-pill-max) amount) - ) - (when - (and - (>= (-> obj eco-pill) (-> *FACT-bank* eco-pill-max-default)) - (< (-> obj health) (-> obj health-max)) - ) - (set! - (-> obj eco-pill) - (- (-> obj eco-pill) (-> *FACT-bank* eco-pill-max-default)) - ) - (pickup-collectable! - obj - (pickup-type eco-green) - (-> *FACT-bank* health-small-inc) - (process->handle (-> obj process)) - ) - ) - ) - (-> obj eco-pill) - ) - (((pickup-type money)) - (when (< 0.0 amount) - (if - (>= - (- - (-> *display* base-frame-counter) - (the-as int (-> obj money-pickup-time)) - ) - 15 - ) - (sound-play-by-name - (static-sound-name "money-pickup") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) - ) - ) - (set! - (-> obj money-pickup-time) - (the-as uint (-> *display* base-frame-counter)) - ) - ) - (adjust - (-> (the-as target (-> obj process)) game) - 'money - amount - source-handle - ) - ) - (((pickup-type fuel-cell)) - (let ((s4-2 (the int amount))) - (if - (not - (or - (task-complete? - (-> (the-as target (-> obj process)) game) - (the-as game-task s4-2) - ) - (>= (the-as uint 1) (the-as uint s4-2)) - ) - ) - (set! - (-> obj fuel-cell-pickup-time) - (the-as uint (-> *display* base-frame-counter)) - ) - ) - ) - (adjust - (-> (the-as target (-> obj process)) game) - 'fuel-cell - amount - source-handle - ) - ) - (((pickup-type buzzer)) - (let - ((buzz-count - (adjust - (-> (the-as target (-> obj process)) game) - 'buzzer - amount - source-handle - ) - ) - ) - (if (!= buzz-count (-> obj buzzer)) - (set! - (-> obj buzzer-pickup-time) - (the-as uint (-> *display* base-frame-counter)) - ) - ) - (set! (-> obj buzzer) buzz-count) - ) - (-> obj buzzer) - ) - (((pickup-type eco-red) (pickup-type eco-blue) (pickup-type eco-yellow)) - (label cfg-80) - (if (= amount 0.0) - (return (if (= (-> obj eco-type) kind) - (-> obj eco-level) - 0.0 - ) - ) - ) - (when (!= (-> obj eco-type) kind) - (set! (-> obj eco-level) 0.0) - (set! (-> obj eco-timeout) 0) - 0 - ) - (set! (-> obj eco-type) (the-as int kind)) - (let ((eco-lev (-> obj eco-level))) - (set! (-> obj eco-level) 1.0) - (when (and (= eco-lev 0.0) (< 0.0 (-> obj eco-level))) - (set! - (-> obj eco-pickup-time) - (the-as uint (-> *display* game-frame-counter)) - ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) pp) - (set! (-> a1-24 num-params) 0) - (set! (-> a1-24 message) 'reset-collide) - (send-event-function (-> obj process) a1-24) - ) - ) - (set! - (-> obj eco-timeout) - (min - (the-as - int - (+ - (-> obj eco-timeout) - (* (the-as int (-> *FACT-bank* eco-single-timeout)) (the int amount)) - ) - ) - (the-as - int - (+ - (-> *FACT-bank* eco-full-timeout) - (- - (-> *display* game-frame-counter) - (the-as int (-> obj eco-pickup-time)) - ) - ) - ) - ) - ) - (if - (>= - (the-as - int - (- - (-> obj eco-timeout) - (the-as - uint + (>= (- - (-> *display* game-frame-counter) - (the-as int (-> obj eco-pickup-time)) + (-> *display* base-frame-counter) + (the-as int (-> obj eco-source-time)) ) + 150 ) ) - ) - (the-as int (-> *FACT-bank* eco-full-timeout)) - ) - (set! (-> obj eco-level) 2.0) - ) - (when - (not - (and - (= - (handle->process source-handle) - (handle->process (-> obj eco-source)) - ) - (< - (- - (-> *display* base-frame-counter) - (the-as int (-> obj eco-source-time)) - ) - 150 - ) - ) - ) - (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 60) - (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 17 60) - (case kind - (((pickup-type eco-blue)) - (sound-play-by-name - (static-sound-name "get-blue-eco") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) - ) - ) - (((pickup-type eco-green)) (sound-play-by-name (static-sound-name "get-green-eco") (new-sound-id) @@ -876,196 +586,394 @@ (the-as vector #t) ) ) - (((pickup-type eco-yellow)) - (sound-play-by-name - (static-sound-name "get-yellow-eco") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) - ) - ) - (((pickup-type eco-red)) - (sound-play-by-name - (static-sound-name "get-red-eco") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) + (when (handle->process source-handle) + (set! (-> obj eco-source) source-handle) + (set! + (-> obj eco-source-time) + (the-as uint (-> *display* base-frame-counter)) ) ) ) + (if (= (-> obj health) (-> obj health-max)) + (pickup-collectable! + obj + (pickup-type eco-pill) + (-> *FACT-bank* eco-pill-max-default) + (process->handle (-> obj process)) + ) + ) + (set! + (-> obj health-pickup-time) + (the-as uint (-> *display* base-frame-counter)) + ) + (set! (-> obj health) (seek (-> obj health) (-> obj health-max) amount)) + ) + (else + (set! (-> obj health) (seek (-> obj health) 0.0 (- amount))) + (if (>= amount -10.0) + (pickup-collectable! obj (pickup-type eco-pill) 0.0 source-handle) + ) + (if (= (-> obj health) 0.0) + (adjust + (-> (the-as target (-> obj process)) game) + 'life + (- (-> *GAME-bank* life-single-inc)) + source-handle + ) + ) + ) + ) + (b! + (and + (logtest? + (-> + (the-as collide-shape (-> obj process root)) + root-prim + prim-core + action + ) + 512 + ) + (type-type? (-> (handle->process source-handle) type) vent) + ) + cfg-80 + :delay + (nop!) + ) + (-> obj health) + ) + (((pickup-type eco-pill)) + (when (>= amount 0.0) + (set! + (-> obj eco-pill-pickup-time) + (the-as uint (-> *display* base-frame-counter)) + ) + (set! + (-> obj eco-pill) + (seek (-> obj eco-pill) (-> obj eco-pill-max) amount) + ) + (when + (and + (>= (-> obj eco-pill) (-> *FACT-bank* eco-pill-max-default)) + (< (-> obj health) (-> obj health-max)) ) - (set! (-> obj eco-source) source-handle) (set! - (-> obj eco-source-time) + (-> obj eco-pill) + (- (-> obj eco-pill) (-> *FACT-bank* eco-pill-max-default)) + ) + (pickup-collectable! + obj + (pickup-type eco-green) + (-> *FACT-bank* health-small-inc) + (process->handle (-> obj process)) + ) + ) + ) + (-> obj eco-pill) + ) + (((pickup-type money)) + (when (< 0.0 amount) + (if + (>= + (- + (-> *display* base-frame-counter) + (the-as int (-> obj money-pickup-time)) + ) + 15 + ) + (sound-play-by-name + (static-sound-name "money-pickup") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (set! + (-> obj money-pickup-time) + (the-as uint (-> *display* base-frame-counter)) + ) + ) + (adjust + (-> (the-as target (-> obj process)) game) + 'money + amount + source-handle + ) + ) + (((pickup-type fuel-cell)) + (let ((s4-2 (the int amount))) + (if + (not + (or + (task-complete? + (-> (the-as target (-> obj process)) game) + (the-as game-task s4-2) + ) + (>= (the-as uint 1) (the-as uint s4-2)) + ) + ) + (set! + (-> obj fuel-cell-pickup-time) (the-as uint (-> *display* base-frame-counter)) ) - (when (= kind (pickup-type eco-blue)) - (when (= eco-lev 0.0) - (let ((s5-1 (-> obj process))) - (let* ((s3-5 (get-process *default-dead-pool* touch-tracker #x4000)) - (s4-3 (when s3-5 - (let ((t9-28 (method-of-type touch-tracker activate))) - (t9-28 - (the-as touch-tracker s3-5) - s5-1 - 'touch-tracker - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s3-5 - touch-tracker-init - (-> s5-1 root trans) - (-> *FACT-bank* suck-bounce-dist) - 300 - ) - (-> s3-5 ppointer) - ) - ) - ) - (let ((a1-44 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-44 from) pp) - (set! (-> a1-44 num-params) 1) - (set! (-> a1-44 message) 'target) - (set! (-> a1-44 param 0) (the-as uint s5-1)) - (send-event-function (ppointer->process s4-3) a1-44) - ) - (let ((a1-45 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-45 from) pp) - (set! (-> a1-45 num-params) 1) - (set! (-> a1-45 message) 'event) - (set! (-> a1-45 param 0) (the-as uint 'eco-blue)) - (send-event-function (ppointer->process s4-3) a1-45) - ) - (let ((a1-46 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-46 from) pp) - (set! (-> a1-46 num-params) 1) - (set! (-> a1-46 message) 'exit) - (set! (-> a1-46 param 0) (the-as uint (lambda () - (with-pp - (let - ((a1-0 - (new 'stack-no-clear 'event-message-block - ) - ) - ) - (set! (-> a1-0 from) pp) - (set! - (-> a1-0 num-params) - 2 - ) - (set! - (-> a1-0 message) - 'query - ) - (set! - (-> a1-0 param 0) - (the-as uint 'powerup) - ) - (set! - (-> a1-0 param 1) - (the-as uint 3) - ) - (send-event-function - *target* - a1-0 - ) - ) - ) - ) - ) - ) - (send-event-function (ppointer->process s4-3) a1-46) - ) - (let ((a1-47 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-47 from) pp) - (set! (-> a1-47 num-params) 1) - (set! (-> a1-47 message) 'eval) - (set! - (-> a1-47 param 0) - (the-as - uint - (lambda :behavior process-drawable - () - (set! - (-> (the-as collide-shape (-> self root)) root-prim collide-with) - (the-as uint #x800e) - ) - (none) + ) + ) + (adjust + (-> (the-as target (-> obj process)) game) + 'fuel-cell + amount + source-handle + ) + ) + (((pickup-type buzzer)) + (let + ((buzz-count + (adjust + (-> (the-as target (-> obj process)) game) + 'buzzer + amount + source-handle + ) + ) + ) + (if (!= buzz-count (-> obj buzzer)) + (set! + (-> obj buzzer-pickup-time) + (the-as uint (-> *display* base-frame-counter)) + ) + ) + (set! (-> obj buzzer) buzz-count) + ) + (-> obj buzzer) + ) + (((pickup-type eco-red) (pickup-type eco-blue) (pickup-type eco-yellow)) + (label cfg-80) + (if (= amount 0.0) + (return (if (= (-> obj eco-type) kind) + (-> obj eco-level) + 0.0 ) - ) - ) - (send-event-function (ppointer->process s4-3) a1-47) - ) - ) - (let ((s4-4 (get-process *4k-dead-pool* process #x4000))) - (when s4-4 - (let ((t9-35 (method-of-type process activate))) - (t9-35 s4-4 s5-1 'process (the-as pointer #x70004000)) - ) - (run-next-time-in-process s4-4 (lambda ((arg0 process-drawable)) - (with-pp - (let - ((s5-0 - (-> *display* base-frame-counter) - ) - ) - (until - (>= - (- - (-> - *display* - base-frame-counter - ) - s5-0 - ) - 180 - ) - (let - ((a1-0 - (new 'stack-no-clear 'event-message-block - ) - ) - ) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'effect) - (set! - (-> a1-0 param 0) - (the-as uint 'eco-blue) - ) - (send-event-function arg0 a1-0) - ) - (suspend) - ) - ) - (none) - ) - ) - s5-1 - ) - (-> s4-4 ppointer) - ) + ) + ) + (when (!= (-> obj eco-type) kind) + (set! (-> obj eco-level) 0.0) + (set! (-> obj eco-timeout) 0) + 0 + ) + (set! (-> obj eco-type) (the-as int kind)) + (let ((eco-lev (-> obj eco-level))) + (set! (-> obj eco-level) 1.0) + (when (and (= eco-lev 0.0) (< 0.0 (-> obj eco-level))) + (set! + (-> obj eco-pickup-time) + (the-as uint (-> *display* game-frame-counter)) + ) + (send-event (-> obj process) 'reset-collide) + ) + (set! + (-> obj eco-timeout) + (min + (the-as + int + (+ + (-> obj eco-timeout) + (* (the-as int (-> *FACT-bank* eco-single-timeout)) (the int amount)) + ) + ) + (the-as + int + (+ + (-> *FACT-bank* eco-full-timeout) + (- + (-> *display* game-frame-counter) + (the-as int (-> obj eco-pickup-time)) ) ) ) ) ) - (-> obj eco-level) - ) - (else - ((method-of-type fact-info pickup-collectable!) - obj - kind - amount - source-handle + (if + (>= + (the-as + int + (- + (-> obj eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> obj eco-pickup-time)) + ) + ) + ) + ) + (the-as int (-> *FACT-bank* eco-full-timeout)) + ) + (set! (-> obj eco-level) 2.0) ) + (when + (not + (and + (= + (handle->process source-handle) + (handle->process (-> obj eco-source)) + ) + (< + (- + (-> *display* base-frame-counter) + (the-as int (-> obj eco-source-time)) + ) + 150 + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 60) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 17 60) + (case kind + (((pickup-type eco-blue)) + (sound-play-by-name + (static-sound-name "get-blue-eco") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (((pickup-type eco-green)) + (sound-play-by-name + (static-sound-name "get-green-eco") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (((pickup-type eco-yellow)) + (sound-play-by-name + (static-sound-name "get-yellow-eco") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (((pickup-type eco-red)) + (sound-play-by-name + (static-sound-name "get-red-eco") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + ) + ) + (set! (-> obj eco-source) source-handle) + (set! + (-> obj eco-source-time) + (the-as uint (-> *display* base-frame-counter)) + ) + (when (= kind (pickup-type eco-blue)) + (when (= eco-lev 0.0) + (let ((s5-1 (-> obj process))) + (let* ((s3-5 (get-process *default-dead-pool* touch-tracker #x4000)) + (s4-3 (when s3-5 + (let ((t9-28 (method-of-type touch-tracker activate))) + (t9-28 + (the-as touch-tracker s3-5) + s5-1 + 'touch-tracker + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-5 + touch-tracker-init + (-> s5-1 root trans) + (-> *FACT-bank* suck-bounce-dist) + 300 + ) + (-> s3-5 ppointer) + ) + ) + ) + (send-event (ppointer->process s4-3) 'target s5-1) + (send-event (ppointer->process s4-3) 'event 'eco-blue) + (send-event (ppointer->process s4-3) 'exit (lambda () + (send-event + *target* + 'query + 'powerup + 3 + ) + ) + ) + (send-event + (ppointer->process s4-3) + 'eval + (lambda :behavior process-drawable + () + (set! + (-> (the-as collide-shape (-> self root)) root-prim collide-with) + (the-as uint #x800e) + ) + (none) + ) + ) + ) + (let ((s4-4 (get-process *4k-dead-pool* process #x4000))) + (when s4-4 + (let ((t9-35 (method-of-type process activate))) + (t9-35 s4-4 s5-1 'process (the-as pointer #x70004000)) + ) + (run-next-time-in-process s4-4 (lambda ((arg0 process-drawable)) + (let + ((s5-0 + (-> *display* base-frame-counter) + ) + ) + (until + (>= + (- + (-> *display* base-frame-counter) + s5-0 + ) + 180 + ) + (send-event arg0 'effect 'eco-blue) + (suspend) + ) + ) + (none) + ) + s5-1 + ) + (-> s4-4 ppointer) + ) + ) + ) + ) + ) + ) + (-> obj eco-level) + ) + (else + ((method-of-type fact-info pickup-collectable!) + obj + kind + amount + source-handle ) ) ) diff --git a/test/decompiler/reference/engine/game/projectiles_REF.gc b/test/decompiler/reference/engine/game/projectiles_REF.gc index 212d0de207..b5b62fa744 100644 --- a/test/decompiler/reference/engine/game/projectiles_REF.gc +++ b/test/decompiler/reference/engine/game/projectiles_REF.gc @@ -227,108 +227,101 @@ (sv-80 int) (sv-224 symbol) ) - (with-pp - (set! sv-64 (new-stack-vector0)) - (set! sv-68 (new-stack-vector0)) - (set! sv-72 (new 'stack-no-clear 'matrix)) - (set! sv-80 0) - (set! (-> sv-72 vector 0 quad) (-> arg3 quad)) - (vector-float*! - (new 'stack-no-clear 'vector) - (-> arg1 move-vec) - (-> arg1 best-u) - ) - (TODO-RENAME-28 arg0) - (dummy-56 arg0 (-> arg1 best-tri pat)) - (case (-> arg1 best-tri pat material) - (((pat-material stopproj)) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'die) - (send-event-function (-> arg0 process) a1-3) - ) - ) - ) - (vector-! - sv-64 - (the-as vector (-> arg1 best-from-prim prim-core)) - (-> arg1 best-tri intersect) - ) - (set! (-> sv-64 w) 1.0) - (vector-normalize! sv-64 1.0) - (set! (-> arg0 coverage) (vector-dot sv-64 (-> arg1 best-tri normal))) - (let ((v1-22 (-> sv-64 quad))) - (set! (-> sv-68 quad) v1-22) - ) - (when (= (-> arg1 best-u) 0.0) - (vector-float*! (new 'stack-no-clear 'vector) sv-68 32.0) - (TODO-RENAME-28 arg0) - ) - (set! (-> arg0 surface-normal quad) (-> sv-68 quad)) - (set! (-> arg0 poly-normal quad) (-> arg1 best-tri normal quad)) - (set! - (-> arg0 surface-angle) - (vector-dot sv-68 (-> arg0 dynam gravity-normal)) - ) - (set! - (-> arg0 poly-angle) - (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal)) - ) - (set! - (-> arg0 touch-angle) - (vector-dot - sv-68 - (vector-normalize! - (vector-negate! (new-stack-vector0) (the-as vector sv-72)) - 1.0 - ) - ) - ) - (if (< (-> arg0 poly-angle) -0.2) - (set! sv-80 (logior sv-80 16)) - ) - (set! - sv-224 - (< - (fabs (-> arg0 surface-angle)) - (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle) - ) - ) - (if (zero? (logand (-> arg0 prev-status) 1)) - (set! - (-> arg0 ground-impact-vel) - (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))) - ) - ) - (set! sv-80 (logior sv-80 4)) - (if (-> arg1 best-to-prim) - (set! sv-80 (logior sv-80 32)) - ) - (cond - (sv-224 - (set! sv-80 (logior sv-80 8)) - (set! (-> arg0 cur-pat mode) 1) - (set! (-> arg0 local-normal quad) (-> sv-68 quad)) - ) - (else - (set! sv-80 (logior sv-80 1)) - (set! (-> arg0 local-normal quad) (-> sv-68 quad)) - ) - ) - (vector-reflect-flat-above! arg2 (the-as vector sv-72) sv-68) - (when (and (not sv-224) (>= (-> arg0 coverage) 0.9)) - (set! sv-80 (logior sv-80 2)) - (set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad)) - (when (!= (-> arg0 poly-pat mode) (pat-mode wall)) - (set! (-> arg0 ground-pat) (-> arg0 poly-pat)) - (set! (-> arg0 ground-touch-point quad) (-> arg1 best-tri intersect quad)) - ) - ) - (logior! (-> arg0 status) sv-80) - sv-80 - (none) + (set! sv-64 (new-stack-vector0)) + (set! sv-68 (new-stack-vector0)) + (set! sv-72 (new 'stack-no-clear 'matrix)) + (set! sv-80 0) + (set! (-> sv-72 vector 0 quad) (-> arg3 quad)) + (vector-float*! + (new 'stack-no-clear 'vector) + (-> arg1 move-vec) + (-> arg1 best-u) ) + (TODO-RENAME-28 arg0) + (dummy-56 arg0 (-> arg1 best-tri pat)) + (case (-> arg1 best-tri pat material) + (((pat-material stopproj)) + (send-event (-> arg0 process) 'die) + ) + ) + (vector-! + sv-64 + (the-as vector (-> arg1 best-from-prim prim-core)) + (-> arg1 best-tri intersect) + ) + (set! (-> sv-64 w) 1.0) + (vector-normalize! sv-64 1.0) + (set! (-> arg0 coverage) (vector-dot sv-64 (-> arg1 best-tri normal))) + (let ((v1-22 (-> sv-64 quad))) + (set! (-> sv-68 quad) v1-22) + ) + (when (= (-> arg1 best-u) 0.0) + (vector-float*! (new 'stack-no-clear 'vector) sv-68 32.0) + (TODO-RENAME-28 arg0) + ) + (set! (-> arg0 surface-normal quad) (-> sv-68 quad)) + (set! (-> arg0 poly-normal quad) (-> arg1 best-tri normal quad)) + (set! + (-> arg0 surface-angle) + (vector-dot sv-68 (-> arg0 dynam gravity-normal)) + ) + (set! + (-> arg0 poly-angle) + (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal)) + ) + (set! + (-> arg0 touch-angle) + (vector-dot + sv-68 + (vector-normalize! + (vector-negate! (new-stack-vector0) (the-as vector sv-72)) + 1.0 + ) + ) + ) + (if (< (-> arg0 poly-angle) -0.2) + (set! sv-80 (logior sv-80 16)) + ) + (set! + sv-224 + (< + (fabs (-> arg0 surface-angle)) + (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle) + ) + ) + (if (zero? (logand (-> arg0 prev-status) 1)) + (set! + (-> arg0 ground-impact-vel) + (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))) + ) + ) + (set! sv-80 (logior sv-80 4)) + (if (-> arg1 best-to-prim) + (set! sv-80 (logior sv-80 32)) + ) + (cond + (sv-224 + (set! sv-80 (logior sv-80 8)) + (set! (-> arg0 cur-pat mode) 1) + (set! (-> arg0 local-normal quad) (-> sv-68 quad)) + ) + (else + (set! sv-80 (logior sv-80 1)) + (set! (-> arg0 local-normal quad) (-> sv-68 quad)) + ) + ) + (vector-reflect-flat-above! arg2 (the-as vector sv-72) sv-68) + (when (and (not sv-224) (>= (-> arg0 coverage) 0.9)) + (set! sv-80 (logior sv-80 2)) + (set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad)) + (when (!= (-> arg0 poly-pat mode) (pat-mode wall)) + (set! (-> arg0 ground-pat) (-> arg0 poly-pat)) + (set! (-> arg0 ground-touch-point quad) (-> arg1 best-tri intersect quad)) + ) + ) + (logior! (-> arg0 status) sv-80) + sv-80 + (none) ) ;; failed to figure out what this is: @@ -981,16 +974,8 @@ ) ) (let ((v1-14 (-> self notify-handle))) - (when (handle->process v1-14) - (let - ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 2) - (set! (-> a1-7 message) 'notify) - (set! (-> a1-7 param 0) (the-as uint 'attack)) - (set! (-> a1-7 param 1) (the-as uint arg0)) - (send-event-function (-> v1-14 process 0) a1-7) - ) + (if (handle->process v1-14) + (send-event (-> v1-14 process 0) 'notify 'attack arg0) ) ) (+! (-> self hits) 1) @@ -1303,14 +1288,8 @@ :code (behavior () (let ((v1-0 (-> self notify-handle))) - (when (handle->process v1-0) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'notify) - (set! (-> a1-4 param 0) (the-as uint 'die)) - (send-event-function (-> v1-0 process 0) a1-4) - ) + (if (handle->process v1-0) + (send-event (-> v1-0 process 0) 'notify 'die) ) ) (dummy-18 self) 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 37d644c04e..1a970c955a 100644 --- a/test/decompiler/reference/engine/game/task/process-taskable_REF.gc +++ b/test/decompiler/reference/engine/game/task/process-taskable_REF.gc @@ -376,14 +376,7 @@ :trans (behavior () (when (process-release? *target*) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'trans) - (set! (-> a1-0 param 0) (the-as uint 'restore)) - (set! (-> a1-0 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-0) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) (if (should-display? self) (go-virtual idle) (go-virtual hidden) @@ -408,32 +401,13 @@ ((nonzero? (-> self cell-for-task)) (let ((gp-0 (handle->process (-> self cell-x)))) (when gp-0 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'trans) - (set! (-> a1-1 param 0) (the-as uint 'reset)) - (send-event-function *target* a1-1) - ) - (let ((s5-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-0 from) self) - (set! (-> s5-0 num-params) 1) - (set! (-> s5-0 message) 'pickup) - (set! (-> s5-0 param 0) (the-as uint (target-pos 0))) - (send-event-function gp-0 s5-0) - ) + (send-event *target* 'trans 'reset) + (send-event gp-0 'pickup (target-pos 0)) (go-virtual idle) ) ) (format #t "ERROR: ~S no cell spawned~%" (-> self name)) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'get-pickup) - (set! (-> a1-4 param 0) (the-as uint 6)) - (set! (-> a1-4 param 1) (the-as uint (the float (-> self cell-for-task)))) - (send-event-function *target* a1-4) - ) + (send-event *target* 'get-pickup 6 (the float (-> self cell-for-task))) ) (else (format @@ -623,20 +597,8 @@ (format #t "WARNING: ~A stall on not cloning.~%" (-> self name)) (suspend) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'matrix) - (set! (-> a1-10 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'blend-shape) - (set! (-> a1-11 param 0) (the-as uint #t)) - (send-event-function *target* a1-11) - ) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) ) (push-setting! *setting-control* @@ -684,13 +646,7 @@ (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) - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) self) - (set! (-> a1-20 num-params) 1) - (set! (-> a1-20 message) 'blend-shape) - (set! (-> a1-20 param 0) (the-as uint #f)) - (send-event-function *target* a1-20) - ) + (send-event *target* 'blend-shape #f) ) (else (when (not arg1) @@ -1455,14 +1411,7 @@ (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 2) - (set! (-> a1-12 message) 'trans) - (set! (-> a1-12 param 0) (the-as uint 'save)) - (set! (-> a1-12 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-12) - ) + (send-event *target* 'trans 'save (-> self old-target-pos)) (go-virtual play-anim) ) ) @@ -1485,14 +1434,7 @@ ) ) (set! (-> self been-kicked) #f) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) self) - (set! (-> a1-14 num-params) 2) - (set! (-> a1-14 message) 'trans) - (set! (-> a1-14 param 0) (the-as uint 'save)) - (set! (-> a1-14 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-14) - ) + (send-event *target* 'trans 'save (-> self old-target-pos)) (go-virtual play-anim) ) ((-> self cur-trans-hook)) diff --git a/test/decompiler/reference/engine/target/logic-target_REF.gc b/test/decompiler/reference/engine/target/logic-target_REF.gc index 4b017544aa..e92decddf8 100644 --- a/test/decompiler/reference/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/engine/target/logic-target_REF.gc @@ -1354,18 +1354,12 @@ (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)) ) ) - (when + (if (and (or (not gp-0) (!= (-> gp-0 name) (-> self current-level name))) (-> self current-level) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'level-enter) - (set! (-> a1-5 param 0) (the-as uint (-> self current-level name))) - (send-event-function self a1-5) - ) + (send-event self 'level-enter (-> self current-level name)) ) ) 0 @@ -1439,7 +1433,7 @@ (zero? (-> self control unknown-int40)) (zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie))) ) - (when + (if (and (= (-> self cam-user-mode) 'normal) (logtest? (-> self control unknown-surface00 flags) 1) @@ -1459,13 +1453,7 @@ ) ) ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'change-mode) - (set! (-> a1-7 param 0) (the-as uint 'look-around)) - (send-event-function self a1-7) - ) + (send-event self 'change-mode 'look-around) ) ) (when @@ -1484,14 +1472,8 @@ (not *pause-lock*) (zero? (logand (-> self state-flags) 768)) ) - (when (!= (-> self next-state name) 'target-falling) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'change-mode) - (set! (-> a1-8 param 0) (the-as uint 'falling)) - (send-event-function self a1-8) - ) + (if (!= (-> self next-state name) 'target-falling) + (send-event self 'change-mode 'falling) ) (let ((gp-0 (new-stack-vector0))) (let @@ -1548,12 +1530,7 @@ ) (TODO-RENAME-30 (-> self control) gp-1) ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) self) - (set! (-> a1-24 num-params) 0) - (set! (-> a1-24 message) 'reset-follow) - (send-event-function *camera* a1-24) - ) + (send-event *camera* 'reset-follow) (set! (-> self control surf) *standard-ground-surface*) ) (let @@ -1785,13 +1762,8 @@ ;; Used lq/sq (defbehavior target-compute-edge target () (let ((s5-0 *edge-grab-info*)) - (when (not (dummy-9 s5-0)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function self a1-0) - ) + (if (not (dummy-9 s5-0)) + (send-event self 'end-mode) ) (if *display-edge-collision-marks* (dummy-10 s5-0) @@ -1846,7 +1818,7 @@ (-> self control rider-time) (the-as uint (-> *display* base-frame-counter)) ) - (when + (if (and (>= (- @@ -1863,12 +1835,7 @@ 150 ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'end-mode) - (send-event-function self a1-5) - ) + (send-event self 'end-mode) ) ) (else @@ -1913,13 +1880,8 @@ ;; Used lq/sq (defbehavior target-compute-edge-rider target () (let ((gp-0 *edge-grab-info*)) - (when (not (dummy-9 gp-0)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function self a1-0) - ) + (if (not (dummy-9 gp-0)) + (send-event self 'end-mode) ) (if *display-edge-collision-marks* (dummy-10 gp-0) @@ -1993,14 +1955,7 @@ (vector+! v1-8 s3-0 s2-0) (vector-float*! v1-8 v1-8 0.5) (set! (-> v1-8 y) (+ -6144.0 (-> v1-8 y))) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 2) - (set! (-> a1-5 message) 'ease-in) - (set! (-> a1-5 param 0) (the-as uint 0.5)) - (set! (-> a1-5 param 1) (the-as uint v1-8)) - (send-event-function *camera* a1-5) - ) + (send-event *camera* 'ease-in 0.5 v1-8) ) (vector-segment-distance-point! (the-as vector (&-> (-> self control) unknown-cspace00 bone)) diff --git a/test/decompiler/reference/engine/ui/hud-classes_REF.gc b/test/decompiler/reference/engine/ui/hud-classes_REF.gc index 9efe1f7f6c..6176bb8c76 100644 --- a/test/decompiler/reference/engine/ui/hud-classes_REF.gc +++ b/test/decompiler/reference/engine/ui/hud-classes_REF.gc @@ -799,152 +799,144 @@ ;; definition for method 20 of type hud-money-all ;; INFO: Return type mismatch int vs none. (defmethod init-particles! hud-money-all ((obj hud-money-all) (arg0 int)) - (with-pp - (when (< (-> obj nb-of-icons) 6) - (let ((s4-0 (-> obj nb-of-icons))) - (set! (-> obj icons s4-0) (new 'static 'hud-icon)) - (let* ((s2-0 (get-process *default-dead-pool* manipy #x4000)) - (s3-0 (when s2-0 - (let ((t9-1 (method-of-type manipy activate))) - (t9-1 - (the-as manipy s2-0) - obj - 'manipy - (the-as pointer #x70004000) - ) + (when (< (-> obj nb-of-icons) 6) + (let ((s4-0 (-> obj nb-of-icons))) + (set! (-> obj icons s4-0) (new 'static 'hud-icon)) + (let* ((s2-0 (get-process *default-dead-pool* manipy #x4000)) + (s3-0 (when s2-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s2-0) + obj + 'manipy + (the-as pointer #x70004000) ) - (run-now-in-process - s2-0 - manipy-init - (new 'static 'vector :w 1.0) - #f - *money-sg* - #f - ) - (-> s2-0 ppointer) ) - ) + (run-now-in-process + s2-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s2-0 ppointer) + ) ) - (when s3-0 - (set! - (-> (the-as process-drawable (-> s3-0 0)) draw dma-add-func) - dma-add-process-drawable-hud - ) - (set-vector! - (-> (the-as process-drawable (-> s3-0 0)) root trans) - 0.0 - 0.0 - 0.0 - 1.0 - ) - (set-vector! - (-> (the-as process-drawable (-> s3-0 0)) root scale) - 0.0095 - -0.011 - 0.0095 - 1.0 - ) - (when #f - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'trans-hook) - (set! (-> a1-4 param 0) (the-as uint #f)) - (send-event-function (ppointer->process s3-0) a1-4) - ) - ) + ) + (when s3-0 + (set! + (-> (the-as process-drawable (-> s3-0 0)) draw dma-add-func) + dma-add-process-drawable-hud ) - (set! (-> obj icons s4-0 icon) (the-as (pointer manipy) s3-0)) - (when s3-0 - (logior! (-> s3-0 0 mask) (process-mask pause)) - (logclear! (-> s3-0 0 mask) (process-mask menu progress)) - (set! (-> (the-as process-drawable (-> s3-0 0)) root trans z) 1024.0) - (set! (-> obj icons s4-0 icon-x) 170) - (set! (-> obj icons s4-0 icon-y) 0) - (set! (-> obj icons s4-0 icon-z) 0) - (set! (-> obj icons s4-0 scale-x) 0.0095) - (set! (-> obj icons s4-0 scale-y) -0.011) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (if #f + (send-event (ppointer->process s3-0) 'trans-hook #f) ) ) - ) - (+! (-> obj nb-of-icons) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s4-1 (-> obj nb-of-particles))) - (set! (-> obj particles s4-1) (new 'static 'hud-particle)) - (set! - (-> obj particles s4-1 part) - (create-launch-control (-> *part-group-id-table* 705) obj) - ) - (set! (-> obj particles s4-1 init-pos x) 172.0) - (set! (-> obj particles s4-1 init-pos y) 330.0) - (set! (-> obj particles s4-1 init-pos z) 2.0) - (set! (-> obj particles s4-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - (dotimes (s4-3 (-> obj nb-of-particles)) - (if (= (-> obj particles s4-3 part matrix) -1) - (set! (-> obj particles s4-3 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set! (-> obj text-x) 251) - (set! (-> obj text-y) 305) - (set! (-> obj x-sgn) 0) - (set! (-> obj y-sgn) 1) - (hide-bottom-hud) - (let ((s4-4 0) - (s3-2 0) - (s2-2 0) - ) - (dotimes (s1-0 (length *level-task-data*)) - (let ((v1-83 (-> *level-task-data* s1-0))) - (when (!= v1-83 #f) - (when - (or - (= *kernel-boot-message* 'play) - (= (-> v1-83 level-name-id) (game-text-id misty-level-name)) - ) - (if (= s1-0 arg0) - (set! s2-2 (the-as int (-> *game-info* money-per-level s1-0))) - ) - (+! s3-2 (-> *game-info* money-per-level s1-0)) - (+! s4-4 (-> (get-game-count s1-0) money-count)) - ) - ) - ) - ) - (cond - ((= s3-2 s4-4) - (set! (-> obj total-orbs) s4-4) - (set! (-> obj total-orbs) s4-4) - (set! (-> obj level-index) -1) - ) - ((begin - (set! (-> obj total-orbs) s2-2) - (< arg0 (length *level-task-data*)) - ) - (set! (-> obj level-index) arg0) - ) - (else - (set! (-> obj level-index) -1) + (set! (-> obj icons s4-0 icon) (the-as (pointer manipy) s3-0)) + (when s3-0 + (logior! (-> s3-0 0 mask) (process-mask pause)) + (logclear! (-> s3-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s3-0 0)) root trans z) 1024.0) + (set! (-> obj icons s4-0 icon-x) 170) + (set! (-> obj icons s4-0 icon-y) 0) + (set! (-> obj icons s4-0 icon-z) 0) + (set! (-> obj icons s4-0 scale-x) 0.0095) + (set! (-> obj icons s4-0 scale-y) -0.011) ) ) ) - (set! (-> obj start-time) (the-as uint (-> *display* base-frame-counter))) - (sound-play-by-name - (static-sound-name "get-all-orbs") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) - ) - 0 - (none) + (+! (-> obj nb-of-icons) 1) ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s4-1 (-> obj nb-of-particles))) + (set! (-> obj particles s4-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s4-1 part) + (create-launch-control (-> *part-group-id-table* 705) obj) + ) + (set! (-> obj particles s4-1 init-pos x) 172.0) + (set! (-> obj particles s4-1 init-pos y) 330.0) + (set! (-> obj particles s4-1 init-pos z) 2.0) + (set! (-> obj particles s4-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (dotimes (s4-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s4-3 part matrix) -1) + (set! (-> obj particles s4-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 251) + (set! (-> obj text-y) 305) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) 1) + (hide-bottom-hud) + (let ((s4-4 0) + (s3-2 0) + (s2-2 0) + ) + (dotimes (s1-0 (length *level-task-data*)) + (let ((v1-83 (-> *level-task-data* s1-0))) + (when (!= v1-83 #f) + (when + (or + (= *kernel-boot-message* 'play) + (= (-> v1-83 level-name-id) (game-text-id misty-level-name)) + ) + (if (= s1-0 arg0) + (set! s2-2 (the-as int (-> *game-info* money-per-level s1-0))) + ) + (+! s3-2 (-> *game-info* money-per-level s1-0)) + (+! s4-4 (-> (get-game-count s1-0) money-count)) + ) + ) + ) + ) + (cond + ((= s3-2 s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj level-index) -1) + ) + ((begin + (set! (-> obj total-orbs) s2-2) + (< arg0 (length *level-task-data*)) + ) + (set! (-> obj level-index) arg0) + ) + (else + (set! (-> obj level-index) -1) + ) + ) + ) + (set! (-> obj start-time) (the-as uint (-> *display* base-frame-counter))) + (sound-play-by-name + (static-sound-name "get-all-orbs") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + 0 + (none) ) ;; definition for method 24 of type hud-money-all @@ -1113,104 +1105,96 @@ ;; definition for method 20 of type hud-money ;; INFO: Return type mismatch int vs none. (defmethod init-particles! hud-money ((obj hud-money) (arg0 int)) - (with-pp - (when (< (-> obj nb-of-icons) 6) - (let ((s5-0 (-> obj nb-of-icons))) - (set! (-> obj icons s5-0) (new 'static 'hud-icon)) - (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) - (s4-0 (when s3-0 - (let ((t9-1 (method-of-type manipy activate))) - (t9-1 - (the-as manipy s3-0) - obj - 'manipy - (the-as pointer #x70004000) - ) + (when (< (-> obj nb-of-icons) 6) + (let ((s5-0 (-> obj nb-of-icons))) + (set! (-> obj icons s5-0) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) ) - (run-now-in-process - s3-0 - manipy-init - (new 'static 'vector :w 1.0) - #f - *money-sg* - #f - ) - (-> s3-0 ppointer) ) - ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s3-0 ppointer) + ) ) - (when s4-0 - (set! - (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) - dma-add-process-drawable-hud - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root trans) - 0.0 - 0.0 - 0.0 - 1.0 - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root scale) - 0.0095 - -0.011 - 0.0095 - 1.0 - ) - (when #f - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'trans-hook) - (set! (-> a1-4 param 0) (the-as uint #f)) - (send-event-function (ppointer->process s4-0) a1-4) - ) - ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud ) - (set! (-> obj icons s5-0 icon) (the-as (pointer manipy) s4-0)) - (when s4-0 - (logior! (-> s4-0 0 mask) (process-mask pause)) - (logclear! (-> s4-0 0 mask) (process-mask menu progress)) - (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 1024.0) - (set! (-> obj icons s5-0 icon-x) 399) - (set! (-> obj icons s5-0 icon-y) 79) - (set! (-> obj icons s5-0 icon-z) 0) - (set! (-> obj icons s5-0 scale-x) 0.0095) - (set! (-> obj icons s5-0 scale-y) -0.011) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (if #f + (send-event (ppointer->process s4-0) 'trans-hook #f) ) ) - ) - (+! (-> obj nb-of-icons) 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* 79) obj) + (set! (-> obj icons s5-0 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 1024.0) + (set! (-> obj icons s5-0 icon-x) 399) + (set! (-> obj icons s5-0 icon-y) 79) + (set! (-> obj icons s5-0 icon-z) 0) + (set! (-> obj icons s5-0 scale-x) 0.0095) + (set! (-> obj icons s5-0 scale-y) -0.011) ) - (set! (-> obj particles s5-1 init-pos x) 400.0) - (set! (-> obj particles s5-1 init-pos y) 58.0) - (set! (-> obj particles s5-1 init-pos z) 2.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - (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 text-x) 420) - (set! (-> obj text-y) 45) - (set! (-> obj x-sgn) 1) - (set! (-> obj y-sgn) -1) - (set! (-> obj increment-on-event) #t) - 0 - (none) + (+! (-> obj nb-of-icons) 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* 79) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 400.0) + (set! (-> obj particles s5-1 init-pos y) 58.0) + (set! (-> obj particles s5-1 init-pos z) 2.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (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 text-x) 420) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + 0 + (none) ) ;; definition for method 24 of type hud-money @@ -1743,113 +1727,105 @@ ;; definition for method 20 of type hud-fuel-cell ;; INFO: Return type mismatch int vs none. (defmethod init-particles! hud-fuel-cell ((obj hud-fuel-cell) (arg0 int)) - (with-pp - (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* 80) obj) - ) - (set! (-> obj particles s5-0 init-pos x) 256.0) - (set! (-> obj particles s5-0 init-pos y) 224.0) - (set! (-> obj particles s5-0 init-pos z) 1.0) - (set! (-> obj particles s5-0 part matrix) -1) + (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* 80) obj) ) - (+! (-> obj nb-of-particles) 1) + (set! (-> obj particles s5-0 init-pos x) 256.0) + (set! (-> obj particles s5-0 init-pos y) 224.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) ) - (dotimes (s5-1 (-> obj nb-of-particles)) - (if (= (-> obj particles s5-1 part matrix) -1) - (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (when (< (-> obj nb-of-icons) 6) - (let ((s5-2 (-> obj nb-of-icons))) - (set! (-> obj icons s5-2) (new 'static 'hud-icon)) - (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) - (s4-0 (when s3-0 - (let ((t9-3 (method-of-type manipy activate))) - (t9-3 - (the-as manipy s3-0) - obj - 'manipy - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s3-0 - manipy-init - (new 'static 'vector :w 1.0) - #f - *fuelcell-naked-sg* - #f - ) - (-> s3-0 ppointer) - ) - ) - ) - (when s4-0 - (set! - (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) - dma-add-process-drawable-hud - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root trans) - 0.0 - 0.0 - 0.0 - 1.0 - ) - (set-vector! - (-> (the-as process-drawable (-> s4-0 0)) root scale) - 0.009 - 0.009 - 0.009 - 1.0 - ) - (when #f - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'trans-hook) - (set! (-> a1-5 param 0) (the-as uint #f)) - (send-event-function (ppointer->process s4-0) a1-5) - ) - ) - ) - (set! (-> obj icons s5-2 icon) (the-as (pointer manipy) s4-0)) - (when s4-0 - (logior! (-> s4-0 0 mask) (process-mask pause)) - (logclear! (-> s4-0 0 mask) (process-mask menu progress)) - (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 2048.0) - (set! (-> obj icons s5-2 icon-x) 256) - (set! (-> obj icons s5-2 icon-y) 62) - (set! (-> obj icons s5-2 icon-z) 0) - (set! (-> obj icons s5-2 scale-x) 0.009) - (set! (-> obj icons s5-2 scale-y) 0.009) - ) - ) - ) - (+! (-> obj nb-of-icons) 1) - ) - (set! (-> obj text-x) 276) - (set! (-> obj text-y) 45) - (set! (-> obj x-sgn) 0) - (set! (-> obj y-sgn) -1) - (set! (-> obj increment-on-event) #t) - (set! (-> obj skip-particle) -2) - (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) - (let ((s5-4 (new 'stack-no-clear 'quaternion))) - (quaternion-axis-angle! s5-4 0.0 1.0 0.0 16384.0) - (quaternion*! - (-> obj icons 0 icon 0 root quat) - s5-4 - (-> obj icons 0 icon 0 root quat) - ) - ) - 0 - (none) + (+! (-> obj nb-of-particles) 1) ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (when (< (-> obj nb-of-icons) 6) + (let ((s5-2 (-> obj nb-of-icons))) + (set! (-> obj icons s5-2) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-3 (method-of-type manipy activate))) + (t9-3 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *fuelcell-naked-sg* + #f + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.009 + 0.009 + 0.009 + 1.0 + ) + (if #f + (send-event (ppointer->process s4-0) 'trans-hook #f) + ) + ) + (set! (-> obj icons s5-2 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 2048.0) + (set! (-> obj icons s5-2 icon-x) 256) + (set! (-> obj icons s5-2 icon-y) 62) + (set! (-> obj icons s5-2 icon-z) 0) + (set! (-> obj icons s5-2 scale-x) 0.009) + (set! (-> obj icons s5-2 scale-y) 0.009) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (set! (-> obj text-x) 276) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + (set! (-> obj skip-particle) -2) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (let ((s5-4 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! s5-4 0.0 1.0 0.0 16384.0) + (quaternion*! + (-> obj icons 0 icon 0 root quat) + s5-4 + (-> obj icons 0 icon 0 root quat) + ) + ) + 0 + (none) ) ;; definition for method 24 of type hud-fuel-cell @@ -2895,166 +2871,98 @@ ;; definition for function hide-hud ;; INFO: Return type mismatch int vs none. (defun hide-hud () - (with-pp - (when *target* - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'hide) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'hide) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function hide-bottom-hud ;; INFO: Return type mismatch int vs none. (defun hide-bottom-hud () - (with-pp - (when *target* - (dotimes (gp-0 4) - (when (-> *hud-parts* parts (+ gp-0 4)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'hide) - (send-event-function - (ppointer->process (-> *hud-parts* parts (+ gp-0 4))) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 4) + (if (-> *hud-parts* parts (+ gp-0 4)) + (send-event (ppointer->process (-> *hud-parts* parts (+ gp-0 4))) 'hide) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function disable-hud ;; INFO: Return type mismatch int vs none. (defun disable-hud ((arg0 int)) - (with-pp - (when *target* - (dotimes (s5-0 9) - (when (-> *hud-parts* parts s5-0) - (when - (or - (!= (-> *hud-parts* parts s5-0) arg0) - (zero? (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0 value)) - ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) pp) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'hide) - (send-event-function - (ppointer->process (-> *hud-parts* parts s5-0)) - a1-1 - ) - ) - ) - (when (!= (-> *hud-parts* parts s5-0) arg0) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'disable) - (send-event-function - (ppointer->process (-> *hud-parts* parts s5-0)) - a1-2 - ) - ) + (when *target* + (dotimes (s5-0 9) + (when (-> *hud-parts* parts s5-0) + (if + (or + (!= (-> *hud-parts* parts s5-0) arg0) + (zero? (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0 value)) ) + (send-event (ppointer->process (-> *hud-parts* parts s5-0)) 'hide) + ) + (if (!= (-> *hud-parts* parts s5-0) arg0) + (send-event (ppointer->process (-> *hud-parts* parts s5-0)) 'disable) ) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function enable-hud ;; INFO: Return type mismatch int vs none. (defun enable-hud () - (with-pp - (when *target* - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'enable) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'enable) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function hide-hud-quick ;; INFO: Return type mismatch int vs none. (defun hide-hud-quick () - (with-pp - (when *target* - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'hide-quick) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when *target* + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'hide-quick) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function show-hud ;; INFO: Return type mismatch int vs none. (defun show-hud () - (with-pp - (when - (and - *target* - (or (not *progress-process*) (hidden? (-> *progress-process* 0))) - ) - (dotimes (gp-0 9) - (when (-> *hud-parts* parts gp-0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) pp) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'show) - (send-event-function - (ppointer->process (-> *hud-parts* parts gp-0)) - a1-0 - ) - ) - ) + (when + (and + *target* + (or (not *progress-process*) (hidden? (-> *progress-process* 0))) + ) + (dotimes (gp-0 9) + (if (-> *hud-parts* parts gp-0) + (send-event (ppointer->process (-> *hud-parts* parts gp-0)) 'show) ) ) - 0 - (none) ) + 0 + (none) ) ;; definition for function set-hud-aspect-ratio diff --git a/test/decompiler/reference/levels/beach/beach-part_REF.gc b/test/decompiler/reference/levels/beach/beach-part_REF.gc index b59cf98023..bbc49c4e34 100644 --- a/test/decompiler/reference/levels/beach/beach-part_REF.gc +++ b/test/decompiler/reference/levels/beach/beach-part_REF.gc @@ -904,8 +904,7 @@ (new 'static 'sound-spec :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6c61667265746177) + :sound-name (static-sound-name "waterfall") :volume #x400 ) ) diff --git a/test/decompiler/reference/levels/beach/beach-rocks_REF.gc b/test/decompiler/reference/levels/beach/beach-rocks_REF.gc index ed71273b81..495ba912d3 100644 --- a/test/decompiler/reference/levels/beach/beach-rocks_REF.gc +++ b/test/decompiler/reference/levels/beach/beach-rocks_REF.gc @@ -583,13 +583,8 @@ ) ) (let ((a0-28 (handle->process s5-1))) - (when a0-28 - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) self) - (set! (-> a1-14 num-params) 0) - (set! (-> a1-14 message) 'stop-cloning) - (send-event-function a0-28 a1-14) - ) + (if a0-28 + (send-event a0-28 'stop-cloning) ) ) ) @@ -741,7 +736,3 @@ ((method-of-type beach-rock copy-defaults!) obj arg0) (none) ) - - - - diff --git a/test/decompiler/reference/levels/beach/bird-lady-beach_REF.gc b/test/decompiler/reference/levels/beach/bird-lady-beach_REF.gc index d0fb9c4e2b..5041ebfaa9 100644 --- a/test/decompiler/reference/levels/beach/bird-lady-beach_REF.gc +++ b/test/decompiler/reference/levels/beach/bird-lady-beach_REF.gc @@ -65,131 +65,104 @@ ;; definition for method 32 of type bird-lady-beach (defmethod play-anim! bird-lady-beach ((obj bird-lady-beach) (arg0 symbol)) - (with-pp - (case (current-status (-> obj tasks)) - (((task-status need-reward-speech)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj flutflut) (ppointer->handle (when s5-1 - (let - ((t9-4 - (method-of-type - manipy - activate - ) + (case (current-status (-> obj tasks)) + (((task-status need-reward-speech)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj flutflut) (ppointer->handle (when s5-1 + (let + ((t9-4 + (method-of-type + manipy + activate ) ) - (t9-4 - (the-as manipy s5-1) - obj - 'manipy - (the-as pointer #x70004000) - ) ) - (run-now-in-process - s5-1 - manipy-init - (-> obj root-override trans) - (-> obj entity) - *flutflut-naked-sg* - #f + (t9-4 + (the-as manipy s5-1) + obj + 'manipy + (the-as pointer #x70004000) ) - (-> s5-1 ppointer) ) - ) - ) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'anim-mode) - (set! (-> a1-4 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj flutflut)) a1-4) - ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'blend-shape) - (set! (-> a1-5 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj flutflut)) a1-5) - ) - (let ((s5-2 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj egg) (ppointer->handle (when s5-2 - (let - ((t9-9 - (method-of-type - manipy - activate + (run-now-in-process + s5-1 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *flutflut-naked-sg* + #f + ) + (-> s5-1 ppointer) ) - ) - ) - (t9-9 - (the-as manipy s5-2) - obj - 'manipy - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s5-2 - manipy-init - (-> obj root-override trans) - (-> obj entity) - *flutflutegg-sg* - #f - ) - (-> s5-2 ppointer) - ) - ) - ) - ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj egg)) a1-9) + ) ) ) - (new 'static 'spool-anim - :name "bird-lady-beach-resolution" - :index 4 - :parts 10 - :command-list - '( - ((the binteger 141) - joint - "cameraB" - ) - ((the binteger 535) - joint - "camera" - ) - ((the binteger 696) + (send-event (handle->process (-> obj flutflut)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj flutflut)) 'blend-shape #t) + (let ((s5-2 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj egg) (ppointer->handle (when s5-2 + (let + ((t9-9 + (method-of-type manipy activate) + ) + ) + (t9-9 + (the-as manipy s5-2) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s5-2 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *flutflutegg-sg* + #f + ) + (-> s5-2 ppointer) + ) + ) + ) + ) + (send-event (handle->process (-> obj egg)) 'anim-mode 'clone-anim) + ) + (new 'static 'spool-anim + :name "bird-lady-beach-resolution" + :index 4 + :parts 10 + :command-list + '( + ((the binteger 141) joint "cameraB" ) - ((the binteger 758) - joint - "camera" - ) - ((the binteger 813) joint "cameraB") + ((the binteger 535) + joint + "camera" ) - ) + ((the binteger 696) + joint + "cameraB" + ) + ((the binteger 758) joint "camera") ((the binteger 813) joint "cameraB") + ) ) - (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 3) ) + (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 3) ) ) ) diff --git a/test/decompiler/reference/levels/beach/mayor_REF.gc b/test/decompiler/reference/levels/beach/mayor_REF.gc index 5048ded060..c4d8f018e9 100644 --- a/test/decompiler/reference/levels/beach/mayor_REF.gc +++ b/test/decompiler/reference/levels/beach/mayor_REF.gc @@ -102,1287 +102,38 @@ ;; definition for method 32 of type mayor (defmethod play-anim! mayor ((obj mayor) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-specific-task! - (game-task jungle-lurkerm) - (task-status need-introduction) - ) - (close-specific-task! - (game-task village1-mayor-money) - (task-status need-introduction) - ) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-specific-task! + (game-task jungle-lurkerm) + (task-status need-introduction) ) - (cond - ((closed? - (-> obj tasks) - (game-task jungle-lurkerm) - (task-status need-reminder) - ) - (mayor-lurkerm-reward-speech obj arg0) - ) - (else - (new 'static 'spool-anim - :name "mayor-introduction" - :index 4 - :parts 16 - :command-list '() - ) - (new 'static 'spool-anim - :name "mayor-introduction" - :index 4 - :parts 16 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 - kill - "villagea-part-69" - ) - (0 - display-level - beach - special - ) - ((the binteger 565) - joint - "cameraB" - ) - ((the binteger 850) - joint - "camera" - ) - ((the binteger 915) joint "cameraB") - ) - ) - ) + (close-specific-task! + (game-task village1-mayor-money) + (task-status need-introduction) ) ) - (((task-status need-reminder-a) (task-status need-reminder)) - (set! (-> obj skippable) #t) (cond ((closed? (-> obj tasks) (game-task jungle-lurkerm) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "mayor-reminder-donation" - :index 6 - :parts 3 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) - ) - ) - ) - ((closed? - (-> obj tasks) - (game-task village1-mayor-money) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "mayor-reminder-beams" - :index 5 - :parts 3 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) - ) - ) - ) - ((zero? (get-reminder (-> obj tasks) 0)) - (if arg0 - (save-reminder (-> obj tasks) 1 0) - ) - (new 'static 'spool-anim - :name "mayor-reminder-beams" - :index 5 - :parts 3 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) - ) + (task-status need-reminder) ) + (mayor-lurkerm-reward-speech obj arg0) ) (else - (if arg0 - (save-reminder (-> obj tasks) 0 0) + (new 'static 'spool-anim + :name "mayor-introduction" + :index 4 + :parts 16 + :command-list '() ) (new 'static 'spool-anim - :name "mayor-reminder-donation" - :index 6 - :parts 3 + :name "mayor-introduction" + :index 4 + :parts 16 :command-list '( (0 @@ -1677,357 +428,1594 @@ kill "crate-2469" ) - (0 kill "villagea-part-69") (0 display-level beach special) + (0 + kill + "villagea-part-69" + ) + (0 + display-level + beach + special + ) + ((the binteger 565) + joint + "cameraB" + ) + ((the binteger 850) + joint + "camera" + ) + ((the binteger 915) joint "cameraB") ) ) ) ) ) - (((task-status need-reward-speech)) - (if (not arg0) - (set! (-> obj will-talk) #t) - ) - (case (current-task (-> obj tasks)) - (((game-task jungle-lurkerm)) - (mayor-lurkerm-reward-speech obj arg0) - ) - (else - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 2) - (set! (-> a1-15 message) 'get-pickup) - (set! (-> a1-15 param 0) (the-as uint 5)) - (set! - (-> a1-15 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) + (((task-status need-reminder-a) (task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((closed? + (-> obj tasks) + (game-task jungle-lurkerm) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "mayor-reminder-donation" + :index 6 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" ) - (send-event-function *target* a1-15) + (0 + kill + "villagea-part-70" ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) ) - (else - (set! (-> obj talk-message) (the-as uint 282)) - ) - ) - (new 'static 'spool-anim - :name "mayor-resolution-donation" - :index 8 - :parts 5 - :command-list - '( - (0 - kill - "villagea-part-65" - ) - (0 - kill - "villagea-part-70" - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-3" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "fishermans-boat-2" - ) - (0 - kill - "windspinner-9" - ) - (0 - kill - "sagesail-6" - ) - (0 - kill - "sharkey-12" - ) - (0 - kill - "windmill-sail-4" - ) - (0 - kill - "water-vol-7" - ) - (0 - kill - "windspinner-8" - ) - (0 - kill - "villagea-part-32" - ) - (0 - kill - "water-vol-10" - ) - (0 - kill - "ropebridge-4" - ) - (0 - kill - "ropebridge-5" - ) - (0 - kill - "reflector-end-1" - ) - (0 - kill - "eco-10" - ) - (0 - kill - "eco-11" - ) - (0 - kill - "warp-gate-switch-3" - ) - (0 - kill - "reflector-middle-2" - ) - (0 - kill - "evilplant-2" - ) - (0 - kill - "crate-3147" - ) - (0 - kill - "villagea-water-2" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - (0 - kill - "villagea-part-50" - ) - (0 - kill - "water-vol-9" - ) - (0 - kill - "crate-3144" - ) - (0 - kill - "orb-cache-top-4" - ) - (0 - kill - "village-cam-2" - ) - (0 - kill - "villagea-part-18" - ) - (0 - kill - "villagea-part-24" - ) - (0 - kill - "money-2676" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "villagea-part-13" - ) - (0 - kill - "villagea-part-17" - ) - (0 - kill - "money-2689" - ) - (0 - kill - "money-2690" - ) - (0 - kill - "farmer-3" - ) - (0 - kill - "villagea-part-26" - ) - (0 - kill - "money-2692" - ) - (0 - kill - "villagea-part-37" - ) - (0 - kill - "villagea-part-38" - ) - (0 - kill - "villagea-part-64" - ) - (0 - kill - "crate-3142" - ) - (0 - kill - "crate-3143" - ) - (0 - kill - "money-2688" - ) - (0 - kill - "villagea-part-14" - ) - (0 - kill - "money-2691" - ) - (0 - kill - "villagea-part-62" - ) - (0 - kill - "villagea-part-63" - ) - (0 - kill - "sharkey-1" - ) - (0 - kill - "eco-82" - ) - (0 - kill - "eco-83" - ) - (0 - kill - "crate-2470" - ) - (0 - kill - "villagea-part-3" - ) - (0 - kill - "villagea-part-15" - ) - (0 - kill - "villagea-part-22" - ) - (0 - kill - "villagea-part-28" - ) - (0 - kill - "explorer-4" - ) - (0 - kill - "oracle-1" - ) - (0 - kill - "crate-3141" - ) - (0 - kill - "crate-3145" - ) - (0 - kill - "water-vol-8" - ) - (0 - kill - "water-vol-63" - ) - (0 - kill - "lrocklrg-1" - ) - (0 - kill - "crate-2469" - ) - (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ((closed? + (-> obj tasks) + (game-task village1-mayor-money) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "mayor-reminder-beams" + :index 5 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ) + ((zero? (get-reminder (-> obj tasks) 0)) + (if arg0 + (save-reminder (-> obj tasks) 1 0) + ) + (new 'static 'spool-anim + :name "mayor-reminder-beams" + :index 5 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 0) + ) + (new 'static 'spool-anim + :name "mayor-reminder-donation" + :index 6 + :parts 3 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) + ) + ) + ) + ) + (((task-status need-reward-speech)) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + (((game-task jungle-lurkerm)) + (mayor-lurkerm-reward-speech obj arg0) + ) + (else + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj talk-message) (the-as uint 282)) ) ) - ) - ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) + (new 'static 'spool-anim + :name "mayor-resolution-donation" + :index 8 + :parts 5 + :command-list + '( + (0 + kill + "villagea-part-65" + ) + (0 + kill + "villagea-part-70" + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-3" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "fishermans-boat-2" + ) + (0 + kill + "windspinner-9" + ) + (0 + kill + "sagesail-6" + ) + (0 + kill + "sharkey-12" + ) + (0 + kill + "windmill-sail-4" + ) + (0 + kill + "water-vol-7" + ) + (0 + kill + "windspinner-8" + ) + (0 + kill + "villagea-part-32" + ) + (0 + kill + "water-vol-10" + ) + (0 + kill + "ropebridge-4" + ) + (0 + kill + "ropebridge-5" + ) + (0 + kill + "reflector-end-1" + ) + (0 + kill + "eco-10" + ) + (0 + kill + "eco-11" + ) + (0 + kill + "warp-gate-switch-3" + ) + (0 + kill + "reflector-middle-2" + ) + (0 + kill + "evilplant-2" + ) + (0 + kill + "crate-3147" + ) + (0 + kill + "villagea-water-2" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + (0 + kill + "villagea-part-50" + ) + (0 + kill + "water-vol-9" + ) + (0 + kill + "crate-3144" + ) + (0 + kill + "orb-cache-top-4" + ) + (0 + kill + "village-cam-2" + ) + (0 + kill + "villagea-part-18" + ) + (0 + kill + "villagea-part-24" + ) + (0 + kill + "money-2676" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "villagea-part-13" + ) + (0 + kill + "villagea-part-17" + ) + (0 + kill + "money-2689" + ) + (0 + kill + "money-2690" + ) + (0 + kill + "farmer-3" + ) + (0 + kill + "villagea-part-26" + ) + (0 + kill + "money-2692" + ) + (0 + kill + "villagea-part-37" + ) + (0 + kill + "villagea-part-38" + ) + (0 + kill + "villagea-part-64" + ) + (0 + kill + "crate-3142" + ) + (0 + kill + "crate-3143" + ) + (0 + kill + "money-2688" + ) + (0 + kill + "villagea-part-14" + ) + (0 + kill + "money-2691" + ) + (0 + kill + "villagea-part-62" + ) + (0 + kill + "villagea-part-63" + ) + (0 + kill + "sharkey-1" + ) + (0 + kill + "eco-82" + ) + (0 + kill + "eco-83" + ) + (0 + kill + "crate-2470" + ) + (0 + kill + "villagea-part-3" + ) + (0 + kill + "villagea-part-15" + ) + (0 + kill + "villagea-part-22" + ) + (0 + kill + "villagea-part-28" + ) + (0 + kill + "explorer-4" + ) + (0 + kill + "oracle-1" + ) + (0 + kill + "crate-3141" + ) + (0 + kill + "crate-3145" + ) + (0 + kill + "water-vol-8" + ) + (0 + kill + "water-vol-63" + ) + (0 + kill + "lrocklrg-1" + ) + (0 + kill + "crate-2469" + ) + (0 kill "villagea-part-69") (0 display-level beach special) + ) ) ) - (-> obj draw art-group data 3) ) ) + (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 3) + ) ) ) diff --git a/test/decompiler/reference/levels/beach/sculptor_REF.gc b/test/decompiler/reference/levels/beach/sculptor_REF.gc index 3bec253936..2a802cacaf 100644 --- a/test/decompiler/reference/levels/beach/sculptor_REF.gc +++ b/test/decompiler/reference/levels/beach/sculptor_REF.gc @@ -147,34 +147,18 @@ (set! (-> (the-as muse v1-11) draw light-index) (the-as uint 3)) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'anim-mode) - (set! (-> a1-5 param 0) (the-as uint 'loop)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-5) + (send-event (handle->process (-> arg0 incomming-attack-id)) 'anim-mode 'loop) + (send-event + (handle->process (-> arg0 incomming-attack-id)) + 'art-joint-anim + "idle" + 0 ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 2) - (set! (-> a1-6 message) 'art-joint-anim) - (set! (-> a1-6 param 0) (the-as uint "idle")) - (set! (-> a1-6 param 1) (the-as uint 0)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-6) - ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'draw) - (set! (-> a1-7 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'origin-joint-index) - (set! (-> a1-8 param 0) (the-as uint 26)) - (send-event-function (handle->process (-> arg0 incomming-attack-id)) a1-8) + (send-event (handle->process (-> arg0 incomming-attack-id)) 'draw #t) + (send-event + (handle->process (-> arg0 incomming-attack-id)) + 'origin-joint-index + 26 ) ) @@ -190,171 +174,154 @@ ;; definition for method 32 of type sculptor (defmethod play-anim! sculptor ((obj sculptor) (arg0 symbol)) - (with-pp - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (if arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - ) - (new 'static 'spool-anim - :name "sculptor-introduction" - :index 16 - :parts 14 - :command-list - '( - (0 - display-level - beach - special - ) - (0 - kill - "med-res-level-2" - ) - (0 - kill - "med-res-level-4" - ) - (0 - kill - "med-res-level-6" - ) - (0 - kill - "med-res-level-7" - ) - (0 - kill - "med-res-level-8" - ) - (0 - kill - "med-res-level-11" - ) - (0 - kill - "med-res-level-14" - ) - (0 - kill - "med-res-level-22" - ) - (0 - kill - "med-res-level-23" - ) - ((the binteger 285) - joint - "cameraB" - ) - ((the binteger 331) - joint - "camera" - ) - ((the binteger 614) - joint - "cameraB" - ) - ((the binteger 760) - joint - "camera" - ) - ((the binteger 1183) - joint - "cameraB" - ) - ((the binteger 1278) - joint - "camera" - ) - ((the binteger 1433) joint "cameraB") - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (new 'static 'spool-anim - :name "sculptor-reminder-1" - :index 17 - :parts 2 - :command-list '() - ) - ) - (((task-status need-reward-speech)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj muse) (ppointer->handle (when s5-1 - (let - ((t9-5 - (method-of-type - manipy - activate - ) - ) - ) - (t9-5 - (the-as manipy s5-1) - obj - 'manipy - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s5-1 - manipy-init - (-> obj root-override trans) - (-> obj entity) - *sculptor-muse-sg* - #f - ) - (-> s5-1 ppointer) - ) - ) - ) - ) - (let ((v1-18 (handle->process (-> obj muse)))) - (if v1-18 - (set! (-> (the-as muse v1-18) draw light-index) (the-as uint 3)) - ) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'center-joint) - (set! (-> a1-8 param 0) (the-as uint 4)) - (send-event-function (handle->process (-> obj muse)) a1-8) - ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj muse)) a1-9) - ) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) ) (new 'static 'spool-anim - :name "sculptor-resolution" - :index 18 - :parts 4 + :name "sculptor-introduction" + :index 16 + :parts 14 :command-list '( - ((the binteger 51) joint "cameraB") ((the binteger 87) joint "camera") + (0 + display-level + beach + special + ) + (0 + kill + "med-res-level-2" + ) + (0 + kill + "med-res-level-4" + ) + (0 + kill + "med-res-level-6" + ) + (0 + kill + "med-res-level-7" + ) + (0 + kill + "med-res-level-8" + ) + (0 + kill + "med-res-level-11" + ) + (0 + kill + "med-res-level-14" + ) + (0 + kill + "med-res-level-22" + ) + (0 + kill + "med-res-level-23" + ) + ((the binteger 285) + joint + "cameraB" + ) + ((the binteger 331) + joint + "camera" + ) + ((the binteger 614) + joint + "cameraB" + ) + ((the binteger 760) + joint + "camera" + ) + ((the binteger 1183) + joint + "cameraB" + ) + ((the binteger 1278) + joint + "camera" + ) + ((the binteger 1433) joint "cameraB") ) ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (new 'static 'spool-anim + :name "sculptor-reminder-1" + :index 17 + :parts 2 + :command-list '() + ) + ) + (((task-status need-reward-speech)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj muse) (ppointer->handle (when s5-1 + (let + ((t9-5 + (method-of-type manipy activate) + ) + ) + (t9-5 + (the-as manipy s5-1) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s5-1 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *sculptor-muse-sg* + #f + ) + (-> s5-1 ppointer) + ) + ) ) ) - (-> obj draw art-group data 4) + (let ((v1-18 (handle->process (-> obj muse)))) + (if v1-18 + (set! (-> (the-as muse v1-18) draw light-index) (the-as uint 3)) + ) + ) + (send-event (handle->process (-> obj muse)) 'center-joint 4) + (send-event (handle->process (-> obj muse)) 'anim-mode 'clone-anim) ) + (new 'static 'spool-anim + :name "sculptor-resolution" + :index 18 + :parts 4 + :command-list + '( + ((the binteger 51) joint "cameraB") ((the binteger 87) joint "camera") + ) + ) + ) + (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) ) ) ) diff --git a/test/decompiler/reference/levels/citadel/assistant-citadel_REF.gc b/test/decompiler/reference/levels/citadel/assistant-citadel_REF.gc index e7b73d2e3d..9bb13881f1 100644 --- a/test/decompiler/reference/levels/citadel/assistant-citadel_REF.gc +++ b/test/decompiler/reference/levels/citadel/assistant-citadel_REF.gc @@ -173,12 +173,7 @@ ((-> (method-of-type process-taskable idle) enter)) (case (get-task-status (game-task village4-button)) (((task-status need-reward-speech)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'play-anim) - (send-event-function self a1-0) - ) + (send-event self 'play-anim) ) ) (none) diff --git a/test/decompiler/reference/levels/citadel/citb-drop-plat-CIT_REF.gc b/test/decompiler/reference/levels/citadel/citb-drop-plat-CIT_REF.gc index c753d2b456..fa4b22acbe 100644 --- a/test/decompiler/reference/levels/citadel/citb-drop-plat-CIT_REF.gc +++ b/test/decompiler/reference/levels/citadel/citb-drop-plat-CIT_REF.gc @@ -148,22 +148,11 @@ (go drop-plat-drop) ) ((or (= v1-0 'touch) (= v1-0 'attack)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 300)) - (send-event-function *target* a1-2) - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'player-stepped) - (set! (-> a1-3 param 0) (the-as uint (-> self color))) - (send-event-function - (ppointer->process (-> self parent)) - a1-3 - ) + (send-event *target* 'no-look-around 300) + (send-event + (ppointer->process (-> self parent)) + 'player-stepped + (-> self color) ) #f ) @@ -742,12 +731,7 @@ ;; definition for function citb-drop-plat-drop-all-children (defbehavior citb-drop-plat-drop-all-children citb-drop-plat () (dotimes (gp-0 (-> self child-count)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'drop) - (send-event-function (handle->process (-> self child-array data gp-0)) a1-0) - ) + (send-event (handle->process (-> self child-array data gp-0)) 'drop) (set! (-> self child-array data gp-0) (the-as handle #f)) ) #f @@ -768,12 +752,7 @@ (!= (-> (the-as drop-plat a0-3) color) 6) (= arg0 (-> (the-as drop-plat a0-3) color)) ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'drop) - (send-event-function a0-3 a1-2) - ) + (send-event a0-3 'drop) (set! (-> self child-array data s5-0) (the-as handle #f)) ) ) diff --git a/test/decompiler/reference/levels/common/basebutton_REF.gc b/test/decompiler/reference/levels/common/basebutton_REF.gc index 2402c216f6..ab87fb1c40 100644 --- a/test/decompiler/reference/levels/common/basebutton_REF.gc +++ b/test/decompiler/reference/levels/common/basebutton_REF.gc @@ -746,14 +746,7 @@ :virtual #t :trans (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'joystick) - (set! (-> a1-0 param 0) (the-as uint 0.0)) - (set! (-> a1-0 param 1) (the-as uint 0.0)) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'joystick 0.0 0.0) (none) ) :code @@ -870,14 +863,7 @@ ) :code (behavior ((arg0 vector) (arg1 vector)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 2) - (set! (-> a1-1 message) 'change-state) - (set! (-> a1-1 param 0) (the-as uint cam-fixed)) - (set! (-> a1-1 param 1) (the-as uint 0)) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'change-state cam-fixed 0) (ja-channel-push! 1 60) (let ((gp-0 (-> self skel root-channel 0))) (set! @@ -1009,13 +995,7 @@ ) ) (set! (-> gp-2 y) 0.0) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'sidekick) - (set! (-> a1-7 param 0) (the-as uint #f)) - (send-event-function *target* a1-7) - ) + (send-event *target* 'sidekick #f) (when (and (or @@ -1032,14 +1012,7 @@ (set! (-> self control transv x) (* 0.95 (-> self control transv x))) (set! (-> self control transv z) (* 0.95 (-> self control transv z))) (when (not (-> self control unknown-symbol20)) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 2) - (set! (-> a1-9 message) 'do-effect) - (set! (-> a1-9 param 0) (the-as uint 'death-warp-out)) - (set! (-> a1-9 param 1) (the-as uint -1.0)) - (send-event-function self a1-9) - ) + (send-event self 'do-effect 'death-warp-out -1.0) (let ((v0-2 #t)) (set! (-> self control unknown-symbol20) v0-2) v0-2 diff --git a/test/decompiler/reference/levels/common/baseplat_REF.gc b/test/decompiler/reference/levels/common/baseplat_REF.gc index 582ea99d1f..67b988cb83 100644 --- a/test/decompiler/reference/levels/common/baseplat_REF.gc +++ b/test/decompiler/reference/levels/common/baseplat_REF.gc @@ -313,14 +313,7 @@ eco-door-event-handler ) ) ) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'query) - (set! (-> a1-0 param 0) (the-as uint 'powerup)) - (set! (-> a1-0 param 1) (the-as uint 3)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'query 'powerup 3) ) ) ) diff --git a/test/decompiler/reference/levels/common/battlecontroller_REF.gc b/test/decompiler/reference/levels/common/battlecontroller_REF.gc index 1366ff7335..23d3725a0b 100644 --- a/test/decompiler/reference/levels/common/battlecontroller_REF.gc +++ b/test/decompiler/reference/levels/common/battlecontroller_REF.gc @@ -208,14 +208,8 @@ battlecontroller-default-event-handler (when (not (-> self camera-on)) (set! (-> self camera-on) #t) (let ((v1-4 (res-lump-struct (-> self entity) 'camera-name structure))) - (when v1-4 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'change-to-entity-by-name) - (set! (-> a1-1 param 0) (the-as uint v1-4)) - (send-event-function *camera* a1-1) - ) + (if v1-4 + (send-event *camera* 'change-to-entity-by-name v1-4) ) ) ) @@ -226,12 +220,7 @@ battlecontroller-default-event-handler ;; INFO: Return type mismatch int vs none. (defbehavior battlecontroller-camera-off battlecontroller () (set! (-> self camera-on) #f) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'clear-entity) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'clear-entity) 0 (none) ) @@ -255,13 +244,7 @@ battlecontroller-default-event-handler (the float (-> s5-0 state)) 'interp ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'cue-jump-to-point) - (set! (-> a1-2 param 0) (the-as uint s3-0)) - (send-event-function s4-0 a1-2) - ) + (send-event s4-0 'cue-jump-to-point s3-0) ) (if (zero? (logand (-> (the-as nav-enemy s4-0) nav-enemy-flags) 2048)) (+! (-> s5-0 state) 1) @@ -269,12 +252,7 @@ battlecontroller-default-event-handler ) ) (else - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'cue-chase) - (send-event-function s4-0 a1-3) - ) + (send-event s4-0 'cue-chase) (set! (-> s5-0 creature) (the-as handle #f)) ) ) @@ -487,12 +465,7 @@ battlecontroller-default-event-handler (let ((s4-0 (battlecontroller-spawn-creature gp-1 (-> self root trans)))) (when (handle->process s4-0) (suspend) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'cue-chase) - (send-event-function (handle->process s4-0) a1-4) - ) + (send-event (handle->process s4-0) 'cue-chase) ) ) ) diff --git a/test/decompiler/reference/levels/common/nav-enemy_REF.gc b/test/decompiler/reference/levels/common/nav-enemy_REF.gc index b8e69f72ed..79a1b56a40 100644 --- a/test/decompiler/reference/levels/common/nav-enemy_REF.gc +++ b/test/decompiler/reference/levels/common/nav-enemy_REF.gc @@ -195,18 +195,10 @@ nav-enemy-attack-handler nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block)) - (with-pp - (let ((v1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-0 from) pp) - (set! (-> v1-0 num-params) 1) - (set! (-> v1-0 message) 'get-attack-count) - (set! (-> v1-0 param 0) (the-as uint 1)) - (send-event-function arg0 v1-0) - ) - (logclear! (-> obj mask) (process-mask actor-pause attackable)) - (go (method-of-object obj nav-enemy-die)) - (the-as object 'die) - ) + (send-event arg0 'get-attack-count 1) + (logclear! (-> obj mask) (process-mask actor-pause attackable)) + (go (method-of-object obj nav-enemy-die)) + (the-as object 'die) ) ;; definition for method 43 of type nav-enemy @@ -216,27 +208,19 @@ dummy-43 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block)) - (with-pp - (the-as object (cond - ((logtest? (-> obj nav-enemy-flags) 32) - (let ((v1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-2 from) pp) - (set! (-> v1-2 num-params) 1) - (set! (-> v1-2 message) 'get-attack-count) - (set! (-> v1-2 param 0) (the-as uint 1)) - (send-event-function arg0 v1-2) - ) - (logclear! - (-> obj mask) - (process-mask actor-pause attackable) - ) - (go (method-of-object obj nav-enemy-die)) - ) - (else - (dummy-44 obj arg0 arg1) + (the-as object (cond + ((logtest? (-> obj nav-enemy-flags) 32) + (send-event arg0 'get-attack-count 1) + (logclear! + (-> obj mask) + (process-mask actor-pause attackable) ) + (go (method-of-object obj nav-enemy-die)) ) - ) + (else + (dummy-44 obj arg0 arg1) + ) + ) ) ) @@ -2289,12 +2273,7 @@ nav-enemy-default-event-handler ) :enter (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'child-die) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (send-event (ppointer->process (-> self parent)) 'child-die) (none) ) :code @@ -2311,12 +2290,7 @@ nav-enemy-default-event-handler 1000000000000000.0 600 ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'death-end) - (send-event-function self a1-2) - ) + (send-event self 'death-end) (if (logtest? (-> self enemy-info options) 2) (go-virtual nav-enemy-fuel-cell) ) diff --git a/test/decompiler/reference/levels/common/plat-button_REF.gc b/test/decompiler/reference/levels/common/plat-button_REF.gc index 75131203b3..1119c7e6dc 100644 --- a/test/decompiler/reference/levels/common/plat-button_REF.gc +++ b/test/decompiler/reference/levels/common/plat-button_REF.gc @@ -293,14 +293,8 @@ ;; INFO: Return type mismatch int vs none. (defbehavior plat-button-camera-on plat-button () (let ((v1-1 (res-lump-struct (-> self entity) 'camera-name structure))) - (when v1-1 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'change-to-entity-by-name) - (set! (-> a1-1 param 0) (the-as uint v1-1)) - (send-event-function *camera* a1-1) - ) + (if v1-1 + (send-event *camera* 'change-to-entity-by-name v1-1) ) ) 0 @@ -310,12 +304,7 @@ ;; definition for function plat-button-camera-off ;; INFO: Return type mismatch int vs none. (defbehavior plat-button-camera-off plat-button () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'clear-entity) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'clear-entity) 0 (none) ) diff --git a/test/decompiler/reference/levels/common/sharkey_REF.gc b/test/decompiler/reference/levels/common/sharkey_REF.gc index 37dee7fc03..23222cf012 100644 --- a/test/decompiler/reference/levels/common/sharkey_REF.gc +++ b/test/decompiler/reference/levels/common/sharkey_REF.gc @@ -736,12 +736,7 @@ nav-enemy-default-event-handler ) ) ) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) self) - (set! (-> a1-14 num-params) 0) - (set! (-> a1-14 message) 'end-mode) - (send-event-function *target* a1-14) - ) + (send-event *target* 'end-mode) (set! (-> self mask) (logior (process-mask enemy) (-> self mask))) ) ) diff --git a/test/decompiler/reference/levels/common/water-anim_REF.gc b/test/decompiler/reference/levels/common/water-anim_REF.gc index a23187946a..4cef41d9bc 100644 --- a/test/decompiler/reference/levels/common/water-anim_REF.gc +++ b/test/decompiler/reference/levels/common/water-anim_REF.gc @@ -898,8 +898,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 70 :fo-max 80 @@ -914,8 +913,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 50 :fo-max 60 @@ -929,8 +927,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 48 :fo-max 58 @@ -945,8 +942,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 30 :fo-max 40 @@ -961,8 +957,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 15 :fo-max 25 @@ -977,8 +972,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 27 :fo-max 37 @@ -993,8 +987,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 26 :fo-max 36 @@ -1009,8 +1002,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 25 :fo-max 35 @@ -1025,8 +1017,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 45 :fo-max 55 @@ -1041,8 +1032,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 20 :fo-max 30 @@ -1056,8 +1046,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 40 :fo-max 50 @@ -1071,8 +1060,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 20 :fo-max 30 @@ -1087,8 +1075,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6f6c2d7265746177) + :sound-name (static-sound-name "water-loop") :volume #x400 :fo-min 27 :fo-max 37 @@ -1103,8 +1090,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 22 :fo-max 32 @@ -1124,8 +1110,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 70 :fo-max 80 @@ -1140,8 +1125,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 40 :fo-max 50 @@ -1156,8 +1140,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 37 :fo-max 47 @@ -1172,8 +1155,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 20 :fo-max 30 @@ -1187,8 +1169,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 51 :fo-max 61 @@ -1202,8 +1183,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 54 :fo-max 64 @@ -1279,8 +1259,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 17 :fo-max 27 @@ -1331,8 +1310,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x61642d78696c6568) + :sound-name (static-sound-name "helix-dark-eco") :volume #x400 :fo-min #x78 :fo-max #x82 @@ -1347,8 +1325,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6f63656b726164) + :sound-name (static-sound-name "darkeco-pool") :volume #x400 :fo-min 19 :fo-max 29 diff --git a/test/decompiler/reference/levels/finalboss/final-door_REF.gc b/test/decompiler/reference/levels/finalboss/final-door_REF.gc index 18be3fd06a..f3539732d8 100644 --- a/test/decompiler/reference/levels/finalboss/final-door_REF.gc +++ b/test/decompiler/reference/levels/finalboss/final-door_REF.gc @@ -375,32 +375,18 @@ (get-task-status (game-task finalboss-movies)) (task-status need-reward-speech) ) - (let ((gp-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> gp-0 from) self) - (set! (-> gp-0 num-params) 3) - (set! (-> gp-0 message) 'change-mode) - (set! (-> gp-0 param 0) (the-as uint 'final-door)) - (set! - (-> gp-0 param 1) - (the-as - uint - (search-process-tree *active-pool* (lambda ((arg0 final-door)) - (= (-> arg0 type) power-right) - ) - ) - ) + (send-event + *target* + 'change-mode + 'final-door + (search-process-tree *active-pool* (lambda ((arg0 final-door)) + (= (-> arg0 type) power-right) + ) ) - (set! - (-> gp-0 param 2) - (the-as - uint - (search-process-tree *active-pool* (lambda ((arg0 final-door)) - (= (-> arg0 type) power-left) - ) - ) - ) + (search-process-tree *active-pool* (lambda ((arg0 final-door)) + (= (-> arg0 type) power-left) + ) ) - (send-event-function *target* gp-0) ) ) ) @@ -618,13 +604,7 @@ ) :enter (behavior ((arg0 basic) (arg1 handle)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'change-to-entity-by-name) - (set! (-> a1-1 param 0) (the-as uint "camera-403")) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'change-to-entity-by-name "camera-403") (set! (-> self control unknown-surface00) *empty-mods*) (logior! (-> self state-flags) 272) (set-setting! *setting-control* self 'allow-progress #f 0.0 0) @@ -632,14 +612,7 @@ ) :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'change-state) - (set! (-> a1-0 param 0) (the-as uint *camera-base-mode*)) - (set! (-> a1-0 param 1) (the-as uint 60)) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'change-state *camera-base-mode* 60) (set! (-> self state-flags) (logand -273 (-> self state-flags))) (target-exit) (clear-pending-settings-from-process *setting-control* self 'allow-progress) diff --git a/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc b/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc index 7ad32a933d..436a49b7c7 100644 --- a/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc +++ b/test/decompiler/reference/levels/finalboss/green-eco-lurker_REF.gc @@ -391,28 +391,21 @@ dummy-43 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (cond - ((= (-> arg0 type) target) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-2) - ) + (cond + ((= (-> arg0 type) target) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) - #f - ) - (else - (nav-enemy-set-hit-from-direction arg0) - ((method-of-type nav-enemy dummy-43) obj arg0 arg1) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) + #f + ) + (else + (nav-enemy-set-hit-from-direction arg0) + ((method-of-type nav-enemy dummy-43) obj arg0 arg1) ) ) ) @@ -422,27 +415,20 @@ nav-enemy-attack-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (cond - ((= (-> arg0 type) target) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-2) - ) + (cond + ((= (-> arg0 type) target) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) - #f - ) - (else - ((method-of-type nav-enemy nav-enemy-attack-handler) obj arg0 arg1) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) + #f + ) + (else + ((method-of-type nav-enemy nav-enemy-attack-handler) obj arg0 arg1) ) ) ) @@ -452,29 +438,22 @@ dummy-44 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (when - (and - (logtest? (-> obj nav-enemy-flags) 64) - ((method-of-type touching-shapes-entry prims-touching?) - (the-as touching-shapes-entry (-> arg1 param 0)) - (-> obj collide-info) - (the-as uint 1) - ) + (when + (and + (logtest? (-> obj nav-enemy-flags) 64) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg1 param 0)) + (-> obj collide-info) + (the-as uint 1) ) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-3) - ) + ) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) ) ) @@ -484,29 +463,22 @@ nav-enemy-touch-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block)) - (with-pp - (when - (and - (logtest? (-> obj nav-enemy-flags) 64) - ((method-of-type touching-shapes-entry prims-touching?) - (the-as touching-shapes-entry (-> arg1 param 0)) - (-> obj collide-info) - (the-as uint 1) - ) + (when + (and + (logtest? (-> obj nav-enemy-flags) 64) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg1 param 0)) + (-> obj collide-info) + (the-as uint 1) ) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) pp) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> obj parent)) a1-3) - ) + ) + (if + (nav-enemy-send-attack + arg0 + (the-as touching-shapes-entry (-> arg1 param 0)) + 'generic ) + (send-event (ppointer->process (-> obj parent)) 'blob-hit-jak) ) ) ) @@ -1134,12 +1106,7 @@ :virtual #t :enter (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'blob-died) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (send-event (ppointer->process (-> self parent)) 'blob-died) (let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000))) (when gp-0 (let ((t9-2 (method-of-type part-tracker activate))) @@ -1316,20 +1283,10 @@ (case arg2 (('blob-died) (set! (-> self num-alive) (max 0 (+ (-> self num-alive) -1))) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'blob-died) - (send-event-function (ppointer->process (-> self parent)) a1-1) - ) + (send-event (ppointer->process (-> self parent)) 'blob-died) ) (('blob-hit-jak) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blob-hit-jak) - (send-event-function (ppointer->process (-> self parent)) a1-2) - ) + (send-event (ppointer->process (-> self parent)) 'blob-hit-jak) ) ) ) @@ -1375,12 +1332,7 @@ (while (> (-> self num-alive) 0) (suspend) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'trigger) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'trigger) (until (not (-> self child)) (suspend) ) diff --git a/test/decompiler/reference/levels/finalboss/light-eco_REF.gc b/test/decompiler/reference/levels/finalboss/light-eco_REF.gc index 459ac3aec5..9c096c5f68 100644 --- a/test/decompiler/reference/levels/finalboss/light-eco_REF.gc +++ b/test/decompiler/reference/levels/finalboss/light-eco_REF.gc @@ -581,15 +581,10 @@ (let ((v1-0 arg2)) (the-as object (when (or (= v1-0 'touch) (= v1-0 'attack)) (when (= (-> arg0 type) target) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'trigger) - (set! (-> a1-3 param 0) (the-as uint (-> self angle-bit))) - (send-event-function - (ppointer->process (-> self parent)) - a1-3 - ) + (send-event + (ppointer->process (-> self parent)) + 'trigger + (-> self angle-bit) ) (go light-eco-child-grabbed) ) @@ -805,12 +800,10 @@ (defstate light-eco-child-die (light-eco-child) :code (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'untrigger) - (set! (-> a1-0 param 0) (the-as uint (-> self angle-bit))) - (send-event-function (ppointer->process (-> self parent)) a1-0) + (send-event + (ppointer->process (-> self parent)) + 'untrigger + (-> self angle-bit) ) (dummy-48 (-> self root-override)) (logior! (-> self draw status) 2) @@ -1259,8 +1252,7 @@ :mask #xc0 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x63652d6574696877) + :sound-name (static-sound-name "white-eco-lp") :volume #x400 :fo-min #x12c :fo-max #x190 diff --git a/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc b/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc index 6a75bbceda..5aba79d817 100644 --- a/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc +++ b/test/decompiler/reference/levels/finalboss/robotboss-misc_REF.gc @@ -741,8 +741,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x766f6d2d6f6c6973) + :sound-name (static-sound-name "silo-moves") :volume #x400 :fo-max 80 ) @@ -805,102 +804,71 @@ ;; definition for method 32 of type finalbosscam ;; INFO: Return type mismatch spool-anim vs basic. (defmethod play-anim! finalbosscam ((obj finalbosscam) (arg0 symbol)) - (with-pp - (when arg0 - (let ((s5-0 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj robotboss) (ppointer->handle (when s5-0 - (let - ((t9-1 - (method-of-type - manipy - activate - ) + (when arg0 + (let ((s5-0 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj robotboss) (ppointer->handle (when s5-0 + (let + ((t9-1 + (method-of-type + manipy + activate ) ) - (t9-1 - (the-as manipy s5-0) - obj - 'manipy - (the-as pointer #x70004000) - ) ) - (run-now-in-process - s5-0 - manipy-init - (-> obj root-override trans) - (-> obj entity) - *robotboss-sg* - #f + (t9-1 + (the-as manipy s5-0) + obj + 'manipy + (the-as pointer #x70004000) ) - (-> s5-0 ppointer) ) - ) - ) + (run-now-in-process + s5-0 + manipy-init + (-> obj root-override trans) + (-> obj entity) + *robotboss-sg* + #f + ) + (-> s5-0 ppointer) + ) + ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'anim-mode) - (set! (-> a1-4 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj robotboss)) a1-4) - ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'center-joint) - (set! (-> a1-5 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj robotboss)) a1-5) - ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'origin-joint-index) - (set! (-> a1-6 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj robotboss)) a1-6) - ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) pp) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'trans-hook) - (set! (-> a1-7 param 0) (the-as uint robotboss-manipy-trans-hook)) - (send-event-function (handle->process (-> obj robotboss)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'eval) - (set! - (-> a1-8 param 0) - (the-as - uint - (lambda :behavior finalbosscam - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 645) self))) - (set! (-> self part) v0-0) - v0-0 - ) - ) - ) - ) - (send-event-function (handle->process (-> obj robotboss)) a1-8) - ) - (let ((v1-43 (handle->process (-> obj robotboss)))) - (if v1-43 - (set! (-> (the-as robotboss v1-43) draw bounds w) 327680.0) + ) + (send-event (handle->process (-> obj robotboss)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj robotboss)) 'center-joint 3) + (send-event (handle->process (-> obj robotboss)) 'origin-joint-index 3) + (send-event + (handle->process (-> obj robotboss)) + 'trans-hook + robotboss-manipy-trans-hook + ) + (send-event + (handle->process (-> obj robotboss)) + 'eval + (lambda :behavior finalbosscam + () + (let ((v0-0 (create-launch-control (-> *part-group-id-table* 645) self))) + (set! (-> self part) v0-0) + v0-0 ) ) ) - (the-as - basic - (new 'static 'spool-anim - :name "finalbosscam-white-eco" - :index 3 - :parts 3 - :command-list '() + (let ((v1-43 (handle->process (-> obj robotboss)))) + (if v1-43 + (set! (-> (the-as robotboss v1-43) draw bounds w) 327680.0) ) ) ) + (the-as + basic + (new 'static 'spool-anim + :name "finalbosscam-white-eco" + :index 3 + :parts 3 + :command-list '() + ) + ) ) ;; definition for method 31 of type finalbosscam diff --git a/test/decompiler/reference/levels/finalboss/robotboss-weapon_REF.gc b/test/decompiler/reference/levels/finalboss/robotboss-weapon_REF.gc index e092b6596b..5fd6484f30 100644 --- a/test/decompiler/reference/levels/finalboss/robotboss-weapon_REF.gc +++ b/test/decompiler/reference/levels/finalboss/robotboss-weapon_REF.gc @@ -329,13 +329,7 @@ (defstate darkecobomb-explode (darkecobomb) :code (behavior ((arg0 symbol)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'reset-pickup) - (set! (-> a1-0 param 0) (the-as uint 'eco)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'reset-pickup 'eco) (sound-play-by-name (static-sound-name "explod-bomb") (new-sound-id) @@ -346,13 +340,7 @@ (the-as vector #f) ) (activate! *camera-smush-control* 819.2 37 600 1.0 0.995) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'flash) - (set! (-> a1-3 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) (let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000))) (when s5-1 (let ((t9-6 (method-of-type part-tracker activate))) @@ -388,43 +376,15 @@ (if *target* (logior! (-> *target* mask) (process-mask sleep)) ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 0) - (set! (-> a1-7 message) 'bomb-going) - (send-event-function (ppointer->process (-> self parent)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'change-to-entity-by-name) - (set! (-> a1-8 param 0) (the-as uint "camera-402")) - (send-event-function *camera* a1-8) - ) + (send-event (ppointer->process (-> self parent)) 'bomb-going) + (send-event *camera* 'change-to-entity-by-name "camera-402") (set! (-> self state-time) (-> *display* base-frame-counter)) (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 600) (suspend) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'force-blend) - (set! (-> a1-9 param 0) (the-as uint 0)) - (send-event-function *camera* a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'change-state) - (set! (-> a1-10 param 0) (the-as uint *camera-base-mode*)) - (send-event-function *camera* a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'clear-entity) - (send-event-function *camera* a1-11) - ) + (send-event *camera* 'force-blend 0) + (send-event *camera* 'change-state *camera-base-mode*) + (send-event *camera* 'clear-entity) (if *target* (logclear! (-> *target* mask) (process-mask sleep)) ) @@ -441,12 +401,7 @@ ) ) (else - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'bomb-done) - (send-event-function (ppointer->process (-> self parent)) a1-13) - ) + (send-event (ppointer->process (-> self parent)) 'bomb-done) ) ) (deactivate self) @@ -936,8 +891,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6970732d626d6f62) + :sound-name (static-sound-name "bomb-spin") :volume #x400 :fo-max 80 ) @@ -1297,12 +1251,7 @@ ) (send-event-function *target* a1-2) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'hit-jak) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'hit-jak) ) ) (dotimes (gp-1 5) @@ -1328,12 +1277,7 @@ (set-vector! (-> self draw color-mult) f0-3 f0-3 f0-3 0.75) ) (when (>= (- (-> *display* game-frame-counter) (-> self state-time)) 600) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 0) - (set! (-> a1-7 message) 'missed-jak) - (send-event-function (ppointer->process (-> self parent)) a1-7) - ) + (send-event (ppointer->process (-> self parent)) 'missed-jak) (deactivate self) ) (none) @@ -1509,8 +1453,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x657269662d646572) + :sound-name (static-sound-name "red-fireball") :volume #x400 :fo-max 80 ) @@ -1558,12 +1501,7 @@ ) (send-event-function *target* a1-3) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'hit-jak) - (send-event-function (ppointer->process (-> self parent)) a1-4) - ) + (send-event (ppointer->process (-> self parent)) 'hit-jak) ) ) ) @@ -1588,12 +1526,7 @@ (- (-> *display* game-frame-counter) (-> self state-time)) (-> self flight-time) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'missed-jak) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'missed-jak) (deactivate self) ) (none) diff --git a/test/decompiler/reference/levels/finalboss/robotboss_REF.gc b/test/decompiler/reference/levels/finalboss/robotboss_REF.gc index 6da25fea44..98c614c053 100644 --- a/test/decompiler/reference/levels/finalboss/robotboss_REF.gc +++ b/test/decompiler/reference/levels/finalboss/robotboss_REF.gc @@ -145,13 +145,7 @@ (defbehavior robotboss-shooting-trans robotboss ((arg0 int)) (let ((gp-0 (new 'stack-no-clear 'vector))) (vector<-cspace! gp-0 (-> self node-list data arg0)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'trans) - (set! (-> a1-2 param 0) (the-as uint gp-0)) - (send-event-function (handle->process (-> self shot-attractor)) a1-2) - ) + (send-event (handle->process (-> self shot-attractor)) 'trans gp-0) ) (none) ) @@ -201,20 +195,8 @@ ) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'attackable) - (set! (-> a1-5 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self shot-attractor)) a1-5) - ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'draw) - (set! (-> a1-6 param 0) (the-as uint #f)) - (send-event-function (handle->process (-> self shot-attractor)) a1-6) - ) + (send-event (handle->process (-> self shot-attractor)) 'attackable #t) + (send-event (handle->process (-> self shot-attractor)) 'draw #f) ) ;; definition for function robotboss-yellow-eco-off @@ -324,13 +306,7 @@ (vector-normalize! gp-0 (the-as float 204800.0)) (set! (-> gp-0 y) 32768.0) (vector+! gp-0 gp-0 s5-0) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'set-pivot) - (set! (-> a1-12 param 0) (the-as uint gp-0)) - (send-event-function *camera* a1-12) - ) + (send-event *camera* 'set-pivot gp-0) ) (when (-> self alts 6) (let ((a0-16 (-> self alts 6 extra process)) @@ -350,13 +326,7 @@ (set! (-> v1-23 y) (+ -20.48 (-> v1-23 y))) ) ) - (let ((a1-22 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-22 from) self) - (set! (-> a1-22 num-params) 1) - (set! (-> a1-22 message) 'move-to) - (set! (-> a1-22 param 0) (the-as uint v1-23)) - (send-event-function a0-16 a1-22) - ) + (send-event a0-16 'move-to v1-23) ) ) ) @@ -613,12 +583,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'beam-off) - (send-event-function (handle->process (-> self white-eco)) a1-4) - ) + (send-event (handle->process (-> self white-eco)) 'beam-off) (none) ) :trans @@ -1222,12 +1187,7 @@ ) ) ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 0) - (set! (-> a1-11 message) 'play-anim) - (send-event-function (handle->process gp-1) a1-11) - ) + (send-event (handle->process gp-1) 'play-anim) (suspend) (while (movie?) (suspend) @@ -1437,13 +1397,7 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'flash) - (set! (-> a1-9 param 0) (the-as uint 255.0)) - (send-event-function self a1-9) - ) + (send-event self 'flash 255.0) (let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000))) (when s5-1 (let ((t9-8 (method-of-type part-tracker activate))) @@ -1641,13 +1595,7 @@ (the-as uint 0) ) (set! (-> self use-interesting) #f) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'point-of-interest) - (set! (-> a1-3 param 0) (the-as uint #f)) - (send-event-function *camera* a1-3) - ) + (send-event *camera* 'point-of-interest #f) (if (nonzero? (-> self yellow-gun)) (set-mode! (-> self yellow-gun) (joint-mod-handler-mode flex-blend)) ) @@ -1723,36 +1671,17 @@ ) ) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'flash) - (set! (-> a1-8 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-8) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) + (send-event (ppointer->process gp-1) 'anim-mode 'play1) + (send-event + (ppointer->process gp-1) + 'rot-quat + (-> self root-override quat) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'play1)) - (send-event-function (ppointer->process gp-1) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'rot-quat) - (set! (-> a1-10 param 0) (the-as uint (-> self root-override quat))) - (send-event-function (ppointer->process gp-1) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'art-joint-anim) - (set! - (-> a1-11 param 0) - (the-as uint "robotboss-yelloweco-yellow-last-hit") - ) - (send-event-function (ppointer->process gp-1) a1-11) + (send-event + (ppointer->process gp-1) + 'art-joint-anim + "robotboss-yelloweco-yellow-last-hit" ) ) ) @@ -3173,33 +3102,17 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'flash) - (set! (-> a1-9 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-9) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) + (send-event (ppointer->process gp-1) 'anim-mode 'play1) + (send-event + (ppointer->process gp-1) + 'rot-quat + (-> self root-override quat) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'anim-mode) - (set! (-> a1-10 param 0) (the-as uint 'play1)) - (send-event-function (ppointer->process gp-1) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'rot-quat) - (set! (-> a1-11 param 0) (the-as uint (-> self root-override quat))) - (send-event-function (ppointer->process gp-1) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'art-joint-anim) - (set! (-> a1-12 param 0) (the-as uint "robotboss-redeco-red-last-hit")) - (send-event-function (ppointer->process gp-1) a1-12) + (send-event + (ppointer->process gp-1) + 'art-joint-anim + "robotboss-redeco-red-last-hit" ) ) ) @@ -5401,13 +5314,7 @@ (the-as uint 0) ) (set! (-> self use-interesting) #f) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'point-of-interest) - (set! (-> a1-3 param 0) (the-as uint #f)) - (send-event-function *camera* a1-3) - ) + (send-event *camera* 'point-of-interest #f) (robotboss-blue-done) (if (nonzero? (-> self looping-sound 0)) (stop! (-> self looping-sound 0)) @@ -5499,33 +5406,17 @@ ) ) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'flash) - (set! (-> a1-10 param 0) (the-as uint 255.0)) - (send-event-function (ppointer->process (-> self parent)) a1-10) + (send-event (ppointer->process (-> self parent)) 'flash 255.0) + (send-event (ppointer->process gp-2) 'anim-mode 'play1) + (send-event + (ppointer->process gp-2) + 'rot-quat + (-> self root-override quat) ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'play1)) - (send-event-function (ppointer->process gp-2) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'rot-quat) - (set! (-> a1-12 param 0) (the-as uint (-> self root-override quat))) - (send-event-function (ppointer->process gp-2) a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'art-joint-anim) - (set! (-> a1-13 param 0) (the-as uint "robotboss-blueeco-blue-last-hit")) - (send-event-function (ppointer->process gp-2) a1-13) + (send-event + (ppointer->process gp-2) + 'art-joint-anim + "robotboss-blueeco-blue-last-hit" ) ) ) @@ -6293,8 +6184,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x756c622d6f626f72) + :sound-name (static-sound-name "robo-blue-lp") :volume #x400 :fo-max 80 ) @@ -6310,8 +6200,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x63726f742d6f6365) + :sound-name (static-sound-name "eco-torch") :volume #x400 :fo-max 80 ) @@ -6327,8 +6216,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x7a7a75622d646572) + :sound-name (static-sound-name "red-buzz") :volume #x400 :fo-max 80 ) @@ -6343,8 +6231,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x7a7a75622d676662) + :sound-name (static-sound-name "bfg-buzz") :volume #x400 :fo-max 80 ) diff --git a/test/decompiler/reference/levels/flut_common/flutflut_REF.gc b/test/decompiler/reference/levels/flut_common/flutflut_REF.gc index 1451ae47af..4c214808a2 100644 --- a/test/decompiler/reference/levels/flut_common/flutflut_REF.gc +++ b/test/decompiler/reference/levels/flut_common/flutflut_REF.gc @@ -191,16 +191,7 @@ (task-complete? *game-info* (-> self entity extra perm task)) (not (handle->process (-> self cell))) ) - (when - (and - (-> self auto-get-off) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 0) - (set! (-> a1-6 message) 'end-mode) - (send-event-function *target* a1-6) - ) - ) + (when (and (-> self auto-get-off) (send-event *target* 'end-mode)) (set! (-> self auto-get-off) #f) (go-virtual pickup (method-of-object self idle)) ) @@ -371,14 +362,7 @@ (if (and (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 2) - (set! (-> a1-7 message) 'change-mode) - (set! (-> a1-7 param 0) (the-as uint 'flut)) - (set! (-> a1-7 param 1) (the-as uint self)) - (send-event-function *target* a1-7) - ) + (send-event *target* 'change-mode 'flut self) ) (go-virtual pickup (method-of-object self wait-for-return)) ) @@ -485,15 +469,7 @@ :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (if - (and - (or (= arg2 'touch) (= arg2 'attack)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'end-mode) - (send-event-function *target* a1-1) - ) - ) + (and (or (= arg2 'touch) (= arg2 'attack)) (send-event *target* 'end-mode)) (go-virtual pickup (method-of-object self idle)) ) (the-as object (if (= arg2 'trans) @@ -616,8 +592,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6c65742d6d6f6f7a) + :sound-name (static-sound-name "zoom-teleport") :volume #x400 :fo-max 30 ) diff --git a/test/decompiler/reference/levels/intro/evilbro_REF.gc b/test/decompiler/reference/levels/intro/evilbro_REF.gc index 037ad2c127..e9a50539dd 100644 --- a/test/decompiler/reference/levels/intro/evilbro_REF.gc +++ b/test/decompiler/reference/levels/intro/evilbro_REF.gc @@ -41,33 +41,25 @@ ;; definition for method 32 of type evilbro ;; INFO: Return type mismatch spool-anim vs basic. (defmethod play-anim! evilbro ((obj evilbro) (arg0 symbol)) - (with-pp - (cond - (arg0 - (close-specific-task! - (game-task leaving-misty) - (task-status need-introduction) - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'clone) - (set! (-> a1-2 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj evilsis extra process) a1-2) - ) - ) - (else - (set! (-> obj will-talk) #t) + (cond + (arg0 + (close-specific-task! + (game-task leaving-misty) + (task-status need-introduction) ) + (send-event (-> obj evilsis extra process) 'clone (process->handle obj)) ) - (the-as - basic - (new 'static 'spool-anim - :name "evilbro-misty-end" - :index 5 - :parts 9 - :command-list '() - ) + (else + (set! (-> obj will-talk) #t) + ) + ) + (the-as + basic + (new 'static 'spool-anim + :name "evilbro-misty-end" + :index 5 + :parts 9 + :command-list '() ) ) ) @@ -82,12 +74,7 @@ :virtual #t :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self evilsis extra process) a1-0) - ) + (send-event (-> self evilsis extra process) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (none) ) diff --git a/test/decompiler/reference/levels/jungle/bouncer_REF.gc b/test/decompiler/reference/levels/jungle/bouncer_REF.gc index c345045d04..7271529545 100644 --- a/test/decompiler/reference/levels/jungle/bouncer_REF.gc +++ b/test/decompiler/reference/levels/jungle/bouncer_REF.gc @@ -91,20 +91,12 @@ (when (and (= (-> arg3 param 1) 'flop) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 3) - (set! (-> a1-10 message) 'jump) - (set! - (-> a1-10 param 0) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-10 param 1) - (the-as uint (-> self spring-height)) - ) - (set! (-> a1-10 param 2) (the-as uint #f)) - (send-event-function arg0 a1-10) + (send-event + arg0 + 'jump + (-> self spring-height) + (-> self spring-height) + #f ) ) (go bouncer-fire) diff --git a/test/decompiler/reference/levels/jungle/fisher-JUN_REF.gc b/test/decompiler/reference/levels/jungle/fisher-JUN_REF.gc index 8e8de16e23..4d380e6574 100644 --- a/test/decompiler/reference/levels/jungle/fisher-JUN_REF.gc +++ b/test/decompiler/reference/levels/jungle/fisher-JUN_REF.gc @@ -1226,12 +1226,7 @@ *entity-pool* 'ambient ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'deadly) - (send-event-function (ppointer->process (-> self parent)) a1-3) - ) + (send-event (ppointer->process (-> self parent)) 'deadly) ) (('powerup) (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000))) @@ -1266,13 +1261,7 @@ (the-as uint 1) (the-as vector #t) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'fisher-fish-caught) - (set! (-> a1-8 param 0) (the-as uint 5)) - (send-event-function (ppointer->process (-> self parent)) a1-8) - ) + (send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 5) ) (else (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000))) @@ -1307,13 +1296,7 @@ (the-as uint 1) (the-as vector #t) ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'fisher-fish-caught) - (set! (-> a1-13 param 0) (the-as uint 1)) - (send-event-function (ppointer->process (-> self parent)) a1-13) - ) + (send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 1) ) ) (set! (-> self vel) (* 0.25 (-> self vel))) @@ -1370,13 +1353,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'fisher-fish-die) - (set! (-> a1-4 param 0) (the-as uint 5)) - (send-event-function (ppointer->process (-> self parent)) a1-4) - ) + (send-event (ppointer->process (-> self parent)) 'fisher-fish-die 5) ) (else (let* ((v1-21 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) @@ -1462,13 +1439,7 @@ ) ) ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'fisher-fish-die) - (set! (-> a1-13 param 0) (the-as uint 1)) - (send-event-function (ppointer->process (-> self parent)) a1-13) - ) + (send-event (ppointer->process (-> self parent)) 'fisher-fish-die 1) ) ) (none) @@ -1846,12 +1817,7 @@ (set! *camera-look-through-other* 2) (cond ((>= (-> self caught) (-> *FISHER-bank* max-caught)) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'end-mode) - (send-event-function *target* a1-3) - ) + (send-event *target* 'end-mode) (set! (-> self trans-hook) (lambda :behavior fisher @@ -1866,12 +1832,7 @@ ) ) ((< (-> self caught) 0) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'end-mode) - (send-event-function *target* a1-4) - ) + (send-event *target* 'end-mode) (go-virtual idle) ) (else @@ -1987,12 +1948,7 @@ (-> gp-3 ppointer) ) ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'lose) - (send-event-function *target* a1-13) - ) + (send-event *target* 'lose) ) ) (none) @@ -2000,12 +1956,7 @@ :exit (behavior () (when (and *target* (the-as target #f)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function *target* a1-0) - ) + (send-event *target* 'end-mode) (process-grab? *target*) ) (none) @@ -2325,12 +2276,7 @@ v0-2 ) ((= v1-0 'fisher-fish-caught) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'bounce) - (send-event-function *target* a1-2) - ) + (send-event *target* 'bounce) (set! v0-2 (the-as none (+ (-> self caught) (-> arg3 param 0))) @@ -2353,13 +2299,7 @@ :enter (behavior () (set-setting! *setting-control* self 'ambient-volume 'rel 50.0 0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'reset-pickup) - (set! (-> a1-1 param 0) (the-as uint 'eco)) - (send-event-function *target* a1-1) - ) + (send-event *target* 'reset-pickup 'eco) (ja-channel-set! 0) (dummy-48 (-> self root-override)) (let ((gp-0 (get-process *default-dead-pool* process #x4000))) @@ -2384,13 +2324,7 @@ (-> gp-0 ppointer) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'change-to-entity-by-name) - (set! (-> a1-5 param 0) (the-as uint "camera-152")) - (send-event-function *camera* a1-5) - ) + (send-event *camera* 'change-to-entity-by-name "camera-152") (init! (-> self query) (the-as string #f) @@ -2421,26 +2355,9 @@ (set! (-> *camera-other-trans* quad) (-> *camera-combiner* trans quad)) (set! (-> *camera-other-root* quad) (-> self root-override trans quad)) (dummy-49 (-> self root-override)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'blend-from-as-fixed) - (send-event-function *camera* a1-2) - ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 2) - (set! (-> a1-3 message) 'change-state) - (set! (-> a1-3 param 0) (the-as uint *camera-base-mode*)) - (set! (-> a1-3 param 1) (the-as uint 0)) - (send-event-function *camera* a1-3) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'clear-entity) - (send-event-function *camera* a1-4) - ) + (send-event *camera* 'blend-from-as-fixed) + (send-event *camera* 'change-state *camera-base-mode* 0) + (send-event *camera* 'clear-entity) 0 (none) ) @@ -3187,42 +3104,28 @@ ) ) (when (-> self manipy) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'anim-mode) - (set! (-> a1-6 param 0) (the-as uint 'copy-parent)) - (send-event-function (ppointer->process (-> self manipy)) a1-6) - ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'eval) - (set! - (-> a1-7 param 0) - (the-as - uint - (lambda :behavior target - () - (set! - (-> self attack-info vector x) - (the-as - float - (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 6) - ) - ) - (set! - (-> self attack-info vector y) - (the-as - float - (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 5) - ) - ) - (none) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'copy-parent) + (send-event + (ppointer->process (-> self manipy)) + 'eval + (lambda :behavior target + () + (set! + (-> self attack-info vector x) + (the-as + float + (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 6) ) ) + (set! + (-> self attack-info vector y) + (the-as + float + (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 5) + ) + ) + (none) ) - (send-event-function (ppointer->process (-> self manipy)) a1-7) ) (let ((v1-35 (-> self manipy 0 node-list data))) (set! (-> v1-35 0 param0) cspace<-cspace+quaternion!) diff --git a/test/decompiler/reference/levels/jungle/jungle-elevator_REF.gc b/test/decompiler/reference/levels/jungle/jungle-elevator_REF.gc index d46610da1b..21550b8653 100644 --- a/test/decompiler/reference/levels/jungle/jungle-elevator_REF.gc +++ b/test/decompiler/reference/levels/jungle/jungle-elevator_REF.gc @@ -46,13 +46,7 @@ (set! (-> self draw light-index) (the-as uint 255)) (set! (-> self bottom-height) (-> jungle bottom-height)) (set! (-> jungle bottom-height) (-> jungleb bottom-height)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'reset-pickup) - (set! (-> a1-0 param 0) (the-as uint 'eco)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'reset-pickup 'eco) (none) ) :exit @@ -88,12 +82,7 @@ ) (when (< (-> self path-pos) 0.9) (TODO-RENAME-28 (-> *target* control)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'reset-height) - (send-event-function *target* a1-2) - ) + (send-event *target* 'reset-height) ) (if (and diff --git a/test/decompiler/reference/levels/jungleb/aphid_REF.gc b/test/decompiler/reference/levels/jungleb/aphid_REF.gc index 7c0a8c24ef..c4a6851088 100644 --- a/test/decompiler/reference/levels/jungleb/aphid_REF.gc +++ b/test/decompiler/reference/levels/jungleb/aphid_REF.gc @@ -57,30 +57,22 @@ ;; INFO: Return type mismatch none vs object. ;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? (defmethod dummy-43 aphid ((obj aphid) (arg0 process) (arg1 event-message-block)) - (with-pp - (the-as object (cond - ((or - (logtest? (-> obj nav-enemy-flags) 32) - (= arg0 (ppointer->process (-> obj parent))) - ) - (let ((v1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> v1-5 from) pp) - (set! (-> v1-5 num-params) 1) - (set! (-> v1-5 message) 'get-attack-count) - (set! (-> v1-5 param 0) (the-as uint 1)) - (send-event-function arg0 v1-5) - ) - (logclear! - (-> obj mask) - (process-mask actor-pause attackable) - ) - (go (method-of-object obj nav-enemy-die)) + (the-as object (cond + ((or + (logtest? (-> obj nav-enemy-flags) 32) + (= arg0 (ppointer->process (-> obj parent))) ) - (else - (dummy-44 obj arg0 arg1) + (send-event arg0 'get-attack-count 1) + (logclear! + (-> obj mask) + (process-mask actor-pause attackable) ) + (go (method-of-object obj nav-enemy-die)) ) - ) + (else + (dummy-44 obj arg0 arg1) + ) + ) ) ) diff --git a/test/decompiler/reference/levels/jungleb/plat-flip_REF.gc b/test/decompiler/reference/levels/jungleb/plat-flip_REF.gc index dba3a57ce6..c462b4f23a 100644 --- a/test/decompiler/reference/levels/jungleb/plat-flip_REF.gc +++ b/test/decompiler/reference/levels/jungleb/plat-flip_REF.gc @@ -64,13 +64,7 @@ (activate! (-> self smush) -1.0 90 300 1.0 1.0) ) ((= v1-0 'touch) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'no-look-around) - (set! (-> a1-5 param 0) (the-as uint 450)) - (send-event-function arg0 a1-5) - ) + (send-event arg0 'no-look-around 450) (the-as smush-control #f) ) ) diff --git a/test/decompiler/reference/levels/lavatube/lavatube-part_REF.gc b/test/decompiler/reference/levels/lavatube/lavatube-part_REF.gc index 6b3b9434bb..d4a7b38e5c 100644 --- a/test/decompiler/reference/levels/lavatube/lavatube-part_REF.gc +++ b/test/decompiler/reference/levels/lavatube/lavatube-part_REF.gc @@ -427,8 +427,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x65722d6d61657473) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -570,8 +569,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x65722d6d61657473) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) diff --git a/test/decompiler/reference/levels/maincave/baby-spider_REF.gc b/test/decompiler/reference/levels/maincave/baby-spider_REF.gc index e446b84dc4..b56744490b 100644 --- a/test/decompiler/reference/levels/maincave/baby-spider_REF.gc +++ b/test/decompiler/reference/levels/maincave/baby-spider_REF.gc @@ -1121,13 +1121,8 @@ baby-spider-default-event-handler :enter (behavior () (let ((v1-0 (-> self event-death))) - (when v1-0 - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) v1-0) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (if v1-0 + (send-event (ppointer->process (-> self parent)) v1-0) ) ) (set! (-> self draw bounds y) 8192.0) @@ -1149,13 +1144,8 @@ baby-spider-default-event-handler (behavior () (dummy-18 self) (let ((v1-2 (-> self event-death))) - (when v1-2 - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) v1-2) - (send-event-function (ppointer->process (-> self parent)) a1-0) - ) + (if v1-2 + (send-event (ppointer->process (-> self parent)) v1-2) ) ) (none) diff --git a/test/decompiler/reference/levels/maincave/spiderwebs_REF.gc b/test/decompiler/reference/levels/maincave/spiderwebs_REF.gc index cb9ea9cea9..e05347aa79 100644 --- a/test/decompiler/reference/levels/maincave/spiderwebs_REF.gc +++ b/test/decompiler/reference/levels/maincave/spiderwebs_REF.gc @@ -113,24 +113,12 @@ 13516.8 (vector-vector-distance a0-8 (-> self root trans)) ) - (let - ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 3) - (set! (-> a1-3 message) 'jump) - (set! - (-> a1-3 param 0) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-3 param 1) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-3 param 2) - (the-as uint *spider-jump-mods*) - ) - (send-event-function arg0 a1-3) + (send-event + arg0 + 'jump + (-> self spring-height) + (-> self spring-height) + *spider-jump-mods* ) ) ) @@ -143,20 +131,12 @@ (if (and (= (-> arg3 param 1) 'flop) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 3) - (set! (-> a1-4 message) 'jump) - (set! - (-> a1-4 param 0) - (the-as uint (-> self spring-height)) - ) - (set! - (-> a1-4 param 1) - (the-as uint (-> self spring-height)) - ) - (set! (-> a1-4 param 2) (the-as uint *spider-jump-mods*)) - (send-event-function arg0 a1-4) + (send-event + arg0 + 'jump + (-> self spring-height) + (-> self spring-height) + *spider-jump-mods* ) ) (go spiderwebs-bounce) diff --git a/test/decompiler/reference/levels/misty/bonelurker_REF.gc b/test/decompiler/reference/levels/misty/bonelurker_REF.gc index 85364f6b53..af707e4db7 100644 --- a/test/decompiler/reference/levels/misty/bonelurker_REF.gc +++ b/test/decompiler/reference/levels/misty/bonelurker_REF.gc @@ -194,13 +194,7 @@ 150 ) (nav-enemy-set-hit-from-direction arg0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'get-attack-count) - (set! (-> a1-1 param 0) (the-as uint 1)) - (send-event-function arg0 a1-1) - ) + (send-event arg0 'get-attack-count 1) (logclear! (-> self mask) (process-mask actor-pause)) (go-virtual nav-enemy-die) 'die diff --git a/test/decompiler/reference/levels/misty/misty-part_REF.gc b/test/decompiler/reference/levels/misty/misty-part_REF.gc index 749ca4d2d1..1a341bed37 100644 --- a/test/decompiler/reference/levels/misty/misty-part_REF.gc +++ b/test/decompiler/reference/levels/misty/misty-part_REF.gc @@ -1202,8 +1202,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x65722d6d61657473) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -1293,8 +1292,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x65722d6d61657473) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -1385,8 +1383,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x65722d6d61657473) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) @@ -1477,8 +1474,7 @@ :mask #x1 :num 0.05 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x65722d6d61657473) + :sound-name (static-sound-name "steam-release") :volume #x400 ) ) diff --git a/test/decompiler/reference/levels/misty/muse_REF.gc b/test/decompiler/reference/levels/misty/muse_REF.gc index ccb575a141..ae86023f3d 100644 --- a/test/decompiler/reference/levels/misty/muse_REF.gc +++ b/test/decompiler/reference/levels/misty/muse_REF.gc @@ -744,28 +744,9 @@ nav-enemy-default-event-handler ) ) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 2) - (set! (-> a1-10 message) 'trans) - (set! (-> a1-10 param 0) (the-as uint 'save)) - (set! (-> a1-10 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'matrix) - (set! (-> a1-11 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'blend-shape) - (set! (-> a1-12 param 0) (the-as uint #t)) - (send-event-function *target* a1-12) - ) + (send-event *target* 'trans 'save (-> self old-target-pos)) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) (if (!= *kernel-boot-message* 'play) (set! (-> self trans-hook) @@ -829,26 +810,14 @@ nav-enemy-default-event-handler self 'ambient-volume ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) self) - (set! (-> a1-24 num-params) 1) - (set! (-> a1-24 message) 'blend-shape) - (set! (-> a1-24 param 0) (the-as uint #f)) - (send-event-function *target* a1-24) - ) + (send-event *target* 'blend-shape #f) (cond ((!= *kernel-boot-message* 'play) (set-blackout-frames 0) (ja-channel-set! 0) (ja-post) (dummy-48 (-> self collide-info)) - (let ((a1-25 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-25 from) self) - (set! (-> a1-25 num-params) 1) - (set! (-> a1-25 message) 'trans) - (set! (-> a1-25 param 0) (the-as uint 'reset)) - (send-event-function *target* a1-25) - ) + (send-event *target* 'trans 'reset) (let ((gp-4 (ppointer->handle @@ -863,26 +832,14 @@ nav-enemy-default-event-handler ) ) ) - (let ((a1-27 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-27 from) self) - (set! (-> a1-27 num-params) 0) - (set! (-> a1-27 message) 'pickup) - (send-event-function (handle->process (the-as handle gp-4)) a1-27) - ) + (send-event (handle->process (the-as handle gp-4)) 'pickup) (while (handle->process (the-as handle gp-4)) (suspend) ) ) ) (else - (let ((a1-29 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-29 from) self) - (set! (-> a1-29 num-params) 2) - (set! (-> a1-29 message) 'trans) - (set! (-> a1-29 param 0) (the-as uint 'restore)) - (set! (-> a1-29 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-29) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) (set-blackout-frames 0) (set-blackout-frames 30) ) diff --git a/test/decompiler/reference/levels/misty/sidekick-human_REF.gc b/test/decompiler/reference/levels/misty/sidekick-human_REF.gc index a29b2829a3..8c4d5b52f9 100644 --- a/test/decompiler/reference/levels/misty/sidekick-human_REF.gc +++ b/test/decompiler/reference/levels/misty/sidekick-human_REF.gc @@ -1673,13 +1673,7 @@ (-> gp-0 ppointer) ) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'trans-hook) - (set! (-> a1-3 param 0) (the-as uint evilsib-trans-hook-hover)) - (send-event-function self a1-3) - ) + (send-event self 'trans-hook evilsib-trans-hook-hover) ) 0 (none) @@ -1690,13 +1684,7 @@ (with-pp (cond (arg0 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) pp) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'sidekick) - (set! (-> a1-1 param 0) (the-as uint #f)) - (send-event-function *target* a1-1) - ) + (send-event *target* 'sidekick #f) (let ((s5-0 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj bonelurker) (ppointer->handle (when s5-0 (let @@ -1727,20 +1715,8 @@ ) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'anim-mode) - (set! (-> a1-5 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj bonelurker)) a1-5) - ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'center-joint) - (set! (-> a1-6 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj bonelurker)) a1-6) - ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) (set-setting! *setting-control* pp @@ -1861,25 +1837,18 @@ ) ) ) - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) pp) - (set! (-> a1-20 num-params) 2) - (set! (-> a1-20 message) 'art-joint-anim) - (set! (-> a1-20 param 0) (the-as uint "idle")) - (set! (-> a1-20 param 1) (the-as uint 0)) - (send-event-function - (handle->process (-> obj lurker-army s5-1)) - a1-20 - ) + (send-event + (handle->process (-> obj lurker-army s5-1)) + 'art-joint-anim + "idle" + 0 ) ) ) - (let ((a1-21 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-21 from) pp) - (set! (-> a1-21 num-params) 1) - (set! (-> a1-21 message) 'rot) - (set! (-> a1-21 param 0) (the-as uint (-> s4-0 rot))) - (send-event-function (handle->process (-> obj lurker-army s5-1)) a1-21) + (send-event + (handle->process (-> obj lurker-army s5-1)) + 'rot + (-> s4-0 rot) ) ) ) @@ -2304,14 +2273,12 @@ (case arg2 (('offset-army) (dotimes (gp-0 9) - (let ((v1-3 (-> *lurker-army* gp-0)) - (a1-1 (new 'stack-no-clear 'event-message-block)) - ) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'set-frame-num) - (set! (-> a1-1 param 0) (the-as uint (-> v1-3 start-frame))) - (send-event-function (handle->process (-> self lurker-army gp-0)) a1-1) + (let ((v1-3 (-> *lurker-army* gp-0))) + (send-event + (handle->process (-> self lurker-army gp-0)) + 'set-frame-num + (-> v1-3 start-frame) + ) ) ) #f @@ -2366,61 +2333,26 @@ ) ) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'anim-mode) - (set! (-> a1-8 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> self evilbro)) a1-8) + (send-event (handle->process (-> self evilbro)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> self evilbro)) 'blend-shape #t) + (send-event (handle->process (-> self evilbro)) 'center-joint 3) + (send-event + (handle->process (-> self evilbro)) + 'trans-hook + evilsib-trans-hook-wait ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'blend-shape) - (set! (-> a1-9 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self evilbro)) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'center-joint) - (set! (-> a1-10 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> self evilbro)) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'trans-hook) - (set! (-> a1-11 param 0) (the-as uint evilsib-trans-hook-wait)) - (send-event-function (handle->process (-> self evilbro)) a1-11) - ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'draw) - (set! (-> a1-12 param 0) (the-as uint #f)) - (send-event-function (handle->process (-> self evilbro)) a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'eval) - (set! - (-> a1-13 param 0) - (the-as - uint - (lambda :behavior sequenceB - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self)) - ) - (set! (-> self part) v0-0) - v0-0 - ) - ) + (send-event (handle->process (-> self evilbro)) 'draw #f) + (send-event + (handle->process (-> self evilbro)) + 'eval + (lambda :behavior sequenceB + () + (let + ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self))) + (set! (-> self part) v0-0) + v0-0 ) ) - (send-event-function (handle->process (-> self evilbro)) a1-13) ) ) ) @@ -2472,61 +2404,26 @@ ) ) ) - (let ((a1-19 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-19 from) self) - (set! (-> a1-19 num-params) 1) - (set! (-> a1-19 message) 'anim-mode) - (set! (-> a1-19 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> self evilsis)) a1-19) + (send-event (handle->process (-> self evilsis)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> self evilsis)) 'blend-shape #t) + (send-event (handle->process (-> self evilsis)) 'center-joint 3) + (send-event + (handle->process (-> self evilsis)) + 'trans-hook + evilsib-trans-hook-wait ) - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) self) - (set! (-> a1-20 num-params) 1) - (set! (-> a1-20 message) 'blend-shape) - (set! (-> a1-20 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self evilsis)) a1-20) - ) - (let ((a1-21 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-21 from) self) - (set! (-> a1-21 num-params) 1) - (set! (-> a1-21 message) 'center-joint) - (set! (-> a1-21 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> self evilsis)) a1-21) - ) - (let ((a1-22 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-22 from) self) - (set! (-> a1-22 num-params) 1) - (set! (-> a1-22 message) 'trans-hook) - (set! (-> a1-22 param 0) (the-as uint evilsib-trans-hook-wait)) - (send-event-function (handle->process (-> self evilsis)) a1-22) - ) - (let ((a1-23 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-23 from) self) - (set! (-> a1-23 num-params) 1) - (set! (-> a1-23 message) 'draw) - (set! (-> a1-23 param 0) (the-as uint #f)) - (send-event-function (handle->process (-> self evilsis)) a1-23) - ) - (let ((a1-24 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-24 from) self) - (set! (-> a1-24 num-params) 1) - (set! (-> a1-24 message) 'eval) - (set! - (-> a1-24 param 0) - (the-as - uint - (lambda :behavior sequenceB - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self)) - ) - (set! (-> self part) v0-0) - v0-0 - ) - ) + (send-event (handle->process (-> self evilsis)) 'draw #f) + (send-event + (handle->process (-> self evilsis)) + 'eval + (lambda :behavior sequenceB + () + (let + ((v0-0 (create-launch-control (-> *part-group-id-table* 558) self))) + (set! (-> self part) v0-0) + v0-0 ) ) - (send-event-function (handle->process (-> self evilsis)) a1-24) ) ) ) @@ -2536,13 +2433,7 @@ ) :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'sidekick) - (set! (-> a1-0 param 0) (the-as uint #t)) - (send-event-function *target* a1-0) - ) + (send-event *target* 'sidekick #t) (let ((a0-2 (handle->process (-> self bonelurker)))) (if a0-2 (deactivate a0-2) @@ -2568,22 +2459,12 @@ ((-> (method-of-type process-taskable play-anim) exit)) (let ((gp-1 (entity-by-name "sequenceC-1"))) (set-blackout-frames 6000) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'clear-entity) - (send-event-function *camera* a1-5) - ) + (send-event *camera* 'clear-entity) (entity-birth-no-kill gp-1) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 0) - (set! (-> a1-6 message) 'play-anim) - (send-event-function (if gp-1 - (-> gp-1 extra process) - ) - a1-6 - ) + (send-event (if gp-1 + (-> gp-1 extra process) + ) + 'play-anim ) ) (none) @@ -2660,13 +2541,7 @@ (-> gp-1 ppointer) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'trans-hook) - (set! (-> a1-5 param 0) (the-as uint nothing)) - (send-event-function self a1-5) - ) + (send-event self 'trans-hook nothing) ) 0 (none) @@ -2683,13 +2558,7 @@ (&-> (the-as process-taskable (-> self parent 0)) stack 288) ) ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'trans-hook) - (set! (-> a1-1 param 0) (the-as uint sequenceC-can-trans-hook-2)) - (send-event-function self a1-1) - ) + (send-event self 'trans-hook sequenceC-can-trans-hook-2) (set-vector! (-> self draw color-emissive) 0.5 0.0 0.0 0.0) ) 0 @@ -2755,20 +2624,8 @@ ) ) ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) pp) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'anim-mode) - (set! (-> a1-7 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj bonelurker)) a1-7) - ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'center-joint) - (set! (-> a1-8 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj bonelurker)) a1-8) - ) + (send-event (handle->process (-> obj bonelurker)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj bonelurker)) 'center-joint 3) (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj darkecocan) (ppointer->handle (when s5-1 (let @@ -2799,55 +2656,31 @@ ) ) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) pp) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'anim-mode) - (set! (-> a1-12 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj darkecocan)) a1-12) + (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 ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) pp) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'center-joint) - (set! (-> a1-13 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj darkecocan)) a1-13) - ) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) pp) - (set! (-> a1-14 num-params) 1) - (set! (-> a1-14 message) 'trans-hook) - (set! (-> a1-14 param 0) (the-as uint sequenceC-can-trans-hook)) - (send-event-function (handle->process (-> obj darkecocan)) a1-14) - ) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'eval) - (set! - (-> a1-15 param 0) - (the-as - uint - (lambda :behavior sequenceC - () - (let - ((a0-0 (&-> (the-as process-taskable (-> self parent 0)) stack 288)) - (t9-0 (method-of-type lod-set dummy-9)) - ) - *darkecocan-glow-sg* - (-> self draw art-group) - (-> (the-as process-taskable (-> self parent 0)) entity) - (t9-0 (the-as lod-set a0-0)) - ) - (let - ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) - (set! (-> self part) v0-1) - v0-1 - ) - ) + (send-event + (handle->process (-> obj darkecocan)) + 'eval + (lambda :behavior sequenceC + () + (let ((a0-0 (&-> (the-as process-taskable (-> self parent 0)) stack 288)) + (t9-0 (method-of-type lod-set dummy-9)) + ) + *darkecocan-glow-sg* + (-> self draw art-group) + (-> (the-as process-taskable (-> self parent 0)) entity) + (t9-0 (the-as lod-set a0-0)) + ) + (let ((v0-1 (create-launch-control (-> *part-group-id-table* 560) self))) + (set! (-> self part) v0-1) + v0-1 ) ) - (send-event-function (handle->process (-> obj darkecocan)) a1-15) ) ) (the-as diff --git a/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc b/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc index 13e5793ab7..5b5bff45d9 100644 --- a/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc +++ b/test/decompiler/reference/levels/ogre/flying-lurker_REF.gc @@ -124,24 +124,14 @@ ) ) ) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'eval) - (set! - (-> a1-8 param 0) - (the-as - uint - (lambda :behavior manipy - () - (let ((v0-0 (logior (-> self draw status) 32))) - (set! (-> self draw status) v0-0) - v0-0 - ) - ) - ) + (send-event + (handle->process gp-1) + 'eval + (lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) 32))) + (set! (-> self draw status) v0-0) + v0-0 + ) ) - (send-event-function (handle->process gp-1) a1-8) ) (let ((a1-9 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-9 from) self) @@ -158,20 +148,8 @@ ) ) ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'clone-copy-trans) - (set! (-> a1-10 param 0) (the-as uint #f)) - (send-event-function (-> gp-1 process 0) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'clone-anim)) - (send-event-function (-> gp-1 process 0) a1-11) - ) + (send-event (-> gp-1 process 0) 'clone-copy-trans #f) + (send-event (-> gp-1 process 0) 'anim-mode 'clone-anim) (ja-play-spooled-anim (new 'static 'spool-anim :name "plunger-lurker-blowup" @@ -1479,39 +1457,17 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) self) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'eval) - (set! - (-> a1-9 param 0) - (the-as - uint - (lambda :behavior manipy - () - (let ((v0-0 (logior (-> self draw status) 32))) - (set! (-> self draw status) v0-0) - v0-0 - ) - ) - ) + (send-event + (handle->process gp-1) + 'eval + (lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) 32))) + (set! (-> self draw status) v0-0) + v0-0 + ) ) - (send-event-function (handle->process gp-1) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) self) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'clone-copy-trans) - (set! (-> a1-10 param 0) (the-as uint #f)) - (send-event-function (-> gp-1 process 0) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'clone-anim)) - (send-event-function (-> gp-1 process 0) a1-11) ) + (send-event (-> gp-1 process 0) 'clone-copy-trans #f) + (send-event (-> gp-1 process 0) 'anim-mode 'clone-anim) (let ((a1-12 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-12 from) self) (set! (-> a1-12 num-params) 2) @@ -1603,64 +1559,22 @@ ) (cond ((< 0.8333333 f0-2) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 2) - (set! (-> a1-1 message) 'fly-away) - (set! (-> a1-1 param 0) (the-as uint 18)) - (set! (-> a1-1 param 1) (-> self try-count)) - (send-event-function self a1-1) - ) + (send-event self 'fly-away 18 (-> self try-count)) ) ((< 0.6666667 f0-2) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 2) - (set! (-> a1-2 message) 'fly-away) - (set! (-> a1-2 param 0) (the-as uint 33)) - (set! (-> a1-2 param 1) (-> self try-count)) - (send-event-function self a1-2) - ) + (send-event self 'fly-away 33 (-> self try-count)) ) ((< 0.5 f0-2) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 2) - (set! (-> a1-3 message) 'fly-away) - (set! (-> a1-3 param 0) (the-as uint 258)) - (set! (-> a1-3 param 1) (-> self try-count)) - (send-event-function self a1-3) - ) + (send-event self 'fly-away 258 (-> self try-count)) ) ((< 0.33333334 f0-2) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'fly-away) - (set! (-> a1-4 param 0) (the-as uint 288)) - (set! (-> a1-4 param 1) (-> self try-count)) - (send-event-function self a1-4) - ) + (send-event self 'fly-away 288 (-> self try-count)) ) ((< 0.16666667 f0-2) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 2) - (set! (-> a1-5 message) 'fly-away) - (set! (-> a1-5 param 0) (the-as uint 513)) - (set! (-> a1-5 param 1) (-> self try-count)) - (send-event-function self a1-5) - ) + (send-event self 'fly-away 513 (-> self try-count)) ) (else - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 2) - (set! (-> a1-6 message) 'fly-away) - (set! (-> a1-6 param 0) (the-as uint 528)) - (set! (-> a1-6 param 1) (-> self try-count)) - (send-event-function self a1-6) - ) + (send-event self 'fly-away 528 (-> self try-count)) ) ) ) @@ -1906,12 +1820,7 @@ ) ) (process-release? *target*) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'saw-player) - (send-event-function self a1-1) - ) + (send-event self 'saw-player) ) (suspend) 0 @@ -1952,7 +1861,7 @@ ) ) (until (ja-done? 0) - (when + (if (and *target* (>= @@ -1963,12 +1872,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'saw-player) - (send-event-function self a1-4) - ) + (send-event self 'saw-player) ) (suspend) (let ((a0-12 (-> self skel root-channel 0))) diff --git a/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc b/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc index 8ed20efb83..08cd0513a9 100644 --- a/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc +++ b/test/decompiler/reference/levels/sunken/qbert-plat_REF.gc @@ -247,99 +247,84 @@ ;; definition for method 33 of type qbert-plat (defmethod dummy-33 qbert-plat ((obj qbert-plat)) - (with-pp - (let* ((a1-0 (-> obj master)) - (v1-0 (if a1-0 - (-> a1-0 extra process) - ) - ) + (let* ((a1-0 (-> obj master)) + (v1-0 (if a1-0 + (-> a1-0 extra process) + ) ) - (when v1-0 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) pp) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'trigger) - (set! (-> a1-1 param 0) (the-as uint (-> obj plat-id))) - (send-event-function v1-0 a1-1) - ) - ) + ) + (if v1-0 + (send-event v1-0 'trigger (-> obj plat-id)) ) ) ) ;; definition for method 32 of type qbert-plat (defmethod dummy-32 qbert-plat ((obj qbert-plat)) - (with-pp - (let* ((v1-0 (-> obj master)) - (a0-1 (if v1-0 - (-> v1-0 extra process) - ) - ) + (let* ((v1-0 (-> obj master)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) ) - (when (the-as qbert-plat-master a0-1) - (let - ((v1-3 - (plat-state-set? - (the-as qbert-plat-master a0-1) - (the-as uint (-> obj plat-id)) ) + (when (the-as qbert-plat-master a0-1) + (let + ((v1-3 + (plat-state-set? + (the-as qbert-plat-master a0-1) + (the-as uint (-> obj plat-id)) ) ) - (when (!= v1-3 (-> obj on?)) - (set! (-> obj on?) v1-3) - (cond - (v1-3 - (let ((s5-0 (get-process *default-dead-pool* qbert-plat-on #x4000))) - (when s5-0 - (let ((t9-2 (method-of-type qbert-plat-on activate))) - (t9-2 - (the-as qbert-plat-on s5-0) - obj - 'qbert-plat-on - (the-as pointer #x70004000) - ) - ) - (run-now-in-process - s5-0 - qbert-plat-on-init-by-other - (-> obj entity) + ) + (when (!= v1-3 (-> obj on?)) + (set! (-> obj on?) v1-3) + (cond + (v1-3 + (let ((s5-0 (get-process *default-dead-pool* qbert-plat-on #x4000))) + (when s5-0 + (let ((t9-2 (method-of-type qbert-plat-on activate))) + (t9-2 + (the-as qbert-plat-on s5-0) obj + 'qbert-plat-on + (the-as pointer #x70004000) ) - (-> s5-0 ppointer) ) - ) - (sound-play-by-name - (static-sound-name "plat-light-on") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) + (run-now-in-process + s5-0 + qbert-plat-on-init-by-other + (-> obj entity) + obj + ) + (-> s5-0 ppointer) ) ) - (else - (let ((gp-2 (-> obj child))) - (while gp-2 - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 0) - (set! (-> a1-5 message) 'die) - (send-event-function (ppointer->process gp-2) a1-5) - ) - (set! gp-2 (-> gp-2 0 brother)) - ) - ) - (sound-play-by-name - (static-sound-name "plat-light-off") - (new-sound-id) - 1024 - 0 - 0 - (the-as uint 1) - (the-as vector #t) + (sound-play-by-name + (static-sound-name "plat-light-on") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (else + (let ((gp-2 (-> obj child))) + (while gp-2 + (send-event (ppointer->process gp-2) 'die) + (set! gp-2 (-> gp-2 0 brother)) ) ) + (sound-play-by-name + (static-sound-name "plat-light-off") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) ) ) ) @@ -599,12 +584,7 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'notify) - (send-event-function arg0 a1-4) - ) + (send-event arg0 'notify) (let ((a0-13 (= @@ -965,18 +945,8 @@ (logclear! (-> s5-0 mask) (process-mask platform)) (when (-> self puzzle-beaten?) (suspend) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'trigger) - (send-event-function gp-0 a1-0) - ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'trigger) - (send-event-function s5-0 a1-1) - ) + (send-event gp-0 'trigger) + (send-event s5-0 'trigger) ) (go qbert-plat-master-idle) ) diff --git a/test/decompiler/reference/levels/sunken/square-platform_REF.gc b/test/decompiler/reference/levels/sunken/square-platform_REF.gc index 428705ab87..f96516a685 100644 --- a/test/decompiler/reference/levels/sunken/square-platform_REF.gc +++ b/test/decompiler/reference/levels/sunken/square-platform_REF.gc @@ -535,13 +535,7 @@ (go square-platform-rising) ) ((= v1-0 'touch) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'no-look-around) - (set! (-> a1-8 param 0) (the-as uint 450)) - (send-event-function arg0 a1-8) - ) + (send-event arg0 'no-look-around 450) #f ) ) diff --git a/test/decompiler/reference/levels/sunken/wall-plat_REF.gc b/test/decompiler/reference/levels/sunken/wall-plat_REF.gc index 82a72205f9..cc04abf984 100644 --- a/test/decompiler/reference/levels/sunken/wall-plat_REF.gc +++ b/test/decompiler/reference/levels/sunken/wall-plat_REF.gc @@ -78,13 +78,7 @@ (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (when (= v1-0 'touch) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 450)) - (send-event-function arg0 a1-2) - ) + (send-event arg0 'no-look-around 450) #f ) ) @@ -168,13 +162,7 @@ (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (when (= v1-0 'touch) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 450)) - (send-event-function arg0 a1-2) - ) + (send-event arg0 'no-look-around 450) #f ) ) @@ -233,13 +221,7 @@ (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (let ((v1-0 arg2)) (the-as object (when (= v1-0 'touch) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'no-look-around) - (set! (-> a1-2 param 0) (the-as uint 450)) - (send-event-function arg0 a1-2) - ) + (send-event arg0 'no-look-around 450) #f ) ) diff --git a/test/decompiler/reference/levels/sunken/wedge-plats_REF.gc b/test/decompiler/reference/levels/sunken/wedge-plats_REF.gc index 4f8a8c19fb..185287fd40 100644 --- a/test/decompiler/reference/levels/sunken/wedge-plats_REF.gc +++ b/test/decompiler/reference/levels/sunken/wedge-plats_REF.gc @@ -225,13 +225,7 @@ (dummy-22 self) ) ((= v1-0 'touch) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'no-look-around) - (set! (-> a1-4 param 0) (the-as uint 450)) - (send-event-function arg0 a1-4) - ) + (send-event arg0 'no-look-around 450) #f ) ) @@ -514,13 +508,7 @@ (dummy-22 self) ) ((= v1-0 'touch) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'no-look-around) - (set! (-> a1-4 param 0) (the-as uint 450)) - (send-event-function arg0 a1-4) - ) + (send-event arg0 'no-look-around 450) ) ) ) diff --git a/test/decompiler/reference/levels/swamp/swamp-bat_REF.gc b/test/decompiler/reference/levels/swamp/swamp-bat_REF.gc index 05f38abb06..c812773491 100644 --- a/test/decompiler/reference/levels/swamp/swamp-bat_REF.gc +++ b/test/decompiler/reference/levels/swamp/swamp-bat_REF.gc @@ -158,16 +158,11 @@ *entity-pool* (game-task none) ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 2) - (set! (-> a1-2 message) 'attack) - (set! (-> a1-2 param 0) (-> arg3 param 0)) - (set! - (-> a1-2 param 1) - (the-as uint (new 'static 'attack-info)) - ) - (send-event-function arg0 a1-2) + (send-event + arg0 + 'attack + (-> arg3 param 0) + (new 'static 'attack-info) ) ) ((= v1-0 'launch) diff --git a/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc b/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc index 5b4bd5c20e..6a1f59d7fa 100644 --- a/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc +++ b/test/decompiler/reference/levels/swamp/swamp-rat-nest_REF.gc @@ -953,14 +953,9 @@ ) ) ((= v1-0 'attack) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'hit) - (send-event-function - (ppointer->process (-> self parent-process)) - a1-1 - ) + (send-event + (ppointer->process (-> self parent-process)) + 'hit ) (let ((v1-7 (-> arg3 param 2))) (when (!= v1-7 (-> self parent-process 0 player-attack-id)) @@ -971,7 +966,7 @@ (cond ((and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow)) (swamp-rat-nest-dummy-take-damage 3) - (when + (if (< (vector-vector-distance (target-pos 0) @@ -979,14 +974,7 @@ ) (-> self top-sphere w) ) - (let - ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'no-look-around) - (set! (-> a1-3 param 0) (the-as uint 75)) - (send-event-function *target* a1-3) - ) + (send-event *target* 'no-look-around 75) ) (go swamp-rat-nest-dummy-hit) ) @@ -1624,12 +1612,7 @@ swamp-rat-nest-default-event-handler (- (-> *display* base-frame-counter) (-> self state-time)) (the int (* (-> self spawn-period-scale) (-> self spawn-period))) ) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'shake) - (send-event-function (ppointer->process (-> self dummy)) a1-0) - ) + (send-event (ppointer->process (-> self dummy)) 'shake) (swamp-rat-nest-spawn-rat) (go swamp-rat-nest-active) ) @@ -1664,13 +1647,8 @@ swamp-rat-nest-default-event-handler ) ) ) - (when a0-1 - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'victory) - (send-event-function (the-as process a0-1) a1-1) - ) + (if a0-1 + (send-event (the-as process a0-1) 'victory) ) ) (set! gp-0 (-> gp-0 0 brother)) diff --git a/test/decompiler/reference/levels/swamp/swamp-rat_REF.gc b/test/decompiler/reference/levels/swamp/swamp-rat_REF.gc index 56704afb10..ca227eb4dd 100644 --- a/test/decompiler/reference/levels/swamp/swamp-rat_REF.gc +++ b/test/decompiler/reference/levels/swamp/swamp-rat_REF.gc @@ -71,41 +71,30 @@ dummy-44 swamp-rat ((obj swamp-rat) (arg0 process) (arg1 event-message-block)) - (with-pp - (the-as - object + (the-as + object + (when + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg1 param 0)) + (-> obj collide-info) + (the-as uint 1) + ) (when - ((method-of-type touching-shapes-entry prims-touching?) + (nav-enemy-send-attack + arg0 (the-as touching-shapes-entry (-> arg1 param 0)) - (-> obj collide-info) - (the-as uint 1) + 'generic ) - (when - (nav-enemy-send-attack - arg0 - (the-as touching-shapes-entry (-> arg1 param 0)) - 'generic - ) - (let* ((s5-1 (-> obj parent)) - (a0-4 - (if (and (nonzero? s5-1) (type-type? pointer process-drawable)) - s5-1 - ) + (let* ((s5-1 (-> obj parent)) + (a0-4 + (if (and (nonzero? s5-1) (type-type? pointer process-drawable)) + s5-1 ) ) - (cond - (a0-4 - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) 'victory) - (send-event-function (the-as process a0-4) a1-4) - ) - ) - (else - (go (method-of-object obj nav-enemy-victory)) - ) - ) + ) + (if a0-4 + (send-event (the-as process a0-4) 'victory) + (go (method-of-object obj nav-enemy-victory)) ) ) ) diff --git a/test/decompiler/reference/levels/training/training-part_REF.gc b/test/decompiler/reference/levels/training/training-part_REF.gc index a3a029ad75..5797585ad5 100644 --- a/test/decompiler/reference/levels/training/training-part_REF.gc +++ b/test/decompiler/reference/levels/training/training-part_REF.gc @@ -198,8 +198,7 @@ :mask #xc0 :num 0.1 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x726573796567) + :sound-name (static-sound-name "geyser") :volume #x400 :fo-min 50 :fo-max #xc8 diff --git a/test/decompiler/reference/levels/village1/explorer_REF.gc b/test/decompiler/reference/levels/village1/explorer_REF.gc index 6fb8aa0ba6..4ed084d68c 100644 --- a/test/decompiler/reference/levels/village1/explorer_REF.gc +++ b/test/decompiler/reference/levels/village1/explorer_REF.gc @@ -84,140 +84,123 @@ ;; definition for method 32 of type explorer (defmethod play-anim! explorer ((obj explorer) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (if arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + ) + (new 'static 'spool-anim + :name "explorer-introduction" + :index 9 + :parts 11 + :command-list + '( + ((the binteger 418) + joint + "cameraB" + ) + ((the binteger 695) + shadow + self + #f + ) + ((the binteger 695) + joint + "camera" + ) + ((the binteger 838) shadow self #t) ((the binteger 838) joint "cameraB") + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((zero? (get-reminder (-> obj tasks) 0)) (if arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) + (save-reminder (-> obj tasks) 1 0) ) (new 'static 'spool-anim - :name "explorer-introduction" - :index 9 - :parts 11 + :name "explorer-reminder-1" + :index 10 + :parts 5 :command-list '( - ((the binteger 418) - joint - "cameraB" - ) - ((the binteger 695) - shadow - self - #f - ) - ((the binteger 695) - joint - "camera" - ) - ((the binteger 838) - shadow - self - #t - ) - ((the binteger 838) joint "cameraB") - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (cond - ((zero? (get-reminder (-> obj tasks) 0)) - (if arg0 - (save-reminder (-> obj tasks) 1 0) - ) - (new 'static 'spool-anim - :name "explorer-reminder-1" - :index 10 - :parts 5 - :command-list - '( - (0 - send-event - target - draw - #f - ) - ((the binteger 148) - send-event - target - draw - #t - ) - ((the binteger 148) - joint - "cameraB" - ) - ((the binteger 390) + (0 send-event target draw #f ) - ((the binteger 390) - joint - "camera" - ) - ((the binteger 505) send-event target draw #t) + ((the binteger 148) + send-event + target + draw + #t ) - ) - ) - (else - (if arg0 - (save-reminder (-> obj tasks) 0 0) - ) - (new 'static 'spool-anim - :name "explorer-reminder-2" - :index 11 - :parts 3 - :command-list '() - ) - ) - ) - ) - (((task-status need-reward-speech)) - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) pp) - (set! (-> a1-7 num-params) 2) - (set! (-> a1-7 message) 'get-pickup) - (set! (-> a1-7 param 0) (the-as uint 5)) - (set! - (-> a1-7 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) + ((the binteger 148) + joint + "cameraB" + ) + ((the binteger 390) + send-event + target + draw + #f + ) + ((the binteger 390) + joint + "camera" + ) + ((the binteger 505) send-event target draw #t) ) - (send-event-function *target* a1-7) - ) - ) - (else - (set! (-> obj will-talk) #t) - (set! (-> obj talk-message) (the-as uint 282)) ) ) - (new 'static 'spool-anim - :name "explorer-resolution" - :index 12 - :parts 5 - :command-list - '( - ((the binteger 167) joint "cameraB") ((the binteger 310) joint "camera") - ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 0) + ) + (new 'static 'spool-anim + :name "explorer-reminder-2" + :index 11 + :parts 3 + :command-list '() + ) ) ) - (else - (if arg0 - (format - 0 - "ERROR: : ~S playing anim for task status ~S~%" - (-> obj name) - (task-status->string (current-status (-> obj tasks))) - ) + ) + (((task-status need-reward-speech)) + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj will-talk) #t) + (set! (-> obj talk-message) (the-as uint 282)) ) - (-> obj draw art-group data 3) ) + (new 'static 'spool-anim + :name "explorer-resolution" + :index 12 + :parts 5 + :command-list + '( + ((the binteger 167) joint "cameraB") ((the binteger 310) joint "camera") + ) + ) + ) + (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 3) ) ) ) diff --git a/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc b/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc index 95d2dca3e2..3ae0c86e87 100644 --- a/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc +++ b/test/decompiler/reference/levels/village1/fishermans-boat_REF.gc @@ -1488,20 +1488,8 @@ ) ) ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'border) - (set! (-> a1-4 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self cam-tracker)) a1-4) - ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'mask) - (set! (-> a1-5 param 0) (the-as uint #x20800)) - (send-event-function (handle->process (-> self cam-tracker)) a1-5) - ) + (send-event (handle->process (-> self cam-tracker)) 'border #t) + (send-event (handle->process (-> self cam-tracker)) 'mask #x20800) (fishermans-boat-set-path-point (the-as vector 0)) (fishermans-boat-next-path-point) (while #t @@ -1521,12 +1509,7 @@ (set! (-> self waiting-for-player) #f) (when #t (set! (-> *camera* cam-entity) (the-as entity #t)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'clear-entity) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'clear-entity) (load-commands-set! *level* '()) (load-state-want-display-level 'village1 'display) (load-state-want-force-vis 'village1 #f) @@ -1811,20 +1794,8 @@ ) ) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 1) - (set! (-> a1-3 message) 'border) - (set! (-> a1-3 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> self cam-tracker)) a1-3) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) self) - (set! (-> a1-4 num-params) 1) - (set! (-> a1-4 message) 'mask) - (set! (-> a1-4 param 0) (the-as uint #x20800)) - (send-event-function (handle->process (-> self cam-tracker)) a1-4) - ) + (send-event (handle->process (-> self cam-tracker)) 'border #t) + (send-event (handle->process (-> self cam-tracker)) 'mask #x20800) (fishermans-boat-set-path-point (the-as vector 4)) (fishermans-boat-next-path-point) (while #t @@ -1851,12 +1822,7 @@ ) (when #t (set! (-> *camera* cam-entity) (the-as entity #t)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'clear-entity) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'clear-entity) (go fishermans-boat-docked-misty) ) ) @@ -1881,14 +1847,7 @@ (defstate fishermans-boat-player-control (fishermans-boat) :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 2) - (set! (-> a1-0 message) 'change-state) - (set! (-> a1-0 param 0) (the-as uint *camera-base-mode*)) - (set! (-> a1-0 param 1) (the-as uint 0)) - (send-event-function *camera* a1-0) - ) + (send-event *camera* 'change-state *camera-base-mode* 0) (set! (-> self auto-pilot) #t) (none) ) @@ -1911,22 +1870,9 @@ ) :code (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 1) - (set! (-> a1-0 message) 'message) - (set! (-> a1-0 param 0) (the-as uint 'release)) - (send-event-function (handle->process (-> self cam-tracker)) a1-0) - ) + (send-event (handle->process (-> self cam-tracker)) 'message 'release) (suspend) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 2) - (set! (-> a1-1 message) 'change-state) - (set! (-> a1-1 param 0) (the-as uint cam-stick)) - (set! (-> a1-1 param 1) (the-as uint 0)) - (send-event-function *camera* a1-1) - ) + (send-event *camera* 'change-state cam-stick 0) (while #t (if (and @@ -2287,20 +2233,8 @@ (set! (-> a1-0 message) 'clone-anim) (set! (-> a1-0 param 0) (the-as uint self)) (when (send-event-function *target* a1-0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'matrix) - (set! (-> a1-1 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-1) - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'blend-shape) - (set! (-> a1-2 param 0) (the-as uint #t)) - (send-event-function *target* a1-2) - ) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) (let* ((gp-0 (get-process *default-dead-pool* othercam #x4000)) (v1-20 (when gp-0 (let ((t9-5 (method-of-type othercam activate))) @@ -2322,13 +2256,8 @@ (-> gp-0 ppointer) ) ) - (a1-6 (new 'stack-no-clear 'event-message-block)) ) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'mask) - (set! (-> a1-6 param 0) (the-as uint 2048)) - (send-event-function (ppointer->process v1-20) a1-6) + (send-event (ppointer->process v1-20) 'mask 2048) ) (set! (-> self draw force-lod) 0) (ja-play-spooled-anim @@ -2338,13 +2267,7 @@ (the-as (function process-drawable symbol) false-func) ) (set! (-> self draw force-lod) -1) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'blend-shape) - (set! (-> a1-8 param 0) (the-as uint #f)) - (send-event-function *target* a1-8) - ) + (send-event *target* 'blend-shape #f) (ja-channel-set! 1) (let ((v1-33 (-> self skel root-channel 0))) (set! @@ -2364,20 +2287,8 @@ (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 2) - (set! (-> a1-12 message) 'trans) - (set! (-> a1-12 param 0) (the-as uint 'restore)) - (set! (-> a1-12 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'end-mode) - (send-event-function *target* a1-13) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) + (send-event *target* 'end-mode) (dummy-47 (-> self root-overlay)) (dummy-60 (-> *target* control) @@ -2388,12 +2299,7 @@ ) (logior! (-> *target* control status) 7) (suspend) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) self) - (set! (-> a1-15 num-params) 0) - (set! (-> a1-15 message) 'teleport-to-other-start-string) - (send-event-function *camera* a1-15) - ) + (send-event *camera* 'teleport-to-other-start-string) ) (set-continue! *game-info* "misty-start") ) @@ -2507,35 +2413,20 @@ ) ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) self) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'anim-mode) - (set! (-> a1-5 param 0) (the-as uint 'clone-anim)) - (send-event-function - (handle->process (-> self evilbro)) - a1-5 - ) + (send-event + (handle->process (-> self evilbro)) + 'anim-mode + 'clone-anim ) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'blend-shape) - (set! (-> a1-6 param 0) (the-as uint #t)) - (send-event-function - (handle->process (-> self evilbro)) - a1-6 - ) + (send-event + (handle->process (-> self evilbro)) + 'blend-shape + #t ) - (let ((a1-7 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-7 from) self) - (set! (-> a1-7 num-params) 1) - (set! (-> a1-7 message) 'center-joint) - (set! (-> a1-7 param 0) (the-as uint 3)) - (send-event-function - (handle->process (-> self evilbro)) - a1-7 - ) + (send-event + (handle->process (-> self evilbro)) + 'center-joint + 3 ) ) ) @@ -2586,38 +2477,20 @@ ) ) ) - (let - ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) self) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'anim-mode) - (set! (-> a1-11 param 0) (the-as uint 'clone-anim)) - (send-event-function - (handle->process (-> self evilsis)) - a1-11 - ) + (send-event + (handle->process (-> self evilsis)) + 'anim-mode + 'clone-anim ) - (let - ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'blend-shape) - (set! (-> a1-12 param 0) (the-as uint #t)) - (send-event-function - (handle->process (-> self evilsis)) - a1-12 - ) + (send-event + (handle->process (-> self evilsis)) + 'blend-shape + #t ) - (let - ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 1) - (set! (-> a1-13 message) 'center-joint) - (set! (-> a1-13 param 0) (the-as uint 3)) - (send-event-function - (handle->process (-> self evilsis)) - a1-13 - ) + (send-event + (handle->process (-> self evilsis)) + 'center-joint + 3 ) ) ) @@ -2654,20 +2527,8 @@ (set! (-> a1-0 message) 'clone-anim) (set! (-> a1-0 param 0) (the-as uint self)) (when (send-event-function *target* a1-0) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 1) - (set! (-> a1-1 message) 'matrix) - (set! (-> a1-1 param 0) (the-as uint 'play-anim)) - (send-event-function (ppointer->process (-> *target* sidekick)) a1-1) - ) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 1) - (set! (-> a1-2 message) 'blend-shape) - (set! (-> a1-2 param 0) (the-as uint #t)) - (send-event-function *target* a1-2) - ) + (send-event (ppointer->process (-> *target* sidekick)) 'matrix 'play-anim) + (send-event *target* 'blend-shape #t) (let* ((gp-0 (get-process *default-dead-pool* othercam #x4000)) (v1-20 (when gp-0 (let ((t9-5 (method-of-type othercam activate))) @@ -2689,13 +2550,8 @@ (-> gp-0 ppointer) ) ) - (a1-6 (new 'stack-no-clear 'event-message-block)) ) - (set! (-> a1-6 from) self) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'mask) - (set! (-> a1-6 param 0) (the-as uint 2048)) - (send-event-function (ppointer->process v1-20) a1-6) + (send-event (ppointer->process v1-20) 'mask 2048) ) (set! (-> self draw force-lod) 0) (ja-play-spooled-anim @@ -2705,13 +2561,7 @@ (the-as (function process-drawable symbol) false-func) ) (set! (-> self draw force-lod) -1) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) self) - (set! (-> a1-8 num-params) 1) - (set! (-> a1-8 message) 'blend-shape) - (set! (-> a1-8 param 0) (the-as uint #f)) - (send-event-function *target* a1-8) - ) + (send-event *target* 'blend-shape #f) (ja-channel-set! 1) (let ((v1-33 (-> self skel root-channel 0))) (set! @@ -2731,20 +2581,8 @@ (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) self) - (set! (-> a1-12 num-params) 2) - (set! (-> a1-12 message) 'trans) - (set! (-> a1-12 param 0) (the-as uint 'restore)) - (set! (-> a1-12 param 1) (the-as uint (-> self old-target-pos))) - (send-event-function *target* a1-12) - ) - (let ((a1-13 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-13 from) self) - (set! (-> a1-13 num-params) 0) - (set! (-> a1-13 message) 'end-mode) - (send-event-function *target* a1-13) - ) + (send-event *target* 'trans 'restore (-> self old-target-pos)) + (send-event *target* 'end-mode) (dummy-47 (-> self root-overlay)) (dummy-60 (-> *target* control) @@ -2755,12 +2593,7 @@ ) (logior! (-> *target* control status) 7) (suspend) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) self) - (set! (-> a1-15 num-params) 0) - (set! (-> a1-15 message) 'teleport-to-other-start-string) - (send-event-function *camera* a1-15) - ) + (send-event *camera* 'teleport-to-other-start-string) ) (set-continue! *game-info* "village1-hut") ) diff --git a/test/decompiler/reference/levels/village1/sage_REF.gc b/test/decompiler/reference/levels/village1/sage_REF.gc index 94b9132868..df54dde83f 100644 --- a/test/decompiler/reference/levels/village1/sage_REF.gc +++ b/test/decompiler/reference/levels/village1/sage_REF.gc @@ -660,27 +660,9 @@ ) ) ) - (let ((a1-16 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-16 from) pp) - (set! (-> a1-16 num-params) 1) - (set! (-> a1-16 message) 'anim-mode) - (set! (-> a1-16 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj assistant)) a1-16) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'blend-shape) - (set! (-> a1-17 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj assistant)) a1-17) - ) - (let ((a1-18 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-18 from) pp) - (set! (-> a1-18 num-params) 1) - (set! (-> a1-18 message) 'center-joint) - (set! (-> a1-18 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj assistant)) a1-18) - ) + (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)) @@ -1190,13 +1172,8 @@ (behavior () (case (get-task-status (game-task intro)) (((task-status need-reward-speech)) - (when (process-grab? *target*) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'play-anim) - (send-event-function self a1-0) - ) + (if (process-grab? *target*) + (send-event self 'play-anim) ) ) ) diff --git a/test/decompiler/reference/levels/village1/village1-part2_REF.gc b/test/decompiler/reference/levels/village1/village1-part2_REF.gc index b820fd436c..66b59b42b7 100644 --- a/test/decompiler/reference/levels/village1/village1-part2_REF.gc +++ b/test/decompiler/reference/levels/village1/village1-part2_REF.gc @@ -1702,8 +1702,7 @@ :mask #x1 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x2d6e6f2d70697264) + :sound-name (static-sound-name "drip-on-wood") :volume #x200 ) ) diff --git a/test/decompiler/reference/levels/village1/village1-part_REF.gc b/test/decompiler/reference/levels/village1/village1-part_REF.gc index 7ff6f1c5ee..31c683c017 100644 --- a/test/decompiler/reference/levels/village1/village1-part_REF.gc +++ b/test/decompiler/reference/levels/village1/village1-part_REF.gc @@ -871,8 +871,7 @@ :mask #x1 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x706f702d65726966) + :sound-name (static-sound-name "fire-pop") :volume #x400 ) ) diff --git a/test/decompiler/reference/levels/village1/yakow_REF.gc b/test/decompiler/reference/levels/village1/yakow_REF.gc index 2b42803849..44cdd9e940 100644 --- a/test/decompiler/reference/levels/village1/yakow_REF.gc +++ b/test/decompiler/reference/levels/village1/yakow_REF.gc @@ -1014,16 +1014,11 @@ yakow-default-event-handler (set! (-> self state-time) (-> *display* base-frame-counter)) (set! (-> self travel-speed) 0.0) (set! (-> self grazing) #t) - (let ((v1-3 (entity-actor-lookup (-> self entity) 'alt-actor 0)) - (a1-1 (new 'stack-no-clear 'event-message-block)) - ) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'update) - (send-event-function (if v1-3 - (-> v1-3 extra process) - ) - a1-1 + (let ((v1-3 (entity-actor-lookup (-> self entity) 'alt-actor 0))) + (send-event (if v1-3 + (-> v1-3 extra process) + ) + 'update ) ) (none) diff --git a/test/decompiler/reference/levels/village2/assistant-village2_REF.gc b/test/decompiler/reference/levels/village2/assistant-village2_REF.gc index 778647bdd8..cffb9c7912 100644 --- a/test/decompiler/reference/levels/village2/assistant-village2_REF.gc +++ b/test/decompiler/reference/levels/village2/assistant-village2_REF.gc @@ -151,22 +151,11 @@ (((game-task village2-levitator)) (when arg0 (close-status! (-> obj tasks) (task-status need-introduction)) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'clone) - (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj sage extra process) a1-5) - ) - (let ((s5-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-1 from) pp) - (set! (-> s5-1 num-params) 1) - (set! (-> s5-1 message) 'clone) - (set! (-> s5-1 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - s5-1 - ) + (send-event (-> obj sage extra process) 'clone (process->handle obj)) + (send-event + (-> (entity-by-type flutflut-bluehut) extra process) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -849,29 +838,12 @@ (set! (-> (the-as manipy v1-42) draw light-index) (the-as uint 1)) ) ) - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) pp) - (set! (-> a1-14 num-params) 1) - (set! (-> a1-14 message) 'anim-mode) - (set! (-> a1-14 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj jaws)) a1-14) - ) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'center-joint) - (set! (-> a1-15 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj jaws)) a1-15) - ) - (let ((s5-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-4 from) pp) - (set! (-> s5-4 num-params) 1) - (set! (-> s5-4 message) 'clone) - (set! (-> s5-4 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - s5-4 - ) + (send-event (handle->process (-> obj jaws)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj jaws)) 'center-joint 3) + (send-event + (-> (entity-by-type flutflut-bluehut) extra process) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -957,15 +929,10 @@ (else (when arg0 (close-status! (-> obj tasks) (task-status need-introduction)) - (let ((s5-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-6 from) pp) - (set! (-> s5-6 num-params) 1) - (set! (-> s5-6 message) 'clone) - (set! (-> s5-6 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - s5-6 - ) + (send-event + (-> (entity-by-type flutflut-bluehut) extra process) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -1208,12 +1175,7 @@ (behavior () (case (get-task-status (game-task village2-levitator)) (((task-status need-hint) (task-status need-introduction)) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'play-anim) - (send-event-function self a1-1) - ) + (send-event self 'play-anim) ) ) ((-> (method-of-type process-taskable idle) trans)) @@ -1664,21 +1626,8 @@ (deactivate a0-1) ) ) - (let ((a1-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-1 from) self) - (set! (-> a1-1 num-params) 0) - (set! (-> a1-1 message) 'end-mode) - (send-event-function (-> self sage extra process) a1-1) - ) - (let ((gp-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> gp-0 from) self) - (set! (-> gp-0 num-params) 0) - (set! (-> gp-0 message) 'end-mode) - (send-event-function - (-> (entity-by-type flutflut-bluehut) extra process) - gp-0 - ) - ) + (send-event (-> self sage extra process) 'end-mode) + (send-event (-> (entity-by-type flutflut-bluehut) extra process) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (close-specific-task! (game-task village2-levitator) @@ -3152,8 +3101,7 @@ :mask #x80 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6863616d2d76656c) + :sound-name (static-sound-name "lev-mach-idle") :volume #x400 :fo-max 30 ) diff --git a/test/decompiler/reference/levels/village2/gambler_REF.gc b/test/decompiler/reference/levels/village2/gambler_REF.gc index b0e80c8a3e..47c150a3c0 100644 --- a/test/decompiler/reference/levels/village2/gambler_REF.gc +++ b/test/decompiler/reference/levels/village2/gambler_REF.gc @@ -43,205 +43,193 @@ ;; definition for method 32 of type gambler (defmethod play-anim! gambler ((obj gambler) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - (close-specific-task! - (game-task village2-gambler-money) - (task-status need-introduction) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + (close-specific-task! + (game-task village2-gambler-money) + (task-status need-introduction) + ) + ) + (new 'static 'spool-anim + :name "gambler-introduction-1" + :index 11 + :parts 9 + :command-list + '( + (0 + want-levels + village2 + rolling + ) + (0 + display-level + rolling + #f + ) + ((the binteger 29) + joint + "cameraB" + ) + ((the binteger 103) + joint + "camera" + ) + ((the binteger 231) + joint + "cameraB" + ) + ((the binteger 730) + display-level + rolling + display + ) + ((the binteger 730) + want-force-vis + rolling + #t + ) + ((the binteger 732) + alive + "gorge-pusher-5" + ) + ((the binteger 732) + alive + "gorge-pusher-6" + ) + ((the binteger 732) + alive + "gorge-start-1" + ) + ((the binteger 732) + joint + "camera" + ) + ((the binteger 945) + joint + "cameraB" + ) + ((the binteger 950) + dead + "gorge-pusher-5" + ) + ((the binteger 950) + dead + "gorge-pusher-6" + ) + ((the binteger 950) + dead + "gorge-start-1" + ) + ((the binteger 950) + display-level + rolling + #f + ) + ((the binteger 950) want-force-vis rolling #f) + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((closed? + (-> obj tasks) + (game-task rolling-race) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "gambler-reminder-money" + :index 13 + :parts 2 + :command-list '() + ) + ) + ((closed? + (-> obj tasks) + (game-task village2-gambler-money) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "gambler-reminder-race" + :index 12 + :parts 2 + :command-list '() + ) + ) + ((zero? (get-reminder (-> obj tasks) 5)) + (if arg0 + (save-reminder (-> obj tasks) 1 5) + ) + (new 'static 'spool-anim + :name "gambler-reminder-race" + :index 12 + :parts 2 + :command-list '() + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 5) + ) + (new 'static 'spool-anim + :name "gambler-reminder-money" + :index 13 + :parts 2 + :command-list '() + ) + ) + ) + ) + (((task-status need-reward-speech)) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + (((game-task rolling-race)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + ) + (new 'static 'spool-anim + :name "gambler-resolution-race" + :index 14 + :parts 3 + :command-list '() + ) + ) + (else + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj talk-message) (the-as uint 282)) ) ) (new 'static 'spool-anim - :name "gambler-introduction-1" - :index 11 - :parts 9 - :command-list - '( - (0 - want-levels - village2 - rolling - ) - (0 - display-level - rolling - #f - ) - ((the binteger 29) - joint - "cameraB" - ) - ((the binteger 103) - joint - "camera" - ) - ((the binteger 231) - joint - "cameraB" - ) - ((the binteger 730) - display-level - rolling - display - ) - ((the binteger 730) - want-force-vis - rolling - #t - ) - ((the binteger 732) - alive - "gorge-pusher-5" - ) - ((the binteger 732) - alive - "gorge-pusher-6" - ) - ((the binteger 732) - alive - "gorge-start-1" - ) - ((the binteger 732) - joint - "camera" - ) - ((the binteger 945) - joint - "cameraB" - ) - ((the binteger 950) - dead - "gorge-pusher-5" - ) - ((the binteger 950) - dead - "gorge-pusher-6" - ) - ((the binteger 950) - dead - "gorge-start-1" - ) - ((the binteger 950) - display-level - rolling - #f - ) - ((the binteger 950) want-force-vis rolling #f) - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (cond - ((closed? - (-> obj tasks) - (game-task rolling-race) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "gambler-reminder-money" - :index 13 - :parts 2 - :command-list '() - ) - ) - ((closed? - (-> obj tasks) - (game-task village2-gambler-money) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "gambler-reminder-race" - :index 12 - :parts 2 - :command-list '() - ) - ) - ((zero? (get-reminder (-> obj tasks) 5)) - (if arg0 - (save-reminder (-> obj tasks) 1 5) - ) - (new 'static 'spool-anim - :name "gambler-reminder-race" - :index 12 - :parts 2 - :command-list '() - ) - ) - (else - (if arg0 - (save-reminder (-> obj tasks) 0 5) - ) - (new 'static 'spool-anim - :name "gambler-reminder-money" - :index 13 - :parts 2 - :command-list '() - ) + :name "gambler-resolution-money" + :index 15 + :parts 2 + :command-list '() ) ) ) - (((task-status need-reward-speech)) - (if (not arg0) - (set! (-> obj will-talk) #t) - ) - (case (current-task (-> obj tasks)) - (((game-task rolling-race)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - ) - (new 'static 'spool-anim - :name "gambler-resolution-race" - :index 14 - :parts 3 - :command-list '() - ) - ) - (else - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 2) - (set! (-> a1-10 message) 'get-pickup) - (set! (-> a1-10 param 0) (the-as uint 5)) - (set! - (-> a1-10 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-10) - ) - ) - (else - (set! (-> obj talk-message) (the-as uint 282)) - ) - ) - (new 'static 'spool-anim - :name "gambler-resolution-money" - :index 15 - :parts 2 - :command-list '() - ) - ) + ) + (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 7) - ) + (-> obj draw art-group data 7) ) ) ) diff --git a/test/decompiler/reference/levels/village2/geologist_REF.gc b/test/decompiler/reference/levels/village2/geologist_REF.gc index 43ff9abb88..e01994ee2a 100644 --- a/test/decompiler/reference/levels/village2/geologist_REF.gc +++ b/test/decompiler/reference/levels/village2/geologist_REF.gc @@ -43,169 +43,157 @@ ;; definition for method 32 of type geologist (defmethod play-anim! geologist ((obj geologist) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-status! (-> obj tasks) (task-status need-introduction)) - (close-specific-task! - (game-task village2-geologist-money) - (task-status need-introduction) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-status! (-> obj tasks) (task-status need-introduction)) + (close-specific-task! + (game-task village2-geologist-money) + (task-status need-introduction) + ) + ) + (new 'static 'spool-anim + :name "geologist-introduction" + :index 6 + :parts 13 + :command-list + '( + (0 + want-levels + village2 + rolling + ) + ((the binteger 199) + joint + "cameraB" + ) + ((the binteger 325) + joint + "camera" + ) + ((the binteger 520) + alive + "racer-2" + ) + ((the binteger 544) + joint + "cameraB" + ) + ((the binteger 546) + dead + "racer-2" + ) + ((the binteger 809) + joint + "camera" + ) + ((the binteger 1031) + joint + "cameraB" + ) + ((the binteger 1229) joint "camera") + ) + ) + ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (cond + ((closed? + (-> obj tasks) + (game-task rolling-moles) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "geologist-reminder-money" + :index 8 + :parts 2 + :command-list '() + ) + ) + ((closed? + (-> obj tasks) + (game-task village2-geologist-money) + (task-status need-reward-speech) + ) + (new 'static 'spool-anim + :name "geologist-reminder-moles" + :index 7 + :parts 3 + :command-list '() + ) + ) + ((zero? (get-reminder (-> obj tasks) 0)) + (if arg0 + (save-reminder (-> obj tasks) 1 0) + ) + (new 'static 'spool-anim + :name "geologist-reminder-moles" + :index 7 + :parts 3 + :command-list '() + ) + ) + (else + (if arg0 + (save-reminder (-> obj tasks) 0 0) + ) + (new 'static 'spool-anim + :name "geologist-reminder-money" + :index 8 + :parts 2 + :command-list '() + ) + ) + ) + ) + (((task-status need-reward-speech)) + (if (not arg0) + (set! (-> obj will-talk) #t) + ) + (case (current-task (-> obj tasks)) + (((game-task rolling-moles)) + (when arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + ) + (new 'static 'spool-anim + :name "geologist-resolution-moles" + :index 9 + :parts 3 + :command-list '() + ) + ) + (else + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + ) + (else + (set! (-> obj talk-message) (the-as uint 282)) ) ) (new 'static 'spool-anim - :name "geologist-introduction" - :index 6 - :parts 13 - :command-list - '( - (0 - want-levels - village2 - rolling - ) - ((the binteger 199) - joint - "cameraB" - ) - ((the binteger 325) - joint - "camera" - ) - ((the binteger 520) - alive - "racer-2" - ) - ((the binteger 544) - joint - "cameraB" - ) - ((the binteger 546) - dead - "racer-2" - ) - ((the binteger 809) - joint - "camera" - ) - ((the binteger 1031) - joint - "cameraB" - ) - ((the binteger 1229) joint "camera") - ) - ) - ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) - (cond - ((closed? - (-> obj tasks) - (game-task rolling-moles) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "geologist-reminder-money" - :index 8 - :parts 2 - :command-list '() - ) - ) - ((closed? - (-> obj tasks) - (game-task village2-geologist-money) - (task-status need-reward-speech) - ) - (new 'static 'spool-anim - :name "geologist-reminder-moles" - :index 7 - :parts 3 - :command-list '() - ) - ) - ((zero? (get-reminder (-> obj tasks) 0)) - (if arg0 - (save-reminder (-> obj tasks) 1 0) - ) - (new 'static 'spool-anim - :name "geologist-reminder-moles" - :index 7 - :parts 3 - :command-list '() - ) - ) - (else - (if arg0 - (save-reminder (-> obj tasks) 0 0) - ) - (new 'static 'spool-anim - :name "geologist-reminder-money" - :index 8 - :parts 2 - :command-list '() - ) + :name "geologist-resolution-money" + :index 10 + :parts 2 + :command-list '() ) ) ) - (((task-status need-reward-speech)) - (if (not arg0) - (set! (-> obj will-talk) #t) - ) - (case (current-task (-> obj tasks)) - (((game-task rolling-moles)) - (when arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - ) - (new 'static 'spool-anim - :name "geologist-resolution-moles" - :index 9 - :parts 3 - :command-list '() - ) - ) - (else - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 2) - (set! (-> a1-10 message) 'get-pickup) - (set! (-> a1-10 param 0) (the-as uint 5)) - (set! - (-> a1-10 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-10) - ) - ) - (else - (set! (-> obj talk-message) (the-as uint 282)) - ) - ) - (new 'static 'spool-anim - :name "geologist-resolution-money" - :index 10 - :parts 2 - :command-list '() - ) - ) + ) + (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 5) - ) + (-> obj draw art-group data 5) ) ) ) diff --git a/test/decompiler/reference/levels/village2/sage-bluehut_REF.gc b/test/decompiler/reference/levels/village2/sage-bluehut_REF.gc index a0bae74e61..213665549b 100644 --- a/test/decompiler/reference/levels/village2/sage-bluehut_REF.gc +++ b/test/decompiler/reference/levels/village2/sage-bluehut_REF.gc @@ -94,14 +94,8 @@ ) (close-status! (-> obj tasks) (task-status need-introduction)) (let ((s5-2 (-> obj assistant extra process))) - (when (and s5-2 (should-display? (the-as assistant-bluehut s5-2))) - (let ((a1-6 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-6 from) pp) - (set! (-> a1-6 num-params) 1) - (set! (-> a1-6 message) 'clone) - (set! (-> a1-6 param 0) (the-as uint (process->handle obj))) - (send-event-function s5-2 a1-6) - ) + (if (and s5-2 (should-display? (the-as assistant-bluehut s5-2))) + (send-event s5-2 'clone (process->handle obj)) ) ) (set! (-> obj draw bounds w) 40960.0) @@ -336,12 +330,7 @@ :virtual #t :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self assistant extra process) a1-0) - ) + (send-event (-> self assistant extra process) 'end-mode) (set! (-> self draw bounds w) 10240.0) ((-> (method-of-type process-taskable play-anim) exit)) (none) diff --git a/test/decompiler/reference/levels/village2/sunken-elevator_REF.gc b/test/decompiler/reference/levels/village2/sunken-elevator_REF.gc index ee7747b9bf..4c237b4dd0 100644 --- a/test/decompiler/reference/levels/village2/sunken-elevator_REF.gc +++ b/test/decompiler/reference/levels/village2/sunken-elevator_REF.gc @@ -232,12 +232,7 @@ ) (when (< (-> self path-pos) 0.9) (TODO-RENAME-28 (-> *target* control)) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) self) - (set! (-> a1-2 num-params) 0) - (set! (-> a1-2 message) 'reset-height) - (send-event-function *target* a1-2) - ) + (send-event *target* 'reset-height) ) (none) ) diff --git a/test/decompiler/reference/levels/village2/village2-part_REF.gc b/test/decompiler/reference/levels/village2/village2-part_REF.gc index 67ccb9e1c2..e3f35ec427 100644 --- a/test/decompiler/reference/levels/village2/village2-part_REF.gc +++ b/test/decompiler/reference/levels/village2/village2-part_REF.gc @@ -2185,8 +2185,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6b72617073) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2232,8 +2231,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6b72617073) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2523,8 +2521,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6b72617073) + :sound-name (static-sound-name "spark") :volume #x400 ) ) @@ -2567,8 +2564,7 @@ :mask #x1 :num 0.1 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x6b72617073) + :sound-name (static-sound-name "spark") :volume #x400 ) ) diff --git a/test/decompiler/reference/levels/village2/warrior_REF.gc b/test/decompiler/reference/levels/village2/warrior_REF.gc index 22f5adc865..23d520abc8 100644 --- a/test/decompiler/reference/levels/village2/warrior_REF.gc +++ b/test/decompiler/reference/levels/village2/warrior_REF.gc @@ -159,26 +159,11 @@ (arg0 (set! (-> obj cell-for-task) (current-task (-> obj tasks))) (close-current! (-> obj tasks)) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'get-pickup) - (set! (-> a1-4 param 0) (the-as uint 5)) - (set! - (-> a1-4 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-4) - ) - (let ((s5-1 (new 'stack-no-clear 'event-message-block))) - (set! (-> s5-1 from) pp) - (set! (-> s5-1 num-params) 1) - (set! (-> s5-1 message) 'clone) - (set! (-> s5-1 param 0) (the-as uint (process->handle obj))) - (send-event-function - (-> (entity-by-type allpontoons) extra process) - s5-1 - ) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) + (send-event + (-> (entity-by-type allpontoons) extra process) + 'clone + (process->handle obj) ) (dotimes (s5-2 (entity-actor-count (-> obj entity) 'alt-actor)) (entity-birth-no-kill @@ -244,12 +229,7 @@ :virtual #t :exit (behavior () - (let ((gp-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> gp-0 from) self) - (set! (-> gp-0 num-params) 0) - (set! (-> gp-0 message) 'end-mode) - (send-event-function (-> (entity-by-type allpontoons) extra process) gp-0) - ) + (send-event (-> (entity-by-type allpontoons) extra process) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (none) ) diff --git a/test/decompiler/reference/levels/village3/miners_REF.gc b/test/decompiler/reference/levels/village3/miners_REF.gc index 30cb6c783f..6b495fcb80 100644 --- a/test/decompiler/reference/levels/village3/miners_REF.gc +++ b/test/decompiler/reference/levels/village3/miners_REF.gc @@ -386,12 +386,10 @@ 1 ) ) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'clone) - (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-5) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (close-specific-task! (game-task village3-miner-money1) @@ -474,12 +472,10 @@ 1 ) ) - (let ((a1-12 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-12 from) pp) - (set! (-> a1-12 num-params) 1) - (set! (-> a1-12 message) 'clone) - (set! (-> a1-12 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-12) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (close-status! (-> obj tasks) (task-status need-introduction)) ) @@ -527,12 +523,10 @@ ) (else (when arg0 - (let ((a1-14 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-14 from) pp) - (set! (-> a1-14 num-params) 1) - (set! (-> a1-14 message) 'clone) - (set! (-> a1-14 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-14) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (close-status! (-> obj tasks) (task-status need-introduction)) ) @@ -646,13 +640,11 @@ ) ) ((= s4-2 1) - (when arg0 - (let ((a1-18 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-18 from) pp) - (set! (-> a1-18 num-params) 1) - (set! (-> a1-18 message) 'clone) - (set! (-> a1-18 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-18) + (if arg0 + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -663,13 +655,11 @@ ) ) ((= s4-2 2) - (when arg0 - (let ((a1-19 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-19 from) pp) - (set! (-> a1-19 num-params) 1) - (set! (-> a1-19 message) 'clone) - (set! (-> a1-19 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-19) + (if arg0 + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -680,13 +670,11 @@ ) ) (else - (when arg0 - (let ((a1-20 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-20 from) pp) - (set! (-> a1-20 num-params) 1) - (set! (-> a1-20 message) 'clone) - (set! (-> a1-20 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-20) + (if arg0 + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) ) (new 'static 'spool-anim @@ -711,26 +699,14 @@ (let ((s4-3 (get-reminder (-> obj tasks) 2))) (cond (arg0 - (let ((a1-22 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-22 from) pp) - (set! (-> a1-22 num-params) 1) - (set! (-> a1-22 message) 'clone) - (set! (-> a1-22 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj other-miner ppointer 3) a1-22) + (send-event + (-> obj other-miner ppointer 3) + 'clone + (process->handle obj) ) (set! (-> obj cell-for-task) (current-task (-> obj tasks))) (close-current! (-> obj tasks)) - (let ((a1-23 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-23 from) pp) - (set! (-> a1-23 num-params) 2) - (set! (-> a1-23 message) 'get-pickup) - (set! (-> a1-23 param 0) (the-as uint 5)) - (set! - (-> a1-23 param 1) - (the-as uint (- (-> *GAME-bank* money-task-inc))) - ) - (send-event-function *target* a1-23) - ) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc))) (save-reminder (-> obj tasks) (+ s4-3 1) 2) ) (else @@ -781,12 +757,7 @@ :virtual #t :exit (behavior () - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self other-miner ppointer 3) a1-0) - ) + (send-event (-> self other-miner ppointer 3) 'end-mode) ((-> (method-of-type process-taskable play-anim) exit)) (none) ) diff --git a/test/decompiler/reference/levels/village3/sage-village3_REF.gc b/test/decompiler/reference/levels/village3/sage-village3_REF.gc index 267f3470a9..6e9455f92c 100644 --- a/test/decompiler/reference/levels/village3/sage-village3_REF.gc +++ b/test/decompiler/reference/levels/village3/sage-village3_REF.gc @@ -94,12 +94,10 @@ (((game-task village3-button)) (when arg0 (close-status! (-> obj tasks) (task-status need-introduction)) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 1) - (set! (-> a1-5 message) 'clone) - (set! (-> a1-5 param 0) (the-as uint (process->handle obj))) - (send-event-function (-> obj assistant extra process) a1-5) + (send-event + (-> obj assistant extra process) + 'clone + (process->handle obj) ) (let ((s5-1 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj evilbro) (ppointer->handle (when s5-1 @@ -138,27 +136,9 @@ ) ) ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'anim-mode) - (set! (-> a1-9 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj evilbro)) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'blend-shape) - (set! (-> a1-10 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj evilbro)) a1-10) - ) - (let ((a1-11 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-11 from) pp) - (set! (-> a1-11 num-params) 1) - (set! (-> a1-11 message) 'center-joint) - (set! (-> a1-11 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj evilbro)) a1-11) - ) + (send-event (handle->process (-> obj evilbro)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj evilbro)) 'blend-shape #t) + (send-event (handle->process (-> obj evilbro)) 'center-joint 3) (let ((s5-2 (get-process *default-dead-pool* manipy #x4000))) (set! (-> obj evilsis) (ppointer->handle (when s5-2 (let @@ -196,27 +176,9 @@ ) ) ) - (let ((a1-15 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-15 from) pp) - (set! (-> a1-15 num-params) 1) - (set! (-> a1-15 message) 'anim-mode) - (set! (-> a1-15 param 0) (the-as uint 'clone-anim)) - (send-event-function (handle->process (-> obj evilsis)) a1-15) - ) - (let ((a1-16 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-16 from) pp) - (set! (-> a1-16 num-params) 1) - (set! (-> a1-16 message) 'blend-shape) - (set! (-> a1-16 param 0) (the-as uint #t)) - (send-event-function (handle->process (-> obj evilsis)) a1-16) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'center-joint) - (set! (-> a1-17 param 0) (the-as uint 3)) - (send-event-function (handle->process (-> obj evilsis)) a1-17) - ) + (send-event (handle->process (-> obj evilsis)) 'anim-mode 'clone-anim) + (send-event (handle->process (-> obj evilsis)) 'blend-shape #t) + (send-event (handle->process (-> obj evilsis)) 'center-joint 3) (set! (-> obj draw bounds w) 40960.0) ) (new 'static 'spool-anim @@ -583,12 +545,7 @@ (behavior () (case (get-task-status (game-task village3-button)) (((task-status need-introduction)) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'play-anim) - (send-event-function self a1-0) - ) + (send-event self 'play-anim) ) ) ((-> (method-of-type process-taskable idle) trans)) @@ -602,12 +559,7 @@ :exit (behavior () (set! (-> self draw bounds w) 10240.0) - (let ((a1-0 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-0 from) self) - (set! (-> a1-0 num-params) 0) - (set! (-> a1-0 message) 'end-mode) - (send-event-function (-> self assistant extra process) a1-0) - ) + (send-event (-> self assistant extra process) 'end-mode) (let ((a0-2 (handle->process (-> self evilbro)))) (if a0-2 (deactivate a0-2) diff --git a/test/decompiler/reference/levels/village3/village3-part_REF.gc b/test/decompiler/reference/levels/village3/village3-part_REF.gc index da063b2860..958e671b65 100644 --- a/test/decompiler/reference/levels/village3/village3-part_REF.gc +++ b/test/decompiler/reference/levels/village3/village3-part_REF.gc @@ -871,8 +871,7 @@ :mask #x1 :num 1.0 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x706f702d65726966) + :sound-name (static-sound-name "fire-pop") :volume #x400 ) ) @@ -1807,8 +1806,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1851,8 +1849,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1895,8 +1892,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1939,8 +1935,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -1983,8 +1978,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -2127,8 +2121,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -2850,8 +2843,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) @@ -2915,8 +2907,7 @@ (new 'static 'sound-spec :num 0.02 :group #x1 - :sound-name - (new 'static 'sound-name :lo #x68732d6d61657473) + :sound-name (static-sound-name "steam-short") :volume #x400 ) ) diff --git a/test/decompiler/reference/levels/village_common/oracle_REF.gc b/test/decompiler/reference/levels/village_common/oracle_REF.gc index 9fda81afe1..305b9c8e86 100644 --- a/test/decompiler/reference/levels/village_common/oracle_REF.gc +++ b/test/decompiler/reference/levels/village_common/oracle_REF.gc @@ -45,512 +45,500 @@ ;; definition for method 32 of type oracle (defmethod play-anim! oracle ((obj oracle) (arg0 symbol)) - (with-pp - (set! (-> obj talk-message) (the-as uint 260)) - (case (current-status (-> obj tasks)) - (((task-status need-hint) (task-status need-introduction)) - (when arg0 - (close-specific-task! - (the-as game-task (-> obj first-task)) - (task-status need-introduction) - ) - (close-specific-task! - (the-as game-task (-> obj second-task)) - (task-status need-introduction) - ) + (set! (-> obj talk-message) (the-as uint 260)) + (case (current-status (-> obj tasks)) + (((task-status need-hint) (task-status need-introduction)) + (when arg0 + (close-specific-task! + (the-as game-task (-> obj first-task)) + (task-status need-introduction) ) - (case (-> (level-get-target-inside *level*) name) - (('village1) - (new 'static 'spool-anim - :name "oracle-intro-1" - :index 9 - :parts 5 - :command-list '() - ) - ) - (('village2) - (new 'static 'spool-anim - :name "oracle-intro-2" - :index 11 - :parts 4 - :command-list - '( - (0 - kill - "pontoonten-20" - ) - (0 - kill - "pontoonten-19" - ) - (0 - kill - "pontoonten-18" - ) - (0 - kill - "pontoonten-15" - ) - (0 - kill - "pontoonten-14" - ) - (0 - kill - "pontoonfive-14" - ) - (0 - kill - "pontoonfive-15" - ) - (0 - kill - "pontoonfive-19" - ) - (0 - kill - "pontoonfive-20" - ) - (0 - kill - "med-res-level-12" - ) - (0 - kill - "med-res-level-13" - ) - (0 - kill - "med-res-level-15" - ) - (0 - kill - "money-2844" - ) - (0 - kill - "money-2845" - ) - (0 - kill - "money-2846" - ) - (0 - kill - "money-2847" - ) - (0 - kill - "money-2848" - ) - (0 - kill - "money-2849" - ) - (0 - kill - "money-2850" - ) - (0 - kill - "money-2854" - ) - (0 - kill - "money-2855" - ) - (0 - kill - "money-2856" - ) - (0 - kill - "money-2860" - ) - (0 - kill - "money-2861" - ) - (0 - kill - "money-2862" - ) - (0 - kill - "eco-27" - ) - (0 - kill - "eco-26" - ) - (0 - kill - "sharkey-25" - ) - (0 - kill - "barrel-13" - ) - (0 - kill - "barrel-14" - ) - (0 - kill - "barrel-15" - ) - (0 - kill - "barrel-16" - ) - (0 - kill - "barrel-17" - ) - (0 - kill - "barrel-18" - ) - (0 - kill - "barrel-19" - ) - (0 - kill - "barrel-20" - ) - (0 - kill - "barrel-21" - ) - (0 - kill - "barrel-22" - ) - (0 - kill - "barrel-23" - ) - (0 - kill - "villageb-part-18" - ) - (0 - kill - "villageb-part-19" - ) - (0 - kill - "villageb-part-20" - ) - (0 - kill - "villageb-part-21" - ) - (0 - kill - "villageb-part-28" - ) - (0 - kill - "villageb-part-29" - ) - (0 - kill - "villageb-part-30" - ) - (0 - kill - "villageb-part-31" - ) - (0 - kill - "villageb-part-32" - ) - (0 - kill - "villageb-part-33" - ) - (0 - kill - "villageb-part-35" - ) - (0 - kill - "villageb-part-37" - ) - (0 - kill - "villageb-part-38" - ) - (0 - kill - "villageb-part-47" - ) - (0 - kill - "villageb-part-48" - ) - (0 - kill - "villageb-part-49" - ) - (0 - kill - "villageb-part-50" - ) - (0 - kill - "villageb-part-56" - ) - (0 - kill - "villageb-part-62" - ) - (0 - kill - "villageb-part-63" - ) - (0 - kill - "villageb-ogreboss-1" - ) - (0 - kill - "crate-3127" - ) - (0 - kill - "crate-3128" - ) - (0 - kill - "crate-3129" - ) - (0 - kill - "crate-3133" - ) - (0 - kill - "geologist-1" - ) - (0 - kill - "fireboulder-2" - ) - (0 - kill - "fireboulder-3" - ) - (0 - kill - "fireboulder-4" - ) - (0 - kill - "water-vol-100" - ) - (0 - kill - "water-vol-101" - ) - (0 - kill - "water-vol-102" - ) - (0 - kill - "water-vol-103" - ) - (0 - kill - "water-vol-284" - ) - (0 - kill - "water-vol-285" - ) - (0 - kill - "water-vol-286" - ) - (0 - kill - "ceilingflag-6" - ) - (0 - kill - "ceilingflag-7" - ) - (0 - kill - "ceilingflag-8" - ) - (0 - kill - "ceilingflag-9" - ) - (0 - kill - "orb-cache-top-14" - ) - (0 - setting-reset - ocean-off - near - ) - ((the binteger 399) setting-unset ocean-off) - ) - ) - ) - (('village3) - (new 'static 'spool-anim - :name "oracle-intro-3" - :index 13 - :parts 4 - :command-list '() - ) - ) + (close-specific-task! + (the-as game-task (-> obj second-task)) + (task-status need-introduction) ) ) - (((task-status need-reminder)) - (set! (-> obj skippable) #t) (case (-> (level-get-target-inside *level*) name) (('village1) (new 'static 'spool-anim - :name "oracle-reminder-1" - :index 10 - :parts 4 + :name "oracle-intro-1" + :index 9 + :parts 5 :command-list '() ) ) (('village2) (new 'static 'spool-anim - :name "oracle-reminder-2" - :index 12 - :parts 2 - :command-list '() + :name "oracle-intro-2" + :index 11 + :parts 4 + :command-list + '( + (0 + kill + "pontoonten-20" + ) + (0 + kill + "pontoonten-19" + ) + (0 + kill + "pontoonten-18" + ) + (0 + kill + "pontoonten-15" + ) + (0 + kill + "pontoonten-14" + ) + (0 + kill + "pontoonfive-14" + ) + (0 + kill + "pontoonfive-15" + ) + (0 + kill + "pontoonfive-19" + ) + (0 + kill + "pontoonfive-20" + ) + (0 + kill + "med-res-level-12" + ) + (0 + kill + "med-res-level-13" + ) + (0 + kill + "med-res-level-15" + ) + (0 + kill + "money-2844" + ) + (0 + kill + "money-2845" + ) + (0 + kill + "money-2846" + ) + (0 + kill + "money-2847" + ) + (0 + kill + "money-2848" + ) + (0 + kill + "money-2849" + ) + (0 + kill + "money-2850" + ) + (0 + kill + "money-2854" + ) + (0 + kill + "money-2855" + ) + (0 + kill + "money-2856" + ) + (0 + kill + "money-2860" + ) + (0 + kill + "money-2861" + ) + (0 + kill + "money-2862" + ) + (0 + kill + "eco-27" + ) + (0 + kill + "eco-26" + ) + (0 + kill + "sharkey-25" + ) + (0 + kill + "barrel-13" + ) + (0 + kill + "barrel-14" + ) + (0 + kill + "barrel-15" + ) + (0 + kill + "barrel-16" + ) + (0 + kill + "barrel-17" + ) + (0 + kill + "barrel-18" + ) + (0 + kill + "barrel-19" + ) + (0 + kill + "barrel-20" + ) + (0 + kill + "barrel-21" + ) + (0 + kill + "barrel-22" + ) + (0 + kill + "barrel-23" + ) + (0 + kill + "villageb-part-18" + ) + (0 + kill + "villageb-part-19" + ) + (0 + kill + "villageb-part-20" + ) + (0 + kill + "villageb-part-21" + ) + (0 + kill + "villageb-part-28" + ) + (0 + kill + "villageb-part-29" + ) + (0 + kill + "villageb-part-30" + ) + (0 + kill + "villageb-part-31" + ) + (0 + kill + "villageb-part-32" + ) + (0 + kill + "villageb-part-33" + ) + (0 + kill + "villageb-part-35" + ) + (0 + kill + "villageb-part-37" + ) + (0 + kill + "villageb-part-38" + ) + (0 + kill + "villageb-part-47" + ) + (0 + kill + "villageb-part-48" + ) + (0 + kill + "villageb-part-49" + ) + (0 + kill + "villageb-part-50" + ) + (0 + kill + "villageb-part-56" + ) + (0 + kill + "villageb-part-62" + ) + (0 + kill + "villageb-part-63" + ) + (0 + kill + "villageb-ogreboss-1" + ) + (0 + kill + "crate-3127" + ) + (0 + kill + "crate-3128" + ) + (0 + kill + "crate-3129" + ) + (0 + kill + "crate-3133" + ) + (0 + kill + "geologist-1" + ) + (0 + kill + "fireboulder-2" + ) + (0 + kill + "fireboulder-3" + ) + (0 + kill + "fireboulder-4" + ) + (0 + kill + "water-vol-100" + ) + (0 + kill + "water-vol-101" + ) + (0 + kill + "water-vol-102" + ) + (0 + kill + "water-vol-103" + ) + (0 + kill + "water-vol-284" + ) + (0 + kill + "water-vol-285" + ) + (0 + kill + "water-vol-286" + ) + (0 + kill + "ceilingflag-6" + ) + (0 + kill + "ceilingflag-7" + ) + (0 + kill + "ceilingflag-8" + ) + (0 + kill + "ceilingflag-9" + ) + (0 + kill + "orb-cache-top-14" + ) + (0 + setting-reset + ocean-off + near + ) + ((the binteger 399) setting-unset ocean-off) + ) ) ) (('village3) (new 'static 'spool-anim - :name "oracle-reminder-3" - :index 14 - :parts 2 + :name "oracle-intro-3" + :index 13 + :parts 4 :command-list '() ) ) ) ) - (((task-status need-reward-speech)) - (cond - (arg0 - (set! (-> obj cell-for-task) (current-task (-> obj tasks))) - (close-current! (-> obj tasks)) - (let ((a1-5 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-5 from) pp) - (set! (-> a1-5 num-params) 2) - (set! (-> a1-5 message) 'get-pickup) - (set! (-> a1-5 param 0) (the-as uint 5)) - (set! - (-> a1-5 param 1) - (the-as uint (- (-> *GAME-bank* money-oracle-inc))) - ) - (send-event-function *target* a1-5) - ) - (cond - ((= (current-task (-> obj tasks)) (-> obj first-task)) - (let ((a0-25 (handle->process (-> obj right-eye-cell)))) - (if a0-25 - (deactivate a0-25) - ) - ) - ) - (else - (let ((a0-29 (handle->process (-> obj left-eye-cell)))) - (if a0-29 - (deactivate a0-29) - ) - ) - ) + (((task-status need-reminder)) + (set! (-> obj skippable) #t) + (case (-> (level-get-target-inside *level*) name) + (('village1) + (new 'static 'spool-anim + :name "oracle-reminder-1" + :index 10 + :parts 4 + :command-list '() ) ) - (else - (set! (-> obj will-talk) #t) - (set! (-> obj talk-message) (the-as uint 283)) + (('village2) + (new 'static 'spool-anim + :name "oracle-reminder-2" + :index 12 + :parts 2 + :command-list '() ) ) - (cond - ((= (current-task (-> obj tasks)) (-> obj first-task)) - (case (-> (level-get-target-inside *level*) name) - (('village1) - (new 'static 'spool-anim - :name "oracle-right-eye-1" - :index 3 - :parts 2 - :command-list '() - ) - ) - (('village2) - (new 'static 'spool-anim - :name "oracle-right-eye-2" - :index 5 - :parts 2 - :command-list '() + (('village3) + (new 'static 'spool-anim + :name "oracle-reminder-3" + :index 14 + :parts 2 + :command-list '() + ) + ) + ) + ) + (((task-status need-reward-speech)) + (cond + (arg0 + (set! (-> obj cell-for-task) (current-task (-> obj tasks))) + (close-current! (-> obj tasks)) + (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-oracle-inc))) + (cond + ((= (current-task (-> obj tasks)) (-> obj first-task)) + (let ((a0-25 (handle->process (-> obj right-eye-cell)))) + (if a0-25 + (deactivate a0-25) ) ) - (('village3) - (new 'static 'spool-anim - :name "oracle-right-eye-3" - :index 7 - :parts 2 - :command-list '() + ) + (else + (let ((a0-29 (handle->process (-> obj left-eye-cell)))) + (if a0-29 + (deactivate a0-29) ) ) ) ) - (else - (case (-> (level-get-target-inside *level*) name) - (('village1) - (new 'static 'spool-anim - :name "oracle-left-eye-1" - :index 4 - :parts 2 - :command-list '() - ) - ) - (('village2) + ) + (else + (set! (-> obj will-talk) #t) + (set! (-> obj talk-message) (the-as uint 283)) + ) + ) + (cond + ((= (current-task (-> obj tasks)) (-> obj first-task)) + (case (-> (level-get-target-inside *level*) name) + (('village1) (new 'static 'spool-anim - :name "oracle-left-eye-2" - :index 6 + :name "oracle-right-eye-1" + :index 3 :parts 2 :command-list '() ) ) - (('village3) + (('village2) + (new 'static 'spool-anim + :name "oracle-right-eye-2" + :index 5 + :parts 2 + :command-list '() + ) + ) + (('village3) + (new 'static 'spool-anim + :name "oracle-right-eye-3" + :index 7 + :parts 2 + :command-list '() + ) + ) + ) + ) + (else + (case (-> (level-get-target-inside *level*) name) + (('village1) (new 'static 'spool-anim - :name "oracle-left-eye-3" - :index 8 + :name "oracle-left-eye-1" + :index 4 :parts 2 :command-list '() ) ) + (('village2) + (new 'static 'spool-anim + :name "oracle-left-eye-2" + :index 6 + :parts 2 + :command-list '() + ) + ) + (('village3) + (new 'static 'spool-anim + :name "oracle-left-eye-3" + :index 8 + :parts 2 + :command-list '() + ) ) ) ) ) - (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 2) ) + (-> obj draw art-group data 2) ) ) ) @@ -579,172 +567,99 @@ ;; definition for method 11 of type oracle (defmethod copy-defaults! oracle ((obj oracle) (arg0 res-lump)) - (with-pp - (dummy-40 - obj - arg0 - *oracle-sg* - 3 - 4 - (new 'static 'vector :y -4096.0 :w 4096.0) - -1 - ) - (set! - (-> obj sound) - (new - 'process - 'ambient-sound - (new 'static 'sound-spec - :mask #x80 - :num 1.0 - :group #x1 - :sound-name - (new 'static 'sound-name :lo #x732d656c6361726f) - :volume #x400 - :fo-max 50 - ) - (-> obj root-override trans) + (dummy-40 + obj + arg0 + *oracle-sg* + 3 + 4 + (new 'static 'vector :y -4096.0 :w 4096.0) + -1 + ) + (set! + (-> obj sound) + (new + 'process + 'ambient-sound + (new 'static 'sound-spec + :mask #x80 + :num 1.0 + :group #x1 + :sound-name (static-sound-name "oracle-sleep") + :volume #x400 + :fo-max 50 ) + (-> obj root-override trans) ) - (set! (-> obj first-task) (the-as uint (-> arg0 extra perm task))) - (set! (-> obj second-task) (res-lump-value arg0 'alt-task uint)) - (set! - (-> obj tasks) - (get-task-control (the-as game-task (-> obj first-task))) - ) - (set! (-> obj right-eye-cell) (the-as handle #f)) - (set! (-> obj left-eye-cell) (the-as handle #f)) - (logior! (-> obj draw status) 32) - (let ((s4-0 (new 'stack-no-clear 'vector)) - (s5-1 (lambda :behavior oracle () (let* ((gp-0 (-> self root-override)) - (v1-1 - (if - (and - (nonzero? gp-0) - (type-type? - (-> gp-0 type) - collide-shape - ) + ) + (set! (-> obj first-task) (the-as uint (-> arg0 extra perm task))) + (set! (-> obj second-task) (res-lump-value arg0 'alt-task uint)) + (set! + (-> obj tasks) + (get-task-control (the-as game-task (-> obj first-task))) + ) + (set! (-> obj right-eye-cell) (the-as handle #f)) + (set! (-> obj left-eye-cell) (the-as handle #f)) + (logior! (-> obj draw status) 32) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-1 (lambda :behavior oracle () (let* ((gp-0 (-> self root-override)) + (v1-1 + (if + (and + (nonzero? gp-0) + (type-type? + (-> gp-0 type) + collide-shape ) - gp-0 ) - ) - (a1-1 (if v1-1 - (-> - v1-1 - root-prim - prim-core - ) - (-> - self - root-override - trans - ) - ) + gp-0 ) ) - (spawn - (-> self part) - (the-as vector a1-1) - ) + (a1-1 (if v1-1 + (-> + v1-1 + root-prim + prim-core + ) + (-> + self + root-override + trans + ) + ) + ) + ) + (spawn + (-> self part) + (the-as vector a1-1) ) - 0 - (none) - ) - ) - ) - (ja-post) - (when - (not - (task-closed? - (the-as game-task (-> obj first-task)) - (task-status need-resolution) - ) - ) - (vector<-cspace! s4-0 (-> obj node-list data 5)) - (let ((s3-0 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj right-eye-cell) (ppointer->handle (when s3-0 - (let - ((t9-8 - (method-of-type - manipy - activate - ) - ) - ) - (t9-8 - (the-as manipy s3-0) - obj - 'manipy - (the-as - pointer - #x70004000 - ) - ) - ) - (run-now-in-process - s3-0 - manipy-init - s4-0 - (-> obj entity) - *fuel-cell-sg* - (new 'static 'vector - :w 4915.2 - ) - ) - (-> s3-0 ppointer) - ) - ) - ) - ) - (let ((a1-9 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-9 from) pp) - (set! (-> a1-9 num-params) 1) - (set! (-> a1-9 message) 'eval) - (set! - (-> a1-9 param 0) - (the-as - uint - (lambda :behavior oracle - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) - (set! (-> self part) v0-0) - (the-as sparticle-launch-group v0-0) - ) + ) + 0 + (none) + ) ) ) - ) - (send-event-function (handle->process (-> obj right-eye-cell)) a1-9) - ) - (let ((a1-10 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-10 from) pp) - (set! (-> a1-10 num-params) 1) - (set! (-> a1-10 message) 'trans-hook) - (set! (-> a1-10 param 0) (the-as uint s5-1)) - (send-event-function (handle->process (-> obj right-eye-cell)) a1-10) + (ja-post) + (when + (not + (task-closed? + (the-as game-task (-> obj first-task)) + (task-status need-resolution) ) ) - (when - (not - (task-closed? - (the-as game-task (-> obj second-task)) - (task-status need-resolution) - ) - ) - (vector<-cspace! s4-0 (-> obj node-list data 6)) - (let ((s3-1 (get-process *default-dead-pool* manipy #x4000))) - (set! (-> obj left-eye-cell) (ppointer->handle (when s3-1 + (vector<-cspace! s4-0 (-> obj node-list data 5)) + (let ((s3-0 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj right-eye-cell) (ppointer->handle (when s3-0 (let - ((t9-15 + ((t9-8 (method-of-type manipy activate ) ) ) - (t9-15 - (the-as manipy s3-1) + (t9-8 + (the-as manipy s3-0) obj 'manipy (the-as @@ -754,7 +669,7 @@ ) ) (run-now-in-process - s3-1 + s3-0 manipy-init s4-0 (-> obj entity) @@ -763,41 +678,81 @@ :w 4915.2 ) ) - (-> s3-1 ppointer) + (-> s3-0 ppointer) ) ) - ) - ) - (let ((a1-16 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-16 from) pp) - (set! (-> a1-16 num-params) 1) - (set! (-> a1-16 message) 'eval) - (set! - (-> a1-16 param 0) - (the-as - uint - (lambda :behavior oracle - () - (let - ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) - (set! (-> self part) v0-0) - (the-as sparticle-launch-group v0-0) - ) - ) - ) - ) - (send-event-function (handle->process (-> obj left-eye-cell)) a1-16) - ) - (let ((a1-17 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-17 from) pp) - (set! (-> a1-17 num-params) 1) - (set! (-> a1-17 message) 'trans-hook) - (set! (-> a1-17 param 0) (the-as uint s5-1)) - (send-event-function (handle->process (-> obj left-eye-cell)) a1-17) ) ) + (send-event + (handle->process (-> obj right-eye-cell)) + 'eval + (lambda :behavior oracle + () + (let ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) + (set! (-> self part) v0-0) + (the-as sparticle-launch-group v0-0) + ) + ) + ) + (send-event (handle->process (-> obj right-eye-cell)) 'trans-hook s5-1) + ) + (when + (not + (task-closed? + (the-as game-task (-> obj second-task)) + (task-status need-resolution) + ) + ) + (vector<-cspace! s4-0 (-> obj node-list data 6)) + (let ((s3-1 (get-process *default-dead-pool* manipy #x4000))) + (set! (-> obj left-eye-cell) (ppointer->handle (when s3-1 + (let + ((t9-15 + (method-of-type + manipy + activate + ) + ) + ) + (t9-15 + (the-as manipy s3-1) + obj + 'manipy + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s3-1 + manipy-init + s4-0 + (-> obj entity) + *fuel-cell-sg* + (new 'static 'vector + :w 4915.2 + ) + ) + (-> s3-1 ppointer) + ) + ) + ) + ) + (send-event + (handle->process (-> obj left-eye-cell)) + 'eval + (lambda :behavior oracle + () + (let ((v0-0 (create-launch-control (-> *part-group-id-table* 63) self))) + (set! (-> self part) v0-0) + (the-as sparticle-launch-group v0-0) + ) + ) + ) + (send-event (handle->process (-> obj left-eye-cell)) 'trans-hook s5-1) ) - (dummy-42 obj) - (none) ) + (dummy-42 obj) + (none) )