mirror of
https://github.com/open-goal/jak-project
synced 2026-05-26 15:46:14 -04:00
[decompiler] as-type and font method support (#3855)
Add support for `as-type` macro, and detecting inline font methods. This works in all three games but I've only updated jak 3's goal_src for now. Eventually I will go back and work through the others, but I want to get more decompiler features in first.  --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
@@ -4638,6 +4638,67 @@ Form* try_rewrite_as_process_to_ppointer(CondNoElseElement* value,
|
||||
GenericOperator::make_fixed(FixedOperatorKind::PROCESS_TO_PPOINTER), repopped);
|
||||
}
|
||||
|
||||
/*!
|
||||
* (if (type? foo bar)
|
||||
* foo
|
||||
* )
|
||||
*/
|
||||
Form* try_rewrite_as_as_type(CondNoElseElement* value,
|
||||
FormStack& stack,
|
||||
FormPool& pool,
|
||||
const Env& env,
|
||||
const TypeSpec& resulting_type) {
|
||||
if (value->entries.size() != 1) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto condition = value->entries.at(0).condition;
|
||||
auto body = value->entries[0].body;
|
||||
|
||||
auto condition_matcher = Matcher::op(
|
||||
GenericOpMatcher::condition(IR2_Condition::Kind::TRUTHY),
|
||||
{Matcher::func(Matcher::symbol("type?"), {Matcher::any_reg(0), Matcher::any_symbol(1)})});
|
||||
|
||||
auto condition_mr = match(condition_matcher, condition);
|
||||
if (!condition_mr.matched) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto body_matcher = Matcher::any_reg(0);
|
||||
auto body_mr = match(body_matcher, body);
|
||||
if (!body_mr.matched) {
|
||||
body_mr = match(Matcher::cast_to_any(1, body_matcher), body);
|
||||
if (!body_mr.matched) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
auto body_var = body_mr.maps.regs.at(0).value();
|
||||
auto condition_var = condition_mr.maps.regs.at(0).value();
|
||||
auto* menv = const_cast<Env*>(&env);
|
||||
menv->disable_use(body_var);
|
||||
auto repopped = stack.pop_reg(condition_var, {}, env, true);
|
||||
if (!repopped) {
|
||||
repopped = var_to_form(condition_var, pool);
|
||||
}
|
||||
auto new_type = condition_mr.maps.strings.at(1);
|
||||
|
||||
auto result = pool.form<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("as-type")),
|
||||
std::vector<Form*>{repopped, pool.form<ConstantTokenElement>(new_type)});
|
||||
|
||||
// silly cast situation:
|
||||
// sometimes there is something dumb like (the specific (as-type foo general))
|
||||
// we have to make sure that we keep the leading cast.
|
||||
// HACK: inserting casts more aggressively in Jak 2 because I am too lazy to fix up all the
|
||||
// slightly wrong casts that matter now.
|
||||
if (resulting_type != TypeSpec(new_type) &&
|
||||
(env.version == GameVersion::Jak2 || env.dts->ts.tc(TypeSpec(new_type), resulting_type))) {
|
||||
return pool.form<CastElement>(resulting_type, result);
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// (if x (-> x 0 self)) -> (ppointer->process x)
|
||||
Form* try_rewrite_as_pppointer_to_process(CondNoElseElement* value,
|
||||
FormStack& stack,
|
||||
@@ -4810,11 +4871,18 @@ void CondNoElseElement::push_to_stack(const Env& env, FormPool& pool, FormStack&
|
||||
stack.push_value_to_reg(write_as_value, as_ja_group, true,
|
||||
env.get_variable_type(final_destination, false));
|
||||
} else {
|
||||
// lg::print("func {} final destination {} type {}\n", env.func->name(),
|
||||
// final_destination.to_string(env),
|
||||
// env.get_variable_type(final_destination, false).print());
|
||||
stack.push_value_to_reg(write_as_value, pool.alloc_single_form(nullptr, this), true,
|
||||
env.get_variable_type(final_destination, false));
|
||||
auto as_as_type = try_rewrite_as_as_type(this, stack, pool, env,
|
||||
env.get_variable_type(final_destination, true));
|
||||
if (as_as_type) {
|
||||
stack.push_value_to_reg(write_as_value, as_as_type, true,
|
||||
env.get_variable_type(final_destination, false));
|
||||
} else {
|
||||
// lg::print("func {} final destination {} type {}\n", env.func->name(),
|
||||
// final_destination.to_string(env),
|
||||
// env.get_variable_type(final_destination, false).print());
|
||||
stack.push_value_to_reg(write_as_value, pool.alloc_single_form(nullptr, this), true,
|
||||
env.get_variable_type(final_destination, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,14 @@ Matcher Matcher::cast(const std::string& type, Matcher value) {
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::numeric_cast(const std::string& type, Matcher value) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::NUMERIC_CAST;
|
||||
m.m_str = type;
|
||||
m.m_sub_matchers = {value};
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::cast_to_any(int type_out, Matcher value) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::CAST_TO_ANY;
|
||||
@@ -412,6 +420,16 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out, const Env* cons
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::NUMERIC_CAST: {
|
||||
auto as_cast = dynamic_cast<CastElement*>(input->try_as_single_active_element());
|
||||
if (as_cast && as_cast->numeric()) {
|
||||
if (as_cast->type().print() == m_str) {
|
||||
return m_sub_matchers.at(0).do_match(as_cast->source(), maps_out, env);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::CAST_TO_ANY: {
|
||||
auto as_cast = dynamic_cast<CastElement*>(input->try_as_single_active_element());
|
||||
if (as_cast) {
|
||||
|
||||
@@ -52,6 +52,7 @@ class Matcher {
|
||||
static Matcher set_var(const Matcher& src, int dst_match_id); // var-form
|
||||
static Matcher match_or(const std::vector<Matcher>& args);
|
||||
static Matcher cast(const std::string& type, Matcher value);
|
||||
static Matcher numeric_cast(const std::string& type, Matcher value);
|
||||
static Matcher cast_to_any(int type_out, Matcher value);
|
||||
static Matcher any(int match_id = -1);
|
||||
static Matcher integer(std::optional<int> value);
|
||||
@@ -88,6 +89,7 @@ class Matcher {
|
||||
GENERIC_OP_WITH_REST,
|
||||
OR,
|
||||
CAST,
|
||||
NUMERIC_CAST,
|
||||
CAST_TO_ANY,
|
||||
ANY,
|
||||
INT,
|
||||
|
||||
@@ -81,12 +81,13 @@ struct LetRewriteStats {
|
||||
int launch_particles = 0;
|
||||
int call_parent_state_handler = 0;
|
||||
int suspend_for = 0;
|
||||
int font_method = 0;
|
||||
|
||||
int total() const {
|
||||
return dotimes + countdown + abs + abs2 + unused + ja + case_no_else + case_with_else +
|
||||
set_vector + set_vector2 + send_event + font_context_meth + proc_new + attack_info +
|
||||
vector_dot + rand_float_gen + set_let + with_dma_buf_add_bucket + dma_buffer_add_gs_set +
|
||||
launch_particles + call_parent_state_handler + suspend_for;
|
||||
launch_particles + call_parent_state_handler + suspend_for + font_method;
|
||||
}
|
||||
|
||||
std::string print() const {
|
||||
@@ -115,6 +116,7 @@ struct LetRewriteStats {
|
||||
out += fmt::format(" launch_particles: {}\n", launch_particles);
|
||||
out += fmt::format(" call_parent_state_handler: {}\n", call_parent_state_handler);
|
||||
out += fmt::format(" suspend_for: {}\n", suspend_for);
|
||||
out += fmt::format(" font_method: {}\n", font_method);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
@@ -2212,6 +2212,50 @@ FormElement* rewrite_attack_info(LetElement* in, const Env& env, FormPool& pool)
|
||||
return elt;
|
||||
}
|
||||
|
||||
FormElement* rewrite_set_font_single(LetElement* in,
|
||||
const Env& env,
|
||||
FormPool& pool,
|
||||
const char* deref_name,
|
||||
const char* op_name,
|
||||
bool cast_to_float) {
|
||||
/*
|
||||
(let ((v1-10 gp-0))
|
||||
(set! (-> v1-10 scale) 0.6)
|
||||
)
|
||||
*/
|
||||
|
||||
if (in->entries().size() != 1) {
|
||||
return nullptr;
|
||||
}
|
||||
if (in->body()->elts().size() != 1) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Form* font_obj_expr = in->entries().at(0).src;
|
||||
RegisterAccess font_obj_reg = in->entries().at(0).dest;
|
||||
|
||||
if (env.get_variable_type(font_obj_reg, true) != TypeSpec("font-context")) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto src_matcher =
|
||||
cast_to_float ? Matcher::numeric_cast("float", Matcher::any(0)) : Matcher::any(0);
|
||||
Matcher set_matcher = Matcher::set(Matcher::deref(Matcher::reg(font_obj_reg.reg()), false,
|
||||
{DerefTokenMatcher::string(deref_name)}),
|
||||
src_matcher);
|
||||
auto set_mr = match(set_matcher, in->body()->at(0));
|
||||
|
||||
if (!set_mr.matched) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto elt = pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>(op_name)),
|
||||
std::vector<Form*>{font_obj_expr, set_mr.maps.forms.at(0)});
|
||||
elt->parent_form = in->parent_form;
|
||||
return elt;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Attempt to rewrite a let as another form. If it cannot be rewritten, this will return nullptr.
|
||||
*/
|
||||
@@ -2320,6 +2364,24 @@ FormElement* rewrite_let(LetElement* in, const Env& env, FormPool& pool, LetRewr
|
||||
return as_call_parent_state;
|
||||
}
|
||||
|
||||
auto as_font_scale = rewrite_set_font_single(in, env, pool, "scale", "set-scale!", false);
|
||||
if (as_font_scale) {
|
||||
stats.font_method++;
|
||||
return as_font_scale;
|
||||
}
|
||||
|
||||
auto as_font_width = rewrite_set_font_single(in, env, pool, "width", "set-width!", true);
|
||||
if (as_font_width) {
|
||||
stats.font_method++;
|
||||
return as_font_width;
|
||||
}
|
||||
|
||||
auto as_font_height = rewrite_set_font_single(in, env, pool, "height", "set-height!", true);
|
||||
if (as_font_height) {
|
||||
stats.font_method++;
|
||||
return as_font_height;
|
||||
}
|
||||
|
||||
// nothing matched.
|
||||
return nullptr;
|
||||
}
|
||||
@@ -2687,6 +2749,59 @@ FormElement* rewrite_with_dma_buf_add_bucket(LetElement* in, const Env& env, For
|
||||
return elt;
|
||||
}
|
||||
|
||||
FormElement* rewrite_set_font_origin(LetElement* in, const Env& env, FormPool& pool) {
|
||||
/*
|
||||
(let ((v1-9 gp-0)
|
||||
(a1-1 36)
|
||||
(a0-4 140)
|
||||
)
|
||||
(set! (-> v1-9 origin x) (the float a1-1))
|
||||
(set! (-> v1-9 origin y) (the float a0-4))
|
||||
)
|
||||
*/
|
||||
if (in->entries().size() != 3) {
|
||||
return nullptr;
|
||||
}
|
||||
if (in->body()->elts().size() != 2) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Form* font_obj_expr = in->entries().at(0).src;
|
||||
RegisterAccess font_obj_reg = in->entries().at(0).dest;
|
||||
|
||||
if (env.get_variable_type(font_obj_reg, true) != TypeSpec("font-context")) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Form* x_val = in->entries().at(1).src;
|
||||
Form* y_val = in->entries().at(2).src;
|
||||
|
||||
Matcher x_matcher = Matcher::set(
|
||||
Matcher::deref(Matcher::reg(font_obj_reg.reg()), false,
|
||||
{DerefTokenMatcher::string("origin"), DerefTokenMatcher::string("x")}),
|
||||
Matcher::numeric_cast("float", Matcher::reg(in->entries().at(1).dest.reg())));
|
||||
auto x_mr = match(x_matcher, in->body()->at(0));
|
||||
|
||||
Matcher y_matcher = Matcher::set(
|
||||
Matcher::deref(Matcher::reg(font_obj_reg.reg()), false,
|
||||
{DerefTokenMatcher::string("origin"), DerefTokenMatcher::string("y")}),
|
||||
Matcher::numeric_cast("float", Matcher::reg(in->entries().at(2).dest.reg())));
|
||||
auto y_mr = match(y_matcher, in->body()->at(1));
|
||||
|
||||
if (!x_mr.matched) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!y_mr.matched) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto elt = pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("set-origin!")),
|
||||
std::vector<Form*>{font_obj_expr, x_val, y_val});
|
||||
elt->parent_form = in->parent_form;
|
||||
return elt;
|
||||
}
|
||||
|
||||
FormElement* rewrite_launch_particles(LetElement* in, const Env& env, FormPool& pool) {
|
||||
/*
|
||||
* (let ((t9-0 sp-launch-particles-var)
|
||||
@@ -2846,6 +2961,12 @@ FormElement* rewrite_multi_let(LetElement* in,
|
||||
}
|
||||
}
|
||||
|
||||
auto as_font_set_origin = rewrite_set_font_origin(in, env, pool);
|
||||
if (as_font_set_origin) {
|
||||
stats.font_method++;
|
||||
return as_font_set_origin;
|
||||
}
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
|
||||
@@ -3194,6 +3194,16 @@
|
||||
[93, "a1", "process-focusable"],
|
||||
[140, "a1", "process-focusable"]
|
||||
],
|
||||
"(method 106 bot)": [
|
||||
[[16, 31], "v1", "process-focusable"],
|
||||
[[40, 58], "v1", "process-focusable"],
|
||||
[[92, 95], "v1", "process-focusable"]
|
||||
],
|
||||
"(method 106 ashelin)": [
|
||||
[[16, 21], "v1", "process-focusable"],
|
||||
[[40, 57], "v1", "process-focusable"],
|
||||
[[92, 95], "v1", "process-focusable"]
|
||||
],
|
||||
"(method 140 enemy)": [[18, "a1", "process-focusable"]],
|
||||
"(method 142 enemy)": [[[0, 40], "v0", "knocked-type"]],
|
||||
"get-penetrate-using-from-attack-event": [
|
||||
@@ -6607,8 +6617,7 @@
|
||||
[40, "a0", "process-focusable"]
|
||||
],
|
||||
"(method 26 task-manager-temple-climb)": [
|
||||
[126, "s5", "process-focusable"],
|
||||
[130, "s5", "process-focusable"]
|
||||
[[0, 148], "s5", "process-focusable"]
|
||||
],
|
||||
"(method 26 task-manager-desert-beast-battle)": [
|
||||
[39, "a0", "process-focusable"]
|
||||
@@ -9790,12 +9799,7 @@
|
||||
[319, "a1", "ff-squad-control"]
|
||||
],
|
||||
"(method 252 crimson-guard)": [
|
||||
[74, "s5", "process-focusable"],
|
||||
[69, "s5", "process-focusable"],
|
||||
[126, "s5", "process-focusable"],
|
||||
[146, "s5", "process-focusable"],
|
||||
[202, "s5", "process-focusable"],
|
||||
[205, "s5", "process-focusable"]
|
||||
[[0, 223], "s5", "process-focusable"]
|
||||
],
|
||||
"(method 51 ff-squad-control)": [
|
||||
[13, "v1", "connection"],
|
||||
|
||||
@@ -191,6 +191,9 @@
|
||||
"(method 10 process-tree)": {
|
||||
"args": ["this", "ent"]
|
||||
},
|
||||
"(method 106 bot)": {
|
||||
"vars": {"v1-3": ["v1-3", "process-focusable"]}
|
||||
},
|
||||
"(method 0 clock)": {
|
||||
"args": ["allocation", "type-to-make", "index"]
|
||||
},
|
||||
|
||||
@@ -323,6 +323,19 @@
|
||||
,@args)
|
||||
)
|
||||
|
||||
(defmacro as-type (this type)
|
||||
"If this is the specified type, return this cast to that type. Otherwise, return #f."
|
||||
(with-gensyms (obj)
|
||||
`(the ,type (let ((,obj ,this))
|
||||
(if (type? ,obj ,type)
|
||||
,obj
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun ref ((arg0 object) (arg1 int))
|
||||
"Get the n-th item in a linked list. No range checking."
|
||||
(dotimes (v1-0 arg1)
|
||||
|
||||
@@ -335,12 +335,7 @@
|
||||
(return (-> (the-as attack-info v1-0) penetrate-using))
|
||||
)
|
||||
)
|
||||
(let* ((gp-0 arg0)
|
||||
(v1-3 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (as-type arg0 process-drawable)))
|
||||
(when v1-3
|
||||
(let* ((gp-1 (-> v1-3 root))
|
||||
(v1-4 (if (the-as penetrate (type? gp-1 collide-shape))
|
||||
@@ -386,12 +381,7 @@
|
||||
(defmethod focus-on-attacker! ((this enemy))
|
||||
"If possible, update this enemies focus to the attacker."
|
||||
(when (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags)))
|
||||
(let* ((s4-0 (handle->process (-> this incoming attacker-handle)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this incoming attacker-handle)) process-focusable)))
|
||||
(when (can-focus-on? this (the-as process-focusable s5-0))
|
||||
(set-focus! this (the-as process-focusable s5-0) (the-as enemy-aware #f))
|
||||
(logior! (-> this focus flags) (enemy-flag look-at-focus))
|
||||
@@ -659,11 +649,7 @@
|
||||
(set! (-> this root penetrated-by) (the-as penetrate -1))
|
||||
(reset-penetrate-later! this)
|
||||
)
|
||||
(let ((s5-0 (if (type? arg0 process-focusable)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type arg0 process-focusable)))
|
||||
(when (can-focus-on? this s5-0)
|
||||
(let ((v1-10 (handle->process (-> this focus handle))))
|
||||
(when (or (= s5-0 v1-10) (and (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags)))
|
||||
@@ -1406,12 +1392,7 @@
|
||||
(while (!= v1-4 (-> *collide-player-list* alive-list-end))
|
||||
(let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1))))
|
||||
(when (logtest? s4-0 (-> v1-5 root-prim prim-core collide-as))
|
||||
(let* ((s2-0 (-> v1-5 process))
|
||||
(a1-1 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-1 (as-type (-> v1-5 process) process-focusable)))
|
||||
(if (and a1-1
|
||||
(and a1-1 (not (logtest? (-> (the-as process-focusable a1-1) focus-status) (focus-status disable dead))))
|
||||
(!= this a1-1)
|
||||
@@ -1436,12 +1417,7 @@
|
||||
(while (!= v1-19 (-> *collide-hit-by-player-list* alive-list-end))
|
||||
(let ((v1-20 (the-as collide-shape (-> (the-as connection v1-19) param1))))
|
||||
(when (logtest? s4-0 (-> v1-20 root-prim prim-core collide-as))
|
||||
(let* ((s2-1 (-> v1-20 process))
|
||||
(a1-3 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-3 (as-type (-> v1-20 process) process-focusable)))
|
||||
(if (and a1-3
|
||||
(and a1-3 (not (logtest? (-> (the-as process-focusable a1-3) focus-status) (focus-status disable dead))))
|
||||
(!= this a1-3)
|
||||
@@ -1465,12 +1441,7 @@
|
||||
(while (!= v1-32 (-> *collide-hit-by-others-list* alive-list-end))
|
||||
(let ((v1-33 (the-as collide-shape (-> (the-as connection v1-32) param1))))
|
||||
(when (logtest? s4-0 (-> v1-33 root-prim prim-core collide-as))
|
||||
(let* ((s2-2 (-> v1-33 process))
|
||||
(a1-5 (if (type? s2-2 process-focusable)
|
||||
s2-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-5 (as-type (-> v1-33 process) process-focusable)))
|
||||
(if (and a1-5
|
||||
(and a1-5 (not (logtest? (-> (the-as process-focusable a1-5) focus-status) (focus-status disable dead))))
|
||||
(!= this a1-5)
|
||||
@@ -1661,20 +1632,11 @@
|
||||
)
|
||||
((= msg 'touched)
|
||||
(when (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate))
|
||||
(let* ((s3-1 proc)
|
||||
(v1-27 (if (type? s3-1 process-drawable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-27 (as-type proc process-drawable)))
|
||||
(when v1-27
|
||||
(let* ((s3-2 (-> (the-as process-drawable v1-27) root))
|
||||
(a1-5 (if (type? s3-2 collide-shape)
|
||||
s3-2
|
||||
)
|
||||
)
|
||||
(s3-3 (-> block param 0))
|
||||
)
|
||||
(let ((a1-5 (as-type (-> (the-as process-drawable v1-27) root) collide-shape))
|
||||
(s3-3 (-> block param 0))
|
||||
)
|
||||
(if (and a1-5
|
||||
s3-3
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
@@ -1793,10 +1755,7 @@
|
||||
)
|
||||
((= msg 'impact-impulse)
|
||||
(let* ((s4-1 (the-as object (-> block param 0)))
|
||||
(s3-5 (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
(s3-5 (as-type proc process-focusable))
|
||||
(f30-1 (* (-> (the-as rigid-body-impact s4-1) impulse) (get-inv-mass this)))
|
||||
)
|
||||
(when (and s3-5 (< 20480.0 f30-1))
|
||||
@@ -2225,13 +2184,9 @@
|
||||
|
||||
(defmethod enemy-touch-handler ((this enemy) (arg0 process) (arg1 event-message-block))
|
||||
"General handler for an event when a process intentionally sends a touch event."
|
||||
(let* ((s4-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (-> arg1 param 0))
|
||||
(s3-0 (as-type arg0 process-focusable))
|
||||
)
|
||||
(when (and s4-0 s3-0)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
|
||||
@@ -293,57 +293,31 @@
|
||||
)
|
||||
)
|
||||
(let ((f0-0 320.0))
|
||||
(let ((v1-2 gp-0))
|
||||
(set! (-> v1-2 scale) 0.75)
|
||||
)
|
||||
(set-scale! gp-0 0.75)
|
||||
(case (-> this message channel)
|
||||
(((gui-channel notice))
|
||||
(cond
|
||||
((logtest? (-> this message flags) (talker-flags bigger-font))
|
||||
(let ((v1-9 gp-0)
|
||||
(a1-1 36)
|
||||
(a0-4 140)
|
||||
)
|
||||
(set! (-> v1-9 origin x) (the float a1-1))
|
||||
(set! (-> v1-9 origin y) (the float a0-4))
|
||||
)
|
||||
(set-origin! gp-0 36 140)
|
||||
)
|
||||
(else
|
||||
(let ((v1-10 gp-0))
|
||||
(set! (-> v1-10 scale) 0.6)
|
||||
)
|
||||
(let ((v1-11 gp-0)
|
||||
(a1-2 36)
|
||||
(a0-6 160)
|
||||
)
|
||||
(set! (-> v1-11 origin x) (the float a1-2))
|
||||
(set! (-> v1-11 origin y) (the float a0-6))
|
||||
)
|
||||
(set-scale! gp-0 0.6)
|
||||
(set-origin! gp-0 36 160)
|
||||
)
|
||||
)
|
||||
(set! f0-0 160.0)
|
||||
)
|
||||
)
|
||||
(let ((v1-14 gp-0))
|
||||
(set! (-> v1-14 width) (the float 440))
|
||||
)
|
||||
(let ((v1-15 gp-0))
|
||||
(set! (-> v1-15 height) (the float 140))
|
||||
)
|
||||
(set-width! gp-0 440)
|
||||
(set-height! gp-0 140)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning middle large))
|
||||
(if (logtest? (-> this message flags) (talker-flags fade-in))
|
||||
(set! (-> gp-0 alpha) (-> this interp))
|
||||
(set! (-> gp-0 alpha) 1.0)
|
||||
)
|
||||
(when (logtest? (-> this message flags) (talker-flags slide-in))
|
||||
(let ((s4-0 gp-0)
|
||||
(s3-0 36)
|
||||
(v1-27 (the int (lerp-scale 400.0 f0-0 (-> this interp) 0.0 1.0)))
|
||||
)
|
||||
(set! (-> s4-0 origin x) (the float s3-0))
|
||||
(set! (-> s4-0 origin y) (the float v1-27))
|
||||
(if (logtest? (-> this message flags) (talker-flags slide-in))
|
||||
(set-origin! gp-0 36 (the int (lerp-scale 400.0 f0-0 (-> this interp) 0.0 1.0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-17 (print-game-text
|
||||
(lookup-text! *common-text* (-> this message text-message) #f)
|
||||
@@ -354,11 +328,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< 98.0 f0-17)
|
||||
(let ((v1-32 gp-0))
|
||||
(set! (-> v1-32 scale) 0.6)
|
||||
(if (< 98.0 f0-17)
|
||||
(set-scale! gp-0 0.6)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-2 print-game-text)
|
||||
(a0-14 (lookup-text! *common-text* (-> this message text-message) #f))
|
||||
@@ -447,12 +419,7 @@
|
||||
)
|
||||
(let ((gp-0 (-> self message on-close)))
|
||||
(when gp-0
|
||||
(let* ((s5-0 (handle->process (-> self voicebox)))
|
||||
(v1-9 (if (type? s5-0 process-drawable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-9 (as-type (handle->process (-> self voicebox)) process-drawable)))
|
||||
(script-eval gp-0 :vector (if v1-9
|
||||
(-> (the-as process-drawable v1-9) root trans)
|
||||
)
|
||||
|
||||
@@ -675,19 +675,9 @@
|
||||
(defmethod look-at! ((this joint-mod) (target vector) (mode symbol) (proc process))
|
||||
"Activate joint mod to look at the process."
|
||||
(when (= mode 'attacking)
|
||||
(let* ((s2-0 proc)
|
||||
(s1-0 (if (type? s2-0 process-drawable)
|
||||
(the-as process-drawable s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-0 (as-type proc process-drawable)))
|
||||
(when s1-0
|
||||
(let* ((s0-0 (-> s1-0 fact))
|
||||
(s2-1 (if (type? s0-0 fact-info-enemy)
|
||||
(the-as fact-info-enemy s0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (as-type (-> s1-0 fact) fact-info-enemy)))
|
||||
(when s2-1
|
||||
(when (< (vector-vector-distance (-> this process root trans) (-> s1-0 root trans)) (-> s2-1 cam-notice-dist))
|
||||
(set-time! (-> this notice-time))
|
||||
|
||||
@@ -85,12 +85,7 @@
|
||||
)
|
||||
|
||||
(defun camera-teleport-to-entity-named ((arg0 string))
|
||||
(let* ((gp-0 (entity-by-name arg0))
|
||||
(a0-3 (if (type? gp-0 entity-actor)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-3 (as-type (entity-by-name arg0) entity-actor)))
|
||||
(if a0-3
|
||||
(camera-teleport-to-entity (the-as entity-actor a0-3))
|
||||
(format #t "sorry, couldn't find an actor named '~S'~%" arg0)
|
||||
|
||||
@@ -494,13 +494,7 @@
|
||||
#f
|
||||
)
|
||||
((-> arg0 mode-name)
|
||||
(let ((s5-1 (-> arg0 mode-name value)))
|
||||
(set! (-> arg0 cam-mode) (the-as symbol (if (type? s5-1 state)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 cam-mode) (the-as symbol (as-type (-> arg0 mode-name value) state)))
|
||||
(set! (-> arg0 real-entity-name) #f)
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -2053,6 +2053,7 @@
|
||||
(set! sv-816 (-> (the-as (inline-array tracking-spline) (-> *camera* target-spline)) 0 point s2-2))
|
||||
(set! sv-832 arg0)
|
||||
(let ((a2-21 (camera-master-method-16 *camera* #t)))
|
||||
(set! f30-1 (s0-3 (-> sv-816 position) sv-832 (the-as pat-surface a2-21)))
|
||||
)
|
||||
)
|
||||
(< f30-1 0.0)
|
||||
|
||||
@@ -190,11 +190,7 @@
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(when (and (logtest? (-> self flags) (pov-camera-flag inherit-orientation)) arg4)
|
||||
(let ((v1-22 (if (type? arg4 process-drawable)
|
||||
arg4
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-22 (as-type arg4 process-drawable)))
|
||||
(quaternion-copy! (-> self root quat) (-> v1-22 root quat))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -789,12 +789,7 @@
|
||||
(set! (-> this surf) *gravel-surface*)
|
||||
)
|
||||
(((pat-event rail))
|
||||
(let* ((s4-0 (-> this process))
|
||||
(a0-15 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-15 (as-type (-> this process) process-focusable)))
|
||||
(if (and a0-15 (not (logtest? (focus-status rail) (-> (the-as process-focusable a0-15) focus-status))))
|
||||
(set! (-> this surf) *rail-surface*)
|
||||
)
|
||||
|
||||
@@ -92,11 +92,7 @@
|
||||
(while (begin (label cfg-104) (nonzero? s4-0))
|
||||
(+! s4-0 -1)
|
||||
(let* ((s0-0 (-> arg0 s4-0))
|
||||
(s2-0 (-> s0-0 process))
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
(s3-0 (as-type (-> s0-0 process) process-focusable))
|
||||
)
|
||||
(when s3-0
|
||||
(let ((s1-0 (get-search-info-flag (the-as process-focusable s3-0))))
|
||||
|
||||
@@ -60,21 +60,11 @@
|
||||
(-> this src-proc)
|
||||
(or arg0 (-> this dst-proc))
|
||||
)
|
||||
(let* ((s0-0 (handle->process (-> this src-proc)))
|
||||
(s1-0 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-0 (as-type (handle->process (-> this src-proc)) process-focusable)))
|
||||
(when s1-0
|
||||
(when (and (not arg0) (not arg1))
|
||||
(let ((s0-1 (handle->process (-> this dst-proc))))
|
||||
(set! arg0 (if (type? s0-1 process-focusable)
|
||||
(the-as process-focusable s0-1)
|
||||
)
|
||||
)
|
||||
(if (and (not arg0) (not arg1))
|
||||
(set! arg0 (as-type (handle->process (-> this dst-proc)) process-focusable))
|
||||
)
|
||||
)
|
||||
(when (or (the-as process arg0) arg1)
|
||||
(set! sv-592 (new 'stack-no-clear 'vector))
|
||||
(let ((v1-24 (-> (get-trans (the-as process-focusable s1-0) 10) quad)))
|
||||
|
||||
@@ -181,12 +181,7 @@
|
||||
(set! (-> this root root-prim local-sphere w) (* 2.5 (-> this root root-prim local-sphere w)))
|
||||
)
|
||||
(when (and arg2 (nonzero? (-> this draw)))
|
||||
(let* ((s5-0 (-> arg2 process))
|
||||
(v1-56 (if (type? s5-0 process-drawable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-56 (as-type (-> arg2 process) process-drawable)))
|
||||
(if v1-56
|
||||
(set! (-> this draw light-index) (-> (the-as process-drawable v1-56) draw light-index))
|
||||
)
|
||||
@@ -491,11 +486,7 @@
|
||||
:callback (lambda ((arg0 part-tracker))
|
||||
(let ((v1-1 (handle->process (-> arg0 userdata))))
|
||||
(when (the-as process v1-1)
|
||||
(let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle)))
|
||||
(a0-9 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(let* ((a0-9 (as-type (handle->process (-> (the-as collectable v1-1) pickup-handle)) process-focusable))
|
||||
(a2-0 (if (not a0-9)
|
||||
(-> arg0 root trans)
|
||||
(get-trans (the-as process-focusable a0-9) 3)
|
||||
@@ -524,11 +515,7 @@
|
||||
:callback (lambda ((arg0 part-tracker))
|
||||
(let ((v1-1 (handle->process (-> arg0 userdata))))
|
||||
(when (the-as process v1-1)
|
||||
(let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle)))
|
||||
(a0-9 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
(let* ((a0-9 (as-type (handle->process (-> (the-as collectable v1-1) pickup-handle)) process-focusable))
|
||||
(a2-0 (if (not a0-9)
|
||||
(-> arg0 root trans)
|
||||
(get-trans (the-as process-focusable a0-9) 3)
|
||||
@@ -569,18 +556,9 @@
|
||||
)
|
||||
|
||||
(defbehavior check-blue-suck eco ((arg0 process-drawable))
|
||||
(let ((v1-0 (if (type? arg0 process-drawable)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-0 (as-type arg0 process-drawable)))
|
||||
(when v1-0
|
||||
(let* ((gp-1 (-> v1-0 root))
|
||||
(v1-1 (if (type? gp-1 collide-shape)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-1 (as-type (-> v1-0 root) collide-shape)))
|
||||
(when v1-1
|
||||
(let ((a0-5 (-> self root root-prim prim-core))
|
||||
(a1-2 (-> (the-as collide-shape v1-1) root-prim prim-core))
|
||||
@@ -597,18 +575,9 @@
|
||||
)
|
||||
|
||||
(defbehavior add-blue-motion eco ((arg0 symbol) (arg1 symbol) (arg2 symbol) (arg3 symbol))
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(s1-0 (if (type? gp-0 process-drawable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-0 (the-as process-focusable (as-type (handle->process (-> self target)) process-drawable))))
|
||||
(when s1-0
|
||||
(let ((s4-0 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (as-type s1-0 process-focusable)))
|
||||
(when s4-0
|
||||
(let ((s1-1 (-> self root root-prim prim-core))
|
||||
(gp-1 (get-trans s4-0 3))
|
||||
|
||||
@@ -822,19 +822,9 @@
|
||||
:code (behavior ((arg0 handle))
|
||||
(set! (-> self target) arg0)
|
||||
(until #f
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(v1-3 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (as-type (handle->process (-> self target)) process-drawable)))
|
||||
(when v1-3
|
||||
(let* ((gp-1 (-> (the-as process-drawable v1-3) root))
|
||||
(v1-4 (if (type? gp-1 collide-shape)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (as-type (-> (the-as process-drawable v1-3) root) collide-shape)))
|
||||
(when v1-4
|
||||
(let* ((gp-2 (-> self root root-prim prim-core))
|
||||
(a1-3 (-> (the-as collide-shape v1-4) root-prim prim-core))
|
||||
|
||||
@@ -251,13 +251,7 @@
|
||||
(set! (-> self move-pos 0) (-> self move-pos 1))
|
||||
(cond
|
||||
((not (logtest? (-> arg3 param 0) 7))
|
||||
(let ((gp-0 (-> arg3 param 0)))
|
||||
(set! (-> self move-pos 1) (the-as float (if (type? gp-0 float)
|
||||
(the-as float gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self move-pos 1) (the-as float (as-type (-> arg3 param 0) float)))
|
||||
)
|
||||
(else
|
||||
(case (-> arg3 param 0)
|
||||
@@ -276,13 +270,7 @@
|
||||
(('jump-to)
|
||||
(cond
|
||||
((not (logtest? (-> arg3 param 0) 7))
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> self move-pos 1) (the-as float (if (type? gp-1 float)
|
||||
(the-as float gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self move-pos 1) (the-as float (as-type (-> arg3 param 0) float)))
|
||||
)
|
||||
(else
|
||||
(case (-> arg3 param 0)
|
||||
@@ -406,12 +394,7 @@
|
||||
)
|
||||
|
||||
(defmethod elevator-method-46 ((this elevator))
|
||||
(let* ((s5-0 *target*)
|
||||
(a0-2 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-2 (the-as target (as-type *target* process-focusable))))
|
||||
(and a0-2 (point-inside-shaft? this (get-trans a0-2 0) (-> this move-pos 0) (-> this move-pos 1)))
|
||||
)
|
||||
)
|
||||
@@ -923,12 +906,7 @@
|
||||
)
|
||||
(set! sv-32 (the-as float 0.0))
|
||||
(set! sv-36 (-> this path))
|
||||
(let ((s5-2 *target*))
|
||||
(set! sv-40 (if (type? s5-2 process-focusable)
|
||||
s5-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-40 (the-as target (as-type *target* process-focusable)))
|
||||
(if (not (and sv-40
|
||||
(logtest? (-> this params flags) (elevator-flags teleport))
|
||||
(find-closest-point-in-path! this (get-trans sv-40 0) (& sv-32) #f #t)
|
||||
|
||||
@@ -931,11 +931,12 @@
|
||||
(let* ((a0-11
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this enemy-info gem-joint)))
|
||||
)
|
||||
(s4-0 (ppointer->process (birth-pickup-at-point a0-11 (pickup-type gem) 1.0 #t *entity-pool* (-> this fact))))
|
||||
(s5-0 (if (type? s4-0 gem)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
(s5-0
|
||||
(as-type
|
||||
(ppointer->process (birth-pickup-at-point a0-11 (pickup-type gem) 1.0 #t *entity-pool* (-> this fact)))
|
||||
gem
|
||||
)
|
||||
)
|
||||
)
|
||||
(if s5-0
|
||||
(set! (-> (the-as gem s5-0) gem-pool) (the-as uint (get-gem-pool-idx this)))
|
||||
@@ -1515,24 +1516,12 @@
|
||||
)
|
||||
(vector-copy! s5-1 (-> v1-31 normal))
|
||||
(vector-copy! s4-0 (-> v1-31 intersect))
|
||||
(let ((v1-32 (and (-> v1-31 collide-ptr) (let ((s2-0 (-> v1-31 collide-ptr)))
|
||||
(if (type? s2-0 collide-shape-prim-sphere)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-32 (and (-> v1-31 collide-ptr) (as-type (-> v1-31 collide-ptr) collide-shape-prim-sphere))))
|
||||
(when v1-32
|
||||
(let ((s2-1 (-> (the-as collide-shape-prim-sphere v1-32) cshape process)))
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-copy! s1-0 (-> self root transv))
|
||||
(let* ((s0-0 s2-1)
|
||||
(v1-37 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-37 (as-type s2-1 process-focusable)))
|
||||
(when v1-37
|
||||
(when (focus-test? (the-as process-focusable v1-37) no-gravity)
|
||||
(vector-float*! s1-0 s1-0 0.5)
|
||||
|
||||
@@ -132,12 +132,7 @@
|
||||
)
|
||||
)
|
||||
(when arg1
|
||||
(let* ((s5-1 (-> self root))
|
||||
(a0-7 (if (type? s5-1 collide-shape)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-7 (as-type (-> self root) collide-shape)))
|
||||
(if a0-7
|
||||
(move-to-point! (the-as collide-shape a0-7) (-> (the-as process-drawable gp-0) root trans))
|
||||
(vector-copy! (-> self root trans) (-> (the-as process-drawable gp-0) root trans))
|
||||
@@ -152,12 +147,7 @@
|
||||
(if (or (zero? (-> self skel active-channels)) (not (-> self skel root-channel 0 frame-group)))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw-temp))
|
||||
)
|
||||
(let* ((gp-1 self)
|
||||
(v1-38 (if (type? gp-1 manipy)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-38 (as-type self manipy)))
|
||||
(if (and v1-38 (not (-> (the-as manipy v1-38) draw?)))
|
||||
(logior! (-> self draw status) (draw-control-status no-draw-temp))
|
||||
)
|
||||
@@ -279,12 +269,7 @@
|
||||
:code (behavior ((arg0 handle))
|
||||
(swingpole-method-22 self)
|
||||
(suspend)
|
||||
(while (let* ((s5-0 (handle->process arg0))
|
||||
(a0-7 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(while (let ((a0-7 (as-type (handle->process arg0) process-focusable)))
|
||||
(and a0-7 (focus-test? (the-as process-focusable a0-7) pole))
|
||||
)
|
||||
(swingpole-method-22 self)
|
||||
@@ -1142,25 +1127,8 @@
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod notify-parent-of-death ((this part-tracker))
|
||||
(with-pp
|
||||
(let ((gp-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> gp-0 from) (process->ppointer pp))
|
||||
(set! (-> gp-0 num-params) 1)
|
||||
(set! (-> gp-0 message) 'notify)
|
||||
(set! (-> gp-0 param 0) (the-as uint 'die))
|
||||
(let ((s5-0 send-event-function)
|
||||
(s4-0 (ppointer->process (-> this parent)))
|
||||
)
|
||||
(s5-0
|
||||
(if (type? s4-0 process)
|
||||
s4-0
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(send-event (as-type (ppointer->process (-> this parent)) process) 'notify 'die)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch process vs part-tracker-subsampler.
|
||||
@@ -1213,12 +1181,7 @@
|
||||
(if (-> self callback)
|
||||
((-> self callback) self)
|
||||
)
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(v1-15 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-15 (as-type (handle->process (-> self target)) process-drawable)))
|
||||
(cond
|
||||
((and v1-15
|
||||
(nonzero? (-> (the-as process-drawable v1-15) root))
|
||||
@@ -1251,12 +1214,7 @@
|
||||
(if (time-elapsed? (-> self state-time) (-> self linger-duration))
|
||||
(go-virtual die)
|
||||
)
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(v1-13 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-13 (as-type (handle->process (-> self target)) process-drawable)))
|
||||
(if (and v1-13
|
||||
(nonzero? (-> (the-as process-drawable v1-13) root))
|
||||
(nonzero? (-> (the-as process-drawable v1-13) node-list))
|
||||
@@ -1291,12 +1249,7 @@
|
||||
(if (-> self callback)
|
||||
((-> self callback) self)
|
||||
)
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(v1-15 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-15 (as-type (handle->process (-> self target)) process-drawable)))
|
||||
(cond
|
||||
((and v1-15
|
||||
(nonzero? (-> (the-as process-drawable v1-15) root))
|
||||
@@ -1495,43 +1448,18 @@
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod notify-parent-of-death ((this lightning-tracker))
|
||||
(with-pp
|
||||
(let ((gp-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> gp-0 from) (process->ppointer pp))
|
||||
(set! (-> gp-0 num-params) 1)
|
||||
(set! (-> gp-0 message) 'notify)
|
||||
(set! (-> gp-0 param 0) (the-as uint 'die))
|
||||
(let ((s5-0 send-event-function)
|
||||
(s4-0 (ppointer->process (-> this parent)))
|
||||
)
|
||||
(s5-0
|
||||
(if (type? s4-0 process)
|
||||
s4-0
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(send-event (as-type (ppointer->process (-> this parent)) process) 'notify 'die)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod update ((this lightning-tracker))
|
||||
(if (-> this callback)
|
||||
((-> this callback) this)
|
||||
)
|
||||
(let ((a0-6 (cond
|
||||
((>= (-> this target-joint0) 0)
|
||||
(let ((s5-0 (handle->process (-> this target0))))
|
||||
(if (type? s5-0 process-drawable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a0-6 (if (>= (-> this target-joint0) 0)
|
||||
(as-type (handle->process (-> this target0)) process-drawable)
|
||||
(the-as process #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
@@ -1567,18 +1495,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-22 (cond
|
||||
((>= (-> this target-joint1) 0)
|
||||
(let ((s5-3 (handle->process (-> this target1))))
|
||||
(if (type? s5-3 process-drawable)
|
||||
(the-as process-focusable s5-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a0-22 (if (>= (-> this target-joint1) 0)
|
||||
(the-as process-focusable (as-type (handle->process (-> this target1)) process-drawable))
|
||||
(the-as process-focusable #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
@@ -1657,12 +1577,7 @@
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(vector-copy! s5-1 (-> self offset1))
|
||||
(when (and (>= (-> self target-joint1) 0) (< (-> self target-joint1) 256))
|
||||
(let* ((s4-0 (handle->process (-> self target1)))
|
||||
(v1-28 (if (type? s4-0 process-drawable)
|
||||
(the-as process-drawable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-28 (as-type (handle->process (-> self target1)) process-drawable)))
|
||||
(if (and v1-28 (nonzero? (-> v1-28 root)))
|
||||
(vector-copy!
|
||||
s5-1
|
||||
@@ -1859,12 +1774,7 @@
|
||||
|
||||
;; WARN: Return type mismatch object vs symbol.
|
||||
(defbehavior process-release? process ((arg0 process))
|
||||
(let* ((gp-0 (command-get-process arg0 *target*))
|
||||
(a0-2 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-2 (as-type (command-get-process arg0 *target*) process-focusable)))
|
||||
(the-as symbol (if (and a0-2 (focus-test? (the-as process-focusable a0-2) grabbed))
|
||||
(send-event a0-2 'end-mode 'grab)
|
||||
#t
|
||||
@@ -2894,19 +2804,9 @@
|
||||
:code (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
(while ((-> self run-function))
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(a0-4 (if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-4 (as-type (handle->process (-> self target)) process-drawable)))
|
||||
(when a0-4
|
||||
(let* ((gp-1 (-> (the-as process-drawable a0-4) root))
|
||||
(a0-6 (if (type? gp-1 collide-shape)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-6 (as-type (-> (the-as process-drawable a0-4) root) collide-shape)))
|
||||
(if a0-6
|
||||
(vector-copy!
|
||||
(-> (the-as collide-shape (-> self root)) trans)
|
||||
@@ -3127,12 +3027,7 @@
|
||||
(-> s4-0 explosion-trans)
|
||||
(-> (the-as collide-shape (-> self root)) root-prim prim-core world-sphere)
|
||||
)
|
||||
(let* ((s2-0 proc)
|
||||
(s3-0 (if (type? s2-0 process-drawable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type proc process-drawable)))
|
||||
(when (and s3-0 (!= s3-0 (handle->process (-> self params ignore-proc))))
|
||||
(let ((v1-6 (find-closest-solid-sphere-prim
|
||||
(the-as collide-shape (-> (the-as process-drawable s3-0) root))
|
||||
@@ -3145,24 +3040,11 @@
|
||||
(v1-6
|
||||
(vector-copy! (-> s4-0 proc-trans) (-> v1-6 prim-core world-sphere))
|
||||
)
|
||||
((begin
|
||||
(let ((s2-2 proc))
|
||||
(set! a0-13 (if (type? s2-2 process-focusable)
|
||||
s2-2
|
||||
)
|
||||
)
|
||||
)
|
||||
a0-13
|
||||
)
|
||||
((begin (set! a0-13 (as-type proc process-focusable)) a0-13)
|
||||
(vector-copy! (-> s4-0 proc-trans) (get-trans (the-as process-focusable a0-13) 3))
|
||||
)
|
||||
(else
|
||||
(let* ((s2-4 (-> (the-as process-focusable s3-0) root))
|
||||
(v1-12 (if (type? s2-4 collide-shape)
|
||||
s2-4
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-12 (as-type (-> (the-as process-focusable s3-0) root) collide-shape)))
|
||||
(if v1-12
|
||||
(vector-copy! (-> s4-0 proc-trans) (-> v1-12 root-prim prim-core world-sphere))
|
||||
(vector-copy! (-> s4-0 proc-trans) (-> (the-as process-focusable s3-0) root trans))
|
||||
|
||||
@@ -682,12 +682,7 @@
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('touched)
|
||||
(let* ((s4-0 proc)
|
||||
(v1-1 (if (type? s4-0 process-drawable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-1 (the-as process-focusable (as-type proc process-drawable))))
|
||||
(when v1-1
|
||||
(let ((s4-1 (-> v1-1 root))
|
||||
(a1-3 (new 'stack 'collide-query))
|
||||
|
||||
@@ -220,12 +220,7 @@
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('touch 'attack 'bonk)
|
||||
(let* ((s5-0 proc)
|
||||
(a0-5 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-5 (as-type proc process-focusable)))
|
||||
(cond
|
||||
((and a0-5 (focus-test? (the-as process-focusable a0-5) edge-grab))
|
||||
(set! (-> self safe-time) (+ (current-time) (seconds 0.2)))
|
||||
@@ -237,11 +232,7 @@
|
||||
)
|
||||
)
|
||||
(vector-copy! (-> self hit-point) (-> self root trans))
|
||||
(let ((a0-13 (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-13 (as-type proc process-focusable)))
|
||||
(vector-copy! (-> self hit-point) (get-trans (the-as process-focusable a0-13) 0))
|
||||
)
|
||||
(if (zero? (-> self bounce-time))
|
||||
|
||||
@@ -129,12 +129,7 @@
|
||||
"Check for inactive processes and add them to the unused list."
|
||||
(local-vars (v1-10 symbol))
|
||||
(dotimes (i (-> this records length))
|
||||
(let* ((proc (handle->process (-> this records data i proc)))
|
||||
(pfoc (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((pfoc (as-type (handle->process (-> this records data i proc)) process-focusable)))
|
||||
(when (or (not pfoc) (focus-test? (the-as process-focusable pfoc) inactive))
|
||||
(dotimes (ii (-> this unused-list length))
|
||||
(when (= (-> this unused-list ii) i)
|
||||
|
||||
@@ -206,12 +206,7 @@
|
||||
(('ridden)
|
||||
(let ((v1-7 (the-as object (-> arg3 param 0))))
|
||||
(when (the-as uint v1-7)
|
||||
(let* ((s5-1 (handle->process (-> (the-as collide-rider v1-7) rider-handle)))
|
||||
(v1-11 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-11 (as-type (handle->process (-> (the-as collide-rider v1-7) rider-handle)) process-focusable)))
|
||||
(when (and v1-11
|
||||
(logtest? (-> v1-11 mask) (process-mask target))
|
||||
(not (logtest? (-> (the-as process-focusable v1-11) focus-status) (focus-status on-water under-water)))
|
||||
@@ -239,12 +234,7 @@
|
||||
(('bonk)
|
||||
(when (time-elapsed? (-> this player-bonk-timeout) (-> this info player-force-timeout))
|
||||
(set-time! (-> this player-bonk-timeout))
|
||||
(let* ((s4-0 arg0)
|
||||
(v1-31 (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-31 (as-type arg0 process-drawable)))
|
||||
(when v1-31
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-impulse-force))
|
||||
(vector-copy! (-> this player-force-position) (-> (the-as process-focusable v1-31) root trans))
|
||||
|
||||
@@ -208,12 +208,7 @@
|
||||
(if (= (-> this shield-type) (shield-type shield-type-0))
|
||||
(seek! (-> this heat-info current-heat-value) 0.0 (* 0.2 (seconds-per-frame)))
|
||||
)
|
||||
(let* ((s4-0 (handle->process (-> this owner)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this owner)) process-focusable)))
|
||||
(cond
|
||||
(s5-0
|
||||
(if (!= (-> this track-joint) -1)
|
||||
@@ -250,12 +245,7 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
(let* ((s4-0 (handle->process (-> this owner)))
|
||||
(a0-9 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-9 (as-type (handle->process (-> this owner)) process-focusable)))
|
||||
(cond
|
||||
(arg0
|
||||
(logior! (-> this draw status) (draw-control-status no-draw))
|
||||
@@ -534,13 +524,9 @@
|
||||
)
|
||||
|
||||
(defmethod shield-touch-handler ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block))
|
||||
(let* ((s5-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (-> arg1 param 0))
|
||||
(s3-0 (as-type arg0 process-focusable))
|
||||
)
|
||||
(when (and s5-0 s3-0)
|
||||
(cond
|
||||
((and (and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
|
||||
|
||||
@@ -198,19 +198,9 @@
|
||||
(when (-> self show-particles)
|
||||
(when (nonzero? (-> self collect-effect))
|
||||
(when (time-elapsed? (-> self collect-effect-time) (seconds 1))
|
||||
(let* ((s5-0 (handle->process arg0))
|
||||
(gp-0 (if (type? s5-0 process-drawable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (as-type (handle->process arg0) process-drawable)))
|
||||
(when gp-0
|
||||
(let* ((s5-1 (-> (the-as process-focusable gp-0) root))
|
||||
(v1-9 (if (type? s5-1 collide-shape)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-9 (as-type (-> (the-as process-focusable gp-0) root) collide-shape)))
|
||||
(when v1-9
|
||||
(cond
|
||||
((logtest? (-> self collect-effect flags) (sp-group-flag sp13))
|
||||
|
||||
@@ -223,12 +223,7 @@
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self start-time) (-> *display* game-clock frame-counter))
|
||||
(let* ((gp-0 (ppointer->process (-> self parent 0 parent)))
|
||||
(a1-1 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-1 (as-type (ppointer->process (-> self parent 0 parent)) process-focusable)))
|
||||
(if a1-1
|
||||
(focus-on! (-> self focus) (the-as process-focusable a1-1))
|
||||
)
|
||||
@@ -243,12 +238,7 @@
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let* ((gp-0 (ppointer->process (-> self parent 0 parent)))
|
||||
(a0-1 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-1 (as-type (ppointer->process (-> self parent 0 parent)) process-focusable)))
|
||||
(if (and a0-1 (focus-test? (the-as process-focusable a0-1) pilot))
|
||||
(send-event
|
||||
(ppointer->process (-> self parent))
|
||||
@@ -465,10 +455,7 @@
|
||||
:to proc
|
||||
)
|
||||
)
|
||||
(s5-2 (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
(s5-2 (as-type proc process-focusable))
|
||||
)
|
||||
(when s4-0
|
||||
(change-parent self (ppointer->process s4-0))
|
||||
|
||||
@@ -568,12 +568,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-58 gp-0))
|
||||
(set! (-> v1-58 width) (the float 340))
|
||||
)
|
||||
(let ((v1-59 gp-0))
|
||||
(set! (-> v1-59 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 340)
|
||||
(set-height! gp-0 80)
|
||||
(let ((v1-60 gp-0)
|
||||
(a0-25 (-> *setting-control* user-default language))
|
||||
)
|
||||
|
||||
@@ -161,13 +161,9 @@
|
||||
v0-1
|
||||
)
|
||||
(('water)
|
||||
(let* ((s5-0 (the-as object (-> arg3 param 0)))
|
||||
(s4-0 (-> arg3 param 1))
|
||||
(gp-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (the-as object (-> arg3 param 0)))
|
||||
(gp-0 (as-type (-> arg3 param 1) process-focusable))
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (water-flag deadly))
|
||||
(logtest? (water-flag touch-water) (-> (the-as water-info s5-0) flags))
|
||||
(the-as uint gp-0)
|
||||
|
||||
@@ -415,11 +415,7 @@
|
||||
(.mov a0-10 vf3)
|
||||
(let ((s4-0 (-> v1-23 process)))
|
||||
(b! (< f0-2 a0-10) cfg-30)
|
||||
(let ((a1-29 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-29 (as-type s4-0 process-focusable)))
|
||||
(if (and a1-29 (not (logtest? (focus-status board) (-> (the-as process-focusable a1-29) focus-status))))
|
||||
(push-process this (the-as process-focusable a1-29))
|
||||
)
|
||||
@@ -570,13 +566,9 @@
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('water-info)
|
||||
(let* ((gp-0 (-> block param 0))
|
||||
(s5-0 proc)
|
||||
(a0-2 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (-> block param 0))
|
||||
(a0-2 (as-type proc process-focusable))
|
||||
)
|
||||
(if (and a0-2 (focus-test? (the-as process-focusable a0-2) board))
|
||||
#f
|
||||
(flow-control-method-13 (-> self flow) (the-as water-info gp-0) (the-as vector (+ gp-0 0)))
|
||||
@@ -584,13 +576,9 @@
|
||||
)
|
||||
)
|
||||
(('touch-water)
|
||||
(let* ((gp-1 (-> self flow))
|
||||
(s5-1 proc)
|
||||
(a1-8 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (-> self flow))
|
||||
(a1-8 (as-type proc process-focusable))
|
||||
)
|
||||
(if (and (nonzero? gp-1) (and a1-8 (!= (-> a1-8 type) target) (< 0.0 (-> gp-1 speed))))
|
||||
(push-process gp-1 (the-as process-focusable a1-8))
|
||||
)
|
||||
|
||||
@@ -397,11 +397,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s3-2 (-> this process control))
|
||||
(v1-167 (if (type? s3-2 control-info)
|
||||
s3-2
|
||||
)
|
||||
)
|
||||
(let* ((v1-167 (as-type (-> this process control) control-info))
|
||||
(v1-168 (and v1-167 (not (time-elapsed? (-> v1-167 last-time-on-surface) (seconds 0.5)))))
|
||||
)
|
||||
(if (and (logtest? (-> this flags) (water-flag swim-ground))
|
||||
@@ -942,12 +938,7 @@
|
||||
(logior! (-> arg0 flags) (water-flag mud))
|
||||
)
|
||||
((= v1-56 'mech)
|
||||
(let* ((s0-2 arg4)
|
||||
(a0-50 (if (type? s0-2 process-focusable)
|
||||
s0-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-50 (as-type arg4 process-focusable)))
|
||||
(when (and a0-50 (not (logtest? (focus-status mech) (-> (the-as process-focusable a0-50) focus-status))))
|
||||
(set! (-> arg0 flags) (water-flag))
|
||||
0
|
||||
|
||||
@@ -883,15 +883,9 @@
|
||||
(set! *external-cam-mode* #f)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 *collision-edit-info*)
|
||||
(s5-0 (method-of-type collision-edit-info draw-menu))
|
||||
(s4-0 (handle->process (-> self proc)))
|
||||
)
|
||||
(s5-0 gp-0 (the-as process-drawable (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(draw-menu
|
||||
*collision-edit-info*
|
||||
(the-as process-drawable (as-type (handle->process (-> self proc)) process-drawable))
|
||||
)
|
||||
)
|
||||
:code sleep-code
|
||||
|
||||
@@ -867,13 +867,7 @@
|
||||
(draw-string "..." s1-0 s5-0)
|
||||
(set! arg4 (and (zero? arg3) arg4))
|
||||
(when arg4
|
||||
(let ((v1-18 s5-0)
|
||||
(a1-7 20)
|
||||
(a0-10 379)
|
||||
)
|
||||
(set! (-> v1-18 origin x) (the float a1-7))
|
||||
(set! (-> v1-18 origin y) (the float a0-10))
|
||||
)
|
||||
(set-origin! s5-0 20 379)
|
||||
(draw-string-adv (-> arg0 name) s1-0 s5-0)
|
||||
(draw-string-adv ":" s1-0 s5-0)
|
||||
(draw-string (-> arg0 display-str) s1-0 s5-0)
|
||||
@@ -959,13 +953,7 @@
|
||||
(font-color menu)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (-> arg0 context font))
|
||||
(a1-5 s3-1)
|
||||
(a0-15 s2-1)
|
||||
)
|
||||
(set! (-> v1-20 origin x) (the float a1-5))
|
||||
(set! (-> v1-20 origin y) (the float a0-15))
|
||||
)
|
||||
(set-origin! (-> arg0 context font) s3-1 s2-1)
|
||||
(set! sv-16 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(set! sv-32 (-> sv-16 base))
|
||||
(set-context! *font-work* (-> arg0 context font))
|
||||
|
||||
@@ -786,12 +786,7 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun-debug teleport-camera-by-name ((arg0 string))
|
||||
"Move camera to entity by name"
|
||||
(let* ((gp-0 (entity-by-name arg0))
|
||||
(v1-0 (if (type? gp-0 entity-actor)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-0 (as-type (entity-by-name arg0) entity-actor)))
|
||||
(if (and v1-0 *camera*)
|
||||
(send-event *camera* 'teleport-to-vector-start-string (-> v1-0 trans))
|
||||
)
|
||||
|
||||
@@ -299,12 +299,12 @@
|
||||
(gp-0 (the-as nav-mesh #f))
|
||||
)
|
||||
(when v1-1
|
||||
(let* ((s5-1 (entity-nav-mesh-by-aid (the-as actor-id (-> (the-as (pointer uint32) (&+ v1-1 (* arg2 4)))))))
|
||||
(v1-3 (if (type? s5-1 entity-nav-mesh)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (as-type
|
||||
(entity-nav-mesh-by-aid (the-as actor-id (-> (the-as (pointer uint32) (&+ v1-1 (* arg2 4))))))
|
||||
entity-nav-mesh
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-3
|
||||
(set! gp-0 (-> v1-3 nav-mesh))
|
||||
)
|
||||
@@ -423,12 +423,7 @@
|
||||
)
|
||||
|
||||
(defun-debug process-status-bits ((arg0 process) (arg1 symbol))
|
||||
(let* ((s5-0 arg0)
|
||||
(s3-0 (if (type? s5-0 process-drawable)
|
||||
(the-as process-drawable s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type arg0 process-drawable)))
|
||||
(if (and s3-0 (zero? (-> s3-0 draw)))
|
||||
(set! s3-0 (the-as process-drawable #f))
|
||||
)
|
||||
@@ -589,12 +584,7 @@
|
||||
(-> this extra trans z)
|
||||
)
|
||||
)
|
||||
(let* ((s3-2 (-> this extra process))
|
||||
(s4-2 (if (type? s3-2 process-drawable)
|
||||
s3-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-2 (as-type (-> this extra process) process-drawable)))
|
||||
(format
|
||||
#t
|
||||
":pr #x~8X ~-18S ~-5S/~-5S "
|
||||
@@ -787,29 +777,13 @@
|
||||
(set! sv-16 (res-lump-data s2-0 'visvol (inline-array vector)))
|
||||
(set! sv-20 (-> sv-16 0))
|
||||
(set! sv-24 (-> sv-16 1))
|
||||
(let ((s2-1 (-> s2-0 extra process)))
|
||||
(set! sv-28 (if (type? s2-1 process-drawable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-28 (as-type (-> s2-0 extra process) process-drawable))
|
||||
)
|
||||
(when sv-28
|
||||
(update-actor-vis-box (the-as process-drawable sv-28) sv-20 sv-24)
|
||||
(let ((s2-2 (-> sv-28 child)))
|
||||
(while s2-2
|
||||
(let ((s1-0 update-actor-vis-box)
|
||||
(s0-0 (-> s2-2 0))
|
||||
)
|
||||
(s1-0
|
||||
(the-as process-drawable (if (type? s0-0 process-drawable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
sv-20
|
||||
sv-24
|
||||
)
|
||||
)
|
||||
(update-actor-vis-box (the-as process-drawable (as-type (-> s2-2 0) process-drawable)) sv-20 sv-24)
|
||||
(set! s2-2 (-> s2-2 0 brother))
|
||||
)
|
||||
)
|
||||
@@ -1247,12 +1221,7 @@
|
||||
(let ((v1-7 (handle->process (-> s4-0 handle))))
|
||||
(when (not v1-7)
|
||||
(when (-> s4-0 name)
|
||||
(let ((s3-0 (process-by-name (-> s4-0 name) *active-pool*)))
|
||||
(set! v1-7 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-7 (as-type (process-by-name (-> s4-0 name) *active-pool*) process-drawable))
|
||||
(set! (-> s4-0 handle) (process->handle v1-7))
|
||||
)
|
||||
)
|
||||
@@ -1372,12 +1341,7 @@
|
||||
)
|
||||
(cond
|
||||
(*debug-actor*
|
||||
(let* ((s4-3 *debug-actor*)
|
||||
(s5-4 (if (type? s4-3 process-drawable)
|
||||
(the-as process-drawable s4-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-4 (as-type *debug-actor* process-drawable)))
|
||||
(when s5-4
|
||||
(if (nonzero? (-> s5-4 skel))
|
||||
(debug-print-channels (-> s5-4 skel) (the-as symbol *stdcon*))
|
||||
@@ -1817,12 +1781,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((s3-0 arg0)
|
||||
(v1-55 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-55 (as-type arg0 process-drawable)))
|
||||
(when v1-55
|
||||
(cond
|
||||
((and (nonzero? (-> (the-as process-drawable v1-55) part))
|
||||
|
||||
@@ -104,12 +104,7 @@
|
||||
((25)
|
||||
(logior! (-> arg0 mask) (sound-mask reg0))
|
||||
(set! (-> arg0 reg 0) (the-as uint (-> *footstep-surface* material)))
|
||||
(let* ((s2-3 arg3)
|
||||
(v1-33 (if (type? s2-3 process-focusable)
|
||||
s2-3
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-33 (as-type arg3 process-focusable)))
|
||||
(when v1-33
|
||||
(cond
|
||||
((focus-test? v1-33 in-air)
|
||||
@@ -119,12 +114,7 @@
|
||||
(set! (-> arg0 reg 0) (the-as uint 127))
|
||||
)
|
||||
(else
|
||||
(let* ((s2-4 (-> v1-33 root))
|
||||
(v1-34 (if (type? s2-4 collide-shape-moving)
|
||||
s2-4
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-34 (as-type (-> v1-33 root) collide-shape-moving)))
|
||||
(if v1-34
|
||||
(set! (-> arg0 reg 0) (the-as uint (-> (the-as collide-shape-moving v1-34) ground-pat material)))
|
||||
)
|
||||
@@ -172,13 +162,13 @@
|
||||
(set! (-> this res) (-> s5-0 extra))
|
||||
(let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo)))
|
||||
(set! (-> this name) (if (>= (the-as int v1-6) 0)
|
||||
(&-> (-> s5-0 extra tag) v1-6)
|
||||
(&-> s5-0 extra tag v1-6)
|
||||
(the-as (pointer res-tag) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0))
|
||||
(set! (-> this name) (&-> (-> this name) 1))
|
||||
(set! (-> this name) (&-> this name 1))
|
||||
)
|
||||
(play-effects-from-res-lump this f30-0 f30-0 f30-0)
|
||||
)
|
||||
@@ -361,11 +351,7 @@
|
||||
(= (-> s3-0 data 5) 116)
|
||||
(= (-> s3-0 data 6) 45)
|
||||
)
|
||||
(let* ((s2-0 (-> this process root))
|
||||
(v1-38 (if (type? s2-0 collide-shape-moving)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
(let* ((v1-38 (as-type (-> this process root) collide-shape-moving))
|
||||
(t1-2 (if v1-38
|
||||
(-> (the-as collide-shape-moving v1-38) ground-pat)
|
||||
*footstep-surface*
|
||||
|
||||
@@ -2259,12 +2259,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-5 gp-0))
|
||||
(set! (-> v1-5 width) (the float 440))
|
||||
)
|
||||
(let ((v1-6 gp-0))
|
||||
(set! (-> v1-6 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 440)
|
||||
(set-height! gp-0 80)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning))
|
||||
(format (clear *temp-string*) "~S / ~S ~D~%" (-> self mode) (-> self state name) (-> self which))
|
||||
(print-game-text *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
@@ -2275,15 +2271,9 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 20 80 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-17 gp-1))
|
||||
(set! (-> v1-17 scale) 0.8)
|
||||
)
|
||||
(let ((v1-18 gp-1))
|
||||
(set! (-> v1-18 width) (the float 432))
|
||||
)
|
||||
(let ((v1-19 gp-1))
|
||||
(set! (-> v1-19 height) (the float 20))
|
||||
)
|
||||
(set-scale! gp-1 0.8)
|
||||
(set-width! gp-1 432)
|
||||
(set-height! gp-1 20)
|
||||
(set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large))
|
||||
(when (and (>= 1 (-> *game-info* auto-save-count))
|
||||
(and (-> self next-state) (= (-> self next-state name) 'save))
|
||||
@@ -2316,12 +2306,8 @@
|
||||
)
|
||||
(set! (-> gp-1 origin x) 20.0)
|
||||
(set! (-> gp-1 origin y) 130.0)
|
||||
(let ((v1-37 gp-1))
|
||||
(set! (-> v1-37 scale) 0.7)
|
||||
)
|
||||
(let ((v1-38 gp-1))
|
||||
(set! (-> v1-38 height) (the float 200))
|
||||
)
|
||||
(set-scale! gp-1 0.7)
|
||||
(set-height! gp-1 200)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1)
|
||||
(s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
|
||||
@@ -1975,12 +1975,7 @@
|
||||
(set! (-> s5-1 use-mouse-tumble-point) (-> s4-1 use-mouse-tumble-point))
|
||||
(vector-copy! (-> s5-1 mouse-tumble-point) (-> s4-1 mouse-tumble-point))
|
||||
(set! (-> s5-1 handle-of-interest) (-> s4-1 handle-of-interest))
|
||||
(let* ((s3-11 (handle->process (-> s5-1 handle-of-interest)))
|
||||
(a0-159 (if (type? s3-11 process-focusable)
|
||||
s3-11
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-159 (as-type (handle->process (-> s5-1 handle-of-interest)) process-focusable)))
|
||||
(when a0-159
|
||||
(set! (-> s5-1 use-point-of-interest) #t)
|
||||
(vector-copy! (-> s5-1 point-of-interest) (get-trans (the-as process-focusable a0-159) 4))
|
||||
|
||||
@@ -204,13 +204,9 @@
|
||||
)
|
||||
(-> (the-as pair (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) car)
|
||||
(-> (the-as pair (-> (the-as pair (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) cdr)) car)
|
||||
(let* ((s3-0 (-> (the-as symbol v1-0) value))
|
||||
(v1-1 (if (type? s3-0 level-load-info)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(a0-11 (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr))
|
||||
)
|
||||
(let ((v1-1 (as-type (-> (the-as symbol v1-0) value) level-load-info))
|
||||
(a0-11 (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr))
|
||||
)
|
||||
(when (and v1-1 (-> (the-as level-load-info v1-1) borrow))
|
||||
(case s5-0
|
||||
(('alias)
|
||||
@@ -2268,15 +2264,9 @@
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 origin x) 120.0)
|
||||
(let ((v1-7 gp-0))
|
||||
(set! (-> v1-7 scale) 0.7)
|
||||
)
|
||||
(let ((v1-8 gp-0))
|
||||
(set! (-> v1-8 width) (the float 300))
|
||||
)
|
||||
(let ((v1-9 gp-0))
|
||||
(set! (-> v1-9 height) (the float 35))
|
||||
)
|
||||
(set-scale! gp-0 0.7)
|
||||
(set-width! gp-0 300)
|
||||
(set-height! gp-0 35)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning middle middle-vert large))
|
||||
(let ((s4-0 (if (logtest? (-> this params flags) (resetter-flag text-message))
|
||||
(the-as int (-> this params text-message))
|
||||
@@ -2292,16 +2282,12 @@
|
||||
)
|
||||
)
|
||||
(when (= (-> this params message) (resetter-message mission-fail-or-retry))
|
||||
(let ((v1-17 gp-0))
|
||||
(set! (-> v1-17 height) (the float 95))
|
||||
)
|
||||
(set-height! gp-0 95)
|
||||
(let ((s5-1 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id text-008b) #f) 1)
|
||||
(s5-1 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
)
|
||||
(let ((v1-19 gp-0))
|
||||
(set! (-> v1-19 height) (the float 155))
|
||||
)
|
||||
(set-height! gp-0 155)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0081) #f) 1)
|
||||
(s5-2 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
|
||||
@@ -231,12 +231,8 @@
|
||||
(let ((v1-6 v0-0))
|
||||
(set! (-> v1-6 origin w) 1.0)
|
||||
)
|
||||
(let ((v1-7 v0-0))
|
||||
(set! (-> v1-7 width) (the float 512))
|
||||
)
|
||||
(let ((v1-8 v0-0))
|
||||
(set! (-> v1-8 height) (the float 416))
|
||||
)
|
||||
(set-width! v0-0 512)
|
||||
(set-height! v0-0 416)
|
||||
(let ((v1-9 v0-0))
|
||||
(set! (-> v1-9 projection) 1.0)
|
||||
)
|
||||
@@ -245,9 +241,7 @@
|
||||
(let ((a0-6 v0-0))
|
||||
(set! (-> a0-6 start-line) (the-as uint 0))
|
||||
)
|
||||
(let ((v1-13 v0-0))
|
||||
(set! (-> v1-13 scale) 1.0)
|
||||
)
|
||||
(set-scale! v0-0 1.0)
|
||||
(let ((v1-14 v0-0))
|
||||
(set! (-> v1-14 alpha) 1.0)
|
||||
)
|
||||
|
||||
@@ -364,12 +364,7 @@
|
||||
(dotimes (s4-0 (-> s5-0 art-group-array length))
|
||||
(let ((s3-0 (-> s5-0 art-group-array s4-0)))
|
||||
(dotimes (s2-0 (-> s3-0 length))
|
||||
(let* ((s1-0 (-> s3-0 data s2-0))
|
||||
(a0-3 (if (type? s1-0 merc-ctrl)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-3 (as-type (-> s3-0 data s2-0) merc-ctrl)))
|
||||
(if a0-3
|
||||
(merc-stats-display (the-as merc-ctrl a0-3))
|
||||
)
|
||||
@@ -391,12 +386,7 @@
|
||||
(dotimes (s4-0 (-> s5-0 art-group-array length))
|
||||
(let ((s3-0 (-> s5-0 art-group-array s4-0)))
|
||||
(dotimes (s2-0 (-> s3-0 length))
|
||||
(let* ((s1-0 (-> s3-0 data s2-0))
|
||||
(v1-9 (if (type? s1-0 merc-ctrl)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-9 (as-type (-> s3-0 data s2-0) merc-ctrl)))
|
||||
(if v1-9
|
||||
(format #t "~30s: ~f~%" (-> v1-9 name) (-> (the-as merc-ctrl v1-9) header longest-edge))
|
||||
)
|
||||
|
||||
@@ -793,11 +793,7 @@
|
||||
)
|
||||
|
||||
(defmethod get-tracked-object-pos ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector))
|
||||
(let ((a0-2 (if (type? arg0 process-focusable)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-2 (as-type arg0 process-focusable)))
|
||||
(if a0-2
|
||||
(vector-copy! arg1 (get-trans a0-2 0))
|
||||
)
|
||||
@@ -810,11 +806,7 @@
|
||||
)
|
||||
|
||||
(defmethod get-tracked-object-pos ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector))
|
||||
(let ((a0-2 (if (type? arg0 process-focusable)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-2 (as-type arg0 process-focusable)))
|
||||
(when a0-2
|
||||
(let ((s5-1 (-> a0-2 water)))
|
||||
(when (and s5-1 a0-2 (nonzero? s5-1))
|
||||
@@ -841,11 +833,7 @@
|
||||
)
|
||||
|
||||
(defmethod should-end? ((this light-trail-tracker-water) (arg0 process-focusable))
|
||||
(let ((v1-0 (if (type? arg0 process-focusable)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-0 (as-type arg0 process-focusable)))
|
||||
(or (not v1-0)
|
||||
(not (-> v1-0 water))
|
||||
(not (logtest? (water-flag touch-water) (-> v1-0 water flags)))
|
||||
|
||||
@@ -221,13 +221,9 @@
|
||||
(defmethod link-art-to-master ((this art-group))
|
||||
(when this
|
||||
(countdown (s5-0 (-> this length))
|
||||
(let* ((s3-0 (-> this data s5-0))
|
||||
(s4-0 (if (type? s3-0 art-element)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s2-0 #f)
|
||||
)
|
||||
(let ((s4-0 (as-type (-> this data s5-0) art-element))
|
||||
(s2-0 #f)
|
||||
)
|
||||
(when s4-0
|
||||
(let ((s3-1 11))
|
||||
(while (begin (label cfg-24) (nonzero? s3-1))
|
||||
@@ -273,13 +269,9 @@
|
||||
(defmethod unlink-art-to-master ((this art-group))
|
||||
(when this
|
||||
(countdown (s5-0 (-> this length))
|
||||
(let* ((s3-0 (-> this data s5-0))
|
||||
(s4-0 (if (type? s3-0 art-element)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s3-1 #f)
|
||||
)
|
||||
(let ((s4-0 (as-type (-> this data s5-0) art-element))
|
||||
(s3-1 #f)
|
||||
)
|
||||
(when s4-0
|
||||
(let ((s2-0 11))
|
||||
(while (begin (label cfg-13) (nonzero? s2-0))
|
||||
@@ -2046,12 +2038,7 @@
|
||||
)
|
||||
)
|
||||
(when (= arg5 -99.0)
|
||||
(let ((s2-1 arg0))
|
||||
(set! sv-28 (if (type? s2-1 process-drawable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-28 (as-type arg0 process-drawable))
|
||||
(set! arg5 (if sv-28
|
||||
(vector-vector-distance (target-pos 0) (-> (the-as process-drawable sv-28) root trans))
|
||||
-1.0
|
||||
@@ -2083,12 +2070,7 @@
|
||||
(((gui-action queue) (gui-action play) (gui-action playing) (gui-action fade))
|
||||
(let ((f30-0 (-> arg0 priority)))
|
||||
(when (= f30-0 -99.0)
|
||||
(let* ((s2-0 (get-process arg0))
|
||||
(v1-10 (if (type? s2-0 process-drawable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (as-type (get-process arg0) process-drawable)))
|
||||
(set! f30-0 (cond
|
||||
((= (-> arg0 id) (-> this ids (-> arg0 channel)))
|
||||
-1.0
|
||||
@@ -2168,12 +2150,7 @@
|
||||
(set! (-> gp-0 id) (-> arg0 id))
|
||||
(set! (-> gp-0 params mask) (the-as uint 0))
|
||||
(when (logtest? (-> arg0 flags) (gui-connection-flags gcf1))
|
||||
(let* ((s4-0 (get-process arg0))
|
||||
(v1-8 (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-8 (as-type (get-process arg0) process-drawable)))
|
||||
(when (and v1-8 (nonzero? (-> (the-as process-drawable v1-8) root)))
|
||||
(let ((a1-3 (-> (the-as process-drawable v1-8) root trans)))
|
||||
(let ((s4-1 pp))
|
||||
|
||||
@@ -671,12 +671,7 @@
|
||||
|
||||
(defmethod link-to-other-mesh ((this nav-mesh) (arg0 nav-mesh-link))
|
||||
(when (not (-> arg0 dest-mesh))
|
||||
(let* ((s4-0 (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id))))
|
||||
(v1-1 (if (type? s4-0 entity-nav-mesh)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-1 (as-type (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id))) entity-nav-mesh)))
|
||||
(when v1-1
|
||||
(let ((a0-3 (-> v1-1 nav-mesh))
|
||||
(v1-2 (the-as nav-mesh-link #f))
|
||||
@@ -1838,12 +1833,7 @@
|
||||
|
||||
(defun get-nav-mesh ((arg0 actor-id))
|
||||
(let ((gp-0 (the-as nav-mesh #f)))
|
||||
(let* ((s5-0 (entity-nav-mesh-by-aid arg0))
|
||||
(v1-0 (if (type? s5-0 entity-nav-mesh)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-0 (as-type (entity-nav-mesh-by-aid arg0) entity-nav-mesh)))
|
||||
(if v1-0
|
||||
(set! gp-0 (-> v1-0 nav-mesh))
|
||||
)
|
||||
|
||||
@@ -134,11 +134,7 @@
|
||||
)
|
||||
(dotimes (s3-1 (-> this particles length))
|
||||
(set! (-> this particles data s3-1 pos w) 1.0)
|
||||
(vector-matrix*!
|
||||
(the-as vector (-> this particles data s3-1))
|
||||
(the-as vector (-> this particles data s3-1))
|
||||
s4-1
|
||||
)
|
||||
(vector-matrix*! (-> this particles data s3-1 pos) (-> this particles data s3-1 pos) s4-1)
|
||||
(set! (-> this particles data s3-1 pos w) 1.0)
|
||||
(set! (-> this particles data s3-1 prev-pos w) 1.0)
|
||||
(vector-matrix*!
|
||||
@@ -703,12 +699,7 @@
|
||||
(logclear! (-> this flags) (cloth-flag no-draw))
|
||||
)
|
||||
(when (and (handle->process (-> this owner)) (= (-> (handle->process (-> this owner)) type) target))
|
||||
(let* ((s5-0 (handle->process (-> this owner)))
|
||||
(a0-16 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-16 (as-type (handle->process (-> this owner)) process-focusable)))
|
||||
(when (and a0-16 (focus-test? (the-as process-focusable a0-16) teleporting))
|
||||
(set! (-> this reset-count) 1)
|
||||
(logior! (-> this flags) (cloth-flag need-reset no-draw))
|
||||
|
||||
@@ -603,12 +603,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((s3-0 (-> s5-0 proc2))
|
||||
(a0-46 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-46 (as-type (-> s5-0 proc2) process-focusable)))
|
||||
(if a0-46
|
||||
(set! (-> s5-0 denom2) (get-inv-mass a0-46))
|
||||
)
|
||||
@@ -1265,11 +1260,7 @@
|
||||
(format *stdcon* "rigid-body-object got touched~%")
|
||||
)
|
||||
(when (zero? (-> (the-as process-focusable arg0) rbody))
|
||||
(let ((s3-0 (if (type? arg0 process-focusable)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type arg0 process-focusable)))
|
||||
(when s3-0
|
||||
(when (logtest? (-> s3-0 mask) (process-mask target))
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-touching))
|
||||
@@ -1302,11 +1293,7 @@
|
||||
(('edge-grabbed 'pilot-edge-grab)
|
||||
(let ((s5-2 (the-as object (-> arg3 param 0))))
|
||||
(when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)))
|
||||
(let ((a0-25 (if (type? arg0 process-focusable)
|
||||
(the-as process-focusable arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-25 (as-type arg0 process-focusable)))
|
||||
(when a0-25
|
||||
(let ((f0-1 (/ 163840.0 (get-inv-mass a0-25))))
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-touching player-edge-grabbing player-contact-force))
|
||||
@@ -1323,12 +1310,7 @@
|
||||
(('ridden)
|
||||
(let ((v1-47 (the-as object (-> arg3 param 0))))
|
||||
(when (the-as uint v1-47)
|
||||
(let* ((s5-3 (handle->process (-> (the-as focus v1-47) handle)))
|
||||
(a0-34 (if (type? s5-3 process-focusable)
|
||||
s5-3
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-34 (as-type (handle->process (-> (the-as focus v1-47) handle)) process-focusable)))
|
||||
(when (and a0-34
|
||||
(logtest? (-> a0-34 mask) (process-mask target))
|
||||
(not (logtest? (-> (the-as process-focusable a0-34) focus-status) (focus-status on-water under-water)))
|
||||
@@ -1350,12 +1332,7 @@
|
||||
)
|
||||
(('bonk)
|
||||
(when #t
|
||||
(let* ((s3-2 arg0)
|
||||
(s4-1 (if (type? s3-2 process-focusable)
|
||||
s3-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (as-type arg0 process-focusable)))
|
||||
(when s4-1
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-touching player-impulse-force))
|
||||
(set-time! (-> this player-touch-time))
|
||||
|
||||
@@ -176,13 +176,9 @@
|
||||
)
|
||||
(let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* arg0)))
|
||||
(when (and arg1 (>= f30-0 0.0) (>= 0.0 (vector-dot (-> arg0 best-other-tri normal) (-> this dir))))
|
||||
(let* ((s3-0 (new 'stack-no-clear 'touching-shapes-entry))
|
||||
(s2-0 (-> arg0 best-other-tri collide-ptr))
|
||||
(v1-12 (if (type? s2-0 collide-shape-prim)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (new 'stack-no-clear 'touching-shapes-entry))
|
||||
(v1-12 (as-type (-> arg0 best-other-tri collide-ptr) collide-shape-prim))
|
||||
)
|
||||
(set! (-> s3-0 cshape1) #f)
|
||||
(set! (-> s3-0 cshape2) (if v1-12
|
||||
(-> (the-as collide-shape-prim v1-12) cshape)
|
||||
@@ -243,51 +239,42 @@
|
||||
|
||||
;; WARN: Return type mismatch process vs process-focusable.
|
||||
(defmethod combo-tracker-method-13 ((this combo-tracker) (arg0 handle) (arg1 vector) (arg2 float) (arg3 vector) (arg4 float))
|
||||
(the-as
|
||||
process-focusable
|
||||
(cond
|
||||
((send-event (handle->process arg0) 'combo)
|
||||
(let ((gp-1 (handle->process arg0)))
|
||||
(if (type? gp-1 process-focusable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector))
|
||||
(s2-1 (new 'stack 'boxed-array collide-shape 32))
|
||||
)
|
||||
(sphere<-vector+r! (the-as sphere s1-0) arg1 arg2)
|
||||
(set! (-> s2-1 length) (fill-actor-list-for-box
|
||||
*actor-hash*
|
||||
s1-0
|
||||
(the-as (pointer collide-shape) (-> s2-1 data))
|
||||
(-> s2-1 allocated-length)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (find-nearest-focusable
|
||||
(the-as (array collide-shape) s2-1)
|
||||
arg1
|
||||
arg2
|
||||
(if (= arg4 65536.0)
|
||||
(search-info-flag crate enemy combo)
|
||||
(search-info-flag crate enemy prefer-angle cull-angle combo)
|
||||
)
|
||||
(search-info-flag)
|
||||
arg3
|
||||
(the-as vector #f)
|
||||
arg4
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (type? gp-2 process-focusable)
|
||||
gp-2
|
||||
)
|
||||
)
|
||||
(the-as process-focusable (cond
|
||||
((send-event (handle->process arg0) 'combo)
|
||||
(as-type (handle->process arg0) process-focusable)
|
||||
)
|
||||
(else
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector))
|
||||
(s2-1 (new 'stack 'boxed-array collide-shape 32))
|
||||
)
|
||||
(sphere<-vector+r! (the-as sphere s1-0) arg1 arg2)
|
||||
(set! (-> s2-1 length) (fill-actor-list-for-box
|
||||
*actor-hash*
|
||||
s1-0
|
||||
(the-as (pointer collide-shape) (-> s2-1 data))
|
||||
(-> s2-1 allocated-length)
|
||||
)
|
||||
)
|
||||
(as-type
|
||||
(find-nearest-focusable
|
||||
(the-as (array collide-shape) s2-1)
|
||||
arg1
|
||||
arg2
|
||||
(if (= arg4 65536.0)
|
||||
(search-info-flag crate enemy combo)
|
||||
(search-info-flag crate enemy prefer-angle cull-angle combo)
|
||||
)
|
||||
(search-info-flag)
|
||||
arg3
|
||||
(the-as vector #f)
|
||||
arg4
|
||||
)
|
||||
process-focusable
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod combo-tracker-method-12 ((this combo-tracker) (arg0 vector) (arg1 vector) (arg2 process) (arg3 time-frame))
|
||||
@@ -312,12 +299,7 @@
|
||||
(set! (-> a1-4 from) (process->ppointer pp))
|
||||
(set! (-> a1-4 num-params) 0)
|
||||
(set! (-> a1-4 message) 'nav-control)
|
||||
(let* ((s3-0 (send-event-function (handle->process (-> this target)) a1-4))
|
||||
(s4-1 (if (type? s3-0 nav-control)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (as-type (send-event-function (handle->process (-> this target)) a1-4) nav-control)))
|
||||
(when s4-1
|
||||
(let ((a2-3 ((method-of-type nav-control find-poly-containing-point-1) (the-as nav-control s4-1) arg1)))
|
||||
(if a2-3
|
||||
|
||||
@@ -33,12 +33,7 @@
|
||||
"If the focused process is not dead,
|
||||
check that the [[collide-spec]] of the focus and the process match."
|
||||
(when (and proc (not (logtest? (-> proc focus-status) (focus-status disable dead))))
|
||||
(let* ((root (-> proc root))
|
||||
(cshape (if (type? root collide-shape)
|
||||
root
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((cshape (as-type (-> proc root) collide-shape)))
|
||||
(and cshape (logtest? (-> this collide-with) (-> cshape root-prim prim-core collide-as)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -651,12 +651,7 @@
|
||||
(remove! a0-3)
|
||||
)
|
||||
)
|
||||
(let* ((s5-0 (-> this root))
|
||||
(a0-5 (if (type? s5-0 collide-shape)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-5 (as-type (-> this root) collide-shape)))
|
||||
(when a0-5
|
||||
(let ((a2-0 (-> (the-as collide-shape a0-5) actor-hash-index))
|
||||
(v1-12 *actor-hash*)
|
||||
@@ -722,12 +717,7 @@
|
||||
(if (-> self entity)
|
||||
(logior! (-> self entity extra perm status) (entity-perm-status error))
|
||||
)
|
||||
(let* ((gp-0 (-> self root))
|
||||
(v1-12 (if (type? gp-0 collide-shape)
|
||||
(the-as collide-shape gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-12 (as-type (-> self root) collide-shape)))
|
||||
(when v1-12
|
||||
(let ((a0-6 (-> v1-12 root-prim)))
|
||||
(set! (-> a0-6 prim-core collide-as) (collide-spec))
|
||||
@@ -855,12 +845,7 @@
|
||||
(-> skelgroup light-index)
|
||||
)
|
||||
)
|
||||
(let* ((gp-1 (ppointer->process (-> proc parent)))
|
||||
(v1-65 (if (type? gp-1 process-drawable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-65 (as-type (ppointer->process (-> proc parent)) process-drawable)))
|
||||
(when (and v1-65 (nonzero? (-> (the-as process-drawable v1-65) draw)))
|
||||
(set! (-> s2-0 light-index) (-> (the-as process-drawable v1-65) draw light-index))
|
||||
(set! (-> s2-0 shadow-mask) (-> (the-as process-drawable v1-65) draw shadow-mask))
|
||||
@@ -2084,14 +2069,9 @@
|
||||
;; WARN: Return type mismatch object vs process-focusable.
|
||||
(defbehavior find-offending-process-focusable process-drawable ((arg0 process-tree) (arg1 attack-info))
|
||||
(let ((s5-0 (the-as object #f)))
|
||||
(when (and arg1 (logtest? (-> arg1 mask) (attack-mask attacker)))
|
||||
(let ((s4-0 (handle->process (-> arg1 attacker))))
|
||||
(set! s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
(if (and arg1 (logtest? (-> arg1 mask) (attack-mask attacker)))
|
||||
(set! s5-0 (as-type (handle->process (-> arg1 attacker)) process-focusable))
|
||||
)
|
||||
)
|
||||
(when (not (the-as process s5-0))
|
||||
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-3 from) (process->ppointer self))
|
||||
|
||||
@@ -249,12 +249,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 280 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-96 s5-2))
|
||||
(set! (-> v1-96 width) (the float 340))
|
||||
)
|
||||
(let ((v1-97 s5-2))
|
||||
(set! (-> v1-97 height) (the float 80))
|
||||
)
|
||||
(set-width! s5-2 340)
|
||||
(set-height! s5-2 80)
|
||||
(let ((v1-98 s5-2)
|
||||
(a0-39 (-> *setting-control* user-default language))
|
||||
)
|
||||
|
||||
@@ -65,26 +65,24 @@
|
||||
(goto cfg-260)
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 (art-group-get-by-name *level* (-> this art-group) (the-as (pointer level) #f)))
|
||||
(s3-0 (if (type? s4-1 skeleton-group)
|
||||
s4-1
|
||||
)
|
||||
)
|
||||
(s0-0 (-> arg0 level))
|
||||
(s1-0
|
||||
(cond
|
||||
((or (string= (-> this name) "jak-highres")
|
||||
(string= (-> this name) "jak-highres-prison")
|
||||
(string= (-> this name) "darkjak-highres")
|
||||
)
|
||||
'jakb
|
||||
)
|
||||
((string= (-> this name) "jakc-highres")
|
||||
'jakc
|
||||
)
|
||||
(let ((s3-0
|
||||
(as-type (art-group-get-by-name *level* (-> this art-group) (the-as (pointer level) #f)) skeleton-group)
|
||||
)
|
||||
(s0-0 (-> arg0 level))
|
||||
(s1-0
|
||||
(cond
|
||||
((or (string= (-> this name) "jak-highres")
|
||||
(string= (-> this name) "jak-highres-prison")
|
||||
(string= (-> this name) "darkjak-highres")
|
||||
)
|
||||
'jakb
|
||||
)
|
||||
)
|
||||
)
|
||||
((string= (-> this name) "jakc-highres")
|
||||
'jakc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 level) #f)
|
||||
(set! s4-0
|
||||
(when s3-0
|
||||
@@ -618,14 +616,11 @@
|
||||
(-> *level* level-default)
|
||||
)
|
||||
)
|
||||
(v1-53 (when level
|
||||
(let ((s0-0 (art-group-get-by-name *level* (-> s2-0 art-group) (the-as (pointer level) #f))))
|
||||
(if (type? s0-0 skeleton-group)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(v1-53
|
||||
(if level
|
||||
(as-type (art-group-get-by-name *level* (-> s2-0 art-group) (the-as (pointer level) #f)) skeleton-group)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((or (not s1-0) (not (or (= (-> s1-0 status) 'active) (= (-> s1-0 status) 'reserved))))
|
||||
@@ -772,7 +767,7 @@
|
||||
)
|
||||
(let* ((v1-28 (-> s3-0 base))
|
||||
(a2-23
|
||||
(+ (- 1793 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (* 0.5 (-> arg1 width)))))
|
||||
(+ (- 1793 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (/ (-> arg1 width) 2))))
|
||||
)
|
||||
(a3-8 (+ (the int (-> arg1 origin y)) 1841))
|
||||
(a0-23 (+ a2-23 (-> arg0 width)))
|
||||
@@ -789,7 +784,7 @@
|
||||
(&+! (-> s3-0 base) 112)
|
||||
(let* ((v1-32 (-> s3-0 base))
|
||||
(a1-38
|
||||
(+ (- 1792 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (* 0.5 (-> arg1 width)))))
|
||||
(+ (- 1792 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (/ (-> arg1 width) 2))))
|
||||
)
|
||||
(a3-11 (+ (the int (-> arg1 origin y)) 1840))
|
||||
(a0-30 (+ a1-38 (-> arg0 width)))
|
||||
@@ -838,29 +833,19 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 20 290 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-20 s2-0))
|
||||
(set! (-> v1-20 width) (the float 465))
|
||||
)
|
||||
(let ((v1-21 s2-0))
|
||||
(set! (-> v1-21 height) (the float 70))
|
||||
)
|
||||
(let ((v1-22 s2-0))
|
||||
(set! (-> v1-22 scale) 0.5)
|
||||
)
|
||||
(set-width! s2-0 465)
|
||||
(set-height! s2-0 70)
|
||||
(set-scale! s2-0 0.5)
|
||||
(set! (-> s2-0 flags) (font-flags shadow kerning middle large))
|
||||
(case (-> s3-0 type)
|
||||
((string)
|
||||
(when (= (-> *setting-control* user-default subtitle-language) (language-enum korean))
|
||||
(set! s3-0 (convert-korean-text (the-as string s3-0)))
|
||||
(let ((v1-27 s2-0))
|
||||
(set! (-> v1-27 scale) 0.6)
|
||||
)
|
||||
(set-scale! s2-0 0.6)
|
||||
)
|
||||
(when (= (-> *setting-control* user-default subtitle-language) (language-enum russian))
|
||||
(let ((v1-30 s2-0))
|
||||
(set! (-> v1-30 scale) 0.75)
|
||||
(if (= (-> *setting-control* user-default subtitle-language) (language-enum russian))
|
||||
(set-scale! s2-0 0.75)
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 flags) (font-flags kerning middle middle-vert large))
|
||||
(+! (-> s2-0 origin x) -1.0)
|
||||
(+! (-> s2-0 origin y) -1.0)
|
||||
@@ -934,12 +919,10 @@
|
||||
(apply-settings *setting-control*)
|
||||
)
|
||||
(cond
|
||||
((and *target*
|
||||
(zero? (-> self scene-index))
|
||||
(or (not (-> self scene))
|
||||
(!= (level-status? *level* (-> gp-0 vis-nick) #f) 'active)
|
||||
(logtest? (-> self scene scene-flags) (scene-flags scf5))
|
||||
)
|
||||
((and *target* (zero? (-> self scene-index)) (or (not (-> self scene))
|
||||
(!= (level-status? *level* (-> gp-0 vis-nick) #f) 'active)
|
||||
(logtest? (-> self scene scene-flags) (scene-flags scf5))
|
||||
)
|
||||
)
|
||||
(send-event *target* 'continue gp-0)
|
||||
)
|
||||
@@ -1212,7 +1195,8 @@
|
||||
#x33001
|
||||
#t
|
||||
)
|
||||
(suspend-for (seconds 0.05))
|
||||
(suspend-for (seconds 0.05)
|
||||
)
|
||||
(set! (-> *setting-control* user-current bg-a) 0.0)
|
||||
(remove-setting! 'movie)
|
||||
(remove-setting! 'movie-name)
|
||||
@@ -1462,7 +1446,7 @@
|
||||
(when (logtest? (-> self scene scene-flags) (scene-flags scf6))
|
||||
(let ((v1-26 (handle->process (-> *target* pilot vehicle))))
|
||||
(when v1-26
|
||||
(set! (-> self root trans quad) (-> (the-as process-drawable v1-26) root trans quad))
|
||||
(vector-copy! (-> self root trans) (-> (the-as process-drawable v1-26) root trans))
|
||||
(quaternion-copy! (-> self root quat) (-> (the-as process-drawable v1-26) root quat))
|
||||
)
|
||||
)
|
||||
@@ -1650,12 +1634,7 @@
|
||||
)
|
||||
(when (logtest? gp-4 (scene-controls special-fma-spheres))
|
||||
(dotimes (s5-3 (-> self scene actor length))
|
||||
(let* ((s4-1 (handle->process (-> self scene actor s5-3 process)))
|
||||
(v1-66 (if (type? s4-1 process-drawable)
|
||||
(the-as process-drawable s4-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-66 (as-type (handle->process (-> self scene actor s5-3 process)) process-drawable)))
|
||||
(if (and v1-66 (nonzero? (-> v1-66 draw)))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
@@ -1670,12 +1649,7 @@
|
||||
)
|
||||
(when (logtest? gp-4 (scene-controls scene-controls-7))
|
||||
(dotimes (s5-4 (-> self scene actor length))
|
||||
(let* ((s4-2 (handle->process (-> self scene actor s5-4 process)))
|
||||
(v1-82 (if (type? s4-2 process-drawable)
|
||||
(the-as process-drawable s4-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-82 (as-type (handle->process (-> self scene actor s5-4 process)) process-drawable)))
|
||||
(if (and v1-82 (nonzero? (-> v1-82 draw)))
|
||||
(format
|
||||
*stdcon*
|
||||
@@ -1694,12 +1668,7 @@
|
||||
)
|
||||
(when (logtest? gp-4 (scene-controls scene-controls-8))
|
||||
(dotimes (gp-5 (-> self scene actor length))
|
||||
(let* ((s5-5 (handle->process (-> self scene actor gp-5 process)))
|
||||
(v1-97 (if (type? s5-5 process-drawable)
|
||||
(the-as process-drawable s5-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-97 (as-type (handle->process (-> self scene actor gp-5 process)) process-drawable)))
|
||||
(if (and v1-97 (nonzero? (-> v1-97 draw)))
|
||||
(add-debug-text-3d
|
||||
#t
|
||||
@@ -1727,15 +1696,9 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 36 60 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-124 gp-6))
|
||||
(set! (-> v1-124 width) (the float 440))
|
||||
)
|
||||
(let ((v1-125 gp-6))
|
||||
(set! (-> v1-125 height) (the float 48))
|
||||
)
|
||||
(let ((v1-126 gp-6))
|
||||
(set! (-> v1-126 scale) 0.5)
|
||||
)
|
||||
(set-width! gp-6 440)
|
||||
(set-height! gp-6 48)
|
||||
(set-scale! gp-6 0.5)
|
||||
(set! (-> gp-6 flags) (font-flags shadow kerning middle large))
|
||||
(print-game-text
|
||||
(lookup-text!
|
||||
|
||||
@@ -1186,15 +1186,11 @@
|
||||
((or (movie?) *external-cam-mode*)
|
||||
(math-camera-pos)
|
||||
)
|
||||
((and (= mode 1) (begin
|
||||
(let ((s5-1 (handle->process (-> *setting-control* user-current sound-ear))))
|
||||
(set! gp-0 (if (type? s5-1 process-focusable)
|
||||
(the-as process-focusable s5-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
((and (= mode 1)
|
||||
(begin
|
||||
(set! gp-0 (as-type (handle->process (-> *setting-control* user-current sound-ear)) process-focusable))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(get-trans gp-0 11)
|
||||
)
|
||||
|
||||
@@ -515,19 +515,9 @@
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-1 384))
|
||||
(let* ((s3-0 (-> s5-1 s4-0))
|
||||
(v1-10 (if (type? s3-0 collide-shape)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (as-type (-> s5-1 s4-0) collide-shape)))
|
||||
(when v1-10
|
||||
(let* ((s3-1 (-> v1-10 process))
|
||||
(a0-11 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-11 (as-type (-> v1-10 process) process-focusable)))
|
||||
(when a0-11
|
||||
(when (!= *target* a0-11)
|
||||
(let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) gp-0)))
|
||||
@@ -554,12 +544,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 *target*)
|
||||
(s5-2 (if (type? s4-1 process-focusable)
|
||||
s4-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) gp-0) (-> gp-0 w)))
|
||||
(when (!= *target* s5-2)
|
||||
(let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) gp-0)))
|
||||
|
||||
@@ -530,19 +530,9 @@
|
||||
(set! (-> s5-1 w) 16384.0)
|
||||
(let ((s4-1 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-1 s4-1 384))
|
||||
(let* ((s2-0 (-> s4-1 s3-0))
|
||||
(v1-21 (if (type? s2-0 collide-shape)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-21 (as-type (-> s4-1 s3-0) collide-shape)))
|
||||
(when v1-21
|
||||
(let* ((s1-0 (-> v1-21 process))
|
||||
(s2-1 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (as-type (-> v1-21 process) process-focusable)))
|
||||
(when s2-1
|
||||
(when (and (!= *target* s2-1) (type? s2-1 civilian))
|
||||
(let ((v1-25 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 root trans) s5-1)))
|
||||
@@ -572,12 +562,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s3-1 *target*)
|
||||
(s4-2 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-2 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s4-2 (< (vector-vector-distance (get-trans s4-2 0) s5-1) (-> s5-1 w)))
|
||||
(when (and (!= *target* s4-2) (type? s4-2 civilian))
|
||||
(let ((v1-39 (vector-! (new 'stack-no-clear 'vector) (-> s4-2 control trans) s5-1)))
|
||||
|
||||
@@ -247,12 +247,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-43 gp-0))
|
||||
(set! (-> v1-43 width) (the float 340))
|
||||
)
|
||||
(let ((v1-44 gp-0))
|
||||
(set! (-> v1-44 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 340)
|
||||
(set-height! gp-0 80)
|
||||
(let ((v1-45 gp-0)
|
||||
(a0-21 (-> *setting-control* user-default language))
|
||||
)
|
||||
|
||||
@@ -2247,18 +2247,9 @@
|
||||
)
|
||||
(when gp-1
|
||||
(set! (-> self control unknown-word04) (the-as uint (current-time)))
|
||||
(let ((v1-9 (if (type? proc process-drawable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-9 (as-type proc process-drawable)))
|
||||
(when v1-9
|
||||
(let* ((s5-1 (-> (the-as process-drawable v1-9) root))
|
||||
(v1-10 (if (type? s5-1 collide-shape)
|
||||
(the-as collide-shape s5-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-10 (as-type (-> (the-as process-drawable v1-9) root) collide-shape)))
|
||||
(if (and v1-10 (or (logtest? (-> v1-10 root-prim prim-core collide-as) (collide-spec enemy))
|
||||
(logtest? (-> v1-10 root-prim prim-core action) (collide-action no-smack))
|
||||
)
|
||||
@@ -2677,12 +2668,7 @@
|
||||
(set! (-> (the-as target self) control unknown-quat40 quad) (-> (the-as target self) control quat quad))
|
||||
(ja :group! s5-0 :num! (seek!) :frame-num (ja-aframe 20.0 0))
|
||||
(while (< (ja-aframe-num 0) 93.0)
|
||||
(let* ((s4-2 (handle->process arg0))
|
||||
(s5-1 (if (type? s4-2 process-focusable)
|
||||
s4-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (as-type (handle->process arg0) process-focusable)))
|
||||
(let ((f28-0 (ja-aframe-num 0)))
|
||||
(send-event *camera* 'joystick -0.7 -1.0)
|
||||
(cond
|
||||
@@ -2756,12 +2742,7 @@
|
||||
:post (behavior ()
|
||||
(target-no-stick-post)
|
||||
(target-flut-post-post)
|
||||
(let* ((s5-0 (handle->process (-> (the-as target self) control unknown-handle02)))
|
||||
(gp-0 (if (type? s5-0 process-focusable)
|
||||
(the-as process-focusable s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (as-type (handle->process (-> (the-as target self) control unknown-handle02)) process-focusable)))
|
||||
(when gp-0
|
||||
(quaternion-copy! (-> gp-0 root quat) (-> (the-as target self) control quat-for-control))
|
||||
(vector-copy! (-> gp-0 root trans) (-> (the-as target self) control trans))
|
||||
@@ -3063,13 +3044,9 @@
|
||||
(remove-setting! 'mode-name)
|
||||
)
|
||||
(('lava 'fry 'slime 'dark-eco-pool 'melt 'big-explosion)
|
||||
(let ((s5-4 (handle->process (-> self attack-info attacker))))
|
||||
(when (if (type? s5-4 water-vol)
|
||||
s5-4
|
||||
)
|
||||
(logior! (-> self target-flags) (target-flags tf14))
|
||||
(set! (-> self alt-cam-pos y) (+ 4096.0 (-> self water height)))
|
||||
)
|
||||
(when (as-type (handle->process (-> self attack-info attacker)) water-vol)
|
||||
(logior! (-> self target-flags) (target-flags tf14))
|
||||
(set! (-> self alt-cam-pos y) (+ 4096.0 (-> self water height)))
|
||||
)
|
||||
(set! (-> self control mod-surface) *neutral-mods*)
|
||||
(case arg0
|
||||
@@ -3301,12 +3278,7 @@
|
||||
(quaternion-copy! (-> self control unknown-quat39) (-> self control quat))
|
||||
(quaternion-copy! (-> self control unknown-quat40) (-> self control quat-for-control))
|
||||
(set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y)))
|
||||
(let* ((s2-0 (handle->process arg0))
|
||||
(s3-0 (if (type? s2-0 process-drawable)
|
||||
(the-as process-drawable s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type (handle->process arg0) process-drawable)))
|
||||
(when s3-0
|
||||
(vector-copy! s5-0 (-> s3-0 root trans))
|
||||
(quaternion-copy! (-> self control unknown-quat40) (-> s3-0 root quat))
|
||||
@@ -3334,12 +3306,7 @@
|
||||
)
|
||||
(ja-no-eval :group! s3-2 :num! (seek! (ja-aframe f30-0 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let* ((s3-3 (handle->process arg0))
|
||||
(v1-66 (if (type? s3-3 process-drawable)
|
||||
(the-as process-drawable s3-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-66 (as-type (handle->process arg0) process-drawable)))
|
||||
(when v1-66
|
||||
(vector-copy! s5-0 (-> v1-66 root trans))
|
||||
(vector-copy! (-> self control unknown-vector38) s5-0)
|
||||
|
||||
@@ -165,12 +165,7 @@
|
||||
(a0-4 (the-as process #f))
|
||||
)
|
||||
(when (handle->process (-> arg0 desired-target))
|
||||
(let ((s4-0 (handle->process (-> arg0 desired-target))))
|
||||
(set! a0-4 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! a0-4 (as-type (handle->process (-> arg0 desired-target)) process-focusable))
|
||||
(if a0-4
|
||||
(set! s5-0 #t)
|
||||
)
|
||||
@@ -477,19 +472,9 @@
|
||||
(set! (-> sv-1280 w) 163840.0)
|
||||
(let ((gp-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s5-0 (fill-actor-list-for-box *actor-hash* sv-1280 gp-0 384))
|
||||
(let* ((s4-0 (-> gp-0 s5-0))
|
||||
(v1-16 (if (type? s4-0 collide-shape)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-16 (as-type (-> gp-0 s5-0) collide-shape)))
|
||||
(when v1-16
|
||||
(let* ((s3-0 (-> v1-16 process))
|
||||
(s4-1 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (as-type (-> v1-16 process) process-focusable)))
|
||||
(when s4-1
|
||||
(when (and (!= *target* s4-1)
|
||||
(!= sv-1300 s4-1)
|
||||
@@ -599,20 +584,9 @@
|
||||
)
|
||||
(let ((s4-6 (new 'stack-no-clear 'vector)))
|
||||
(vector-copy! s4-6 gp-2)
|
||||
(when s5-7
|
||||
(let ((s3-6 s4-6)
|
||||
(s2-3 s5-7)
|
||||
)
|
||||
(vector-copy! s3-6 (get-trans
|
||||
(the-as process-focusable (if (type? s2-3 process-focusable)
|
||||
(the-as process-focusable s2-3)
|
||||
)
|
||||
)
|
||||
3
|
||||
)
|
||||
)
|
||||
(if s5-7
|
||||
(vector-copy! s4-6 (get-trans (the-as process-focusable (as-type s5-7 process-focusable)) 3))
|
||||
)
|
||||
)
|
||||
(let ((s3-7 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> sv-144 fire-dir-out) 2730.6667))
|
||||
(v1-174 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> sv-144 fire-dir-out) -2730.6667))
|
||||
(a0-114 (vector-! (new 'stack-no-clear 'vector) s4-6 (-> sv-144 fire-point)))
|
||||
@@ -1629,19 +1603,9 @@
|
||||
(set! (-> sv-40 w) 0.0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 384))
|
||||
(let* ((s2-0 (-> s4-0 s3-0))
|
||||
(a0-5 (if (type? s2-0 collide-shape)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-5 (as-type (-> s4-0 s3-0) collide-shape)))
|
||||
(when a0-5
|
||||
(let* ((s1-0 (-> a0-5 process))
|
||||
(s2-1 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (as-type (-> a0-5 process) process-focusable)))
|
||||
(when s2-1
|
||||
(when (is-valid-blue-2-target (the-as process-focusable s2-1) arg1)
|
||||
(let* ((s1-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s2-1) 3) sv-40))
|
||||
@@ -1659,12 +1623,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s3-1 *target*)
|
||||
(s4-1 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) arg0) (-> arg0 w)))
|
||||
(when (is-valid-blue-2-target s4-1 arg1)
|
||||
(let* ((gp-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-1 3) sv-40))
|
||||
@@ -1693,19 +1652,9 @@
|
||||
(set! (-> sv-40 w) 1.0)
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 384))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(a0-5 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-5 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when a0-5
|
||||
(let* ((s0-0 (-> a0-5 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> a0-5 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (is-valid-blue-2-target (the-as process-focusable s1-1) arg1)
|
||||
(let* ((s0-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s1-1) 3) sv-40))
|
||||
@@ -1726,12 +1675,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-1 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) arg0) (-> arg0 w)))
|
||||
(when (is-valid-blue-2-target s3-1 arg1)
|
||||
(let* ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s3-1 3) sv-40))
|
||||
@@ -2080,12 +2024,7 @@
|
||||
(when (and (handle->process (-> *gun-blue-2-targets* gp-0 target))
|
||||
(not (time-elapsed? (-> *gun-blue-2-targets* gp-0 start-time) (seconds 0.5)))
|
||||
)
|
||||
(let* ((s2-0 (handle->process (-> *gun-blue-2-targets* gp-0 target)))
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type (handle->process (-> *gun-blue-2-targets* gp-0 target)) process-focusable)))
|
||||
(when (is-valid-blue-2-target (the-as process-focusable s3-0) sv-784)
|
||||
(let ((s2-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s3-0) 3) sv-852)))
|
||||
(vector-normalize-ret-len! s2-2 1.0)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
(define-extern missile-bot type)
|
||||
(define-extern market-object type)
|
||||
(define-extern fruit-stand type)
|
||||
(declare-type market-object process-drawable)
|
||||
(declare-type fruit-stand process-drawable)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -739,19 +741,9 @@
|
||||
(set! (-> s4-0 w) 1228800.0)
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(v1-5 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-5 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when v1-5
|
||||
(let* ((s0-0 (-> v1-5 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> v1-5 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (and (!= *target* s1-1)
|
||||
(not (focus-test? (the-as process-focusable s1-1) disable dead inactive))
|
||||
@@ -787,12 +779,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-1 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) s4-0) (-> s4-0 w)))
|
||||
(when (and (!= *target* s3-1)
|
||||
(not (focus-test? s3-1 disable dead inactive))
|
||||
@@ -1630,20 +1617,11 @@
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-normalize-copy! s4-0 (-> self core-velocity) 1.0)
|
||||
(let* ((s3-0 (handle->process (-> self track-target)))
|
||||
(s2-0 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-0 (as-type (handle->process (-> self track-target)) process-drawable)))
|
||||
(when s2-0
|
||||
(let ((s3-1 (new 'stack-no-clear 'vector)))
|
||||
(vector-copy! s3-1 (-> (the-as process-focusable s2-0) root trans))
|
||||
(let ((a0-6 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-6 (as-type s2-0 process-focusable)))
|
||||
(if a0-6
|
||||
(vector-copy! s3-1 (get-trans (the-as process-focusable a0-6) 3))
|
||||
)
|
||||
@@ -1967,19 +1945,9 @@
|
||||
(set! (-> s4-0 w) (-> self blast-radius))
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(v1-66 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-66 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when v1-66
|
||||
(let* ((s0-0 (-> v1-66 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> v1-66 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (and (nonzero? (-> (the-as process-focusable s1-1) root root-prim prim-core collide-as))
|
||||
(logtest? (process-mask crate enemy guard vehicle civilian kg-robot metalhead) (-> s1-1 mask))
|
||||
@@ -2016,12 +1984,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-1 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) s4-0) (-> s4-0 w)))
|
||||
(when (and (nonzero? (-> s3-1 control root-prim prim-core collide-as))
|
||||
(logtest? (process-mask crate enemy guard vehicle civilian kg-robot metalhead) (-> s3-1 mask))
|
||||
@@ -2062,22 +2025,9 @@
|
||||
)
|
||||
(let ((gp-4 (handle->process (-> self result-array 0))))
|
||||
(deal-damage! self gp-4 (the-as event-message-block #f))
|
||||
(let ((s5-3 gp-4))
|
||||
(if (or (if (type? s5-3 crate)
|
||||
s5-3
|
||||
)
|
||||
(let ((s5-4 gp-4))
|
||||
(if (type? s5-4 market-object)
|
||||
s5-4
|
||||
)
|
||||
)
|
||||
(if (type? gp-4 fruit-stand)
|
||||
gp-4
|
||||
)
|
||||
)
|
||||
(process-spawn gun-dark-shot :init gun-dark-shot-init-fizzle (-> self root trans) :name "gun-dark-shot")
|
||||
)
|
||||
)
|
||||
(if (or (as-type gp-4 crate) (as-type gp-4 market-object) (as-type gp-4 fruit-stand))
|
||||
(process-spawn gun-dark-shot :init gun-dark-shot-init-fizzle (-> self root trans) :name "gun-dark-shot")
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
@@ -2099,15 +2049,11 @@
|
||||
process
|
||||
(lambda :behavior process
|
||||
((arg0 handle) (arg1 float))
|
||||
(let* ((s3-0 (ppointer->process (-> self parent)))
|
||||
(s5-0 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s2-0 0)
|
||||
(s1-0 (current-time))
|
||||
(s3-1 #f)
|
||||
)
|
||||
(let ((s5-0 (as-type (ppointer->process (-> self parent)) process-focusable))
|
||||
(s2-0 0)
|
||||
(s1-0 (current-time))
|
||||
(s3-1 #f)
|
||||
)
|
||||
(+! (-> self clock ref-count) -1)
|
||||
(+! (-> s5-0 clock ref-count) 1)
|
||||
(set! (-> self clock) (-> s5-0 clock))
|
||||
@@ -2152,12 +2098,7 @@
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(let ((s5-1 (ppointer->process (-> self parent))))
|
||||
(set! s5-0 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s5-0 (as-type (ppointer->process (-> self parent)) process-focusable))
|
||||
(when (and (not s3-1) (time-elapsed? s1-0 (seconds 0.1)) (!= s5-0 (handle->process arg0)))
|
||||
(set! s3-1 #t)
|
||||
(send-event
|
||||
@@ -2252,12 +2193,7 @@
|
||||
|
||||
(defmethod spawn-part ((this gravity-spinner))
|
||||
(when (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 5))
|
||||
(let* ((s5-0 (handle->process (-> this parent-hand)))
|
||||
(gp-1 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when gp-1
|
||||
(when (and (-> (the-as process-focusable gp-1) node-list) (nonzero? (-> (the-as process-focusable gp-1) node-list)))
|
||||
(let* ((v1-12
|
||||
@@ -2299,12 +2235,7 @@
|
||||
(vf5 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((gp-0 (handle->process (-> this parent-hand)))
|
||||
(s3-0 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s3-0
|
||||
(let* ((gp-1 (-> (the-as process-focusable s3-0) root))
|
||||
(s5-0 (-> gp-1 root-prim))
|
||||
@@ -2340,12 +2271,7 @@
|
||||
)
|
||||
|
||||
(defmethod get-float-speed ((this gravity-spinner))
|
||||
(let* ((s4-0 (handle->process (-> this parent-hand)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s5-0
|
||||
(let ((f0-2 (- (- (-> (get-trans (the-as process-focusable s5-0) 3) y)
|
||||
(-> (the-as process-focusable s5-0) root root-prim local-sphere w)
|
||||
@@ -2378,12 +2304,7 @@
|
||||
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defmethod probe-ground ((this gravity-spinner))
|
||||
(let* ((s4-0 (handle->process (-> this parent-hand)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s5-0
|
||||
(let ((s4-1 (get-trans (the-as process-focusable s5-0) 3))
|
||||
(s3-0 (new 'stack-no-clear 'collide-query))
|
||||
@@ -2425,12 +2346,7 @@
|
||||
(set! (-> self time-subtract) arg2)
|
||||
(set! (-> self cached-damage) 0.0)
|
||||
(set! (-> self was-hit-previously?) #f)
|
||||
(let* ((s5-1 (handle->process (-> self parent-hand)))
|
||||
(gp-1 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (as-type (handle->process (-> self parent-hand)) process-focusable)))
|
||||
(when gp-1
|
||||
(set! (-> self original-sphere-offset quad)
|
||||
(-> (the-as process-focusable gp-1) root root-prim local-sphere quad)
|
||||
@@ -2537,12 +2453,7 @@
|
||||
(sv-2308 vector)
|
||||
(sv-2312 float)
|
||||
)
|
||||
(let* ((s3-0 (handle->process (-> this parent-hand)))
|
||||
(s5-0 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s5-0
|
||||
(set! sv-144 (new 'stack 'sphere))
|
||||
(set! sv-148 (the-as process (send-event *target* 'get-vehicle)))
|
||||
@@ -2563,19 +2474,9 @@
|
||||
(set! (-> sv-144 r) sv-160)
|
||||
(let ((s3-2 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-2 384))
|
||||
(let* ((s1-0 (-> s3-2 s2-0))
|
||||
(a0-15 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-15 (as-type (-> s3-2 s2-0) collide-shape)))
|
||||
(when a0-15
|
||||
(let* ((s1-1 (-> a0-15 process))
|
||||
(a0-17 (if (type? s1-1 process-focusable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-17 (as-type (-> a0-15 process) process-focusable)))
|
||||
(when a0-17
|
||||
(when (and (!= s5-0 a0-17)
|
||||
(not (focus-test? (the-as process-focusable a0-17) disable dead inactive gun-no-target))
|
||||
@@ -2633,12 +2534,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-3 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-3 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-3 (< (vector-vector-distance (get-trans s3-3 0) sv-144) (-> sv-144 r)))
|
||||
(when (and (!= s5-0 s3-3)
|
||||
(not (focus-test? s3-3 disable dead inactive gun-no-target))
|
||||
@@ -2704,12 +2600,7 @@
|
||||
|
||||
(defmethod gravity-spinner-method-16 ((this gravity-spinner) (arg0 vector) (arg1 vector))
|
||||
(local-vars (sv-48 vector) (sv-52 vector) (sv-56 float))
|
||||
(let* ((s2-0 (handle->process (-> this parent-hand)))
|
||||
(s4-0 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s4-0
|
||||
(set! sv-48 (vector-! (new 'stack-no-clear 'vector) arg0 (get-trans (the-as process-focusable s4-0) 3)))
|
||||
(set! sv-52 (new 'stack-no-clear 'vector))
|
||||
@@ -2729,12 +2620,7 @@
|
||||
|
||||
;; WARN: Return type mismatch quaternion vs none.
|
||||
(defmethod rotate! ((this gravity-spinner) (arg0 quaternion))
|
||||
(let* ((s4-0 (handle->process (-> this parent-hand)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s5-0
|
||||
(let* ((s4-1 (get-trans (the-as process-focusable s5-0) 3))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s5-0) root trans) s4-1))
|
||||
@@ -2771,11 +2657,8 @@
|
||||
(f0-3 (* 360.0 f0-2))
|
||||
(f0-4 (/ f0-3 5))
|
||||
(f30-0 (fmin 116508.445 f0-4))
|
||||
(s4-0 (handle->process (-> this parent-hand)))
|
||||
)
|
||||
(if (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
(if (as-type (handle->process (-> this parent-hand)) process-focusable)
|
||||
(rotate! this (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) s5-1 (* f30-0 (seconds-per-frame))))
|
||||
)
|
||||
)
|
||||
@@ -2785,12 +2668,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((s3-1 (handle->process (-> this parent-hand)))
|
||||
(s4-2 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-2 (as-type (handle->process (-> this parent-hand)) process-focusable)))
|
||||
(when s4-2
|
||||
(let ((s2-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s4-2) root quat)))
|
||||
(s3-2 (new 'stack-no-clear 'quaternion))
|
||||
@@ -2876,39 +2754,30 @@
|
||||
)
|
||||
(send-event (handle->process (-> self parent-hand)) 'gun-dark-2-off f0-2)
|
||||
)
|
||||
(let ((gp-0 (handle->process (-> self parent-hand))))
|
||||
(if (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
(send-event
|
||||
(handle->process (-> self parent-hand))
|
||||
'attack
|
||||
#f
|
||||
(static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 0.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(penetrate-using (penetrate vehicle))
|
||||
(vector *zero-vector*)
|
||||
(attacker-velocity *zero-vector*)
|
||||
(mode 'gravity-end)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (as-type (handle->process (-> self parent-hand)) process-focusable)
|
||||
(send-event
|
||||
(handle->process (-> self parent-hand))
|
||||
'attack
|
||||
#f
|
||||
(static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
|
||||
(damage 0.0)
|
||||
(vehicle-damage-factor 1.0)
|
||||
(vehicle-impulse-factor 1.0)
|
||||
(penetrate-using (penetrate vehicle))
|
||||
(vector *zero-vector*)
|
||||
(attacker-velocity *zero-vector*)
|
||||
(mode 'gravity-end)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defbehavior zero-g-wait-for-land gravity-spinner ()
|
||||
(suspend-for (seconds 1.5)
|
||||
(let* ((s4-0 (handle->process (-> self parent-hand)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> self parent-hand)) process-focusable)))
|
||||
(cond
|
||||
((and s5-0
|
||||
(not (logtest? (-> (the-as process-focusable s5-0) focus-status) (focus-status disable dead inactive)))
|
||||
@@ -2918,15 +2787,11 @@
|
||||
)
|
||||
(-> self ground-height)
|
||||
)
|
||||
(let ((s4-1 (-> (the-as process-focusable s5-0) root)))
|
||||
(and (if (type? s4-1 collide-shape-moving)
|
||||
s4-1
|
||||
)
|
||||
(logtest? (-> (the-as collide-shape-moving (-> (the-as process-focusable s5-0) root)) status)
|
||||
(collide-status on-surface touch-surface)
|
||||
)
|
||||
)
|
||||
)
|
||||
(and (as-type (-> (the-as process-focusable s5-0) root) collide-shape-moving)
|
||||
(logtest? (-> (the-as collide-shape-moving (-> (the-as process-focusable s5-0) root)) status)
|
||||
(collide-status on-surface touch-surface)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return (the-as object 0))
|
||||
)
|
||||
@@ -2978,17 +2843,13 @@
|
||||
)
|
||||
(('impact)
|
||||
(handle-impact self #f)
|
||||
(let ((s5-1 (handle->process (-> self parent-hand))))
|
||||
(when (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
(let ((f0-0 (vector-length (the-as vector (-> block param 1)))))
|
||||
0.0
|
||||
(when (< 40960.0 f0-0)
|
||||
(let ((f30-0 (/ f0-0 (meters 10))))
|
||||
(format 0 "Receving impact damage ~f~%" f30-0)
|
||||
(+! (-> self cached-damage) f30-0)
|
||||
)
|
||||
(when (as-type (handle->process (-> self parent-hand)) process-focusable)
|
||||
(let ((f0-0 (vector-length (the-as vector (-> block param 1)))))
|
||||
0.0
|
||||
(when (< 40960.0 f0-0)
|
||||
(let ((f30-0 (/ f0-0 (meters 10))))
|
||||
(format 0 "Receving impact damage ~f~%" f30-0)
|
||||
(+! (-> self cached-damage) f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3017,11 +2878,7 @@
|
||||
)
|
||||
(set! (-> sv-32 y) (* 0.15 (-> sv-32 y)))
|
||||
(+! (-> self cached-damage) sv-36)
|
||||
(let ((s4-0 (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (as-type proc process-focusable)))
|
||||
(when s4-0
|
||||
(vector-float*! sv-32 sv-32 (fmax 0.5 (gravity-spinner-method-18 self s4-0)))
|
||||
(vector+float*!
|
||||
@@ -3101,12 +2958,7 @@
|
||||
(suspend)
|
||||
)
|
||||
(send-event (handle->process (-> self parent-hand)) 'gun-dark-2-off)
|
||||
(let* ((s5-0 (handle->process (-> self parent-hand)))
|
||||
(gp-0 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (as-type (handle->process (-> self parent-hand)) process-focusable)))
|
||||
(when gp-0
|
||||
(update-rotation self #t)
|
||||
(quaternion-normalize! (-> (the-as process-focusable gp-0) root quat))
|
||||
@@ -3144,12 +2996,7 @@
|
||||
(+! (-> self cached-damage) f0-7)
|
||||
)
|
||||
)
|
||||
(let* ((gp-1 (-> (the-as process-focusable gp-0) root))
|
||||
(v1-37 (if (type? gp-1 collide-shape-moving)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-37 (as-type (-> (the-as process-focusable gp-0) root) collide-shape-moving)))
|
||||
(if v1-37
|
||||
(logclear! (-> (the-as collide-shape-moving v1-37) status) (collide-status on-surface touch-surface))
|
||||
)
|
||||
@@ -3174,12 +3021,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s5-1 (handle->process (-> self parent-hand)))
|
||||
(gp-2 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-2 (as-type (handle->process (-> self parent-hand)) process-focusable)))
|
||||
(when gp-2
|
||||
(vector-copy!
|
||||
(-> (the-as process-focusable gp-2) root root-prim local-sphere)
|
||||
@@ -3659,19 +3501,9 @@
|
||||
(set! (-> s5-0 w) f28-0)
|
||||
(let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-1 384))
|
||||
(let* ((s1-0 (-> s3-1 s2-0))
|
||||
(v1-17 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-17 (as-type (-> s3-1 s2-0) collide-shape)))
|
||||
(when v1-17
|
||||
(let* ((s0-0 (-> v1-17 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> v1-17 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (and (!= *target* s1-1)
|
||||
(not (focus-test? (the-as process-focusable s1-1) disable dead inactive))
|
||||
@@ -3703,12 +3535,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-2 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-2 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-2 (< (vector-vector-distance (get-trans s3-2 0) s5-0) (-> s5-0 w)))
|
||||
(when (and (!= *target* s3-2)
|
||||
(not (focus-test? s3-2 disable dead inactive))
|
||||
|
||||
@@ -229,19 +229,9 @@
|
||||
(set! (-> s5-0 w) (-> this blast-radius))
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 384))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(a0-8 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-8 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when a0-8
|
||||
(let* ((s0-0 (-> a0-8 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> a0-8 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (and (!= s4-0 s1-1)
|
||||
(not (focus-test? (the-as process-focusable s1-1) disable dead inactive))
|
||||
@@ -290,12 +280,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-1 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) s5-0) (-> s5-0 w)))
|
||||
(when (and (!= s4-0 s3-1)
|
||||
(not (focus-test? s3-1 disable dead inactive))
|
||||
@@ -369,19 +354,9 @@
|
||||
(set! (-> s4-0 w) (* 0.6666667 (-> this blast-radius)))
|
||||
(let ((s2-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s1-0 (fill-actor-list-for-box *actor-hash* s4-0 s2-0 384))
|
||||
(let* ((s0-0 (-> s2-0 s1-0))
|
||||
(a0-8 (if (type? s0-0 collide-shape)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-8 (as-type (-> s2-0 s1-0) collide-shape)))
|
||||
(when a0-8
|
||||
(let* ((s0-1 (-> a0-8 process))
|
||||
(a0-10 (if (type? s0-1 process-focusable)
|
||||
s0-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-10 (as-type (-> a0-8 process) process-focusable)))
|
||||
(when a0-10
|
||||
(when (and (!= s3-0 a0-10)
|
||||
(not (focus-test? (the-as process-focusable a0-10) disable dead inactive gun-no-target))
|
||||
@@ -423,12 +398,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s1-1 *target*)
|
||||
(s2-1 (if (type? s1-1 process-focusable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s2-1 (< (vector-vector-distance (get-trans s2-1 0) s4-0) (-> s4-0 w)))
|
||||
(when (and (!= s3-0 s2-1)
|
||||
(not (focus-test? s2-1 disable dead inactive gun-no-target))
|
||||
@@ -653,19 +623,9 @@
|
||||
(set! (-> sv-32 w) (-> this current-radius))
|
||||
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-32 s5-0 384))
|
||||
(let* ((s3-0 (-> s5-0 s4-0))
|
||||
(v1-6 (if (type? s3-0 collide-shape)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-6 (as-type (-> s5-0 s4-0) collide-shape)))
|
||||
(when v1-6
|
||||
(let* ((s2-0 (-> v1-6 process))
|
||||
(s3-1 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (as-type (-> v1-6 process) process-focusable)))
|
||||
(when s3-1
|
||||
(when (and (!= *target* s3-1)
|
||||
(not (focus-test? (the-as process-focusable s3-1) disable dead inactive))
|
||||
@@ -1696,19 +1656,9 @@
|
||||
(let ((s4-0 (send-event-function *target* a1-11)))
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-0 384))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(v1-54 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-54 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when v1-54
|
||||
(let* ((s0-0 (-> v1-54 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> v1-54 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (and (!= *target* s1-1)
|
||||
(not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target))
|
||||
@@ -2087,12 +2037,7 @@
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod send-attack! ((this gun-red-shot) (arg0 process-drawable) (arg1 touching-shapes-entry))
|
||||
(let* ((s5-0 arg0)
|
||||
(v1-0 (if (type? s5-0 process-drawable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-0 (as-type arg0 process-drawable)))
|
||||
(when v1-0
|
||||
(let* ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> v1-0 root trans) (-> this start-pos)))
|
||||
(f30-0 (* (if (< (vector-length s5-2) 24576.0)
|
||||
@@ -2158,13 +2103,9 @@
|
||||
(defmethod init-probes! ((this gun-red-shot) (arg0 collide-shape))
|
||||
(let ((s5-0 (-> this probe-count)))
|
||||
(when (< s5-0 19)
|
||||
(let* ((s4-0 (-> arg0 process))
|
||||
(a0-2 (if (type? s4-0 process-focusable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
(s4-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((a0-2 (as-type (-> arg0 process) process-focusable))
|
||||
(s4-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(if a0-2
|
||||
(vector-copy! s4-1 (get-trans a0-2 3))
|
||||
(vector-copy! s4-1 (-> arg0 root-prim prim-core world-sphere))
|
||||
|
||||
@@ -960,14 +960,10 @@
|
||||
((>= f0-3 0.0)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) (-> s4-0 move-dist) f0-3)
|
||||
(vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) s3-0 (-> this track-beam-size))
|
||||
(let* ((s2-0 (-> s4-0 best-other-tri collide-ptr))
|
||||
(s0-0 (if (type? s2-0 collide-shape-prim)
|
||||
(the-as collide-shape-prim s2-0)
|
||||
)
|
||||
)
|
||||
(s1-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 start-pos)) 1638.4))
|
||||
(s2-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s0-0 (as-type (-> s4-0 best-other-tri collide-ptr) collide-shape-prim))
|
||||
(s1-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 start-pos)) 1638.4))
|
||||
(s2-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-copy! s2-1 (-> s4-0 start-pos))
|
||||
(cond
|
||||
((and s0-0
|
||||
|
||||
@@ -203,19 +203,9 @@
|
||||
(set! (-> sv-1072 w) 143360.0)
|
||||
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-1072 s5-0 384))
|
||||
(let* ((s3-0 (-> s5-0 s4-0))
|
||||
(v1-34 (if (type? s3-0 collide-shape)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-34 (as-type (-> s5-0 s4-0) collide-shape)))
|
||||
(when v1-34
|
||||
(let* ((s2-0 (-> v1-34 process))
|
||||
(s3-1 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (as-type (-> v1-34 process) process-focusable)))
|
||||
(when s3-1
|
||||
(when (and (!= *target* s3-1)
|
||||
(not (focus-test? (the-as process-focusable s3-1) disable dead inactive gun-no-target))
|
||||
@@ -291,11 +281,7 @@
|
||||
)
|
||||
)
|
||||
(dotimes (s5-3 sv-3800)
|
||||
(let* ((s4-4 (handle->process (-> sv-1076 (-> sv-3792 s5-3) targ)))
|
||||
(a0-95 (if (type? s4-4 process-focusable)
|
||||
s4-4
|
||||
)
|
||||
)
|
||||
(let* ((a0-95 (as-type (handle->process (-> sv-1076 (-> sv-3792 s5-3) targ)) process-focusable))
|
||||
(s4-5 this)
|
||||
(s3-4 (method-of-object s4-5 spawn-shot))
|
||||
(s2-2 (new 'stack-no-clear 'vector))
|
||||
@@ -1348,19 +1334,9 @@
|
||||
(set! sv-136 (the-as handle #f))
|
||||
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-84 s3-0 384))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(v1-31 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-31 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when v1-31
|
||||
(let* ((s0-0 (-> v1-31 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> v1-31 process) process-focusable)))
|
||||
(when s1-1
|
||||
(when (and (!= s4-0 s1-1)
|
||||
(!= s1-1 sv-40)
|
||||
@@ -1394,12 +1370,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 *target*)
|
||||
(s3-1 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) sv-84) (-> sv-84 w)))
|
||||
(when (and (!= s4-0 s3-1)
|
||||
(!= s3-1 sv-40)
|
||||
@@ -1451,17 +1422,9 @@
|
||||
(let ((s3-0 (the-as handle #f)))
|
||||
(when (and (nonzero? (-> arg1 best-other-tri collide-ptr))
|
||||
(-> arg1 best-other-tri collide-ptr)
|
||||
(let ((s1-0 (-> arg1 best-other-tri collide-ptr)))
|
||||
(if (type? s1-0 collide-shape-prim)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
(as-type (-> arg1 best-other-tri collide-ptr) collide-shape-prim)
|
||||
)
|
||||
(let* ((s2-1 (-> arg1 best-other-tri collide-ptr))
|
||||
(a0-4 (if (type? s2-1 collide-shape-prim)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
(let* ((a0-4 (as-type (-> arg1 best-other-tri collide-ptr) collide-shape-prim))
|
||||
(v1-4 a0-4)
|
||||
)
|
||||
(when v1-4
|
||||
|
||||
@@ -1343,12 +1343,7 @@
|
||||
:event target-standard-event-handler
|
||||
:exit target-indax-exit
|
||||
:trans (behavior ()
|
||||
(let* ((gp-0 (ppointer->process (-> self manipy)))
|
||||
(v1-2 (if (type? gp-0 manipy)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-2 (as-type (ppointer->process (-> self manipy)) manipy)))
|
||||
(cond
|
||||
((not (the-as manipy v1-2))
|
||||
(ja-channel-set! 0)
|
||||
|
||||
@@ -704,13 +704,9 @@
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> self shadow-backup) #f)
|
||||
(let* ((s5-1 (ppointer->process (-> self parent)))
|
||||
(v1-6 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
(a0-6 (-> self node-list data))
|
||||
)
|
||||
(let ((v1-6 (as-type (ppointer->process (-> self parent)) process-focusable))
|
||||
(a0-6 (-> self node-list data))
|
||||
)
|
||||
(set! (-> a0-6 0 param0) (the-as (function cspace transformq none) cspace<-cspace-normalized!))
|
||||
(set! (-> a0-6 0 param1) (the-as basic (-> v1-6 node-list data 6)))
|
||||
(set! (-> a0-6 0 param2) #f)
|
||||
|
||||
@@ -87,12 +87,7 @@
|
||||
(set! (-> gp-0 max-distance) 8192.0)
|
||||
(vector-copy! (-> gp-0 local-point) arg2)
|
||||
(vector-copy! (-> gp-0 local-normal) arg3)
|
||||
(let* ((s5-1 (-> arg0 root))
|
||||
(v1-7 (if (type? s5-1 collide-shape)
|
||||
(the-as collide-shape s5-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-7 (as-type (-> arg0 root) collide-shape)))
|
||||
(when v1-7
|
||||
(set! (-> gp-0 backup-radius) (-> v1-7 root-prim local-sphere w))
|
||||
(set! (-> gp-0 carry-radius) (-> v1-7 root-prim local-sphere w))
|
||||
@@ -188,12 +183,7 @@
|
||||
(set! (-> this pickup-time) (-> this process 0 clock frame-counter))
|
||||
(set! (-> arg0 pickup-time) (-> arg0 process 0 clock frame-counter))
|
||||
(set! (-> arg0 grab-trans-blend) 1.0)
|
||||
(let* ((s4-0 (-> arg0 process 0 control))
|
||||
(v1-17 (if (type? s4-0 collide-shape)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-17 (the-as control-info (as-type (-> arg0 process 0 control) collide-shape))))
|
||||
(if v1-17
|
||||
(set! (-> v1-17 root-prim local-sphere w) (-> arg0 carry-radius))
|
||||
)
|
||||
@@ -268,12 +258,7 @@
|
||||
(set! (-> a1-2 y) 0.0)
|
||||
(set-heading-vec-clear-roll-pitch! (-> arg0 process 0 control) a1-2)
|
||||
)
|
||||
(let* ((s4-0 (-> arg0 process 0 control))
|
||||
(v1-9 (if (type? s4-0 collide-shape)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-9 (the-as control-info (as-type (-> arg0 process 0 control) collide-shape))))
|
||||
(if v1-9
|
||||
(set! (-> v1-9 root-prim local-sphere w) (-> arg0 backup-radius))
|
||||
)
|
||||
@@ -369,12 +354,7 @@
|
||||
(set! (-> this pickup-time) (-> this process 0 clock frame-counter))
|
||||
(set! (-> arg0 pickup-time) (-> arg0 process 0 clock frame-counter))
|
||||
(set! (-> arg0 grab-trans-blend) 1.0)
|
||||
(let* ((s2-0 (-> arg0 process 0 control))
|
||||
(v1-17 (if (type? s2-0 collide-shape)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-17 (the-as control-info (as-type (-> arg0 process 0 control) collide-shape))))
|
||||
(if v1-17
|
||||
(set! (-> v1-17 root-prim local-sphere w) (-> arg0 carry-radius))
|
||||
)
|
||||
|
||||
@@ -460,19 +460,14 @@
|
||||
(when (-> self control danger-mode)
|
||||
(-> block param 1)
|
||||
(let* ((gp-1 (the-as object (-> block param 3)))
|
||||
(s5-1 (-> (the-as collide-query gp-1) best-other-tri collide-ptr))
|
||||
(s4-1 (if (type? s5-1 collide-shape-prim)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
(s3-1 (if s4-1
|
||||
(-> (the-as collide-shape-prim s4-1) cshape process)
|
||||
(the-as process-drawable #f)
|
||||
)
|
||||
)
|
||||
(s5-2 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
(s4-1 (as-type (-> (the-as collide-query gp-1) best-other-tri collide-ptr) collide-shape-prim))
|
||||
(s5-2 (as-type
|
||||
(if s4-1
|
||||
(-> (the-as collide-shape-prim s4-1) cshape process)
|
||||
(the-as process-drawable #f)
|
||||
)
|
||||
process-focusable
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and s4-1 (and (or (and s5-2 (focus-test? (the-as process-focusable s5-2) dead))
|
||||
@@ -2401,12 +2396,7 @@
|
||||
(vector-copy! (-> self control unknown-vector38) (-> self control trans))
|
||||
(set! (-> self control unknown-quat39 quad) (-> self control quat quad))
|
||||
(set! (-> self control unknown-quat40 quad) (-> self control quat quad))
|
||||
(let* ((gp-1 (handle->process arg0))
|
||||
(v1-23 (if (type? gp-1 process-drawable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-23 (as-type (handle->process arg0) process-drawable)))
|
||||
(when v1-23
|
||||
(vector-copy! (-> self control unknown-vector38) (-> (the-as process-drawable v1-23) root trans))
|
||||
(set! (-> self control unknown-quat40 quad) (-> (the-as process-drawable v1-23) root quat quad))
|
||||
@@ -2468,12 +2458,7 @@
|
||||
(vector-copy! (-> self control unknown-vector38) (-> self control trans))
|
||||
(set! (-> self control unknown-quat39 quad) (-> self control quat quad))
|
||||
(set! (-> self control unknown-quat40 quad) (-> self control quat quad))
|
||||
(let* ((gp-1 (handle->process arg0))
|
||||
(v1-23 (if (type? gp-1 process-drawable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-23 (as-type (handle->process arg0) process-drawable)))
|
||||
(when v1-23
|
||||
(vector-copy! (-> self control unknown-vector38) (-> (the-as process-drawable v1-23) root trans))
|
||||
(set! (-> self control unknown-quat40 quad) (-> (the-as process-drawable v1-23) root quat quad))
|
||||
|
||||
@@ -145,12 +145,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-31 gp-0))
|
||||
(set! (-> v1-31 width) (the float 340))
|
||||
)
|
||||
(let ((v1-32 gp-0))
|
||||
(set! (-> v1-32 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 340)
|
||||
(set-height! gp-0 80)
|
||||
(let ((v1-33 gp-0)
|
||||
(a0-19 (-> *setting-control* user-default language))
|
||||
)
|
||||
|
||||
@@ -60,11 +60,7 @@
|
||||
(ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0)
|
||||
(ja-post)
|
||||
(logior! (-> self draw status) (draw-control-status disable-fog))
|
||||
(let ((gp-1 (handle->process (-> arg0 owner))))
|
||||
(when (if (type? gp-1 process-focusable)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
(when (as-type (handle->process (-> arg0 owner)) process-focusable)
|
||||
)
|
||||
(set! (-> self event-hook) (-> (method-of-type shield-sphere shield-enabled) event))
|
||||
(init-and-go! self)
|
||||
|
||||
@@ -738,14 +738,9 @@
|
||||
:event target-standard-event-handler
|
||||
:exit target-pilot-exit
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 (handle->process (-> self pilot vehicle))))
|
||||
(when (not (if (type? gp-0 vehicle)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
(go target-falling #f)
|
||||
)
|
||||
(when (not (as-type (handle->process (-> self pilot vehicle)) vehicle))
|
||||
(ja-channel-set! 0)
|
||||
(go target-falling #f)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 handle))
|
||||
@@ -917,12 +912,7 @@
|
||||
(vector-copy! (-> gp-0 pilot-start-grab-pos) (-> self control trans))
|
||||
(set! (-> gp-0 actor-handle) (-> arg0 handle))
|
||||
((-> target-edge-grab enter))
|
||||
(let* ((s5-1 (handle->process (-> gp-0 actor-handle)))
|
||||
(a0-9 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-9 (as-type (handle->process (-> gp-0 actor-handle)) process-focusable)))
|
||||
(set! (-> gp-0 pilot-edge-grab?)
|
||||
(if (and a0-9
|
||||
(< 24576.0 (fabs (- (-> (get-trans (the-as process-focusable a0-9) 0) y) (-> self control trans y))))
|
||||
|
||||
@@ -1368,12 +1368,7 @@
|
||||
)
|
||||
(send-event (handle->process (-> self control unknown-combo-tracker00 target)) 'combo)
|
||||
)
|
||||
(let* ((s5-0 (handle->process (-> self control unknown-combo-tracker00 target)))
|
||||
(gp-0 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (as-type (handle->process (-> self control unknown-combo-tracker00 target)) process-focusable)))
|
||||
(let ((s5-1 (get-trans (the-as process-focusable gp-0) 3)))
|
||||
(when (and (< 2048.0 (vector-vector-distance (-> self control trans) s5-1))
|
||||
(or (and (= gp-0 (handle->process sv-56)) (not (time-elapsed? (the-as time-frame sv-64) (seconds 0.1))))
|
||||
@@ -2367,12 +2362,7 @@
|
||||
(set! sv-120 (fill-actor-list-for-box *actor-hash* sv-128 (-> sv-112 data) (-> sv-112 allocated-length)))
|
||||
(set! (-> sv-112 length) sv-120)
|
||||
(countdown (s5-0 sv-120)
|
||||
(let* ((s4-0 (-> sv-112 s5-0 process))
|
||||
(v1-56 (if (type? s4-0 process-focusable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-56 (as-type (-> sv-112 s5-0 process) process-focusable)))
|
||||
(when (and v1-56 (logtest? (process-mask crate enemy guard vehicle) (-> v1-56 mask)))
|
||||
(set! (-> sv-132 (-> sv-132 length)) (process->handle v1-56))
|
||||
(+! (-> sv-132 length) 1)
|
||||
|
||||
@@ -2245,13 +2245,9 @@
|
||||
cfg-138
|
||||
:delay (nop!)
|
||||
)
|
||||
(let ((s5-1 (handle->process (-> self attack-info attacker))))
|
||||
(when (if (type? s5-1 water-vol)
|
||||
s5-1
|
||||
)
|
||||
(logior! (-> self target-flags) (target-flags tf14))
|
||||
(set! (-> self alt-cam-pos y) (+ 4096.0 (-> self water height)))
|
||||
)
|
||||
(when (as-type (handle->process (-> self attack-info attacker)) water-vol)
|
||||
(logior! (-> self target-flags) (target-flags tf14))
|
||||
(set! (-> self alt-cam-pos y) (+ 4096.0 (-> self water height)))
|
||||
)
|
||||
(set! (-> self control mod-surface) *neutral-mods*)
|
||||
(case arg0
|
||||
|
||||
@@ -344,11 +344,7 @@
|
||||
2.0
|
||||
0.0
|
||||
(let* ((f30-0 (penetrate-using->damage s0-0))
|
||||
(s2-0 arg0)
|
||||
(s5-0 (if (type? s2-0 process-focusable)
|
||||
(the-as process-focusable s2-0)
|
||||
)
|
||||
)
|
||||
(s5-0 (as-type arg0 process-focusable))
|
||||
(s2-1 (and s5-0 (focus-test? s5-0 dead hit)))
|
||||
)
|
||||
(set! sv-96
|
||||
|
||||
@@ -253,12 +253,7 @@
|
||||
)
|
||||
)
|
||||
(when (= (-> self ext-anim) (target-anim default))
|
||||
(let* ((s5-1 (handle->process arg0))
|
||||
(v1-24 (if (type? s5-1 process-drawable)
|
||||
(the-as process-drawable s5-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-24 (as-type (handle->process arg0) process-drawable)))
|
||||
(when v1-24
|
||||
(let ((s4-1 (-> v1-24 root trans))
|
||||
(v1-27 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg main)))
|
||||
@@ -349,12 +344,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-21 gp-0))
|
||||
(set! (-> v1-21 width) (the float 340))
|
||||
)
|
||||
(let ((v1-22 gp-0))
|
||||
(set! (-> v1-22 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 340)
|
||||
(set-height! gp-0 80)
|
||||
(let ((v1-23 gp-0)
|
||||
(a0-16 (-> *setting-control* user-default language))
|
||||
)
|
||||
|
||||
@@ -2519,12 +2519,7 @@
|
||||
(+! (-> self clock ref-count) -1)
|
||||
(+! (-> self parent 0 clock ref-count) 1)
|
||||
(set! (-> self clock) (-> self parent 0 clock))
|
||||
(while (let* ((s5-2 (ppointer->process (-> self parent)))
|
||||
(v1-31 (if (type? s5-2 process-focusable)
|
||||
s5-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(while (let ((v1-31 (as-type (ppointer->process (-> self parent)) process-focusable)))
|
||||
(and v1-31
|
||||
(or (focus-test? v1-31 dead hit) (and (-> v1-31 next-state) (let ((v1-34 (-> v1-31 next-state name)))
|
||||
(or (= v1-34 'hit)
|
||||
@@ -3033,16 +3028,12 @@
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((gp-0 (ppointer->process (-> self parent)))
|
||||
(s3-0 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(s4-0 (camera-matrix))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
(f30-0 4096.0)
|
||||
)
|
||||
(let ((s3-0 (the-as target (as-type (ppointer->process (-> self parent)) process-focusable)))
|
||||
(s4-0 (camera-matrix))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
(f30-0 4096.0)
|
||||
)
|
||||
(let ((f0-0 3.0))
|
||||
(set-vector! (-> self root scale) f0-0 f0-0 f0-0 1.0)
|
||||
)
|
||||
|
||||
@@ -1104,12 +1104,7 @@
|
||||
(go-virtual slide-control-watch)
|
||||
)
|
||||
(('update)
|
||||
(let* ((s4-0 proc)
|
||||
(gp-0 (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (as-type proc process-drawable)))
|
||||
(if gp-0
|
||||
(find-target-point (-> (the-as process-drawable gp-0) root trans))
|
||||
)
|
||||
@@ -1135,15 +1130,11 @@
|
||||
(process-entity-status! self (entity-perm-status no-kill) #f)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 (handle->process (-> self target))))
|
||||
(cond
|
||||
((if (type? gp-0 process-drawable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(go-virtual slide-control-watch)
|
||||
)
|
||||
(cond
|
||||
((as-type (handle->process (-> self target)) process-drawable)
|
||||
)
|
||||
(else
|
||||
(go-virtual slide-control-watch)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -195,12 +195,7 @@
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('touched)
|
||||
(let* ((s4-0 proc)
|
||||
(v1-1 (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-1 (as-type proc process-drawable)))
|
||||
(when v1-1
|
||||
(-> (the-as process-drawable v1-1) root)
|
||||
(send-event
|
||||
|
||||
@@ -743,12 +743,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-5 gp-0))
|
||||
(set! (-> v1-5 width) (the float 340))
|
||||
)
|
||||
(let ((v1-6 gp-0))
|
||||
(set! (-> v1-6 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 340)
|
||||
(set-height! gp-0 80)
|
||||
(let ((v1-7 gp-0)
|
||||
(a0-6 (-> *setting-control* user-default language))
|
||||
)
|
||||
@@ -1486,12 +1482,7 @@
|
||||
)
|
||||
(let ((f30-1 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 20.0))))
|
||||
(let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 0.0 20.0)))
|
||||
(let* ((gp-2 (handle->process (-> self turret handle)))
|
||||
(a0-16 (if (type? gp-2 process-drawable)
|
||||
gp-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-16 (as-type (handle->process (-> self turret handle)) process-drawable)))
|
||||
(if a0-16
|
||||
(vector-copy! (-> self alt-cam-pos) (-> (the-as process-drawable a0-16) root trans))
|
||||
)
|
||||
@@ -1530,12 +1521,7 @@
|
||||
(ja-no-eval :group! jakb-turret-for-get-on-ja :num! (seek! (ja-aframe 46.0 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 20.0))))
|
||||
(let* ((s5-2 (handle->process (-> self turret handle)))
|
||||
(a0-12 (if (type? s5-2 process-drawable)
|
||||
s5-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-12 (as-type (handle->process (-> self turret handle)) process-drawable)))
|
||||
(if a0-12
|
||||
(vector-copy! (-> self alt-cam-pos) (-> (the-as process-drawable a0-12) root trans))
|
||||
)
|
||||
@@ -1884,9 +1870,7 @@
|
||||
(the-as attack-info gp-1)
|
||||
(-> arg3 param 1)
|
||||
self
|
||||
(if (type? arg0 process-drawable)
|
||||
arg0
|
||||
)
|
||||
(as-type arg0 process-drawable)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
)
|
||||
(case (-> (the-as attack-info gp-1) mode)
|
||||
|
||||
@@ -1705,16 +1705,8 @@
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (if (type? arg1 process-drawable)
|
||||
arg1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-0 (if (type? arg2 process-drawable)
|
||||
arg2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type arg1 process-drawable)))
|
||||
(let ((v1-0 (as-type arg2 process-drawable)))
|
||||
(cond
|
||||
((logtest? (attack-mask attacker-velocity) (-> this mask))
|
||||
(vector-copy! (-> arg0 attacker-velocity) (-> this attacker-velocity))
|
||||
@@ -1854,12 +1846,7 @@
|
||||
)
|
||||
(cond
|
||||
((not (logtest? s4-0 (attack-mask vector)))
|
||||
(let* ((s2-0 (handle->process (-> this attacker)))
|
||||
(v1-65 (if (type? s2-0 process-drawable)
|
||||
(the-as process-drawable s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-65 (as-type (handle->process (-> this attacker)) process-drawable)))
|
||||
(when (and v1-65 (nonzero? (-> v1-65 root)))
|
||||
(vector-copy! (-> this trans) (-> v1-65 root trans))
|
||||
(vector-! (-> this vector) (-> arg1 root trans) (-> v1-65 root trans))
|
||||
@@ -1868,12 +1855,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((s3-1 (handle->process (-> this attacker)))
|
||||
(v1-72 (if (type? s3-1 process-drawable)
|
||||
(the-as process-drawable s3-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-72 (as-type (handle->process (-> this attacker)) process-drawable)))
|
||||
(if (and v1-72 (nonzero? (-> v1-72 root)))
|
||||
(vector-copy! (-> this trans) (-> v1-72 root trans))
|
||||
)
|
||||
@@ -2324,12 +2306,8 @@
|
||||
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((v1-14 gp-0))
|
||||
(set! (-> v1-14 width) (the float 340))
|
||||
)
|
||||
(let ((v1-15 gp-0))
|
||||
(set! (-> v1-15 height) (the float 80))
|
||||
)
|
||||
(set-width! gp-0 340)
|
||||
(set-height! gp-0 80)
|
||||
(let ((v1-16 gp-0)
|
||||
(a0-13 (-> *setting-control* user-default language))
|
||||
)
|
||||
|
||||
@@ -260,9 +260,10 @@
|
||||
(go target-running-attack)
|
||||
)
|
||||
(when (and (turn-around?) (time-elapsed? (-> self state-time) (seconds 0.3)))
|
||||
(set! (-> self control transv quad)
|
||||
(-> self control transv-history (-> self control idx-of-fastest-xz-vel) quad)
|
||||
)
|
||||
(vector-copy!
|
||||
(-> self control transv)
|
||||
(-> self control transv-history (-> self control idx-of-fastest-xz-vel))
|
||||
)
|
||||
(set! (-> self control transv w) 1.0)
|
||||
(go target-turn-around)
|
||||
)
|
||||
@@ -2219,16 +2220,15 @@
|
||||
(align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0)
|
||||
(set! (-> self control mod-surface) *attack-mods*)
|
||||
(when (and gp-0 (send-event (handle->process (-> self control unknown-combo-tracker00 target)) 'combo))
|
||||
(let* ((s5-1 (handle->process (-> self control unknown-combo-tracker00 target)))
|
||||
(s5-2 (get-trans
|
||||
(the-as process-focusable (if (type? s5-1 process-focusable)
|
||||
(the-as process-focusable s5-1)
|
||||
)
|
||||
)
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 (get-trans
|
||||
(the-as
|
||||
process-focusable
|
||||
(as-type (handle->process (-> self control unknown-combo-tracker00 target)) process-focusable)
|
||||
)
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< 4096.0 (vector-vector-xz-distance s5-2 (-> self control trans)))
|
||||
(let ((f30-1 (-> self control transv y)))
|
||||
(vector-! (-> self control transv) s5-2 (-> self control trans))
|
||||
@@ -2377,18 +2377,9 @@
|
||||
(set-time! (-> self control sliding-start-time))
|
||||
(set-time! (-> self gun combo-window-start))
|
||||
(set! (-> self gun combo-window-state) (-> self state name))
|
||||
(let ((v1-13 (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-13 (as-type proc process-focusable)))
|
||||
(when v1-13
|
||||
(let* ((s5-1 (-> (the-as process-focusable v1-13) root))
|
||||
(v1-14 (if (type? s5-1 collide-shape)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-14 (as-type (-> (the-as process-focusable v1-13) root) collide-shape)))
|
||||
(if (and v1-14 (or (logtest? (-> v1-14 root-prim prim-core collide-as) (collide-spec enemy))
|
||||
(logtest? (-> v1-14 root-prim prim-core action) (collide-action no-smack))
|
||||
)
|
||||
|
||||
@@ -648,12 +648,7 @@
|
||||
0
|
||||
(ja-channel-set! 0)
|
||||
(until #f
|
||||
(let* ((s5-0 (handle->process arg0))
|
||||
(a0-6 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-6 (as-type (handle->process arg0) process-focusable)))
|
||||
(if a0-6
|
||||
(move-to-point! (-> self control) (get-trans (the-as process-focusable a0-6) 0))
|
||||
)
|
||||
|
||||
@@ -262,12 +262,7 @@
|
||||
(init-vf0-vector)
|
||||
(cond
|
||||
((= (-> arg1 position) #t)
|
||||
(let* ((s3-0 (handle->process (-> arg1 handle)))
|
||||
(v1-4 (if (type? s3-0 process-drawable)
|
||||
(the-as process-drawable s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (as-type (handle->process (-> arg1 handle)) process-drawable)))
|
||||
(if (and v1-4 (nonzero? (-> v1-4 root)))
|
||||
(vector-copy! (-> arg1 last-world-pos) (-> v1-4 root trans))
|
||||
)
|
||||
@@ -277,13 +272,12 @@
|
||||
(= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor)
|
||||
)
|
||||
(let* ((v1-14 (the-as entity-actor (-> arg1 position)))
|
||||
(s3-1 (if v1-14
|
||||
(-> v1-14 extra process)
|
||||
)
|
||||
)
|
||||
(a0-13 (if (type? s3-1 process-drawable)
|
||||
(the-as process-drawable s3-1)
|
||||
)
|
||||
(a0-13 (as-type
|
||||
(if v1-14
|
||||
(-> v1-14 extra process)
|
||||
)
|
||||
process-drawable
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-13
|
||||
@@ -668,12 +662,8 @@
|
||||
)
|
||||
)
|
||||
(let ((f30-2 (* 0.0024038462 (the float (- arg3 arg1)))))
|
||||
(let ((v1-138 s3-1))
|
||||
(set! (-> v1-138 scale) f30-2)
|
||||
)
|
||||
(let ((v1-139 s3-1))
|
||||
(set! (-> v1-139 width) (the float (the int (* 400.0 f30-2))))
|
||||
)
|
||||
(set-scale! s3-1 f30-2)
|
||||
(set-width! s3-1 (the int (* 400.0 f30-2)))
|
||||
(let ((a0-100 s3-1))
|
||||
(set! (-> a0-100 flags) (font-flags kerning middle large))
|
||||
)
|
||||
|
||||
@@ -1673,12 +1673,7 @@
|
||||
)
|
||||
(set! s3-0 (cond
|
||||
((= (the-as vector s2-0) #t)
|
||||
(let* ((s2-1 (handle->process (-> v1-9 handle)))
|
||||
(v1-13 (if (type? s2-1 process-drawable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-13 (as-type (handle->process (-> v1-9 handle)) process-drawable)))
|
||||
(if v1-13
|
||||
(set! s3-0 (-> (the-as process-drawable v1-13) root trans))
|
||||
)
|
||||
@@ -1687,13 +1682,12 @@
|
||||
)
|
||||
((and (= (logand (the-as int s2-0) 7) 4) (= (-> (the-as basic s2-0) type) entity-actor))
|
||||
(let* ((v1-19 (the-as structure s2-0))
|
||||
(s3-1 (if (the-as vector v1-19)
|
||||
(-> (the-as entity-actor v1-19) extra process)
|
||||
)
|
||||
)
|
||||
(v1-21 (if (type? s3-1 process-drawable)
|
||||
s3-1
|
||||
)
|
||||
(v1-21 (as-type
|
||||
(if (the-as vector v1-19)
|
||||
(-> (the-as entity-actor v1-19) extra process)
|
||||
)
|
||||
process-drawable
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-21
|
||||
@@ -2301,12 +2295,7 @@
|
||||
(sv-224 matrix)
|
||||
(sv-228 matrix)
|
||||
)
|
||||
(let ((s3-0 (handle->process (-> arg1 handle))))
|
||||
(set! sv-16 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-16 (as-type (handle->process (-> arg1 handle)) process-drawable))
|
||||
(set! sv-20 (-> arg0 buf))
|
||||
(when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root)))
|
||||
(set! sv-208 (-> sv-20 base))
|
||||
@@ -2439,12 +2428,7 @@
|
||||
(sv-136 vector)
|
||||
(sv-140 matrix)
|
||||
)
|
||||
(let ((s0-0 (handle->process (-> arg1 handle))))
|
||||
(set! sv-16 (if (type? s0-0 process-drawable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-16 (as-type (handle->process (-> arg1 handle)) process-drawable))
|
||||
(set! sv-20 (-> *video-params* relative-x-scale))
|
||||
(set! sv-24 (-> arg0 buf))
|
||||
(when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root)))
|
||||
@@ -2585,12 +2569,7 @@
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(let ((s3-0 (handle->process (-> arg1 handle))))
|
||||
(set! sv-16 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-16 (as-type (handle->process (-> arg1 handle)) process-drawable))
|
||||
(set! sv-20 (-> arg0 buf))
|
||||
(when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root)))
|
||||
(set! sv-208 (-> sv-20 base))
|
||||
@@ -2755,12 +2734,7 @@
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
)
|
||||
(let ((s3-0 (handle->process (-> arg1 handle))))
|
||||
(set! sv-16 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-16 (as-type (handle->process (-> arg1 handle)) process-drawable))
|
||||
(set! sv-20 (-> arg0 buf))
|
||||
(when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root)))
|
||||
(set! sv-208 (-> sv-20 base))
|
||||
@@ -3273,12 +3247,7 @@
|
||||
(let ((s1-0 (target-pos 0)))
|
||||
(cond
|
||||
((= (-> arg1 position) #t)
|
||||
(let* ((s3-0 (handle->process (-> arg1 handle)))
|
||||
(v1-4 (if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-4 (as-type (handle->process (-> arg1 handle)) process-drawable)))
|
||||
(when (and v1-4 (nonzero? (-> (the-as process-drawable v1-4) root)))
|
||||
(vector-copy! (-> arg1 last-world-pos) (-> (the-as process-drawable v1-4) root trans))
|
||||
(vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos))
|
||||
@@ -3289,13 +3258,12 @@
|
||||
(= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor)
|
||||
)
|
||||
(let* ((v1-15 (the-as structure (-> arg1 position)))
|
||||
(s3-1 (if (the-as vector v1-15)
|
||||
(-> (the-as entity-actor v1-15) extra process)
|
||||
)
|
||||
)
|
||||
(a0-16 (if (type? s3-1 process-drawable)
|
||||
s3-1
|
||||
)
|
||||
(a0-16 (as-type
|
||||
(if (the-as vector v1-15)
|
||||
(-> (the-as entity-actor v1-15) extra process)
|
||||
)
|
||||
process-drawable
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1457,17 +1457,11 @@
|
||||
)
|
||||
(dotimes (s5-1 (length gp-0))
|
||||
(set! (-> self current-index) s5-1)
|
||||
(let ((v1-43 sv-208))
|
||||
(set! (-> v1-43 scale) 0.5)
|
||||
)
|
||||
(set-scale! sv-208 0.5)
|
||||
(set! (-> sv-208 origin x) 70.0)
|
||||
(set! (-> sv-208 origin y) (the float sv-212))
|
||||
(let ((v1-48 sv-208))
|
||||
(set! (-> v1-48 width) (the float 375))
|
||||
)
|
||||
(let ((v1-49 sv-208))
|
||||
(set! (-> v1-49 height) (the float 30))
|
||||
)
|
||||
(set-width! sv-208 375)
|
||||
(set-height! sv-208 30)
|
||||
(set! (-> sv-208 flags) (font-flags kerning middle middle-vert large))
|
||||
(let ((v1-51 sv-208))
|
||||
(set! (-> v1-51 color) (if (and (= s5-1 (-> self option-index)) (= (-> self menu-transition) 0.0))
|
||||
|
||||
@@ -376,9 +376,7 @@
|
||||
(if (logtest? (-> arg2 flags) (font-flags middle-vert))
|
||||
(+! (-> arg2 origin y) (* 0.5 (- f30-0 f1-2)))
|
||||
)
|
||||
(let ((v1-10 arg2))
|
||||
(set! (-> v1-10 scale) (* f28-0 arg1))
|
||||
)
|
||||
(set-scale! arg2 (* f28-0 arg1))
|
||||
(set! (-> arg2 width) f0-1)
|
||||
(set! (-> arg2 height) f1-2)
|
||||
)
|
||||
|
||||
@@ -256,6 +256,18 @@ This is the main vector type."
|
||||
#f
|
||||
)
|
||||
|
||||
(defmacro as-type (this type)
|
||||
"If this is the specified type, return this cast to that type. Otherwise, return #f."
|
||||
(with-gensyms (obj)
|
||||
`(the ,type (let ((,obj ,this))
|
||||
(if (type? ,obj ,type)
|
||||
,obj
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun find-parent-method ((typ type) (method-id int))
|
||||
"Find the closest parent type that has a different implementation of the given method and return that method.
|
||||
If it does not exist, return `nothing` function.
|
||||
|
||||
@@ -318,12 +318,7 @@
|
||||
((-> this entity-pos)
|
||||
(vector-copy! (-> this basetrans) (-> this entity-pos))
|
||||
(vector-copy! (-> this root trans) (-> this entity-pos))
|
||||
(let* ((s4-0 (handle->process (-> this focus)))
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (as-type (handle->process (-> this focus)) process-focusable)))
|
||||
(when s5-0
|
||||
(let ((a0-9 (new 'stack-no-clear 'vector)))
|
||||
(vector-copy! a0-9 (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> this root trans)))
|
||||
@@ -378,12 +373,7 @@
|
||||
(vector-copy! (-> this basetrans) s4-1)
|
||||
)
|
||||
(vector-copy! (-> this root trans) (-> this basetrans))
|
||||
(let* ((s4-2 (handle->process (-> this focus)))
|
||||
(a1-20 (if (type? s4-2 process-focusable)
|
||||
(the-as process-focusable s4-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-20 (as-type (handle->process (-> this focus)) process-focusable)))
|
||||
(if a1-20
|
||||
(vector-! (-> this local-offset) (-> this basetrans) (-> a1-20 root trans))
|
||||
)
|
||||
@@ -467,16 +457,10 @@
|
||||
(sound-stop (-> self charge-sound))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((gp-0 (handle->process (-> self focus)))
|
||||
(a1-2 (-> (the-as process-focusable (if (type? gp-0 process-focusable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
root
|
||||
trans
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-2
|
||||
(-> (the-as process-focusable (as-type (handle->process (-> self focus)) process-focusable)) root trans)
|
||||
)
|
||||
)
|
||||
(if (or (< 143360.0 (vector-vector-xz-distance (-> self root trans) a1-2))
|
||||
(and (not (logtest? (-> self draw status) (draw-control-status on-screen)))
|
||||
(let ((gp-1 sphere-in-view-frustum?)
|
||||
@@ -521,12 +505,7 @@
|
||||
(set! (-> gp-0 quad) (the-as uint128 0))
|
||||
(quaternion-identity! s5-0)
|
||||
(send-event (handle->process (-> self focus)) 'retrieve-spot (-> self surround-spot) gp-0 s5-0 #t)
|
||||
(let* ((s4-0 (handle->process (-> self focus)))
|
||||
(a1-3 (if (type? s4-0 process-focusable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-3 (as-type (handle->process (-> self focus)) process-focusable)))
|
||||
(if a1-3
|
||||
(vector+! gp-0 (-> self spot-base-pos) (-> a1-3 root trans))
|
||||
)
|
||||
@@ -876,12 +855,7 @@
|
||||
(set! (-> s5-0 quad) (the-as uint128 0))
|
||||
(quaternion-identity! s4-0)
|
||||
(send-event (handle->process (-> this focus)) 'retrieve-spot (-> this surround-spot) s5-0 s4-0 #t)
|
||||
(let* ((s3-0 (handle->process (-> this focus)))
|
||||
(a1-3 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-3 (as-type (handle->process (-> this focus)) process-focusable)))
|
||||
(if a1-3
|
||||
(vector+! s5-0 (-> this spot-base-pos) (-> (the-as process-focusable a1-3) root trans))
|
||||
)
|
||||
@@ -1156,12 +1130,7 @@
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((gp-0 (handle->process (-> self track-obj)))
|
||||
(a0-4 (if (type? gp-0 process-focusable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-4 (as-type (handle->process (-> self track-obj)) process-focusable)))
|
||||
(if a0-4
|
||||
(vector-copy! (-> self track-pos) (get-trans a0-4 2))
|
||||
)
|
||||
@@ -1238,19 +1207,9 @@
|
||||
(set! (-> s5-0 r) 131072.0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384))
|
||||
(let* ((s2-0 (-> s4-0 s3-0))
|
||||
(v1-8 (if (type? s2-0 collide-shape)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-8 (as-type (-> s4-0 s3-0) collide-shape)))
|
||||
(when v1-8
|
||||
(let* ((s2-1 (-> v1-8 process))
|
||||
(a0-8 (if (type? s2-1 process-focusable)
|
||||
s2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-8 (as-type (-> v1-8 process) process-focusable)))
|
||||
(when a0-8
|
||||
(when (and (= (-> a0-8 type) bt-barrel) (< (-> this num-nearby-barrels) 16) (!= a0-8 this))
|
||||
(set! (-> this nearby-barrels (-> this num-nearby-barrels)) (process->handle a0-8))
|
||||
@@ -1271,12 +1230,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s3-1 *target*)
|
||||
(s4-1 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 r)))
|
||||
(when (and (= (-> s4-1 type) bt-barrel) (< (-> this num-nearby-barrels) 16) (!= s4-1 this))
|
||||
(set! (-> this nearby-barrels (-> this num-nearby-barrels)) (process->handle s4-1))
|
||||
@@ -1383,19 +1337,9 @@
|
||||
(set! (-> s5-0 r) 131072.0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
|
||||
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384))
|
||||
(let* ((s2-0 (-> s4-0 s3-0))
|
||||
(v1-6 (if (type? s2-0 collide-shape)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-6 (as-type (-> s4-0 s3-0) collide-shape)))
|
||||
(when v1-6
|
||||
(let* ((s1-0 (-> v1-6 process))
|
||||
(s2-1 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (as-type (-> v1-6 process) process-focusable)))
|
||||
(when s2-1
|
||||
(when (or (type? s2-1 blow-tower-enemy) (type? s2-1 bombbot))
|
||||
(let* ((s1-1 (get-trans (the-as process-focusable s2-1) 3))
|
||||
@@ -1445,12 +1389,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s3-1 *target*)
|
||||
(s4-1 (if (type? s3-1 process-focusable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (the-as target (as-type *target* process-focusable))))
|
||||
(when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 r)))
|
||||
(when (or (type? s4-1 blow-tower-enemy) (type? s4-1 bombbot))
|
||||
(let* ((s5-1 (get-trans s4-1 3))
|
||||
|
||||
@@ -231,12 +231,7 @@
|
||||
|
||||
(defmethod bt-roboguard-method-46 ((this bt-roboguard))
|
||||
(local-vars (s5-1 object))
|
||||
(let* ((s5-0 (handle->process (-> this focus)))
|
||||
(a0-5 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-5 (as-type (handle->process (-> this focus)) process-focusable)))
|
||||
(cond
|
||||
(a0-5
|
||||
(set! s5-1 (-> this focus-pos))
|
||||
@@ -2345,12 +2340,7 @@
|
||||
:virtual #t
|
||||
:event blow-tower-enemy-handler
|
||||
:enter (behavior ()
|
||||
(let* ((gp-0 (handle->process (-> self target)))
|
||||
(v1-3 (if (type? gp-0 process-focusable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (as-type (handle->process (-> self target)) process-focusable)))
|
||||
(when v1-3
|
||||
(set! (-> self base-y) (-> v1-3 root trans y))
|
||||
(quaternion-copy! (-> self last-parent-quat) (-> v1-3 root quat))
|
||||
@@ -2405,13 +2395,9 @@
|
||||
(set! (-> this local-xform root trans z) (- (lerp (-> this chase-start-dist) 16384.0 f30-0)))
|
||||
(set! (-> this local-xform root trans y) (lerp (-> this preferred-height-offset) 0.0 f30-0))
|
||||
(set! (-> this local-xform root trans w) 1.0)
|
||||
(let* ((s5-1 (-> this xforms))
|
||||
(s3-1 (handle->process (-> this target)))
|
||||
(s4-2 (if (type? s3-1 process-focusable)
|
||||
(the-as process-focusable s3-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (-> this xforms))
|
||||
(s4-2 (as-type (handle->process (-> this target)) process-focusable))
|
||||
)
|
||||
(when s4-2
|
||||
(set! (-> s5-1 0 root trans quad) (-> (get-trans s4-2 3) quad))
|
||||
(let ((s4-3 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s4-2 root quat))))
|
||||
@@ -2942,14 +2928,13 @@
|
||||
(vf7 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let* ((s4-0
|
||||
(handle->process (-> *blow-tower-targets* target-handles (logand (rand-uint31-gen *random-generator*) 1)))
|
||||
)
|
||||
(s5-0 (if (type? s4-0 process-focusable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-0
|
||||
(as-type
|
||||
(handle->process (-> *blow-tower-targets* target-handles (logand (rand-uint31-gen *random-generator*) 1)))
|
||||
process-focusable
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(s5-0
|
||||
(vector-copy! (-> this target-pos) (get-trans s5-0 3))
|
||||
|
||||
@@ -370,12 +370,7 @@
|
||||
|
||||
(defmethod bt-vehicle-method-37 ((this bt-vehicle))
|
||||
(dotimes (s5-0 (-> this rider-spots length))
|
||||
(let* ((s3-0 (handle->process (-> this rider-spots data s5-0 rider)))
|
||||
(s4-0 (if (type? s3-0 process-focusable)
|
||||
(the-as process-focusable s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (as-type (handle->process (-> this rider-spots data s5-0 rider)) process-focusable)))
|
||||
(when s4-0
|
||||
(let ((a2-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat)))
|
||||
(s3-1 (-> s4-0 root trans))
|
||||
@@ -454,12 +449,7 @@
|
||||
)
|
||||
(send-event (handle->process (-> self task-man)) 'vehicle-explode)
|
||||
(dotimes (gp-3 (-> self rider-spots length))
|
||||
(let* ((s5-1 (handle->process (-> self rider-spots data gp-3 rider)))
|
||||
(a0-26 (if (type? s5-1 process-focusable)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-26 (as-type (handle->process (-> self rider-spots data gp-3 rider)) process-focusable)))
|
||||
(if a0-26
|
||||
(send-event a0-26 'die)
|
||||
)
|
||||
@@ -492,11 +482,7 @@
|
||||
(attack-info-method-9 arg1 s2-0 arg2 this)
|
||||
(vector-copy! sv-64 (-> s2-0 intersection))
|
||||
)
|
||||
(let ((a0-6 (if (type? arg2 process-focusable)
|
||||
arg2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-6 (as-type arg2 process-focusable)))
|
||||
(if a0-6
|
||||
(vector-copy! sv-64 (get-trans a0-6 3))
|
||||
)
|
||||
@@ -1593,18 +1579,12 @@
|
||||
)
|
||||
(dotimes (s5-0 (-> this num-onscreen-targets))
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s2-0 transform-point-vector!)
|
||||
(s1-0 s3-0)
|
||||
(s0-0 (handle->process (-> this onscreen-targets s5-0 hand)))
|
||||
)
|
||||
(s2-0 s1-0 (get-trans
|
||||
(the-as process-focusable (if (type? s0-0 process-focusable)
|
||||
(the-as process-focusable s0-0)
|
||||
)
|
||||
)
|
||||
3
|
||||
)
|
||||
)
|
||||
(transform-point-vector!
|
||||
s3-0
|
||||
(get-trans
|
||||
(the-as process-focusable (as-type (handle->process (-> this onscreen-targets s5-0 hand)) process-focusable))
|
||||
3
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (+ s5-0 1))
|
||||
(s1-1 (+ (-> this num-onscreen-targets) -1))
|
||||
@@ -1662,16 +1642,12 @@
|
||||
(!= (-> (handle->process (-> this onscreen-targets s5-1 hand)) type) bt-barrel)
|
||||
)
|
||||
(set! sv-96 (new 'stack-no-clear 'vector))
|
||||
(let ((s4-1 (handle->process (-> this onscreen-targets s5-1 hand))))
|
||||
(set! sv-100 (get-trans
|
||||
(the-as process-focusable (if (type? s4-1 process-focusable)
|
||||
(the-as process-focusable s4-1)
|
||||
)
|
||||
)
|
||||
3
|
||||
)
|
||||
(set! sv-100
|
||||
(get-trans
|
||||
(the-as process-focusable (as-type (handle->process (-> this onscreen-targets s5-1 hand)) process-focusable))
|
||||
3
|
||||
)
|
||||
)
|
||||
)
|
||||
(transform-point-vector! sv-96 sv-100)
|
||||
(+! (-> sv-96 x) -1792.0)
|
||||
(+! (-> sv-96 y) -1840.0)
|
||||
@@ -2068,12 +2044,7 @@
|
||||
(when v1-64
|
||||
(cond
|
||||
((= (-> this look-mode) 2)
|
||||
(let* ((s4-4 (-> v1-64 extra process))
|
||||
(a0-37 (if (type? s4-4 process-focusable)
|
||||
s4-4
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-37 (as-type (-> v1-64 extra process) process-focusable)))
|
||||
(cond
|
||||
((and a0-37
|
||||
(not (logtest? (-> (the-as process-focusable a0-37) focus-status) (focus-status disable dead ignore inactive))
|
||||
@@ -2096,12 +2067,7 @@
|
||||
)
|
||||
)
|
||||
(when (= (-> this look-mode) 3)
|
||||
(let* ((s4-8 (handle->process (-> this look-proc)))
|
||||
(a0-43 (if (type? s4-8 process-focusable)
|
||||
s4-8
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-43 (as-type (handle->process (-> this look-proc)) process-focusable)))
|
||||
(if (and a0-43
|
||||
(not (logtest? (-> (the-as process-focusable a0-43) focus-status) (focus-status disable dead ignore inactive))
|
||||
)
|
||||
@@ -2545,12 +2511,7 @@
|
||||
(s4-0 (-> v1-5 root-prim))
|
||||
)
|
||||
(when (logtest? (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle hit-by-others-list))
|
||||
(let ((s3-0 (-> v1-5 process)))
|
||||
(set! sv-32 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-32 (as-type (-> v1-5 process) process-focusable))
|
||||
(when (and sv-32
|
||||
(< (-> this num-onscreen-targets) 32)
|
||||
(not (logtest? (-> (the-as process-focusable sv-32) focus-status) (focus-status disable dead ignore inactive))
|
||||
@@ -2638,12 +2599,7 @@
|
||||
(s4-1 (-> v1-81 root-prim))
|
||||
)
|
||||
(when (logtest? (-> s4-1 prim-core collide-as) (collide-spec enemy obstacle hit-by-others-list))
|
||||
(let ((s3-9 (-> v1-81 process)))
|
||||
(set! sv-784 (if (type? s3-9 process-focusable)
|
||||
s3-9
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-784 (as-type (-> v1-81 process) process-focusable))
|
||||
(when (and sv-784
|
||||
(< (-> this num-onscreen-targets) 32)
|
||||
(not (logtest? (-> (the-as process-focusable sv-784) focus-status) (focus-status disable dead ignore inactive))
|
||||
@@ -2730,12 +2686,7 @@
|
||||
(s4-2 (-> v1-156 root-prim))
|
||||
)
|
||||
(when (logtest? (-> s4-2 prim-core collide-as) (collide-spec enemy obstacle hit-by-others-list))
|
||||
(let ((s3-18 (-> v1-156 process)))
|
||||
(set! sv-1536 (if (type? s3-18 process-focusable)
|
||||
s3-18
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-1536 (as-type (-> v1-156 process) process-focusable))
|
||||
(when (and sv-1536
|
||||
(< (-> this num-onscreen-targets) 32)
|
||||
(not (logtest? (-> (the-as process-focusable sv-1536) focus-status) (focus-status disable dead ignore inactive))
|
||||
@@ -2854,12 +2805,7 @@
|
||||
(new 'stack-no-clear 'vector)
|
||||
491520.0
|
||||
(quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))
|
||||
(let* ((s4-0 (handle->process (-> this parent-vehicle)))
|
||||
(v1-22 (if (type? s4-0 process-focusable)
|
||||
(the-as process-focusable s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-22 (as-type (handle->process (-> this parent-vehicle)) process-focusable)))
|
||||
(when v1-22
|
||||
(vector<-cspace! s5-0 (-> v1-22 node-list data (-> *bt-hellcat-gun-nodes* (-> this fire-index))))
|
||||
(send-event (handle->process (-> this parent-vehicle)) 'fire (-> this fire-index))
|
||||
@@ -2909,22 +2855,16 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (-> s4-2 best-other-tri collide-ptr) (let ((s3-5 (-> s4-2 best-other-tri collide-ptr)))
|
||||
(if (type? s3-5 collide-shape-prim-sphere)
|
||||
s3-5
|
||||
)
|
||||
)
|
||||
(when (and (-> s4-2 best-other-tri collide-ptr)
|
||||
(as-type (-> s4-2 best-other-tri collide-ptr) collide-shape-prim-sphere)
|
||||
)
|
||||
(let* ((s3-6 (-> s4-2 best-other-tri collide-ptr))
|
||||
(a0-50 (-> (the-as collide-shape-prim-sphere (if (type? s3-6 collide-shape-prim-sphere)
|
||||
(the-as collide-shape-prim-sphere s3-6)
|
||||
)
|
||||
)
|
||||
cshape
|
||||
process
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-50
|
||||
(-> (the-as collide-shape-prim-sphere (as-type (-> s4-2 best-other-tri collide-ptr) collide-shape-prim-sphere))
|
||||
cshape
|
||||
process
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-50
|
||||
(send-event
|
||||
a0-50
|
||||
@@ -4160,12 +4100,7 @@
|
||||
(set! (-> this dest-clock-scalar) (-> arg0 clock-scalar))
|
||||
)
|
||||
(((blow-tower-cmd-type play-sound))
|
||||
(let* ((s3-9 (handle->process (-> this target-handles (-> arg0 target))))
|
||||
(s4-7 (if (type? s3-9 process-focusable)
|
||||
(the-as process-focusable s3-9)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-7 (as-type (handle->process (-> this target-handles (-> arg0 target))) process-focusable)))
|
||||
(when s4-7
|
||||
(send-event (handle->process (-> this target-handles (-> arg0 target))) 'boost-thruster (-> arg0 time-offset))
|
||||
(sound-play "hc-whoosh" :position (-> s4-7 root trans))
|
||||
@@ -4443,12 +4378,7 @@
|
||||
((not (logtest? (-> arg1 mask) (attack-mask control)))
|
||||
(let ((s2-1 (new 'stack-no-clear 'attack-info)))
|
||||
(attack-info-method-9 arg1 s2-1 arg2 this)
|
||||
(let* ((s1-1 arg2)
|
||||
(a0-11 (if (type? s1-1 process-focusable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-11 (as-type arg2 process-focusable)))
|
||||
(if a0-11
|
||||
(vector-copy! (-> s2-1 intersection) (get-trans a0-11 3))
|
||||
)
|
||||
|
||||
@@ -458,15 +458,11 @@
|
||||
(('attack)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(let* ((gp-0 (ppointer->process (-> self parent)))
|
||||
(s3-0 (if (type? gp-0 process-focusable)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(s5-0 (new 'stack-no-clear 'traj3d-params))
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s3-0 (as-type (ppointer->process (-> self parent)) process-focusable))
|
||||
(s5-0 (new 'stack-no-clear 'traj3d-params))
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when s3-0
|
||||
(vector-rotate-around-y! gp-1 *x-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
|
||||
(let ((s2-1 (-> s5-0 dest)))
|
||||
@@ -543,12 +539,7 @@
|
||||
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
(case message
|
||||
(('touch)
|
||||
(let* ((s4-0 proc)
|
||||
(s3-0 (if (type? s4-0 process-drawable)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (as-type proc process-drawable)))
|
||||
(when s3-0
|
||||
(let ((a0-3 (-> (the-as process-focusable s3-0) root))
|
||||
(a1-2 (new 'stack-no-clear 'collide-query))
|
||||
@@ -1234,14 +1225,10 @@
|
||||
(when (>= f0-4 0.0)
|
||||
(vector+float*! s4-0 (-> s3-0 start-pos) (-> s3-0 move-dist) f0-4)
|
||||
(vector-float*! s5-0 s5-0 f0-4)
|
||||
(let* ((s1-1 (-> s3-0 best-other-tri collide-ptr))
|
||||
(s2-1 (if (type? s1-1 collide-shape-prim)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
(v1-22 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s3-0 start-pos) s4-0) 1638.4))
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s2-1 (as-type (-> s3-0 best-other-tri collide-ptr) collide-shape-prim))
|
||||
(v1-22 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s3-0 start-pos) s4-0) 1638.4))
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-copy! s3-1 s4-0)
|
||||
(vector+! s3-1 s3-1 v1-22)
|
||||
(cond
|
||||
@@ -1886,9 +1873,7 @@
|
||||
(f30-0 (t9-0 this arg0 arg1))
|
||||
)
|
||||
(cond
|
||||
((if (type? arg0 bombbot-bomb)
|
||||
arg0
|
||||
)
|
||||
((as-type arg0 bombbot-bomb)
|
||||
(set! *bombbot-hint* (new 'static 'sound-id))
|
||||
(if (rand-vu-percent? 0.1)
|
||||
(talker-spawn-func (-> *talker-speech* 169) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
@@ -2005,19 +1990,9 @@
|
||||
(s3-0 (new 'stack-no-clear 'array 'collide-shape 64))
|
||||
)
|
||||
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 64))
|
||||
(let* ((s1-0 (-> s3-0 s2-0))
|
||||
(a0-3 (if (type? s1-0 collide-shape)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-3 (as-type (-> s3-0 s2-0) collide-shape)))
|
||||
(when a0-3
|
||||
(let* ((s0-0 (-> a0-3 process))
|
||||
(s1-1 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-1 (as-type (-> a0-3 process) process-focusable)))
|
||||
(when (and s1-1
|
||||
(!= this s1-1)
|
||||
(not (focus-test? this inactive))
|
||||
@@ -3719,13 +3694,9 @@
|
||||
(defmethod enemy-touched-handler ((this bombbot) (arg0 process) (arg1 event-message-block))
|
||||
"General handler for when anything touches an enemy (automatic response)."
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-1 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (-> arg1 param 0))
|
||||
(v1-1 (as-type arg0 process-focusable))
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask guard vehicle civilian kg-robot metalhead) (-> arg0 mask))
|
||||
@@ -3780,32 +3751,18 @@
|
||||
(s4-0 (new 'stack-no-clear 'array 'collide-shape 64))
|
||||
)
|
||||
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 64))
|
||||
(let* ((s2-0 (-> s4-0 s3-0))
|
||||
(a0-3 (if (type? s2-0 collide-shape)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-3 (as-type (-> s4-0 s3-0) collide-shape)))
|
||||
(when a0-3
|
||||
(let* ((s1-0 (-> a0-3 process))
|
||||
(s2-1 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (as-type (-> a0-3 process) process-focusable)))
|
||||
(when (and (the-as process-focusable s2-1)
|
||||
(and (!= this (the-as process-focusable s2-1))
|
||||
(not (focus-test? this inactive))
|
||||
(not (focus-test? this disable))
|
||||
(not (focus-test? this dead))
|
||||
(let ((s1-1 (the-as process-focusable s2-1)))
|
||||
(and (if (type? s1-1 bombbot)
|
||||
s1-1
|
||||
)
|
||||
(the-as process-focusable s2-1)
|
||||
(not (logtest? (-> (the-as process-focusable s2-1) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
(and (as-type (the-as process-focusable s2-1) bombbot)
|
||||
(the-as process-focusable s2-1)
|
||||
(not (logtest? (-> (the-as process-focusable s2-1) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-0 (vector-vector-xz-distance (-> this root trans) (-> (the-as process-focusable s2-1) root trans))))
|
||||
@@ -4210,20 +4167,11 @@
|
||||
)
|
||||
(set! sv-896 (fill-actor-list-for-sphere *actor-hash* sv-876 sv-872 40960.0 sv-884 64 -1))
|
||||
(countdown (s5-3 sv-896)
|
||||
(let* ((s4-0 (-> sv-884 s5-3))
|
||||
(a0-19 (if (type? s4-0 collide-shape)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-19 (as-type (-> sv-884 s5-3) collide-shape)))
|
||||
(when a0-19
|
||||
(let* ((s3-0 (-> a0-19 process))
|
||||
(s4-1 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s4-1 (as-type (-> a0-19 process) process-focusable))
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (and s4-1
|
||||
(valid-target? this (the-as process-focusable s4-1))
|
||||
(not (logtest? (process-mask guard) (-> s4-1 mask)))
|
||||
@@ -4893,12 +4841,7 @@
|
||||
(let ((s4-2 10000))
|
||||
(dotimes (s3-0 3)
|
||||
(when (-> this bombbot-h s3-0)
|
||||
(let* ((s1-0 (handle->process (-> this bombbot-h s3-0)))
|
||||
(s2-0 (if (type? s1-0 bombbot)
|
||||
(the-as bombbot s1-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-0 (as-type (handle->process (-> this bombbot-h s3-0)) bombbot)))
|
||||
(when s2-0
|
||||
(+! s5-2 1)
|
||||
(let ((v1-114
|
||||
|
||||
@@ -321,22 +321,15 @@
|
||||
(or (= v1-7 'moving) (= v1-7 'sitting))
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (handle->process (-> this owner-handle)))
|
||||
(s4-2 (vector-!
|
||||
s4-1
|
||||
(get-trans
|
||||
(the-as process-focusable (if (type? s3-0 process-focusable)
|
||||
(the-as process-focusable s3-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(-> this root trans)
|
||||
)
|
||||
)
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s4-2
|
||||
(vector-!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(get-trans (the-as process-focusable (as-type (handle->process (-> this owner-handle)) process-focusable)) 0)
|
||||
(-> this root trans)
|
||||
)
|
||||
)
|
||||
(s3-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-1 quad) (the-as uint128 0))
|
||||
(set! (-> s4-2 y) 0.0)
|
||||
(let ((f28-0 1274.3112)
|
||||
@@ -347,12 +340,7 @@
|
||||
(set! f28-0 3276.8)
|
||||
(set! f30-0 204800.0)
|
||||
)
|
||||
(let* ((s2-0 arg0)
|
||||
(a0-16 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-16 (as-type arg0 process-focusable)))
|
||||
0.0
|
||||
(let ((f26-0 -0.3)
|
||||
(v1-22 a0-16)
|
||||
|
||||
@@ -268,12 +268,7 @@
|
||||
(while (!= v1-4 (-> *collide-player-list* alive-list-end))
|
||||
(let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1))))
|
||||
(when (logtest? arg1 (-> v1-5 root-prim prim-core collide-as))
|
||||
(let* ((s1-0 (-> v1-5 process))
|
||||
(s2-0 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-0 (as-type (-> v1-5 process) process-focusable)))
|
||||
(when (and s2-0 (not (focus-test? (the-as process-focusable s2-0) disable dead inactive)) (!= arg0 s2-0))
|
||||
(let ((f0-0 (vector-vector-xz-distance (-> arg0 root trans) (-> (the-as process-focusable s2-0) root trans))))
|
||||
(when (or (not gp-0) (< f0-0 f30-0))
|
||||
@@ -300,12 +295,7 @@
|
||||
(while (!= v1-22 (-> *collide-hit-by-player-list* alive-list-end))
|
||||
(let ((v1-23 (the-as collide-shape (-> (the-as connection v1-22) param1))))
|
||||
(when (logtest? arg1 (-> v1-23 root-prim prim-core collide-as))
|
||||
(let* ((s1-1 (-> v1-23 process))
|
||||
(s2-1 (if (type? s1-1 process-focusable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (as-type (-> v1-23 process) process-focusable)))
|
||||
(when (and s2-1 (not (focus-test? (the-as process-focusable s2-1) disable dead inactive)) (!= arg0 s2-1))
|
||||
(let ((f0-1 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-1 root trans))))
|
||||
(when (or (not gp-0) (< f0-1 f30-0))
|
||||
@@ -331,12 +321,7 @@
|
||||
(while (!= v1-38 (-> *collide-hit-by-others-list* alive-list-end))
|
||||
(let ((v1-39 (the-as collide-shape (-> (the-as connection v1-38) param1))))
|
||||
(when (logtest? arg1 (-> v1-39 root-prim prim-core collide-as))
|
||||
(let* ((s1-2 (-> v1-39 process))
|
||||
(s2-2 (if (type? s1-2 process-focusable)
|
||||
s1-2
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-2 (as-type (-> v1-39 process) process-focusable)))
|
||||
(when (and s2-2 (not (focus-test? (the-as process-focusable s2-2) disable dead inactive)) (!= arg0 s2-2))
|
||||
(let ((f0-2 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-2 root trans))))
|
||||
(when (or (not gp-0) (< f0-2 f30-0))
|
||||
@@ -889,20 +874,9 @@
|
||||
)
|
||||
|
||||
(defun set-ff-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *ff-squad-control*
|
||||
(let* ((s5-0 *ff-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
(if *ff-squad-control*
|
||||
(squad-control-method-27 *ff-squad-control* (as-type (handle->process arg0) process-focusable) arg1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -438,17 +438,10 @@
|
||||
(go-hostile this)
|
||||
)
|
||||
(let* ((s4-0 (-> this target-status))
|
||||
(s3-0 (handle->process (-> s4-0 handle)))
|
||||
(s5-0 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(s5-0 (as-type (handle->process (-> s4-0 handle)) process-focusable))
|
||||
)
|
||||
(if (and s5-0 (or (focus-test? (the-as process-focusable s5-0) inactive)
|
||||
(focus-test? (the-as process-focusable s5-0) disable)
|
||||
)
|
||||
)
|
||||
(set! s5-0 (the-as process #f))
|
||||
(if (and s5-0 (or (focus-test? s5-0 inactive) (focus-test? s5-0 disable)))
|
||||
(set! s5-0 (the-as process-focusable #f))
|
||||
)
|
||||
(cond
|
||||
((not s5-0)
|
||||
@@ -465,16 +458,16 @@
|
||||
(not (logtest? (-> s5-0 mask) (process-mask target)))
|
||||
)
|
||||
(cond
|
||||
((focus-test? (the-as process-focusable s5-0) arrestable)
|
||||
((focus-test? s5-0 arrestable)
|
||||
(if (and (< (-> this target-self-xz-dist) 28672.0)
|
||||
(< (fabs (-> this target-y-angle)) 7281.778)
|
||||
(>= 8192.0 (fabs (- (-> (get-trans (the-as process-focusable s5-0) 1) y) (-> this root trans y))))
|
||||
(>= 8192.0 (fabs (- (-> (get-trans s5-0 1) y) (-> this root trans y))))
|
||||
)
|
||||
(go (method-of-object this arrest))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (crimson-guard-method-269 this (the-as process-focusable s5-0))
|
||||
(if (crimson-guard-method-269 this s5-0)
|
||||
(go (method-of-object this close-attack))
|
||||
)
|
||||
)
|
||||
@@ -482,9 +475,7 @@
|
||||
)
|
||||
(let ((f0-7 (* 2.0 (crimson-guard-method-283 this))))
|
||||
(when (and (time-elapsed? (-> this state-time) (seconds 1))
|
||||
(< (* f0-7 f0-7)
|
||||
(vector-vector-xz-distance-squared (-> this root trans) (get-trans (the-as process-focusable s5-0) 0))
|
||||
)
|
||||
(< (* f0-7 f0-7) (vector-vector-xz-distance-squared (-> this root trans) (get-trans s5-0 0)))
|
||||
)
|
||||
(set-time! (-> this state-time))
|
||||
(crimson-guard-method-289 this 0.0)
|
||||
|
||||
@@ -253,13 +253,9 @@
|
||||
(set-point! (-> this l-control) 1 s5-0)
|
||||
(set! (-> this l-control spec) (-> *lightning-spec-id-table* 19))
|
||||
(+! (-> this l-control state points-to-draw) 2)
|
||||
(let* ((s1-6 (-> s3-0 best-other-tri collide-ptr))
|
||||
(v1-91 (if (type? s1-6 collide-shape-prim)
|
||||
s1-6
|
||||
)
|
||||
)
|
||||
(s1-7 #t)
|
||||
)
|
||||
(let ((v1-91 (as-type (-> s3-0 best-other-tri collide-ptr) collide-shape-prim))
|
||||
(s1-7 #t)
|
||||
)
|
||||
(when v1-91
|
||||
(set! s1-7 #f)
|
||||
(let ((s0-1 (new 'stack-no-clear 'projectile-init-by-other-params)))
|
||||
|
||||
@@ -353,20 +353,9 @@
|
||||
)
|
||||
|
||||
(defun set-kg-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *kg-squad-control*
|
||||
(let* ((s5-0 *kg-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
(if *kg-squad-control*
|
||||
(squad-control-method-27 *kg-squad-control* (as-type (handle->process arg0) process-focusable) arg1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -181,13 +181,9 @@
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-2 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (-> arg1 param 0))
|
||||
(v1-2 (as-type arg0 process-focusable))
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask enemy guard civilian metalhead) (-> arg0 mask))
|
||||
|
||||
@@ -167,20 +167,9 @@
|
||||
)
|
||||
|
||||
(defun set-mh-primary-target ((arg0 handle) (arg1 float))
|
||||
(when *mh-squad-control*
|
||||
(let* ((s5-0 *mh-squad-control*)
|
||||
(s4-0 (method-of-object s5-0 squad-control-method-27))
|
||||
(s3-0 (handle->process arg0))
|
||||
)
|
||||
(s4-0
|
||||
s5-0
|
||||
(if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
arg1
|
||||
)
|
||||
(if *mh-squad-control*
|
||||
(squad-control-method-27 *mh-squad-control* (as-type (handle->process arg0) process-focusable) arg1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -143,13 +143,9 @@
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-2 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (-> arg1 param 0))
|
||||
(v1-2 (as-type arg0 process-focusable))
|
||||
)
|
||||
(cond
|
||||
((and (focus-test? this dangerous)
|
||||
(logtest? (process-mask enemy guard civilian kg-robot) (-> arg0 mask))
|
||||
@@ -213,28 +209,15 @@
|
||||
(set! (-> this attacker-info next-update-target-time) (+ (current-time) (seconds 3)))
|
||||
(logclear! (-> this attacker-info flags) (city-attacker-info-flag cai2))
|
||||
)
|
||||
(let* ((s5-0 (handle->process (-> this current-enemy)))
|
||||
(a0-18 (if (type? s5-0 process-focusable)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-18 (as-type (handle->process (-> this current-enemy)) process-focusable)))
|
||||
(cond
|
||||
((and a0-18
|
||||
(not (logtest? (-> (the-as process-focusable a0-18) focus-status) (focus-status disable dead inactive)))
|
||||
)
|
||||
(let* ((s5-1 this)
|
||||
(s4-0 (method-of-object s5-1 set-focus!))
|
||||
(s3-0 (handle->process (-> this current-enemy)))
|
||||
)
|
||||
(s4-0
|
||||
s5-1
|
||||
(the-as process-focusable (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(the-as enemy-aware #f)
|
||||
)
|
||||
(set-focus!
|
||||
this
|
||||
(the-as process-focusable (as-type (handle->process (-> this current-enemy)) process-focusable))
|
||||
(the-as enemy-aware #f)
|
||||
)
|
||||
(update-focus this)
|
||||
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
|
||||
@@ -271,12 +254,7 @@
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(when (handle->process (-> self current-enemy))
|
||||
(let* ((gp-0 (handle->process (-> self current-enemy)))
|
||||
(v1-7 (if (type? gp-0 process-focusable)
|
||||
(the-as process-focusable gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-7 (as-type (handle->process (-> self current-enemy)) process-focusable)))
|
||||
(if (not (or (focus-test? v1-7 inactive) (focus-test? v1-7 disable)))
|
||||
(go-virtual hostile)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user