mirror of
https://github.com/open-goal/jak-project
synced 2026-09-08 20:02:39 -04:00
process-spawn + pretty printer improvements (#1428)
* some jp support to fix some errors in the original game * music fade toggle * recognize `process-new` macros!! * strip casts in this macro * rename macro * fix cast typecheck * update source 1 * detect kernel stack case * less boilerplate * `manipy-spawn` special case * pretty printer improvements * revert dumb thing from earlier * use shell detection on `send-event` * fix some events * remove unused argument * detect `static-attack-info` and add `CondNoElse` to shell detect * better `attack-info` detect * support `process-spawn` in multi-lets * detect `rand-float-gen` pt 1 * detect as return value * detect in `countdown` and `dotimes` * oops this wasnt working * fancier `send-event`s * clang * update source!! * fix tests * fine jeez * uh okay * fix some accidental regressions * fix more regressions * regression fixes * fix big bug... * extra safety!
This commit is contained in:
@@ -215,9 +215,12 @@ void break_list(Node* node) {
|
||||
// things with 5 things in the top line: (defskelgroup <name> <art> jgeo janim
|
||||
node->top_line_count = 5;
|
||||
node->sub_elt_indent += name.size();
|
||||
} else if (name == "process-new") {
|
||||
// things with 3 things in the top line
|
||||
node->top_line_count = 3;
|
||||
node->sub_elt_indent += name.size();
|
||||
} else if (name == "ja" || name == "ja-no-eval") {
|
||||
// things with 2 things in the top line: (ja <:key value>
|
||||
node->top_line_count = 2;
|
||||
node->top_line_count = 3;
|
||||
node->sub_elt_indent += name.size();
|
||||
} else if (name == "defmethod") {
|
||||
// things with 4 things in the top line: (defmethod <method> <type> <args>
|
||||
@@ -368,6 +371,7 @@ void append_node_to_string(const Node* node,
|
||||
str.pop_back();
|
||||
}
|
||||
str.push_back('\n');
|
||||
bool after_key = false;
|
||||
for (; node_idx < node->child_nodes.size(); node_idx++) {
|
||||
if (node->kind == Node::Kind::IMPROPER_LIST &&
|
||||
&node->child_nodes.at(node_idx) == &node->child_nodes.back()) {
|
||||
@@ -376,9 +380,17 @@ void append_node_to_string(const Node* node,
|
||||
}
|
||||
str.append(".\n");
|
||||
}
|
||||
append_node_to_string(&node->child_nodes.at(node_idx), str, listing_indent,
|
||||
listing_indent);
|
||||
str.push_back('\n');
|
||||
append_node_to_string(&node->child_nodes.at(node_idx), str,
|
||||
after_key ? 0 : listing_indent, listing_indent);
|
||||
if (node->child_nodes.at(node_idx).kind == Node::Kind::ATOM &&
|
||||
node->child_nodes.at(node_idx).atom_str.at(0) == ':' &&
|
||||
node->child_nodes.at(node_idx).atom_str.find(' ') == std::string::npos) {
|
||||
str.push_back(' ');
|
||||
after_key = true;
|
||||
} else {
|
||||
str.push_back('\n');
|
||||
after_key = false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < listing_indent; i++) {
|
||||
str.push_back(' ');
|
||||
|
||||
@@ -69,6 +69,13 @@ std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_dec
|
||||
ASSERT_MSG(false, fmt::format("fixed_point_to_string failed hard. v: {} s: {}", value, scale));
|
||||
}
|
||||
|
||||
/*!
|
||||
* Wrapper around fixed_point_to_string, for printing seconds.
|
||||
*/
|
||||
std::string seconds_to_string(s64 value, bool append_trailing_decimal) {
|
||||
return fixed_point_to_string(value, TICKS_PER_SECOND, append_trailing_decimal);
|
||||
}
|
||||
|
||||
int float_to_cstr(float value, char* buffer, bool append_trailing_decimal) {
|
||||
ASSERT(std::isfinite(value));
|
||||
// dragonbox gives us:
|
||||
|
||||
@@ -6,4 +6,5 @@
|
||||
std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_decimal = false);
|
||||
std::string float_to_string(float value, bool append_trailing_decimal = true);
|
||||
std::string meters_to_string(float value, bool append_trailing_decimal = false);
|
||||
std::string seconds_to_string(s64 value, bool append_trailing_decimal = false);
|
||||
int float_to_cstr(float value, char* buffer, bool append_trailing_decimal = true);
|
||||
|
||||
@@ -2491,6 +2491,10 @@ void LetElement::make_let_star() {
|
||||
m_star = true;
|
||||
}
|
||||
|
||||
void LetElement::clear_let_star() {
|
||||
m_star = false;
|
||||
}
|
||||
|
||||
goos::Object LetElement::to_form_internal(const Env& env) const {
|
||||
std::vector<goos::Object> outer = {pretty_print::to_symbol(m_star ? "let*" : "let")};
|
||||
|
||||
|
||||
@@ -420,6 +420,10 @@ class SetFormFormElement : public FormElement {
|
||||
const Form* dst() const { return m_dst; }
|
||||
Form* src() { return m_src; }
|
||||
Form* dst() { return m_dst; }
|
||||
const std::optional<TypeSpec>& cast_for_set() const { return m_cast_for_set; }
|
||||
const std::optional<TypeSpec>& cast_for_define() const { return m_cast_for_define; }
|
||||
void set_cast_for_set(const std::optional<TypeSpec>& ts) { m_cast_for_set = ts; }
|
||||
void set_cast_for_define(const std::optional<TypeSpec>& ts) { m_cast_for_define = ts; }
|
||||
|
||||
private:
|
||||
int m_real_push_count = 0;
|
||||
@@ -1096,6 +1100,7 @@ class CastElement : public FormElement {
|
||||
const Form* source() const { return m_source; }
|
||||
void set_type(const TypeSpec& ts) { m_type = ts; }
|
||||
Form* source() { return m_source; }
|
||||
bool numeric() const { return m_numeric; }
|
||||
|
||||
private:
|
||||
TypeSpec m_type;
|
||||
@@ -1379,6 +1384,7 @@ class DecompiledDataElement : public FormElement {
|
||||
void get_modified_regs(RegSet& regs) const override;
|
||||
void do_decomp(const Env& env, const LinkedObjectFile* file);
|
||||
DecompilerLabel label() const { return m_label; }
|
||||
std::optional<LabelInfo> label_info() const { return m_label_info; }
|
||||
|
||||
private:
|
||||
bool m_decompiled = false;
|
||||
@@ -1393,6 +1399,7 @@ class LetElement : public FormElement {
|
||||
void add_def(RegisterAccess dst, Form* value);
|
||||
|
||||
void make_let_star();
|
||||
void clear_let_star();
|
||||
goos::Object to_form_internal(const Env& env) const override;
|
||||
void apply(const std::function<void(FormElement*)>& f) override;
|
||||
void apply_form(const std::function<void(Form*)>& f) override;
|
||||
@@ -1431,6 +1438,12 @@ class CounterLoopElement : public FormElement {
|
||||
void collect_vars(RegAccessSet& vars, bool recursive) const override;
|
||||
void get_modified_regs(RegSet& regs) const override;
|
||||
bool allow_in_if() const override { return false; }
|
||||
Kind kind() const { return m_kind; }
|
||||
Form* counter_value() const { return m_check_value; }
|
||||
Form* body() const { return m_body; }
|
||||
RegisterAccess var_init() const { return m_var_init; }
|
||||
RegisterAccess var_check() const { return m_var_check; }
|
||||
RegisterAccess var_inc() const { return m_var_inc; }
|
||||
|
||||
private:
|
||||
RegisterAccess m_var_init, m_var_check, m_var_inc;
|
||||
|
||||
@@ -1777,10 +1777,7 @@ void SimpleExpressionElement::update_from_stack_logor_or_logand(const Env& env,
|
||||
Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::LOGAND),
|
||||
{Matcher::any(a_form), lognot_submatchers})});
|
||||
|
||||
Form hack_form;
|
||||
hack_form.elts().push_back(element);
|
||||
|
||||
auto mr = match(logclear_matcher, &hack_form);
|
||||
auto mr = match(logclear_matcher, element);
|
||||
if (mr.matched) {
|
||||
result->push_back(pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_fixed(FixedOperatorKind::LOGCLEAR),
|
||||
@@ -1798,7 +1795,7 @@ void SimpleExpressionElement::update_from_stack_logor_or_logand(const Env& env,
|
||||
Matcher::integer(32)}),
|
||||
Matcher::op_fixed(FixedOperatorKind::ASM_SLLV_R0, {Matcher::any_reg(1)})});
|
||||
|
||||
auto handle_mr = match(make_handle_matcher, &hack_form);
|
||||
auto handle_mr = match(make_handle_matcher, element);
|
||||
if (handle_mr.matched) {
|
||||
auto var_a = handle_mr.maps.regs.at(0).value();
|
||||
auto var_b = handle_mr.maps.regs.at(1).value();
|
||||
@@ -2572,10 +2569,7 @@ bool try_to_rewrite_vector_inline_ctor(const Env& env,
|
||||
auto matcher = Matcher::set(Matcher::deref(Matcher::any_reg(0), false, token_matchers),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
|
||||
Form hack;
|
||||
hack.elts().push_back(elt);
|
||||
auto mr = match(matcher, &hack);
|
||||
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return false;
|
||||
@@ -2631,10 +2625,7 @@ bool try_to_rewrite_matrix_inline_ctor(const Env& env, FormPool& pool, FormStack
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
|
||||
Form hack;
|
||||
hack.elts().push_back(elt);
|
||||
auto mr = match(matcher, &hack);
|
||||
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return false;
|
||||
@@ -3489,7 +3480,7 @@ Form* try_rewrite_as_ja_group(CondNoElseElement* value,
|
||||
auto body = value->entries[0].body;
|
||||
|
||||
// safe to look for a reg directly here.
|
||||
auto condition_matcher = Matcher::fixed_op(
|
||||
auto condition_matcher = Matcher::op_fixed(
|
||||
FixedOperatorKind::GT, {Matcher::deref(Matcher::s6(), false,
|
||||
{DerefTokenMatcher::string("skel"),
|
||||
DerefTokenMatcher::string("active-channels")}),
|
||||
@@ -4948,8 +4939,8 @@ void DynamicMethodAccess::update_from_stack(const Env& env,
|
||||
|
||||
// (+ (* method-id 4) (the-as int child-type))
|
||||
auto mult_matcher =
|
||||
Matcher::fixed_op(FixedOperatorKind::MULTIPLICATION, {reg0_matcher, Matcher::integer(4)});
|
||||
auto matcher = Matcher::fixed_op(FixedOperatorKind::ADDITION, {mult_matcher, reg1_matcher});
|
||||
Matcher::op_fixed(FixedOperatorKind::MULTIPLICATION, {reg0_matcher, Matcher::integer(4)});
|
||||
auto matcher = Matcher::op_fixed(FixedOperatorKind::ADDITION, {mult_matcher, reg1_matcher});
|
||||
auto match_result = match(matcher, new_val);
|
||||
if (!match_result.matched) {
|
||||
throw std::runtime_error("Could not match DynamicMethodAccess values: " +
|
||||
@@ -4989,8 +4980,8 @@ void ArrayFieldAccess::update_with_val(Form* new_val,
|
||||
|
||||
// (&+ data-ptr <idx>)
|
||||
auto matcher = Matcher::match_or(
|
||||
{Matcher::fixed_op(FixedOperatorKind::ADDITION, {base_matcher, offset_matcher}),
|
||||
Matcher::fixed_op(FixedOperatorKind::ADDITION_PTR, {base_matcher, offset_matcher})});
|
||||
{Matcher::op_fixed(FixedOperatorKind::ADDITION, {base_matcher, offset_matcher}),
|
||||
Matcher::op_fixed(FixedOperatorKind::ADDITION_PTR, {base_matcher, offset_matcher})});
|
||||
|
||||
auto match_result = match(matcher, new_val);
|
||||
if (!match_result.matched) {
|
||||
@@ -5024,17 +5015,17 @@ void ArrayFieldAccess::update_with_val(Form* new_val,
|
||||
Matcher::cast("uint", Matcher::any(0)), Matcher::any(0)});
|
||||
auto reg1_matcher =
|
||||
Matcher::match_or({Matcher::cast("uint", Matcher::any(1)), Matcher::any(1)});
|
||||
auto mult_matcher = Matcher::fixed_op(FixedOperatorKind::MULTIPLICATION,
|
||||
auto mult_matcher = Matcher::op_fixed(FixedOperatorKind::MULTIPLICATION,
|
||||
{reg1_matcher, Matcher::integer(m_expected_stride)});
|
||||
mult_matcher = Matcher::match_or({Matcher::cast("uint", mult_matcher), mult_matcher});
|
||||
auto matcher = Matcher::match_or(
|
||||
{Matcher::fixed_op(FixedOperatorKind::ADDITION, {reg0_matcher, mult_matcher}),
|
||||
Matcher::fixed_op(FixedOperatorKind::ADDITION_PTR, {reg0_matcher, mult_matcher})});
|
||||
{Matcher::op_fixed(FixedOperatorKind::ADDITION, {reg0_matcher, mult_matcher}),
|
||||
Matcher::op_fixed(FixedOperatorKind::ADDITION_PTR, {reg0_matcher, mult_matcher})});
|
||||
auto match_result = match(matcher, new_val);
|
||||
if (!match_result.matched) {
|
||||
matcher = Matcher::match_or(
|
||||
{Matcher::fixed_op(FixedOperatorKind::ADDITION, {mult_matcher, reg0_matcher}),
|
||||
Matcher::fixed_op(FixedOperatorKind::ADDITION_PTR, {mult_matcher, reg0_matcher})});
|
||||
{Matcher::op_fixed(FixedOperatorKind::ADDITION, {mult_matcher, reg0_matcher}),
|
||||
Matcher::op_fixed(FixedOperatorKind::ADDITION_PTR, {mult_matcher, reg0_matcher})});
|
||||
match_result = match(matcher, new_val);
|
||||
if (!match_result.matched) {
|
||||
result->push_back(this);
|
||||
@@ -5107,7 +5098,7 @@ void ArrayFieldAccess::update_with_val(Form* new_val,
|
||||
auto reg1_matcher =
|
||||
Matcher::match_or({Matcher::cast("int", Matcher::any(1)),
|
||||
Matcher::cast("uint", Matcher::any(1)), Matcher::any(1)});
|
||||
auto matcher = Matcher::fixed_op(FixedOperatorKind::ADDITION, {reg0_matcher, reg1_matcher});
|
||||
auto matcher = Matcher::op_fixed(FixedOperatorKind::ADDITION, {reg0_matcher, reg1_matcher});
|
||||
auto match_result = match(matcher, new_val);
|
||||
if (!match_result.matched) {
|
||||
throw std::runtime_error("Could not match ArrayFieldAccess (stride 1) values: " +
|
||||
@@ -5135,18 +5126,18 @@ void ArrayFieldAccess::update_with_val(Form* new_val,
|
||||
auto reg1_matcher =
|
||||
Matcher::match_or({Matcher::cast("uint", Matcher::any(1)),
|
||||
Matcher::cast("int", Matcher::any(1)), Matcher::any(1)});
|
||||
auto mult_matcher = Matcher::fixed_op(FixedOperatorKind::MULTIPLICATION,
|
||||
auto mult_matcher = Matcher::op_fixed(FixedOperatorKind::MULTIPLICATION,
|
||||
{reg0_matcher, Matcher::integer(m_expected_stride)});
|
||||
mult_matcher = Matcher::match_or({Matcher::cast("uint", mult_matcher), mult_matcher});
|
||||
auto matcher = Matcher::fixed_op(FixedOperatorKind::ADDITION, {mult_matcher, reg1_matcher});
|
||||
matcher = Matcher::match_or({matcher, Matcher::fixed_op(FixedOperatorKind::ADDITION_PTR,
|
||||
auto matcher = Matcher::op_fixed(FixedOperatorKind::ADDITION, {mult_matcher, reg1_matcher});
|
||||
matcher = Matcher::match_or({matcher, Matcher::op_fixed(FixedOperatorKind::ADDITION_PTR,
|
||||
{reg1_matcher, mult_matcher})});
|
||||
auto match_result = match(matcher, new_val);
|
||||
Form* idx = nullptr;
|
||||
Form* base = nullptr;
|
||||
// TODO - figure out why it sometimes happens the other way.
|
||||
if (!match_result.matched) {
|
||||
matcher = Matcher::fixed_op(FixedOperatorKind::ADDITION, {reg1_matcher, mult_matcher});
|
||||
matcher = Matcher::op_fixed(FixedOperatorKind::ADDITION, {reg1_matcher, mult_matcher});
|
||||
match_result = match(matcher, new_val);
|
||||
if (!match_result.matched) {
|
||||
throw std::runtime_error("Could not match ArrayFieldAccess (stride power of 2) values: " +
|
||||
|
||||
@@ -30,6 +30,14 @@ Matcher Matcher::op(const GenericOpMatcher& op, const std::vector<Matcher>& args
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::func(const Matcher& matcher, const std::vector<Matcher>& args) {
|
||||
return Matcher::op(GenericOpMatcher::func(matcher), args);
|
||||
}
|
||||
|
||||
Matcher Matcher::func(const std::string& name, const std::vector<Matcher>& args) {
|
||||
return Matcher::op(GenericOpMatcher::func(Matcher::constant_token(name)), args);
|
||||
}
|
||||
|
||||
Matcher Matcher::op_fixed(FixedOperatorKind op, const std::vector<Matcher>& args) {
|
||||
return Matcher::op(GenericOpMatcher::fixed(op), args);
|
||||
}
|
||||
@@ -42,12 +50,12 @@ Matcher Matcher::op_with_rest(const GenericOpMatcher& op, const std::vector<Matc
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::fixed_op(FixedOperatorKind op, const std::vector<Matcher>& args) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::GENERIC_OP;
|
||||
m.m_gen_op_matcher = std::make_shared<GenericOpMatcher>(GenericOpMatcher::fixed(op));
|
||||
m.m_sub_matchers = args;
|
||||
return m;
|
||||
Matcher Matcher::func_with_rest(const Matcher& matcher, const std::vector<Matcher>& args) {
|
||||
return Matcher::op_with_rest(GenericOpMatcher::func(matcher), args);
|
||||
}
|
||||
|
||||
Matcher Matcher::func_with_rest(const std::string& name, const std::vector<Matcher>& args) {
|
||||
return Matcher::op_with_rest(GenericOpMatcher::func(Matcher::constant_token(name)), args);
|
||||
}
|
||||
|
||||
Matcher Matcher::match_or(const std::vector<Matcher>& args) {
|
||||
@@ -86,6 +94,13 @@ Matcher Matcher::any_integer(int match_id) {
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::single(std::optional<float> value) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::FLOAT;
|
||||
m.m_float_match = value;
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::any_quoted_symbol(int match_id) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::ANY_QUOTED_SYMBOL;
|
||||
@@ -257,27 +272,7 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
}
|
||||
} break;
|
||||
|
||||
case Kind::GENERIC_OP: {
|
||||
auto as_generic = dynamic_cast<GenericElement*>(input->try_as_single_active_element());
|
||||
if (as_generic) {
|
||||
if (!m_gen_op_matcher->do_match(as_generic->op(), maps_out)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (as_generic->elts().size() != m_sub_matchers.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < m_sub_matchers.size(); i++) {
|
||||
if (!m_sub_matchers.at(i).do_match(as_generic->elts().at(i), maps_out)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::GENERIC_OP:
|
||||
case Kind::GENERIC_OP_WITH_REST: {
|
||||
auto as_generic = dynamic_cast<GenericElement*>(input->try_as_single_active_element());
|
||||
if (as_generic) {
|
||||
@@ -285,7 +280,9 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (as_generic->elts().size() < m_sub_matchers.size()) {
|
||||
if ((m_kind == Kind::GENERIC_OP && as_generic->elts().size() != m_sub_matchers.size()) ||
|
||||
(m_kind == Kind::GENERIC_OP_WITH_REST &&
|
||||
as_generic->elts().size() < m_sub_matchers.size())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -351,7 +348,7 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
|
||||
auto as_expr = dynamic_cast<SimpleExpressionElement*>(input->try_as_single_active_element());
|
||||
if (as_expr && as_expr->expr().is_identity()) {
|
||||
auto atom = as_expr->expr().get_arg(0);
|
||||
const auto& atom = as_expr->expr().get_arg(0);
|
||||
if (atom.is_int()) {
|
||||
if (!m_int_match.has_value()) {
|
||||
return true;
|
||||
@@ -363,6 +360,19 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::FLOAT: {
|
||||
auto as_const_float =
|
||||
dynamic_cast<ConstantFloatElement*>(input->try_as_single_active_element());
|
||||
if (as_const_float) {
|
||||
if (!m_float_match.has_value()) {
|
||||
return true;
|
||||
}
|
||||
return as_const_float->value() == *m_float_match;
|
||||
}
|
||||
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::ANY_INT: {
|
||||
auto as_simple_atom = dynamic_cast<SimpleAtomElement*>(input->try_as_single_active_element());
|
||||
if (as_simple_atom) {
|
||||
@@ -376,7 +386,7 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
|
||||
auto as_expr = dynamic_cast<SimpleExpressionElement*>(input->try_as_single_active_element());
|
||||
if (as_expr && as_expr->expr().is_identity()) {
|
||||
auto atom = as_expr->expr().get_arg(0);
|
||||
const auto& atom = as_expr->expr().get_arg(0);
|
||||
if (atom.is_int()) {
|
||||
if (m_int_out_id != -1) {
|
||||
maps_out->ints[m_int_out_id] = atom.get_int();
|
||||
@@ -401,7 +411,7 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
|
||||
auto as_expr = dynamic_cast<SimpleExpressionElement*>(input->try_as_single_active_element());
|
||||
if (as_expr && as_expr->expr().is_identity()) {
|
||||
auto atom = as_expr->expr().get_arg(0);
|
||||
const auto& atom = as_expr->expr().get_arg(0);
|
||||
if (atom.is_sym_ptr()) {
|
||||
if (m_string_out_id != -1) {
|
||||
maps_out->strings[m_string_out_id] = atom.get_str();
|
||||
@@ -425,7 +435,7 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
|
||||
auto as_expr = dynamic_cast<SimpleExpressionElement*>(input->try_as_single_active_element());
|
||||
if (as_expr && as_expr->expr().is_identity()) {
|
||||
auto atom = as_expr->expr().get_arg(0);
|
||||
const auto& atom = as_expr->expr().get_arg(0);
|
||||
if (atom.is_sym_val()) {
|
||||
if (m_string_out_id != -1) {
|
||||
maps_out->strings[m_string_out_id] = atom.get_str();
|
||||
@@ -446,7 +456,7 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
|
||||
auto as_expr = dynamic_cast<SimpleExpressionElement*>(input->try_as_single_active_element());
|
||||
if (as_expr && as_expr->expr().is_identity()) {
|
||||
auto atom = as_expr->expr().get_arg(0);
|
||||
const auto& atom = as_expr->expr().get_arg(0);
|
||||
if (atom.is_sym_val()) {
|
||||
return atom.get_str() == m_str;
|
||||
}
|
||||
|
||||
@@ -37,16 +37,20 @@ class Matcher {
|
||||
static Matcher reg(Register reg);
|
||||
static inline Matcher s6() { return Matcher::reg(Register(Reg::GPR, Reg::S6)); }
|
||||
static Matcher op(const GenericOpMatcher& op, const std::vector<Matcher>& args);
|
||||
static Matcher func(const Matcher& match, const std::vector<Matcher>& args);
|
||||
static Matcher func(const std::string& name, const std::vector<Matcher>& args);
|
||||
static Matcher op_fixed(FixedOperatorKind op, const std::vector<Matcher>& args);
|
||||
static Matcher op_with_rest(const GenericOpMatcher& op, const std::vector<Matcher>& args);
|
||||
static Matcher func_with_rest(const Matcher& match, const std::vector<Matcher>& args);
|
||||
static Matcher func_with_rest(const std::string& name, const std::vector<Matcher>& args);
|
||||
static Matcher set(const Matcher& dst, const Matcher& src); // form-form
|
||||
static Matcher set_var(const Matcher& src, int dst_match_id); // var-form
|
||||
static Matcher fixed_op(FixedOperatorKind op, const std::vector<Matcher>& args);
|
||||
static Matcher match_or(const std::vector<Matcher>& args);
|
||||
static Matcher cast(const std::string& type, Matcher value);
|
||||
static Matcher any(int match_id = -1);
|
||||
static Matcher integer(std::optional<int> value);
|
||||
static Matcher any_integer(int match_id = -1);
|
||||
static Matcher single(std::optional<float> value);
|
||||
static Matcher any_reg_cast_to_int_or_uint(int match_id = -1);
|
||||
static Matcher any_quoted_symbol(int match_id = -1);
|
||||
static Matcher any_symbol(int match_id = -1);
|
||||
@@ -73,6 +77,7 @@ class Matcher {
|
||||
ANY,
|
||||
INT,
|
||||
ANY_INT,
|
||||
FLOAT,
|
||||
ANY_QUOTED_SYMBOL,
|
||||
ANY_SYMBOL,
|
||||
DEREF_OP,
|
||||
@@ -105,6 +110,7 @@ class Matcher {
|
||||
int m_label_out_id = -1;
|
||||
int m_int_out_id = -1;
|
||||
std::optional<int> m_int_match;
|
||||
std::optional<float> m_float_match;
|
||||
std::optional<Register> m_reg;
|
||||
std::string m_str;
|
||||
};
|
||||
|
||||
@@ -547,8 +547,7 @@ FormElement* BitfieldAccessElement::push_step(const BitfieldManip step,
|
||||
|
||||
BitFieldDef def;
|
||||
def.field_name = field->name();
|
||||
def.value = pool.alloc_single_element_form<SimpleAtomElement>(
|
||||
nullptr, SimpleAtom::make_int_constant(set_value));
|
||||
def.value = pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(set_value));
|
||||
return pool.alloc_element<ModifiedCopyBitfieldElement>(m_type, m_base, m_got_pcpyud,
|
||||
std::vector<BitFieldDef>{def});
|
||||
}
|
||||
@@ -580,8 +579,7 @@ FormElement* BitfieldAccessElement::push_step(const BitfieldManip step,
|
||||
|
||||
BitFieldDef def;
|
||||
def.field_name = field->name();
|
||||
def.value = pool.alloc_single_element_form<SimpleAtomElement>(
|
||||
nullptr, SimpleAtom::make_int_constant(set_value));
|
||||
def.value = pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(set_value));
|
||||
return pool.alloc_element<ModifiedCopyBitfieldElement>(m_type, m_base, m_got_pcpyud,
|
||||
std::vector<BitFieldDef>{def});
|
||||
}
|
||||
@@ -711,14 +709,11 @@ BitFieldDef BitFieldDef::from_constant(const BitFieldConstantDef& constant, Form
|
||||
for (auto& x : constant.nested_field->fields) {
|
||||
defs.push_back(BitFieldDef::from_constant(x, pool));
|
||||
}
|
||||
bfd.value = pool.alloc_single_element_form<BitfieldStaticDefElement>(
|
||||
nullptr, constant.nested_field->field_type, defs);
|
||||
bfd.value = pool.form<BitfieldStaticDefElement>(constant.nested_field->field_type, defs);
|
||||
} else if (constant.enum_constant) {
|
||||
bfd.value =
|
||||
pool.alloc_single_element_form<ConstantTokenElement>(nullptr, *constant.enum_constant);
|
||||
bfd.value = pool.form<ConstantTokenElement>(*constant.enum_constant);
|
||||
} else {
|
||||
bfd.value = pool.alloc_single_element_form<SimpleAtomElement>(
|
||||
nullptr, SimpleAtom::make_int_constant(constant.value));
|
||||
bfd.value = pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(constant.value));
|
||||
}
|
||||
|
||||
return bfd;
|
||||
@@ -758,8 +753,7 @@ Form* cast_sound_name(FormPool& pool, const Env& env, Form* in) {
|
||||
}
|
||||
}
|
||||
|
||||
return pool.alloc_single_element_form<ConstantTokenElement>(
|
||||
nullptr, fmt::format("(static-sound-name \"{}\")", name));
|
||||
return pool.form<ConstantTokenElement>(fmt::format("(static-sound-name \"{}\")", name));
|
||||
}
|
||||
|
||||
std::optional<std::vector<BitFieldDef>> get_field_defs_from_expr(const BitFieldType* type_info,
|
||||
@@ -821,8 +815,7 @@ std::optional<std::vector<BitFieldDef>> get_field_defs_from_expr(const BitFieldT
|
||||
float value_f;
|
||||
u32 value_i = *integer;
|
||||
memcpy(&value_f, &value_i, 4);
|
||||
maybe_field->value =
|
||||
pool.alloc_single_element_form<ConstantFloatElement>(nullptr, value_f);
|
||||
maybe_field->value = pool.form<ConstantFloatElement>(value_f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -859,7 +852,7 @@ Form* cast_to_bitfield(const BitFieldType* type_info,
|
||||
return as_sound_name;
|
||||
}
|
||||
// just do a normal cast if that failed.
|
||||
return pool.alloc_single_element_form<CastElement>(nullptr, typespec, in);
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
}
|
||||
|
||||
// check if it's just a constant:
|
||||
@@ -869,17 +862,16 @@ Form* cast_to_bitfield(const BitFieldType* type_info,
|
||||
auto fields =
|
||||
try_decompile_bitfield_from_int(typespec, env.dts->ts, in_as_atom->get_int(), false, {});
|
||||
if (!fields) {
|
||||
return pool.alloc_single_element_form<CastElement>(nullptr, typespec, in);
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
}
|
||||
return pool.alloc_single_element_form<BitfieldStaticDefElement>(nullptr, typespec, *fields,
|
||||
pool);
|
||||
return pool.form<BitfieldStaticDefElement>(typespec, *fields, pool);
|
||||
}
|
||||
|
||||
bool bitfield_128 = type_info->get_size_in_memory() == 16;
|
||||
if (bitfield_128) {
|
||||
auto in_no_cast = strip_int_or_uint_cast(in);
|
||||
auto pcpyld_matcher =
|
||||
Matcher::fixed_op(FixedOperatorKind::PCPYLD, {Matcher::any(0), Matcher::any(1)});
|
||||
Matcher::op_fixed(FixedOperatorKind::PCPYLD, {Matcher::any(0), Matcher::any(1)});
|
||||
auto mr = match(pcpyld_matcher, in_no_cast);
|
||||
if (mr.matched) {
|
||||
auto upper = mr.maps.forms.at(0);
|
||||
@@ -890,22 +882,20 @@ Form* cast_to_bitfield(const BitFieldType* type_info,
|
||||
|
||||
if (upper_defs && lower_defs) {
|
||||
lower_defs->insert(lower_defs->end(), upper_defs->begin(), upper_defs->end());
|
||||
return pool.alloc_single_element_form<BitfieldStaticDefElement>(nullptr, typespec,
|
||||
*lower_defs);
|
||||
return pool.form<BitfieldStaticDefElement>(typespec, *lower_defs);
|
||||
}
|
||||
}
|
||||
return pool.alloc_single_element_form<CastElement>(nullptr, typespec, in);
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
} else {
|
||||
// dynamic bitfield def
|
||||
auto field_defs = get_field_defs_from_expr(type_info, in, typespec, pool, env, {});
|
||||
if (field_defs) {
|
||||
return pool.alloc_single_element_form<BitfieldStaticDefElement>(nullptr, typespec,
|
||||
*field_defs);
|
||||
return pool.form<BitfieldStaticDefElement>(typespec, *field_defs);
|
||||
}
|
||||
}
|
||||
|
||||
// all failed, just return whatever.
|
||||
return pool.alloc_single_element_form<CastElement>(nullptr, typespec, in);
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
}
|
||||
|
||||
Form* cast_to_bitfield_enum(const EnumType* type_info,
|
||||
@@ -919,7 +909,7 @@ Form* cast_to_bitfield_enum(const EnumType* type_info,
|
||||
return cast_to_bitfield_enum(type_info, pool, env, *integer);
|
||||
} else {
|
||||
// all failed, just return whatever.
|
||||
return pool.alloc_single_element_form<CastElement>(nullptr, typespec, in);
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,29 +924,39 @@ Form* cast_to_int_enum(const EnumType* type_info,
|
||||
return cast_to_int_enum(type_info, pool, env, *integer);
|
||||
} else {
|
||||
// all failed, just return whatever.
|
||||
return pool.alloc_single_element_form<CastElement>(nullptr, typespec, in);
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
}
|
||||
}
|
||||
|
||||
Form* cast_to_int_enum(const EnumType* type_info, FormPool& pool, const Env& env, s64 in) {
|
||||
ASSERT(!type_info->is_bitfield());
|
||||
auto entry = decompile_int_enum_from_int(TypeSpec(type_info->get_name()), env.dts->ts, in);
|
||||
auto oper = GenericOperator::make_function(
|
||||
pool.alloc_single_element_form<ConstantTokenElement>(nullptr, type_info->get_name()));
|
||||
return pool.alloc_single_element_form<GenericElement>(
|
||||
nullptr, oper, pool.alloc_single_element_form<ConstantTokenElement>(nullptr, entry));
|
||||
auto oper =
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>(type_info->get_name()));
|
||||
return pool.form<GenericElement>(oper, pool.form<ConstantTokenElement>(entry));
|
||||
}
|
||||
|
||||
Form* cast_to_bitfield_enum(const EnumType* type_info, FormPool& pool, const Env& env, s64 in) {
|
||||
Form* cast_to_bitfield_enum(const EnumType* type_info,
|
||||
FormPool& pool,
|
||||
const Env& env,
|
||||
s64 in,
|
||||
bool no_head) {
|
||||
ASSERT(type_info->is_bitfield());
|
||||
auto elts = decompile_bitfield_enum_from_int(TypeSpec(type_info->get_name()), env.dts->ts, in);
|
||||
if (no_head) {
|
||||
ASSERT(elts.size() >= 1);
|
||||
}
|
||||
auto oper = GenericOperator::make_function(
|
||||
pool.alloc_single_element_form<ConstantTokenElement>(nullptr, type_info->get_name()));
|
||||
pool.form<ConstantTokenElement>(no_head ? elts.at(0) : type_info->get_name()));
|
||||
if (no_head) {
|
||||
elts.erase(elts.begin());
|
||||
}
|
||||
|
||||
std::vector<Form*> form_elts;
|
||||
for (auto& x : elts) {
|
||||
form_elts.push_back(pool.alloc_single_element_form<ConstantTokenElement>(nullptr, x));
|
||||
form_elts.push_back(pool.form<ConstantTokenElement>(x));
|
||||
}
|
||||
return pool.alloc_single_element_form<GenericElement>(nullptr, oper, form_elts);
|
||||
return pool.form<GenericElement>(oper, form_elts);
|
||||
}
|
||||
|
||||
} // namespace decompiler
|
||||
|
||||
@@ -203,7 +203,11 @@ Form* cast_to_int_enum(const EnumType* type_info,
|
||||
Form* in);
|
||||
|
||||
Form* cast_to_int_enum(const EnumType* type_info, FormPool& pool, const Env& env, s64 in);
|
||||
Form* cast_to_bitfield_enum(const EnumType* type_info, FormPool& pool, const Env& env, s64 in);
|
||||
Form* cast_to_bitfield_enum(const EnumType* type_info,
|
||||
FormPool& pool,
|
||||
const Env& env,
|
||||
s64 in,
|
||||
bool no_head = false);
|
||||
|
||||
std::optional<u64> get_goal_integer_constant(Form* in, const Env&);
|
||||
|
||||
|
||||
@@ -62,10 +62,79 @@ struct LetRewriteStats {
|
||||
int set_vector = 0;
|
||||
int set_vector2 = 0;
|
||||
int send_event = 0;
|
||||
int font_context_meth = 0;
|
||||
int proc_new = 0;
|
||||
int attack_info = 0;
|
||||
int vector_dot = 0;
|
||||
int rand_float_gen = 0;
|
||||
|
||||
int total() const {
|
||||
return dotimes + countdown + abs + abs2 + unused + ja + case_no_else + case_with_else +
|
||||
set_vector + set_vector2 + send_event;
|
||||
set_vector + set_vector2 + send_event + font_context_meth + proc_new + attack_info +
|
||||
vector_dot + rand_float_gen;
|
||||
}
|
||||
|
||||
std::string print() const {
|
||||
std::string out;
|
||||
out += fmt::format("LET REWRITE STATS: {} total\n", total());
|
||||
out += fmt::format(" dotimes: {}\n", dotimes);
|
||||
out += fmt::format(" countdown: {}\n", countdown);
|
||||
out += fmt::format(" abs: {}\n", abs);
|
||||
out += fmt::format(" abs2: {}\n", abs2);
|
||||
out += fmt::format(" ja: {}\n", ja);
|
||||
out += fmt::format(" set_vector: {}\n", set_vector);
|
||||
out += fmt::format(" set_vector2: {}\n", set_vector2);
|
||||
out += fmt::format(" case_no_else: {}\n", case_no_else);
|
||||
out += fmt::format(" case_with_else: {}\n", case_with_else);
|
||||
out += fmt::format(" unused: {}\n", unused);
|
||||
out += fmt::format(" send_event: {}\n", send_event);
|
||||
// out += fmt::format(" font_context_meth: {}\n", font_context_meth);
|
||||
out += fmt::format(" proc_new: {}\n", proc_new);
|
||||
out += fmt::format(" attack_info: {}\n", attack_info);
|
||||
out += fmt::format(" vector_dot: {}\n", vector_dot);
|
||||
out += fmt::format(" rand_float_gen: {}\n", rand_float_gen);
|
||||
return out;
|
||||
}
|
||||
|
||||
LetRewriteStats operator+(const LetRewriteStats& other) {
|
||||
LetRewriteStats result;
|
||||
result.dotimes = dotimes + other.dotimes;
|
||||
result.countdown = countdown + other.countdown;
|
||||
result.abs = abs + other.abs;
|
||||
result.abs2 = abs2 + other.abs2;
|
||||
result.ja = ja + other.ja;
|
||||
result.set_vector = set_vector + other.set_vector;
|
||||
result.set_vector2 = set_vector2 + other.set_vector2;
|
||||
result.case_no_else = case_no_else + other.case_no_else;
|
||||
result.case_with_else = case_with_else + other.case_with_else;
|
||||
result.unused = unused + other.unused;
|
||||
result.send_event = send_event + other.send_event;
|
||||
result.font_context_meth = font_context_meth + other.font_context_meth;
|
||||
result.proc_new = proc_new + other.proc_new;
|
||||
result.attack_info = attack_info + other.attack_info;
|
||||
result.vector_dot = vector_dot + other.vector_dot;
|
||||
result.rand_float_gen = rand_float_gen + other.rand_float_gen;
|
||||
return result;
|
||||
}
|
||||
|
||||
LetRewriteStats& operator+=(const LetRewriteStats& other) {
|
||||
dotimes += other.dotimes;
|
||||
countdown += other.countdown;
|
||||
abs += other.abs;
|
||||
abs2 += other.abs2;
|
||||
ja += other.ja;
|
||||
set_vector += other.set_vector;
|
||||
set_vector2 += other.set_vector2;
|
||||
case_no_else += other.case_no_else;
|
||||
case_with_else += other.case_with_else;
|
||||
unused += other.unused;
|
||||
send_event += other.send_event;
|
||||
font_context_meth += other.font_context_meth;
|
||||
proc_new += other.proc_new;
|
||||
attack_info += other.attack_info;
|
||||
vector_dot += other.vector_dot;
|
||||
rand_float_gen += other.rand_float_gen;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -106,19 +106,7 @@ void ObjectFileDB::analyze_functions_ir2(
|
||||
fmt::print("Done in {:.2f}ms\n", file_timer.getMs());
|
||||
});
|
||||
|
||||
int total = stats.let.total();
|
||||
lg::info("LET REWRITE STATS: {} total", total);
|
||||
lg::info(" dotimes: {}", stats.let.dotimes);
|
||||
lg::info(" countdown: {}", stats.let.countdown);
|
||||
lg::info(" abs: {}", stats.let.abs);
|
||||
lg::info(" abs2: {}", stats.let.abs2);
|
||||
lg::info(" ja: {}", stats.let.ja);
|
||||
lg::info(" set_vector: {}", stats.let.set_vector);
|
||||
lg::info(" set_vector2: {}", stats.let.set_vector2);
|
||||
lg::info(" case_no_else: {}", stats.let.case_no_else);
|
||||
lg::info(" case_with_else: {}", stats.let.case_with_else);
|
||||
lg::info(" unused: {}", stats.let.unused);
|
||||
lg::info(" send_event: {}", stats.let.send_event);
|
||||
lg::info("{}", stats.let.print());
|
||||
|
||||
if (config.generate_symbol_definition_map) {
|
||||
lg::info("Generating symbol definition map...");
|
||||
|
||||
+695
-130
File diff suppressed because it is too large
Load Diff
@@ -1323,6 +1323,8 @@
|
||||
(ps2-options #x1020)
|
||||
(ps2-load-speed #x1021)
|
||||
(ps2-parts #x1022)
|
||||
(music-fadeout #x1023)
|
||||
(music-fadein #x1024)
|
||||
(discord-rpc #x1030)
|
||||
(display-mode #x1031)
|
||||
(windowed #x1032)
|
||||
@@ -10740,13 +10742,32 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defenum attack-mask
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(trans)
|
||||
(vector)
|
||||
(intersection)
|
||||
(attacker)
|
||||
(invinc-time)
|
||||
(mode)
|
||||
(shove-back)
|
||||
(shove-up)
|
||||
(speed)
|
||||
(dist)
|
||||
(control)
|
||||
(angle)
|
||||
(rotate-to)
|
||||
(atki13)
|
||||
)
|
||||
|
||||
(deftype attack-info (structure)
|
||||
((trans vector :inline :offset-assert 0)
|
||||
(vector vector :inline :offset-assert 16)
|
||||
(intersection vector :inline :offset-assert 32)
|
||||
(attacker handle :offset-assert 48)
|
||||
(invinc-time time-frame :offset-assert 56)
|
||||
(mask uint32 :offset-assert 64)
|
||||
(invinc-time time-frame :offset-assert 56)
|
||||
(mask attack-mask :offset-assert 64)
|
||||
(mode symbol :offset-assert 68)
|
||||
(shove-back meters :offset-assert 72)
|
||||
(shove-up meters :offset-assert 76)
|
||||
@@ -10760,7 +10781,6 @@
|
||||
:method-count-assert 10
|
||||
:size-assert #x68
|
||||
:flag-assert #xa00000068
|
||||
;; field handle is likely a value type
|
||||
(:methods
|
||||
(combine! (_type_ attack-info) none 9)
|
||||
)
|
||||
@@ -26451,7 +26471,7 @@
|
||||
(define-extern robotboss-yellow-eco-off (function entity-perm-status :behavior robotboss))
|
||||
(define-extern robotboss-greenshot (function vector float int symbol none :behavior robotboss))
|
||||
(define-extern robotboss-handler (function process int symbol event-message-block object :behavior robotboss))
|
||||
(define-extern robotboss-darkecobomb (function vector float (pointer process) :behavior robotboss))
|
||||
(define-extern robotboss-darkecobomb (function vector float (pointer part-tracker) :behavior robotboss))
|
||||
(define-extern robotboss-is-red-hit (function symbol :behavior robotboss))
|
||||
(define-extern robotboss-redshot-fill-array (function redshot-launch-array none :behavior robotboss))
|
||||
(define-extern robotboss-redshot (function redshot-launch-info symbol sound-id :behavior robotboss)) ;; run-func-in-process edge-case
|
||||
@@ -28874,8 +28894,8 @@
|
||||
;; - Functions
|
||||
|
||||
(define-extern keg-conveyor-paddle-init-by-other (function keg-conveyor-paddle none :behavior keg-conveyor-paddle))
|
||||
(define-extern keg-conveyor-spawn-keg (function keg-conveyor (pointer process))) ;; VERY likely a keg
|
||||
(define-extern keg-conveyor-spawn-bouncing-keg (function keg-conveyor (pointer process))) ;; VERY likely a keg
|
||||
(define-extern keg-conveyor-spawn-keg (function keg-conveyor (pointer keg)))
|
||||
(define-extern keg-conveyor-spawn-bouncing-keg (function keg-conveyor (pointer keg)))
|
||||
(define-extern keg-init-by-other (function keg int none :behavior keg))
|
||||
(define-extern keg-bounce-set-particle-rotation-callback (function part-tracker none))
|
||||
(define-extern keg-update-smush (function keg float none))
|
||||
@@ -29060,7 +29080,7 @@
|
||||
;; - Functions
|
||||
|
||||
(define-extern orient-to-face-target (function quaternion :behavior quicksandlurker))
|
||||
(define-extern quicksandlurker-spit (function (pointer process) :behavior quicksandlurker))
|
||||
(define-extern quicksandlurker-spit (function (pointer part-tracker) :behavior quicksandlurker))
|
||||
(define-extern spawn-quicksandlurker-missile (function process vector vector entity none))
|
||||
(define-extern quicksandlurker-check-hide-transition (function none :behavior quicksandlurker))
|
||||
(define-extern inc-angle (function (pointer float) float float))
|
||||
@@ -30241,7 +30261,7 @@
|
||||
;; - Functions
|
||||
|
||||
(define-extern swamp-rat-nest-check-dummy (function none :behavior swamp-rat-nest))
|
||||
(define-extern swamp-rat-nest-spawn-rat (function (pointer process) :behavior swamp-rat-nest)) ;; this needs a t2 symbol arg to pass to swamp-rat-init-from-other...but
|
||||
(define-extern swamp-rat-nest-spawn-rat (function (pointer swamp-rat) :behavior swamp-rat-nest)) ;; this needs a t2 symbol arg to pass to swamp-rat-init-from-other...but
|
||||
(define-extern swamp-rat-nest-dummy-init-by-other (function swamp-rat-nest-dummy none :behavior swamp-rat-nest-dummy))
|
||||
(define-extern swamp-rat-nest-pick-spawn-joint (function int :behavior swamp-rat-nest))
|
||||
(define-extern swamp-rat-nest-dummy-take-damage (function int none :behavior swamp-rat-nest-dummy))
|
||||
|
||||
@@ -157,7 +157,15 @@
|
||||
["L276", "vector"],
|
||||
["L277", "vector"],
|
||||
["L278", "vector"],
|
||||
["L279", "vector"]
|
||||
["L279", "vector"],
|
||||
["L280", "(array float)"],
|
||||
["L281", "(array float)"],
|
||||
["L282", "(array float)"],
|
||||
["L283", "(array float)"],
|
||||
["L284", "(array float)"],
|
||||
["L285", "(array float)"],
|
||||
["L286", "(array float)"],
|
||||
["L287", "(array float)"]
|
||||
],
|
||||
|
||||
"mood-tables": [
|
||||
|
||||
@@ -825,49 +825,49 @@
|
||||
],
|
||||
"(top-level-login task-control)": [[165, "v1", "symbol"]],
|
||||
"(anon-function 227 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 286 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 366 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 367 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 368 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 369 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 380 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 383 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 390 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 393 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 400 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 403 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 435 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 445 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(anon-function 455 task-control)": [
|
||||
[[14, 16], "t9", "(function process event-message-block float)"]
|
||||
[17, "v1", "float"]
|
||||
],
|
||||
"(method 18 game-info)": [
|
||||
[4, "v1", "symbol"],
|
||||
|
||||
@@ -1368,14 +1368,15 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
int array_allocated_length = size_word_2.data;
|
||||
|
||||
auto content_type_info = ts.lookup_type(content_type);
|
||||
auto params_obj = array_length == array_allocated_length
|
||||
? pretty_print::to_symbol(fmt::format("new 'static 'boxed-array :type {}",
|
||||
content_type.print()))
|
||||
: pretty_print::to_symbol(fmt::format(
|
||||
"new 'static 'boxed-array :type {} :length {} :allocated-length {}",
|
||||
content_type.print(), array_length, array_allocated_length));
|
||||
if (content_type_info->is_reference() || content_type == TypeSpec("object")) {
|
||||
// easy, stride of 4.
|
||||
std::vector<goos::Object> result = {
|
||||
pretty_print::to_symbol("new"), pretty_print::to_symbol("'static"),
|
||||
pretty_print::to_symbol("'boxed-array"),
|
||||
pretty_print::to_symbol(fmt::format(":type {} :length {} :allocated-length {}",
|
||||
content_type.print(), array_length,
|
||||
array_allocated_length))};
|
||||
std::vector<goos::Object> result = {params_obj};
|
||||
|
||||
for (int elt = 0; elt < array_length; elt++) {
|
||||
auto& word = words.at(label.target_segment).at(first_elt_word_idx + elt);
|
||||
@@ -1406,12 +1407,7 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
|
||||
return pretty_print::build_list(result);
|
||||
} else if (content_type.base_type() == "inline-array") {
|
||||
std::vector<goos::Object> result = {
|
||||
pretty_print::to_symbol("new"), pretty_print::to_symbol("'static"),
|
||||
pretty_print::to_symbol("'boxed-array"),
|
||||
pretty_print::to_symbol(fmt::format(":type {} :length {} :allocated-length {}",
|
||||
content_type.print(), array_length,
|
||||
array_allocated_length))};
|
||||
std::vector<goos::Object> result = {params_obj};
|
||||
|
||||
for (int elt = 0; elt < array_length; elt++) {
|
||||
auto& word = words.at(label.target_segment).at(first_elt_word_idx + elt);
|
||||
@@ -1424,12 +1420,7 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
return pretty_print::build_list(result);
|
||||
} else {
|
||||
// value array
|
||||
std::vector<goos::Object> result = {
|
||||
pretty_print::to_symbol("new"), pretty_print::to_symbol("'static"),
|
||||
pretty_print::to_symbol("'boxed-array"),
|
||||
pretty_print::to_symbol(fmt::format(":type {} :length {} :allocated-length {}",
|
||||
content_type.print(), array_length,
|
||||
array_allocated_length))};
|
||||
std::vector<goos::Object> result = {params_obj};
|
||||
|
||||
auto stride = content_type_info->get_size_in_memory();
|
||||
for (int i = 0; i < array_length; i++) {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
(jak1-v1 "assets/game_text.txt") ;; this is the decompiler-generated file!
|
||||
;; add custom files down here
|
||||
(jak1-v1 "game/assets/jak1/text/game_text_en.gs")
|
||||
(jak1-v1 "game/assets/jak1/text/game_text_ja.gs")
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
(#x1022 "PARTICLE CULLING"
|
||||
"PARTICLE CULLING")
|
||||
|
||||
(#x1023 "MUSIC FADE-OUT"
|
||||
"MUSIC FADE-OUT")
|
||||
(#x1024 "MUSIC FADE-IN"
|
||||
"MUSIC FADE-IN")
|
||||
|
||||
(#x1030 "DISCORD RICH-PRESENCE"
|
||||
"DISCORD RICH-PRESENCE")
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
(group-name "common")
|
||||
(language-id 5)
|
||||
|
||||
;; -----------------
|
||||
;; fixes
|
||||
|
||||
; 闇の眷者 ゴルとマイアの城
|
||||
(#x122 "闇の賢者 ゴルとマイアの城")
|
||||
(#x801 "闇の賢者 ゴルとマイアの城")
|
||||
|
||||
;; -----------------
|
||||
;; progress menu (insanity)
|
||||
|
||||
(#x1078 "じまく")
|
||||
(#x1079 "ヒントじまく")
|
||||
(#x107a "じまくのことば")
|
||||
|
||||
(#x107f "ヒントロッグ")
|
||||
(#x1080 "チート")
|
||||
|
||||
(#x1082 "レベルをセレクトください")
|
||||
(#x1083 "へんかをセレクトください")
|
||||
(#x1084 "ラスボス")
|
||||
(#x1085 "スタッフロール")
|
||||
(#x1086 "ロック")
|
||||
(#x1087 "ハイブリッドラーカー クロウ")
|
||||
(#x1088 "サカナとりゲームのテーマ")
|
||||
(#x1089 "チャレンジーのテーマ")
|
||||
|
||||
(#x1090 "無限の青のエコ")
|
||||
(#x1091 "無限の赤のエコ")
|
||||
(#x1092 "無限の緑のエコ")
|
||||
(#x1093 "無限の黄のエコ")
|
||||
(#x1094 "へんかのダックスター")
|
||||
(#x1095 "インヴィンシブル")
|
||||
(#x1096 "全てBGMへんかを エネーブルする")
|
||||
|
||||
(#x10c0 "BGMプレイヤー")
|
||||
|
||||
(#x10d0 "デフォールト")
|
||||
(#x10d1 "みしよう")
|
||||
(#x10d2 "セイジィ")
|
||||
(#x10d3 "セイジィの家")
|
||||
|
||||
(#x10df "みしよう")
|
||||
|
||||
(#x10e3 "みしよう1")
|
||||
|
||||
(#x10e5 "みしよう2")
|
||||
|
||||
(#x10e7 "フラフラ鳥")
|
||||
(#x10e8 "みしよう")
|
||||
|
||||
(#x10ed "みしよう1")
|
||||
|
||||
(#x10ef "みしよう2")
|
||||
|
||||
(#x10f3 "ヤミノ洞くつへ")
|
||||
(#x10f4 "ガイセツ山へ")
|
||||
(#x10f5 "宝石堀りたち")
|
||||
|
||||
(#x10f8 "メイン洞くつ")
|
||||
(#x10f9 "くろい洞くつ")
|
||||
(#x10fa "みしよう")
|
||||
(#x10fb "かくされた洞くつ")
|
||||
(#x10fc "ラーカーのとりで")
|
||||
(#x10fd "ゆきだま")
|
||||
(#x10fe "マグマチューブの中かん")
|
||||
(#x10ff "マグマチューブのさいしゅうかい")
|
||||
(#x1100 "黄の賢者")
|
||||
(#x1101 "赤の賢者")
|
||||
(#x1102 "青の賢者")
|
||||
(#x1103 "城のハブ")
|
||||
(#x1104 "ラスボスの中かん")
|
||||
(#x1105 "ラスボスのさいしゅうかい")
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "kscheme.h"
|
||||
#include "kdgo.h"
|
||||
#include "game/sound/989snd/ame_handler.h"
|
||||
#include "game/overlord/srpc.h"
|
||||
#include "common/common_types.h"
|
||||
|
||||
/*!
|
||||
@@ -21,12 +22,16 @@ void InitSound() {}
|
||||
void ShutdownSound() {}
|
||||
|
||||
/*!
|
||||
* PC port function
|
||||
* PC port functions
|
||||
*/
|
||||
void set_flava_hack(u64 val) {
|
||||
snd::SoundFlavaHack = val;
|
||||
}
|
||||
|
||||
void set_fade_hack(u64 val) {
|
||||
gMusicFadeHack = val;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Set up some functions which are somewhat related to sound.
|
||||
*/
|
||||
@@ -35,5 +40,8 @@ void InitSoundScheme() {
|
||||
make_function_symbol_from_c("rpc-busy?", (void*)RpcBusy);
|
||||
make_function_symbol_from_c("test-load-dgo-c", (void*)LoadDGOTest);
|
||||
make_stack_arg_function_symbol_from_c("rpc-call", (void*)RpcCall_wrapper);
|
||||
|
||||
// PC port interns
|
||||
make_function_symbol_from_c("pc-sound-set-flava-hack", (void*)set_flava_hack);
|
||||
make_function_symbol_from_c("pc-sound-set-fade-hack", (void*)set_fade_hack);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,9 @@ s32 gMusicPause = 0;
|
||||
u32 gFreeMem = 0;
|
||||
u32 gFrameNum = 0;
|
||||
|
||||
// added
|
||||
u32 gMusicFadeHack = 0;
|
||||
|
||||
static SoundIopInfo info;
|
||||
|
||||
s32 gVAG_Id = 0; // TODO probably doesn't belong here.
|
||||
@@ -432,14 +435,14 @@ s32 VBlank_Handler() {
|
||||
return 1;
|
||||
|
||||
if (gMusicFadeDir > 0) {
|
||||
gMusicFade += 1024;
|
||||
if (gMusicFade > 0x10000) {
|
||||
gMusicFade += (0x10000 / 64);
|
||||
if (gMusicFade > 0x10000 || (gMusicFadeHack & 1)) {
|
||||
gMusicFade = 0x10000;
|
||||
gMusicFadeDir = 0;
|
||||
}
|
||||
} else if (gMusicFadeDir < 0) {
|
||||
gMusicFade -= 512;
|
||||
if (gMusicFade < 0) {
|
||||
gMusicFade -= (0x10000 / 128);
|
||||
if (gMusicFade < 0 || (gMusicFadeHack & 2)) {
|
||||
gMusicFade = 0;
|
||||
gMusicFadeDir = 0;
|
||||
}
|
||||
|
||||
@@ -170,3 +170,6 @@ u32 Thread_Loader();
|
||||
u32 Thread_Player();
|
||||
|
||||
s32 VBlank_Handler();
|
||||
|
||||
// added for PC port
|
||||
extern u32 gMusicFadeHack;
|
||||
|
||||
@@ -43,6 +43,8 @@ u32 loader::read_music_bank(SoundBankData* data) {
|
||||
bank->bank_name = data->BankID;
|
||||
m_soundbanks.emplace(handle, std::move(bank));
|
||||
|
||||
fmt::print("Loaded music bank {:.4}\n", (char*)&data->BankID);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@@ -176,6 +178,7 @@ void loader::load_samples(u32 bank_id, std::unique_ptr<u8[]> samples) {
|
||||
}
|
||||
|
||||
void loader::unload_bank(u32 id) {
|
||||
fmt::print("Deleting bank {}\n", id);
|
||||
for (auto it = m_midi_chunks.begin(); it != m_midi_chunks.end();) {
|
||||
bool del = false;
|
||||
// FIXME delete midi
|
||||
|
||||
@@ -259,15 +259,7 @@
|
||||
(let ((s3-1 (level-hint-task-process arg2 (the-as uint128 arg0) arg1)))
|
||||
(when (!= s3-1 -1)
|
||||
(kill-current-level-hint '() '() 'exit)
|
||||
(let ((s2-0 (get-process *default-dead-pool* level-hint #x4000)))
|
||||
(when s2-0
|
||||
(let ((t9-4 (method-of-type level-hint activate)))
|
||||
(t9-4 (the-as level-hint s2-0) arg3 'level-hint (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s2-0 level-hint-init-by-other s3-1 arg1 arg2)
|
||||
(-> s2-0 ppointer)
|
||||
)
|
||||
)
|
||||
(process-spawn level-hint s3-1 arg1 arg2 :to arg3)
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -281,15 +273,7 @@
|
||||
)
|
||||
)
|
||||
(the-as object (and (not *hint-semaphore*)
|
||||
(let ((s2-0 (get-process *default-dead-pool* level-hint #x4000)))
|
||||
(when s2-0
|
||||
(let ((t9-2 (method-of-type level-hint activate)))
|
||||
(t9-2 (the-as level-hint s2-0) arg2 'level-hint (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s2-0 ambient-hint-init-by-other arg0 arg1 arg3)
|
||||
(-> s2-0 ppointer)
|
||||
)
|
||||
)
|
||||
(process-spawn level-hint :init ambient-hint-init-by-other arg0 arg1 arg3 :to arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -407,8 +391,7 @@
|
||||
)
|
||||
|
||||
(defstate level-hint-normal (level-hint)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'exit)
|
||||
@@ -421,15 +404,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(if (= (ppointer->process *hint-semaphore*) self)
|
||||
(set! *hint-semaphore* (the-as (pointer level-hint) #f))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((= (-> self text-id-to-display) (game-text-id zero))
|
||||
(if *debug-segment*
|
||||
@@ -469,8 +450,7 @@
|
||||
)
|
||||
|
||||
(defstate level-hint-sidekick (level-hint)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'exit)
|
||||
@@ -488,9 +468,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(#when PC_PORT (set! *level-hint-spool-name* (the string #f)))
|
||||
:exit (behavior ()
|
||||
(#when PC_PORT (set! *level-hint-spool-name* #f))
|
||||
(if (nonzero? (-> self sound-id))
|
||||
(sound-stop (-> self sound-id))
|
||||
)
|
||||
@@ -503,8 +482,7 @@
|
||||
(send-event (handle->process (-> self voicebox)) 'die)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 string))
|
||||
:code (behavior ((arg0 string))
|
||||
(#when PC_PORT (set! *level-hint-spool-name* arg0))
|
||||
(when (and (-> *setting-control* current play-hints) (< 0.0 (-> *setting-control* current dialog-volume)))
|
||||
(case (-> self mode)
|
||||
@@ -553,10 +531,8 @@
|
||||
)
|
||||
|
||||
(defstate level-hint-ambient-sound (level-hint)
|
||||
:event
|
||||
(-> level-hint-sidekick event)
|
||||
:exit
|
||||
(behavior ()
|
||||
:event (-> level-hint-sidekick event)
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self sound-id))
|
||||
(sound-stop (-> self sound-id))
|
||||
)
|
||||
@@ -567,8 +543,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 string))
|
||||
:code (behavior ((arg0 string))
|
||||
(while (not *sound-player-enable*)
|
||||
(suspend)
|
||||
)
|
||||
@@ -617,10 +592,8 @@
|
||||
)
|
||||
|
||||
(defstate level-hint-error (level-hint)
|
||||
:event
|
||||
(-> level-hint-normal event)
|
||||
:code
|
||||
(behavior ((arg0 string) (arg1 string))
|
||||
:event (-> level-hint-normal event)
|
||||
:code (behavior ((arg0 string) (arg1 string))
|
||||
(clear-pending-settings-from-process *setting-control* self 'hint)
|
||||
(let ((s4-0 (-> *display* base-frame-counter)))
|
||||
(until (>= (- (-> *display* base-frame-counter) s4-0) (seconds 1))
|
||||
@@ -651,8 +624,7 @@
|
||||
)
|
||||
|
||||
(defstate level-hint-exit (level-hint)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(if (= (ppointer->process *hint-semaphore*) self)
|
||||
(set! *hint-semaphore* (the-as (pointer level-hint) #f))
|
||||
)
|
||||
@@ -713,15 +685,7 @@
|
||||
)
|
||||
((!= s5-0 -1)
|
||||
(kill-current-level-hint '() '() 'exit)
|
||||
(let ((s4-0 (get-process *default-dead-pool* level-hint #x4000)))
|
||||
(when s4-0
|
||||
(let ((t9-8 (method-of-type level-hint activate)))
|
||||
(t9-8 (the-as level-hint s4-0) pp 'level-hint (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s4-0 level-hint-init-by-other s5-0 #f (-> arg0 ambient))
|
||||
(-> s4-0 ppointer)
|
||||
)
|
||||
)
|
||||
(process-spawn level-hint s5-0 #f (-> arg0 ambient) :to pp)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+515
-1030
File diff suppressed because it is too large
Load Diff
+53
-161
@@ -494,168 +494,62 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *flash0* (the-as (array float) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type float :length 13 :allocated-length 13
|
||||
1.0
|
||||
0.0
|
||||
0.5
|
||||
1.0
|
||||
0.5
|
||||
0.0
|
||||
0.5
|
||||
0.35
|
||||
0.4
|
||||
0.35
|
||||
0.25
|
||||
0.1
|
||||
0.04
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *flash1*
|
||||
(the-as (array float)
|
||||
(new 'static 'boxed-array :type float :length 9 :allocated-length 9 1.0 0.8 0.0 1.0 0.5 1.0 0.4 0.2 0.1)
|
||||
)
|
||||
(define *flash0*
|
||||
(new 'static 'boxed-array :type float 1.0 0.0 0.5 1.0 0.5 0.0 0.5 0.35 0.4 0.35 0.25 0.1 0.04)
|
||||
)
|
||||
|
||||
(define *flash2*
|
||||
(the-as (array float)
|
||||
(new 'static 'boxed-array :type float :length 10 :allocated-length 10 1.0 0.9 0.8 0.7 0.0 0.0 1.0 0.0 1.0 0.5)
|
||||
)
|
||||
(define *flash1* (new 'static 'boxed-array :type float 1.0 0.8 0.0 1.0 0.5 1.0 0.4 0.2 0.1))
|
||||
|
||||
(define *flash2* (new 'static 'boxed-array :type float 1.0 0.9 0.8 0.7 0.0 0.0 1.0 0.0 1.0 0.5))
|
||||
|
||||
(define *flash3* (new 'static 'boxed-array :type float 0.5 0.0 1.0 0.9 1.0 0.8 0.3 0.0 0.0 0.5 0.1 0.5 0.35))
|
||||
|
||||
(define *flash4*
|
||||
(new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1)
|
||||
)
|
||||
|
||||
(define *flash3* (the-as (array float) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type float :length 13 :allocated-length 13
|
||||
0.5
|
||||
0.0
|
||||
1.0
|
||||
0.9
|
||||
1.0
|
||||
0.8
|
||||
0.3
|
||||
0.0
|
||||
0.0
|
||||
0.5
|
||||
0.1
|
||||
0.5
|
||||
0.35
|
||||
)
|
||||
)
|
||||
(define *flash5* (new 'static 'boxed-array :type float
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.95
|
||||
0.9
|
||||
0.85
|
||||
0.8
|
||||
0.75
|
||||
0.7
|
||||
0.65
|
||||
0.6
|
||||
0.55
|
||||
0.5
|
||||
0.45
|
||||
0.4
|
||||
0.35
|
||||
0.3
|
||||
0.25
|
||||
0.2
|
||||
0.5
|
||||
0.45
|
||||
0.4
|
||||
0.35
|
||||
0.3
|
||||
0.25
|
||||
0.2
|
||||
0.15
|
||||
0.1
|
||||
0.05
|
||||
)
|
||||
)
|
||||
|
||||
(define *flash4* (the-as (array float) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type float :length 18 :allocated-length 18
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.9
|
||||
0.8
|
||||
0.7
|
||||
0.6
|
||||
0.5
|
||||
0.4
|
||||
0.3
|
||||
0.2
|
||||
0.5
|
||||
0.4
|
||||
0.3
|
||||
0.2
|
||||
0.1
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *flash6*
|
||||
(new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 0.5 0.0 0.5 0.35 0.0 0.0 1.0 0.0 0.2 0.1)
|
||||
)
|
||||
|
||||
(define *flash5* (the-as (array float) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type float :length 31 :allocated-length 31
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.95
|
||||
0.9
|
||||
0.85
|
||||
0.8
|
||||
0.75
|
||||
0.7
|
||||
0.65
|
||||
0.6
|
||||
0.55
|
||||
0.5
|
||||
0.45
|
||||
0.4
|
||||
0.35
|
||||
0.3
|
||||
0.25
|
||||
0.2
|
||||
0.5
|
||||
0.45
|
||||
0.4
|
||||
0.35
|
||||
0.3
|
||||
0.25
|
||||
0.2
|
||||
0.15
|
||||
0.1
|
||||
0.05
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *flash6* (the-as (array float) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type float :length 14 :allocated-length 14
|
||||
1.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
0.5
|
||||
0.0
|
||||
0.5
|
||||
0.35
|
||||
0.0
|
||||
0.0
|
||||
1.0
|
||||
0.0
|
||||
0.2
|
||||
0.1
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *flash7* (the-as (array float) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type float :length 14 :allocated-length 14
|
||||
1.0
|
||||
0.8
|
||||
0.3
|
||||
0.0
|
||||
0.6
|
||||
0.5
|
||||
0.4
|
||||
0.3
|
||||
0.2
|
||||
0.5
|
||||
0.4
|
||||
0.3
|
||||
0.2
|
||||
0.1
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *flash7*
|
||||
(new 'static 'boxed-array :type float 1.0 0.8 0.3 0.0 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1)
|
||||
)
|
||||
|
||||
(define *lightning-index* 0)
|
||||
|
||||
@@ -1721,16 +1615,14 @@
|
||||
|
||||
(define *rolling-spheres-light2*
|
||||
(new 'static 'light-ellipse
|
||||
:matrix
|
||||
(new 'static 'matrix :vector (new 'static 'inline-array vector 4
|
||||
:matrix (new 'static 'matrix :vector (new 'static 'inline-array vector 4
|
||||
(new 'static 'vector :x -581632.0 :y 114688.0 :z -6479872.0 :w 24576.0)
|
||||
(new 'static 'vector :x -737280.0 :y 110592.0 :z -7159808.0 :w 24576.0)
|
||||
(new 'static 'vector :x -733184.0 :y 110592.0 :z -7266304.0 :w 24576.0)
|
||||
(new 'static 'vector :x -1363968.0 :y 110592.0 :z -6578176.0 :w 24576.0)
|
||||
)
|
||||
)
|
||||
:color
|
||||
(new 'static 'rgbaf :x -1404928.0 :y 110592.0 :z -6541312.0 :w 24576.0)
|
||||
:color (new 'static 'rgbaf :x -1404928.0 :y 110592.0 :z -6541312.0 :w 24576.0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2554,8 +2446,8 @@
|
||||
(cond
|
||||
((or (logtest? (get-reminder (get-task-control (game-task finalboss-movies)) 0) 1) (not *time-of-day-effects*))
|
||||
(when (and *target* (= (-> *target* next-state name) 'target-continue))
|
||||
(set! (-> s4-0 start-time) (+ (-> *display* base-frame-counter) (seconds -33.333332)))
|
||||
(set! (-> s4-0 secret-time) (+ (-> *display* base-frame-counter) (seconds -33.333332)))
|
||||
(set! (-> s4-0 start-time) (+ (-> *display* base-frame-counter) (seconds -33.335)))
|
||||
(set! (-> s4-0 secret-time) (+ (-> *display* base-frame-counter) (seconds -33.335)))
|
||||
)
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
:id 188
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts
|
||||
((sp-item 18 :binding 19)
|
||||
:parts ((sp-item 18 :binding 19)
|
||||
(sp-item 19 :flags (start-dead launch-asap) :binding 20)
|
||||
(sp-item 19 :flags (start-dead launch-asap) :binding 20)
|
||||
(sp-item 19 :flags (start-dead launch-asap) :binding 20)
|
||||
@@ -84,8 +83,7 @@
|
||||
(define group-rain-screend-drop (-> *part-group-id-table* 188))
|
||||
|
||||
(defpart 21
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 0.1)
|
||||
(sp-rnd-flt spt-x (meters -4.5) (meters 9) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -3) (meters 6) 1.0)
|
||||
@@ -105,8 +103,7 @@
|
||||
)
|
||||
|
||||
(defpart 22
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.5))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -126,16 +123,14 @@
|
||||
)
|
||||
|
||||
(defpart 24
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0.004166667))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.004166667))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.06666667)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 23
|
||||
:init-specs
|
||||
((sp-flt spt-num 1.0)
|
||||
:init-specs ((sp-flt spt-num 1.0)
|
||||
(sp-int spt-rot-x 12)
|
||||
(sp-flt spt-r 4096.0)
|
||||
(sp-flt spt-g 3276.8)
|
||||
@@ -152,13 +147,11 @@
|
||||
)
|
||||
|
||||
(defpart 25
|
||||
:init-specs
|
||||
((sp-flt spt-fade-g -5.1200004))
|
||||
:init-specs ((sp-flt spt-fade-g -5.1200004))
|
||||
)
|
||||
|
||||
(defpart 18
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 0.1)
|
||||
(sp-rnd-flt spt-x (meters -4.5) (meters 9) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -3) (meters 6) 1.0)
|
||||
@@ -178,8 +171,7 @@
|
||||
)
|
||||
|
||||
(defpart 19
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -199,16 +191,14 @@
|
||||
)
|
||||
|
||||
(defpart 26
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0.008333334))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.008333334))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.06666667)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 20
|
||||
:init-specs
|
||||
((sp-flt spt-num 1.0)
|
||||
:init-specs ((sp-flt spt-num 1.0)
|
||||
(sp-int spt-rot-x 24)
|
||||
(sp-flt spt-r 12288.0)
|
||||
(sp-flt spt-g 6553.6)
|
||||
@@ -225,21 +215,18 @@
|
||||
)
|
||||
|
||||
(defpart 27
|
||||
:init-specs
|
||||
((sp-flt spt-fade-g -10.240001))
|
||||
:init-specs ((sp-flt spt-fade-g -10.240001))
|
||||
)
|
||||
|
||||
(defpartgroup group-stars
|
||||
:id 34
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts
|
||||
((sp-item 28) (sp-item 29) (sp-item 30))
|
||||
:parts ((sp-item 28) (sp-item 29) (sp-item 30))
|
||||
)
|
||||
|
||||
(defpart 28
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 40) (meters 40) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -260,18 +247,15 @@
|
||||
)
|
||||
|
||||
(defpart 31
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 29999700) (sp-launcher-by-id spt-next-launcher 32))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 29999700) (sp-launcher-by-id spt-next-launcher 32))
|
||||
)
|
||||
|
||||
(defpart 32
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.42666668))
|
||||
:init-specs ((sp-flt spt-fade-a -0.42666668))
|
||||
)
|
||||
|
||||
(defpart 29
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 40) (meters 40) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -292,8 +276,7 @@
|
||||
)
|
||||
|
||||
(defpart 30
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 40) (meters 40) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -314,8 +297,7 @@
|
||||
)
|
||||
|
||||
(defpart 33
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-rnd-flt spt-x (meters 10) (meters 10) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 2) (meters 14) 1.0)
|
||||
@@ -339,8 +321,7 @@
|
||||
)
|
||||
|
||||
(defpart 34
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 0.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 20) 1.0)
|
||||
(sp-flt spt-y (meters 16))
|
||||
@@ -364,13 +345,11 @@
|
||||
)
|
||||
|
||||
(defpart 35
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 1200) (sp-launcher-by-id spt-next-launcher 36))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 1200) (sp-launcher-by-id spt-next-launcher 36))
|
||||
)
|
||||
|
||||
(defpart 36
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.85333335))
|
||||
:init-specs ((sp-flt spt-fade-a -0.85333335))
|
||||
)
|
||||
|
||||
(defun update-snow ((arg0 target))
|
||||
@@ -404,8 +383,7 @@
|
||||
)
|
||||
|
||||
(defpart 37
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
(sp-flt spt-num 1.5)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 20) 1.0)
|
||||
(sp-flt spt-y (meters 16))
|
||||
@@ -425,8 +403,7 @@
|
||||
)
|
||||
|
||||
(defpart 38
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
(sp-flt spt-num 4.5)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 20) 1.0)
|
||||
(sp-flt spt-y (meters 16))
|
||||
@@ -444,8 +421,7 @@
|
||||
)
|
||||
|
||||
(defpart 39
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-rnd-int spt-num 0 1 2.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.05) (meters 0.075) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -464,8 +440,7 @@
|
||||
)
|
||||
|
||||
(defpart 40
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-y (meters 0.02))
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
||||
@@ -608,13 +583,11 @@
|
||||
:id 35
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 70)
|
||||
:parts
|
||||
((sp-item 1950) (sp-item 1951) (sp-item 1952))
|
||||
:parts ((sp-item 1950) (sp-item 1951) (sp-item 1952))
|
||||
)
|
||||
|
||||
(defpart 1950
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1200))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -630,8 +603,7 @@
|
||||
)
|
||||
|
||||
(defpart 1951
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2800))
|
||||
(sp-flt spt-rot-z (degrees 0.0))
|
||||
@@ -649,8 +621,7 @@
|
||||
)
|
||||
|
||||
(defpart 1952
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2200))
|
||||
(sp-flt spt-rot-z (degrees 0.0))
|
||||
@@ -671,13 +642,11 @@
|
||||
:id 36
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 70)
|
||||
:parts
|
||||
((sp-item 1974) (sp-item 1975) (sp-item 1976))
|
||||
:parts ((sp-item 1974) (sp-item 1975) (sp-item 1976))
|
||||
)
|
||||
|
||||
(defpart 1974
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 600))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -693,8 +662,7 @@
|
||||
)
|
||||
|
||||
(defpart 1975
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1400))
|
||||
(sp-flt spt-rot-z (degrees 0.0))
|
||||
@@ -712,8 +680,7 @@
|
||||
)
|
||||
|
||||
(defpart 1976
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x35 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1100))
|
||||
(sp-flt spt-rot-z (degrees 0.0))
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate cam-combiner-active (camera-combiner)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
@@ -175,8 +174,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars (sv-160 cam-rotation-tracker))
|
||||
(loop
|
||||
(when (and (zero? (logand (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
|
||||
@@ -318,7 +316,7 @@
|
||||
)
|
||||
)
|
||||
((and (< 16384.0 f28-1) (< (vector-dot (-> self flip-control-axis) s4-1) 0.0))
|
||||
(set! (-> *camera* master-options) (logxor (-> *camera* master-options) 16))
|
||||
(logxor! (-> *camera* master-options) 16)
|
||||
)
|
||||
)
|
||||
(set! (-> self flip-control-axis quad) (-> s4-1 quad))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -575,15 +575,9 @@
|
||||
(set! (-> self stringCliffHeight) 163840.0)
|
||||
(send-event *camera* 'point-of-interest #f)
|
||||
(set! (-> *camera-combiner* tracking point-of-interest-blend target) 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) 'query-state)
|
||||
(set! (-> a1-1 param 0) (the-as uint *camera-base-mode*))
|
||||
(if (not (send-event-function *camera* a1-1))
|
||||
(send-event *camera* 'change-state *camera-base-mode* 450)
|
||||
)
|
||||
)
|
||||
(if (not (send-event *camera* 'query-state *camera-base-mode*))
|
||||
(send-event *camera* 'change-state *camera-base-mode* (seconds 1.5))
|
||||
)
|
||||
(set! (-> *camera-combiner* tracking tilt-adjust target) (-> *CAMERA-bank* default-tilt-adjust))
|
||||
(send-event *camera* 'clear-slave-option #x10000)
|
||||
)
|
||||
@@ -612,15 +606,9 @@
|
||||
(set! (-> self stringMaxLength) (-> *CAMERA-bank* default-string-max-z))
|
||||
)
|
||||
(set! (-> self stringCliffHeight) (cam-slave-get-float arg0 'stringCliffHeight 163840.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) 'query-state)
|
||||
(set! (-> a1-7 param 0) (the-as uint *camera-base-mode*))
|
||||
(if (not (send-event-function *camera* a1-7))
|
||||
(send-event *camera* 'change-state *camera-base-mode* 450)
|
||||
)
|
||||
)
|
||||
(if (not (send-event *camera* 'query-state *camera-base-mode*))
|
||||
(send-event *camera* 'change-state *camera-base-mode* (seconds 1.5))
|
||||
)
|
||||
(if (logtest? #x10000 (cam-slave-get-flags (-> self cam-entity) 'flags))
|
||||
(send-event *camera* 'set-slave-option #x10000)
|
||||
)
|
||||
@@ -781,83 +769,76 @@
|
||||
)
|
||||
|
||||
(defbehavior master-check-regions camera-master ()
|
||||
(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) 'query-state)
|
||||
(set! (-> a1-0 param 0) (the-as uint cam-eye))
|
||||
(cond
|
||||
((send-event-function *camera* a1-0)
|
||||
#f
|
||||
)
|
||||
((or (not *target*) (logtest? (-> self master-options) 1))
|
||||
(master-unset-region)
|
||||
)
|
||||
((and (logtest? (-> self master-options) 4)
|
||||
(not (-> self on-ground))
|
||||
(or (not (-> self cam-entity)) (zero? (logand #x20000 (cam-slave-get-flags (-> self cam-entity) 'flags))))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((and (-> self cam-entity)
|
||||
(not (in-cam-entity-volume? (target-pos 0) (-> self cam-entity) 0.0 'cutoutvol))
|
||||
(or (in-cam-entity-volume? (target-pos 0) (-> self cam-entity) 1024.0 'pvol)
|
||||
(in-cam-entity-volume? (target-pos 0) (-> self cam-entity) 1024.0 'vol)
|
||||
(and (not ((method-of-type res-lump get-property-data)
|
||||
(-> self cam-entity)
|
||||
'pvol
|
||||
'exact
|
||||
0.0
|
||||
(the-as pointer #f)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
(not ((method-of-type res-lump get-property-data)
|
||||
(-> self cam-entity)
|
||||
'vol
|
||||
'exact
|
||||
0.0
|
||||
(the-as pointer #f)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 (-> *camera-engine* alive-list next0)))
|
||||
*camera-engine*
|
||||
(let ((gp-5 (-> v1-17 next0)))
|
||||
(while (!= v1-17 (-> *camera-engine* alive-list-end))
|
||||
(let ((s5-1 (-> (the-as connection v1-17) param1)))
|
||||
(when (and (not (in-cam-entity-volume? (target-pos 0) (the-as entity s5-1) 1024.0 'cutoutvol))
|
||||
(in-cam-entity-volume? (target-pos 0) (the-as entity s5-1) 0.0 'vol)
|
||||
)
|
||||
(if (master-switch-to-entity (the-as entity s5-1))
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-17 gp-5)
|
||||
*camera-engine*
|
||||
(set! gp-5 (-> gp-5 next0))
|
||||
(cond
|
||||
((send-event *camera* 'query-state cam-eye)
|
||||
#f
|
||||
)
|
||||
((or (not *target*) (logtest? (-> self master-options) 1))
|
||||
(master-unset-region)
|
||||
)
|
||||
((and (logtest? (-> self master-options) 4)
|
||||
(not (-> self on-ground))
|
||||
(or (not (-> self cam-entity)) (zero? (logand #x20000 (cam-slave-get-flags (-> self cam-entity) 'flags))))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((and (-> self cam-entity)
|
||||
(not (in-cam-entity-volume? (target-pos 0) (-> self cam-entity) 0.0 'cutoutvol))
|
||||
(or (in-cam-entity-volume? (target-pos 0) (-> self cam-entity) 1024.0 'pvol)
|
||||
(in-cam-entity-volume? (target-pos 0) (-> self cam-entity) 1024.0 'vol)
|
||||
(and (not ((method-of-type res-lump get-property-data)
|
||||
(-> self cam-entity)
|
||||
'pvol
|
||||
'exact
|
||||
0.0
|
||||
(the-as pointer #f)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
(not ((method-of-type res-lump get-property-data)
|
||||
(-> self cam-entity)
|
||||
'vol
|
||||
'exact
|
||||
0.0
|
||||
(the-as pointer #f)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 (-> *camera-engine* alive-list next0)))
|
||||
*camera-engine*
|
||||
(let ((gp-5 (-> v1-17 next0)))
|
||||
(while (!= v1-17 (-> *camera-engine* alive-list-end))
|
||||
(let ((s5-1 (-> (the-as connection v1-17) param1)))
|
||||
(when (and (not (in-cam-entity-volume? (target-pos 0) (the-as entity s5-1) 1024.0 'cutoutvol))
|
||||
(in-cam-entity-volume? (target-pos 0) (the-as entity s5-1) 0.0 'vol)
|
||||
)
|
||||
(if (master-switch-to-entity (the-as entity s5-1))
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-17 gp-5)
|
||||
*camera-engine*
|
||||
(set! gp-5 (-> gp-5 next0))
|
||||
)
|
||||
)
|
||||
(master-unset-region)
|
||||
)
|
||||
(master-unset-region)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate cam-master-active (camera-master)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object));; todo
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 arg2))
|
||||
@@ -1467,12 +1448,12 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'toggle-slave-option)
|
||||
(set! (-> self slave-options) (logxor (-> self slave-options) (-> arg3 param 0)))
|
||||
(logxor! (-> self slave-options) (-> arg3 param 0))
|
||||
(let ((a0-193 (-> self slave 0))
|
||||
(v1-360 (-> self slave 1))
|
||||
)
|
||||
(if a0-193
|
||||
(set! (-> a0-193 0 options) (logxor (-> a0-193 0 options) (-> arg3 param 0)))
|
||||
(logxor! (-> a0-193 0 options) (-> arg3 param 0))
|
||||
)
|
||||
(set! v0-0 (the-as object (when v1-360
|
||||
(set! v0-0 (logxor (-> v1-360 0 options) (-> arg3 param 0)))
|
||||
@@ -1601,15 +1582,13 @@
|
||||
(the-as object v0-0)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(if (and (nonzero? camera-master-debug) *debug-segment*)
|
||||
(add-connection *debug-engine* self camera-master-debug self #f #f)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (not (paused?))
|
||||
(vector-negate!
|
||||
(-> self local-down)
|
||||
@@ -1619,8 +1598,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (and *dproc* *debug-segment*)
|
||||
(add-frame
|
||||
@@ -1637,15 +1615,9 @@
|
||||
(master-track-target)
|
||||
(set! (-> last-try-to-look-at-data horz) 0.0)
|
||||
(set! (-> last-try-to-look-at-data vert) 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) 'slave-option?)
|
||||
(set! (-> a1-1 param 0) (the-as uint #x4000))
|
||||
(when (send-event-function *camera* a1-1)
|
||||
(set! (-> self string-min target y) 18432.0)
|
||||
(set! (-> self string-max target y) 18432.041)
|
||||
)
|
||||
(when (send-event *camera* 'slave-option? #x4000)
|
||||
(set! (-> self string-min target y) 18432.0)
|
||||
(set! (-> self string-max target y) 18432.041)
|
||||
)
|
||||
(when (not (paused?))
|
||||
(update! (-> self string-min) (the-as vector #f))
|
||||
@@ -1684,8 +1656,7 @@
|
||||
|
||||
|
||||
(defstate list-keeper-active (camera-master)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(change-to-last-brother self)
|
||||
(suspend)
|
||||
@@ -1737,34 +1708,18 @@
|
||||
)
|
||||
(set! (-> self pov-handle) (the-as handle #f))
|
||||
(set! (-> self pov-bone) 0)
|
||||
(let ((gp-1 (get-process *camera-dead-pool* list-keeper #x4000)))
|
||||
(cond
|
||||
((when gp-1
|
||||
(let ((t9-5 (method-of-type list-keeper activate)))
|
||||
(t9-5 (the-as list-keeper gp-1) self 'list-keeper (the-as pointer #x70004000))
|
||||
)
|
||||
(run-next-time-in-process gp-1 list-keeper-init)
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: master camera list keeper failed to activate~%")
|
||||
)
|
||||
(cond
|
||||
((process-spawn-function list-keeper list-keeper-init :from *camera-dead-pool* :to self)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: master camera list keeper failed to activate~%")
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (get-process *camera-dead-pool* camera-slave #x4000)))
|
||||
(cond
|
||||
((when gp-2
|
||||
(let ((t9-9 (method-of-type camera-slave activate)))
|
||||
(t9-9 (the-as camera-slave gp-2) self 'camera-slave (the-as pointer #x70004000))
|
||||
)
|
||||
(run-next-time-in-process gp-2 cam-slave-init cam-free-floating #f)
|
||||
(-> gp-2 ppointer)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: first slave failed to activate~%")
|
||||
)
|
||||
(cond
|
||||
((process-spawn-function camera-slave cam-slave-init cam-free-floating #f :from *camera-dead-pool* :to self)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: first slave failed to activate~%")
|
||||
)
|
||||
)
|
||||
(set! (-> self water-drip) (create-launch-control group-rain-screend-drop self))
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: cam-start
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun cam-stop ()
|
||||
(kill-by-name 'camera-master *active-pool*)
|
||||
(kill-by-name 'camera-slave *active-pool*)
|
||||
@@ -17,12 +19,23 @@
|
||||
|
||||
(defun cam-start ((arg0 symbol))
|
||||
(cam-stop)
|
||||
(process-new camera-combiner cam-combiner-init :from *camera-dead-pool* :to *camera-pool* :stack *scratch-memory-top*)
|
||||
(set! *camera* (the-as camera-master (ppointer->process (process-new camera-master cam-master-init :from *camera-master-dead-pool* :to *camera-pool* :stack *scratch-memory-top*))))
|
||||
(process-spawn camera-combiner :init cam-combiner-init :from *camera-dead-pool* :to *camera-pool*)
|
||||
(set! *camera*
|
||||
(the-as camera-master
|
||||
(ppointer->process
|
||||
(process-spawn-function camera-master cam-master-init :from *camera-master-dead-pool* :to *camera-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if arg0
|
||||
(reset-cameras)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(cam-start #f)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
(define *CAM_POINT_WATCH-bank* (new 'static 'cam-point-watch-bank :speed 1600.0 :rot-speed (degrees 0.6)))
|
||||
|
||||
(defstate cam-point-watch (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -31,8 +30,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self pivot-rad) 40960.0)
|
||||
(set! (-> self blend-from-type) (the-as uint 1))
|
||||
@@ -40,8 +38,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(gp-0 (new-stack-vector0))
|
||||
@@ -393,8 +390,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-free-floating (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -404,8 +400,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self blend-from-type) (the-as uint 1))
|
||||
(set! (-> self blend-to-type) (the-as uint 1))
|
||||
@@ -413,8 +408,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(let ((a2-0 (-> *camera* local-down)))
|
||||
(if (logtest? (-> self options) 8)
|
||||
@@ -475,8 +469,7 @@
|
||||
(set! (-> *camera-orbit-info* orbit-off y) 4096.0)
|
||||
|
||||
(defstate cam-orbit (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -486,8 +479,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(if (not *camera-orbit-target*)
|
||||
(cam-slave-go cam-free-floating)
|
||||
@@ -501,13 +493,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (not *camera-orbit-target*)
|
||||
(cam-slave-go cam-free-floating)
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate cam-fixed (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -20,8 +19,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self saved-pt quad) (-> self trans quad))
|
||||
(set! (-> self blend-from-type) (the-as uint 1))
|
||||
@@ -30,8 +28,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -50,8 +47,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-fixed-read-entity (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -61,8 +57,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(cond
|
||||
((-> self enter-has-run)
|
||||
)
|
||||
@@ -85,8 +80,7 @@
|
||||
(go cam-fixed)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(format *stdcon* "ERROR <GMJ>: stayed in cam-fixed-read-entity~%")
|
||||
(suspend)
|
||||
@@ -96,8 +90,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-pov (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -107,24 +100,21 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self blend-from-type) (the-as uint 1))
|
||||
(set! (-> self blend-to-type) (the-as uint 1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (not (handle->process (-> *camera* pov-handle)))
|
||||
(set! (-> self blend-from-type) (the-as uint 0))
|
||||
(cam-slave-go cam-fixed)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(vector<-cspace!
|
||||
@@ -159,8 +149,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-pov180 (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -170,24 +159,21 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self blend-from-type) (the-as uint 1))
|
||||
(set! (-> self blend-to-type) (the-as uint 1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (not (handle->process (-> *camera* pov-handle)))
|
||||
(set! (-> self blend-from-type) (the-as uint 0))
|
||||
(cam-slave-go cam-fixed)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 #t)
|
||||
@@ -262,10 +248,8 @@
|
||||
)
|
||||
|
||||
(defstate cam-pov-track (camera-slave)
|
||||
:event
|
||||
cam-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event cam-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self blend-from-type) (the-as uint 2))
|
||||
(set! (-> self blend-to-type) (the-as uint 2))
|
||||
@@ -277,15 +261,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (or (not (handle->process (-> *camera* pov-handle))) (zero? (logand (-> *camera* master-options) 2)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (not (paused?))
|
||||
(vector<-cspace!
|
||||
@@ -307,8 +289,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-standoff (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('set-standoff-dist)
|
||||
(vector-normalize! (-> self pivot-pt) (the-as float (-> arg3 param 0)))
|
||||
@@ -329,8 +310,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(vector-! (-> self pivot-pt) (-> self trans) (-> *camera* tpos-curr-adj))
|
||||
(cond
|
||||
@@ -348,15 +328,13 @@
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
|
||||
@@ -369,10 +347,8 @@
|
||||
)
|
||||
|
||||
(defstate cam-standoff-read-entity (camera-slave)
|
||||
:event
|
||||
cam-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event cam-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(cond
|
||||
((-> self enter-has-run)
|
||||
)
|
||||
@@ -407,8 +383,7 @@
|
||||
(go cam-standoff)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(format *stdcon* "ERROR <GMJ>: stayed in cam-standoff-read-entity~%")
|
||||
(suspend)
|
||||
@@ -435,8 +410,7 @@
|
||||
|
||||
;; main first-person camera
|
||||
(defstate cam-eye (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -446,8 +420,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(let ((v1-3 (vector-float*! (new-stack-vector0) (-> *camera* local-down) (+ 1024.0 (-> *camera* target-height)))))
|
||||
(vector-! (-> self trans) (-> *camera* tpos-curr) v1-3)
|
||||
@@ -459,8 +432,7 @@
|
||||
(set! (-> self fov) 11650.845)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(if (and *target*
|
||||
(logtest? (-> *camera* master-options) 2)
|
||||
(logtest? (-> *target* state-flags) (state-flags sf09))
|
||||
@@ -469,15 +441,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> *display* base-frame-counter)))
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
@@ -610,8 +580,7 @@
|
||||
|
||||
;; first person camera for rat game
|
||||
(defstate cam-billy (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -621,8 +590,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(let ((v1-3 (vector-float*! (new-stack-vector0) (-> *camera* local-down) (-> *camera* target-height))))
|
||||
(vector-! (-> self trans) (-> *camera* tpos-curr) v1-3)
|
||||
@@ -635,20 +603,17 @@
|
||||
(matrix-rotate-y! (the-as matrix (-> self tracking)) (the-as float -32768.0))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
'()
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(let ((s5-0 (vector-reset! (new-stack-vector0)))
|
||||
@@ -731,10 +696,8 @@
|
||||
)
|
||||
|
||||
(defstate cam-spline (camera-slave)
|
||||
:event
|
||||
cam-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event cam-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(cond
|
||||
((-> self enter-has-run)
|
||||
)
|
||||
@@ -813,15 +776,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
|
||||
@@ -836,8 +797,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-decel (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -847,15 +807,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(if (not (-> self enter-has-run))
|
||||
(set! (-> self saved-pt quad) (-> self trans quad))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
@@ -891,8 +849,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-endlessfall (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -902,16 +859,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self blend-from-type) (the-as uint 2))
|
||||
(set! (-> self blend-to-type) (the-as uint 2))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'cam-vector-seeker))
|
||||
(f30-0 (-> self velocity y))
|
||||
)
|
||||
@@ -1128,8 +1083,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-circular (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -1143,8 +1097,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(cond
|
||||
((-> self enter-has-run)
|
||||
)
|
||||
@@ -1215,15 +1168,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (not (paused?))
|
||||
(cam-circular-code)
|
||||
@@ -1235,25 +1186,21 @@
|
||||
)
|
||||
|
||||
(defstate cam-lookat (camera-slave)
|
||||
:event
|
||||
cam-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event cam-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self blend-from-type) (the-as uint 2))
|
||||
(set! (-> self blend-to-type) (the-as uint 2))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(suspend)
|
||||
)
|
||||
@@ -2776,8 +2723,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-string (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
(let ((gp-0 (new-stack-vector0)))
|
||||
@@ -2820,8 +2766,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set-string-parms)
|
||||
(set! *camera-base-mode* cam-string)
|
||||
@@ -2970,15 +2915,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(set-string-parms)
|
||||
@@ -3108,10 +3051,8 @@
|
||||
|
||||
;; third person camera (in debug menu, and fishermans-boat-player-control w/o autopilot?)
|
||||
(defstate cam-stick (camera-slave)
|
||||
:event
|
||||
cam-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event cam-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self view-off-param) (-> *camera* view-off-param-save))
|
||||
(set! (-> self view-off x) 0.0)
|
||||
@@ -3135,8 +3076,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
@@ -3213,8 +3153,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (not (paused?))
|
||||
(cam-stick-code)
|
||||
@@ -3349,10 +3288,8 @@
|
||||
)
|
||||
|
||||
(defstate cam-bike (camera-slave)
|
||||
:event
|
||||
cam-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event cam-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> *camera* foot-offset) 4096.0)
|
||||
(set! (-> *camera* head-offset) 16384.0)
|
||||
@@ -3373,15 +3310,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (not (paused?))
|
||||
(cam-bike-code)
|
||||
|
||||
+371
-493
File diff suppressed because it is too large
Load Diff
@@ -32,8 +32,7 @@
|
||||
|
||||
(defstate pov-camera-startup (pov-camera)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(go-virtual pov-camera-start-playing)
|
||||
(none)
|
||||
)
|
||||
@@ -41,8 +40,7 @@
|
||||
|
||||
(defstate pov-camera-start-playing (pov-camera)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(while (not (target-grabbed? self))
|
||||
(suspend)
|
||||
@@ -53,16 +51,7 @@
|
||||
(set! gp-0 (+ (-> v1-7 number) 1))
|
||||
)
|
||||
)
|
||||
(let* ((s5-0 (get-process *default-dead-pool* othercam #x4000))
|
||||
(v1-10 (when s5-0
|
||||
(let ((t9-3 (method-of-type othercam activate)))
|
||||
(t9-3 (the-as othercam s5-0) self 'othercam (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-0 othercam-init-by-other self gp-0 #t #t)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (process-spawn othercam self gp-0 #t #t :to self)))
|
||||
(send-event (ppointer->process v1-10) 'mask (-> self mask-to-clear))
|
||||
)
|
||||
)
|
||||
@@ -91,8 +80,7 @@
|
||||
|
||||
(defstate pov-camera-playing (pov-camera)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('abort)
|
||||
(when (logtest? (-> self flags) (pov-camera-flag notify-of-abort))
|
||||
@@ -104,16 +92,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self debounce-start-time) (-> *display* base-frame-counter))
|
||||
(if (= (-> self anim-name type) string)
|
||||
(backup-load-state-and-set-cmds *load-state* (-> self command-list))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(if (= (-> self anim-name type) string)
|
||||
(restore-load-state-and-cleanup *load-state*)
|
||||
)
|
||||
@@ -121,8 +107,7 @@
|
||||
(clear-pending-settings-from-process *setting-control* self 'sfx-volume)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(push-setting! *setting-control* self 'music-volume 'rel (-> self music-volume-movie) 0)
|
||||
(push-setting! *setting-control* self 'sfx-volume 'rel (-> self sfx-volume-movie) 0)
|
||||
(cond
|
||||
@@ -146,8 +131,7 @@
|
||||
(go-virtual pov-camera-done-playing)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(if (= (-> self anim-name type) string)
|
||||
(execute-commands-up-to *load-state* (ja-aframe-num 0))
|
||||
)
|
||||
@@ -158,13 +142,11 @@
|
||||
|
||||
(defstate pov-camera-abort (pov-camera)
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(logior! (-> self flags) (pov-camera-flag allow-abort))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set-blackout-frames (seconds 0.035))
|
||||
(suspend)
|
||||
(suspend)
|
||||
@@ -175,8 +157,7 @@
|
||||
|
||||
(defstate pov-camera-done-playing (pov-camera)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(while (begin self (not ((method-of-object self target-released?))))
|
||||
(suspend)
|
||||
)
|
||||
|
||||
@@ -7,28 +7,22 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define
|
||||
*collide-vif0-init*
|
||||
(the-as (array uint32)
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type uint32 :length 12 :allocated-length 12
|
||||
#x30000000
|
||||
#x4d000000
|
||||
#x4d000000
|
||||
#x4d000000
|
||||
#x3f800000
|
||||
#x5000001
|
||||
#x20000000
|
||||
#x40404040
|
||||
#x1000404
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *collide-vif0-init* (the-as (array uint32) (new 'static 'boxed-array :type uint32
|
||||
#x30000000
|
||||
#x4d000000
|
||||
#x4d000000
|
||||
#x4d000000
|
||||
#x3f800000
|
||||
#x5000001
|
||||
#x20000000
|
||||
#x40404040
|
||||
#x1000404
|
||||
#x0
|
||||
#x0
|
||||
#x0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2227,15 +2227,12 @@
|
||||
)
|
||||
|
||||
(defstate anim-tester-process (anim-tester)
|
||||
:event
|
||||
anim-tester-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event anim-tester-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(logior! (-> self flags) (anim-tester-flags fanimt1))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (and (zero? (logand (-> self flags) (anim-tester-flags fanimt1))) (= *master-mode* 'menu))
|
||||
(anim-tester-interface)
|
||||
)
|
||||
@@ -2251,8 +2248,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars (s4-0 glst-node) (s5-1 anim-test-seq-item) (gp-2 anim-test-sequence))
|
||||
(loop
|
||||
(logclear! (-> self flags) (anim-tester-flags fanimt0))
|
||||
@@ -2399,8 +2395,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
anim-tester-post
|
||||
:post anim-tester-post
|
||||
)
|
||||
|
||||
(defbehavior initialize-anim-tester anim-tester ()
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
(send-event *camera* 'reset-root)
|
||||
)
|
||||
((= arg0 9)
|
||||
(set! (-> *camera* master-options) (logxor (-> *camera* master-options) 1))
|
||||
(logxor! (-> *camera* master-options) 1)
|
||||
)
|
||||
((= arg0 10)
|
||||
(set! (-> *camera* master-options) (logxor (-> *camera* master-options) 4))
|
||||
(logxor! (-> *camera* master-options) 4)
|
||||
)
|
||||
((= arg0 11)
|
||||
(send-event *camera* 'toggle-slave-option 32)
|
||||
@@ -183,60 +183,53 @@
|
||||
)
|
||||
|
||||
(defun dm-cam-render-float ((arg0 int) (arg1 debug-menu-msg) (arg2 float) (arg3 float))
|
||||
(with-pp
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(cond
|
||||
((zero? (/ arg0 8))
|
||||
(when *math-camera*
|
||||
(set! (-> *math-camera* fov) (* 182.04445 arg2))
|
||||
(update-math-camera
|
||||
*math-camera*
|
||||
(-> *setting-control* current video-mode)
|
||||
(-> *setting-control* current aspect-ratio)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (/ arg0 8) 1)
|
||||
(if *camera*
|
||||
(send-event *camera* 'set-fov (* 182.04445 arg2))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(cond
|
||||
((zero? (/ arg0 8))
|
||||
(cond
|
||||
(*math-camera*
|
||||
(* 0.005493164 (-> *math-camera* fov))
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg3
|
||||
(when *math-camera*
|
||||
(set! (-> *math-camera* fov) (* 182.04445 arg2))
|
||||
(update-math-camera
|
||||
*math-camera*
|
||||
(-> *setting-control* current video-mode)
|
||||
(-> *setting-control* current aspect-ratio)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (/ arg0 8) 1)
|
||||
(cond
|
||||
(*camera*
|
||||
(let ((f30-0 0.005493164)
|
||||
(a1-3 (new 'stack-no-clear 'event-message-block))
|
||||
)
|
||||
(set! (-> a1-3 from) pp)
|
||||
(set! (-> a1-3 num-params) 0)
|
||||
(set! (-> a1-3 message) 'query-fov)
|
||||
(* f30-0 (the-as float (send-event-function *camera* a1-3)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg3
|
||||
(if *camera*
|
||||
(send-event *camera* 'set-fov (* 182.04445 arg2))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((zero? (/ arg0 8))
|
||||
(cond
|
||||
(*math-camera*
|
||||
(* 0.005493164 (-> *math-camera* fov))
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg3
|
||||
)
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg3
|
||||
)
|
||||
)
|
||||
((= (/ arg0 8) 1)
|
||||
(cond
|
||||
(*camera*
|
||||
(let ((f30-0 0.005493164))
|
||||
(* f30-0 (the-as float (send-event *camera* 'query-fov)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg3
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg3
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -473,7 +466,7 @@
|
||||
(let ((v1-0 (find-instance-by-name *edit-instance*)))
|
||||
(when v1-0
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> v1-0 flags) (logxor (-> v1-0 flags) (the-as uint arg0)))
|
||||
(logxor! (-> v1-0 flags) (the-as uint arg0))
|
||||
)
|
||||
(logtest? (-> v1-0 flags) arg0)
|
||||
)
|
||||
@@ -570,7 +563,7 @@
|
||||
(cond
|
||||
(v1-0
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> v1-0 flags) (logxor (-> v1-0 flags) 1))
|
||||
(logxor! (-> v1-0 flags) 1)
|
||||
)
|
||||
(zero? (logand (-> v1-0 flags) 1))
|
||||
)
|
||||
@@ -3090,19 +3083,10 @@
|
||||
)
|
||||
|
||||
(defun dm-task-get-money ((arg0 int) (arg1 debug-menu-msg))
|
||||
(with-pp
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(send-event *target* 'get-pickup 5 (-> *GAME-bank* money-task-inc))
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) pp)
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'query)
|
||||
(set! (-> a1-2 param 0) (the-as uint 'pickup))
|
||||
(set! (-> a1-2 param 1) (the-as uint 5))
|
||||
(>= (the-as float (send-event-function *target* a1-2)) (-> *GAME-bank* money-task-inc))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(send-event *target* 'get-pickup 5 (-> *GAME-bank* money-task-inc))
|
||||
)
|
||||
)
|
||||
(>= (the-as float (send-event *target* 'query 'pickup (pickup-type money))) (-> *GAME-bank* money-task-inc))
|
||||
)
|
||||
|
||||
(defun dm-give-all-cells ((arg0 int) (arg1 debug-menu-msg))
|
||||
@@ -3285,13 +3269,13 @@
|
||||
(case arg0
|
||||
(('at-apply-align)
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *anim-tester* 0 flags) (logxor (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5)))
|
||||
(logxor! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5))
|
||||
)
|
||||
(return (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5)))
|
||||
)
|
||||
(('at-show-joint-info)
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *anim-tester* 0 flags) (logxor (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4)))
|
||||
(logxor! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4))
|
||||
)
|
||||
(return (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4)))
|
||||
)
|
||||
@@ -3763,7 +3747,7 @@
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(set! (-> *target* state-flags) (logxor (-> *target* state-flags) (state-flags sf04)))
|
||||
(logxor! (-> *target* state-flags) (state-flags sf04))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) (state-flags sf04))))
|
||||
@@ -4604,6 +4588,8 @@
|
||||
(flag "Display actor counts" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-actor-counts)))
|
||||
(flag "Display git commit" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-sha)))
|
||||
(flag "Extra hud elements" #f ,(dm-lambda-boolean-flag (-> *pc-settings* extra-hud?)))
|
||||
(flag "Music fadein" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadein?)))
|
||||
(flag "Music fadeout" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadeout?)))
|
||||
(function "Reset" #f (lambda () (reset *pc-settings*)))
|
||||
(function "Save" #f (lambda () (commit-to-file *pc-settings*)))
|
||||
(function "Load" #f (lambda () (load-settings *pc-settings*)))
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
)
|
||||
|
||||
(defstate part-tester-idle (part-tester)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(let ((gp-0 (entity-by-name *part-tester-name*)))
|
||||
(when gp-0
|
||||
@@ -110,18 +109,13 @@
|
||||
|
||||
(defun start-part ()
|
||||
(kill-by-type part-tester *active-pool*)
|
||||
(let ((gp-0 (get-process *debug-part-dead-pool* part-tester #x4000)))
|
||||
(when gp-0
|
||||
(let ((t9-2 (method-of-type part-tester activate)))
|
||||
(t9-2 (the-as part-tester gp-0) *default-pool* 'part-tester (the-as pointer #x70004000))
|
||||
(process-spawn
|
||||
part-tester
|
||||
(if *anim-tester*
|
||||
(-> *anim-tester* 0 root trans)
|
||||
(target-pos 0)
|
||||
)
|
||||
(run-now-in-process gp-0 part-tester-init-by-other (if *anim-tester*
|
||||
(-> *anim-tester* 0 root trans)
|
||||
(target-pos 0)
|
||||
)
|
||||
)
|
||||
(-> gp-0 ppointer)
|
||||
)
|
||||
:from *debug-part-dead-pool*
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
(define *viewer-sg* (new 'static 'skeleton-group
|
||||
:bounds (new 'static 'vector :w 16384.0)
|
||||
:lod-dist
|
||||
(new 'static 'array float 4 4095996000.0 0.0 0.0 0.0)
|
||||
:lod-dist (new 'static 'array float 4 4095996000.0 0.0 0.0 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -29,12 +28,10 @@
|
||||
(define-extern *viewer* viewer)
|
||||
|
||||
(defstate viewer-process (viewer)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(ja-no-eval :group! (-> self janim)
|
||||
:num!
|
||||
(seek! (the float (+ (-> self janim data 0 length) -1)))
|
||||
:num! (seek! (the float (+ (-> self janim data 0 length) -1)))
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
@@ -46,8 +43,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior viewer) ja-post)
|
||||
:post (the-as (function none :behavior viewer) ja-post)
|
||||
)
|
||||
|
||||
(define viewer-string (new 'global 'string 64 (the-as string #f)))
|
||||
|
||||
@@ -421,10 +421,9 @@
|
||||
)
|
||||
|
||||
(defstate process-drawable-art-error (process-drawable)
|
||||
:code
|
||||
(behavior ((arg0 string))
|
||||
:code (behavior ((arg0 string))
|
||||
(logior! (-> self entity extra perm status) (entity-perm-status bit-1))
|
||||
(while #t
|
||||
(loop
|
||||
(when *display-entity-errors*
|
||||
(let ((s5-0 add-debug-text-3d)
|
||||
(s4-0 #t)
|
||||
@@ -450,10 +449,8 @@
|
||||
(define-extern ja-post (function none :behavior process-drawable))
|
||||
(define-extern anim-loop (function none :behavior process-drawable))
|
||||
(defstate process-drawable-idle (process-drawable)
|
||||
:code
|
||||
anim-loop
|
||||
:post
|
||||
ja-post
|
||||
:code anim-loop
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
@@ -474,15 +471,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (load-to-heap-by-name
|
||||
(-> s1-0 art-group)
|
||||
(-> arg0 art-group-name)
|
||||
#f
|
||||
global
|
||||
(-> arg0 version)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (load-to-heap-by-name (-> s1-0 art-group) (-> arg0 art-group-name) #f global (-> arg0 version))))
|
||||
(when (or (zero? s4-0) (or (not s4-0) (!= (-> s4-0 type) art-group)))
|
||||
(go process-drawable-art-error "art-group")
|
||||
(set! s3-0 (the-as draw-control #f))
|
||||
@@ -1181,7 +1170,7 @@
|
||||
|
||||
(defbehavior anim-loop process-drawable ()
|
||||
(logior! (-> self mask) (process-mask sleep-code))
|
||||
(while #t
|
||||
(loop
|
||||
(nop!)
|
||||
(suspend)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+94
-202
@@ -9,6 +9,7 @@
|
||||
(declare-type crate-buzzer crate)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/crate-ag.gc")
|
||||
|
||||
(defskelgroup *crate-barrel-sg* crate crate-barrel-lod0-jg crate-barrel-idle-ja
|
||||
@@ -104,8 +105,7 @@
|
||||
)
|
||||
|
||||
(defpart 281
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 16.0)
|
||||
(sp-rnd-flt spt-y (meters 0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 1.5) 1.0)
|
||||
@@ -128,13 +128,11 @@
|
||||
)
|
||||
|
||||
(defpart 282
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -1.0666667))
|
||||
:init-specs ((sp-flt spt-fade-a -1.0666667))
|
||||
)
|
||||
|
||||
(defpart 283
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-flt spt-y (meters 0.75))
|
||||
(sp-flt spt-scale-x (meters 6))
|
||||
@@ -158,13 +156,11 @@
|
||||
)
|
||||
|
||||
(defpart 284
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -2.1333334))
|
||||
:init-specs ((sp-flt spt-fade-a -2.1333334))
|
||||
)
|
||||
|
||||
(defpart 285
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-y (meters 1))
|
||||
(sp-flt spt-scale-x (meters 8))
|
||||
@@ -180,8 +176,7 @@
|
||||
)
|
||||
|
||||
(defpart 286
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6 :page #x2))
|
||||
(sp-flt spt-num 5.0)
|
||||
(sp-rnd-flt spt-x (meters -0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0.25) (meters 1.5) 1.0)
|
||||
@@ -209,16 +204,14 @@
|
||||
)
|
||||
|
||||
(defpart 287
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters -0.0033333334))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters -0.0033333334))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -3.4)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 288
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x2))
|
||||
(sp-flt spt-num 4.5)
|
||||
(sp-rnd-flt spt-x (meters -0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0.25) (meters 1.5) 1.0)
|
||||
@@ -250,8 +243,7 @@
|
||||
:duration 5
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts
|
||||
((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 286) (sp-item 288))
|
||||
:parts ((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 286) (sp-item 288))
|
||||
)
|
||||
|
||||
(defpartgroup group-crate-steel-explode
|
||||
@@ -259,8 +251,7 @@
|
||||
:duration 5
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts
|
||||
((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 288) (sp-item 288) (sp-item 288))
|
||||
:parts ((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 288) (sp-item 288) (sp-item 288))
|
||||
)
|
||||
|
||||
(defpartgroup group-dark-eco-box-explosion
|
||||
@@ -268,8 +259,7 @@
|
||||
:duration 600
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts
|
||||
((sp-item 295 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
:parts ((sp-item 295 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
(sp-item 296 :flags (start-dead launch-asap) :binding 297)
|
||||
(sp-item 297 :fade-after (meters 80) :falloff-to (meters 100) :flags (start-dead))
|
||||
(sp-item 296 :flags (start-dead launch-asap) :binding 297)
|
||||
@@ -311,8 +301,7 @@
|
||||
)
|
||||
|
||||
(defpart 2096
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 6.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -336,13 +325,11 @@
|
||||
)
|
||||
|
||||
(defpart 2099
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r 0.0) (sp-flt spt-fade-g 0.0) (sp-flt spt-fade-b 0.0) (sp-flt spt-fade-a -1.4222223))
|
||||
:init-specs ((sp-flt spt-fade-r 0.0) (sp-flt spt-fade-g 0.0) (sp-flt spt-fade-b 0.0) (sp-flt spt-fade-a -1.4222223))
|
||||
)
|
||||
|
||||
(defpart 2098
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 3.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 180.0) 1.0)
|
||||
@@ -359,8 +346,7 @@
|
||||
)
|
||||
|
||||
(defpart 2095
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 16))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -375,8 +361,7 @@
|
||||
)
|
||||
|
||||
(defpart 2097
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 2.5) (meters 1.5) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -400,8 +385,7 @@
|
||||
)
|
||||
|
||||
(defpart 295
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 16.0)
|
||||
(sp-flt spt-y (meters 1))
|
||||
(sp-flt spt-scale-x (meters 0.1))
|
||||
@@ -418,8 +402,7 @@
|
||||
)
|
||||
|
||||
(defpart 296
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-rnd-flt spt-z (meters 0.3) (meters 0.3) 1.0)
|
||||
@@ -443,8 +426,7 @@
|
||||
)
|
||||
|
||||
(defpart 297
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.1) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -464,8 +446,7 @@
|
||||
)
|
||||
|
||||
(defpart 292
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x2))
|
||||
(sp-rnd-flt spt-num 8.0 16.0 1.0)
|
||||
(sp-rnd-flt spt-x (meters -0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0.25) (meters 1.5) 1.0)
|
||||
@@ -493,8 +474,7 @@
|
||||
)
|
||||
|
||||
(defpart 301
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters -0.0033333334))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters -0.0033333334))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -3.4)
|
||||
)
|
||||
@@ -602,17 +582,7 @@
|
||||
)
|
||||
)
|
||||
(('darkeco)
|
||||
(let ((a1-32 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-32 from) self)
|
||||
(set! (-> a1-32 num-params) 2)
|
||||
(set! (-> a1-32 message) 'attack)
|
||||
(set! (-> a1-32 param 0) (-> arg3 param 0))
|
||||
(let ((a0-57 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a0-57 mode) 'darkeco)
|
||||
(set! (-> a1-32 param 1) (the-as uint a0-57))
|
||||
)
|
||||
(send-event-function arg0 a1-32)
|
||||
)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'darkeco))))
|
||||
(when (= (-> arg0 type) target)
|
||||
(level-hint-spawn
|
||||
(game-text-id sidekick-speech-hint-crate-darkeco2)
|
||||
@@ -668,17 +638,7 @@
|
||||
(('touch)
|
||||
(case (-> self defense)
|
||||
(('darkeco)
|
||||
(let ((a1-41 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-41 from) self)
|
||||
(set! (-> a1-41 num-params) 2)
|
||||
(set! (-> a1-41 message) 'attack)
|
||||
(set! (-> a1-41 param 0) (-> arg3 param 0))
|
||||
(let ((a0-75 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a0-75 mode) 'darkeco)
|
||||
(set! (-> a1-41 param 1) (the-as uint a0-75))
|
||||
)
|
||||
(send-event-function arg0 a1-41)
|
||||
)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'darkeco))))
|
||||
(go-virtual die #f 0)
|
||||
)
|
||||
)
|
||||
@@ -709,10 +669,8 @@
|
||||
|
||||
(defstate wait (crate)
|
||||
:virtual #t
|
||||
:event
|
||||
crate-standard-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
:event crate-standard-event-handler
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(update-transforms! (-> self root-override))
|
||||
(logior! (-> self mask) (process-mask sleep))
|
||||
@@ -721,54 +679,40 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior crate) ja-post)
|
||||
:post (the-as (function none :behavior crate) ja-post)
|
||||
)
|
||||
|
||||
(defstate bounce-on (crate)
|
||||
:virtual #t
|
||||
:event
|
||||
crate-standard-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
:event crate-standard-event-handler
|
||||
:code (behavior ()
|
||||
(while (!= (-> self smush amp) 0.0)
|
||||
(suspend)
|
||||
)
|
||||
(go-virtual wait)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior crate) crate-post)
|
||||
:post (the-as (function none :behavior crate) crate-post)
|
||||
)
|
||||
|
||||
(defstate notice-blue (crate)
|
||||
:virtual #t
|
||||
:event
|
||||
crate-standard-event-handler
|
||||
: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) 'query)
|
||||
(set! (-> a1-0 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-0 param 1) (the-as uint 3))
|
||||
(cond
|
||||
((not (send-event-function *target* a1-0))
|
||||
(logior! (-> self mask) (process-mask sleep-code))
|
||||
(if (not (!= (-> self smush amp) 0.0))
|
||||
(go-virtual wait)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logclear! (-> self mask) (process-mask sleep-code))
|
||||
)
|
||||
:event crate-standard-event-handler
|
||||
:trans (behavior ()
|
||||
(cond
|
||||
((not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
|
||||
(logior! (-> self mask) (process-mask sleep-code))
|
||||
(if (not (!= (-> self smush amp) 0.0))
|
||||
(go-virtual wait)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logclear! (-> self mask) (process-mask sleep-code))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 handle))
|
||||
:code (behavior ((arg0 handle))
|
||||
(set! (-> self target) arg0)
|
||||
(loop
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
@@ -825,31 +769,19 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior crate) crate-post)
|
||||
:post (the-as (function none :behavior crate) crate-post)
|
||||
)
|
||||
|
||||
(defstate die (crate)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('touched)
|
||||
(case (-> self defense)
|
||||
(('darkeco)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(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) 'attack)
|
||||
(set! (-> a1-4 param 0) (-> arg3 param 0))
|
||||
(let ((a2-1 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a2-1 mode) 'darkeco)
|
||||
(set! (-> a1-4 param 1) (the-as uint a2-1))
|
||||
)
|
||||
(send-event-function arg0 a1-4)
|
||||
)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'darkeco))))
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -872,8 +804,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(case (-> self type)
|
||||
((crate-buzzer)
|
||||
(if (and *target* (>= (-> *target* fact-info-target buzzer) 6.0))
|
||||
@@ -883,8 +814,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol) (arg1 int))
|
||||
:code (behavior ((arg0 symbol) (arg1 int))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(if (nonzero? (-> self sound))
|
||||
(stop! (-> self sound))
|
||||
@@ -926,82 +856,54 @@
|
||||
)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 f0-0)) (seconds 0.3))
|
||||
)
|
||||
(let ((s5-7 (get-process *default-dead-pool* touch-tracker #x4000)))
|
||||
(when s5-7
|
||||
(let ((t9-15 (method-of-type touch-tracker activate)))
|
||||
(t9-15 (the-as touch-tracker s5-7) self 'touch-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-7
|
||||
touch-tracker-init
|
||||
(-> self root-override trans)
|
||||
(-> *CRATE-bank* DARKECO_EXPLODE_RADIUS)
|
||||
30
|
||||
)
|
||||
(-> s5-7 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
touch-tracker
|
||||
:init touch-tracker-init
|
||||
(-> self root-override trans)
|
||||
(-> *CRATE-bank* DARKECO_EXPLODE_RADIUS)
|
||||
30
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
(case (-> self look)
|
||||
(('darkeco)
|
||||
(let ((s5-8 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s5-8
|
||||
(let ((t9-18 (method-of-type part-tracker activate)))
|
||||
(t9-18 (the-as part-tracker s5-8) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-8
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 73)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
)
|
||||
(-> s5-8 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 73)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
(('steel 'iron)
|
||||
(let ((s5-9 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s5-9
|
||||
(let ((t9-21 (method-of-type part-tracker activate)))
|
||||
(t9-21 (the-as part-tracker s5-9) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-9
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 72)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
)
|
||||
(-> s5-9 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 72)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s5-10 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s5-10
|
||||
(let ((t9-24 (method-of-type part-tracker activate)))
|
||||
(t9-24 (the-as part-tracker s5-10) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-10
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 71)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
)
|
||||
(-> s5-10 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 71)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1031,8 +933,7 @@
|
||||
|
||||
(defstate special-contents-die (crate)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> arg3 param 0)
|
||||
@@ -1060,10 +961,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans
|
||||
(-> (method-of-type crate die) trans)
|
||||
:code
|
||||
(behavior ()
|
||||
:trans (-> (method-of-type crate die) trans)
|
||||
:code (behavior ()
|
||||
(when (or (= (-> self fact pickup-type) (pickup-type money))
|
||||
(= (-> self defense) 'iron)
|
||||
(= (-> self defense) 'steel)
|
||||
@@ -1314,13 +1213,11 @@
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts
|
||||
((sp-item 302))
|
||||
:parts ((sp-item 302))
|
||||
)
|
||||
|
||||
(defpart 302
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -1370,8 +1267,7 @@
|
||||
|
||||
(defstate wait (crate-buzzer)
|
||||
:virtual #t
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (and (and *target*
|
||||
(>= 327680.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
@@ -1390,8 +1286,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(suspend)
|
||||
(update-transforms! (-> self root-override))
|
||||
@@ -1421,14 +1316,12 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior crate-buzzer) #f)
|
||||
:post (the-as (function none :behavior crate-buzzer) #f)
|
||||
)
|
||||
|
||||
(defstate bounce-on (crate-buzzer)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(while (!= (-> self smush amp) 0.0)
|
||||
(spawn (-> self part) (-> self root-override trans))
|
||||
(suspend)
|
||||
@@ -1468,8 +1361,7 @@
|
||||
|
||||
(defstate wait (pickup-spawner)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (or (not (-> self blocker)) (logtest? (-> self blocker extra perm status) (entity-perm-status complete)))
|
||||
(go-virtual die #t 0)
|
||||
|
||||
@@ -280,167 +280,87 @@
|
||||
(sv-272 symbol)
|
||||
(sv-288 res-lump)
|
||||
)
|
||||
(with-pp
|
||||
(let ((s3-0 (-> arg0 value))
|
||||
(s5-0 (cond
|
||||
((< arg2 0)
|
||||
(let ((v0-0 (get-property-value (-> obj res) 'effect-joint 'exact arg1 (the-as uint128 0) (the-as (pointer res-tag) #f) *res-static-buf*)
|
||||
(let ((s3-0 (-> arg0 value))
|
||||
(s5-0 (cond
|
||||
((< arg2 0)
|
||||
(let ((v0-0 (get-property-value
|
||||
(-> obj res)
|
||||
'effect-joint
|
||||
'exact
|
||||
arg1
|
||||
(the-as uint128 0)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
(if (zero? v0-0)
|
||||
0
|
||||
(the-as int (+ v0-0 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg2
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) 1)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) pp)
|
||||
(set! (-> a1-2 num-params) 3)
|
||||
(set! (-> a1-2 message) 'effect)
|
||||
(set! (-> a1-2 param 0) (the-as uint arg0))
|
||||
(set! (-> a1-2 param 1) (the-as uint arg1))
|
||||
(set! (-> a1-2 param 2) (the-as uint s5-0))
|
||||
(if (send-event-function (-> obj process) a1-2)
|
||||
(return (the-as object 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (symbol->string arg0)))
|
||||
(cond
|
||||
((and (= (-> v1-10 data 0) 101)
|
||||
(= (-> v1-10 data 1) 102)
|
||||
(= (-> v1-10 data 2) 102)
|
||||
(= (-> v1-10 data 3) 101)
|
||||
(= (-> v1-10 data 4) 99)
|
||||
(= (-> v1-10 data 5) 116)
|
||||
(= (-> v1-10 data 6) 45)
|
||||
)
|
||||
(let* ((s3-1 (-> obj process root))
|
||||
(v1-14 (if (and (nonzero? s3-1) (type-type? (-> s3-1 type) collide-shape-moving))
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
(t1-1 (if v1-14
|
||||
(the-as int (-> (the-as collide-shape-moving v1-14) ground-pat))
|
||||
*footstep-surface*
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-11 obj arg0 arg1 s5-0 (-> obj res) (the-as pat-surface t1-1))
|
||||
)
|
||||
)
|
||||
((let ((v1-18 (symbol->string arg0)))
|
||||
(and (= (-> v1-18 data 0) 103)
|
||||
(= (-> v1-18 data 1) 114)
|
||||
(= (-> v1-18 data 2) 111)
|
||||
(= (-> v1-18 data 3) 117)
|
||||
(= (-> v1-18 data 4) 112)
|
||||
(= (-> v1-18 data 5) 45)
|
||||
)
|
||||
)
|
||||
(set! s3-0 (cond
|
||||
((zero? s3-0)
|
||||
(let ((v0-5 (lookup-part-group-pointer-by-name (symbol->string arg0))))
|
||||
(when v0-5
|
||||
(set! (-> arg0 value) v0-5)
|
||||
(set! s3-0 (-> v0-5 0))
|
||||
)
|
||||
)
|
||||
(the-as (pointer sparticle-launch-group) s3-0)
|
||||
)
|
||||
(else
|
||||
(-> (the-as (pointer sparticle-launch-group) s3-0) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (nonzero? s3-0) (= (-> (the-as sparticle-launch-group s3-0) type) sparticle-launch-group))
|
||||
(if *debug-effect-control*
|
||||
(format
|
||||
#t
|
||||
"(~5D) effect group ~A ~A frame ~F joint ~D~%"
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj process name)
|
||||
arg0
|
||||
arg1
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s4-1
|
||||
(let ((t9-7 (method-of-type part-tracker activate)))
|
||||
(t9-7 (the-as part-tracker s4-1) (-> obj process) 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s2-1 run-function-in-process)
|
||||
(s1-0 s4-1)
|
||||
(s0-0 part-tracker-init)
|
||||
)
|
||||
(set! sv-160 -1)
|
||||
(set! sv-176 (the-as symbol #f))
|
||||
(set! sv-192 (the-as symbol #f))
|
||||
(set! sv-208 (the-as symbol #f))
|
||||
(let ((t3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))))
|
||||
((the-as (function object object object object object object object object none) s2-1)
|
||||
s1-0
|
||||
s0-0
|
||||
(the-as sparticle-launch-group s3-0)
|
||||
sv-160
|
||||
sv-176
|
||||
sv-192
|
||||
sv-208
|
||||
t3-0
|
||||
)
|
||||
)
|
||||
(if (zero? v0-0)
|
||||
0
|
||||
(the-as int (+ v0-0 1))
|
||||
)
|
||||
)
|
||||
(-> s4-1 ppointer)
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
arg2
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) 1)
|
||||
(if (send-event (-> obj process) 'effect arg0 arg1 s5-0)
|
||||
(return (the-as object 0))
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (symbol->string arg0)))
|
||||
(cond
|
||||
((and (= (-> v1-10 data 0) 101)
|
||||
(= (-> v1-10 data 1) 102)
|
||||
(= (-> v1-10 data 2) 102)
|
||||
(= (-> v1-10 data 3) 101)
|
||||
(= (-> v1-10 data 4) 99)
|
||||
(= (-> v1-10 data 5) 116)
|
||||
(= (-> v1-10 data 6) 45)
|
||||
)
|
||||
(let* ((s3-1 (-> obj process root))
|
||||
(v1-14 (if (and (nonzero? s3-1) (type-type? (-> s3-1 type) collide-shape-moving))
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
(t1-1 (if v1-14
|
||||
(the-as int (-> (the-as collide-shape-moving v1-14) ground-pat))
|
||||
*footstep-surface*
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-11 obj arg0 arg1 s5-0 (-> obj res) (the-as pat-surface t1-1))
|
||||
)
|
||||
)
|
||||
((let ((v1-18 (symbol->string arg0)))
|
||||
(and (= (-> v1-18 data 0) 103)
|
||||
(= (-> v1-18 data 1) 114)
|
||||
(= (-> v1-18 data 2) 111)
|
||||
(= (-> v1-18 data 3) 117)
|
||||
(= (-> v1-18 data 4) 112)
|
||||
(= (-> v1-18 data 5) 45)
|
||||
)
|
||||
)
|
||||
(set! s3-0 (cond
|
||||
((zero? s3-0)
|
||||
(let ((v0-5 (lookup-part-group-pointer-by-name (symbol->string arg0))))
|
||||
(when v0-5
|
||||
(set! (-> arg0 value) v0-5)
|
||||
(set! s3-0 (-> v0-5 0))
|
||||
)
|
||||
)
|
||||
(the-as (pointer sparticle-launch-group) s3-0)
|
||||
)
|
||||
(else
|
||||
(-> (the-as (pointer sparticle-launch-group) s3-0) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= arg0 'camera-shake)
|
||||
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
|
||||
)
|
||||
((zero? s3-0)
|
||||
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sparticle-launcher)
|
||||
(if *debug-effect-control*
|
||||
(format
|
||||
#t
|
||||
"(~5D) effect part ~A ~A frame ~F joint ~D~%"
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj process name)
|
||||
arg0
|
||||
arg1
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"-----> (~5D) effect part ~A ~A frame ~F joint ~D~%"
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj process name)
|
||||
arg0
|
||||
arg1
|
||||
s5-0
|
||||
)
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(the-as sparticle-launcher s3-0)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sparticle-launch-group)
|
||||
(when (and (nonzero? s3-0) (= (-> (the-as sparticle-launch-group s3-0) type) sparticle-launch-group))
|
||||
(if *debug-effect-control*
|
||||
(format
|
||||
#t
|
||||
@@ -452,96 +372,174 @@
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(let ((s4-3 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s4-3
|
||||
(let ((t9-19 (method-of-type part-tracker activate)))
|
||||
(t9-19 (the-as part-tracker s4-3) (-> obj process) 'part-tracker (the-as pointer #x70004000))
|
||||
(let ((s4-1 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s4-1
|
||||
(let ((t9-7 (method-of-type part-tracker activate)))
|
||||
(t9-7 (the-as part-tracker s4-1) (-> obj process) 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s2-3 run-function-in-process)
|
||||
(s1-2 s4-3)
|
||||
(s0-2 part-tracker-init)
|
||||
(let ((s2-1 run-function-in-process)
|
||||
(s1-0 s4-1)
|
||||
(s0-0 part-tracker-init)
|
||||
)
|
||||
(set! sv-224 -1)
|
||||
(set! sv-240 (the-as symbol #f))
|
||||
(set! sv-256 (the-as symbol #f))
|
||||
(set! sv-272 (the-as symbol #f))
|
||||
(let ((t3-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))))
|
||||
((the-as (function object object object object object object object object none) s2-3)
|
||||
s1-2
|
||||
s0-2
|
||||
s3-0
|
||||
sv-224
|
||||
sv-240
|
||||
sv-256
|
||||
sv-272
|
||||
t3-1
|
||||
(set! sv-160 -1)
|
||||
(set! sv-176 (the-as symbol #f))
|
||||
(set! sv-192 (the-as symbol #f))
|
||||
(set! sv-208 (the-as symbol #f))
|
||||
(let ((t3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))))
|
||||
((the-as (function object object object object object object object object none) s2-1)
|
||||
s1-0
|
||||
s0-0
|
||||
(the-as sparticle-launch-group s3-0)
|
||||
sv-160
|
||||
sv-176
|
||||
sv-192
|
||||
sv-208
|
||||
t3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s4-3 ppointer)
|
||||
(-> s4-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sound-spec)
|
||||
(sound-play-by-spec
|
||||
(the-as sound-spec s3-0)
|
||||
(new-sound-id)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))
|
||||
)
|
||||
((= arg0 'camera-shake)
|
||||
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
|
||||
)
|
||||
((zero? s3-0)
|
||||
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sparticle-launcher)
|
||||
(if *debug-effect-control*
|
||||
(format
|
||||
#t
|
||||
"(~5D) effect part ~A ~A frame ~F joint ~D~%"
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj process name)
|
||||
arg0
|
||||
arg1
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"-----> (~5D) effect part ~A ~A frame ~F joint ~D~%"
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj process name)
|
||||
arg0
|
||||
arg1
|
||||
s5-0
|
||||
)
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(the-as sparticle-launcher s3-0)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sparticle-launch-group)
|
||||
(if *debug-effect-control*
|
||||
(format
|
||||
#t
|
||||
"(~5D) effect group ~A ~A frame ~F joint ~D~%"
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj process name)
|
||||
arg0
|
||||
arg1
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(let ((s4-3 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s4-3
|
||||
(let ((t9-19 (method-of-type part-tracker activate)))
|
||||
(t9-19 (the-as part-tracker s4-3) (-> obj process) 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s2-3 run-function-in-process)
|
||||
(s1-2 s4-3)
|
||||
(s0-2 part-tracker-init)
|
||||
)
|
||||
(set! sv-224 -1)
|
||||
(set! sv-240 (the-as symbol #f))
|
||||
(set! sv-256 (the-as symbol #f))
|
||||
(set! sv-272 (the-as symbol #f))
|
||||
(let ((t3-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))))
|
||||
((the-as (function object object object object object object object object none) s2-3)
|
||||
s1-2
|
||||
s0-2
|
||||
s3-0
|
||||
sv-224
|
||||
sv-240
|
||||
sv-256
|
||||
sv-272
|
||||
t3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s4-3 ppointer)
|
||||
)
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) death-info)
|
||||
(let ((v1-67 (-> obj process draw)))
|
||||
(let ((a1-42 (-> (the-as death-info s3-0) vertex-skip))
|
||||
(a0-55
|
||||
(max
|
||||
2
|
||||
(the-as int (/ (-> (the-as death-info s3-0) timer) (the-as uint (the int (-> *display* time-factor)))))
|
||||
)
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sound-spec)
|
||||
(sound-play-by-spec
|
||||
(the-as sound-spec s3-0)
|
||||
(new-sound-id)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))
|
||||
)
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) death-info)
|
||||
(let ((v1-67 (-> obj process draw)))
|
||||
(let ((a1-42 (-> (the-as death-info s3-0) vertex-skip))
|
||||
(a0-55
|
||||
(max
|
||||
2
|
||||
(the-as int (/ (-> (the-as death-info s3-0) timer) (the-as uint (the int (-> *display* time-factor)))))
|
||||
)
|
||||
)
|
||||
(when (= (-> *setting-control* current video-mode) 'pal)
|
||||
(if (< (the-as uint 1) a1-42)
|
||||
(set! a1-42 (/ (the-as uint (* (the-as uint 50) a1-42)) (the-as uint 60)))
|
||||
)
|
||||
)
|
||||
(let ((a2-29 (-> *display* frames (-> *display* last-screen) frame run-time)))
|
||||
(cond
|
||||
((< 9000 a2-29)
|
||||
(set! a1-42 (* a1-42 4))
|
||||
)
|
||||
((< 7000 a2-29)
|
||||
(set! a1-42 (* a1-42 2))
|
||||
)
|
||||
(when (= (-> *setting-control* current video-mode) 'pal)
|
||||
(if (< (the-as uint 1) a1-42)
|
||||
(set! a1-42 (/ (the-as uint (* (the-as uint 50) a1-42)) (the-as uint 60)))
|
||||
)
|
||||
)
|
||||
(set! (-> v1-67 death-vertex-skip) a1-42)
|
||||
(set! (-> v1-67 death-effect) (-> (the-as death-info s3-0) effect))
|
||||
(set! (-> v1-67 death-timer) (+ a0-55 1))
|
||||
)
|
||||
(set! (-> v1-67 death-timer-org) (-> v1-67 death-timer))
|
||||
(set! (-> v1-67 death-draw-overlap) (-> (the-as death-info s3-0) overlap))
|
||||
)
|
||||
(when (-> (the-as death-info s3-0) sound)
|
||||
(let* ((s2-5 obj)
|
||||
(s1-3 (method-of-object s2-5 dummy-12))
|
||||
(s0-3 (-> (the-as death-info s3-0) sound))
|
||||
)
|
||||
(set! sv-288 (-> obj res))
|
||||
(let ((t1-11 (string->sound-name (symbol->string (-> (the-as death-info s3-0) sound)))))
|
||||
(s1-3 s2-5 s0-3 arg1 s5-0 sv-288 t1-11)
|
||||
(let ((a2-29 (-> *display* frames (-> *display* last-screen) frame run-time)))
|
||||
(cond
|
||||
((< 9000 a2-29)
|
||||
(set! a1-42 (* a1-42 4))
|
||||
)
|
||||
((< 7000 a2-29)
|
||||
(set! a1-42 (* a1-42 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-67 death-vertex-skip) a1-42)
|
||||
(set! (-> v1-67 death-effect) (-> (the-as death-info s3-0) effect))
|
||||
(set! (-> v1-67 death-timer) (+ a0-55 1))
|
||||
)
|
||||
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
|
||||
(set! (-> v1-67 death-timer-org) (-> v1-67 death-timer))
|
||||
(set! (-> v1-67 death-draw-overlap) (-> (the-as death-info s3-0) overlap))
|
||||
)
|
||||
(else
|
||||
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
)
|
||||
(when (-> (the-as death-info s3-0) sound)
|
||||
(let* ((s2-5 obj)
|
||||
(s1-3 (method-of-object s2-5 dummy-12))
|
||||
(s0-3 (-> (the-as death-info s3-0) sound))
|
||||
)
|
||||
(set! sv-288 (-> obj res))
|
||||
(let ((t1-11 (string->sound-name (symbol->string (-> (the-as death-info s3-0) sound)))))
|
||||
(s1-3 s2-5 s0-3 arg1 s5-0 sv-288 t1-11)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
|
||||
)
|
||||
(else
|
||||
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod dummy-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
|
||||
|
||||
@@ -54,6 +54,27 @@
|
||||
(sf31)
|
||||
)
|
||||
|
||||
(defmacro static-attack-info (&key (mask ()) &rest args)
|
||||
(when (!= (length args) 1)
|
||||
(error "static-attack-info can only have 1 arg"))
|
||||
(let ((mask-actual mask)
|
||||
(arg (car args))
|
||||
)
|
||||
(when (not (null? (assoc 'shove-up arg))) (cons! mask-actual 'shove-up))
|
||||
(when (not (null? (assoc 'shove-back arg))) (cons! mask-actual 'shove-back))
|
||||
(when (not (null? (assoc 'mode arg))) (cons! mask-actual 'mode))
|
||||
(when (not (null? (assoc 'vector arg))) (cons! mask-actual 'vector))
|
||||
(when (not (null? (assoc 'angle arg))) (cons! mask-actual 'angle))
|
||||
(when (not (null? (assoc 'control arg))) (cons! mask-actual 'control))
|
||||
`(let ((atk (new 'static 'attack-info :mask (attack-mask ,@mask-actual))))
|
||||
,@(apply (lambda (x) (if (eq? (car x) 'vector)
|
||||
`(vector-copy! (-> atk ,(car x)) ,(cadr x))
|
||||
`(set! (-> atk ,(car x)) ,(cadr x))
|
||||
)) arg)
|
||||
atk)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -179,6 +200,26 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defenum attack-mask
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(trans)
|
||||
(vector)
|
||||
(intersection)
|
||||
(attacker)
|
||||
(invinc-time)
|
||||
(mode)
|
||||
(shove-back)
|
||||
(shove-up)
|
||||
(speed)
|
||||
(dist)
|
||||
(control)
|
||||
(angle)
|
||||
(rotate-to)
|
||||
(atki13)
|
||||
)
|
||||
|
||||
;; The attack-info is generated by attackers and sent to target.
|
||||
(deftype attack-info (structure)
|
||||
((trans vector :inline :offset-assert 0)
|
||||
@@ -186,7 +227,7 @@
|
||||
(intersection vector :inline :offset-assert 32)
|
||||
(attacker handle :offset-assert 48)
|
||||
(invinc-time time-frame :offset-assert 56)
|
||||
(mask uint32 :offset-assert 64) ;; todo enum here.
|
||||
(mask attack-mask :offset-assert 64)
|
||||
(mode symbol :offset-assert 68)
|
||||
(shove-back meters :offset-assert 72)
|
||||
(shove-up meters :offset-assert 76)
|
||||
|
||||
@@ -1735,7 +1735,7 @@
|
||||
)
|
||||
|
||||
(defun auto-save-command ((arg0 symbol) (arg1 int) (arg2 int) (arg3 process-tree))
|
||||
(process-new auto-save auto-save-init-by-other arg0 arg3 arg1 arg2)
|
||||
(process-spawn auto-save arg0 arg3 arg1 arg2)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
|
||||
(define-extern beach-part-grotto-1 (state beach-part))
|
||||
|
||||
(defmacro manipy-spawn (trans entity skel arg &key (from *default-dead-pool*) &key (to *default-pool*) &key (name #f) &key (stack-size #x4000) &key (stack *scratch-memory-top*))
|
||||
`(process-spawn manipy :init manipy-init ,trans ,entity ,skel ,arg :from ,from :to ,to :name ,name :stack-size ,stack-size :stack ,stack)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defbehavior clone-anim-once process-drawable ((arg0 handle) (arg1 int) (arg2 symbol) (arg3 string))
|
||||
@@ -102,23 +106,16 @@
|
||||
)
|
||||
|
||||
(defstate swingpole-stance (swingpole)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (and *target*
|
||||
(< (vector-vector-distance (-> self root trans) (-> *target* control unknown-vector90)) (-> self range))
|
||||
(logtest? (-> *target* control root-prim prim-core action) (collide-action ca-6))
|
||||
(< (-> *target* control unknown-vector90 y) (+ (-> self root trans y) (* 0.5 (-> self range))))
|
||||
)
|
||||
(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) 'pole-grab)
|
||||
(set! (-> a1-1 param 0) (the-as uint self))
|
||||
(if (send-event-function *target* a1-1)
|
||||
(go swingpole-active)
|
||||
)
|
||||
)
|
||||
(if (send-event *target* 'pole-grab self)
|
||||
(go swingpole-active)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -127,8 +124,7 @@
|
||||
)
|
||||
|
||||
(defstate swingpole-active (swingpole)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(while (and *target* (= (handle->process (-> *target* control unknown-handle10)) self))
|
||||
(suspend)
|
||||
@@ -162,8 +158,7 @@
|
||||
|
||||
(defstate die (process-hidden)
|
||||
:virtual #t
|
||||
:code
|
||||
(the-as (function none :behavior process-hidden) nothing)
|
||||
:code (the-as (function none :behavior process-hidden) nothing)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! process-hidden ((obj process-hidden) (arg0 entity-actor))
|
||||
@@ -190,8 +185,7 @@
|
||||
|
||||
|
||||
(defstate manipy-idle (manipy)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
@@ -393,8 +387,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (!= (-> self cur-trans-hook) (-> self new-trans-hook))
|
||||
(set! (-> self cur-trans-hook) (-> self new-trans-hook))
|
||||
)
|
||||
@@ -429,8 +422,7 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(logclear! (-> self mask) (process-mask heap-shrunk))
|
||||
(loop
|
||||
((-> self cur-post-hook))
|
||||
@@ -447,8 +439,7 @@
|
||||
)
|
||||
(('copy-parent)
|
||||
(ja :num-func num-func-identity
|
||||
:frame-num
|
||||
(-> (the-as process-drawable (ppointer->process (-> self parent))) skel root-channel 0 frame-num)
|
||||
:frame-num (-> (the-as process-drawable (ppointer->process (-> self parent))) skel root-channel 0 frame-num)
|
||||
)
|
||||
)
|
||||
(('clone-parent)
|
||||
@@ -587,8 +578,7 @@
|
||||
)
|
||||
|
||||
(defstate part-tracker-process (part-tracker)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self start-time) (-> *display* base-frame-counter))
|
||||
(while (< (- (-> *display* base-frame-counter) (-> self start-time)) (-> self duration))
|
||||
(let ((gp-0 (handle->process (-> self target))))
|
||||
@@ -798,16 +788,7 @@
|
||||
|
||||
(defbehavior process-release? process ((arg0 process))
|
||||
(let ((gp-0 (command-get-process arg0 *target*)))
|
||||
(the-as symbol (if (and 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) 'query)
|
||||
(set! (-> a1-1 param 0) (the-as uint 'mode))
|
||||
(send-event-function gp-0 a1-1)
|
||||
)
|
||||
'target-grab
|
||||
)
|
||||
(the-as symbol (if (and gp-0 (send-event gp-0 'query 'mode) 'target-grab)
|
||||
(send-event gp-0 'end-mode)
|
||||
#t
|
||||
)
|
||||
@@ -1097,8 +1078,7 @@
|
||||
)
|
||||
|
||||
(defstate camera-tracker-process (camera-tracker)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 uint))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
@@ -1121,8 +1101,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(if (-> self entity-override)
|
||||
(dummy-30 (-> self entity-override) (entity-perm-status bit-3) #t)
|
||||
)
|
||||
@@ -1134,16 +1113,14 @@
|
||||
(hide-hud-quick)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(if (-> self entity-override)
|
||||
(dummy-30 (-> self entity-override) (entity-perm-status bit-3) #f)
|
||||
)
|
||||
(send-event *camera* 'clear-entity)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((-> self script-func)
|
||||
((-> self script-func))
|
||||
@@ -1224,8 +1201,7 @@
|
||||
|
||||
|
||||
(defstate med-res-level-idle (med-res-level)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars (v1-37 float))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf16 :class vf)
|
||||
@@ -1277,8 +1253,7 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior med-res-level) ja-post)
|
||||
:post (the-as (function none :behavior med-res-level) ja-post)
|
||||
)
|
||||
|
||||
(define *lev-string* (new 'global 'string 64 (the-as string #f)))
|
||||
@@ -1353,8 +1328,7 @@
|
||||
)
|
||||
|
||||
(defstate part-spawner-active (part-spawner)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
@@ -1374,8 +1348,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (-> self enable)
|
||||
(spawn (-> self part) (-> self root trans))
|
||||
@@ -1473,8 +1446,7 @@
|
||||
(defpartgroup group-beach-launcher
|
||||
:id 37
|
||||
:bounds (static-bspherem 0 3 0 5)
|
||||
:parts
|
||||
((sp-item 45 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
:parts ((sp-item 45 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 46 :fade-after (meters 70) :falloff-to (meters 100) :flags (is-3d))
|
||||
(sp-item 47 :fade-after (meters 70) :falloff-to (meters 100) :flags (is-3d))
|
||||
(sp-item 48 :fade-after (meters 50) :falloff-to (meters 80))
|
||||
@@ -1483,8 +1455,7 @@
|
||||
)
|
||||
|
||||
(defpart 45
|
||||
:init-specs
|
||||
((sp-flt spt-num 1.5)
|
||||
:init-specs ((sp-flt spt-num 1.5)
|
||||
(sp-flt spt-x (meters 1.5))
|
||||
(sp-flt spt-y (meters -0.5))
|
||||
(sp-int spt-rot-x 5)
|
||||
@@ -1501,13 +1472,11 @@
|
||||
)
|
||||
|
||||
(defpart 50
|
||||
:init-specs
|
||||
((sp-flt spt-fade-b -4.551111))
|
||||
:init-specs ((sp-flt spt-fade-b -4.551111))
|
||||
)
|
||||
|
||||
(defpart 46
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 1.8) 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
@@ -1527,8 +1496,7 @@
|
||||
)
|
||||
|
||||
(defpart 47
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 2.0)
|
||||
(sp-rnd-flt spt-x (meters 1.8) (meters 1) 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
@@ -1548,8 +1516,7 @@
|
||||
)
|
||||
|
||||
(defpart 48
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
|
||||
(sp-flt spt-num 1.5)
|
||||
(sp-rnd-flt spt-x (meters 2.9) (meters 2.5) 1.0)
|
||||
(sp-flt spt-y (meters -0.5))
|
||||
@@ -1573,8 +1540,7 @@
|
||||
)
|
||||
|
||||
(defpart 49
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-rnd-flt spt-x (meters 2.9) (meters 2.5) 1.0)
|
||||
(sp-flt spt-y (meters -0.5))
|
||||
@@ -1600,15 +1566,13 @@
|
||||
)
|
||||
|
||||
(defpart 51
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.18))
|
||||
:init-specs ((sp-flt spt-fade-a -0.18))
|
||||
)
|
||||
|
||||
(defpartgroup group-jungle-launcher
|
||||
:id 38
|
||||
:bounds (static-bspherem 0 3 0 5)
|
||||
:parts
|
||||
((sp-item 45 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
:parts ((sp-item 45 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 52 :fade-after (meters 70) :falloff-to (meters 100) :flags (is-3d))
|
||||
(sp-item 53 :fade-after (meters 70) :falloff-to (meters 100) :flags (is-3d))
|
||||
(sp-item 54 :fade-after (meters 70) :falloff-to (meters 100))
|
||||
@@ -1616,8 +1580,7 @@
|
||||
)
|
||||
|
||||
(defpart 52
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 1.4) 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
@@ -1637,8 +1600,7 @@
|
||||
)
|
||||
|
||||
(defpart 53
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 2.0)
|
||||
(sp-rnd-flt spt-x (meters 1.4) (meters 0.9) 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
@@ -1658,8 +1620,7 @@
|
||||
)
|
||||
|
||||
(defpart 54
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-rnd-flt spt-x (meters 2.9) (meters 2.5) 1.0)
|
||||
(sp-flt spt-y (meters -0.5))
|
||||
@@ -1687,8 +1648,7 @@
|
||||
(defpartgroup group-swamp-launcher
|
||||
:id 39
|
||||
:bounds (static-bspherem 0 3 0 5)
|
||||
:parts
|
||||
((sp-item 45 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
:parts ((sp-item 45 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 46 :fade-after (meters 70) :falloff-to (meters 100) :flags (is-3d))
|
||||
(sp-item 47 :fade-after (meters 70) :falloff-to (meters 100) :flags (is-3d))
|
||||
(sp-item 55 :fade-after (meters 70) :falloff-to (meters 100))
|
||||
@@ -1696,8 +1656,7 @@
|
||||
)
|
||||
|
||||
(defpart 55
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-rnd-flt spt-x (meters 2.9) (meters 2.5) 1.0)
|
||||
(sp-flt spt-y (meters -0.5))
|
||||
@@ -1728,7 +1687,7 @@
|
||||
(let ((s5-0 (new-stack-matrix0))
|
||||
(gp-0 (vector-reset! (new 'stack-no-clear 'vector)))
|
||||
)
|
||||
(let* ((f0-0 (analog-input-horizontal-third (the-as int (+ (-> *cpad-list* cpads 0 rightx) -128)) 0.0 48.0 110.0 -1.0)) ;; changed for pc port
|
||||
(let* ((f0-0 (analog-input (the-as int (+ (-> *cpad-list* cpads 0 rightx) -128)) 0.0 48.0 110.0 -1.0))
|
||||
(f1-1 (* -546.13336 f0-0))
|
||||
(f0-2 (fmin 546.13336 (fmax -546.13336 f1-1)))
|
||||
)
|
||||
@@ -1742,8 +1701,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-launcher-shortfall (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -1753,8 +1711,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
|
||||
@@ -1775,22 +1732,20 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> *display* base-frame-counter)))
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
|
||||
(send-event *camera* 'teleport)
|
||||
(if (and (-> *camera* on-ground) (>= (- (-> *display* base-frame-counter) gp-0) (seconds 1)))
|
||||
(send-event *camera* 'change-state *camera-base-mode* 150)
|
||||
(send-event *camera* 'change-state *camera-base-mode* (seconds 0.5))
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -1817,8 +1772,7 @@
|
||||
)
|
||||
|
||||
(defstate cam-launcher-longfall (camera-slave)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('teleport)
|
||||
#f
|
||||
@@ -1828,8 +1782,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(new 'stack-no-clear 'vector)
|
||||
(vector-negate! (-> self view-flat) (-> self tracking inv-mat vector 2))
|
||||
@@ -1843,16 +1796,14 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(cam-launcher-long-joystick)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (-> *display* base-frame-counter)))
|
||||
(loop
|
||||
(when (not (paused?))
|
||||
@@ -1896,7 +1847,7 @@
|
||||
(set! (-> self trans z) (-> *camera* tpos-curr z))
|
||||
(vector+! (-> self trans) (-> self trans) (-> self view-flat))
|
||||
(if (and (-> *camera* on-ground) (>= (- (-> *display* base-frame-counter) gp-0) (seconds 1)))
|
||||
(send-event *camera* 'change-state *camera-base-mode* 150)
|
||||
(send-event *camera* 'change-state *camera-base-mode* (seconds 0.5))
|
||||
)
|
||||
)
|
||||
(vector-reset! (-> self tracking follow-off))
|
||||
@@ -1916,8 +1867,7 @@
|
||||
)
|
||||
|
||||
(defstate launcher-idle (launcher)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('instant-death)
|
||||
(go launcher-deactivated)
|
||||
@@ -1928,46 +1878,25 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (and *target* (>= (-> self active-distance)
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(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) 'query)
|
||||
(set! (-> a1-1 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-1 param 1) (the-as uint 3))
|
||||
(cond
|
||||
((send-event-function *target* a1-1)
|
||||
(go launcher-active)
|
||||
)
|
||||
(else
|
||||
(let ((gp-0 'target-launch)
|
||||
(a1-2 (new 'stack-no-clear 'event-message-block))
|
||||
)
|
||||
(set! (-> a1-2 from) self)
|
||||
(set! (-> a1-2 num-params) 1)
|
||||
(set! (-> a1-2 message) 'query)
|
||||
(set! (-> a1-2 param 0) (the-as uint 'mode))
|
||||
(if (= (send-event-function *target* a1-2) gp-0)
|
||||
(send-event *target* 'end-mode)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((send-event *target* 'query 'powerup (pickup-type eco-blue))
|
||||
(go launcher-active)
|
||||
)
|
||||
(else
|
||||
(let ((gp-0 'target-launch))
|
||||
(if (= (send-event *target* 'query 'mode) gp-0)
|
||||
(send-event *target* 'end-mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (and *target* (>= 32768.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(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) 'query)
|
||||
(set! (-> a1-5 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-5 param 1) (the-as uint 3))
|
||||
(not (send-event-function *target* a1-5))
|
||||
)
|
||||
(not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
|
||||
)
|
||||
(level-hint-spawn
|
||||
(game-text-id daxter-launcher-no-eco)
|
||||
@@ -1980,13 +1909,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(the-as (function none :behavior launcher) anim-loop)
|
||||
:code (the-as (function none :behavior launcher) anim-loop)
|
||||
)
|
||||
|
||||
(defstate launcher-active (launcher)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (or (= arg2 'touch) (= arg2 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(send-event arg0 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
|
||||
@@ -2001,8 +1928,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
|
||||
(set! (-> v1-0 command) (sound-command set-param))
|
||||
(set! (-> v1-0 id) (-> self sound-id))
|
||||
@@ -2014,20 +1940,12 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (or (or (not *target*) (< (-> self active-distance)
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(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) 'query)
|
||||
(set! (-> a1-1 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-1 param 1) (the-as uint 3))
|
||||
(not (send-event-function *target* a1-1))
|
||||
)
|
||||
(not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
|
||||
)
|
||||
(go launcher-idle)
|
||||
)
|
||||
@@ -2043,8 +1961,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(sound-play-by-name (static-sound-name "launch-start") (new-sound-id) 1024 0 0 1 #t)
|
||||
(anim-loop)
|
||||
(none)
|
||||
@@ -2052,8 +1969,7 @@
|
||||
)
|
||||
|
||||
(defstate launcher-deactivated (launcher)
|
||||
:code
|
||||
(the-as (function none :behavior launcher) anim-loop)
|
||||
:code (the-as (function none :behavior launcher) anim-loop)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! launcher ((obj launcher) (arg0 entity-actor))
|
||||
@@ -2176,8 +2092,7 @@
|
||||
)
|
||||
|
||||
(defstate touch-tracker-idle (touch-tracker)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
@@ -2188,24 +2103,19 @@
|
||||
((= (-> self event) 'attack)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) (the-as process v1-1))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) (-> self event))
|
||||
(set! (-> a1-2 param 0) (the-as uint #f))
|
||||
(let ((a2-2 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a2-2 mode) (the-as symbol (-> self event-mode)))
|
||||
(set! (-> a1-2 param 1) (the-as uint a2-2))
|
||||
)
|
||||
(send-event-function arg0 a1-2)
|
||||
(send-event
|
||||
arg0
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(static-attack-info ((mode (the-as symbol (-> self event-mode)))))
|
||||
)
|
||||
)
|
||||
((= (-> v1-1 type) target)
|
||||
(send-event
|
||||
arg0
|
||||
(-> self event)
|
||||
:from
|
||||
(the-as process v1-1)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(-> self event-mode)
|
||||
(-> *target* control unknown-dword50)
|
||||
@@ -2279,8 +2189,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while ((-> self run-function))
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
@@ -2427,8 +2336,7 @@
|
||||
)
|
||||
|
||||
(defpart 2528
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xc :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc :page #x2))
|
||||
(sp-func spt-birth-func 'birth-func-set-quat)
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 2) (meters 0.5) 1.0)
|
||||
|
||||
@@ -503,7 +503,7 @@
|
||||
)
|
||||
|
||||
;; spawn a process that blacks out the screen, turns things off, and kills the game.
|
||||
(if (process-new-function process :stack *scratch-memory-top*
|
||||
(if (process-spawn-function process :stack *scratch-memory-top*
|
||||
(lambda :behavior process ()
|
||||
(set-blackout-frames (seconds 100))
|
||||
(set! (-> *setting-control* default allow-pause) #f)
|
||||
@@ -947,8 +947,8 @@
|
||||
)
|
||||
)
|
||||
(set! *run* #t)
|
||||
(let ((new-dproc (process-new-function process display-loop :name 'display
|
||||
:from *4k-dead-pool* :to *display-pool*)))
|
||||
(let ((new-dproc (process-spawn-function process display-loop :name 'display
|
||||
:from *4k-dead-pool* :to *display-pool*)))
|
||||
(set! *dproc* (the process (ppointer->process new-dproc)))
|
||||
)
|
||||
(cond
|
||||
|
||||
@@ -66,8 +66,7 @@
|
||||
)
|
||||
|
||||
(defpart 255
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -85,8 +84,7 @@
|
||||
)
|
||||
|
||||
(defpart 256
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -104,8 +102,7 @@
|
||||
)
|
||||
|
||||
(defpart 257
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1f :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1f :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 3.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 1.5) 1.0)
|
||||
(sp-int spt-rot-x 4)
|
||||
@@ -124,8 +121,7 @@
|
||||
)
|
||||
|
||||
(defpart 259
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1f :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1f :page #x2))
|
||||
(sp-rnd-flt spt-num 0.0 3.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 1.5) 1.0)
|
||||
(sp-int spt-rot-x 4)
|
||||
@@ -144,8 +140,7 @@
|
||||
)
|
||||
|
||||
(defpart 258
|
||||
:init-specs
|
||||
((sp-flt spt-r 64.0)
|
||||
:init-specs ((sp-flt spt-r 64.0)
|
||||
(sp-flt spt-g 64.0)
|
||||
(sp-flt spt-fade-r -1.0)
|
||||
(sp-flt spt-fade-g -0.4)
|
||||
@@ -154,8 +149,7 @@
|
||||
)
|
||||
|
||||
(defpart 260
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.15) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -177,13 +171,11 @@
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts
|
||||
((sp-item 261) (sp-item 262) (sp-item 263 :flags (is-3d)) (sp-item 264) (sp-item 265 :flags (is-3d)))
|
||||
:parts ((sp-item 261) (sp-item 262) (sp-item 263 :flags (is-3d)) (sp-item 264) (sp-item 265 :flags (is-3d)))
|
||||
)
|
||||
|
||||
(defpart 264
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 32.0)
|
||||
(sp-flt spt-y (meters 0.5))
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 3) 1.0)
|
||||
@@ -206,8 +198,7 @@
|
||||
)
|
||||
|
||||
(defpart 266
|
||||
:init-specs
|
||||
((sp-flt spt-r 0.0)
|
||||
:init-specs ((sp-flt spt-r 0.0)
|
||||
(sp-rnd-flt spt-g 32.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-b 192.0 63.0 1.0)
|
||||
(sp-rnd-int spt-a 0 63 1.0)
|
||||
@@ -217,8 +208,7 @@
|
||||
)
|
||||
|
||||
(defpart 265
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-y (meters 0.5))
|
||||
(sp-flt spt-scale-x (meters 0))
|
||||
@@ -237,13 +227,11 @@
|
||||
)
|
||||
|
||||
(defpart 267
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -2.1333334))
|
||||
:init-specs ((sp-flt spt-fade-a -2.1333334))
|
||||
)
|
||||
|
||||
(defpart 263
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-y (meters 0.5))
|
||||
(sp-flt spt-scale-x (meters 0))
|
||||
@@ -263,13 +251,11 @@
|
||||
)
|
||||
|
||||
(defpart 268
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -1.4222223))
|
||||
:init-specs ((sp-flt spt-fade-a -1.4222223))
|
||||
)
|
||||
|
||||
(defpart 261
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 32.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -293,8 +279,7 @@
|
||||
)
|
||||
|
||||
(defpart 262
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 12.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -318,8 +303,7 @@
|
||||
)
|
||||
|
||||
(defpart 269
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -337,8 +321,7 @@
|
||||
)
|
||||
|
||||
(defpart 270
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -356,8 +339,7 @@
|
||||
)
|
||||
|
||||
(defpart 271
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-rnd-flt spt-num 0.5 2.0 1.0)
|
||||
(sp-flt spt-y (meters -0.05))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
|
||||
@@ -384,13 +366,11 @@
|
||||
)
|
||||
|
||||
(defpart 272
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r 0.0))
|
||||
:init-specs ((sp-flt spt-fade-r 0.0))
|
||||
)
|
||||
|
||||
(defpart 273
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -408,8 +388,7 @@
|
||||
)
|
||||
|
||||
(defpart 274
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -427,8 +406,7 @@
|
||||
)
|
||||
|
||||
(defpart 275
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-rnd-flt spt-num 0.5 2.0 1.0)
|
||||
(sp-flt spt-y (meters -0.05))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
|
||||
@@ -455,13 +433,11 @@
|
||||
)
|
||||
|
||||
(defpart 276
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r 0.0))
|
||||
:init-specs ((sp-flt spt-fade-r 0.0))
|
||||
)
|
||||
|
||||
(defpart 277
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -479,8 +455,7 @@
|
||||
)
|
||||
|
||||
(defpart 278
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -498,8 +473,7 @@
|
||||
)
|
||||
|
||||
(defpart 279
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-rnd-flt spt-num 0.5 2.0 1.0)
|
||||
(sp-flt spt-y (meters -0.05))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
|
||||
@@ -526,8 +500,7 @@
|
||||
)
|
||||
|
||||
(defpart 280
|
||||
:init-specs
|
||||
((sp-flt spt-fade-g 0.0))
|
||||
:init-specs ((sp-flt spt-fade-g 0.0))
|
||||
)
|
||||
|
||||
(defun eco-blue-glow ((arg0 vector))
|
||||
|
||||
@@ -177,8 +177,7 @@
|
||||
:id 102
|
||||
:duration 300
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts
|
||||
((sp-item 349 :flags (launch-asap) :binding 350)
|
||||
:parts ((sp-item 349 :flags (launch-asap) :binding 350)
|
||||
(sp-item 350 :flags (start-dead launch-asap) :binding 351)
|
||||
(sp-item 351 :flags (start-dead launch-asap) :binding 352)
|
||||
(sp-item 352 :flags (start-dead) :binding 353)
|
||||
@@ -216,8 +215,7 @@
|
||||
)
|
||||
|
||||
(defpart 349
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.01))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -229,8 +227,7 @@
|
||||
)
|
||||
|
||||
(defpart 350
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 16) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 4) (meters 16) 1.0)
|
||||
@@ -249,8 +246,7 @@
|
||||
)
|
||||
|
||||
(defpart 351
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 2.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-flt spt-z (meters 0))
|
||||
@@ -269,8 +265,7 @@
|
||||
)
|
||||
|
||||
(defpart 352
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.5) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -288,8 +283,7 @@
|
||||
)
|
||||
|
||||
(defpart 353
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-rnd-flt spt-num 0.5 0.5 1.0)
|
||||
(sp-flt spt-y (meters -0.05))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.1) 1.0)
|
||||
@@ -316,16 +310,14 @@
|
||||
)
|
||||
|
||||
(defpart 354
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r 0.0))
|
||||
:init-specs ((sp-flt spt-fade-r 0.0))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-yellow-eco-fireball-launcher
|
||||
:id 103
|
||||
:duration 600
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts
|
||||
((sp-item 355 :flags (launch-asap))
|
||||
:parts ((sp-item 355 :flags (launch-asap))
|
||||
(sp-item 356 :flags (bit1) :period 630 :length 15)
|
||||
(sp-item 357 :flags (launch-asap))
|
||||
(sp-item 358 :flags (launch-asap) :binding 359)
|
||||
@@ -349,8 +341,7 @@
|
||||
)
|
||||
|
||||
(defpart 355
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 8))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -368,8 +359,7 @@
|
||||
)
|
||||
|
||||
(defpart 357
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 5.0)
|
||||
(sp-rnd-flt spt-x (meters -0.6) (meters 1.2) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -0.6) (meters 1.2) 1.0)
|
||||
@@ -393,8 +383,7 @@
|
||||
)
|
||||
|
||||
(defpart 356
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 12.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.1) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -417,8 +406,7 @@
|
||||
)
|
||||
|
||||
(defpart 360
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 24.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.1) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -441,8 +429,7 @@
|
||||
)
|
||||
|
||||
(defpart 358
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 16.0)
|
||||
(sp-flt spt-scale-x (meters 0.1))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -458,8 +445,7 @@
|
||||
)
|
||||
|
||||
(defpart 361
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 32.0)
|
||||
(sp-flt spt-scale-x (meters 0.1))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -475,8 +461,7 @@
|
||||
)
|
||||
|
||||
(defpart 359
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-rnd-flt spt-z (meters 0.1) (meters 0.2) 1.0)
|
||||
@@ -504,8 +489,7 @@
|
||||
:duration 600
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts
|
||||
((sp-item 2059 :period 600 :length 5)
|
||||
:parts ((sp-item 2059 :period 600 :length 5)
|
||||
(sp-item 2060 :fade-after (meters 80) :falloff-to (meters 80) :period 600 :length 40)
|
||||
(sp-item 2061 :period 600 :length 20)
|
||||
(sp-item 2062 :fade-after (meters 120) :falloff-to (meters 120) :period 600 :length 20)
|
||||
@@ -513,8 +497,7 @@
|
||||
)
|
||||
|
||||
(defpart 2060
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 6.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.4) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -538,13 +521,11 @@
|
||||
)
|
||||
|
||||
(defpart 2063
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r 0.0) (sp-flt spt-fade-g 0.0) (sp-flt spt-fade-b 0.0) (sp-flt spt-fade-a -1.4222223))
|
||||
:init-specs ((sp-flt spt-fade-r 0.0) (sp-flt spt-fade-g 0.0) (sp-flt spt-fade-b 0.0) (sp-flt spt-fade-a -1.4222223))
|
||||
)
|
||||
|
||||
(defpart 2062
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 3.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 180.0) 1.0)
|
||||
@@ -561,8 +542,7 @@
|
||||
)
|
||||
|
||||
(defpart 2059
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 16))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -577,8 +557,7 @@
|
||||
)
|
||||
|
||||
(defpart 2061
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 2.5) (meters 1.5) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -604,8 +583,7 @@
|
||||
)
|
||||
|
||||
(defpart 2064
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r -0.53333336)
|
||||
:init-specs ((sp-flt spt-fade-r -0.53333336)
|
||||
(sp-flt spt-fade-g -0.53333336)
|
||||
(sp-flt spt-fade-b -1.0666667)
|
||||
(sp-flt spt-fade-a -0.53333336)
|
||||
@@ -625,24 +603,13 @@
|
||||
|
||||
(defstate projectile-moving (projectile)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('touched)
|
||||
(when (-> self attack-mode)
|
||||
(when (cond
|
||||
((= (-> arg0 type) target)
|
||||
(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) 'attack)
|
||||
(set! (-> a1-1 param 0) (-> arg3 param 0))
|
||||
(let ((a0-4 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a0-4 mode) (-> self attack-mode))
|
||||
(set! (-> a1-1 param 1) (the-as uint a0-4))
|
||||
)
|
||||
(send-event-function arg0 a1-1)
|
||||
)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode (-> self attack-mode)))))
|
||||
)
|
||||
(else
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -677,13 +644,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 #f))
|
||||
(while (< (- (-> *display* base-frame-counter) (-> self state-time)) (-> self timeout))
|
||||
(let ((s5-0 (the int (-> *display* time-ratio))))
|
||||
@@ -779,25 +744,17 @@
|
||||
|
||||
(defstate projectile-impact (projectile)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
(let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-0
|
||||
(let ((t9-1 (method-of-type part-tracker activate)))
|
||||
(t9-1 (the-as part-tracker gp-0) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-0
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 104)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override root-prim prim-core)
|
||||
)
|
||||
(-> gp-0 ppointer)
|
||||
)
|
||||
:code (behavior ()
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 104)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override root-prim prim-core)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(if (nonzero? (-> self sound-id))
|
||||
(sound-stop (-> self sound-id))
|
||||
@@ -811,25 +768,17 @@
|
||||
|
||||
(defstate projectile-dissipate (projectile)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
(let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-0
|
||||
(let ((t9-1 (method-of-type part-tracker activate)))
|
||||
(t9-1 (the-as part-tracker gp-0) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-0
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 104)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override root-prim prim-core)
|
||||
)
|
||||
(-> gp-0 ppointer)
|
||||
)
|
||||
:code (behavior ()
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 104)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override root-prim prim-core)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(if (nonzero? (-> self sound-id))
|
||||
(sound-stop (-> self sound-id))
|
||||
@@ -879,8 +828,7 @@
|
||||
|
||||
(defstate projectile-die (projectile)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((v1-0 (-> self notify-handle)))
|
||||
(if (handle->process v1-0)
|
||||
(send-event (-> v1-0 process 0) 'notify 'die)
|
||||
@@ -972,17 +920,9 @@
|
||||
)
|
||||
(sound-play-by-name (static-sound-name "yellow-fire") (new-sound-id) 1024 0 0 1 #t)
|
||||
(set! (-> obj sound-id) (sound-play-by-name (static-sound-name "yellow-buzz") (new-sound-id) 1024 0 0 1 #t))
|
||||
(when (zero? (logand (-> obj options) 416))
|
||||
(let ((s4-2 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s4-2
|
||||
(let ((t9-10 (method-of-type part-tracker activate)))
|
||||
(t9-10 (the-as part-tracker s4-2) obj 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s4-2 part-tracker-init (-> *part-group-id-table* 103) -1 #f #f #f s5-0)
|
||||
(-> s4-2 ppointer)
|
||||
)
|
||||
(if (zero? (logand (-> obj options) 416))
|
||||
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 103) -1 #f #f #f s5-0 :to obj)
|
||||
)
|
||||
)
|
||||
(set! (-> *part-id-table* 350 init-specs 2 initial-valuef) f30-0)
|
||||
)
|
||||
)
|
||||
@@ -1289,8 +1229,7 @@
|
||||
|
||||
(defstate projectile-impact (projectile-blue)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
@@ -1298,8 +1237,7 @@
|
||||
|
||||
(defstate projectile-dissipate (projectile-blue)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(go-virtual projectile-die)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,43 +7,34 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(set! (-> *game-info* hint-control) (new
|
||||
'static
|
||||
'boxed-array
|
||||
:type level-hint-control :length 25 :allocated-length 25
|
||||
(set! (-> *game-info* hint-control) (new 'static 'boxed-array :type level-hint-control
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sage-voicebox-hint-crate-iron)
|
||||
:id (game-text-id sage-voicebox-hint-crate-iron)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 3
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id training-more-eco-more-time)
|
||||
:id (game-text-id training-more-eco-more-time)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sidekick-speech-hint-crate-iron)
|
||||
:id (game-text-id sidekick-speech-hint-crate-iron)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing 3
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sidekick-speech-hint-crate-steel)
|
||||
:id (game-text-id sidekick-speech-hint-crate-steel)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sidekick-hint-orb-cache-top)
|
||||
:id (game-text-id sidekick-hint-orb-cache-top)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id beach-grottopole-increment)
|
||||
:id (game-text-id beach-grottopole-increment)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
@@ -55,21 +46,18 @@
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:delay-before-playing (seconds 5)
|
||||
:id
|
||||
(game-text-id jungle-mirrors-break-the-mirror-jak)
|
||||
:id (game-text-id jungle-mirrors-break-the-mirror-jak)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:delay-before-playing (seconds 3)
|
||||
:id
|
||||
(game-text-id jungle-precursorbridge-hint)
|
||||
:id (game-text-id jungle-precursorbridge-hint)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id misty-teetertotter-bonk-dax-tutorial)
|
||||
:id (game-text-id misty-teetertotter-bonk-dax-tutorial)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
@@ -98,33 +86,28 @@
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sunken-blue-eco-charger-all-hint)
|
||||
:id (game-text-id sunken-blue-eco-charger-all-hint)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sunken-blue-eco-charger-hint)
|
||||
:id (game-text-id sunken-blue-eco-charger-hint)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing 2
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id swamp-tethers-advice-hint)
|
||||
:id (game-text-id swamp-tethers-advice-hint)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:delay-before-playing (seconds 30)
|
||||
:id
|
||||
(game-text-id sunken-double-lurker-hint)
|
||||
:id (game-text-id sunken-double-lurker-hint)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id sunken-take-it-easy-hot-pipes)
|
||||
:id (game-text-id sunken-take-it-easy-hot-pipes)
|
||||
:num-attempts-before-playing 3
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
@@ -135,34 +118,29 @@
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:delay-before-playing (seconds 3)
|
||||
:id
|
||||
(game-text-id darkcave-light-crystal-hint)
|
||||
:id (game-text-id darkcave-light-crystal-hint)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id daxter-maybe-you-can-shoot-better-goggles)
|
||||
:id (game-text-id daxter-maybe-you-can-shoot-better-goggles)
|
||||
:num-attempts-before-playing 4
|
||||
:num-success-before-killing -1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:id
|
||||
(game-text-id lavatube-shoot-the-spheres)
|
||||
:id (game-text-id lavatube-shoot-the-spheres)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 2
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:delay-before-playing (seconds 5)
|
||||
:id
|
||||
(game-text-id citadel-break-generator-hint)
|
||||
:id (game-text-id citadel-break-generator-hint)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
(new 'static 'level-hint-control
|
||||
:delay-before-playing (seconds 5)
|
||||
:id
|
||||
(game-text-id citadel-break-generators-reminder)
|
||||
:id (game-text-id citadel-break-generators-reminder)
|
||||
:num-attempts-before-playing 1
|
||||
:num-success-before-killing 1
|
||||
)
|
||||
@@ -170,16 +148,9 @@
|
||||
)
|
||||
|
||||
(set! (-> *game-info* task-hint-control)
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control-group :length 16 :allocated-length 16
|
||||
(new 'static 'boxed-array :type task-hint-control-group
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 3 :allocated-length 3
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task training-gimmie) :delay (seconds 600))
|
||||
(new 'static 'task-hint-control :task (game-task training-door) :delay (seconds 1200))
|
||||
(new 'static 'task-hint-control :task (game-task training-climb) :delay (seconds 1800))
|
||||
@@ -187,32 +158,20 @@
|
||||
)
|
||||
(new 'static 'task-hint-control-group)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 3 :allocated-length 3
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task beach-gimmie) :delay (seconds 900))
|
||||
(new 'static 'task-hint-control :task (game-task beach-sentinel) :delay (seconds 1800))
|
||||
(new 'static 'task-hint-control :task (game-task beach-cannon) :delay (seconds 2700))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 2 :allocated-length 2
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task jungle-plant) :delay (seconds 1200))
|
||||
(new 'static 'task-hint-control :task (game-task jungle-canyon-end) :delay (seconds 2400))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 4 :allocated-length 4
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task misty-boat) :delay (seconds 1200))
|
||||
(new 'static 'task-hint-control :task (game-task misty-warehouse) :delay (seconds 1800))
|
||||
(new 'static 'task-hint-control :task (game-task misty-bike-jump) :delay (seconds 2400))
|
||||
@@ -222,58 +181,34 @@
|
||||
(new 'static 'task-hint-control-group)
|
||||
(new 'static 'task-hint-control-group)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 3 :allocated-length 3
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task sunken-spinning-room) :delay (seconds 1200))
|
||||
(new 'static 'task-hint-control :task (game-task sunken-sharks) :delay (seconds 1800))
|
||||
(new 'static 'task-hint-control :task (game-task sunken-slide) :delay (seconds 2400))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 1 :allocated-length 1
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task swamp-battle) :delay (seconds 2400))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 1 :allocated-length 1
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task rolling-lake) :delay (seconds 2400))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 1 :allocated-length 1
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task ogre-secret) :delay (seconds 3600))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 1 :allocated-length 1
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task village3-extra1) :delay (seconds 3600))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 4 :allocated-length 4
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task snow-bumpers) :delay (seconds 1200))
|
||||
(new 'static 'task-hint-control :task (game-task snow-cage) :delay (seconds 1800))
|
||||
(new 'static 'task-hint-control :task (game-task snow-ball) :delay (seconds 2400))
|
||||
@@ -281,11 +216,7 @@
|
||||
)
|
||||
)
|
||||
(new 'static 'task-hint-control-group
|
||||
:tasks
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type task-hint-control :length 4 :allocated-length 4
|
||||
:tasks (new 'static 'boxed-array :type task-hint-control
|
||||
(new 'static 'task-hint-control :task (game-task cave-dark-climb) :delay (seconds 1200))
|
||||
(new 'static 'task-hint-control :task (game-task cave-robot-climb) :delay (seconds 1800))
|
||||
(new 'static 'task-hint-control :task (game-task cave-swing-poles) :delay (seconds 2400))
|
||||
|
||||
@@ -301,8 +301,7 @@
|
||||
|
||||
(defstate release (process-taskable)
|
||||
:virtual #t
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (process-release? *target*)
|
||||
(send-event *target* 'trans 'restore (-> self old-target-pos))
|
||||
(if (should-display? self)
|
||||
@@ -314,16 +313,13 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
process-taskable-anim-loop
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:code process-taskable-anim-loop
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defstate give-cell (process-taskable)
|
||||
:virtual #t
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(cond
|
||||
((nonzero? (-> self cell-for-task))
|
||||
(let ((gp-0 (handle->process (-> self cell-x))))
|
||||
@@ -350,21 +346,17 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
process-taskable-anim-loop
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:code process-taskable-anim-loop
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defstate lose (process-taskable)
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 5))
|
||||
(or (not *target*)
|
||||
(< 20480.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
@@ -375,35 +367,22 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
process-taskable-anim-loop
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:code process-taskable-anim-loop
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defstate enter-playing (process-taskable)
|
||||
:virtual #t
|
||||
:code
|
||||
process-taskable-anim-loop
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:code process-taskable-anim-loop
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(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) (janim-status blerc))
|
||||
(let ((gp-0 (get-process *default-dead-pool* othercam #x4000)))
|
||||
(set! (-> self camera)
|
||||
(ppointer->handle (when gp-0
|
||||
(let ((t9-2 (method-of-type othercam activate)))
|
||||
(t9-2 (the-as othercam gp-0) self 'othercam (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-0 othercam-init-by-other self (-> self cam-joint-index) #f #t)
|
||||
(-> gp-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self camera)
|
||||
(ppointer->handle (process-spawn othercam self (-> self cam-joint-index) #f #t :to self))
|
||||
)
|
||||
(set! (-> self cell-for-task) (game-task none))
|
||||
(set! (-> self skippable) #f)
|
||||
(set! (-> self blend-on-exit) #f)
|
||||
@@ -434,37 +413,23 @@
|
||||
|
||||
(defbehavior process-taskable-play-anim-code process-taskable ((arg0 art-joint-anim) (arg1 basic))
|
||||
(when (nonzero? (-> self cell-for-task))
|
||||
(cond
|
||||
((name= (-> self state name) "play-anim")
|
||||
(let ((s4-0 (get-process *default-dead-pool* fuel-cell #x4000)))
|
||||
(set! (-> self cell-x)
|
||||
(ppointer->handle
|
||||
(when s4-0
|
||||
(let ((t9-2 (method-of-type fuel-cell activate)))
|
||||
(t9-2 (the-as fuel-cell s4-0) self 'fuel-cell (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s4-0 fuel-cell-init-as-clone (process->handle self) (-> self cell-for-task))
|
||||
(-> s4-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (name= (-> self state name) "play-anim")
|
||||
(set! (-> self cell-x) (ppointer->handle (process-spawn
|
||||
fuel-cell
|
||||
:init fuel-cell-init-as-clone
|
||||
(process->handle self)
|
||||
(-> self cell-for-task)
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "ERROR<GMJ>: ~S ~S trying to give cell on release~%" (-> self name) (-> self state name))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and arg1 (type-type? (-> arg1 type) spool-anim))
|
||||
(when *target*
|
||||
(while (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) 'clone-anim)
|
||||
(set! (-> a1-9 param 0) (the-as uint self))
|
||||
(not (send-event-function *target* a1-9))
|
||||
)
|
||||
(while (not (send-event *target* 'clone-anim self))
|
||||
(spool-push *art-control* (-> (the-as spool-anim arg1) name) 0 self -99.0)
|
||||
(format #t "WARNING: ~A stall on not cloning.~%" (-> self name))
|
||||
(suspend)
|
||||
@@ -541,18 +506,14 @@
|
||||
|
||||
(defstate play-accept (process-taskable)
|
||||
:virtual #t
|
||||
:enter
|
||||
(the-as (function none :behavior process-taskable) process-taskable-play-anim-enter)
|
||||
:exit
|
||||
process-taskable-play-anim-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:enter (the-as (function none :behavior process-taskable) process-taskable-play-anim-enter)
|
||||
:exit process-taskable-play-anim-exit
|
||||
:trans (behavior ()
|
||||
(process-taskable-play-anim-trans)
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(process-taskable-play-anim-code (the-as art-joint-anim (get-art-elem self)) (get-accept-anim self #t))
|
||||
(while (not (process-release? *target*))
|
||||
(suspend)
|
||||
@@ -560,36 +521,29 @@
|
||||
(go-virtual enter-playing)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defstate play-reject (process-taskable)
|
||||
:virtual #t
|
||||
:enter
|
||||
(the-as (function none :behavior process-taskable) process-taskable-play-anim-enter)
|
||||
:exit
|
||||
process-taskable-play-anim-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:enter (the-as (function none :behavior process-taskable) process-taskable-play-anim-enter)
|
||||
:exit process-taskable-play-anim-exit
|
||||
:trans (behavior ()
|
||||
(process-taskable-play-anim-trans)
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(process-taskable-play-anim-code (the-as art-joint-anim (get-art-elem self)) (get-reject-anim self #t))
|
||||
(go-virtual release)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defstate query (process-taskable)
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(init!
|
||||
(-> self query)
|
||||
(lookup-text! *common-text* (game-text-id confirm-play) #f)
|
||||
@@ -601,10 +555,8 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
process-taskable-play-anim-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit process-taskable-play-anim-exit
|
||||
:trans (behavior ()
|
||||
(case (current-status (-> self tasks))
|
||||
(((task-status need-reminder-a))
|
||||
(case (get-response (-> self query))
|
||||
@@ -635,16 +587,13 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
process-taskable-anim-loop
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:code process-taskable-anim-loop
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defstate play-anim (process-taskable)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('shadow)
|
||||
(cond
|
||||
@@ -672,12 +621,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(the-as (function none :behavior process-taskable) process-taskable-play-anim-enter)
|
||||
:exit
|
||||
process-taskable-play-anim-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:enter (the-as (function none :behavior process-taskable) process-taskable-play-anim-enter)
|
||||
:exit process-taskable-play-anim-exit
|
||||
:trans (behavior ()
|
||||
(process-taskable-play-anim-trans)
|
||||
(let ((a3-0 (handle->process (-> self cell-x))))
|
||||
(if a3-0
|
||||
@@ -687,14 +633,12 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(process-taskable-play-anim-code (the-as art-joint-anim (get-art-elem self)) (play-anim! self #t))
|
||||
(dummy-38 self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior process-taskable) ja-post)
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
)
|
||||
|
||||
(defbehavior process-taskable-clean-up-after-talking process-taskable ()
|
||||
@@ -759,20 +703,16 @@
|
||||
|
||||
(defstate hidden (process-taskable)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior process-taskable)
|
||||
process-taskable-hide-handler
|
||||
)
|
||||
:enter
|
||||
(the-as (function none :behavior process-taskable) process-taskable-hide-enter)
|
||||
:exit
|
||||
(behavior ()
|
||||
:enter (the-as (function none :behavior process-taskable) process-taskable-hide-enter)
|
||||
:exit (behavior ()
|
||||
(process-taskable-hide-exit (= (-> self next-state name) 'hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
)
|
||||
@@ -781,8 +721,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(the-as (function none :behavior process-taskable) anim-loop)
|
||||
:code (the-as (function none :behavior process-taskable) anim-loop)
|
||||
)
|
||||
|
||||
;; WARN: disable def twice: 4. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
@@ -799,20 +738,16 @@
|
||||
|
||||
(defstate hidden-other (process-taskable)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior process-taskable)
|
||||
process-taskable-hide-handler
|
||||
)
|
||||
:enter
|
||||
(the-as (function none :behavior process-taskable) process-taskable-hide-enter)
|
||||
:exit
|
||||
(behavior ()
|
||||
:enter (the-as (function none :behavior process-taskable) process-taskable-hide-enter)
|
||||
:exit (behavior ()
|
||||
(process-taskable-hide-exit (= (-> self next-state name) 'hidden-other))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
)
|
||||
@@ -829,14 +764,12 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(the-as (function none :behavior process-taskable) anim-loop)
|
||||
:code (the-as (function none :behavior process-taskable) anim-loop)
|
||||
)
|
||||
|
||||
(defstate be-clone (process-taskable)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as shadow-geo (cond
|
||||
((= v1-0 'shadow)
|
||||
@@ -875,15 +808,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 handle))
|
||||
:enter (behavior ((arg0 handle))
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set-vector! (-> self draw bounds) 0.0 (-> self draw-bounds-y-offset) 0.0 (-> self draw bounds w))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self skel status) (janim-status blerc spool))
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v1-6 (-> self entity extra trans)))
|
||||
@@ -894,14 +825,12 @@
|
||||
(ja-channel-set! 0)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(draw-npc-shadow self)
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 handle))
|
||||
:code (behavior ((arg0 handle))
|
||||
(clone-anim arg0 (-> self center-joint-index) #t "")
|
||||
(format #t "ERROR<GMJ>: handle invalid while ~S is cloning~%" (-> self name))
|
||||
(go-virtual hidden)
|
||||
@@ -915,63 +844,56 @@
|
||||
|
||||
(defstate idle (process-taskable)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'attack)
|
||||
(the-as symbol (when (-> self bounce-away)
|
||||
(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) 'shove)
|
||||
(set! (-> a1-3 param 0) (the-as uint #f))
|
||||
(let ((v1-4 (new 'static 'attack-info :mask #xc0)))
|
||||
(set! (-> v1-4 shove-back) 12288.0)
|
||||
(set! (-> v1-4 shove-up) 4096.0)
|
||||
(set! (-> a1-3 param 1) (the-as uint v1-4))
|
||||
)
|
||||
(the-as symbol (send-event-function arg0 a1-3))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> arg3 param 0))))
|
||||
)
|
||||
((= v1-0 'play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self been-kicked) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'hidden-other)
|
||||
(the-as symbol (go-virtual hidden-other))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(the-as
|
||||
symbol
|
||||
(if (-> self bounce-away)
|
||||
(the-as
|
||||
symbol
|
||||
(send-event arg0 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> arg3 param 0))))
|
||||
)
|
||||
((= v1-0 'play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self been-kicked) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'hidden-other)
|
||||
(the-as symbol (go-virtual hidden-other))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(process-taskable-clean-up-after-talking)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(cond
|
||||
((or (= (-> self next-state name) 'dead-state) (= (-> self next-state name) 'idle))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
@@ -988,8 +910,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.2))
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
@@ -1077,10 +998,8 @@
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
process-taskable-anim-loop
|
||||
:post
|
||||
(behavior ()
|
||||
:code process-taskable-anim-loop
|
||||
:post (behavior ()
|
||||
(when *target*
|
||||
(when (!= (-> self neck-joint-index) -1)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -1216,8 +1135,7 @@
|
||||
)
|
||||
|
||||
(defstate othercam-running (othercam)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('die)
|
||||
@@ -1260,8 +1178,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(hide-hud-quick)
|
||||
(case (-> self spooling?)
|
||||
(('logo)
|
||||
@@ -1287,14 +1204,12 @@
|
||||
(copy-settings-from-target! *setting-control*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(clear-pending-settings-from-process *setting-control* self 'process-mask)
|
||||
(copy-settings-from-target! *setting-control*)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(let ((s2-0 (-> self hand process 0)))
|
||||
(when (not s2-0)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/speaker-ag.gc")
|
||||
|
||||
(deftype camera-voicebox (camera-slave)
|
||||
@@ -44,8 +45,7 @@
|
||||
|
||||
|
||||
(defstate empty-state (process)
|
||||
:code
|
||||
(the-as (function none :behavior process) nothing)
|
||||
:code (the-as (function none :behavior process) nothing)
|
||||
)
|
||||
|
||||
(defskelgroup *voicebox-sg* speaker speaker-lod0-jg speaker-idle-ja
|
||||
@@ -116,24 +116,21 @@
|
||||
|
||||
(defstate enter (voicebox)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('die)
|
||||
(go-virtual exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(voicebox-track)
|
||||
(if (< 0.1 (-> self blend))
|
||||
(point-toward-point-clear-roll-pitch! (-> self root) (target-pos 0))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set-setting! *setting-control* self 'sound-flava #f 20.0 6)
|
||||
(if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9)))
|
||||
(send-event
|
||||
@@ -160,34 +157,27 @@
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior voicebox) ja-post)
|
||||
:post (the-as (function none :behavior voicebox) ja-post)
|
||||
)
|
||||
|
||||
(defstate idle (voicebox)
|
||||
:virtual #t
|
||||
:event
|
||||
(-> (method-of-type voicebox enter) event)
|
||||
:trans
|
||||
voicebox-track
|
||||
:code
|
||||
(behavior ()
|
||||
:event (-> (method-of-type voicebox enter) event)
|
||||
:trans voicebox-track
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior voicebox) ja-post)
|
||||
:post (the-as (function none :behavior voicebox) ja-post)
|
||||
)
|
||||
|
||||
(defstate exit (voicebox)
|
||||
:virtual #t
|
||||
:trans
|
||||
voicebox-track
|
||||
:code
|
||||
(behavior ()
|
||||
:trans voicebox-track
|
||||
:code (behavior ()
|
||||
(clear-pending-settings-from-process *setting-control* self 'sound-flava)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self seeker target) 1.0)
|
||||
@@ -208,8 +198,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior voicebox) ja-post)
|
||||
:post (the-as (function none :behavior voicebox) ja-post)
|
||||
)
|
||||
|
||||
(defbehavior voicebox-init-by-other voicebox ((arg0 vector) (arg1 handle))
|
||||
@@ -224,44 +213,24 @@
|
||||
)
|
||||
|
||||
(defstate cam-voicebox (camera-voicebox)
|
||||
:event
|
||||
(-> cam-string event)
|
||||
:enter
|
||||
(-> cam-string enter)
|
||||
:trans
|
||||
(behavior ()
|
||||
:event (-> cam-string event)
|
||||
:enter (-> cam-string enter)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(deactivate self)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(-> cam-string code)
|
||||
:code (-> cam-string code)
|
||||
)
|
||||
|
||||
(defun voicebox-spawn ((arg0 process) (arg1 vector))
|
||||
(with-pp
|
||||
(let* ((s3-0 (get-process *camera-dead-pool* camera-voicebox #x4000))
|
||||
(s4-0 (when s3-0
|
||||
(let ((t9-1 (method-of-type camera-voicebox activate)))
|
||||
(t9-1 (the-as camera-voicebox s3-0) arg0 'camera-voicebox (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-0 cam-slave-init cam-voicebox #f)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s4-0
|
||||
(let ((s5-1 (get-process *default-dead-pool* voicebox #x4000)))
|
||||
(when s5-1
|
||||
(let ((t9-4 (method-of-type voicebox activate)))
|
||||
(t9-4 (the-as voicebox s5-1) (ppointer->process s4-0) 'voicebox (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-1 voicebox-init-by-other arg1 (process->handle pp))
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
(let ((s4-0 (process-spawn camera-voicebox :init cam-slave-init cam-voicebox #f :from *camera-dead-pool* :to arg0))
|
||||
)
|
||||
(if s4-0
|
||||
(process-spawn voicebox arg1 (process->handle pp) :to (ppointer->process s4-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -9,50 +9,31 @@
|
||||
|
||||
(define *depth-cue-work*
|
||||
(new 'static 'depth-cue-work
|
||||
:texture-strip-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
:texture-strip-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #x50ab400000008001 #x43431)
|
||||
:gif (new 'static 'array uint64 2 #x50ab400000008001 #x43431)
|
||||
)
|
||||
:temp-strip-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
:temp-strip-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #x508b400000008001 #x43431)
|
||||
:gif (new 'static 'array uint64 2 #x508b400000008001 #x43431)
|
||||
)
|
||||
:stencil-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x17 :id (dma-tag-id cnt))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x17 :cmd (vif-cmd direct) :msk #x1)
|
||||
:stencil-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x17 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x17 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #xb003400000008002 #x44444444441)
|
||||
:gif (new 'static 'array uint64 2 #xb003400000008002 #x44444444441)
|
||||
)
|
||||
:set-color
|
||||
(new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
|
||||
:draw-color
|
||||
(new 'static 'vector4w :x #x84 :y #x84 :z #x84 :w #x80)
|
||||
:depth
|
||||
(new 'static 'depth-cue-data :data (new 'static 'vector :x 1.0 :z 163840.0))
|
||||
:front
|
||||
(new 'static 'depth-cue-data :data (new 'static 'vector :x 0.999 :y 0.4 :z 4096.0 :w 1.0))
|
||||
:set-color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
|
||||
:draw-color (new 'static 'vector4w :x #x84 :y #x84 :z #x84 :w #x80)
|
||||
:depth (new 'static 'depth-cue-data :data (new 'static 'vector :x 1.0 :z 163840.0))
|
||||
:front (new 'static 'depth-cue-data :data (new 'static 'vector :x 0.999 :y 0.4 :z 4096.0 :w 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+29
-62
@@ -7,64 +7,36 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *eye-work*
|
||||
(new 'static 'eye-work
|
||||
:sprite-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :fst #x1)
|
||||
:nreg #x5
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id uv)
|
||||
:regs2 (gif-reg-id xyz2)
|
||||
:regs3 (gif-reg-id uv)
|
||||
:regs4 (gif-reg-id xyz2)
|
||||
)
|
||||
)
|
||||
:sprite-tmpl2
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)
|
||||
:nreg #x5
|
||||
)
|
||||
:gif1 (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id uv)
|
||||
:regs2 (gif-reg-id xyz2)
|
||||
:regs3 (gif-reg-id uv)
|
||||
:regs4 (gif-reg-id xyz2)
|
||||
)
|
||||
)
|
||||
:adgif-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif0 (new 'static 'gif-tag64 :nloop #x5 :eop #x1 :nreg #x1)
|
||||
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))
|
||||
)
|
||||
:blink-table
|
||||
(new 'static 'array float 10 0.0 0.667 0.9 1.0 1.0 1.0 1.0 0.333 0.1 0.0)
|
||||
)
|
||||
(define *eye-work* (new 'static 'eye-work
|
||||
:sprite-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x508b400000008001 #x53531)
|
||||
)
|
||||
:sprite-tmpl2 (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531)
|
||||
)
|
||||
:adgif-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
|
||||
)
|
||||
:blink-table (new 'static 'array float 10 0.0 0.667 0.9 1.0 1.0 1.0 1.0 0.333 0.1 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 16 signed mismatch
|
||||
;; WARN: Stack slot offset 16 signed mismatch
|
||||
;; WARN: Stack slot offset 16 signed mismatch
|
||||
;; WARN: Stack slot offset 16 signed mismatch
|
||||
(defun render-eyes ((arg0 dma-buffer) (arg1 eye-control) (arg2 int))
|
||||
(local-vars (sv-16 float))
|
||||
(let ((s4-0 32)
|
||||
@@ -201,7 +173,6 @@
|
||||
(a3-9 (the int (+ f28-0 f0-6)))
|
||||
(t1-0 (the int (+ f26-0 f0-6)))
|
||||
)
|
||||
;; (format 0 "eye: ~f ~f~%" f28-0 f26-0)
|
||||
(set! (-> a1-25 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad))
|
||||
(set! (-> a1-25 1 quad) (-> *eye-work* sprite-tmpl quad 1))
|
||||
(set-vector! (-> a1-25 2) 128 128 128 128)
|
||||
@@ -1115,7 +1086,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function get-eye-block
|
||||
(defun get-eye-block ((arg0 int) (arg1 int))
|
||||
(#when PC_PORT
|
||||
;; hack to make this easier to figure out on the PC side.
|
||||
@@ -1128,7 +1098,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function convert-eye-data
|
||||
(defun convert-eye-data ((arg0 eye) (arg1 uint))
|
||||
(local-vars
|
||||
(v0-0 float)
|
||||
@@ -1159,9 +1128,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function merc-eye-anim
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun merc-eye-anim ((arg0 manipy))
|
||||
(defun merc-eye-anim ((arg0 process-drawable))
|
||||
(let* ((s5-0 (-> arg0 draw mgeo header eye-ctrl))
|
||||
(a0-1 (-> arg0 skel root-channel 0))
|
||||
(s4-0 (-> a0-1 frame-group))
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
)
|
||||
|
||||
(defpart 41
|
||||
:init-specs
|
||||
((sp-flt spt-scale-x (meters 0.5))
|
||||
:init-specs ((sp-flt spt-scale-x (meters 0.5))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 64.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-g 16.0 32.0 1.0)
|
||||
@@ -67,8 +66,7 @@
|
||||
)
|
||||
|
||||
(defpart 42
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -1.4222223)
|
||||
:init-specs ((sp-flt spt-fade-a -1.4222223)
|
||||
(sp-int spt-timer 45)
|
||||
(sp-int spt-next-time 42)
|
||||
(sp-launcher-by-id spt-next-launcher 43)
|
||||
@@ -76,8 +74,7 @@
|
||||
)
|
||||
|
||||
(defpart 43
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0)) (sp-flt spt-fade-a -0.21333334) (sp-int-plain-rnd spt-timer 0 296 1))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0)) (sp-flt spt-fade-a -0.21333334) (sp-int-plain-rnd spt-timer 0 296 1))
|
||||
)
|
||||
|
||||
(defun merc-death-spawn ((arg0 int) (arg1 vector) (arg2 vector))
|
||||
|
||||
@@ -24,26 +24,18 @@
|
||||
|
||||
(define *shadow-data* (new 'static 'shadow-data
|
||||
:texoffset (new 'static 'vector :x 256.5 :y 112.5)
|
||||
:texscale
|
||||
(new 'static 'vector :x 0.001953125 :y 0.00390625)
|
||||
:clrs
|
||||
(new 'static 'inline-array vector 2
|
||||
:texscale (new 'static 'vector :x 0.001953125 :y 0.00390625)
|
||||
:clrs (new 'static 'inline-array vector 2
|
||||
(new 'static 'vector :x (the-as float #x80) :w (the-as float #x82))
|
||||
(new 'static 'vector :y (the-as float #x80) :w (the-as float #x7f))
|
||||
)
|
||||
:dma-unpack-template
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)
|
||||
:vif1
|
||||
(new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32))
|
||||
:dma-unpack-template (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)
|
||||
:vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:dma-cnt
|
||||
(new 'static 'dma-tag :id (dma-tag-id cnt))
|
||||
:vif-unpack-v4-8
|
||||
(new 'static 'vif-tag :cmd (vif-cmd unpack-v4-8))
|
||||
:dma-cnt (new 'static 'dma-tag :id (dma-tag-id cnt))
|
||||
:vif-unpack-v4-8 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-8))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -176,8 +176,7 @@
|
||||
)
|
||||
|
||||
(defpart 362
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 8.0)
|
||||
(sp-flt spt-scale-x (meters 0.3))
|
||||
(sp-rnd-flt spt-rot-z (degrees -180.0) (degrees 360.0) 1.0)
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
(define *instance-shrub-work*
|
||||
(new 'static 'instance-shrub-work
|
||||
:matrix-tmpl
|
||||
(new 'static 'inline-array qword 20
|
||||
:matrix-tmpl (new 'static 'inline-array qword 20
|
||||
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143))
|
||||
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148))
|
||||
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d))
|
||||
@@ -32,8 +31,7 @@
|
||||
(new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e))
|
||||
(new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3))
|
||||
)
|
||||
:count-tmpl
|
||||
(new 'static 'inline-array vector4w 20
|
||||
:count-tmpl (new 'static 'inline-array vector4w 20
|
||||
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 10)
|
||||
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 1)
|
||||
(new 'static 'vector4w :x #x20000000 :z #x60010142 :w 2)
|
||||
@@ -55,424 +53,246 @@
|
||||
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 8)
|
||||
(new 'static 'vector4w :x #x20000000 :z #x60010175 :w 9)
|
||||
)
|
||||
:mscalf-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
|
||||
:mscalf-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
|
||||
)
|
||||
:mscalf-ret-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ret))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
|
||||
:mscalf-ret-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ret))
|
||||
:vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)
|
||||
)
|
||||
:adgif-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
:adgif-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #x1000000000008005 #xe)
|
||||
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
|
||||
)
|
||||
:billboard-tmpl
|
||||
(new 'static 'dma-gif-packet
|
||||
:dma-vif
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #xd :id (dma-tag-id next))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1)
|
||||
:billboard-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next))
|
||||
:vif1 (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif
|
||||
(new 'static 'array uint64 2 #x303e400000008004 #x412)
|
||||
:gif (new 'static 'array uint64 2 #x303e400000008004 #x412)
|
||||
)
|
||||
:shrub-near-packets
|
||||
(new 'static 'inline-array shrub-near-packet 6
|
||||
:shrub-near-packets (new 'static 'inline-array shrub-near-packet 6
|
||||
(new 'static 'shrub-near-packet
|
||||
:matrix-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
:matrix-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:header-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
|
||||
:header-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:stq-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
|
||||
:stq-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
|
||||
)
|
||||
:color-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
|
||||
:color-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
|
||||
)
|
||||
:vertex-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
|
||||
:vertex-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
|
||||
)
|
||||
:mscal-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
:mscal-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
)
|
||||
:init-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
:init-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:init-data
|
||||
(new 'static 'array uint32 8 #x0 #x0 #x345 #x117 #x0 #x0 #x0 #x1500000c)
|
||||
:init-data (new 'static 'array uint32 8 #x0 #x0 #x345 #x117 #x0 #x0 #x0 #x1500000c)
|
||||
)
|
||||
(new 'static 'shrub-near-packet
|
||||
:matrix-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
:matrix-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:header-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
|
||||
:header-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:stq-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
|
||||
:stq-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
|
||||
)
|
||||
:color-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
|
||||
:color-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
|
||||
)
|
||||
:vertex-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
|
||||
:vertex-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
|
||||
)
|
||||
:mscal-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
:mscal-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
)
|
||||
:init-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
:init-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:init-data
|
||||
(new 'static 'array uint32 8 #x0 #x0 #x363 #x22e #x0 #x0 #x0 #x1500000c)
|
||||
:init-data (new 'static 'array uint32 8 #x0 #x0 #x363 #x22e #x0 #x0 #x0 #x1500000c)
|
||||
)
|
||||
(new 'static 'shrub-near-packet
|
||||
:matrix-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
:matrix-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:header-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
|
||||
:header-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:stq-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
|
||||
:stq-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
|
||||
)
|
||||
:color-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
|
||||
:color-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
|
||||
)
|
||||
:vertex-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
|
||||
:vertex-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
|
||||
)
|
||||
:mscal-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
:mscal-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
)
|
||||
:init-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
:init-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:init-data
|
||||
(new 'static 'array uint32 8 #x0 #x0 #x345 #x0 #x0 #x0 #x0 #x1500000c)
|
||||
:init-data (new 'static 'array uint32 8 #x0 #x0 #x345 #x0 #x0 #x0 #x0 #x1500000c)
|
||||
)
|
||||
(new 'static 'shrub-near-packet
|
||||
:matrix-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
:matrix-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:header-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
|
||||
:header-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:stq-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
|
||||
:stq-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16))
|
||||
)
|
||||
:color-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
|
||||
:color-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8))
|
||||
)
|
||||
:vertex-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
|
||||
:vertex-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16))
|
||||
)
|
||||
:mscal-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
:mscal-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
)
|
||||
:init-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
:init-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:init-data
|
||||
(new 'static 'array uint32 8 #x0 #x0 #x363 #x117 #x0 #x0 #x0 #x1500000c)
|
||||
:init-data (new 'static 'array uint32 8 #x0 #x0 #x363 #x117 #x0 #x0 #x0 #x1500000c)
|
||||
)
|
||||
(new 'static 'shrub-near-packet
|
||||
:matrix-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
:matrix-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:header-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
|
||||
:header-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:stq-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
|
||||
:stq-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16))
|
||||
)
|
||||
:color-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
|
||||
:color-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8))
|
||||
)
|
||||
:vertex-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
|
||||
:vertex-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16))
|
||||
)
|
||||
:mscal-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
:mscal-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
)
|
||||
:init-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
:init-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:init-data
|
||||
(new 'static 'array uint32 8 #x0 #x0 #x345 #x22e #x0 #x0 #x0 #x1500000c)
|
||||
:init-data (new 'static 'array uint32 8 #x0 #x0 #x345 #x22e #x0 #x0 #x0 #x1500000c)
|
||||
)
|
||||
(new 'static 'shrub-near-packet
|
||||
:matrix-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
:matrix-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:header-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
|
||||
:header-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:stq-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
|
||||
:stq-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16))
|
||||
)
|
||||
:color-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
|
||||
:color-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8))
|
||||
)
|
||||
:vertex-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
|
||||
:vertex-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
||||
:vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16))
|
||||
)
|
||||
:mscal-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
:mscal-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1)
|
||||
)
|
||||
:init-tmpl
|
||||
(new 'static 'dma-packet
|
||||
:dma
|
||||
(new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0
|
||||
(new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1
|
||||
(new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
:init-tmpl (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next))
|
||||
:vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))
|
||||
:vif1 (new 'static 'vif-tag :imm #x38a :num #x1 :cmd (vif-cmd unpack-v4-32))
|
||||
)
|
||||
:init-data
|
||||
(new 'static 'array uint32 8 #x0 #x0 #x363 #x0 #x0 #x0 #x0 #x1500000c)
|
||||
:init-data (new 'static 'array uint32 8 #x0 #x0 #x363 #x0 #x0 #x0 #x0 #x1500000c)
|
||||
)
|
||||
)
|
||||
:dma-ref
|
||||
(new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
|
||||
:dma-end
|
||||
(new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end)))
|
||||
:wind-const
|
||||
(new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0)
|
||||
:dma-ref (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
|
||||
:dma-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end)))
|
||||
:wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0)
|
||||
:constants (new 'static 'vector :x 128.0 :y 1.0)
|
||||
:color-constant
|
||||
(new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000)
|
||||
:start-bank
|
||||
(new 'static 'array uint8 20 #x0 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)
|
||||
:color-constant (new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000)
|
||||
:start-bank (new 'static 'array uint8 20 #x0 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -200,19 +200,7 @@
|
||||
(defun start-time-of-day ()
|
||||
"Start up the time of day process. Kill any existing ones"
|
||||
(kill-by-name 'time-of-day-proc *active-pool*)
|
||||
(let ((gp-0 (get-process *default-dead-pool* time-of-day-proc #x4000)))
|
||||
(set! *time-of-day-proc*
|
||||
(the-as (pointer time-of-day-proc)
|
||||
(when gp-0
|
||||
(let ((t9-2 (method-of-type time-of-day-proc activate)))
|
||||
(t9-2 (the-as time-of-day-proc gp-0) *default-pool* 'time-of-day-proc (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-0 init-time-of-day)
|
||||
(-> gp-0 ppointer )
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! *time-of-day-proc* (process-spawn time-of-day-proc :init init-time-of-day))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
+114
-195
@@ -8,8 +8,7 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpart 108
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.6) 1.0)
|
||||
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -28,8 +27,7 @@
|
||||
)
|
||||
|
||||
(defpart 109
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.2))
|
||||
:init-specs ((sp-flt spt-fade-a -0.2))
|
||||
)
|
||||
|
||||
(defun birth-func-y->userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
|
||||
@@ -79,8 +77,7 @@
|
||||
)
|
||||
|
||||
(defpart 110
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 12.0)
|
||||
(sp-rnd-flt spt-x (meters -0.25) (meters 0.5) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -0.05) (meters 0.1) 1.0)
|
||||
@@ -104,8 +101,7 @@
|
||||
)
|
||||
|
||||
(defpart 111
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 0.1)
|
||||
(sp-rnd-flt spt-x (meters -0.25) (meters 0.5) 1.0)
|
||||
(sp-flt spt-y (meters 0.15))
|
||||
@@ -129,8 +125,7 @@
|
||||
)
|
||||
|
||||
(defpart 112
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-flt spt-num 0.05)
|
||||
(sp-rnd-flt spt-x (meters -1) (meters 2) 1.0)
|
||||
(sp-rnd-flt spt-z (meters -1) (meters 2) 1.0)
|
||||
@@ -152,18 +147,15 @@
|
||||
)
|
||||
|
||||
(defpart 113
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 114))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 114))
|
||||
)
|
||||
|
||||
(defpart 114
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.7111111))
|
||||
:init-specs ((sp-flt spt-fade-a -0.7111111))
|
||||
)
|
||||
|
||||
(defpart 115
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-rnd-flt spt-num 0.04 0.03 1.0)
|
||||
(sp-rnd-flt spt-x (meters -0.2) (meters 0.4) 1.0)
|
||||
(sp-rnd-flt spt-z (meters -0.2) (meters 0.4) 1.0)
|
||||
@@ -185,8 +177,7 @@
|
||||
)
|
||||
|
||||
(defpart 116
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0.006666667))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.006666667))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a 0.0)
|
||||
(sp-int spt-next-time 150)
|
||||
@@ -195,13 +186,11 @@
|
||||
)
|
||||
|
||||
(defpart 117
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0.005)) (sp-copy-from-other spt-scalevel-y -4) (sp-flt spt-fade-a -0.32))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.005)) (sp-copy-from-other spt-scalevel-y -4) (sp-flt spt-fade-a -0.32))
|
||||
)
|
||||
|
||||
(defpart 118
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xa :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xa :page #x2))
|
||||
(sp-flt spt-num 0.06)
|
||||
(sp-flt spt-x (meters 10))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.75) (meters 1.5) 1.0)
|
||||
@@ -225,18 +214,15 @@
|
||||
)
|
||||
|
||||
(defpart 119
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int-plain-rnd spt-next-time 90 119 1) (sp-launcher-by-id spt-next-launcher 120))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int-plain-rnd spt-next-time 90 119 1) (sp-launcher-by-id spt-next-launcher 120))
|
||||
)
|
||||
|
||||
(defpart 120
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.21333334))
|
||||
:init-specs ((sp-flt spt-fade-a -0.21333334))
|
||||
)
|
||||
|
||||
(defpart 121
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-rnd-flt spt-num 0.05 0.4 1.0)
|
||||
(sp-rnd-flt spt-x (meters -0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-z (meters 0.5) (meters 1.5) 1.0)
|
||||
@@ -259,13 +245,11 @@
|
||||
)
|
||||
|
||||
(defpart 122
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 123))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 123))
|
||||
)
|
||||
|
||||
(defpart 123
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.7111111))
|
||||
:init-specs ((sp-flt spt-fade-a -0.7111111))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-water-splash
|
||||
@@ -273,8 +257,7 @@
|
||||
:duration 900
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts
|
||||
((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
(sp-item 125 :period 900 :length 15)
|
||||
(sp-item 126 :flags (is-3d) :period 900 :length 15)
|
||||
(sp-item 127 :flags (is-3d) :period 900 :length 15)
|
||||
@@ -312,8 +295,7 @@
|
||||
:duration 900
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts
|
||||
((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
(sp-item 125 :period 900 :length 15)
|
||||
(sp-item 126 :flags (is-3d) :period 900 :length 15)
|
||||
(sp-item 127 :flags (is-3d) :period 900 :length 15)
|
||||
@@ -333,8 +315,7 @@
|
||||
)
|
||||
|
||||
(defpart 129
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 0.4)
|
||||
(sp-rnd-flt spt-x (meters -0.2) (meters 0.4) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -0.2) (meters 0.4) 1.0)
|
||||
@@ -355,8 +336,7 @@
|
||||
)
|
||||
|
||||
(defpart 133
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 0.4)
|
||||
(sp-rnd-flt spt-x (meters -0.2) (meters 0.4) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -0.2) (meters 0.4) 1.0)
|
||||
@@ -377,8 +357,7 @@
|
||||
)
|
||||
|
||||
(defpart 131
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-flt spt-num 0.3)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.080000006) (meters 0.32000002) 1.0)
|
||||
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -398,8 +377,7 @@
|
||||
)
|
||||
|
||||
(defpart 132
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 3.2)
|
||||
(sp-rnd-flt spt-x (meters -0.2) (meters 0.4) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -0.2) (meters 0.4) 1.0)
|
||||
@@ -425,8 +403,7 @@
|
||||
)
|
||||
|
||||
(defpart 130
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x10 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x10 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.24000001) (meters 0.71999997) 1.0)
|
||||
(sp-flt spt-rot-x 16384.0)
|
||||
@@ -446,16 +423,14 @@
|
||||
)
|
||||
|
||||
(defpart 136
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-y (meters 0.026666667))
|
||||
:init-specs ((sp-flt spt-scalevel-y (meters 0.026666667))
|
||||
(sp-int spt-next-time 20)
|
||||
(sp-launcher-by-id spt-next-launcher 137)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 137
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-y (meters 0))
|
||||
:init-specs ((sp-flt spt-scalevel-y (meters 0))
|
||||
(sp-flt spt-fade-a -0.64)
|
||||
(sp-int spt-next-time 20)
|
||||
(sp-launcher-by-id spt-next-launcher 138)
|
||||
@@ -463,8 +438,7 @@
|
||||
)
|
||||
|
||||
(defpart 138
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0.0016666667))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.0016666667))
|
||||
(sp-flt spt-scalevel-y (meters -0.026666667))
|
||||
(sp-int spt-next-time 20)
|
||||
(sp-launcher-by-id spt-next-launcher 139)
|
||||
@@ -472,13 +446,11 @@
|
||||
)
|
||||
|
||||
(defpart 139
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0.0033333334)) (sp-flt spt-scalevel-y (meters -0.053333335)))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.0033333334)) (sp-flt spt-scalevel-y (meters -0.053333335)))
|
||||
)
|
||||
|
||||
(defpart 126
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 2.4) (meters 1.6) 1.0)
|
||||
(sp-rnd-flt spt-rot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -498,18 +470,15 @@
|
||||
)
|
||||
|
||||
(defpart 134
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 140))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 360) (sp-launcher-by-id spt-next-launcher 140))
|
||||
)
|
||||
|
||||
(defpart 140
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.53333336))
|
||||
:init-specs ((sp-flt spt-fade-a -0.53333336))
|
||||
)
|
||||
|
||||
(defpart 127
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1e :page #x2))
|
||||
(sp-rnd-flt spt-num 0.5 1.0 1.0)
|
||||
(sp-rnd-flt spt-x (meters -0.4) (meters 0.8) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -0.4) (meters 0.8) 1.0)
|
||||
@@ -531,8 +500,7 @@
|
||||
)
|
||||
|
||||
(defpart 128
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 3.2)
|
||||
(sp-flt spt-x (meters 0.96000004))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.35) (meters 0.075) 1.0)
|
||||
@@ -557,13 +525,11 @@
|
||||
)
|
||||
|
||||
(defpart 135
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0)) (sp-copy-from-other spt-scalevel-y -4))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0)) (sp-copy-from-other spt-scalevel-y -4))
|
||||
)
|
||||
|
||||
(defpart 125
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 8.0)
|
||||
(sp-flt spt-x (meters 0.8))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.15) (meters 0.05) 1.0)
|
||||
@@ -586,8 +552,7 @@
|
||||
)
|
||||
|
||||
(defpart 124
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x10 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x10 :page #x2))
|
||||
(sp-flt spt-num 1.5)
|
||||
(sp-rnd-flt spt-x (meters 0.96000004) (meters 0.16000001) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.32000002) (meters 0.96000004) 1.0)
|
||||
@@ -612,8 +577,7 @@
|
||||
)
|
||||
|
||||
(defpart 141
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-x (meters 0))
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0))
|
||||
(sp-flt spt-rotvel-x (degrees 0.16666667))
|
||||
(sp-flt spt-scalevel-y (meters 0.016666668))
|
||||
(sp-int spt-next-time 20)
|
||||
@@ -622,8 +586,7 @@
|
||||
)
|
||||
|
||||
(defpart 142
|
||||
:init-specs
|
||||
((sp-flt spt-rotvel-x (degrees 0.13333334))
|
||||
:init-specs ((sp-flt spt-rotvel-x (degrees 0.13333334))
|
||||
(sp-flt spt-scalevel-y (meters 0))
|
||||
(sp-flt spt-fade-a -0.64)
|
||||
(sp-int spt-next-time 20)
|
||||
@@ -632,8 +595,7 @@
|
||||
)
|
||||
|
||||
(defpart 143
|
||||
:init-specs
|
||||
((sp-flt spt-rotvel-x (degrees 0.1))
|
||||
:init-specs ((sp-flt spt-rotvel-x (degrees 0.1))
|
||||
(sp-flt spt-scalevel-y (meters -0.016666668))
|
||||
(sp-int spt-next-time 20)
|
||||
(sp-launcher-by-id spt-next-launcher 144)
|
||||
@@ -641,13 +603,11 @@
|
||||
)
|
||||
|
||||
(defpart 144
|
||||
:init-specs
|
||||
((sp-flt spt-rotvel-x (degrees 0.06666667)) (sp-flt spt-scalevel-y (meters -0.033333335)))
|
||||
:init-specs ((sp-flt spt-rotvel-x (degrees 0.06666667)) (sp-flt spt-scalevel-y (meters -0.033333335)))
|
||||
)
|
||||
|
||||
(defpart 145
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.15) (meters 0.05) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -964,25 +924,18 @@
|
||||
)
|
||||
)
|
||||
(when (< (-> obj process root trans y) -409.6)
|
||||
(send-event (-> obj process) 'no-look-around 450)
|
||||
(send-event (-> obj process) 'no-look-around (seconds 1.5))
|
||||
(when (zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-14)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (-> obj process type) target)
|
||||
(let ((a1-32 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-32 from) pp)
|
||||
(set! (-> a1-32 num-params) 2)
|
||||
(set! (-> a1-32 message) 'attack)
|
||||
(set! (-> a1-32 param 0) (the-as uint #f))
|
||||
(let ((v1-275 (new 'static 'attack-info :mask #xe0)))
|
||||
(set! (-> v1-275 shove-up) 2048.0)
|
||||
(set! (-> v1-275 shove-back) 0.0)
|
||||
(set! (-> v1-275 mode) 'tar)
|
||||
(set! (-> a1-32 param 1) (the-as uint v1-275))
|
||||
)
|
||||
(send-event-function (-> obj process) a1-32)
|
||||
(send-event
|
||||
(-> obj process)
|
||||
'attack
|
||||
#f
|
||||
(static-attack-info ((shove-up (meters 0.5)) (shove-back (meters 0)) (mode 'tar)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -1214,26 +1167,19 @@
|
||||
)
|
||||
|
||||
(defun splash-spawn ((arg0 basic) (arg1 basic) (arg2 int))
|
||||
(let ((s4-0 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s4-0
|
||||
(let ((t9-1 (method-of-type part-tracker activate)))
|
||||
(t9-1 (the-as part-tracker s4-0) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(if (zero? arg2)
|
||||
(-> *part-group-id-table* 41)
|
||||
(-> *part-group-id-table* 40)
|
||||
)
|
||||
(run-now-in-process
|
||||
s4-0
|
||||
part-tracker-init
|
||||
(if (zero? arg2)
|
||||
(-> *part-group-id-table* 41)
|
||||
(-> *part-group-id-table* 40)
|
||||
)
|
||||
-1
|
||||
part-water-splash-callback
|
||||
arg0
|
||||
#f
|
||||
arg1
|
||||
)
|
||||
(-> s4-0 ppointer)
|
||||
)
|
||||
-1
|
||||
part-water-splash-callback
|
||||
arg0
|
||||
#f
|
||||
arg1
|
||||
:to *entity-pool*
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -1274,56 +1220,34 @@
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 water-vol ((obj water-vol))
|
||||
(with-pp
|
||||
(cond
|
||||
((handle->process (-> obj target))
|
||||
(cond
|
||||
((not (dummy-10 (-> obj vol) (-> (the-as target (-> obj target process 0)) control trans)))
|
||||
(dummy-27 obj)
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (-> (the-as target (-> obj target process 0)) water)))
|
||||
(when (and (logtest? (water-flags wt19) (-> obj flags))
|
||||
(logtest? (-> v1-15 flags) (water-flags wt09))
|
||||
(>= (-> v1-15 surface-height) (-> v1-15 bottom 0 y))
|
||||
)
|
||||
(let ((v1-18 (-> obj attack-event)))
|
||||
(case v1-18
|
||||
((#f)
|
||||
)
|
||||
(('heat)
|
||||
(send-event (handle->process (-> obj target)) 'heat (* 10.0 (-> *display* seconds-per-frame)))
|
||||
)
|
||||
(('drown-death 'lava 'dark-eco-pool)
|
||||
(let ((a1-8 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-8 from) pp)
|
||||
(set! (-> a1-8 num-params) 2)
|
||||
(set! (-> a1-8 message) 'attack-invinc)
|
||||
(set! (-> a1-8 param 0) (the-as uint #f))
|
||||
(let ((a0-19 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a0-19 mode) v1-18)
|
||||
(set! (-> a1-8 param 1) (the-as uint a0-19))
|
||||
)
|
||||
(if (send-event-function (handle->process (-> obj target)) a1-8)
|
||||
(send-event obj 'notify 'attack)
|
||||
)
|
||||
(cond
|
||||
((handle->process (-> obj target))
|
||||
(cond
|
||||
((not (dummy-10 (-> obj vol) (-> (the-as target (-> obj target process 0)) control trans)))
|
||||
(dummy-27 obj)
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (-> (the-as target (-> obj target process 0)) water)))
|
||||
(when (and (logtest? (water-flags wt19) (-> obj flags))
|
||||
(logtest? (-> v1-15 flags) (water-flags wt09))
|
||||
(>= (-> v1-15 surface-height) (-> v1-15 bottom 0 y))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(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) 'attack)
|
||||
(set! (-> a1-10 param 0) (the-as uint #f))
|
||||
(let ((a0-27 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a0-27 mode) v1-18)
|
||||
(set! (-> a1-10 param 1) (the-as uint a0-27))
|
||||
)
|
||||
(if (send-event-function (handle->process (-> obj target)) a1-10)
|
||||
(send-event obj 'notify 'attack)
|
||||
)
|
||||
(let ((v1-18 (-> obj attack-event)))
|
||||
(case v1-18
|
||||
((#f)
|
||||
)
|
||||
(('heat)
|
||||
(send-event (handle->process (-> obj target)) 'heat (* 10.0 (-> *display* seconds-per-frame)))
|
||||
)
|
||||
(('drown-death 'lava 'dark-eco-pool)
|
||||
(if (send-event (handle->process (-> obj target)) 'attack-invinc #f (static-attack-info ((mode v1-18))))
|
||||
(send-event obj 'notify 'attack)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (send-event (handle->process (-> obj target)) 'attack #f (static-attack-info ((mode v1-18))))
|
||||
(send-event obj 'notify 'attack)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1331,39 +1255,38 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and *target*
|
||||
(and (not (handle->process (-> *target* water volume))) (dummy-10 (-> obj vol) (-> *target* control trans)))
|
||||
)
|
||||
(let ((s5-0 (-> *target* water)))
|
||||
(process-entity-status! obj (entity-perm-status bit-3) #t)
|
||||
(set! (-> s5-0 volume) (process->handle obj))
|
||||
(set! (-> obj target) (process->handle *target*))
|
||||
(logior! (-> s5-0 flags) (water-flags wt01))
|
||||
(set! (-> s5-0 base-height) (-> obj water-height))
|
||||
(set! (-> s5-0 ocean-offset) 0.0)
|
||||
(logior! (-> s5-0 flags) (-> obj flags))
|
||||
(if (< 0.0 (-> obj wade-height))
|
||||
(set! (-> s5-0 wade-height) (-> obj wade-height))
|
||||
)
|
||||
(if (< 0.0 (-> obj swim-height))
|
||||
(set! (-> s5-0 swim-height) (-> obj swim-height))
|
||||
)
|
||||
(if (< 0.0 (-> obj bottom-height))
|
||||
(set! (-> s5-0 bottom-height) (-> obj bottom-height))
|
||||
)
|
||||
(set-zero! (-> s5-0 bob))
|
||||
)
|
||||
)
|
||||
((and *target*
|
||||
(and (not (handle->process (-> *target* water volume))) (dummy-10 (-> obj vol) (-> *target* control trans)))
|
||||
)
|
||||
(let ((s5-0 (-> *target* water)))
|
||||
(process-entity-status! obj (entity-perm-status bit-3) #t)
|
||||
(set! (-> s5-0 volume) (process->handle obj))
|
||||
(set! (-> obj target) (process->handle *target*))
|
||||
(logior! (-> s5-0 flags) (water-flags wt01))
|
||||
(set! (-> s5-0 base-height) (-> obj water-height))
|
||||
(set! (-> s5-0 ocean-offset) 0.0)
|
||||
(logior! (-> s5-0 flags) (-> obj flags))
|
||||
(if (< 0.0 (-> obj wade-height))
|
||||
(set! (-> s5-0 wade-height) (-> obj wade-height))
|
||||
)
|
||||
(if (< 0.0 (-> obj swim-height))
|
||||
(set! (-> s5-0 swim-height) (-> obj swim-height))
|
||||
)
|
||||
(if (< 0.0 (-> obj bottom-height))
|
||||
(set! (-> s5-0 bottom-height) (-> obj bottom-height))
|
||||
)
|
||||
(set-zero! (-> s5-0 bob))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate water-vol-startup (water-vol)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(go-virtual water-vol-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -1371,8 +1294,7 @@
|
||||
|
||||
(defstate water-vol-idle (water-vol)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'update)
|
||||
(TODO-RENAME-26 self)
|
||||
@@ -1380,18 +1302,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(dummy-27 self)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(TODO-RENAME-26 self)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(the-as (function none :behavior water-vol) anim-loop)
|
||||
:code (the-as (function none :behavior water-vol) anim-loop)
|
||||
)
|
||||
|
||||
(defmethod set-stack-size! water-vol ((obj water-vol))
|
||||
|
||||
+365
-730
File diff suppressed because it is too large
Load Diff
@@ -279,7 +279,7 @@
|
||||
|
||||
(define *random-generator* (new 'global 'random-generator))
|
||||
;; I wonder who wrote this code.
|
||||
(set! (-> *random-generator* seed) #x666EDD1E)
|
||||
(set! (-> *random-generator* seed) #x666edd1e)
|
||||
|
||||
(defmacro sext32-64 (x)
|
||||
"Sign extend a 32-bit value to 64-bits"
|
||||
@@ -311,3 +311,9 @@
|
||||
(the uint result)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro rand-float-gen (&key (gen *random-generator*))
|
||||
"Generate a float from [0, 1)"
|
||||
`(+ -1.0 (the-as float (logior #x3f800000 (/ (rand-uint31-gen ,gen) 256))))
|
||||
)
|
||||
|
||||
|
||||
@@ -140,37 +140,28 @@
|
||||
)
|
||||
|
||||
(define *default-nav-mesh* (new 'static 'nav-mesh
|
||||
:bounds
|
||||
(new 'static 'sphere :x 12288.0 :y -200704.0 :z 12288.0 :w 20480.0)
|
||||
:origin
|
||||
(new 'static 'vector :y -200704.0 :w 1.0)
|
||||
:bounds (new 'static 'sphere :x 12288.0 :y -200704.0 :z 12288.0 :w 20480.0)
|
||||
:origin (new 'static 'vector :y -200704.0 :w 1.0)
|
||||
:vertex-count 4
|
||||
:vertex
|
||||
(new 'static 'inline-array nav-vertex 4
|
||||
:vertex (new 'static 'inline-array nav-vertex 4
|
||||
(new 'static 'nav-vertex :z 16384.0 :w 1.0)
|
||||
(new 'static 'nav-vertex :z 8192.0 :w 1.0)
|
||||
(new 'static 'nav-vertex :x 8192.0 :z 8192.0 :w 1.0)
|
||||
(new 'static 'nav-vertex :x 8192.0 :w 1.0)
|
||||
)
|
||||
:poly-count 2
|
||||
:poly
|
||||
(new 'static 'inline-array nav-poly 2
|
||||
:poly (new 'static 'inline-array nav-poly 2
|
||||
(new 'static 'nav-poly
|
||||
:vertex
|
||||
(new 'static 'array uint8 3 #x0 #x2 #x1)
|
||||
:adj-poly
|
||||
(new 'static 'array uint8 3 #xff #x1 #xff)
|
||||
:vertex (new 'static 'array uint8 3 #x0 #x2 #x1)
|
||||
:adj-poly (new 'static 'array uint8 3 #xff #x1 #xff)
|
||||
)
|
||||
(new 'static 'nav-poly
|
||||
:id #x1
|
||||
:vertex
|
||||
(new 'static 'array uint8 3 #x1 #x2 #x3)
|
||||
:adj-poly
|
||||
(new 'static 'array uint8 3 #x0 #xff #xff)
|
||||
:vertex (new 'static 'array uint8 3 #x1 #x2 #x3)
|
||||
:adj-poly (new 'static 'array uint8 3 #x0 #xff #xff)
|
||||
)
|
||||
)
|
||||
:route
|
||||
(new 'static 'inline-array vector4ub 4
|
||||
:route (new 'static 'inline-array vector4ub 4
|
||||
(new 'static 'vector4ub :data (new 'static 'array uint8 4 #xcb #x0 #x0 #x0))
|
||||
(new 'static 'vector4ub)
|
||||
(new 'static 'vector4ub)
|
||||
@@ -243,17 +234,11 @@
|
||||
(vector+! arg1 arg1 (-> obj origin))
|
||||
)
|
||||
|
||||
(define *edge-vert0-table*
|
||||
(the-as (array int8) (new 'static 'boxed-array :type int8 :length 3 :allocated-length 3 1 2 0))
|
||||
)
|
||||
(define *edge-vert0-table* (the-as (array int8) (new 'static 'boxed-array :type int8 1 2 0)))
|
||||
|
||||
(define *edge-vert1-table*
|
||||
(the-as (array int8) (new 'static 'boxed-array :type int8 :length 3 :allocated-length 3 2 0 1))
|
||||
)
|
||||
(define *edge-vert1-table* (the-as (array int8) (new 'static 'boxed-array :type int8 2 0 1)))
|
||||
|
||||
(define *edge-mask-table*
|
||||
(the-as (array int8) (new 'static 'boxed-array :type int8 :length 3 :allocated-length 3 1 2 4))
|
||||
)
|
||||
(define *edge-mask-table* (the-as (array int8) (new 'static 'boxed-array :type int8 1 2 4)))
|
||||
|
||||
(defun inc-mod3 ((arg0 int))
|
||||
(local-vars (v0-1 int) (v1-1 int))
|
||||
|
||||
@@ -1116,24 +1116,14 @@
|
||||
)
|
||||
)
|
||||
(let ((v1-146 (-> self current-level)))
|
||||
(when (and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 2))
|
||||
(and v1-146
|
||||
(< (-> self control trans y) (-> v1-146 info bottom-height))
|
||||
(not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control unknown-cpad-info00 number) r2)))
|
||||
)
|
||||
)
|
||||
(let ((a1-32 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-32 from) self)
|
||||
(set! (-> a1-32 num-params) 2)
|
||||
(set! (-> a1-32 message) 'attack-invinc)
|
||||
(set! (-> a1-32 param 0) (the-as uint #f))
|
||||
(let ((a0-102 (new 'static 'attack-info :mask #x20)))
|
||||
(set! (-> a0-102 mode) 'endlessfall)
|
||||
(set! (-> a1-32 param 1) (the-as uint a0-102))
|
||||
)
|
||||
(send-event-function self a1-32)
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 2))
|
||||
(and v1-146
|
||||
(< (-> self control trans y) (-> v1-146 info bottom-height))
|
||||
(not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control unknown-cpad-info00 number) r2)))
|
||||
)
|
||||
)
|
||||
(send-event self 'attack-invinc #f (static-attack-info ((mode 'endlessfall))))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -2042,18 +2032,7 @@
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(set! (-> self control unknown-vector52 y) (+ -819200.0 (-> self control unknown-vector52 y)))
|
||||
(set! (-> self align) (new 'process 'align-control self))
|
||||
(let ((s5-1 (get-process *16k-dead-pool* sidekick #x4000)))
|
||||
(set! (-> self sidekick)
|
||||
(the-as (pointer sidekick) (when s5-1
|
||||
(let ((t9-37 (method-of-type sidekick activate)))
|
||||
(t9-37 (the-as sidekick s5-1) self 'sidekick (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-1 init-sidekick)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self sidekick) (process-spawn sidekick :init init-sidekick :from *16k-dead-pool* :to self))
|
||||
(set! (-> self manipy) (the-as (pointer manipy) #f))
|
||||
(set! (-> self event-hook) target-generic-event-handler)
|
||||
(set! (-> self current-level) #f)
|
||||
@@ -2081,17 +2060,16 @@
|
||||
(set! (-> *level* border?) #f)
|
||||
(set! (-> *setting-control* default border-mode) #f)
|
||||
(stop arg0)
|
||||
(let* ((s5-0 (get-process *target-dead-pool* target #x4000))
|
||||
(v1-3 (when s5-0
|
||||
(let ((t9-2 (method-of-type target activate)))
|
||||
;; note: this constant must be DPROCESS_STACK_SIZE
|
||||
(t9-2 (the-as target s5-0) *target-pool* 'target (&-> *dram-stack* DPROCESS_STACK_SIZE))
|
||||
)
|
||||
(run-now-in-process s5-0 init-target arg1)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (process-spawn
|
||||
target
|
||||
:init init-target
|
||||
arg1
|
||||
:from *target-dead-pool*
|
||||
:to *target-pool*
|
||||
:stack *kernel-dram-stack*
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-3
|
||||
(set! *target* (the-as target (-> v1-3 0 self)))
|
||||
(set! *target* #f)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
(load-art-import sidekick)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/sidekick-ag.gc")
|
||||
|
||||
(define *sidekick-remap* '(("run-to-stance-left" "run-to-stance")
|
||||
@@ -65,8 +66,7 @@
|
||||
)
|
||||
|
||||
(defstate sidekick-clone (sidekick)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('matrix)
|
||||
@@ -122,10 +122,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(the-as (function none :behavior sidekick) looping-code)
|
||||
:post
|
||||
(behavior ()
|
||||
:code (the-as (function none :behavior sidekick) looping-code)
|
||||
:post (behavior ()
|
||||
(let ((v1-0 'process-drawable-art-error)
|
||||
(a0-0 (-> self parent-override))
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/deathcam-ag.gc")
|
||||
|
||||
(defskelgroup *deathcam-sg* deathcam deathcam-lod0-jg deathcam-idle-ja
|
||||
@@ -39,10 +40,8 @@
|
||||
)
|
||||
|
||||
(defstate target-continue (target)
|
||||
:event
|
||||
target-generic-event-handler
|
||||
:exit
|
||||
(behavior ()
|
||||
:event target-generic-event-handler
|
||||
:exit (behavior ()
|
||||
(set! (-> *load-boundary-target* 0 quad) (-> (camera-pos) quad))
|
||||
(set! (-> *load-boundary-target* 1 quad) (-> (target-pos 0) quad))
|
||||
(set! (-> *load-boundary-target* 2 quad) (-> *load-boundary-target* 0 quad))
|
||||
@@ -60,8 +59,7 @@
|
||||
(clear-pending-settings-from-process *setting-control* self 'music)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 continue-point))
|
||||
:code (behavior ((arg0 continue-point))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (-> *art-control* reserve-buffer)
|
||||
(reserve-free *art-control* (-> *art-control* reserve-buffer heap))
|
||||
@@ -239,44 +237,36 @@
|
||||
)
|
||||
((logtest? (-> arg0 flags) (continue-flags sage-demo-convo))
|
||||
(set-blackout-frames (seconds 1))
|
||||
(let ((s5-5 (get-process *default-dead-pool* process #x4000)))
|
||||
(when s5-5
|
||||
(let ((t9-60 (method-of-type process activate)))
|
||||
(t9-60 s5-5 *default-pool* 'process (the-as pointer #x70004000))
|
||||
)
|
||||
(run-next-time-in-process
|
||||
s5-5
|
||||
(lambda ()
|
||||
(local-vars (v1-10 basic))
|
||||
(let ((gp-0 (entity-by-name "sage-23")))
|
||||
(when gp-0
|
||||
(set-blackout-frames (seconds 100))
|
||||
(entity-birth-no-kill gp-0)
|
||||
(suspend)
|
||||
(suspend)
|
||||
(send-event
|
||||
(if gp-0
|
||||
(-> gp-0 extra process)
|
||||
)
|
||||
'play-anim
|
||||
(process-spawn-function
|
||||
process
|
||||
(lambda ()
|
||||
(local-vars (v1-10 basic))
|
||||
(let ((gp-0 (entity-by-name "sage-23")))
|
||||
(when gp-0
|
||||
(set-blackout-frames (seconds 100))
|
||||
(entity-birth-no-kill gp-0)
|
||||
(suspend)
|
||||
(suspend)
|
||||
(send-event
|
||||
(if gp-0
|
||||
(-> gp-0 extra process)
|
||||
)
|
||||
)
|
||||
'play-anim
|
||||
)
|
||||
(let ((gp-1 (-> *display* base-frame-counter)))
|
||||
(until (>= (- (-> *display* base-frame-counter) gp-1) (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until (not v1-10)
|
||||
(suspend)
|
||||
(set! v1-10 (and *target* (logtest? (-> *target* state-flags) (state-flags sf08))))
|
||||
)
|
||||
(set! (-> *cpad-list* cpads 0 change-time) (-> *display* base-frame-counter))
|
||||
(reset-actors 'dead)
|
||||
(start 'play (get-continue-by-name *game-info* "misty-start"))
|
||||
)
|
||||
)
|
||||
(-> s5-5 ppointer)
|
||||
(let ((gp-1 (-> *display* base-frame-counter)))
|
||||
(until (>= (- (-> *display* base-frame-counter) gp-1) (seconds 2))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(until (not v1-10)
|
||||
(suspend)
|
||||
(set! v1-10 (and *target* (logtest? (-> *target* state-flags) (state-flags sf08))))
|
||||
)
|
||||
(set! (-> *cpad-list* cpads 0 change-time) (-> *display* base-frame-counter))
|
||||
(reset-actors 'dead)
|
||||
(start 'play (get-continue-by-name *game-info* "misty-start"))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -454,15 +444,7 @@
|
||||
(when (and s5-8 (not (null? (-> s5-8 continues))))
|
||||
(format 0 "~A ~A ~A~%" (-> arg0 level) (-> s5-8 name) (car (-> s5-8 continues)))
|
||||
(inspect global)
|
||||
(let ((gp-1 (get-process *default-dead-pool* process #x4000)))
|
||||
(when gp-1
|
||||
(let ((t9-104 (method-of-type process activate)))
|
||||
(t9-104 gp-1 *default-pool* 'process (the-as pointer #x70004000))
|
||||
)
|
||||
(run-next-time-in-process gp-1 (lambda ((arg0 continue-point)) (start 'play arg0)) (car (-> s5-8 continues)))
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
)
|
||||
(process-spawn-function process (lambda ((arg0 continue-point)) (start 'play arg0)) (car (-> s5-8 continues)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -473,8 +455,7 @@
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-no-move-post
|
||||
:post target-no-move-post
|
||||
)
|
||||
|
||||
(define *smack-mods* (new 'static 'surface
|
||||
@@ -499,8 +480,7 @@
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mult-hook
|
||||
(lambda :behavior target
|
||||
:mult-hook (lambda :behavior target
|
||||
((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int))
|
||||
(when (= arg3 1)
|
||||
(let ((f30-0 (-> self control unknown-float40))
|
||||
@@ -545,8 +525,7 @@
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mult-hook
|
||||
(lambda :behavior target
|
||||
:mult-hook (lambda :behavior target
|
||||
((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int))
|
||||
(when (= arg3 1)
|
||||
(let ((f30-0 (-> self control unknown-float40))
|
||||
@@ -581,26 +560,19 @@
|
||||
)
|
||||
|
||||
(defbehavior target-hit-effect target ((arg0 attack-info))
|
||||
(let ((s5-0 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s5-0
|
||||
(let ((t9-1 (method-of-type part-tracker activate)))
|
||||
(t9-1 (the-as part-tracker s5-0) self 'part-tracker (the-as pointer #x70004000))
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 1)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(if (logtest? (-> arg0 mask) (attack-mask intersection))
|
||||
(-> arg0 intersection)
|
||||
(-> self control root-prim prim-core)
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-0
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 1)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(if (logtest? (-> arg0 mask) 4)
|
||||
(-> arg0 intersection)
|
||||
(-> self control root-prim prim-core)
|
||||
)
|
||||
)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
:to self
|
||||
)
|
||||
(let ((v1-9 (-> arg0 mode)))
|
||||
(cond
|
||||
@@ -622,15 +594,7 @@
|
||||
)
|
||||
(case (-> arg0 mode)
|
||||
(('burn 'burnup)
|
||||
(let ((gp-1 (get-process *default-dead-pool* process #x4000)))
|
||||
(when gp-1
|
||||
(let ((t9-10 (method-of-type process activate)))
|
||||
(t9-10 gp-1 self 'process (the-as pointer #x70004000))
|
||||
)
|
||||
(run-next-time-in-process gp-1 process-drawable-burn-effect 1200)
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
)
|
||||
(process-spawn-function process process-drawable-burn-effect 1200 :to self)
|
||||
)
|
||||
(('tar)
|
||||
(sound-play-by-name (static-sound-name "get-burned") (new-sound-id) 1024 0 0 1 #t)
|
||||
@@ -707,7 +671,7 @@
|
||||
(let ((s5-0 #f))
|
||||
(if (and (!= (-> arg0 angle) 'front)
|
||||
(!= (-> arg0 angle) 'shove)
|
||||
(logtest? (-> arg0 mask) 2)
|
||||
(logtest? (-> arg0 mask) (attack-mask vector))
|
||||
(!= (-> arg0 shove-back) 0.0)
|
||||
)
|
||||
(forward-up-nopitch->quaternion (-> self control dir-targ) arg1 (-> self control dynam gravity-normal))
|
||||
@@ -720,7 +684,7 @@
|
||||
(set! (-> self control unknown-surface00) *smack-up-mods*)
|
||||
)
|
||||
(('front)
|
||||
(if (and (logtest? (-> arg0 mask) 2) (!= (-> arg0 shove-back) 0.0))
|
||||
(if (and (logtest? (-> arg0 mask) (attack-mask vector)) (!= (-> arg0 shove-back) 0.0))
|
||||
(forward-up-nopitch->quaternion
|
||||
(-> self control dir-targ)
|
||||
(vector-negate! (new 'stack-no-clear 'vector) arg1)
|
||||
@@ -844,10 +808,8 @@
|
||||
)
|
||||
|
||||
(defstate target-hit (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:exit
|
||||
(behavior ()
|
||||
:event target-standard-event-handler
|
||||
:exit (behavior ()
|
||||
(let ((gp-0 (new-stack-vector0))
|
||||
(f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
)
|
||||
@@ -872,8 +834,7 @@
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (= *cheat-mode* 'debug)
|
||||
(when (and (not *pause-lock*) (cpad-hold? (-> self control unknown-cpad-info00 number) r2))
|
||||
(pickup-collectable! (-> self fact-info-target) (pickup-type eco-green) (the-as float 1.0) (the-as handle #f))
|
||||
@@ -882,8 +843,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol) (arg1 attack-info))
|
||||
:code (behavior ((arg0 symbol) (arg1 attack-info))
|
||||
(logclear! (-> self water flags) (water-flags wt16))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(let ((gp-0 (-> self attack-info)))
|
||||
@@ -908,7 +868,7 @@
|
||||
)
|
||||
)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) 2))
|
||||
(when (zero? (logand (-> gp-0 mask) (attack-mask vector)))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
(set! (-> gp-0 vector y) (-> gp-0 shove-up))
|
||||
@@ -1012,16 +972,12 @@
|
||||
(go target-hit-ground #f)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(define *death-spool-array*
|
||||
(the-as (array spool-anim)
|
||||
(new
|
||||
'static
|
||||
'boxed-array
|
||||
:type spool-anim :length 11 :allocated-length 11
|
||||
(new 'static 'boxed-array :type spool-anim
|
||||
(new 'static 'spool-anim :name "death-0181" :index 3 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0182" :index 4 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0184" :index 5 :parts 1 :command-list '())
|
||||
@@ -1077,8 +1033,7 @@
|
||||
)
|
||||
|
||||
(defstate target-death (target)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'end-mode)
|
||||
@@ -1114,8 +1069,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(logclear! (-> self state-flags) (state-flags sf03 sf15))
|
||||
(target-exit)
|
||||
(clear-pending-settings-from-process *setting-control* self 'process-mask)
|
||||
@@ -1126,21 +1080,12 @@
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(-> target-hit trans)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:trans (-> target-hit trans)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
(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) 'target)
|
||||
(set! (-> a1-0 param 0) (the-as uint 'die))
|
||||
(set! (-> a1-0 param 1) (the-as uint arg0))
|
||||
(set! (-> self control unknown-int21)
|
||||
(the-as int (send-event-function (handle->process (-> self attack-info attacker)) a1-0))
|
||||
)
|
||||
)
|
||||
(set! (-> self control unknown-int21)
|
||||
(the-as int (send-event (handle->process (-> self attack-info attacker)) 'target 'die arg0))
|
||||
)
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(target-timed-invulnerable-off self)
|
||||
(set-setting! *setting-control* self 'process-mask 'set (the-as float 0.0) #x14a0000)
|
||||
@@ -1202,26 +1147,30 @@
|
||||
(cond
|
||||
((= arg0 'dark-eco-pool)
|
||||
(sound-play-by-name (static-sound-name "death-darkeco") (new-sound-id) 1024 0 0 1 #t)
|
||||
(let ((gp-6 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-6
|
||||
(let ((t9-21 (method-of-type part-tracker activate)))
|
||||
(t9-21 (the-as part-tracker gp-6) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-6 part-tracker-init (-> *part-group-id-table* 31) -1 #f #f #f (-> self control trans))
|
||||
(-> gp-6 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 31)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self control trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
((or (= arg0 'lava) (= arg0 'melt))
|
||||
(sound-play-by-name (static-sound-name "death-melt") (new-sound-id) 1024 0 0 1 #t)
|
||||
(let ((gp-8 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-8
|
||||
(let ((t9-26 (method-of-type part-tracker activate)))
|
||||
(t9-26 (the-as part-tracker gp-8) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-8 part-tracker-init (-> *part-group-id-table* 32) -1 #f #f #f (-> self control trans))
|
||||
(-> gp-8 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 32)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self control trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1357,23 +1306,16 @@
|
||||
)
|
||||
)
|
||||
(('burn 'burnup)
|
||||
(let ((gp-15 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-15
|
||||
(let ((t9-52 (method-of-type part-tracker activate)))
|
||||
(t9-52 (the-as part-tracker gp-15) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-15
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 708)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self control trans)
|
||||
)
|
||||
(-> gp-15 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 708)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self control trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(target-death-anim (the-as spool-anim #f))
|
||||
)
|
||||
@@ -1421,19 +1363,11 @@
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim)
|
||||
(send-event (ppointer->process (-> self sidekick)) 'shadow #f)
|
||||
(send-event self 'blend-shape #t)
|
||||
(let* ((s5-7 (get-process *default-dead-pool* pov-camera #x4000))
|
||||
(s5-8
|
||||
(ppointer->handle
|
||||
(when s5-7
|
||||
(let ((t9-68 (method-of-type pov-camera activate)))
|
||||
(t9-68 (the-as pov-camera s5-7) *target-pool* 'pov-camera (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-7 pov-camera-init-by-other (-> self control trans) *deathcam-sg* gp-18 4 self '())
|
||||
(-> s5-7 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-8 (ppointer->handle
|
||||
(process-spawn pov-camera (-> self control trans) *deathcam-sg* gp-18 4 self '() :to *target-pool*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (handle->process s5-8) 'music-movie-volume 0.0)
|
||||
(send-event (handle->process s5-8) 'sfx-movie-volume 50.0)
|
||||
(set! (-> self post-hook) target-no-ja-move-post)
|
||||
@@ -1461,8 +1395,7 @@
|
||||
(anim-loop)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-no-stick-post
|
||||
:post target-no-stick-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
'shove
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 mask) (the-as uint 2248))
|
||||
(set! (-> s5-0 mask) (attack-mask attacker shove-back shove-up angle))
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1))
|
||||
(go arg3 'shove s5-0)
|
||||
)
|
||||
@@ -342,7 +342,7 @@
|
||||
(when (zero? (logand (-> self state-flags) (state-flags sf03)))
|
||||
(cond
|
||||
((or (logtest? (-> self state-flags) (state-flags sf04 sf05 sf06))
|
||||
(and (logtest? (-> arg1 mask) 32)
|
||||
(and (logtest? (-> arg1 mask) (attack-mask mode))
|
||||
(= (-> arg1 mode) 'darkeco)
|
||||
(and (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
@@ -381,18 +381,18 @@
|
||||
)
|
||||
(when a1-2
|
||||
(get-intersect-point (-> self attack-info-rec intersection) a1-2 (-> self control) arg3)
|
||||
(logior! (-> self attack-info-rec mask) 4)
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask intersection))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self attack-info-rec prev-state) (-> self state))
|
||||
(logior! (-> self attack-info-rec mask) 8192)
|
||||
(when (zero? (logand (-> self attack-info-rec mask) 8))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask atki13))
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg2))
|
||||
(logior! (-> self attack-info-rec mask) 8)
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> self attack-info-rec mask) 32)
|
||||
((and (logtest? (-> self attack-info-rec mask) (attack-mask mode))
|
||||
(and (= (-> self attack-info-rec mode) 'damage)
|
||||
(not (and (= (-> self game mode) 'play) (>= 1.0 (-> self fact-info-target health))))
|
||||
)
|
||||
@@ -403,29 +403,22 @@
|
||||
(- (-> *FACT-bank* health-single-inc))
|
||||
(the-as handle #f)
|
||||
)
|
||||
(let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-1
|
||||
(let ((t9-5 (method-of-type part-tracker activate)))
|
||||
(t9-5 (the-as part-tracker gp-1) self 'part-tracker (the-as pointer #x70004000))
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 1)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(if (logtest? (-> self attack-info-rec mask) (attack-mask intersection))
|
||||
(-> self attack-info-rec intersection)
|
||||
(-> self control root-prim prim-core)
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-1
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 1)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(if (logtest? (-> self attack-info-rec mask) 4)
|
||||
(-> self attack-info-rec intersection)
|
||||
(-> self control root-prim prim-core)
|
||||
)
|
||||
)
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
:to self
|
||||
)
|
||||
(target-timed-invulnerable
|
||||
(if (logtest? (-> self attack-info-rec mask) 16)
|
||||
(if (logtest? (-> self attack-info-rec mask) (attack-mask invinc-time))
|
||||
(-> self attack-info-rec invinc-time)
|
||||
(-> *TARGET-bank* hit-invulnerable-timeout)
|
||||
)
|
||||
@@ -810,9 +803,9 @@
|
||||
(('shove)
|
||||
(when (!= (-> self next-state name) 'target-hit)
|
||||
(mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 104)
|
||||
(when (zero? (logand (-> self attack-info-rec mask) 8))
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg0))
|
||||
(logior! (-> self attack-info-rec mask) 8)
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
(go target-hit 'shove (-> self attack-info-rec))
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@
|
||||
(define-extern target-collide-set! (function symbol float int :behavior target))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/eichar-ag.gc")
|
||||
|
||||
(defskelgroup *jchar-sg* eichar eichar-lod0-jg -1
|
||||
@@ -21,10 +22,8 @@
|
||||
|
||||
(define *target-shadow-control*
|
||||
(new 'static 'shadow-control :settings (new 'static 'shadow-settings
|
||||
:center
|
||||
(new 'static 'vector :w (the-as float #x2))
|
||||
:shadow-dir
|
||||
(new 'static 'vector :x -0.4226 :y -0.9063 :w 409600.0)
|
||||
:center (new 'static 'vector :w (the-as float #x2))
|
||||
:shadow-dir (new 'static 'vector :x -0.4226 :y -0.9063 :w 409600.0)
|
||||
:bot-plane (new 'static 'plane :y 1.0 :w 37683.2)
|
||||
:top-plane (new 'static 'plane :y 1.0 :w 4096.0)
|
||||
)
|
||||
@@ -180,8 +179,7 @@
|
||||
:root-offset (new 'static 'vector :y 4915.2 :w 1.0)
|
||||
:body-radius (meters 0.7)
|
||||
:edge-radius (meters 0.35)
|
||||
:edge-offset
|
||||
(new 'static 'vector :y 4915.2 :z 4096.0 :w 1.0)
|
||||
:edge-offset (new 'static 'vector :y 4915.2 :z 4096.0 :w 1.0)
|
||||
:head-radius (meters 0.7)
|
||||
:head-height (meters 1.4)
|
||||
:head-offset (new 'static 'vector :y 4915.2 :w 1.0)
|
||||
@@ -997,41 +995,41 @@
|
||||
(with-pp
|
||||
(let ((s4-0 (-> arg0 mask)))
|
||||
(set! (-> obj mask) (-> arg0 mask))
|
||||
(if (logtest? s4-0 8)
|
||||
(if (logtest? s4-0 (attack-mask attacker))
|
||||
(set! (-> obj attacker) (-> arg0 attacker))
|
||||
)
|
||||
(if (logtest? s4-0 32)
|
||||
(if (logtest? s4-0 (attack-mask mode))
|
||||
(set! (-> obj mode) (-> arg0 mode))
|
||||
)
|
||||
(if (logtest? s4-0 2048)
|
||||
(if (logtest? s4-0 (attack-mask angle))
|
||||
(set! (-> obj angle) (-> arg0 angle))
|
||||
)
|
||||
(if (logtest? s4-0 512)
|
||||
(if (logtest? s4-0 (attack-mask dist))
|
||||
(set! (-> obj dist) (-> arg0 dist))
|
||||
)
|
||||
(if (logtest? s4-0 1024)
|
||||
(if (logtest? s4-0 (attack-mask control))
|
||||
(set! (-> obj control) (-> arg0 control))
|
||||
)
|
||||
(if (logtest? s4-0 256)
|
||||
(if (logtest? s4-0 (attack-mask speed))
|
||||
(set! (-> obj speed) (-> arg0 speed))
|
||||
)
|
||||
(if (logtest? s4-0 64)
|
||||
(if (logtest? s4-0 (attack-mask shove-back))
|
||||
(set! (-> obj shove-back) (-> arg0 shove-back))
|
||||
)
|
||||
(if (logtest? s4-0 128)
|
||||
(if (logtest? s4-0 (attack-mask shove-up))
|
||||
(set! (-> obj shove-up) (-> arg0 shove-up))
|
||||
)
|
||||
(if (logtest? s4-0 16)
|
||||
(if (logtest? s4-0 (attack-mask invinc-time))
|
||||
(set! (-> obj invinc-time) (-> arg0 invinc-time))
|
||||
)
|
||||
(if (logtest? s4-0 4096)
|
||||
(if (logtest? s4-0 (attack-mask rotate-to))
|
||||
(set! (-> obj rotate-to) (-> arg0 rotate-to))
|
||||
)
|
||||
(if (logtest? s4-0 4)
|
||||
(if (logtest? s4-0 (attack-mask intersection))
|
||||
(set! (-> obj intersection quad) (-> arg0 intersection quad))
|
||||
)
|
||||
(cond
|
||||
((zero? (logand s4-0 2))
|
||||
((zero? (logand s4-0 (attack-mask vector)))
|
||||
(let* ((s3-0 pp)
|
||||
(s2-0 (handle->process (-> obj attacker)))
|
||||
(v1-39 (if (and (nonzero? s2-0) (type-type? (-> s2-0 type) process-drawable))
|
||||
@@ -1046,7 +1044,7 @@
|
||||
(-> (the-as process-drawable s3-0) root trans)
|
||||
(-> (the-as process-drawable v1-39) root trans)
|
||||
)
|
||||
(logior! (-> obj mask) 2)
|
||||
(logior! (-> obj mask) (attack-mask vector))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1062,18 +1060,18 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj vector quad) (-> arg0 vector quad))
|
||||
(if (zero? (logand s4-0 64))
|
||||
(if (zero? (logand s4-0 (attack-mask shove-back)))
|
||||
(set! (-> obj shove-back) (vector-xz-length (-> obj vector)))
|
||||
)
|
||||
(if (zero? (logand s4-0 128))
|
||||
(if (zero? (logand s4-0 (attack-mask shove-up)))
|
||||
(set! (-> obj shove-up) (-> obj vector y))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> obj mask) 512))
|
||||
(if (zero? (logand (-> obj mask) (attack-mask dist)))
|
||||
(set! (-> obj dist) (fabs (-> obj shove-back)))
|
||||
)
|
||||
(if (logtest? s4-0 1)
|
||||
(if (logtest? s4-0 (attack-mask trans))
|
||||
(set! (-> obj trans quad) (-> arg0 trans quad))
|
||||
)
|
||||
)
|
||||
|
||||
+151
-300
@@ -334,36 +334,29 @@
|
||||
)
|
||||
|
||||
(defstate target-startup (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
:event target-standard-event-handler
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(suspend)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-no-move-post
|
||||
:post target-no-move-post
|
||||
)
|
||||
|
||||
(defstate target-stance (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self control unknown-float81) 0.0)
|
||||
(target-state-hook-exit)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
(go target-wade-stance)
|
||||
@@ -412,8 +405,7 @@
|
||||
(fall-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((s5-0 22)
|
||||
(gp-0 (new 'stack 'ground-tween-info))
|
||||
)
|
||||
@@ -465,11 +457,10 @@
|
||||
((ja-group? eichar-attack-punch-ja)
|
||||
(set! (-> self control unknown-float81) (-> self control unknown-float80))
|
||||
(set! (-> self control unknown-surface00) *walk-no-turn-mods*)
|
||||
(ja-no-eval :group!
|
||||
(if (rand-vu-percent? (the-as float 0.3))
|
||||
eichar-attack-punch-alt-end-ja
|
||||
eichar-attack-punch-end-ja
|
||||
)
|
||||
(ja-no-eval :group! (if (rand-vu-percent? (the-as float 0.3))
|
||||
eichar-attack-punch-alt-end-ja
|
||||
eichar-attack-punch-end-ja
|
||||
)
|
||||
:num! (seek!)
|
||||
:frame-num 0.0
|
||||
)
|
||||
@@ -587,27 +578,22 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-walk (target)
|
||||
:event
|
||||
target-walk-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-walk-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(target-effect-exit)
|
||||
(target-state-hook-exit)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (= (-> self control ground-pat material) (pat-material ice))
|
||||
(target-effect-exit)
|
||||
@@ -673,8 +659,7 @@
|
||||
(fall-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((f28-0 0.0)
|
||||
(f30-0 (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -16384.0 (-> self control unknown-float01))))))
|
||||
(gp-0 #f)
|
||||
@@ -824,11 +809,10 @@
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num!
|
||||
(seek! max (/ (* (fmax 20480.0 (-> self control unknown-float01)) (-> *display* seconds-per-frame))
|
||||
(/ (-> *TARGET-bank* run-up-cycle-dist) (-> *TARGET-bank* run-cycle-length))
|
||||
)
|
||||
)
|
||||
(ja :num! (seek! max (/ (* (fmax 20480.0 (-> self control unknown-float01)) (-> *display* seconds-per-frame))
|
||||
(/ (-> *TARGET-bank* run-up-cycle-dist) (-> *TARGET-bank* run-cycle-length))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! f28-0 30.0)
|
||||
@@ -977,22 +961,18 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-turn-around (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(vector-turn-to (-> self control transv))
|
||||
(set! (-> self control unknown-surface00) *turn-around-mods*)
|
||||
(set! (-> self control unknown-float81) 1.0)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(target-state-hook-exit)
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(set! (-> self control unknown-float01) 0.0)
|
||||
@@ -1000,8 +980,7 @@
|
||||
(set! (-> self control unknown-float81) 0.0)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
@@ -1028,8 +1007,7 @@
|
||||
(slide-down-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.04))
|
||||
(ja :group! eichar-turn-around-ja :num! min)
|
||||
(quaternion-rotate-y! (-> self control dir-targ) (-> self control dir-targ) (the-as float 32768.0))
|
||||
@@ -1048,25 +1026,20 @@
|
||||
(go target-walk)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-no-stick-post
|
||||
:post target-no-stick-post
|
||||
)
|
||||
|
||||
(defstate target-slide-down (target)
|
||||
:event
|
||||
target-walk-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-walk-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-surface00) *jump-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self control unknown-dword35) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (or (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(if (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
|
||||
#t
|
||||
@@ -1077,8 +1050,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(if (not (ja-group? eichar-duck-stance-ja))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
)
|
||||
@@ -1091,8 +1063,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defbehavior init-var-jump target ((arg0 float) (arg1 float) (arg2 vector) (arg3 vector) (arg4 vector))
|
||||
@@ -1227,17 +1198,14 @@
|
||||
)
|
||||
|
||||
(defstate target-duck-stance (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-float81) 1.0)
|
||||
(set! (-> self control unknown-surface00) *duck-mods*)
|
||||
(target-collide-set! 'duck (the-as float 1.0))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(if (not (or (= (-> self next-state name) 'target-duck-walk)
|
||||
(= (-> self next-state name) 'target-duck-stance)
|
||||
(= (-> self next-state name) 'target-walk)
|
||||
@@ -1251,8 +1219,7 @@
|
||||
(target-collide-set! 'normal (the-as float 0.0))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
@@ -1292,8 +1259,7 @@
|
||||
(slide-down-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((ja-group? eichar-duck-roll-ja)
|
||||
(ja-no-eval :group! eichar-duck-roll-end-ja :num! (seek!) :frame-num 0.0)
|
||||
@@ -1325,15 +1291,12 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-duck-walk (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self control unknown-float81) 1.0)
|
||||
(target-collide-set! 'duck (the-as float 1.0))
|
||||
(if (not (ja-group? eichar-duck-roll-ja))
|
||||
@@ -1341,10 +1304,8 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(-> target-duck-stance exit)
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit (-> target-duck-stance exit)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
@@ -1385,8 +1346,7 @@
|
||||
(slide-down-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((and (ja-group? eichar-duck-walk-ja) (= (-> self skel root-channel 0) (-> self skel channel)))
|
||||
)
|
||||
@@ -1403,26 +1363,22 @@
|
||||
(if (= (-> self skel root-channel 0) (-> self skel channel))
|
||||
(set! (-> self control unknown-surface00) *duck-mods*)
|
||||
)
|
||||
(ja :num!
|
||||
(loop! (fmin 1.0 (/ (-> self control unknown-float01)
|
||||
(* 60.0 (/ (-> *TARGET-bank* duck-walk-cycle-dist) (-> *TARGET-bank* run-cycle-length)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja :num! (loop! (fmin 1.0 (/ (-> self control unknown-float01)
|
||||
(* 60.0 (/ (-> *TARGET-bank* duck-walk-cycle-dist) (-> *TARGET-bank* run-cycle-length)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-jump (target)
|
||||
:event
|
||||
target-jump-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 surface))
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float) (arg2 surface))
|
||||
(when (= (-> self control unknown-symbol40) 'launch)
|
||||
(level-hint-spawn
|
||||
(game-text-id daxter-screaming-jump)
|
||||
@@ -1488,10 +1444,8 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit target-exit
|
||||
:trans (behavior ()
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax
|
||||
(-> self control unknown-float123)
|
||||
@@ -1543,8 +1497,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 surface))
|
||||
:code (behavior ((arg0 float) (arg1 float) (arg2 surface))
|
||||
(ja-channel-push! 2 (seconds 0.05))
|
||||
(ja :group! eichar-jump-ja :num! min)
|
||||
(ja :chan 1 :group! eichar-jump-forward-ja :num! (chan 0) :frame-interp (-> self control unknown-float122))
|
||||
@@ -1577,25 +1530,19 @@
|
||||
(target-falling-anim -1 (seconds 0.2))
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-jump-forward (target)
|
||||
:event
|
||||
target-jump-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
((-> target-jump enter) arg0 arg1 (the-as surface #f))
|
||||
(set! (-> self control unknown-surface00) *forward-jump-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(-> target-jump trans)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:exit target-exit
|
||||
:trans (-> target-jump trans)
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(ja-channel-set! 1)
|
||||
(ja-no-eval :group! eichar-jump-ja :num! (seek!) :frame-num (ja-aframe (the-as float 3.0) 0))
|
||||
(until (ja-done? 0)
|
||||
@@ -1610,15 +1557,12 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-double-jump (target)
|
||||
:event
|
||||
target-jump-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
(when (= (-> self control unknown-symbol40) 'launch)
|
||||
enter-state
|
||||
(let ((a0-3 (-> self control unknown-dword60))
|
||||
@@ -1635,10 +1579,8 @@
|
||||
(set! (-> self control unknown-surface00) *double-jump-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit target-exit
|
||||
:trans (behavior ()
|
||||
(target-falling-trans #f (the-as time-frame (if (ja-group? eichar-jump-loop-ja)
|
||||
15
|
||||
-1
|
||||
@@ -1676,8 +1618,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(ja-channel-push! 2 (seconds 0.05))
|
||||
(dummy-10 (-> self skel effect) 'jump-double (the-as float -1.0) -1)
|
||||
(ja-no-eval :group! eichar-jump-ja :num! (seek!) :frame-num (ja-aframe (the-as float 5.0) 0))
|
||||
@@ -1690,15 +1631,12 @@
|
||||
(target-falling-anim -1 (seconds 0.2))
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-high-jump (target)
|
||||
:event
|
||||
target-jump-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 basic))
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float) (arg2 basic))
|
||||
(when (and (= (-> self control unknown-symbol40) 'launch) (!= arg2 'launch))
|
||||
enter-state
|
||||
(let ((a0-3 (-> self control unknown-dword60))
|
||||
@@ -1734,10 +1672,8 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit target-exit
|
||||
:trans (behavior ()
|
||||
(target-falling-trans #f (the-as time-frame (if (ja-group? eichar-jump-loop-ja)
|
||||
15
|
||||
-1
|
||||
@@ -1779,26 +1715,20 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(-> target-jump code)
|
||||
:post
|
||||
target-post
|
||||
:code (-> target-jump code)
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-duck-high-jump (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *turn-around-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
:exit target-exit
|
||||
:code (behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
(if (not (and (ja-group? eichar-duck-stance-ja) (= (-> self skel root-channel 0) (-> self skel channel))))
|
||||
(ja-channel-push! 1 (seconds 0.04))
|
||||
)
|
||||
@@ -1821,15 +1751,12 @@
|
||||
(go target-duck-high-jump-jump arg0 arg1 arg2)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-duck-high-jump-jump (target)
|
||||
:event
|
||||
target-jump-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 819 -609 0 1 #t)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #f) (-> self control transv))
|
||||
@@ -1845,12 +1772,9 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(-> target-high-jump trans)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
:exit target-exit
|
||||
:trans (-> target-high-jump trans)
|
||||
:code (behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
(let ((f30-0 (the-as float (if (= arg2 'launch)
|
||||
110.0
|
||||
35.0
|
||||
@@ -1905,22 +1829,18 @@
|
||||
(the-as none 0)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-falling (target)
|
||||
:event
|
||||
target-jump-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
:event target-jump-event-handler
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(set! (-> self control unknown-surface00) *jump-mods*)
|
||||
(set! (-> self control unknown-uint20) (the-as uint arg0))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(target-falling-trans
|
||||
(-> self control unknown-spoolanim00)
|
||||
(the-as time-frame (if (= (-> self control unknown-spoolanim00) #f)
|
||||
@@ -1931,20 +1851,16 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(target-falling-anim -1 (seconds 0.33))
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-hit-ground (target)
|
||||
:event
|
||||
target-walk-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
:event target-walk-event-handler
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(cond
|
||||
((= arg0 'stuck)
|
||||
)
|
||||
@@ -1999,8 +1915,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 1)
|
||||
)
|
||||
@@ -2034,21 +1949,17 @@
|
||||
(slide-down-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(target-hit-ground-anim #f)
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-attack (target)
|
||||
:event
|
||||
target-dangerous-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event target-dangerous-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(target-start-attack)
|
||||
(target-danger-set! 'spin #f)
|
||||
@@ -2057,18 +1968,15 @@
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self control unknown-dword33) (-> *display* base-frame-counter))
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.05))
|
||||
(ja-no-eval :group! eichar-attack-from-stance-ja
|
||||
:num!
|
||||
(seek! max (-> self control unknown-surface01 align-speed))
|
||||
:num! (seek! max (-> self control unknown-surface01 align-speed))
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
@@ -2102,13 +2010,11 @@
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-running-attack (target)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('touched)
|
||||
(cond
|
||||
@@ -2168,8 +2074,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(if (or (and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
@@ -2191,8 +2096,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
(set! (-> *run-attack-mods* turnv) 0.0)
|
||||
@@ -2201,8 +2105,7 @@
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (!= (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (and (or (smack-surface? #t)
|
||||
(and (>= (-> self control unknown-float63) 0.7)
|
||||
@@ -2289,8 +2192,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(if (logtest? (-> self water flags) (water-flags wt09))
|
||||
(sound-play-by-name (static-sound-name "swim-stroke") (new-sound-id) 1024 0 0 1 #t)
|
||||
)
|
||||
@@ -2390,13 +2292,11 @@
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-attack-air (target)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
|
||||
(cond
|
||||
(v0-0
|
||||
@@ -2409,8 +2309,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(target-start-attack)
|
||||
@@ -2477,15 +2376,13 @@
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
((-> target-attack exit))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(set-quaternion! (-> self control) (-> self control dir-targ))
|
||||
(go target-hit-ground #f)
|
||||
@@ -2520,8 +2417,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
(ja-no-eval :group! eichar-attack-from-jump-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
@@ -2583,30 +2479,24 @@
|
||||
(go target-falling #f)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-attack-uppercut (target)
|
||||
:event
|
||||
target-dangerous-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:event target-dangerous-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(target-start-attack)
|
||||
(target-danger-set! 'uppercut #f)
|
||||
(set! (-> self control unknown-surface00) *turn-around-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:exit target-exit
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(let ((s3-0 (ja-group? eichar-duck-stance-ja)))
|
||||
(ja-no-eval :group! eichar-attack-uppercut-ja
|
||||
:num! (seek! (ja-aframe (the-as float 7.0) 0))
|
||||
:frame-num
|
||||
(the-as float (if s3-0
|
||||
:frame-num (the-as float (if s3-0
|
||||
(ja-aframe (the-as float 5.0) 0)
|
||||
0.0
|
||||
)
|
||||
@@ -2620,15 +2510,12 @@
|
||||
(go target-attack-uppercut-jump arg0 arg1)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-attack-uppercut-jump (target)
|
||||
:event
|
||||
target-dangerous-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:event target-dangerous-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
(if (and (= (-> self control ground-pat material) (pat-material ice))
|
||||
(< 32768.0 (-> self control unknown-float01))
|
||||
)
|
||||
@@ -2642,10 +2529,8 @@
|
||||
(target-danger-set! 'uppercut #f)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit target-exit
|
||||
:trans (behavior ()
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-hit-ground #f)
|
||||
)
|
||||
@@ -2694,8 +2579,7 @@
|
||||
(slide-down-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
@@ -2723,13 +2607,11 @@
|
||||
(go target-falling #f)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-flop (target)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
|
||||
(cond
|
||||
(v0-0
|
||||
@@ -2763,8 +2645,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 float))
|
||||
:enter (behavior ((arg0 float) (arg1 float) (arg2 float))
|
||||
(if (and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
@@ -2798,16 +2679,14 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(target-danger-set! 'harmless #f)
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
(set! (-> self control dynam gravity quad) (-> self control unknown-dynamics00 gravity quad))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(delete-back-vel)
|
||||
(let ((gp-1 (logtest? (-> self control status) (cshape-moving-flags onsurf))))
|
||||
(when (and (not gp-1) (let ((v1-6 (ja-group)))
|
||||
@@ -2831,16 +2710,7 @@
|
||||
)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5))
|
||||
(dummy-10 (-> self skel effect) 'group-red-eco-strike-ground (ja-frame-num 0) 0)
|
||||
(let* ((s4-1 (get-process *default-dead-pool* touch-tracker #x4000))
|
||||
(s5-1 (when s4-1
|
||||
(let ((t9-6 (method-of-type touch-tracker activate)))
|
||||
(t9-6 (the-as touch-tracker s4-1) self 'touch-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s4-1 touch-tracker-init (-> self control trans) 4096.0 30)
|
||||
(-> s4-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (process-spawn touch-tracker :init touch-tracker-init (-> self control trans) 4096.0 30 :to self)))
|
||||
(send-event (ppointer->process s5-1) 'event 'attack 'flop)
|
||||
(send-event
|
||||
(ppointer->process s5-1)
|
||||
@@ -2882,8 +2752,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 float))
|
||||
:code (behavior ((arg0 float) (arg1 float) (arg2 float))
|
||||
(ja-channel-set! 2)
|
||||
(ja-no-eval :group! eichar-flop-down-ja :num! (seek!) :frame-num 0.0)
|
||||
(ja :chan 1 :group! eichar-moving-flop-down-ja :num! (chan 0) :frame-num 0.0)
|
||||
@@ -2983,13 +2852,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-flop-hit-ground (target)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('swim)
|
||||
#f
|
||||
@@ -2999,8 +2866,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(let ((f0-1 (vector-dot
|
||||
(-> self control dynam gravity-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector111) (-> self control trans))
|
||||
@@ -3021,10 +2887,8 @@
|
||||
(set! (-> self state-flags) (logior (state-flags sf20) (-> self state-flags)))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit target-exit
|
||||
:trans (behavior ()
|
||||
(when (!= (-> self control unknown-spoolanim00) 'stuck)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
(go target-attack-air 'flop)
|
||||
@@ -3056,26 +2920,22 @@
|
||||
(slide-down-test)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(target-hit-ground-anim arg0)
|
||||
(go target-falling #f)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-wheel (target)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (= arg2 'touched)
|
||||
(send-event arg0 'roll)
|
||||
)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-surface00) *wheel-mods*)
|
||||
(+! (-> self control unknown-int50) 1)
|
||||
@@ -3092,8 +2952,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(when (!= (-> self next-state name) 'target-wheel)
|
||||
(set! (-> self control unknown-int50) 0)
|
||||
(set! (-> self control unknown-dword30) (-> *display* base-frame-counter))
|
||||
@@ -3101,8 +2960,7 @@
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 0))
|
||||
0
|
||||
(let ((s5-0 0)
|
||||
@@ -3189,22 +3047,17 @@
|
||||
(go target-duck-stance)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
(defstate target-wheel-flip (target)
|
||||
:event
|
||||
target-standard-event-handler
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:event target-standard-event-handler
|
||||
:enter (behavior ((arg0 float) (arg1 float))
|
||||
(set! (-> self control unknown-surface00) *wheel-flip-mods*)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
:exit target-exit
|
||||
:trans (behavior ()
|
||||
(if (and (or (smack-surface? #f)
|
||||
(< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
|
||||
)
|
||||
@@ -3225,8 +3078,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 float) (arg1 float))
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(ja-channel-push! 1 (seconds 0.04))
|
||||
(ja :group! eichar-wheel-flip-ja :num! min)
|
||||
(let ((f30-0 1.0))
|
||||
@@ -3327,8 +3179,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
target-post
|
||||
:post target-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
+267
-498
File diff suppressed because it is too large
Load Diff
@@ -33,13 +33,9 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *title-credits-scale*
|
||||
(new 'static 'boxed-array :type float :length 8 :allocated-length 8 0.9 0.9 0.6 0.6 1.0 0.9 1.1 0.9)
|
||||
)
|
||||
(define *title-credits-scale* (new 'static 'boxed-array :type float 0.9 0.9 0.6 0.6 1.0 0.9 1.1 0.9))
|
||||
|
||||
(define *title-credits-spacing*
|
||||
(new 'static 'boxed-array :type int32 :length 8 :allocated-length 8 15 20 15 15 20 15 20 15)
|
||||
)
|
||||
(define *title-credits-spacing* (new 'static 'boxed-array :type int32 15 20 15 15 20 15 20 15))
|
||||
|
||||
(defun draw-title-credits ((arg0 float))
|
||||
(when (>= 1.0 arg0)
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/fuelcell-naked-ag.gc")
|
||||
|
||||
(defpartgroup group-part-hud-pickup
|
||||
:id 75
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts
|
||||
((sp-item 303 :flags (launch-asap) :binding 304)
|
||||
:parts ((sp-item 303 :flags (launch-asap) :binding 304)
|
||||
(sp-item 304 :flags (start-dead launch-asap) :binding 305)
|
||||
(sp-item 305 :flags (start-dead launch-asap) :binding 306)
|
||||
(sp-item 306 :flags (start-dead launch-asap) :binding 307)
|
||||
@@ -28,8 +28,7 @@
|
||||
)
|
||||
|
||||
(defpart 303
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.5))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -42,8 +41,7 @@
|
||||
)
|
||||
|
||||
(defpart 304
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-flt spt-z (meters 0.03))
|
||||
@@ -64,8 +62,7 @@
|
||||
)
|
||||
|
||||
(defpart 305
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 3.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-flt spt-z (meters 0.065))
|
||||
@@ -86,8 +83,7 @@
|
||||
)
|
||||
|
||||
(defpart 306
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-flt spt-z (meters 0.12))
|
||||
@@ -106,8 +102,7 @@
|
||||
)
|
||||
|
||||
(defpart 307
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 0.25)
|
||||
(sp-flt spt-scale-x (meters 0.35))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -127,8 +122,7 @@
|
||||
)
|
||||
|
||||
(defpart 308
|
||||
:init-specs
|
||||
((sp-flt spt-fade-r 0.0))
|
||||
:init-specs ((sp-flt spt-fade-r 0.0))
|
||||
)
|
||||
|
||||
(deftype hud-pickups (hud)
|
||||
@@ -219,29 +213,25 @@
|
||||
:id 76
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 309 :flags (launch-asap)))
|
||||
:parts ((sp-item 309 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-hud-health-2
|
||||
:id 77
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 310 :flags (launch-asap)))
|
||||
:parts ((sp-item 310 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-hud-health-3
|
||||
:id 78
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 311 :flags (launch-asap)))
|
||||
:parts ((sp-item 311 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 309
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2d :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.7))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -256,8 +246,7 @@
|
||||
)
|
||||
|
||||
(defpart 310
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2e :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2e :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.7))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -272,8 +261,7 @@
|
||||
)
|
||||
|
||||
(defpart 311
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2f :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2f :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.7))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -456,13 +444,11 @@
|
||||
:id 705
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 2964 :flags (launch-asap)))
|
||||
:parts ((sp-item 2964 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 2964
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.4))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -606,16 +592,7 @@
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (manipy-spawn (new 'static 'vector :w 1.0) #f *money-sg* #f :to obj)))
|
||||
(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)
|
||||
@@ -728,13 +705,11 @@
|
||||
:id 79
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 312 :flags (launch-asap)))
|
||||
:parts ((sp-item 312 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 312
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -825,16 +800,7 @@
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (manipy-spawn (new 'static 'vector :w 1.0) #f *money-sg* #f :to obj)))
|
||||
(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)
|
||||
@@ -935,8 +901,7 @@
|
||||
)
|
||||
|
||||
(defpart 313
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.4))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -952,8 +917,7 @@
|
||||
)
|
||||
|
||||
(defpart 314
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.4))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -969,8 +933,7 @@
|
||||
)
|
||||
|
||||
(defpart 315
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.4))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -986,8 +949,7 @@
|
||||
)
|
||||
|
||||
(defpart 316
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.4))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1003,8 +965,7 @@
|
||||
)
|
||||
|
||||
(defpart 317
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1020,8 +981,7 @@
|
||||
)
|
||||
|
||||
(defpart 318
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.8))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1039,8 +999,7 @@
|
||||
:id 80
|
||||
:flags (use-local-clock screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 318 :flags (launch-asap))
|
||||
:parts ((sp-item 318 :flags (launch-asap))
|
||||
(sp-item 319 :fade-after (meters 35))
|
||||
(sp-item 320 :fade-after (meters 20))
|
||||
(sp-item 321 :flags (launch-asap) :period 3600 :length 5)
|
||||
@@ -1054,13 +1013,11 @@
|
||||
)
|
||||
|
||||
(defpart 323
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.53333336))
|
||||
:init-specs ((sp-flt spt-fade-a -0.53333336))
|
||||
)
|
||||
|
||||
(defpart 319
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-flt spt-z (meters 22.5))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.5) 1.0)
|
||||
@@ -1083,8 +1040,7 @@
|
||||
)
|
||||
|
||||
(defpart 320
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
(sp-flt spt-num 0.06)
|
||||
(sp-flt spt-z (meters 22.5))
|
||||
(sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.5) 1.0)
|
||||
@@ -1106,8 +1062,7 @@
|
||||
)
|
||||
|
||||
(defpart 321
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-z (meters 22.5))
|
||||
(sp-flt spt-scale-x (meters 3.3))
|
||||
@@ -1125,8 +1080,7 @@
|
||||
)
|
||||
|
||||
(defpart 322
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-z (meters 22.5))
|
||||
(sp-flt spt-scale-x (meters 3.8))
|
||||
@@ -1287,16 +1241,7 @@
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (manipy-spawn (new 'static 'vector :w 1.0) #f *fuelcell-naked-sg* #f :to obj)))
|
||||
(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)
|
||||
@@ -1373,13 +1318,11 @@
|
||||
:id 81
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 324 :flags (launch-asap) :binding 325) (sp-item 325 :flags (start-dead launch-asap)))
|
||||
:parts ((sp-item 324 :flags (launch-asap) :binding 325) (sp-item 325 :flags (start-dead launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 324
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1393,8 +1336,7 @@
|
||||
)
|
||||
|
||||
(defpart 325
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 0))
|
||||
(sp-flt spt-y (meters 1.3333334))
|
||||
@@ -1558,21 +1500,18 @@
|
||||
:id 82
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 327 :flags (launch-asap)))
|
||||
:parts ((sp-item 327 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-hud-eco-timer-backing
|
||||
:id 83
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 328 :flags (launch-asap)))
|
||||
:parts ((sp-item 328 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 327
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2b :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2b :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 3.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1587,8 +1526,7 @@
|
||||
)
|
||||
|
||||
(defpart 328
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.5))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1606,13 +1544,11 @@
|
||||
:id 84
|
||||
:flags (use-local-clock screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 329 :flags (launch-asap)) (sp-item 330 :flags (launch-asap)) (sp-item 331 :flags (launch-asap)))
|
||||
:parts ((sp-item 329 :flags (launch-asap)) (sp-item 330 :flags (launch-asap)) (sp-item 331 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 329
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1627,8 +1563,7 @@
|
||||
)
|
||||
|
||||
(defpart 330
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1643,8 +1578,7 @@
|
||||
)
|
||||
|
||||
(defpart 331
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1963,86 +1897,12 @@
|
||||
)
|
||||
|
||||
(defun activate-hud ((arg0 process))
|
||||
(let ((s5-0 (get-process *default-dead-pool* hud-pickups #x4000)))
|
||||
(set! (-> *hud-parts* pickups)
|
||||
(the-as
|
||||
(pointer hud-pickups)
|
||||
(when s5-0
|
||||
(let ((t9-1 (method-of-type hud-pickups activate)))
|
||||
(t9-1 (the-as hud-pickups s5-0) arg0 'hud-pickups (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-0 hud-init-by-other 0)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (get-process *default-dead-pool* hud-money #x4000)))
|
||||
(set! (-> *hud-parts* money)
|
||||
(the-as (pointer hud-money) (when s5-1
|
||||
(let ((t9-4 (method-of-type hud-money activate)))
|
||||
(t9-4 (the-as hud-money s5-1) arg0 'hud-money (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-1 hud-init-by-other 0)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 (get-process *default-dead-pool* hud-fuel-cell #x4000)))
|
||||
(set! (-> *hud-parts* fuel-cell)
|
||||
(the-as
|
||||
(pointer hud-fuel-cell)
|
||||
(when s5-2
|
||||
(let ((t9-7 (method-of-type hud-fuel-cell activate)))
|
||||
(t9-7 (the-as hud-fuel-cell s5-2) arg0 'hud-fuel-cell (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-2 hud-init-by-other 0)
|
||||
(-> s5-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-3 (get-process *default-dead-pool* hud-health #x4000)))
|
||||
(set! (-> *hud-parts* health)
|
||||
(the-as
|
||||
(pointer hud-health)
|
||||
(when s5-3
|
||||
(let ((t9-10 (method-of-type hud-health activate)))
|
||||
(t9-10 (the-as hud-health s5-3) arg0 'hud-health (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-3 hud-init-by-other 0)
|
||||
(-> s5-3 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-4 (get-process *default-dead-pool* hud-buzzers #x4000)))
|
||||
(set! (-> *hud-parts* buzzers)
|
||||
(the-as
|
||||
(pointer hud-buzzers)
|
||||
(when s5-4
|
||||
(let ((t9-13 (method-of-type hud-buzzers activate)))
|
||||
(t9-13 (the-as hud-buzzers s5-4) arg0 'hud-buzzers (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-4 hud-init-by-other 0)
|
||||
(-> s5-4 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-5 (get-process *default-dead-pool* hud-power #x4000)))
|
||||
(set! (-> *hud-parts* power)
|
||||
(the-as (pointer hud-power) (when s5-5
|
||||
(let ((t9-16 (method-of-type hud-power activate)))
|
||||
(t9-16 (the-as hud-power s5-5) arg0 'hud-power (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-5 hud-init-by-other 0)
|
||||
(-> s5-5 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> *hud-parts* pickups) (process-spawn hud-pickups :init hud-init-by-other 0 :to arg0))
|
||||
(set! (-> *hud-parts* money) (process-spawn hud-money :init hud-init-by-other 0 :to arg0))
|
||||
(set! (-> *hud-parts* fuel-cell) (process-spawn hud-fuel-cell :init hud-init-by-other 0 :to arg0))
|
||||
(set! (-> *hud-parts* health) (process-spawn hud-health :init hud-init-by-other 0 :to arg0))
|
||||
(set! (-> *hud-parts* buzzers) (process-spawn hud-buzzers :init hud-init-by-other 0 :to arg0))
|
||||
(set! (-> *hud-parts* power) (process-spawn hud-power :init hud-init-by-other 0 :to arg0))
|
||||
(set! (-> *hud-parts* bike-speed) (the-as (pointer hud-bike-speed) #f))
|
||||
(set! (-> *hud-parts* bike-heat) (the-as (pointer hud-bike-heat) #f))
|
||||
(set! (-> *hud-parts* money-all) (the-as (pointer hud-money-all) #f))
|
||||
@@ -2186,22 +2046,9 @@
|
||||
)
|
||||
|
||||
(defun activate-orb-all ((arg0 int))
|
||||
(when (not (-> *hud-parts* money-all))
|
||||
(let ((s5-0 (get-process *default-dead-pool* hud-money-all #x4000)))
|
||||
(set! (-> *hud-parts* money-all)
|
||||
(the-as
|
||||
(pointer hud-money-all)
|
||||
(when s5-0
|
||||
(let ((t9-1 (method-of-type hud-money-all activate)))
|
||||
(t9-1 (the-as hud-money-all s5-0) *target* 'hud-money-all (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-0 hud-init-by-other arg0)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (not (-> *hud-parts* money-all))
|
||||
(set! (-> *hud-parts* money-all) (process-spawn hud-money-all :init hud-init-by-other arg0 :to *target*))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
+18
-36
@@ -210,8 +210,7 @@
|
||||
)
|
||||
|
||||
(defstate hud-hidden (hud)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('show)
|
||||
@@ -250,8 +249,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self offset) 128)
|
||||
(draw-icons self)
|
||||
(draw-particles self)
|
||||
@@ -267,21 +265,18 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self y-offset) (-> self next-y-offset))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(logior! (-> self mask) (process-mask sleep-code))
|
||||
(loop
|
||||
(suspend)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(if (-> self deactivate-when-hidden)
|
||||
(deactivate self)
|
||||
)
|
||||
@@ -291,8 +286,7 @@
|
||||
)
|
||||
|
||||
(defstate hud-arriving (hud)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-3 object))
|
||||
(case arg2
|
||||
(('hide-quick)
|
||||
@@ -335,8 +329,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(let ((gp-0 (-> self child)))
|
||||
(while gp-0
|
||||
(send-event (ppointer->process gp-0) 'draw #t)
|
||||
@@ -350,8 +343,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (not (paused?))
|
||||
(seekl! (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio))))
|
||||
@@ -373,8 +365,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(hud-update self)
|
||||
(draw-particles self)
|
||||
(draw-hud self)
|
||||
@@ -383,10 +374,8 @@
|
||||
)
|
||||
|
||||
(defstate hud-in (hud)
|
||||
:event
|
||||
(-> hud-arriving event)
|
||||
:code
|
||||
(behavior ()
|
||||
:event (-> hud-arriving event)
|
||||
:code (behavior ()
|
||||
(set! (-> self trigger-time) (-> *display* base-frame-counter))
|
||||
(while (and (< (- (-> *display* base-frame-counter) (-> self trigger-time)) (seconds 2)) (not (movie?)))
|
||||
(set! (-> self offset) 0)
|
||||
@@ -405,15 +394,12 @@
|
||||
(go hud-leaving 5)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(-> hud-arriving post)
|
||||
:post (-> hud-arriving post)
|
||||
)
|
||||
|
||||
(defstate hud-leaving (hud)
|
||||
:event
|
||||
(-> hud-arriving event)
|
||||
:code
|
||||
(behavior ((arg0 int))
|
||||
:event (-> hud-arriving event)
|
||||
:code (behavior ((arg0 int))
|
||||
(loop
|
||||
(if (not (paused?))
|
||||
(seekl! (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio))))
|
||||
@@ -435,8 +421,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(-> hud-arriving post)
|
||||
:post (-> hud-arriving post)
|
||||
)
|
||||
|
||||
(defbehavior hud-init-by-other hud ((arg0 int))
|
||||
@@ -471,8 +456,7 @@
|
||||
)
|
||||
|
||||
(defstate hud-collecting (process-drawable)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(case (-> self type)
|
||||
((fuel-cell)
|
||||
(fuel-cell-animate)
|
||||
@@ -480,8 +464,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 handle))
|
||||
:code (behavior ((arg0 handle))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s4-0 (handle->process arg0)))
|
||||
(set! (-> s5-0 x) (- (the float (+ (get-icon-pos-x (the-as hud s4-0)) -256)) (-> self root trans x)))
|
||||
@@ -530,8 +513,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
ja-post
|
||||
:post ja-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -206,133 +206,116 @@
|
||||
:id 85
|
||||
:flags (use-local-clock screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 332 :flags (launch-asap)))
|
||||
:parts ((sp-item 332 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-hud-next
|
||||
:id 86
|
||||
:flags (use-local-clock screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 333 :flags (launch-asap)))
|
||||
:parts ((sp-item 333 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-hud-selector
|
||||
:id 87
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 334 :flags (launch-asap)))
|
||||
:parts ((sp-item 334 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-hud-left
|
||||
:id 88
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 335 :flags (launch-asap)))
|
||||
:parts ((sp-item 335 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-hud-right
|
||||
:id 89
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 336 :flags (launch-asap)))
|
||||
:parts ((sp-item 336 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-hud-tint
|
||||
:id 90
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 337 :flags (launch-asap)))
|
||||
:parts ((sp-item 337 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-card-cell
|
||||
:id 91
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2190 :flags (launch-asap)) (sp-item 2191 :flags (launch-asap)) (sp-item 2192 :flags (launch-asap)))
|
||||
:parts ((sp-item 2190 :flags (launch-asap)) (sp-item 2191 :flags (launch-asap)) (sp-item 2192 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-button-x
|
||||
:id 570
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2336 :flags (launch-asap)))
|
||||
:parts ((sp-item 2336 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-button-square
|
||||
:id 571
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2337 :flags (launch-asap)))
|
||||
:parts ((sp-item 2337 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-button-triangle
|
||||
:id 572
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2338 :flags (launch-asap)))
|
||||
:parts ((sp-item 2338 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-button-circle
|
||||
:id 573
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2339 :flags (launch-asap)))
|
||||
:parts ((sp-item 2339 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-card-slot-01
|
||||
:id 92
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2142 :flags (launch-asap)))
|
||||
:parts ((sp-item 2142 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-card-slot-02
|
||||
:id 93
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2143 :flags (launch-asap)))
|
||||
:parts ((sp-item 2143 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-card-slot-03
|
||||
:id 94
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2144 :flags (launch-asap)))
|
||||
:parts ((sp-item 2144 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-card-slot-04
|
||||
:id 95
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts
|
||||
((sp-item 2145 :flags (launch-asap)))
|
||||
:parts ((sp-item 2145 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpartgroup group-part-progress-hud-power-cell-center
|
||||
:id 96
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 338 :flags (launch-asap)))
|
||||
:parts ((sp-item 338 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 337
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 15))
|
||||
(sp-flt spt-scale-y (meters 11.5))
|
||||
@@ -347,8 +330,7 @@
|
||||
)
|
||||
|
||||
(defpart 2190
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6e :page #x1cf))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6e :page #x1cf))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.8))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -363,8 +345,7 @@
|
||||
)
|
||||
|
||||
(defpart 2191
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6d :page #x1cf))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6d :page #x1cf))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 1.05))
|
||||
(sp-flt spt-scale-x (meters 0.8))
|
||||
@@ -380,8 +361,7 @@
|
||||
)
|
||||
|
||||
(defpart 2192
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6c :page #x1cf))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6c :page #x1cf))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 2.3))
|
||||
(sp-flt spt-scale-x (meters 0.8))
|
||||
@@ -397,8 +377,7 @@
|
||||
)
|
||||
|
||||
(defpart 2336
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -413,8 +392,7 @@
|
||||
)
|
||||
|
||||
(defpart 2337
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -429,8 +407,7 @@
|
||||
)
|
||||
|
||||
(defpart 2338
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x7 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x7 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -445,8 +422,7 @@
|
||||
)
|
||||
|
||||
(defpart 2339
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x8 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x8 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -461,8 +437,7 @@
|
||||
)
|
||||
|
||||
(defpart 2142
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 9.2))
|
||||
(sp-flt spt-scale-y (meters 2))
|
||||
@@ -477,8 +452,7 @@
|
||||
)
|
||||
|
||||
(defpart 2143
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 9.2))
|
||||
(sp-flt spt-scale-y (meters 2))
|
||||
@@ -493,8 +467,7 @@
|
||||
)
|
||||
|
||||
(defpart 2144
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 9.2))
|
||||
(sp-flt spt-scale-y (meters 2))
|
||||
@@ -509,8 +482,7 @@
|
||||
)
|
||||
|
||||
(defpart 2145
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 9.2))
|
||||
(sp-flt spt-scale-y (meters 2))
|
||||
@@ -525,8 +497,7 @@
|
||||
)
|
||||
|
||||
(defpart 332
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -540,8 +511,7 @@
|
||||
)
|
||||
|
||||
(defpart 333
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -555,8 +525,7 @@
|
||||
)
|
||||
|
||||
(defpart 334
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.8))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -570,8 +539,7 @@
|
||||
)
|
||||
|
||||
(defpart 335
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 3.5))
|
||||
(sp-flt spt-scale-y (meters 13))
|
||||
@@ -586,8 +554,7 @@
|
||||
)
|
||||
|
||||
(defpart 336
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x408))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x408))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 6))
|
||||
(sp-flt spt-scale-y (meters 13))
|
||||
@@ -602,8 +569,7 @@
|
||||
)
|
||||
|
||||
(defpart 339
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.3))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -619,8 +585,7 @@
|
||||
)
|
||||
|
||||
(defpart 340
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.3))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -636,8 +601,7 @@
|
||||
)
|
||||
|
||||
(defpart 341
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.3))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -653,8 +617,7 @@
|
||||
)
|
||||
|
||||
(defpart 342
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.3))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -670,8 +633,7 @@
|
||||
)
|
||||
|
||||
(defpart 343
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -687,8 +649,7 @@
|
||||
)
|
||||
|
||||
(defpart 338
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -704,13 +665,11 @@
|
||||
)
|
||||
|
||||
(defpart 344
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.53333336))
|
||||
:init-specs ((sp-flt spt-fade-a -0.53333336))
|
||||
)
|
||||
|
||||
(defpart 345
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-flt spt-z (meters 0.52734375))
|
||||
(sp-flt spt-scale-x (meters 0.25))
|
||||
@@ -735,8 +694,7 @@
|
||||
)
|
||||
|
||||
(defpart 346
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
(sp-flt spt-num 0.06)
|
||||
(sp-flt spt-z (meters 0.52734375))
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 0.25) 1.0)
|
||||
@@ -760,8 +718,7 @@
|
||||
)
|
||||
|
||||
(defpart 347
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-z (meters 0.52734375))
|
||||
(sp-flt spt-scale-x (meters 2))
|
||||
@@ -780,8 +737,7 @@
|
||||
)
|
||||
|
||||
(defpart 348
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-z (meters 0.52734375))
|
||||
(sp-flt spt-scale-x (meters 2.4))
|
||||
@@ -803,8 +759,7 @@
|
||||
:id 97
|
||||
:flags (use-local-clock screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 338 :flags (launch-asap))
|
||||
:parts ((sp-item 338 :flags (launch-asap))
|
||||
(sp-item 347 :flags (launch-asap) :period 3600 :length 5)
|
||||
(sp-item 348 :flags (launch-asap) :period 3600 :length 5)
|
||||
(sp-item 343 :flags (launch-asap))
|
||||
@@ -819,13 +774,11 @@
|
||||
:id 98
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 1982 :flags (launch-asap) :binding 1981) (sp-item 1981 :flags (start-dead launch-asap)))
|
||||
:parts ((sp-item 1982 :flags (launch-asap) :binding 1981) (sp-item 1981 :flags (start-dead launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 1982
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -839,8 +792,7 @@
|
||||
)
|
||||
|
||||
(defpart 1981
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 0))
|
||||
(sp-flt spt-y (meters 1.3333334))
|
||||
@@ -863,13 +815,11 @@
|
||||
:id 99
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 1983 :flags (launch-asap)))
|
||||
:parts ((sp-item 1983 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 1983
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.2))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -886,13 +836,11 @@
|
||||
:id 100
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 1985 :flags (launch-asap) :binding 1984) (sp-item 1984 :flags (start-dead launch-asap)))
|
||||
:parts ((sp-item 1985 :flags (launch-asap) :binding 1984) (sp-item 1984 :flags (start-dead launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 1985
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -906,8 +854,7 @@
|
||||
)
|
||||
|
||||
(defpart 1984
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 0))
|
||||
(sp-flt spt-y (meters 1.3333334))
|
||||
@@ -931,13 +878,11 @@
|
||||
:id 101
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 1986 :flags (launch-asap)))
|
||||
:parts ((sp-item 1986 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 1986
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.3))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -955,13 +900,11 @@
|
||||
:id 615
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 100)
|
||||
:parts
|
||||
((sp-item 2478 :flags (launch-asap)))
|
||||
:parts ((sp-item 2478 :flags (launch-asap)))
|
||||
)
|
||||
|
||||
(defpart 2478
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6b :page #x1cf))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6b :page #x1cf))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.8))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
;; options in the start menu options
|
||||
(define *main-options*
|
||||
(new 'static 'boxed-array :type game-option :length 7 :allocated-length 7
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
@@ -21,7 +21,7 @@
|
||||
)
|
||||
|
||||
(define *title*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id new-game) :scale #t :param3 (game-option-menu save-game-title))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id load-game) :scale #t :param3 (game-option-menu load-game))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id options) :scale #t :param3 (game-option-menu settings-title))
|
||||
@@ -30,7 +30,7 @@
|
||||
)
|
||||
|
||||
(define *options*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
@@ -39,7 +39,7 @@
|
||||
)
|
||||
|
||||
(define *main-options-demo*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
@@ -48,7 +48,7 @@
|
||||
)
|
||||
|
||||
(define *main-options-demo-shared*
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
@@ -58,7 +58,7 @@
|
||||
)
|
||||
|
||||
(define *game-options*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type language) :name (game-text-id language) :scale #t)
|
||||
@@ -67,7 +67,7 @@
|
||||
)
|
||||
|
||||
(define *game-options-japan*
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
@@ -75,7 +75,7 @@
|
||||
)
|
||||
|
||||
(define *game-options-demo*
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
@@ -83,7 +83,7 @@
|
||||
)
|
||||
|
||||
(define *graphic-options*
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type center-screen) :name (game-text-id center-screen) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type aspect-ratio) :name (game-text-id aspect-ratio) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
@@ -91,7 +91,7 @@
|
||||
)
|
||||
|
||||
(define *graphic-title-options-pal*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type center-screen) :name (game-text-id center-screen) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type video-mode) :name (game-text-id video-mode) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type aspect-ratio) :name (game-text-id aspect-ratio) :scale #t)
|
||||
@@ -100,7 +100,7 @@
|
||||
)
|
||||
|
||||
(define *sound-options*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :name (game-text-id sfx-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :name (game-text-id music-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :name (game-text-id speech-volume) :scale #t :param2 100.0)
|
||||
@@ -108,19 +108,19 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define *yes-no-options* (new 'static 'boxed-array :type game-option :length 1 :allocated-length 1
|
||||
(define *yes-no-options* (new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type yes-no) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *ok-options*
|
||||
(new 'static 'boxed-array :type game-option :length 1 :allocated-length 1
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id ok) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *load-options*
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
@@ -130,7 +130,7 @@
|
||||
)
|
||||
|
||||
(define *save-options*
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
@@ -140,7 +140,7 @@
|
||||
)
|
||||
|
||||
(define *save-options-title*
|
||||
(new 'static 'boxed-array :type game-option :length 6 :allocated-length 6
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
@@ -156,7 +156,7 @@
|
||||
;; TODO probably an enum.
|
||||
;; maps level-info indices to the appropriate offset in *level-task-data*
|
||||
(define *level-task-data-remap*
|
||||
(new 'static 'boxed-array :type int32 :length 23 :allocated-length 23
|
||||
(new 'static 'boxed-array :type int32
|
||||
0
|
||||
1
|
||||
2
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
;; maps goal language ID to its name string ID
|
||||
(define *language-name-remap*
|
||||
(new 'static 'boxed-array :type game-text-id :length 6 :allocated-length 6
|
||||
(new 'static 'boxed-array :type game-text-id
|
||||
(game-text-id english)
|
||||
(game-text-id french)
|
||||
(game-text-id german)
|
||||
@@ -197,7 +197,7 @@
|
||||
|
||||
;; all level tasks
|
||||
(define *level-task-data*
|
||||
(new 'static 'boxed-array :type level-tasks-info :length 16 :allocated-length 16
|
||||
(new 'static 'boxed-array :type level-tasks-info
|
||||
(new 'static 'level-tasks-info
|
||||
:level-name-id (game-text-id training-level-name)
|
||||
:text-group-index 1
|
||||
@@ -1359,7 +1359,7 @@
|
||||
|
||||
;; goes down by 24 or 23 every time
|
||||
(define *task-egg-starting-x*
|
||||
(new 'static 'boxed-array :type int32 :length 9 :allocated-length 9
|
||||
(new 'static 'boxed-array :type int32
|
||||
218
|
||||
194
|
||||
171
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
|
||||
(define *progress-save-info* (new 'global 'mc-slot-info))
|
||||
|
||||
(defmacro progress-make-manipy-icon (obj &key skel
|
||||
(defmacro progress-make-icon (obj &key skel
|
||||
&key x
|
||||
&key y
|
||||
&key z
|
||||
@@ -339,7 +339,7 @@
|
||||
`(when (< (-> ,obj nb-of-icons) 6)
|
||||
(let ((icon-idx (-> ,obj nb-of-icons)))
|
||||
(set! (-> ,obj icons icon-idx) (new 'static 'hud-icon))
|
||||
(let ((new-manipy (process-new manipy manipy-init (new 'static 'vector :w 1.0) #f ,skel #f
|
||||
(let ((new-manipy (manipy-spawn (new 'static 'vector :w 1.0) #f ,skel #f
|
||||
:to ,obj
|
||||
:stack *scratch-memory-top*
|
||||
)))
|
||||
@@ -369,48 +369,24 @@
|
||||
)
|
||||
|
||||
(defmethod initialize-icons progress ((obj progress))
|
||||
(progress-make-manipy-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256
|
||||
:y 77
|
||||
:z (meters 0.5)
|
||||
:scale-x 0.006
|
||||
:scale-y 0.006
|
||||
)
|
||||
(progress-make-manipy-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256
|
||||
:y 77
|
||||
:z (meters 0.5)
|
||||
:scale-x 0.006
|
||||
:scale-y 0.006
|
||||
)
|
||||
(progress-make-manipy-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256
|
||||
:y 77
|
||||
:z (meters 0.5)
|
||||
:scale-x 0.006
|
||||
:scale-y 0.006
|
||||
)
|
||||
(progress-make-manipy-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256
|
||||
:y 77
|
||||
:z (meters 0.5)
|
||||
:scale-x 0.006
|
||||
:scale-y 0.006
|
||||
)
|
||||
(progress-make-manipy-icon obj :skel *money-sg*
|
||||
:x -320
|
||||
:y 253
|
||||
:z (meters 17)
|
||||
:scale-x 0.013
|
||||
:scale-y -0.015
|
||||
)
|
||||
(progress-make-manipy-icon obj :skel *money-sg*
|
||||
:x -320
|
||||
:y 253
|
||||
:z (meters 0.25)
|
||||
:scale-x 0.008
|
||||
:scale-y -0.009
|
||||
)
|
||||
(progress-make-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256 :y 77 :z (meters 0.5)
|
||||
:scale-x 0.006 :scale-y 0.006)
|
||||
(progress-make-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256 :y 77 :z (meters 0.5)
|
||||
:scale-x 0.006 :scale-y 0.006)
|
||||
(progress-make-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256 :y 77 :z (meters 0.5)
|
||||
:scale-x 0.006 :scale-y 0.006)
|
||||
(progress-make-icon obj :skel *fuelcell-naked-sg*
|
||||
:x 256 :y 77 :z (meters 0.5)
|
||||
:scale-x 0.006 :scale-y 0.006)
|
||||
(progress-make-icon obj :skel *money-sg*
|
||||
:x -320 :y 253 :z (meters 17)
|
||||
:scale-x 0.013 :scale-y -0.015)
|
||||
(progress-make-icon obj :skel *money-sg*
|
||||
:x -320 :y 253 :z (meters 0.25)
|
||||
:scale-x 0.008 :scale-y -0.009)
|
||||
(send-event (ppointer->process (-> obj icons 1 icon)) 'set-frame-num 2.5)
|
||||
(send-event (ppointer->process (-> obj icons 2 icon)) 'set-frame-num 10.0)
|
||||
(send-event (ppointer->process (-> obj icons 3 icon)) 'set-frame-num 15.5)
|
||||
@@ -608,18 +584,7 @@
|
||||
(make-levels-with-tasks-available-to-progress)
|
||||
(disable-level-text-file-loading)
|
||||
(set! (-> *progress-state* starting-state) screen)
|
||||
(let ((s4-0 (get-process *default-dead-pool* progress #x4000)))
|
||||
(set! *progress-process*
|
||||
(the-as (pointer progress) (when s4-0
|
||||
(let ((t9-5 (method-of-type progress activate)))
|
||||
(t9-5 (the-as progress s4-0) creator 'progress (&-> *progress-stack* 14336))
|
||||
)
|
||||
(run-now-in-process s4-0 progress-init-by-other)
|
||||
(-> s4-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! *progress-process* (process-spawn progress :to creator :stack *progress-stack-top*))
|
||||
(let ((s5-1 *progress-process*))
|
||||
(set! (-> s5-1 0 completion-percentage) (calculate-completion (-> s5-1 0)))
|
||||
(set! *master-mode* 'progress)
|
||||
|
||||
@@ -473,6 +473,8 @@
|
||||
(ps2-options #x1020)
|
||||
(ps2-load-speed #x1021)
|
||||
(ps2-parts #x1022)
|
||||
(music-fadeout #x1023)
|
||||
(music-fadein #x1024)
|
||||
(discord-rpc #x1030)
|
||||
(display-mode #x1031)
|
||||
(windowed #x1032)
|
||||
|
||||
@@ -249,10 +249,9 @@
|
||||
|
||||
;; Define a new function
|
||||
(defmacro defun (name bindings &rest body)
|
||||
(if (and
|
||||
(> (length body) 1) ;; more than one thing in function
|
||||
(string? (first body)) ;; first thing is a string
|
||||
)
|
||||
(if (and (> (length body) 1) ;; more than one thing in function
|
||||
(string? (first body)) ;; first thing is a string
|
||||
)
|
||||
;; then it's a docstring and we ignore it.
|
||||
`(define ,name (lambda :name ,name ,bindings ,@(cdr body)))
|
||||
;; otherwise don't ignore it.
|
||||
|
||||
@@ -352,6 +352,7 @@
|
||||
(define-extern pc-filepath-exists? (function string symbol))
|
||||
(define-extern pc-mkdir-file-path (function string none))
|
||||
(define-extern pc-sound-set-flava-hack (function int none))
|
||||
(define-extern pc-sound-set-fade-hack (function int none))
|
||||
|
||||
(defenum pc-prof-event
|
||||
(begin 0)
|
||||
|
||||
@@ -610,7 +610,8 @@
|
||||
)
|
||||
|
||||
(defmacro with-proc (bindings &rest body)
|
||||
"execute the body with process register set to the given value and bound to pp."
|
||||
"execute the body with process register set to the given value and bound to pp.
|
||||
it is recommended to use run-now-in-process over this"
|
||||
`(rlet ((pp :reg r13 :reset-here #t :type process))
|
||||
(protect (pp)
|
||||
(set! pp ,(car bindings))
|
||||
|
||||
@@ -96,7 +96,7 @@ It type checks the arguments for the entry function.
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro process-new-function (proc-type func &key (from *default-dead-pool*) &key (to *default-pool*) &key (name #f) &key (stack-size #x4000) &key (stack *kernel-dram-stack*) &rest args)
|
||||
(defmacro process-spawn-function (proc-type func &key (from *default-dead-pool*) &key (to *default-pool*) &key (name #f) &key (stack-size #x4000) &key (stack *scratch-memory-top*) &rest args)
|
||||
"Start a new process that runs a function on its main thread.
|
||||
Returns a pointer to the new process (or #f? on error)."
|
||||
|
||||
@@ -111,7 +111,7 @@ It type checks the arguments for the entry function.
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro process-new (proc-type init &key (from *default-dead-pool*) &key (to *default-pool*) &key (name #f) &key (stack-size #x4000) &key (stack *kernel-dram-stack*) &rest args)
|
||||
(defmacro process-spawn (proc-type &key (init #f) &key (from *default-dead-pool*) &key (to *default-pool*) &key (name #f) &key (stack-size #x4000) &key (stack *scratch-memory-top*) &rest args)
|
||||
"Start a new process and run an init function on it.
|
||||
Returns a pointer to the new process, or #f (or is it 0?) if something goes wrong."
|
||||
|
||||
@@ -119,7 +119,7 @@ It type checks the arguments for the entry function.
|
||||
`(let ((,new-proc (the-as ,proc-type (get-process ,from ,proc-type ,stack-size))))
|
||||
(when ,new-proc
|
||||
((method-of-type ,proc-type activate) ,new-proc ,to ,(if name name `(quote ,proc-type)) ,stack)
|
||||
(run-now-in-process ,new-proc ,init ,@args)
|
||||
(run-now-in-process ,new-proc ,(if init init (string->symbol (fmt #f "{}-init-by-other" proc-type))) ,@args)
|
||||
(the (pointer ,proc-type) (-> ,new-proc ppointer))
|
||||
)
|
||||
)
|
||||
|
||||
+100
-172
@@ -5,210 +5,138 @@
|
||||
;; name in dgo: air
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; definition for function point-in-air?
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun point-in-air? ((arg0 vector) (arg1 (inline-array air-box)) (arg2 int))
|
||||
(local-vars (t0-0 symbol))
|
||||
(dotimes (v1-0 arg2)
|
||||
(let ((t1-0 arg0)
|
||||
(a3-1 (-> arg1 v1-0))
|
||||
)
|
||||
(set! t0-0 (when (< (-> a3-1 height-level) (-> t1-0 y))
|
||||
(let ((f0-2 (- (-> t1-0 x) (-> a3-1 x-pos)))
|
||||
(f2-1 (- (-> t1-0 z) (-> a3-1 z-pos)))
|
||||
(let ((t1-0 arg0)
|
||||
(a3-1 (-> arg1 v1-0))
|
||||
)
|
||||
(set! t0-0
|
||||
(when (< (-> a3-1 height-level) (-> t1-0 y))
|
||||
(let ((f0-2 (- (-> t1-0 x) (-> a3-1 x-pos)))
|
||||
(f2-1 (- (-> t1-0 z) (-> a3-1 z-pos)))
|
||||
)
|
||||
(set! t0-0 #f)
|
||||
(let ((f1-5 (+ (* f0-2 (-> a3-1 cos-angle)) (* f2-1 (-> a3-1 sin-angle))))
|
||||
(f0-4 (- (* f2-1 (-> a3-1 cos-angle)) (* f0-2 (-> a3-1 sin-angle))))
|
||||
)
|
||||
(if (and (>= f1-5 0.0) (>= f0-4 0.0) (< f1-5 (-> a3-1 x-length)) (< f0-4 (-> a3-1 z-length)))
|
||||
(set! t0-0 #t)
|
||||
)
|
||||
(set! t0-0 #f)
|
||||
(let
|
||||
((f1-5
|
||||
(+
|
||||
(* f0-2 (-> a3-1 cos-angle))
|
||||
(* f2-1 (-> a3-1 sin-angle))
|
||||
)
|
||||
)
|
||||
(f0-4
|
||||
(-
|
||||
(* f2-1 (-> a3-1 cos-angle))
|
||||
(* f0-2 (-> a3-1 sin-angle))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(and
|
||||
(>= f1-5 0.0)
|
||||
(>= f0-4 0.0)
|
||||
(< f1-5 (-> a3-1 x-length))
|
||||
(< f0-4 (-> a3-1 z-length))
|
||||
)
|
||||
(set! t0-0 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
t0-0
|
||||
)
|
||||
)
|
||||
t0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(if t0-0
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
(if t0-0
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function points-in-air?
|
||||
(defun
|
||||
points-in-air?
|
||||
((arg0 vector) (arg1 vector) (arg2 (inline-array air-box)) (arg3 int))
|
||||
(defun points-in-air? ((arg0 vector) (arg1 vector) (arg2 (inline-array air-box)) (arg3 int))
|
||||
(local-vars (t1-4 symbol))
|
||||
(dotimes (v1-0 arg3)
|
||||
(let* ((t0-1 (-> arg2 v1-0))
|
||||
(f0-0 (-> t0-1 height-level))
|
||||
)
|
||||
(when (and (< f0-0 (-> arg0 y)) (< f0-0 (-> arg1 y)))
|
||||
(let ((f2-0 (- (-> arg0 x) (-> t0-1 x-pos)))
|
||||
(f4-0 (- (-> arg0 z) (-> t0-1 z-pos)))
|
||||
(f0-4 (- (-> arg1 x) (-> t0-1 x-pos)))
|
||||
(f1-6 (- (-> arg1 z) (-> t0-1 z-pos)))
|
||||
(t2-0 t0-1)
|
||||
(t1-3 #f)
|
||||
(let* ((t0-1 (-> arg2 v1-0))
|
||||
(f0-0 (-> t0-1 height-level))
|
||||
)
|
||||
(let ((f3-3 (+ (* f2-0 (-> t2-0 cos-angle)) (* f4-0 (-> t2-0 sin-angle))))
|
||||
(f2-2 (- (* f4-0 (-> t2-0 cos-angle)) (* f2-0 (-> t2-0 sin-angle))))
|
||||
(when (and (< f0-0 (-> arg0 y)) (< f0-0 (-> arg1 y)))
|
||||
(let ((f2-0 (- (-> arg0 x) (-> t0-1 x-pos)))
|
||||
(f4-0 (- (-> arg0 z) (-> t0-1 z-pos)))
|
||||
(f0-4 (- (-> arg1 x) (-> t0-1 x-pos)))
|
||||
(f1-6 (- (-> arg1 z) (-> t0-1 z-pos)))
|
||||
(t2-0 t0-1)
|
||||
(t1-3 #f)
|
||||
)
|
||||
(let ((f3-3 (+ (* f2-0 (-> t2-0 cos-angle)) (* f4-0 (-> t2-0 sin-angle))))
|
||||
(f2-2 (- (* f4-0 (-> t2-0 cos-angle)) (* f2-0 (-> t2-0 sin-angle))))
|
||||
)
|
||||
(if (and (>= f3-3 0.0) (>= f2-2 0.0) (< f3-3 (-> t2-0 x-length)) (< f2-2 (-> t2-0 z-length)))
|
||||
(set! t1-3 #t)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(and
|
||||
(>= f3-3 0.0)
|
||||
(>= f2-2 0.0)
|
||||
(< f3-3 (-> t2-0 x-length))
|
||||
(< f2-2 (-> t2-0 z-length))
|
||||
)
|
||||
(set! t1-3 #t)
|
||||
)
|
||||
)
|
||||
(set! t1-4 (and t1-3 (begin
|
||||
(set! t1-4
|
||||
(and t1-3 (begin
|
||||
(set! t1-4 #f)
|
||||
(let
|
||||
((f2-5
|
||||
(+
|
||||
(* f0-4 (-> t0-1 cos-angle))
|
||||
(* f1-6 (-> t0-1 sin-angle))
|
||||
)
|
||||
)
|
||||
(f0-6
|
||||
(-
|
||||
(* f1-6 (-> t0-1 cos-angle))
|
||||
(* f0-4 (-> t0-1 sin-angle))
|
||||
)
|
||||
)
|
||||
(let ((f2-5 (+ (* f0-4 (-> t0-1 cos-angle)) (* f1-6 (-> t0-1 sin-angle))))
|
||||
(f0-6 (- (* f1-6 (-> t0-1 cos-angle)) (* f0-4 (-> t0-1 sin-angle))))
|
||||
)
|
||||
(if (and (>= f2-5 0.0) (>= f0-6 0.0) (< f2-5 (-> t0-1 x-length)) (< f0-6 (-> t0-1 z-length)))
|
||||
(set! t1-4 #t)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(and
|
||||
(>= f2-5 0.0)
|
||||
(>= f0-6 0.0)
|
||||
(< f2-5 (-> t0-1 x-length))
|
||||
(< f0-6 (-> t0-1 z-length))
|
||||
)
|
||||
(set! t1-4 #t)
|
||||
)
|
||||
)
|
||||
t1-4
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if t1-4
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if t1-4
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition (debug) for function add-debug-air-box
|
||||
;; Used lq/sq
|
||||
(defun-debug add-debug-air-box ((arg0 bucket-id) (arg1 air-box))
|
||||
(local-vars (a0-1 symbol))
|
||||
(let ((a1-1 (camera-pos))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(-> arg1 cos-angle)
|
||||
(-> arg1 sin-angle)
|
||||
(let ((s2-0 (the-as uint #x800000ff)))
|
||||
(let ((v1-0 arg1))
|
||||
(set! a0-1 (when (< (-> v1-0 height-level) (-> a1-1 y))
|
||||
(let ((f0-4 (- (-> a1-1 x) (-> v1-0 x-pos)))
|
||||
(f2-1 (- (-> a1-1 z) (-> v1-0 z-pos)))
|
||||
)
|
||||
(-> arg1 cos-angle)
|
||||
(-> arg1 sin-angle)
|
||||
(let ((s2-0 (the-as uint #x800000ff)))
|
||||
(let ((v1-0 arg1))
|
||||
(set! a0-1
|
||||
(when (< (-> v1-0 height-level) (-> a1-1 y))
|
||||
(let ((f0-4 (- (-> a1-1 x) (-> v1-0 x-pos)))
|
||||
(f2-1 (- (-> a1-1 z) (-> v1-0 z-pos)))
|
||||
)
|
||||
(set! a0-1 #f)
|
||||
(let
|
||||
((f1-5
|
||||
(+
|
||||
(* f0-4 (-> v1-0 cos-angle))
|
||||
(* f2-1 (-> v1-0 sin-angle))
|
||||
)
|
||||
)
|
||||
(f0-6
|
||||
(-
|
||||
(* f2-1 (-> v1-0 cos-angle))
|
||||
(* f0-4 (-> v1-0 sin-angle))
|
||||
)
|
||||
)
|
||||
(let ((f1-5 (+ (* f0-4 (-> v1-0 cos-angle)) (* f2-1 (-> v1-0 sin-angle))))
|
||||
(f0-6 (- (* f2-1 (-> v1-0 cos-angle)) (* f0-4 (-> v1-0 sin-angle))))
|
||||
)
|
||||
(if (and (>= f1-5 0.0) (>= f0-6 0.0) (< f1-5 (-> v1-0 x-length)) (< f0-6 (-> v1-0 z-length)))
|
||||
(set! a0-1 #t)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(and
|
||||
(>= f1-5 0.0)
|
||||
(>= f0-6 0.0)
|
||||
(< f1-5 (-> v1-0 x-length))
|
||||
(< f0-6 (-> v1-0 z-length))
|
||||
)
|
||||
(set! a0-1 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
a0-1
|
||||
)
|
||||
a0-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-1
|
||||
(set! s2-0 (the-as uint #x8000ff00))
|
||||
)
|
||||
(set! (-> s5-0 y) (-> arg1 height-level))
|
||||
(set! (-> s4-0 y) (-> arg1 height-level))
|
||||
(set! (-> s5-0 w) 1.0)
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
(set! (-> s5-0 x) (-> arg1 x-pos))
|
||||
(set! (-> s5-0 z) (-> arg1 z-pos))
|
||||
(set! (-> s4-0 x) (+ (-> arg1 x-pos) (* (-> arg1 cos-angle) (-> arg1 x-length))))
|
||||
(set! (-> s4-0 z) (+ (-> arg1 z-pos) (* (-> arg1 sin-angle) (-> arg1 x-length))))
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(set! (-> s4-0 x) (+ (-> s5-0 x) (* (- (-> arg1 sin-angle)) (-> arg1 z-length))))
|
||||
(set! (-> s4-0 z) (+ (-> s5-0 z) (* (-> arg1 cos-angle) (-> arg1 z-length))))
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
(set! (-> s5-0 x) (+ (-> arg1 x-pos) (* (- (-> arg1 sin-angle)) (-> arg1 z-length))))
|
||||
(set! (-> s5-0 z) (+ (-> arg1 z-pos) (* (-> arg1 cos-angle) (-> arg1 z-length))))
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
(set! (-> s4-0 x) (-> arg1 x-pos))
|
||||
(set! (-> s4-0 z) (-> arg1 z-pos))
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
)
|
||||
)
|
||||
(if a0-1
|
||||
(set! s2-0 (the-as uint #x8000ff00))
|
||||
)
|
||||
(set! (-> s5-0 y) (-> arg1 height-level))
|
||||
(set! (-> s4-0 y) (-> arg1 height-level))
|
||||
(set! (-> s5-0 w) 1.0)
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
(set! (-> s5-0 x) (-> arg1 x-pos))
|
||||
(set! (-> s5-0 z) (-> arg1 z-pos))
|
||||
(set!
|
||||
(-> s4-0 x)
|
||||
(+ (-> arg1 x-pos) (* (-> arg1 cos-angle) (-> arg1 x-length)))
|
||||
)
|
||||
(set!
|
||||
(-> s4-0 z)
|
||||
(+ (-> arg1 z-pos) (* (-> arg1 sin-angle) (-> arg1 x-length)))
|
||||
)
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(set!
|
||||
(-> s4-0 x)
|
||||
(+ (-> s5-0 x) (* (- (-> arg1 sin-angle)) (-> arg1 z-length)))
|
||||
)
|
||||
(set!
|
||||
(-> s4-0 z)
|
||||
(+ (-> s5-0 z) (* (-> arg1 cos-angle) (-> arg1 z-length)))
|
||||
)
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
(set!
|
||||
(-> s5-0 x)
|
||||
(+ (-> arg1 x-pos) (* (- (-> arg1 sin-angle)) (-> arg1 z-length)))
|
||||
)
|
||||
(set!
|
||||
(-> s5-0 z)
|
||||
(+ (-> arg1 z-pos) (* (-> arg1 cos-angle) (-> arg1 z-length)))
|
||||
)
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
(set! (-> s4-0 x) (-> arg1 x-pos))
|
||||
(set! (-> s4-0 z) (-> arg1 z-pos))
|
||||
(add-debug-line #t arg0 s5-0 s4-0 (the-as rgba s2-0) #f (the-as rgba -1))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,15 +8,16 @@
|
||||
(define-extern spawn-flying-rock (function vector vector float entity none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/ecoventrock-ag.gc")
|
||||
(import "goal_src/import/beachcam-ag.gc")
|
||||
(import "goal_src/import/windmill-one-ag.gc")
|
||||
(import "goal_src/import/kickrock-ag.gc")
|
||||
(import "goal_src/import/harvester-ag.gc")
|
||||
(import "goal_src/import/flutflutegg-ag.gc")
|
||||
(import "goal_src/import/grottopole-ag.gc")
|
||||
(import "goal_src/import/flutflut-ag.gc")
|
||||
(import "goal_src/import/bladeassm-ag.gc")
|
||||
(import "goal_src/import/harvester-ag.gc")
|
||||
(import "goal_src/import/grottopole-ag.gc")
|
||||
(import "goal_src/import/beachcam-ag.gc")
|
||||
|
||||
(defskelgroup *beachcam-sg* beachcam beachcam-lod0-jg beachcam-anim-ja
|
||||
((beachcam-lod0-mg (meters 999999)))
|
||||
@@ -44,13 +45,11 @@
|
||||
)
|
||||
|
||||
(defstate windmill-one-idle (windmill-one)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(sound-stop (-> self sound-id))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(rider-trans)
|
||||
(let ((t2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4))))
|
||||
(if (!= (+ (-> t2-0 x) (-> t2-0 y) (-> t2-0 z)) 0.0)
|
||||
@@ -59,8 +58,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek! max 0.5) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
@@ -70,8 +68,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior windmill-one) rider-post)
|
||||
:post (the-as (function none :behavior windmill-one) rider-post)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! windmill-one ((obj windmill-one) (arg0 entity-actor))
|
||||
@@ -127,8 +124,7 @@
|
||||
:id 155
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts
|
||||
((sp-item 539 :period 1500 :length 15)
|
||||
:parts ((sp-item 539 :period 1500 :length 15)
|
||||
(sp-item 539 :period 1500 :length 30)
|
||||
(sp-item 539 :period 1500 :length 45)
|
||||
(sp-item 539 :period 1500 :length 75)
|
||||
@@ -139,8 +135,7 @@
|
||||
)
|
||||
|
||||
(defpart 539
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-rnd-flt spt-x (meters -9) (meters 18) 1.0)
|
||||
(sp-flt spt-y (meters -6))
|
||||
@@ -163,8 +158,7 @@
|
||||
)
|
||||
|
||||
(defpart 540
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 12.0)
|
||||
(sp-flt spt-y (meters -7))
|
||||
(sp-rnd-flt spt-scale-x (meters 3) (meters 4.5) 1.0)
|
||||
@@ -189,13 +183,11 @@
|
||||
)
|
||||
|
||||
(defpart 541
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a 0.0) (sp-int-plain-rnd spt-next-time 450 239 1) (sp-launcher-by-id spt-next-launcher 542))
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int-plain-rnd spt-next-time 450 239 1) (sp-launcher-by-id spt-next-launcher 542))
|
||||
)
|
||||
|
||||
(defpart 542
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.14222223))
|
||||
:init-specs ((sp-flt spt-fade-a -0.14222223))
|
||||
)
|
||||
|
||||
(deftype grottopole (process-drawable)
|
||||
@@ -224,8 +216,7 @@
|
||||
)
|
||||
|
||||
(defstate grottopole-idle (grottopole)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (= (-> arg0 type) target)
|
||||
(case arg2
|
||||
(('attack)
|
||||
@@ -269,8 +260,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(ja :group! (-> self draw art-group data 3) :num! min)
|
||||
(transform-post)
|
||||
@@ -322,8 +312,7 @@
|
||||
)
|
||||
|
||||
(defstate grottopole-moving-up (grottopole)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(+! (-> self position) 1)
|
||||
(let ((v1-4 (-> self entity extra perm)))
|
||||
(logior! (-> v1-4 status) (entity-perm-status user-set-from-cstage))
|
||||
@@ -333,13 +322,11 @@
|
||||
(go grottopole-idle)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior grottopole) transform-post)
|
||||
:post (the-as (function none :behavior grottopole) transform-post)
|
||||
)
|
||||
|
||||
(defstate grottopole-moving-down (grottopole)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(+! (-> self position) -1)
|
||||
(let ((v1-4 (-> self entity extra perm)))
|
||||
(logior! (-> v1-4 status) (entity-perm-status user-set-from-cstage))
|
||||
@@ -349,8 +336,7 @@
|
||||
(go grottopole-idle)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior grottopole) transform-post)
|
||||
:post (the-as (function none :behavior grottopole) transform-post)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! grottopole ((obj grottopole) (arg0 entity-actor))
|
||||
@@ -430,8 +416,7 @@
|
||||
:duration 600
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts
|
||||
((sp-item 543 :period 1500 :length 5)
|
||||
:parts ((sp-item 543 :period 1500 :length 5)
|
||||
(sp-item 544 :period 1500 :length 5)
|
||||
(sp-item 545 :period 1500 :length 5)
|
||||
(sp-item 546 :period 1500 :length 5)
|
||||
@@ -441,8 +426,7 @@
|
||||
)
|
||||
|
||||
(defpart 547
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 15))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -457,8 +441,7 @@
|
||||
)
|
||||
|
||||
(defpart 543
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
(sp-rnd-flt spt-num 4.0 6.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.3) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -481,8 +464,7 @@
|
||||
)
|
||||
|
||||
(defpart 544
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
(sp-rnd-flt spt-num 4.0 6.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.3) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -505,8 +487,7 @@
|
||||
)
|
||||
|
||||
(defpart 545
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
(sp-rnd-flt spt-num 4.0 6.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.3) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
@@ -529,16 +510,14 @@
|
||||
)
|
||||
|
||||
(defpart 549
|
||||
:init-specs
|
||||
((sp-flt spt-vel-y (meters 0.026666667))
|
||||
:init-specs ((sp-flt spt-vel-y (meters 0.026666667))
|
||||
(sp-rnd-int-flt spt-rotvel-z (degrees -1.2) 1 436.90668)
|
||||
(sp-flt spt-fade-a -1.0666667)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 548
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-flt spt-num 16.0)
|
||||
(sp-rnd-flt spt-y (meters 0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 2.5) (meters 1.5) 1.0)
|
||||
@@ -562,13 +541,11 @@
|
||||
)
|
||||
|
||||
(defpart 550
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.2))
|
||||
:init-specs ((sp-flt spt-fade-a -0.2))
|
||||
)
|
||||
|
||||
(defstate ecoventrock-idle (ecoventrock)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('attack)
|
||||
(sound-play-by-name (static-sound-name "cannon-shot") (new-sound-id) 1024 0 0 1 #t)
|
||||
@@ -577,8 +554,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(transform-post)
|
||||
(loop
|
||||
(logior! (-> self mask) (process-mask sleep))
|
||||
@@ -589,18 +565,15 @@
|
||||
)
|
||||
|
||||
(defstate ecoventrock-break (ecoventrock)
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior ecoventrock)
|
||||
process-drawable-fuel-cell-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(local-vars (sv-128 symbol))
|
||||
(ja-channel-set! 0)
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
@@ -615,23 +588,16 @@
|
||||
)
|
||||
)
|
||||
(when (not arg0)
|
||||
(let ((s5-0 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when s5-0
|
||||
(let ((t9-7 (method-of-type part-tracker activate)))
|
||||
(t9-7 (the-as part-tracker s5-0) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-0
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 156)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override root-prim prim-core)
|
||||
)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 156)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override root-prim prim-core)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(let* ((s5-1 (-> self root-override trans))
|
||||
(v1-14 (target-pos 0))
|
||||
@@ -691,24 +657,8 @@
|
||||
)
|
||||
(else
|
||||
(ambient-hint-spawn "gamcam10" (the-as vector #f) *entity-pool* 'camera)
|
||||
(let ((gp-2 (get-process *default-dead-pool* pov-camera #x4000)))
|
||||
(ppointer->handle (when gp-2
|
||||
(let ((t9-23 (method-of-type pov-camera activate)))
|
||||
(t9-23 (the-as pov-camera gp-2) self 'pov-camera (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-2
|
||||
pov-camera-init-by-other
|
||||
(-> self root-override trans)
|
||||
*beachcam-sg*
|
||||
(-> self name)
|
||||
0
|
||||
#f
|
||||
'()
|
||||
)
|
||||
(-> gp-2 ppointer)
|
||||
)
|
||||
)
|
||||
(ppointer->handle
|
||||
(process-spawn pov-camera (-> self root-override trans) *beachcam-sg* (-> self name) 0 #f '() :to self)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -779,13 +729,11 @@
|
||||
)
|
||||
|
||||
(defstate flying-rock-rolling (flying-rock)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let ((gp-0 #f)
|
||||
(f30-0 0.99)
|
||||
(s5-0 0)
|
||||
@@ -859,8 +807,7 @@
|
||||
(go flying-rock-idle)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3))
|
||||
(go flying-rock-idle)
|
||||
)
|
||||
@@ -870,8 +817,7 @@
|
||||
)
|
||||
|
||||
(defstate flying-rock-idle (flying-rock)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(while (or (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(and *target*
|
||||
@@ -883,8 +829,7 @@
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior flying-rock) ja-post)
|
||||
:post (the-as (function none :behavior flying-rock) ja-post)
|
||||
)
|
||||
|
||||
(defbehavior flying-rock-init-by-other flying-rock ((arg0 vector) (arg1 vector) (arg2 float) (arg3 entity))
|
||||
@@ -929,15 +874,7 @@
|
||||
)
|
||||
|
||||
(defun spawn-flying-rock ((arg0 vector) (arg1 vector) (arg2 float) (arg3 entity))
|
||||
(let ((s2-0 (get-process *default-dead-pool* flying-rock #x4000)))
|
||||
(when s2-0
|
||||
(let ((t9-1 (method-of-type flying-rock activate)))
|
||||
(t9-1 (the-as flying-rock s2-0) *entity-pool* 'flying-rock (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s2-0 flying-rock-init-by-other arg0 arg1 arg2 arg3)
|
||||
(-> s2-0 ppointer)
|
||||
)
|
||||
)
|
||||
(process-spawn flying-rock arg0 arg1 arg2 arg3 :to *entity-pool*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -963,8 +900,7 @@
|
||||
)
|
||||
|
||||
(defstate bladeassm-idle (bladeassm)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(+! (-> self angle) (* 3640.889 (-> *display* seconds-per-frame)))
|
||||
(set! (-> self angle) (the float (sar (shl (the int (-> self angle)) 48) 48)))
|
||||
@@ -1094,8 +1030,7 @@
|
||||
)
|
||||
|
||||
(defstate flutflutegg-idle (flutflutegg)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (and (= arg2 'attack)
|
||||
(or (= (-> arg3 param 1) 'punch) (= (-> arg3 param 1) 'spin) (= (-> arg3 param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
@@ -1120,8 +1055,7 @@
|
||||
(go flutflutegg-physics)
|
||||
)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(let* ((gp-0 (TODO-RENAME-10 (-> self ambient) (new 'stack-no-clear 'vector) (seconds 3) 368640.0 self))
|
||||
(v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-3 (the-as number (logior #x3f800000 v1-2)))
|
||||
@@ -1179,8 +1113,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(ja-post)
|
||||
(loop
|
||||
(suspend)
|
||||
@@ -1190,8 +1123,7 @@
|
||||
)
|
||||
|
||||
(defstate flutflutegg-physics (flutflutegg)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(when (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
@@ -1219,8 +1151,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(loop
|
||||
(+! (-> self pos) (* (-> self vel) (-> *display* seconds-per-frame)))
|
||||
@@ -1247,45 +1178,36 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior flutflutegg) ja-post)
|
||||
:post (the-as (function none :behavior flutflutegg) ja-post)
|
||||
)
|
||||
|
||||
(defstate flutflutegg-physics-fall (flutflutegg)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars (v1-25 symbol))
|
||||
(let ((gp-0 (get-process *default-dead-pool* camera-tracker #x4000)))
|
||||
(when gp-0
|
||||
(let ((t9-1 (method-of-type camera-tracker activate)))
|
||||
(t9-1 (the-as camera-tracker gp-0) self 'camera-tracker (the-as pointer #x70004000))
|
||||
(process-spawn
|
||||
camera-tracker
|
||||
:init camera-tracker-init
|
||||
(lambda :behavior camera-tracker
|
||||
()
|
||||
(while (not (process-grab? *target*))
|
||||
(suspend)
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-0
|
||||
camera-tracker-init
|
||||
(lambda :behavior camera-tracker
|
||||
()
|
||||
(while (not (process-grab? *target*))
|
||||
(suspend)
|
||||
)
|
||||
(camera-change-to "camera-135" 0 #f)
|
||||
(camera-look-at (the-as pair (ppointer->process (-> self parent))) (the-as uint 9))
|
||||
(let ((gp-0 (-> *display* base-frame-counter)))
|
||||
(until (>= (- (-> *display* base-frame-counter) gp-0) (seconds 4))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(while (not (process-release? (handle->process (-> self grab-target))))
|
||||
(suspend)
|
||||
)
|
||||
(camera-look-at (the-as pair *target*) (the-as uint 0))
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(camera-change-to (the-as string 'base) 75 #f)
|
||||
(none)
|
||||
(camera-change-to "camera-135" 0 #f)
|
||||
(camera-look-at (the-as pair (ppointer->process (-> self parent))) (the-as uint 9))
|
||||
(let ((gp-0 (-> *display* base-frame-counter)))
|
||||
(until (>= (- (-> *display* base-frame-counter) gp-0) (seconds 4))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(-> gp-0 ppointer)
|
||||
(while (not (process-release? (handle->process (-> self grab-target))))
|
||||
(suspend)
|
||||
)
|
||||
(camera-look-at (the-as pair *target*) (the-as uint 0))
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(camera-change-to (the-as string 'base) 75 #f)
|
||||
(none)
|
||||
)
|
||||
:to self
|
||||
)
|
||||
(close-specific-task! (game-task beach-flutflut) (task-status need-reminder))
|
||||
(loop
|
||||
@@ -1321,13 +1243,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior flutflutegg) ja-post)
|
||||
:post (the-as (function none :behavior flutflutegg) ja-post)
|
||||
)
|
||||
|
||||
(defstate flutflutegg-break (flutflutegg)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(when arg0
|
||||
(set-vector! (-> self root-override trans) -231190.94 64559.105 -1164727.5 1.0)
|
||||
(quaternion-axis-angle! (-> self root-override quat) 0.0 1.0 0.0 -18204.445)
|
||||
@@ -1378,8 +1298,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior flutflutegg) ja-post)
|
||||
:post (the-as (function none :behavior flutflutegg) ja-post)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! flutflutegg ((obj flutflutegg) (arg0 entity-actor))
|
||||
@@ -1457,8 +1376,7 @@
|
||||
)
|
||||
|
||||
(defstate harvester-idle (harvester)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('update)
|
||||
(if (and (-> self alt-actor) (logtest? (-> self alt-actor extra perm status) (entity-perm-status complete)))
|
||||
@@ -1467,8 +1385,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(if (and (-> self alt-actor) (logtest? (-> self alt-actor extra perm status) (entity-perm-status complete)))
|
||||
(go harvester-inflate #t)
|
||||
)
|
||||
@@ -1483,8 +1400,7 @@
|
||||
)
|
||||
|
||||
(defstate harvester-inflate (harvester)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(when (not arg0)
|
||||
(ja-no-eval :group! (-> self draw art-group data 5) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
@@ -1501,8 +1417,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior harvester) ja-post)
|
||||
:post (the-as (function none :behavior harvester) ja-post)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! harvester ((obj harvester) (arg0 entity-actor))
|
||||
@@ -1584,38 +1499,23 @@
|
||||
(with-pp
|
||||
(let ((gp-0 (entity-actor-lookup (-> pp entity) 'alt-actor 0)))
|
||||
(when gp-0
|
||||
(let* ((s5-0 (get-process *default-dead-pool* pov-camera #x4000))
|
||||
(gp-1
|
||||
(ppointer->handle
|
||||
(when s5-0
|
||||
(let ((t9-2 (method-of-type pov-camera activate)))
|
||||
(t9-2 (the-as pov-camera s5-0) pp 'pov-camera (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s5-0
|
||||
pov-camera-init-by-other
|
||||
(-> gp-0 extra trans)
|
||||
*beachcam-sg*
|
||||
(new 'static 'spool-anim :name "beachcam-cannon" :index 3 :parts 1 :command-list '())
|
||||
0
|
||||
#f
|
||||
'()
|
||||
)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-1 (get-process *default-dead-pool* fuel-cell #x4000))
|
||||
(s5-2
|
||||
(ppointer->handle (when s5-1
|
||||
(let ((t9-5 (method-of-type fuel-cell activate)))
|
||||
(t9-5 (the-as fuel-cell s5-1) pp 'fuel-cell (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-1 fuel-cell-init-as-clone gp-1 (-> pp entity extra perm task))
|
||||
(-> s5-1 ppointer)
|
||||
(let* ((gp-1
|
||||
(ppointer->handle (process-spawn
|
||||
pov-camera
|
||||
(-> gp-0 extra trans)
|
||||
*beachcam-sg*
|
||||
(new 'static 'spool-anim :name "beachcam-cannon" :index 3 :parts 1 :command-list '())
|
||||
0
|
||||
#f
|
||||
'()
|
||||
:to pp
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-2 (ppointer->handle
|
||||
(process-spawn fuel-cell :init fuel-cell-init-as-clone gp-1 (-> pp entity extra perm task) :to pp)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-13 (handle->process gp-1)))
|
||||
(if v1-13
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
|
||||
|
||||
(defpart 666
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2))
|
||||
(sp-flt spt-num 0.01)
|
||||
(sp-flt spt-y (meters 1))
|
||||
(sp-rnd-flt spt-scale-x (meters 15) (meters 5) 1.0)
|
||||
@@ -48,13 +47,11 @@
|
||||
)
|
||||
|
||||
(defpart 667
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.02))
|
||||
:init-specs ((sp-flt spt-fade-a -0.02))
|
||||
)
|
||||
|
||||
(defpart 668
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.03 0.2 1.0)
|
||||
(sp-flt spt-y (meters -4))
|
||||
(sp-flt spt-scale-x (meters 0.18))
|
||||
@@ -76,8 +73,7 @@
|
||||
)
|
||||
|
||||
(defpart 669
|
||||
:init-specs
|
||||
((sp-flt spt-scalevel-y (meters 0.0024414062))
|
||||
:init-specs ((sp-flt spt-scalevel-y (meters 0.0024414062))
|
||||
(sp-flt spt-fade-a 0.0)
|
||||
(sp-flt spt-accel-y -8.192)
|
||||
(sp-int spt-next-time 210)
|
||||
@@ -86,13 +82,11 @@
|
||||
)
|
||||
|
||||
(defpart 670
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.16) (sp-int spt-timer 150) (sp-func spt-func 'check-water-level-drop))
|
||||
:init-specs ((sp-flt spt-fade-a -0.16) (sp-int spt-timer 150) (sp-func spt-func 'check-water-level-drop))
|
||||
)
|
||||
|
||||
(defstate beach-part-grotto-1 (beach-part)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(when (is-visible? self)
|
||||
(let* ((gp-0 (camera-pos))
|
||||
@@ -125,8 +119,7 @@
|
||||
)
|
||||
|
||||
(defpart 671
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.3 0.4 1.0)
|
||||
(sp-rnd-flt spt-x (meters -23) (meters 55) 1.0)
|
||||
(sp-flt spt-z (meters 0.5))
|
||||
@@ -151,13 +144,11 @@
|
||||
(defpartgroup group-beach-grotto-2
|
||||
:id 161
|
||||
:bounds (static-bspherem 0 -5 0 15)
|
||||
:parts
|
||||
((sp-item 671 :fade-after (meters 80) :falloff-to (meters 80)))
|
||||
:parts ((sp-item 671 :fade-after (meters 80) :falloff-to (meters 80)))
|
||||
)
|
||||
|
||||
(defpart 672
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x18 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x18 :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
(sp-rnd-flt spt-x (meters -10) (meters 4) 1.0)
|
||||
(sp-flt spt-y (meters 103))
|
||||
@@ -183,8 +174,7 @@
|
||||
)
|
||||
|
||||
(defpart 673
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 0.8 0.8 1.0)
|
||||
(sp-rnd-flt spt-x (meters -9) (meters 3.5) 1.0)
|
||||
(sp-flt spt-y (meters 103))
|
||||
@@ -211,8 +201,7 @@
|
||||
)
|
||||
|
||||
(defpart 674
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x2))
|
||||
(sp-flt spt-num 0.9)
|
||||
(sp-rnd-flt spt-x (meters -10) (meters 4) 1.0)
|
||||
(sp-flt spt-y (meters 103))
|
||||
@@ -238,8 +227,7 @@
|
||||
)
|
||||
|
||||
(defpart 675
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-flt spt-num 0.04)
|
||||
(sp-rnd-flt spt-x (meters 6) (meters 6) 1.0)
|
||||
(sp-flt spt-y (meters 6.5))
|
||||
@@ -269,13 +257,11 @@
|
||||
)
|
||||
|
||||
(defpart 676
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.14222223))
|
||||
:init-specs ((sp-flt spt-fade-a -0.14222223))
|
||||
)
|
||||
|
||||
(defpart 677
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #x2))
|
||||
(sp-flt spt-num 0.2)
|
||||
(sp-rnd-flt spt-x (meters 2) (meters 10) 1.0)
|
||||
(sp-flt spt-y (meters 8))
|
||||
@@ -306,8 +292,7 @@
|
||||
:id 162
|
||||
:flags (always-draw unknown-bit-01)
|
||||
:bounds (static-bspherem 0 55 0 55)
|
||||
:parts
|
||||
((sp-item 677 :fade-after (meters 200) :falloff-to (meters 200))
|
||||
:parts ((sp-item 677 :fade-after (meters 200) :falloff-to (meters 200))
|
||||
(sp-item 675)
|
||||
(sp-item 675 :fade-after (meters 200) :falloff-to (meters 200))
|
||||
(sp-item 672)
|
||||
@@ -321,62 +306,53 @@
|
||||
(defpartgroup group-beach-24
|
||||
:id 163
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 678 :fade-after (meters 50) :period 2400 :length 1500 :offset 1200))
|
||||
:parts ((sp-item 678 :fade-after (meters 50) :period 2400 :length 1500 :offset 1200))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-23
|
||||
:id 164
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 679 :fade-after (meters 50) :period 2400 :length 1500 :offset 600))
|
||||
:parts ((sp-item 679 :fade-after (meters 50) :period 2400 :length 1500 :offset 600))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-22
|
||||
:id 165
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 680 :fade-after (meters 80) :period 2400 :length 1500))
|
||||
:parts ((sp-item 680 :fade-after (meters 80) :period 2400 :length 1500))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-18
|
||||
:id 166
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 681 :fade-after (meters 100) :period 2400 :length 1500 :offset 1200))
|
||||
:parts ((sp-item 681 :fade-after (meters 100) :period 2400 :length 1500 :offset 1200))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-17
|
||||
:id 167
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 682 :fade-after (meters 50) :period 2400 :length 1500 :offset 600))
|
||||
:parts ((sp-item 682 :fade-after (meters 50) :period 2400 :length 1500 :offset 600))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-16
|
||||
:id 168
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 683 :fade-after (meters 50) :period 2400 :length 1500))
|
||||
:parts ((sp-item 683 :fade-after (meters 50) :period 2400 :length 1500))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-15
|
||||
:id 169
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 684 :fade-after (meters 50) :period 2400 :length 1500 :offset 64936))
|
||||
:parts ((sp-item 684 :fade-after (meters 50) :period 2400 :length 1500 :offset 64936))
|
||||
)
|
||||
|
||||
(defpartgroup group-beach-14
|
||||
:id 170
|
||||
:bounds (static-bspherem 0 3 0 50)
|
||||
:parts
|
||||
((sp-item 685 :fade-after (meters 50) :period 2400 :length 1500 :offset 64336))
|
||||
:parts ((sp-item 685 :fade-after (meters 50) :period 2400 :length 1500 :offset 64336))
|
||||
)
|
||||
|
||||
(defpart 678
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.01 0.01 1.0)
|
||||
(sp-rnd-flt spt-x (meters -85) (meters 60) 1.0)
|
||||
(sp-flt spt-y (meters 13))
|
||||
@@ -400,13 +376,11 @@
|
||||
)
|
||||
|
||||
(defpart 686
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.07111111))
|
||||
:init-specs ((sp-flt spt-fade-a -0.07111111))
|
||||
)
|
||||
|
||||
(defpart 679
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.01 0.01 1.0)
|
||||
(sp-rnd-flt spt-x (meters -65) (meters 60) 1.0)
|
||||
(sp-flt spt-y (meters 8))
|
||||
@@ -430,13 +404,11 @@
|
||||
)
|
||||
|
||||
(defpart 687
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.07111111))
|
||||
:init-specs ((sp-flt spt-fade-a -0.07111111))
|
||||
)
|
||||
|
||||
(defpart 680
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.01 0.01 1.0)
|
||||
(sp-rnd-flt spt-x (meters -50) (meters 20) 1.0)
|
||||
(sp-flt spt-y (meters 0))
|
||||
@@ -461,13 +433,11 @@
|
||||
)
|
||||
|
||||
(defpart 688
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.08533333))
|
||||
:init-specs ((sp-flt spt-fade-a -0.08533333))
|
||||
)
|
||||
|
||||
(defpart 681
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.03 0.04 1.0)
|
||||
(sp-rnd-flt spt-x (meters -40) (meters 20) 1.0)
|
||||
(sp-flt spt-y (meters 1))
|
||||
@@ -492,13 +462,11 @@
|
||||
)
|
||||
|
||||
(defpart 689
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.07111111))
|
||||
:init-specs ((sp-flt spt-fade-a -0.07111111))
|
||||
)
|
||||
|
||||
(defpart 682
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.015 0.02 1.0)
|
||||
(sp-flt spt-x (meters -10))
|
||||
(sp-flt spt-y (meters 1))
|
||||
@@ -522,13 +490,11 @@
|
||||
)
|
||||
|
||||
(defpart 690
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.017777778))
|
||||
:init-specs ((sp-flt spt-fade-a -0.017777778))
|
||||
)
|
||||
|
||||
(defpart 683
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.015 0.02 1.0)
|
||||
(sp-flt spt-x (meters -25))
|
||||
(sp-flt spt-y (meters 1))
|
||||
@@ -552,13 +518,11 @@
|
||||
)
|
||||
|
||||
(defpart 691
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.013333334))
|
||||
:init-specs ((sp-flt spt-fade-a -0.013333334))
|
||||
)
|
||||
|
||||
(defpart 684
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.015 0.015 1.0)
|
||||
(sp-flt spt-x (meters -35))
|
||||
(sp-flt spt-y (meters 1))
|
||||
@@ -582,13 +546,11 @@
|
||||
)
|
||||
|
||||
(defpart 692
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.016410256))
|
||||
:init-specs ((sp-flt spt-fade-a -0.016410256))
|
||||
)
|
||||
|
||||
(defpart 685
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-rnd-flt spt-num 0.015 0.015 1.0)
|
||||
(sp-flt spt-x (meters -25))
|
||||
(sp-flt spt-y (meters 14))
|
||||
@@ -612,8 +574,7 @@
|
||||
)
|
||||
|
||||
(defpart 693
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.014222222))
|
||||
:init-specs ((sp-flt spt-fade-a -0.014222222))
|
||||
)
|
||||
|
||||
(define sound-beach-waterfall (static-sound-spec "waterfall"))
|
||||
@@ -621,8 +582,7 @@
|
||||
(defpartgroup group-beach-butterflies
|
||||
:id 171
|
||||
:bounds (static-bspherem 0 0 0 30)
|
||||
:parts
|
||||
((sp-item 696 :fade-after (meters 120) :period 4903 :length 5 :hour-mask #b111111100000000000111111 :binding 694)
|
||||
:parts ((sp-item 696 :fade-after (meters 120) :period 4903 :length 5 :hour-mask #b111111100000000000111111 :binding 694)
|
||||
(sp-item 696 :fade-after (meters 120) :period 6637 :length 5 :hour-mask #b111111100000000000111111 :binding 694)
|
||||
(sp-item 696 :fade-after (meters 120) :period 9846 :length 5 :hour-mask #b111111100000000000111111 :binding 694)
|
||||
(sp-item 694 :flags (start-dead launch-asap) :binding 695)
|
||||
@@ -639,8 +599,7 @@
|
||||
)
|
||||
|
||||
(defpart 696
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 7.5) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 14) (meters 3) 1.0)
|
||||
@@ -659,21 +618,18 @@
|
||||
)
|
||||
|
||||
(defpart 697
|
||||
:init-specs
|
||||
((sp-flt spt-accel-y 0.0)
|
||||
:init-specs ((sp-flt spt-accel-y 0.0)
|
||||
(sp-int-plain-rnd spt-next-time 2700 1499 1)
|
||||
(sp-launcher-by-id spt-next-launcher 698)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 698
|
||||
:init-specs
|
||||
((sp-flt spt-accel-y 1.3653333))
|
||||
:init-specs ((sp-flt spt-accel-y 1.3653333))
|
||||
)
|
||||
|
||||
(defpart 694
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 16) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
@@ -696,8 +652,7 @@
|
||||
)
|
||||
|
||||
(defpart 699
|
||||
:init-specs
|
||||
((sp-rnd-flt spt-vel-x (meters -0.017777778) (meters 0.035555556) 1.0)
|
||||
:init-specs ((sp-rnd-flt spt-vel-x (meters -0.017777778) (meters 0.035555556) 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters -0.0074074077) (meters 0.0148148155) 1.0)
|
||||
(sp-rnd-flt spt-rotvel-z (degrees -0.2) (degrees 0.4) 1.0)
|
||||
(sp-int-plain-rnd spt-next-time 150 449 1)
|
||||
@@ -706,8 +661,7 @@
|
||||
)
|
||||
|
||||
(defpart 695
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x22 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x22 :page #x2))
|
||||
(sp-func spt-birth-func 'birth-func-copy-rot-color)
|
||||
(sp-flt spt-num 2.0)
|
||||
(sp-flt spt-scale-x (meters 0.9))
|
||||
@@ -726,16 +680,14 @@
|
||||
(defpartgroup group-beach-moth
|
||||
:id 172
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts
|
||||
((sp-item 702 :fade-after (meters 120) :flags (bit1) :period 18030 :length 5 :hour-mask #b1111111110000000 :binding 700)
|
||||
:parts ((sp-item 702 :fade-after (meters 120) :flags (bit1) :period 18030 :length 5 :hour-mask #b1111111110000000 :binding 700)
|
||||
(sp-item 700 :flags (start-dead launch-asap) :binding 701)
|
||||
(sp-item 701 :flags (is-3d start-dead))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 702
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.1))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -748,8 +700,7 @@
|
||||
)
|
||||
|
||||
(defpart 700
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters 16) 1.0)
|
||||
(sp-flt spt-z (meters 1.5))
|
||||
@@ -772,8 +723,7 @@
|
||||
)
|
||||
|
||||
(defpart 703
|
||||
:init-specs
|
||||
((sp-rnd-flt spt-vel-x (meters -0.035555556) (meters 0.07111111) 1.0)
|
||||
:init-specs ((sp-rnd-flt spt-vel-x (meters -0.035555556) (meters 0.07111111) 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters -0.0148148155) (meters 0.029629631) 1.0)
|
||||
(sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
|
||||
(sp-int-plain-rnd spt-next-time 150 449 1)
|
||||
@@ -782,8 +732,7 @@
|
||||
)
|
||||
|
||||
(defpart 701
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x22 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x22 :page #x2))
|
||||
(sp-func spt-birth-func 'birth-func-copy-rot-color)
|
||||
(sp-flt spt-num 2.0)
|
||||
(sp-flt spt-scale-x (meters 0.4))
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/lrocklrg-ag.gc")
|
||||
|
||||
(defskelgroup *lrocklrg-sg* lrocklrg lrocklrg-lod0-jg lrocklrg-idle-ja
|
||||
@@ -19,16 +20,14 @@
|
||||
:duration 900
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts
|
||||
((sp-item 2340 :period 75 :length 10)
|
||||
:parts ((sp-item 2340 :period 75 :length 10)
|
||||
(sp-item 2341 :period 75 :length 10)
|
||||
(sp-item 2289 :period 75 :length 10)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 2341
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
(sp-rnd-flt spt-num 3.0 6.0 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters -4) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.25) (meters 1) 1.0)
|
||||
@@ -53,8 +52,7 @@
|
||||
)
|
||||
|
||||
(defpart 2340
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
|
||||
(sp-rnd-flt spt-num 8.0 16.0 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters -4) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 1) 1.0)
|
||||
@@ -80,8 +78,7 @@
|
||||
)
|
||||
|
||||
(defpart 2289
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 3.0 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters -4) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 6) (meters 2) 1.0)
|
||||
@@ -113,13 +110,11 @@
|
||||
:id 554
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts
|
||||
((sp-item 2290 :period 15 :length 5))
|
||||
:parts ((sp-item 2290 :period 15 :length 5))
|
||||
)
|
||||
|
||||
(defpart 2290
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 3.0 3.0 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters -4) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 7) (meters 9) 1.0)
|
||||
@@ -152,16 +147,14 @@
|
||||
:duration 900
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts
|
||||
((sp-item 2342 :period 900 :length 40)
|
||||
:parts ((sp-item 2342 :period 900 :length 40)
|
||||
(sp-item 2343 :period 900 :length 40)
|
||||
(sp-item 2291 :period 900 :length 40)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 2343
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 32.0)
|
||||
(sp-flt spt-y (meters -3))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.4) (meters 0.3) 1.0)
|
||||
@@ -182,8 +175,7 @@
|
||||
)
|
||||
|
||||
(defpart 2342
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
|
||||
(sp-rnd-flt spt-num 64.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters -4) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 1) 1.0)
|
||||
@@ -209,8 +201,7 @@
|
||||
)
|
||||
|
||||
(defpart 2291
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 32.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-y (meters 0) (meters -4) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 8) (meters 8) 1.0)
|
||||
@@ -282,8 +273,7 @@
|
||||
|
||||
(defstate idle (beach-rock)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('trigger)
|
||||
(set! (-> self trigger) #t)
|
||||
@@ -294,8 +284,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(if (-> self trigger)
|
||||
(go-virtual falling)
|
||||
)
|
||||
@@ -311,10 +300,8 @@
|
||||
|
||||
(defstate loading (beach-rock)
|
||||
:virtual #t
|
||||
:event
|
||||
(-> (the-as state (method-of-type beach-rock idle)) event)
|
||||
:code
|
||||
(behavior ()
|
||||
:event (-> (the-as state (method-of-type beach-rock idle)) event)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
|
||||
(suspend)
|
||||
@@ -325,8 +312,7 @@
|
||||
|
||||
(defstate falling (beach-rock)
|
||||
:virtual #t
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(set! (-> self draw bounds w) 819200.0)
|
||||
(let ((f30-0 (ja-aframe-num 0)))
|
||||
(when (and (< -50.0 f30-0) (< f30-0 158.0))
|
||||
@@ -357,8 +343,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars (v1-3 symbol) (v1-49 symbol))
|
||||
(until v1-3
|
||||
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
|
||||
@@ -368,29 +353,17 @@
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 2) :num! min)
|
||||
(let* ((gp-1 (get-process *default-dead-pool* othercam #x4000))
|
||||
(gp-2 (ppointer->handle (when gp-1
|
||||
(let ((t9-5 (method-of-type othercam activate)))
|
||||
(t9-5 (the-as othercam gp-1) self 'othercam (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-1 othercam-init-by-other self 7 #f #t)
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-0 (get-process *default-dead-pool* fuel-cell #x4000))
|
||||
(s5-1
|
||||
(ppointer->handle
|
||||
(when s5-0
|
||||
(let ((t9-8 (method-of-type fuel-cell activate)))
|
||||
(t9-8 (the-as fuel-cell s5-0) self 'fuel-cell (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-0 fuel-cell-init-as-clone (process->handle self) (-> self entity extra perm task))
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (ppointer->handle (process-spawn othercam self 7 #f #t :to self)))
|
||||
(s5-1 (ppointer->handle (process-spawn
|
||||
fuel-cell
|
||||
:init fuel-cell-init-as-clone
|
||||
(process->handle self)
|
||||
(-> self entity extra perm task)
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(close-specific-task! (-> self entity extra perm task) (task-status need-reminder))
|
||||
(set! (-> self movie-start) (-> *display* base-frame-counter))
|
||||
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
|
||||
@@ -399,8 +372,7 @@
|
||||
:name "lrocklrg-falling"
|
||||
:index 4
|
||||
:parts 4
|
||||
:command-list
|
||||
'((-150 blackout 100) (-116 blackout 0))
|
||||
:command-list '((-150 blackout 100) (-116 blackout 0))
|
||||
)
|
||||
(the-as art-joint-anim (-> self draw art-group data 2))
|
||||
(the-as art-joint-anim (-> self draw art-group data 3))
|
||||
@@ -428,14 +400,12 @@
|
||||
(go-virtual fallen)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior beach-rock) transform-post)
|
||||
:post (the-as (function none :behavior beach-rock) transform-post)
|
||||
)
|
||||
|
||||
(defstate fallen (beach-rock)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(level-hint-spawn
|
||||
(game-text-id beach-seagulls-avalanche)
|
||||
"sksp0025"
|
||||
@@ -456,8 +426,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior beach-rock) ja-post)
|
||||
:post (the-as (function none :behavior beach-rock) ja-post)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! beach-rock ((obj beach-rock) (arg0 entity-actor))
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/bird-lady-beach-ag.gc")
|
||||
|
||||
(deftype bird-lady-beach (process-taskable)
|
||||
@@ -27,8 +28,7 @@
|
||||
|
||||
(defstate idle (bird-lady-beach)
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(when (not (should-display? self))
|
||||
(let ((a0-2 (handle->process (-> self flutflut))))
|
||||
(if a0-2
|
||||
@@ -53,42 +53,21 @@
|
||||
(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)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj flutflut)
|
||||
(ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *flutflut-naked-sg* #f :to obj))
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj egg)
|
||||
(ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *flutflutegg-sg* #f :to obj))
|
||||
)
|
||||
(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
|
||||
'((141 joint "cameraB") (535 joint "camera") (696 joint "cameraB") (758 joint "camera") (813 joint "cameraB"))
|
||||
:command-list '((141 joint "cameraB") (535 joint "camera") (696 joint "cameraB") (758 joint "camera") (813 joint "cameraB"))
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/bird-lady-ag.gc")
|
||||
|
||||
(deftype bird-lady (process-taskable)
|
||||
@@ -75,8 +76,7 @@
|
||||
:name "bird-lady-introduction"
|
||||
:index 4
|
||||
:parts 11
|
||||
:command-list
|
||||
'((0 want-levels village1 beach)
|
||||
:command-list '((0 want-levels village1 beach)
|
||||
(49 joint "cameraB")
|
||||
(101 display-level beach special)
|
||||
(101 kill "yakow-8")
|
||||
@@ -136,10 +136,7 @@
|
||||
|
||||
(defmethod TODO-RENAME-43 bird-lady ((obj bird-lady))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-4 (the-as number (logior #x3f800000 v1-3)))
|
||||
(f0-2 (+ -1.0 (the-as float v1-4)))
|
||||
)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.66 f0-2)
|
||||
(play-ambient (-> obj ambient) "BIR-LO02" #f (-> obj root-override trans))
|
||||
|
||||
@@ -6,20 +6,19 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/lurkercrab-ag.gc")
|
||||
|
||||
(defpartgroup group-lurkercrab-slide
|
||||
:id 159
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts
|
||||
((sp-item 663 :fade-after (meters 40) :falloff-to (meters 40))
|
||||
:parts ((sp-item 663 :fade-after (meters 40) :falloff-to (meters 40))
|
||||
(sp-item 664 :fade-after (meters 40) :falloff-to (meters 40))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 663
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 0.3 0.3 1.0)
|
||||
(sp-flt spt-y (meters -2))
|
||||
(sp-rnd-flt spt-scale-x (meters 2) (meters 2) 1.0)
|
||||
@@ -38,8 +37,7 @@
|
||||
)
|
||||
|
||||
(defpart 664
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-rnd-flt spt-num 0.1 1.0 1.0)
|
||||
(sp-flt spt-y (meters -2))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.2) 1.0)
|
||||
@@ -199,18 +197,15 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-idle (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self draw force-lod) -1)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self target-speed) 0.0)
|
||||
(set! (-> self draw force-lod) 2)
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
@@ -268,20 +263,17 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-patrol (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(lurkercrab-invulnerable)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(when (ja-group? lurkercrab-idle-ja)
|
||||
(ja-no-eval :group! lurkercrab-idle-to-walk-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
@@ -346,13 +338,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-notice (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(go-virtual nav-enemy-chase)
|
||||
(none)
|
||||
)
|
||||
@@ -360,19 +350,16 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-chase (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(lurkercrab-invulnerable)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (logtest? (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))
|
||||
(go-virtual nav-enemy-victory)
|
||||
)
|
||||
@@ -381,8 +368,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
(loop
|
||||
@@ -437,13 +423,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-stop-chase (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(go-virtual nav-enemy-patrol)
|
||||
(none)
|
||||
)
|
||||
@@ -451,13 +435,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-stare (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(go-virtual nav-enemy-patrol)
|
||||
(none)
|
||||
)
|
||||
@@ -465,13 +447,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-victory (lurkercrab)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
(ja :group! (-> self draw art-group data (-> self nav-info victory-anim)))
|
||||
@@ -485,18 +465,15 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defstate lurkercrab-pushed (lurkercrab)
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkercrab)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self orient) #t)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self momentum-speed) 57344.0)
|
||||
(set! (-> self target-speed) 0.0)
|
||||
(set! (-> self orient) #f)
|
||||
@@ -518,8 +495,7 @@ nav-enemy-default-event-handler
|
||||
(go-virtual nav-enemy-chase)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(let ((a0-0 (-> self part))
|
||||
(a1-0 (-> self collide-info root-prim prim-core))
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/lurkerpuppy-ag.gc")
|
||||
|
||||
(deftype lurkerpuppy (nav-enemy)
|
||||
@@ -27,13 +28,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-notice (lurkerpuppy)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerpuppy)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(ja-no-eval :num! (loop!))
|
||||
(ja-channel-push! 1 (seconds 0.17))
|
||||
(ja-no-eval :group! lurkerpuppy-celebrate-ja :num! (seek!) :frame-num 0.0)
|
||||
@@ -49,13 +48,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-chase (lurkerpuppy)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerpuppy)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((ja-group? lurkerpuppy-jump-land-ja)
|
||||
(ja-channel-push! 1 (seconds 0.17))
|
||||
@@ -90,13 +87,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-stare (lurkerpuppy)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerpuppy)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self rotate-speed) 1456355.5)
|
||||
(set! (-> self turn-time) (seconds 0.1))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
@@ -137,13 +132,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-give-up (lurkerpuppy)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerpuppy)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self rotate-speed) 218453.33)
|
||||
(set! (-> self turn-time) (seconds 0.5))
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
@@ -172,13 +165,11 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-attack (lurkerpuppy)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerpuppy)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(sound-play-by-name (static-sound-name "head-butt") (new-sound-id) 1024 0 0 1 #t)
|
||||
(go-virtual nav-enemy-victory)
|
||||
(none)
|
||||
@@ -187,18 +178,15 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defstate nav-enemy-victory (lurkerpuppy)
|
||||
:virtual #t
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerpuppy)
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(ja-channel-push! 1 (seconds 0.075))
|
||||
(dotimes (gp-0 4)
|
||||
@@ -217,8 +205,7 @@ nav-enemy-default-event-handler
|
||||
(go-virtual nav-enemy-chase)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior lurkerpuppy) nav-enemy-face-player-post)
|
||||
:post (the-as (function none :behavior lurkerpuppy) nav-enemy-face-player-post)
|
||||
)
|
||||
|
||||
(define *lurkerpuppy-nav-enemy-info* (new 'static 'nav-enemy-info
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/lurkerworm-ag.gc")
|
||||
|
||||
(deftype lurkerworm (process-drawable)
|
||||
@@ -65,8 +66,7 @@
|
||||
:id 157
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts
|
||||
((sp-item 656 :fade-after (meters 90) :period 900 :length 300)
|
||||
:parts ((sp-item 656 :fade-after (meters 90) :period 900 :length 300)
|
||||
(sp-item 657 :fade-after (meters 100) :period 900 :length 390)
|
||||
(sp-item 658 :fade-after (meters 150) :period 900 :length 420 :offset 120)
|
||||
(sp-item 659 :fade-after (meters 60) :period 900 :length 420 :offset 120)
|
||||
@@ -77,16 +77,14 @@
|
||||
:id 158
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts
|
||||
((sp-item 656 :fade-after (meters 90) :period 900 :length 300)
|
||||
:parts ((sp-item 656 :fade-after (meters 90) :period 900 :length 300)
|
||||
(sp-item 658 :fade-after (meters 150) :period 900 :length 420 :offset 120)
|
||||
(sp-item 659 :fade-after (meters 60) :period 900 :length 420 :offset 120)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 656
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-rnd-flt spt-x (meters 3) (meters 5) 1.0)
|
||||
(sp-flt spt-y (meters 1))
|
||||
@@ -110,13 +108,11 @@
|
||||
)
|
||||
|
||||
(defpart 660
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.21333334))
|
||||
:init-specs ((sp-flt spt-fade-a -0.21333334))
|
||||
)
|
||||
|
||||
(defpart 658
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-flt spt-num 0.4)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 2) (meters 1) 1.0)
|
||||
@@ -138,8 +134,7 @@
|
||||
)
|
||||
|
||||
(defpart 659
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-flt spt-num 0.6)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
||||
@@ -161,8 +156,7 @@
|
||||
)
|
||||
|
||||
(defpart 657
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
|
||||
(sp-flt spt-num 0.5)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.05) (meters 0.4) 1.0)
|
||||
@@ -183,8 +177,7 @@
|
||||
)
|
||||
|
||||
(defpart 661
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
|
||||
(sp-flt spt-num 0.1)
|
||||
(sp-rnd-flt spt-x (meters -0.5) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-z (meters -0.5) (meters 1) 1.0)
|
||||
@@ -207,8 +200,7 @@
|
||||
)
|
||||
|
||||
(defpart 662
|
||||
:init-specs
|
||||
((sp-flt spt-fade-a -0.10666667))
|
||||
:init-specs ((sp-flt spt-fade-a -0.10666667))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-20 lurkerworm ((obj lurkerworm))
|
||||
@@ -322,16 +314,13 @@ lurkerworm-default-event-handler
|
||||
lurkerworm-default-post-behavior
|
||||
|
||||
(defstate lurkerworm-idle (lurkerworm)
|
||||
:event
|
||||
lurkerworm-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event lurkerworm-default-event-handler
|
||||
:enter (behavior ()
|
||||
(ja-channel-set! 0)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
*target*
|
||||
@@ -343,21 +332,17 @@ lurkerworm-default-post-behavior
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defstate lurkerworm-spot (lurkerworm)
|
||||
:event
|
||||
lurkerworm-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event lurkerworm-default-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(sound-play-by-name (static-sound-name "worm-rise1") (new-sound-id) 1024 0 0 1 #t)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self part local-clock) 0)
|
||||
(loop
|
||||
(spawn (-> self part) (-> self root-override trans))
|
||||
@@ -372,20 +357,16 @@ lurkerworm-default-post-behavior
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defstate lurkerworm-rise (lurkerworm)
|
||||
:event
|
||||
lurkerworm-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event lurkerworm-default-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(ja-channel-set! 1)
|
||||
(ja-no-eval :group! lurkerworm-rise-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
@@ -398,26 +379,21 @@ lurkerworm-default-post-behavior
|
||||
(go lurkerworm-rest)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defstate lurkerworm-rest (lurkerworm)
|
||||
:event
|
||||
lurkerworm-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event lurkerworm-default-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self vulnerable) #t)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self vulnerable) #f)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(let* ((f30-0 10.0)
|
||||
(f28-0 100.0)
|
||||
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
@@ -444,10 +420,8 @@ lurkerworm-default-post-behavior
|
||||
)
|
||||
)
|
||||
(f30-2 (* 0.2 f0-13))
|
||||
(v1-31 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-32 (the-as number (logior #x3f800000 v1-31)))
|
||||
)
|
||||
(if (< (+ -1.0 (the-as float v1-32)) f30-2)
|
||||
(if (< (rand-float-gen) f30-2)
|
||||
(go lurkerworm-strike)
|
||||
)
|
||||
)
|
||||
@@ -469,15 +443,12 @@ lurkerworm-default-post-behavior
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defstate lurkerworm-strike (lurkerworm)
|
||||
:event
|
||||
lurkerworm-default-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
:event lurkerworm-default-event-handler
|
||||
:code (behavior ()
|
||||
(ja-no-eval :num! (loop!))
|
||||
(ja-channel-push! 1 (seconds 0.135))
|
||||
(ja-no-eval :group! lurkerworm-chomp-ja :num! (seek! (ja-aframe 13.0 0)) :frame-num 0.0)
|
||||
@@ -492,20 +463,16 @@ lurkerworm-default-post-behavior
|
||||
(go lurkerworm-rest)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defstate lurkerworm-sink (lurkerworm)
|
||||
:event
|
||||
lurkerworm-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
:event lurkerworm-default-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(ja-no-eval :group! lurkerworm-sink-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(spawn (-> self part2) (-> self root-override trans))
|
||||
@@ -516,18 +483,15 @@ lurkerworm-default-post-behavior
|
||||
(go lurkerworm-idle)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defstate lurkerworm-die (lurkerworm)
|
||||
:event
|
||||
(the-as
|
||||
:event (the-as
|
||||
(function process int symbol event-message-block object :behavior lurkerworm)
|
||||
process-drawable-death-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v1-3 (-> self root-override root-prim)))
|
||||
(set! (-> v1-3 collide-with) (collide-kind))
|
||||
@@ -542,8 +506,7 @@ lurkerworm-default-post-behavior
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
lurkerworm-default-post-behavior
|
||||
:post lurkerworm-default-post-behavior
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! lurkerworm ((obj lurkerworm) (arg0 entity-actor))
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/mayor-ag.gc")
|
||||
|
||||
(deftype mayor (process-taskable)
|
||||
@@ -89,8 +90,7 @@
|
||||
:name "mayor-introduction"
|
||||
:index 4
|
||||
:parts 16
|
||||
:command-list
|
||||
'((0 kill "villagea-part-65")
|
||||
:command-list '((0 kill "villagea-part-65")
|
||||
(0 kill "villagea-part-70")
|
||||
(0 kill "med-res-level-2")
|
||||
(0 kill "med-res-level-3")
|
||||
@@ -181,8 +181,7 @@
|
||||
:name "mayor-reminder-donation"
|
||||
:index 6
|
||||
:parts 3
|
||||
:command-list
|
||||
'((0 kill "villagea-part-65")
|
||||
:command-list '((0 kill "villagea-part-65")
|
||||
(0 kill "villagea-part-70")
|
||||
(0 kill "med-res-level-2")
|
||||
(0 kill "med-res-level-3")
|
||||
@@ -265,8 +264,7 @@
|
||||
:name "mayor-reminder-beams"
|
||||
:index 5
|
||||
:parts 3
|
||||
:command-list
|
||||
'((0 kill "villagea-part-65")
|
||||
:command-list '((0 kill "villagea-part-65")
|
||||
(0 kill "villagea-part-70")
|
||||
(0 kill "med-res-level-2")
|
||||
(0 kill "med-res-level-3")
|
||||
@@ -352,8 +350,7 @@
|
||||
:name "mayor-reminder-beams"
|
||||
:index 5
|
||||
:parts 3
|
||||
:command-list
|
||||
'((0 kill "villagea-part-65")
|
||||
:command-list '((0 kill "villagea-part-65")
|
||||
(0 kill "villagea-part-70")
|
||||
(0 kill "med-res-level-2")
|
||||
(0 kill "med-res-level-3")
|
||||
@@ -439,8 +436,7 @@
|
||||
:name "mayor-reminder-donation"
|
||||
:index 6
|
||||
:parts 3
|
||||
:command-list
|
||||
'((0 kill "villagea-part-65")
|
||||
:command-list '((0 kill "villagea-part-65")
|
||||
(0 kill "villagea-part-70")
|
||||
(0 kill "med-res-level-2")
|
||||
(0 kill "med-res-level-3")
|
||||
@@ -543,8 +539,7 @@
|
||||
:name "mayor-resolution-donation"
|
||||
:index 8
|
||||
:parts 5
|
||||
:command-list
|
||||
'((0 kill "villagea-part-65")
|
||||
:command-list '((0 kill "villagea-part-65")
|
||||
(0 kill "villagea-part-70")
|
||||
(0 kill "med-res-level-2")
|
||||
(0 kill "med-res-level-3")
|
||||
@@ -651,10 +646,7 @@
|
||||
|
||||
(defmethod TODO-RENAME-43 mayor ((obj mayor))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-4 (the-as number (logior #x3f800000 v1-3)))
|
||||
(f0-2 (+ -1.0 (the-as float v1-4)))
|
||||
)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.8888889 f0-2)
|
||||
(if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
|
||||
@@ -702,16 +694,14 @@
|
||||
|
||||
(defstate idle (mayor)
|
||||
:virtual #t
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (not (should-display? self))
|
||||
(go-virtual hidden)
|
||||
)
|
||||
((-> (method-of-type process-taskable idle) trans))
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type process-taskable idle) post)))
|
||||
(if t9-0
|
||||
((the-as (function none) t9-0))
|
||||
|
||||
+128
-223
@@ -6,6 +6,7 @@
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/pelican-ag.gc")
|
||||
|
||||
(deftype pelican-bank (basic)
|
||||
@@ -181,8 +182,7 @@
|
||||
)
|
||||
|
||||
(defstate pelican-circle (pelican)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
@@ -206,8 +206,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(while (-> self child)
|
||||
(deactivate (-> self child 0))
|
||||
)
|
||||
@@ -215,17 +214,7 @@
|
||||
(let ((gp-0 (-> self path-vector)))
|
||||
(eval-path-curve-div! (-> self path-dive0) gp-0 4.5 'interp)
|
||||
(set! (-> gp-0 y) (+ -4505.6 (-> gp-0 y)))
|
||||
(let* ((s5-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-8
|
||||
(when s5-0
|
||||
(let ((t9-3 (method-of-type manipy activate)))
|
||||
(t9-3 (the-as manipy s5-0) self 'manipy (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-0 manipy-init gp-0 (-> self entity) *fuel-cell-sg* (new 'static 'vector :w 4915.2))
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-8 (manipy-spawn gp-0 (-> self entity) *fuel-cell-sg* (new 'static 'vector :w 4915.2) :to self)))
|
||||
(set! (-> self fuel-cell) (ppointer->handle v1-8))
|
||||
(if v1-8
|
||||
(send-event
|
||||
@@ -249,8 +238,7 @@
|
||||
(set-roll-to-grav-2! (-> self root-override) -2730.6667)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(pelican-path-update 728177.75 30 1.0 (/ (-> self path-max) (path-distance (-> self path))) #f)
|
||||
(let ((f0-3 (+ (-> self path-pos) (* (-> self path-speed) (-> *display* seconds-per-frame))))
|
||||
(f1-2 (-> self path-max))
|
||||
@@ -260,60 +248,53 @@
|
||||
(when (and (and *target* (>= 81920.0 (vector-vector-xz-distance (-> self path-vector) (-> *target* control trans))))
|
||||
(not (handle->process (-> self cam-tracker)))
|
||||
)
|
||||
(let ((gp-1 (get-process *default-dead-pool* camera-tracker #x4000)))
|
||||
(set! (-> self cam-tracker)
|
||||
(ppointer->handle (when gp-1
|
||||
(let ((t9-4 (method-of-type camera-tracker activate)))
|
||||
(t9-4 (the-as camera-tracker gp-1) self 'camera-tracker (the-as pointer #x70004000))
|
||||
(set! (-> self cam-tracker)
|
||||
(ppointer->handle (process-spawn
|
||||
camera-tracker
|
||||
:init camera-tracker-init
|
||||
(lambda :behavior camera-tracker
|
||||
()
|
||||
(local-vars
|
||||
(a0-6 process-tree)
|
||||
(a1-5 event-message-block)
|
||||
(t9-6 (function process-tree event-message-block object))
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-1
|
||||
camera-tracker-init
|
||||
(lambda :behavior camera-tracker
|
||||
()
|
||||
(local-vars
|
||||
(a0-6 process-tree)
|
||||
(a1-5 event-message-block)
|
||||
(t9-6 (function process-tree event-message-block object))
|
||||
)
|
||||
(while (not (process-grab? *target*))
|
||||
(suspend)
|
||||
)
|
||||
(send-event (ppointer->process (-> self parent)) 'position 4.0)
|
||||
(send-event (ppointer->process (-> self parent)) 'dive)
|
||||
(suspend)
|
||||
(suspend)
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(camera-look-at (the-as pair (ppointer->process (-> self parent))) (the-as uint 0))
|
||||
(camera-change-to "camera-215" 0 #f)
|
||||
(until (t9-6 a0-6 a1-5)
|
||||
(suspend)
|
||||
(set! a1-5 (new 'stack-no-clear 'event-message-block))
|
||||
(set! (-> a1-5 from) self)
|
||||
(set! (-> a1-5 num-params) 0)
|
||||
(set! (-> a1-5 message) 'got-cell?)
|
||||
(set! t9-6 send-event-function)
|
||||
(set! a0-6 (ppointer->process (-> self parent)))
|
||||
)
|
||||
(send-event *camera* 'point-of-interest #f)
|
||||
(while (!= (-> self message) 'release)
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self message) #f)
|
||||
(while (not (process-release? (handle->process (-> self grab-target))))
|
||||
(suspend)
|
||||
)
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(camera-look-at (the-as pair *target*) (the-as uint 0))
|
||||
(camera-change-to (the-as string 'base) 150 #f)
|
||||
(none)
|
||||
)
|
||||
(while (not (process-grab? *target*))
|
||||
(suspend)
|
||||
)
|
||||
(-> gp-1 ppointer)
|
||||
(send-event (ppointer->process (-> self parent)) 'position 4.0)
|
||||
(send-event (ppointer->process (-> self parent)) 'dive)
|
||||
(suspend)
|
||||
(suspend)
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(camera-look-at (the-as pair (ppointer->process (-> self parent))) (the-as uint 0))
|
||||
(camera-change-to "camera-215" 0 #f)
|
||||
(until (t9-6 a0-6 a1-5)
|
||||
(suspend)
|
||||
(set! a1-5 (new 'stack-no-clear 'event-message-block))
|
||||
(set! (-> a1-5 from) self)
|
||||
(set! (-> a1-5 num-params) 0)
|
||||
(set! (-> a1-5 message) 'got-cell?)
|
||||
(set! t9-6 send-event-function)
|
||||
(set! a0-6 (ppointer->process (-> self parent)))
|
||||
)
|
||||
(send-event *camera* 'point-of-interest #f)
|
||||
(while (!= (-> self message) 'release)
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self message) #f)
|
||||
(while (not (process-release? (handle->process (-> self grab-target))))
|
||||
(suspend)
|
||||
)
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(camera-look-at (the-as pair *target*) (the-as uint 0))
|
||||
(camera-change-to (the-as string 'base) 150 #f)
|
||||
(none)
|
||||
)
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self draw force-lod) 0)
|
||||
0
|
||||
)
|
||||
@@ -326,8 +307,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(suspend)
|
||||
(send-event (-> self fuel-cell process 0) 'trans-hook fuel-cell-animate)
|
||||
(pelican-fly
|
||||
@@ -336,13 +316,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
pelican-post
|
||||
:post pelican-post
|
||||
)
|
||||
|
||||
(defstate pelican-dive (pelican)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'got-cell?)
|
||||
@@ -355,8 +333,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 path-control) (arg1 curve-control) (arg2 time-frame))
|
||||
:enter (behavior ((arg0 path-control) (arg1 curve-control) (arg2 time-frame))
|
||||
(init! (-> self query) (the-as string #f) 40 150 25 #t (the-as string #f))
|
||||
(set! (-> self state-object) #f)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -384,13 +361,11 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(set! (-> self draw force-lod) -1)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(if (not (handle->process (-> self fuel-cell)))
|
||||
(go pelican-fly-to-end (-> self path-to-nest2) (-> *PELICAN-bank* run-away-time))
|
||||
)
|
||||
@@ -401,21 +376,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 path-control) (arg1 curve-control) (arg2 time-frame))
|
||||
:code (behavior ((arg0 path-control) (arg1 curve-control) (arg2 time-frame))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! pelican-swoop-ja :num! (seek! (ja-aframe 48.0 0) 0.5) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(ja-blend-eval)
|
||||
(let ((gp-1 (handle->process (-> self fuel-cell))))
|
||||
(when (and gp-1 (>= (-> self path-pos) 3.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) 'query)
|
||||
(set! (-> a1-5 param 0) (the-as uint 'grab))
|
||||
(not (send-event-function gp-1 a1-5))
|
||||
)
|
||||
)
|
||||
(when (and gp-1 (>= (-> self path-pos) 3.8) (not (send-event gp-1 'query 'grab)))
|
||||
(level-hint-spawn (game-text-id zero) (the-as string #f) (-> self entity) *entity-pool* (game-task none))
|
||||
(send-event gp-1 'grab self)
|
||||
(send-event gp-1 'draw #f)
|
||||
@@ -436,21 +403,18 @@
|
||||
(anim-loop)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
pelican-post
|
||||
:post pelican-post
|
||||
)
|
||||
|
||||
(defstate pelican-to-nest (pelican)
|
||||
:enter
|
||||
(behavior ((arg0 path-control) (arg1 int))
|
||||
:enter (behavior ((arg0 path-control) (arg1 int))
|
||||
(set! (-> self path) arg0)
|
||||
(set! (-> self path-pos) 0.0)
|
||||
(set! (-> self path-max) (the float (+ (-> self path curve num-cverts) -1)))
|
||||
(set! (-> self path-speed) (/ (* 300.0 (-> self path-max)) (the float arg1)))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(pelican-path-update 546133.3 30 0.0 0.0 #f)
|
||||
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
|
||||
(if (= (-> self path-pos) (-> self path-max))
|
||||
@@ -458,8 +422,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 path-control) (arg1 int))
|
||||
:code (behavior ((arg0 path-control) (arg1 int))
|
||||
(pelican-fly
|
||||
(the-as (function pelican int) (lambda () 1))
|
||||
(lambda ((arg0 pelican)) (if (and (>= (-> arg0 path-pos) 4.0) (>= 6.0 (-> arg0 path-pos)))
|
||||
@@ -470,13 +433,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
pelican-post
|
||||
:post pelican-post
|
||||
)
|
||||
|
||||
(defstate pelican-wait-at-nest (pelican)
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
@@ -527,8 +488,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(set! (-> self path) (-> self path-from-nest0))
|
||||
(set! (-> self path-pos) 0.0)
|
||||
(set! (-> self path-max) (the float (+ (-> self path curve num-cverts) -1)))
|
||||
@@ -560,15 +520,13 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self neck))
|
||||
(set-mode! (-> self neck) (joint-mod-handler-mode flex-blend))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(let ((a1-0 (-> self state-vector))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -581,8 +539,7 @@
|
||||
(spool-push *art-control* "pelican-spit-ext" 0 self -99.0)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(cond
|
||||
(arg0
|
||||
(ja-channel-set! 1)
|
||||
@@ -622,8 +579,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(when *target*
|
||||
(if *target*
|
||||
(look-at-enemy! (-> *target* neck) (the-as vector (-> self root-override root-prim prim-core)) 'nothing self)
|
||||
@@ -638,24 +594,13 @@
|
||||
)
|
||||
|
||||
(defstate pelican-spit (pelican)
|
||||
:event
|
||||
(-> pelican-circle event)
|
||||
:code
|
||||
(behavior ()
|
||||
:event (-> pelican-circle event)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-21 symbol) (v1-31 symbol))
|
||||
(let* ((gp-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(gp-1
|
||||
(ppointer->handle
|
||||
(when gp-0
|
||||
(let ((t9-1 (method-of-type manipy activate)))
|
||||
(t9-1 (the-as manipy gp-0) self 'manipy (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-0 manipy-init (-> self entity extra trans) (-> self entity) *beachcam-sg* #f)
|
||||
(-> gp-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1
|
||||
(ppointer->handle (manipy-spawn (-> self entity extra trans) (-> self entity) *beachcam-sg* #f :to self))
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (get-process *default-dead-pool* othercam #x4000)))
|
||||
(ppointer->handle (when s5-0
|
||||
(let ((t9-4 (method-of-type othercam activate)))
|
||||
@@ -666,18 +611,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s5-1 (get-process *default-dead-pool* fuel-cell #x4000))
|
||||
(s4-0 (ppointer->handle (when s5-1
|
||||
(let ((t9-7 (method-of-type fuel-cell activate)))
|
||||
(t9-7 (the-as fuel-cell s5-1) self 'fuel-cell (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-1 fuel-cell-init-as-clone (process->handle self) 0)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-2 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(let ((s4-0
|
||||
(ppointer->handle (process-spawn fuel-cell :init fuel-cell-init-as-clone (process->handle self) 0 :to self))
|
||||
)
|
||||
(s5-2 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(quaternion-copy! s5-2 (-> self root-override quat))
|
||||
(until v1-21
|
||||
(suspend)
|
||||
@@ -689,8 +627,7 @@
|
||||
:name "pelican-spit-ext"
|
||||
:index 11
|
||||
:parts 2
|
||||
:command-list
|
||||
'((10 send-event camera 'teleport-to-vector-start-string (static-vectorm -179 16 -421)))
|
||||
:command-list '((10 send-event camera 'teleport-to-vector-start-string (static-vectorm -179 16 -421)))
|
||||
)
|
||||
(the-as art-joint-anim pelican-sleep-ja)
|
||||
(the-as art-joint-anim #f)
|
||||
@@ -709,31 +646,26 @@
|
||||
(quaternion-copy! (-> self root-override quat) s5-2)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (get-process *default-dead-pool* process #x4000)))
|
||||
(when gp-2
|
||||
(let ((t9-18 (method-of-type process activate)))
|
||||
(t9-18 gp-2 self 'process (the-as pointer #x70004000))
|
||||
(process-spawn-function
|
||||
process
|
||||
(lambda :behavior pelican
|
||||
()
|
||||
(while (or (-> *setting-control* current ambient)
|
||||
(-> *setting-control* current movie)
|
||||
(-> *setting-control* current hint)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(run-next-time-in-process gp-2 (lambda :behavior pelican
|
||||
()
|
||||
(while (or (-> *setting-control* current ambient)
|
||||
(-> *setting-control* current movie)
|
||||
(-> *setting-control* current hint)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(level-hint-spawn
|
||||
(game-text-id beach-pelican-quick-get-cell)
|
||||
"sksp0027"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(-> gp-2 ppointer)
|
||||
(level-hint-spawn
|
||||
(game-text-id beach-pelican-quick-get-cell)
|
||||
"sksp0027"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:to self
|
||||
)
|
||||
(let ((gp-3 (handle->process (-> self fuel-cell))))
|
||||
(when gp-3
|
||||
@@ -780,8 +712,7 @@
|
||||
(go pelican-from-nest)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
:post (behavior ()
|
||||
(if (not (ja-group? pelican-sleep-ja))
|
||||
(quaternion-identity! (-> self root-override quat))
|
||||
)
|
||||
@@ -791,13 +722,11 @@
|
||||
)
|
||||
|
||||
(defstate pelican-from-nest (pelican)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(set! (-> self path-pos) 1.5)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(pelican-path-update 131072.0 150 0.0 0.0 #f)
|
||||
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
|
||||
(if (= (-> self path-pos) (-> self path-max))
|
||||
@@ -805,21 +734,18 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(pelican-fly
|
||||
(the-as (function pelican int) (lambda () (rand-vu-int-range 2 4)))
|
||||
(the-as (function pelican int) zero-func)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
pelican-post
|
||||
:post pelican-post
|
||||
)
|
||||
|
||||
(defstate pelican-fly-to-end (pelican)
|
||||
:enter
|
||||
(behavior ((arg0 path-control) (arg1 time-frame))
|
||||
:enter (behavior ((arg0 path-control) (arg1 time-frame))
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((v1-2 (-> self entity extra perm)))
|
||||
(logior! (-> v1-2 status) (entity-perm-status user-set-from-cstage))
|
||||
@@ -838,8 +764,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(pelican-path-update 546133.3 30 0.0 0.0 #f)
|
||||
(seek! (-> self path-pos) (-> self path-max) (* (-> self path-speed) (-> *display* seconds-per-frame)))
|
||||
(if (= (-> self path-pos) (-> self path-max))
|
||||
@@ -858,8 +783,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 path-control) (arg1 time-frame))
|
||||
:code (behavior ((arg0 path-control) (arg1 time-frame))
|
||||
(pelican-fly
|
||||
(the-as (function pelican int) (lambda () 1))
|
||||
(lambda ((arg0 pelican)) (if (and (>= (-> arg0 path-pos) 4.0) (>= 6.0 (-> arg0 path-pos)))
|
||||
@@ -870,44 +794,34 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
pelican-post
|
||||
:post pelican-post
|
||||
)
|
||||
|
||||
(defstate pelican-wait-at-end (pelican)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate pelican-explode (pelican)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
:code (behavior ((arg0 symbol))
|
||||
(let ((v1-2 (-> self entity extra perm)))
|
||||
(logior! (-> v1-2 status) (entity-perm-status user-set-from-cstage))
|
||||
(set! (-> v1-2 user-int8 0) 5)
|
||||
)
|
||||
(when (not arg0)
|
||||
(sound-play-by-name (static-sound-name "scrate-break") (new-sound-id) 1024 0 0 1 #t)
|
||||
(let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
(when gp-1
|
||||
(let ((t9-3 (method-of-type part-tracker activate)))
|
||||
(t9-3 (the-as part-tracker gp-1) *entity-pool* 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
gp-1
|
||||
part-tracker-init
|
||||
(-> *part-group-id-table* 71)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
)
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 71)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (new-stack-vector0)))
|
||||
@@ -939,8 +853,7 @@
|
||||
(anim-loop)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior pelican) ja-post)
|
||||
:post (the-as (function none :behavior pelican) ja-post)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! pelican ((obj pelican) (arg0 entity-actor))
|
||||
@@ -993,23 +906,15 @@
|
||||
(go pelican-wait-at-nest #t)
|
||||
)
|
||||
((2)
|
||||
(let* ((s4-1 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s5-2 (when s4-1
|
||||
(let ((t9-15 (method-of-type manipy activate)))
|
||||
(t9-15 (the-as manipy s4-1) obj 'manipy (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
s4-1
|
||||
manipy-init
|
||||
(-> obj root-override trans)
|
||||
(-> obj entity)
|
||||
*fuel-cell-sg*
|
||||
(new 'static 'vector :w 4915.2)
|
||||
)
|
||||
(-> s4-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 (manipy-spawn
|
||||
(-> obj root-override trans)
|
||||
(-> obj entity)
|
||||
*fuel-cell-sg*
|
||||
(new 'static 'vector :w 4915.2)
|
||||
:to obj
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj fuel-cell) (the-as handle (if s5-2
|
||||
(ppointer->handle s5-2)
|
||||
(the-as int #f)
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
(declare-type muse nav-enemy)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
(import "goal_src/import/sculptor-ag.gc")
|
||||
|
||||
(import "goal_src/import/sculptor-muse-ag.gc")
|
||||
(import "goal_src/import/sculptor-ag.gc")
|
||||
|
||||
(deftype sculptor (process-taskable)
|
||||
((muse handle :offset-assert 384)
|
||||
@@ -71,21 +72,11 @@
|
||||
)
|
||||
|
||||
(defbehavior muse-to-idle sculptor ((arg0 muse))
|
||||
(when (not (handle->process (-> arg0 incomming-attack-id)))
|
||||
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(if (not (handle->process (-> arg0 incomming-attack-id)))
|
||||
(set! (-> arg0 incomming-attack-id)
|
||||
(ppointer->handle
|
||||
(when s5-0
|
||||
(let ((t9-1 (method-of-type manipy activate)))
|
||||
(t9-1 (the-as manipy s5-0) arg0 'manipy (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s5-0 manipy-init (-> arg0 collide-info trans) (-> arg0 entity) *sculptor-muse-sg* #f)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
(ppointer->handle (manipy-spawn (-> arg0 collide-info trans) (-> arg0 entity) *sculptor-muse-sg* #f :to arg0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-11 (handle->process (-> arg0 incomming-attack-id))))
|
||||
(if v1-11
|
||||
(set! (-> (the-as muse v1-11) draw light-index) (the-as uint 3))
|
||||
@@ -99,8 +90,7 @@
|
||||
|
||||
(defstate give-cell (sculptor)
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(muse-to-idle (the-as muse self))
|
||||
(none)
|
||||
)
|
||||
@@ -116,8 +106,7 @@
|
||||
:name "sculptor-introduction"
|
||||
:index 16
|
||||
:parts 14
|
||||
:command-list
|
||||
'((0 display-level beach special)
|
||||
: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")
|
||||
@@ -145,19 +134,9 @@
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj muse)
|
||||
(ppointer->handle (manipy-spawn (-> obj root-override trans) (-> obj entity) *sculptor-muse-sg* #f :to obj))
|
||||
)
|
||||
(let ((v1-18 (handle->process (-> obj muse))))
|
||||
(if v1-18
|
||||
(set! (-> (the-as muse v1-18) draw light-index) (the-as uint 3))
|
||||
@@ -170,8 +149,7 @@
|
||||
:name "sculptor-resolution"
|
||||
:index 18
|
||||
:parts 4
|
||||
:command-list
|
||||
'((51 joint "cameraB") (87 joint "camera"))
|
||||
:command-list '((51 joint "cameraB") (87 joint "camera"))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -201,10 +179,7 @@
|
||||
|
||||
(defmethod TODO-RENAME-43 sculptor ((obj sculptor))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let* ((v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-4 (the-as number (logior #x3f800000 v1-3)))
|
||||
(f0-2 (+ -1.0 (the-as float v1-4)))
|
||||
)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.85714287 f0-2)
|
||||
(play-ambient (-> obj ambient) "SCU-LO01" #f (-> obj root-override trans))
|
||||
@@ -234,8 +209,7 @@
|
||||
|
||||
(defstate idle (sculptor)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(when (!= (ja-group) (get-art-elem self))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja :group! (get-art-elem self))
|
||||
@@ -276,10 +250,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((v1-97 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-98 (the-as number (logior #x3f800000 v1-97)))
|
||||
(f30-1 (+ -1.0 (the-as float v1-98)))
|
||||
)
|
||||
(let ((f30-1 (rand-float-gen)))
|
||||
(ja-no-eval :group! sculptor-small-to-looking-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
@@ -345,11 +316,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((v1-316 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-317 (the-as number (logior #x3f800000 v1-316)))
|
||||
)
|
||||
(< (+ -1.0 (the-as float v1-317)) 0.5)
|
||||
)
|
||||
(< (rand-float-gen) 0.5)
|
||||
)
|
||||
(ja-no-eval :group! sculptor-sigh-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
|
||||
@@ -10,18 +10,17 @@
|
||||
(declare-type seagullflock process)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(import "goal_src/import/seagull-ag.gc")
|
||||
|
||||
(defpartgroup group-seagull-takeoff
|
||||
:id 160
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts
|
||||
((sp-item 663 :fade-after (meters 20)))
|
||||
:parts ((sp-item 663 :fade-after (meters 20)))
|
||||
)
|
||||
|
||||
(defpart 665
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -330,8 +329,7 @@
|
||||
)
|
||||
|
||||
(defstate seagull-idle (seagull)
|
||||
:enter
|
||||
(behavior ()
|
||||
:enter (behavior ()
|
||||
(let* ((v1-0 (-> self flock))
|
||||
(f30-0 (dummy-16
|
||||
(if v1-0
|
||||
@@ -342,17 +340,14 @@
|
||||
)
|
||||
(f28-0 21845.334)
|
||||
(f26-0 -0.5)
|
||||
(v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-6 (the-as number (logior #x3f800000 v1-5)))
|
||||
)
|
||||
(set! (-> self heading)
|
||||
(the float (sar (shl (the int (+ f30-0 (* f28-0 (+ f26-0 (+ -1.0 (the-as float v1-6)))))) 48) 48))
|
||||
(the float (sar (shl (the int (+ f30-0 (* f28-0 (+ f26-0 (rand-float-gen))))) 48) 48))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (nonzero? (-> self scared))
|
||||
(+! (-> self scared) -1)
|
||||
(when (zero? (-> self scared))
|
||||
@@ -376,8 +371,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self root-override trans y) (+ 20480.0 (-> self root-override trans y)))
|
||||
(move-to-ground (-> self root-override) 40960.0 40960.0 #t (collide-kind background))
|
||||
(update-transforms! (-> self root-override))
|
||||
@@ -460,8 +454,7 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
seagull-post
|
||||
:post seagull-post
|
||||
)
|
||||
|
||||
(defmethod move-vertically! seagull ((obj seagull) (arg0 symbol))
|
||||
@@ -486,26 +479,20 @@
|
||||
|
||||
(defmethod dummy-26 seagull ((obj seagull))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let* ((f30-0 -4096.0)
|
||||
(f28-0 8192.0)
|
||||
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-2 (the-as number (logior #x3f800000 v1-1)))
|
||||
)
|
||||
(set! (-> s5-0 x) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-2))) (-> obj flock 0 target x)))
|
||||
(let ((f30-0 -4096.0)
|
||||
(f28-0 8192.0)
|
||||
)
|
||||
(set! (-> s5-0 x) (+ f30-0 (* f28-0 (rand-float-gen)) (-> obj flock 0 target x)))
|
||||
)
|
||||
(let* ((f30-1 -4096.0)
|
||||
(f28-1 8192.0)
|
||||
(v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-8 (the-as number (logior #x3f800000 v1-7)))
|
||||
)
|
||||
(set! (-> s5-0 y) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-8))) (-> obj flock 0 target y)))
|
||||
(let ((f30-1 -4096.0)
|
||||
(f28-1 8192.0)
|
||||
)
|
||||
(set! (-> s5-0 y) (+ f30-1 (* f28-1 (rand-float-gen)) (-> obj flock 0 target y)))
|
||||
)
|
||||
(let* ((f30-2 -4096.0)
|
||||
(f28-2 8192.0)
|
||||
(v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-14 (the-as number (logior #x3f800000 v1-13)))
|
||||
)
|
||||
(set! (-> s5-0 z) (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-14))) (-> obj flock 0 target z)))
|
||||
(let ((f30-2 -4096.0)
|
||||
(f28-2 8192.0)
|
||||
)
|
||||
(set! (-> s5-0 z) (+ f30-2 (* f28-2 (rand-float-gen)) (-> obj flock 0 target z)))
|
||||
)
|
||||
(vector-! s5-0 s5-0 (-> obj root-override trans))
|
||||
(vector-float*! s5-0 s5-0 0.9)
|
||||
@@ -576,16 +563,14 @@
|
||||
)
|
||||
|
||||
(defstate seagull-takeoff (seagull)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (< (+ (-> *display* base-frame-counter) (seconds -2)) (-> self part-time))
|
||||
(-> self part)
|
||||
(-> self root-override root-prim prim-core)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self part-time) (-> *display* base-frame-counter))
|
||||
(ja-no-eval :group! seagull-takeoff-ja :num! (seek! (ja-aframe 4.0 0)) :frame-num (ja-aframe 1.0 0))
|
||||
(until (ja-done? 0)
|
||||
@@ -628,21 +613,18 @@
|
||||
(go seagull-flying)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
seagull-post
|
||||
:post seagull-post
|
||||
)
|
||||
|
||||
(defstate seagull-flying (seagull)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (< (+ (-> *display* base-frame-counter) (seconds -2)) (-> self part-time))
|
||||
(-> self part)
|
||||
(-> self root-override root-prim prim-core)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self max-tilt) 1820.4445)
|
||||
(let ((gp-0 0))
|
||||
(loop
|
||||
@@ -823,21 +805,18 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
seagull-post
|
||||
:post seagull-post
|
||||
)
|
||||
|
||||
(defstate seagull-soaring (seagull)
|
||||
:trans
|
||||
(behavior ()
|
||||
:trans (behavior ()
|
||||
(when (< (+ (-> *display* base-frame-counter) (seconds -2)) (-> self part-time))
|
||||
(-> self part)
|
||||
(-> self root-override root-prim prim-core)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self max-tilt) 4551.1113)
|
||||
(loop
|
||||
@@ -987,13 +966,11 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
seagull-post
|
||||
:post seagull-post
|
||||
)
|
||||
|
||||
(defstate seagull-landing (seagull)
|
||||
:code
|
||||
(behavior ((arg0 float))
|
||||
:code (behavior ((arg0 float))
|
||||
(let ((s5-0 (new 'stack 'collide-tri-result)))
|
||||
0.0
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -1142,8 +1119,7 @@
|
||||
(go seagull-idle)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
seagull-post
|
||||
:post seagull-post
|
||||
)
|
||||
|
||||
(defun seagull-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect) (arg2 vector) (arg3 vector))
|
||||
@@ -1198,12 +1174,10 @@
|
||||
(set! (-> self flock) (the-as (pointer seagullflock) (process->ppointer arg2)))
|
||||
(set! (-> self heading) 0.0)
|
||||
(set! (-> self tilt) 0.0)
|
||||
(let* ((f30-0 51200.0)
|
||||
(f28-0 20480.0)
|
||||
(v1-23 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-24 (the-as number (logior #x3f800000 v1-23)))
|
||||
)
|
||||
(set! (-> self thrust) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-24)))))
|
||||
(let ((f30-0 51200.0)
|
||||
(f28-0 20480.0)
|
||||
)
|
||||
(set! (-> self thrust) (+ f30-0 (* f28-0 (rand-float-gen))))
|
||||
)
|
||||
(set! (-> self teleport) #f)
|
||||
(go seagull-idle)
|
||||
@@ -1300,8 +1274,7 @@
|
||||
)
|
||||
|
||||
(defstate seagullflock-at-waterfall (seagullflock)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars
|
||||
(a0-2 process)
|
||||
(a1-0 event-message-block)
|
||||
@@ -1359,8 +1332,7 @@
|
||||
)
|
||||
|
||||
(defstate seagullflock-idle (seagullflock)
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(loop
|
||||
(if (> (-> self teleport-frames) 0)
|
||||
(go seagullflock-at-waterfall)
|
||||
@@ -1422,16 +1394,7 @@
|
||||
(if (= (-> obj birds) 64)
|
||||
(return (the-as (pointer process) #f))
|
||||
)
|
||||
(let* ((s4-0 (get-process *default-dead-pool* seagull #x4000))
|
||||
(v0-0 (when s4-0
|
||||
(let ((t9-1 (method-of-type seagull activate)))
|
||||
(t9-1 (the-as seagull s4-0) obj 'seagull (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s4-0 seagull-init-by-other arg0 (-> obj birds) obj)
|
||||
(-> s4-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v0-0 (process-spawn seagull arg0 (-> obj birds) obj :to obj)))
|
||||
(set! (-> obj bird (-> obj birds)) (the-as (pointer seagull) v0-0))
|
||||
(+! (-> obj birds) 1)
|
||||
v0-0
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
;; name in dgo: wobbler
|
||||
;; dgos: BEA, L1
|
||||
|
||||
;; definition of type wobbler
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype wobbler (basic)
|
||||
((posx float :offset-assert 4)
|
||||
(posy float :offset-assert 8)
|
||||
@@ -26,8 +27,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type wobbler
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
|
||||
(defmethod reset! wobbler ((obj wobbler) (arg0 float) (arg1 float) (arg2 float))
|
||||
(set! (-> obj posx) 0.0)
|
||||
(set! (-> obj posy) 0.0)
|
||||
@@ -40,8 +40,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type wobbler
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod inc-xy-vel! wobbler ((obj wobbler) (arg0 float) (arg1 float))
|
||||
(+! (-> obj velx) arg0)
|
||||
(+! (-> obj vely) arg1)
|
||||
@@ -49,41 +47,33 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type wobbler
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod move! wobbler ((obj wobbler))
|
||||
(+! (-> obj posx) (* (-> obj velx) (-> *display* seconds-per-frame)))
|
||||
(+! (-> obj posy) (* (-> obj vely) (-> *display* seconds-per-frame)))
|
||||
(set! (-> obj velx) (* (-> obj velx) (-> obj damping)))
|
||||
(set! (-> obj vely) (* (-> obj vely) (-> obj damping)))
|
||||
(+! (-> obj velx) (* (* -1.0 (-> obj posx)) (-> obj spring)))
|
||||
(+! (-> obj vely) (* (* -1.0 (-> obj posy)) (-> obj spring)))
|
||||
(+! (-> obj velx) (* -1.0 (-> obj posx) (-> obj spring)))
|
||||
(+! (-> obj vely) (* -1.0 (-> obj posy) (-> obj spring)))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type wobbler
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod TODO-RENAME-12 wobbler ((obj wobbler) (arg0 quaternion))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 x) (-> obj posy))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(set! (-> s5-0 z) (- (-> obj posx)))
|
||||
(vector-normalize! s5-0 1.0)
|
||||
(let*
|
||||
((f0-8
|
||||
(/
|
||||
(sqrtf
|
||||
(+ (* (-> obj posx) (-> obj posx)) (* (-> obj posy) (-> obj posy)))
|
||||
)
|
||||
(-> obj height)
|
||||
)
|
||||
(set! (-> s5-0 x) (-> obj posy))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(set! (-> s5-0 z) (- (-> obj posx)))
|
||||
(vector-normalize! s5-0 1.0)
|
||||
(let* ((f0-8 (/ (sqrtf (+ (* (-> obj posx) (-> obj posx)) (* (-> obj posy) (-> obj posy)))) (-> obj height)))
|
||||
(f0-9 (atan f0-8 1.0))
|
||||
)
|
||||
(quaternion-vector-angle! arg0 s5-0 f0-9)
|
||||
)
|
||||
(f0-9 (atan f0-8 1.0))
|
||||
)
|
||||
(quaternion-vector-angle! arg0 s5-0 f0-9)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user