mirror of
https://github.com/open-goal/jak-project
synced 2026-09-06 11:20:54 -04:00
[decompiler] Cleanup for Jak 3 (#3845)
This PR does a few cleanups: - improve method names/comments/flags for `enemy.gc` and a few other files - fix `new-stack-matrix0` not working for jak 3 - add `matrix-copy!` detection for jak 3 - add `vector-copy!` detection --------- Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
@@ -2964,6 +2964,121 @@ bool try_to_rewrite_vector_inline_ctor(const Env& env,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool try_to_rewrite_matrix_inline_copy(const Env& env, FormPool& pool, FormStack& stack) {
|
||||
if (env.func->name() == "(method 63 collide-shape-moving)") {
|
||||
return false;
|
||||
}
|
||||
auto matrix_entries =
|
||||
stack.try_getting_active_stack_entries({true, true, true, true, false, false, false, false});
|
||||
if (matrix_entries) {
|
||||
// first, check the loads. they should be something like source = (-> MAT vec quad)
|
||||
// MAT should always be a variable
|
||||
const char* names[] = {"rvec", "uvec", "fvec", "trans"};
|
||||
|
||||
std::vector<RegisterAccess> load_src_ras, store_dest_ras, store_src_ras;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto deref_matcher =
|
||||
Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string(names[i]), DerefTokenMatcher::string("quad")});
|
||||
auto mr = match(deref_matcher, matrix_entries->at(i).source, &env);
|
||||
if (!mr.matched) {
|
||||
return false;
|
||||
}
|
||||
load_src_ras.push_back(mr.maps.regs.at(0).value());
|
||||
}
|
||||
|
||||
// check the stores
|
||||
for (int i = 4; i < 8; i++) {
|
||||
Matcher matcher = Matcher::set(Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string(names[i - 4]),
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::any_reg(1));
|
||||
auto mr = match(matcher, matrix_entries->at(i).elt, &env);
|
||||
if (!mr.matched) {
|
||||
return false;
|
||||
}
|
||||
store_dest_ras.push_back(mr.maps.regs.at(0).value());
|
||||
store_src_ras.push_back(mr.maps.regs.at(1).value());
|
||||
}
|
||||
|
||||
// check loads are all loading from the same matrix
|
||||
for (int i = 1; i < 4; i++) {
|
||||
if (load_src_ras.at(i).reg() != load_src_ras.at(0).reg()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// check stores are all storing to the same matrix
|
||||
for (int i = 1; i < 4; i++) {
|
||||
if (store_dest_ras.at(i).reg() != store_dest_ras.at(0).reg()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// check temps are consistent
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (store_src_ras.at(i).reg() != matrix_entries->at(i).destination.value().reg()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// check types
|
||||
if (env.get_variable_type(load_src_ras.at(0), true) != TypeSpec("matrix")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (env.get_variable_type(store_dest_ras.at(0), true) != TypeSpec("matrix")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
stack.pop(8);
|
||||
auto* menv = const_cast<Env*>(&env);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
menv->disable_use(store_dest_ras.at(i));
|
||||
}
|
||||
|
||||
auto src_repopped = stack.pop_reg(load_src_ras.at(0), {}, env, true);
|
||||
if (!src_repopped) {
|
||||
// lg::info("repop src failed!!");
|
||||
src_repopped = var_to_form(load_src_ras.at(0), pool);
|
||||
} else {
|
||||
// lg::info(" popped src: {}", src_repopped->to_string(env));
|
||||
}
|
||||
|
||||
// src_repopped = matrix_entries->at(0).source;
|
||||
bool found = false;
|
||||
RegisterAccess ra;
|
||||
auto dst_repopped = stack.pop_reg(store_dest_ras.at(0).reg(), {}, env, true, -1, &ra, &found);
|
||||
if (!dst_repopped) {
|
||||
// lg::info("repop dst failed!!");
|
||||
dst_repopped = var_to_form(store_dest_ras.at(0), pool);
|
||||
} else {
|
||||
ASSERT(found);
|
||||
// lg::info(" popped dst: {} {} {}", dst_repopped->to_string(env), ra.reg().to_string(),
|
||||
// ra.mode() == AccessMode::WRITE);
|
||||
}
|
||||
|
||||
if (found) {
|
||||
stack.push_value_to_reg(
|
||||
ra,
|
||||
pool.form<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("matrix-copy!")),
|
||||
std::vector<Form*>{dst_repopped, src_repopped}),
|
||||
true, TypeSpec("matrix"));
|
||||
} else {
|
||||
stack.push_form_element(
|
||||
pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("matrix-copy!")),
|
||||
std::vector<Form*>{dst_repopped, src_repopped}),
|
||||
true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool try_to_rewrite_matrix_inline_ctor(const Env& env, FormPool& pool, FormStack& stack) {
|
||||
// now, let's check for a matrix initialization.
|
||||
auto matrix_entries = stack.try_getting_active_stack_entries({true, false, false, false, false});
|
||||
@@ -2983,54 +3098,79 @@ bool try_to_rewrite_matrix_inline_ctor(const Env& env, FormPool& pool, FormStack
|
||||
|
||||
// zeroing the rows:
|
||||
std::vector<RegisterAccess> write_vars;
|
||||
if (env.version == GameVersion::Jak1) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto elt = matrix_entries->at(i + 1).elt;
|
||||
switch (env.version) {
|
||||
case GameVersion::Jak1: {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto elt = matrix_entries->at(i + 1).elt;
|
||||
|
||||
auto matcher = Matcher::set(
|
||||
Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string("vector"), DerefTokenMatcher::integer(i),
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return false;
|
||||
}
|
||||
write_vars.push_back(*mr.maps.regs.at(0));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto elt = matrix_entries->at(i + 1).elt;
|
||||
|
||||
Matcher matcher;
|
||||
if (i == 3) {
|
||||
matcher = Matcher::set(Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string("trans"),
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
|
||||
} else {
|
||||
matcher = Matcher::set(
|
||||
auto matcher = Matcher::set(
|
||||
Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string("quad"), DerefTokenMatcher::integer(i)}),
|
||||
{DerefTokenMatcher::string("vector"), DerefTokenMatcher::integer(i),
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
}
|
||||
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return false;
|
||||
}
|
||||
write_vars.push_back(*mr.maps.regs.at(0));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
write_vars.push_back(*mr.maps.regs.at(0));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case GameVersion::Jak2: {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto elt = matrix_entries->at(i + 1).elt;
|
||||
|
||||
Matcher matcher;
|
||||
if (i == 3) {
|
||||
matcher = Matcher::set(Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string("trans"),
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
|
||||
} else {
|
||||
matcher = Matcher::set(
|
||||
Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string("quad"), DerefTokenMatcher::integer(i)}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
}
|
||||
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return false;
|
||||
}
|
||||
write_vars.push_back(*mr.maps.regs.at(0));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case GameVersion::Jak3: {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto elt = matrix_entries->at(i + 1).elt;
|
||||
|
||||
const char* names[] = {"rvec", "uvec", "fvec", "trans"};
|
||||
|
||||
Matcher matcher = Matcher::set(Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string(names[i]),
|
||||
DerefTokenMatcher::string("quad")}),
|
||||
Matcher::cast("uint128", Matcher::integer(0)));
|
||||
|
||||
auto mr = match(matcher, elt);
|
||||
if (mr.matched) {
|
||||
if (var_name != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return false;
|
||||
}
|
||||
write_vars.push_back(*mr.maps.regs.at(0));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
// success!
|
||||
@@ -3050,6 +3190,70 @@ bool try_to_rewrite_matrix_inline_ctor(const Env& env, FormPool& pool, FormStack
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_deref_to_quad(DerefElement* deref) {
|
||||
return deref && !deref->is_addr_of() && !deref->tokens().empty() &&
|
||||
deref->tokens().back().is_field_name("quad");
|
||||
}
|
||||
|
||||
Form* pop_last_deref_token(Form* form) {
|
||||
auto deref = form->try_as_element<DerefElement>();
|
||||
ASSERT(deref);
|
||||
if (deref->tokens().size() == 1) {
|
||||
return deref->base();
|
||||
} else {
|
||||
deref->tokens().pop_back();
|
||||
return form;
|
||||
}
|
||||
}
|
||||
|
||||
FormElement* try_to_rewrite_vector_copy(Form* dst,
|
||||
const TypeSpec& dst_type,
|
||||
Form* src,
|
||||
const TypeSpec& src_type,
|
||||
FormPool& pool,
|
||||
const Env& env) {
|
||||
if (env.func->name() == "vector-copy!") {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (dst && src) {
|
||||
// check types
|
||||
if (dst_type != TypeSpec("vector")) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// kinda sus - we really want to check the place where this was loaded...
|
||||
if (src_type != TypeSpec("uint128")) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto* dst_deref = dst->try_as_element<DerefElement>();
|
||||
auto* src_deref = src->try_as_element<DerefElement>();
|
||||
if (!dst_deref) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!src_deref) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!is_deref_to_quad(dst_deref)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!is_deref_to_quad(src_deref)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto ret = pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("vector-copy!")),
|
||||
std::vector<Form*>{pop_last_deref_token(dst), pop_last_deref_token(src)});
|
||||
// lg::info("success: {}\n", ret->to_string(env));
|
||||
return ret;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void StorePlainDeref::push_to_stack(const Env& env, FormPool& pool, FormStack& stack) {
|
||||
@@ -3066,14 +3270,27 @@ void StorePlainDeref::push_to_stack(const Env& env, FormPool& pool, FormStack& s
|
||||
if (size() == 16) {
|
||||
std::swap(popped.at(0), popped.at(1));
|
||||
}
|
||||
m_dst->try_as_element<DerefElement>()->set_base(
|
||||
make_optional_cast(m_dst_cast_type, popped.at(1), pool, env));
|
||||
auto dst_deref = m_dst->try_as_element<DerefElement>();
|
||||
dst_deref->set_base(make_optional_cast(m_dst_cast_type, popped.at(1), pool, env));
|
||||
m_dst->mark_popped();
|
||||
m_dst->try_as_element<DerefElement>()->inline_nested();
|
||||
auto fr = pool.alloc_element<SetFormFormElement>(
|
||||
m_dst, make_optional_cast(m_src_cast_type, popped.at(0), pool, env));
|
||||
// so the bitfield set check can run
|
||||
fr->mark_popped();
|
||||
dst_deref->inline_nested();
|
||||
|
||||
FormElement* fr = nullptr;
|
||||
|
||||
// hack: for now only do this on Jak 3
|
||||
if (size() == 16 && env.version == GameVersion::Jak3) {
|
||||
fr = try_to_rewrite_vector_copy(
|
||||
m_dst, env.get_variable_type(m_base_var, true), popped.at(0),
|
||||
m_src_cast_type.value_or(env.get_variable_type(m_expr.var(), true)), pool, env);
|
||||
}
|
||||
|
||||
if (!fr) {
|
||||
fr = pool.alloc_element<SetFormFormElement>(
|
||||
m_dst, make_optional_cast(m_src_cast_type, popped.at(0), pool, env));
|
||||
// so the bitfield set check can run
|
||||
fr->mark_popped();
|
||||
}
|
||||
|
||||
fr->push_to_stack(env, pool, stack);
|
||||
} else {
|
||||
auto vars = std::vector<RegisterAccess>({m_base_var});
|
||||
@@ -3092,7 +3309,9 @@ void StorePlainDeref::push_to_stack(const Env& env, FormPool& pool, FormStack& s
|
||||
|
||||
if (!try_to_rewrite_matrix_inline_ctor(env, pool, stack)) {
|
||||
if (!try_to_rewrite_vector_inline_ctor(env, pool, stack, "vector")) {
|
||||
try_to_rewrite_vector_inline_ctor(env, pool, stack, "quaternion");
|
||||
if (!try_to_rewrite_vector_inline_ctor(env, pool, stack, "quaternion")) {
|
||||
try_to_rewrite_matrix_inline_copy(env, pool, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2716,8 +2716,12 @@ FormElement* rewrite_launch_particles(LetElement* in, const Env& env, FormPool&
|
||||
}
|
||||
|
||||
auto set_elt = dynamic_cast<SetFormFormElement*>(in->body()->at(0));
|
||||
GenericElement* vector_copy_elt = nullptr;
|
||||
if (!set_elt) {
|
||||
return nullptr;
|
||||
vector_copy_elt = dynamic_cast<GenericElement*>(in->body()->at(0));
|
||||
if (!vector_copy_elt || vector_copy_elt->op().to_form(env).print() != "vector-copy!") {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
auto func_elt = dynamic_cast<GenericElement*>(in->body()->at(1));
|
||||
@@ -2747,19 +2751,24 @@ FormElement* rewrite_launch_particles(LetElement* in, const Env& env, FormPool&
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto origin = dynamic_cast<DerefElement*>(set_elt->src()->elts().at(0));
|
||||
if (!origin) {
|
||||
return nullptr;
|
||||
}
|
||||
auto tokens = origin->tokens().size();
|
||||
Form* origin_form;
|
||||
// remove only the quad if there are multiple derefs
|
||||
if (tokens > 1) {
|
||||
origin_form = pool.form<DerefElement>(origin->base(), false, origin->tokens());
|
||||
auto orig = dynamic_cast<DerefElement*>(origin_form->elts().at(0));
|
||||
orig->tokens().pop_back();
|
||||
Form* origin_form = nullptr;
|
||||
if (set_elt) {
|
||||
auto origin = dynamic_cast<DerefElement*>(set_elt->src()->elts().at(0));
|
||||
auto tokens = origin->tokens().size();
|
||||
// remove only the quad if there are multiple derefs
|
||||
if (tokens > 1) {
|
||||
origin_form = pool.form<DerefElement>(origin->base(), false, origin->tokens());
|
||||
auto orig = dynamic_cast<DerefElement*>(origin_form->elts().at(0));
|
||||
orig->tokens().pop_back();
|
||||
} else {
|
||||
origin_form = origin->base();
|
||||
}
|
||||
} else {
|
||||
origin_form = origin->base();
|
||||
// the vector copy rewrite already did the logic above.
|
||||
origin_form = vector_copy_elt->elts().at(1);
|
||||
}
|
||||
if (!origin_form) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto launch_state = func_elt->elts().at(func_elt->elts().size() - 3);
|
||||
|
||||
+222
-208
@@ -219,31 +219,6 @@
|
||||
:flag-assert #xe00000010
|
||||
)
|
||||
|
||||
#|
|
||||
(deftype array (UNKNOWN)
|
||||
((allocated-length int32 :offset-assert 4)
|
||||
(length int32 :offset-assert 0)
|
||||
(content-type type :offset-assert 8) ;; guessed by decompiler
|
||||
(data uint8 :dynamic :offset-assert 12) ;; guessed by decompiler
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
)
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
)
|
||||
|#
|
||||
|
||||
(define-extern identity
|
||||
"The identity function."
|
||||
(function object object))
|
||||
@@ -557,9 +532,9 @@
|
||||
(new "Allocate a process-tree with the kernel clock." (symbol type string) _type_) ;; 0
|
||||
(activate "Move a process from dead to active, moving it to the given tree." (_type_ process-tree string pointer) process-tree) ;; 9
|
||||
(deactivate "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (_type_) none) ;; 10
|
||||
(init-from-entity! (_type_ entity-actor) object) ;; 11
|
||||
(init-from-entity! "Set up a newly created process from the entity that created it." (_type_ entity-actor) object) ;; 11
|
||||
(run-logic? "Should this process be run? Checked by execute-process-tree." (_type_) symbol) ;; 12
|
||||
(process-tree-method-13 () none) ;; 13
|
||||
(entity-info-slot "Not a method. This vtable slot stores entity-info for this type." () none) ;; 13
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1971,6 +1946,8 @@
|
||||
)
|
||||
|
||||
(deftype lissajous (structure)
|
||||
"A curve where the x and y position are set by two different sinusoids.
|
||||
This stores the parameters and state for evaluating this curve."
|
||||
((x-mag float :offset-assert 0)
|
||||
(y-mag float :offset-assert 4)
|
||||
(theta float :offset-assert 8)
|
||||
@@ -1984,11 +1961,14 @@
|
||||
:size-assert #x1c
|
||||
:flag-assert #xa0000001c
|
||||
(:methods
|
||||
(lissajous-method-9 (_type_ vector) vector) ;; 9
|
||||
(evaluate! "Set the x and y component of the vector to the current point on the curve."
|
||||
(_type_ vector) vector) ;; 9
|
||||
)
|
||||
)
|
||||
|
||||
(deftype lissajous-interp (structure)
|
||||
"Handles interpolating between two different lissajous parameters, and also
|
||||
stepping forward the dynamics."
|
||||
((current lissajous :inline :offset-assert 0)
|
||||
(dest lissajous :inline :offset-assert 28)
|
||||
(rate lissajous :inline :offset-assert 56)
|
||||
@@ -1997,8 +1977,10 @@
|
||||
:size-assert #x54
|
||||
:flag-assert #xb00000054
|
||||
(:methods
|
||||
(lissajous-interp-method-9 (_type_ vector) vector) ;; 9
|
||||
(lissajous-interp-method-10 (_type_) float) ;; 10
|
||||
(evaluate! "Set the x and y component of the vector to the current point on the curve."
|
||||
(_type_ vector) vector) ;; 9
|
||||
(update! "Update both the interpolation, and the curves themselves."
|
||||
(_type_) float) ;; 10
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2012,6 +1994,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(deftype transformq (transform)
|
||||
"A transform, but the rotation is represented with a quaternion."
|
||||
((quat quaternion :inline :offset 16 :score 1)
|
||||
)
|
||||
:method-count-assert 9
|
||||
@@ -2020,6 +2003,7 @@
|
||||
)
|
||||
|
||||
(deftype trsq (trs)
|
||||
"A trs, but the rotation is represented with a quaternion."
|
||||
((quat quaternion :inline :offset 32 :score 1)
|
||||
)
|
||||
:method-count-assert 9
|
||||
@@ -2296,8 +2280,6 @@
|
||||
;; quaternion ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; quaternion is already defined!
|
||||
|
||||
(define-extern quaternion-axis-angle!
|
||||
"Construct a quaternion from an axis and angle. The axis should be normalized."
|
||||
(function quaternion float float float float quaternion))
|
||||
@@ -5861,7 +5843,7 @@
|
||||
(define-extern matrix-remove-z-rot "Remove the z rotation component of a rotation." (function matrix vector matrix))
|
||||
(define-extern matrix-rot-diff!
|
||||
"Get the difference of rotation between two matrices, expressed as a quaternion."
|
||||
(function vector matrix matrix float))
|
||||
(function quaternion matrix matrix float))
|
||||
(define-extern quaternion-seek
|
||||
"Strange quaternion rotate toward function. arg3 is ignored. arg4 is the max seek amount."
|
||||
(function quaternion quaternion quaternion float float quaternion))
|
||||
@@ -7903,7 +7885,7 @@
|
||||
(update-vis-volumes (_type_) none) ;; 23 ;; (art-group-get-by-name (_type_ string (pointer uint32)) art-group)
|
||||
(level-group-method-24 (_type_) none) ;; 24 ;; (alt-load-command-get-index (_type_ symbol int) pair)
|
||||
(print-volume-sizes (_type_) none) ;; 25
|
||||
(status-of-level-and-borrows "Get the combined status of a level and borrow levels." (_type_ symbol symbol) symbol) ;; 26 ;; (update-vis-volumes-from-nav-mesh (_type_) none)
|
||||
(level-status? "Get the combined status of a level and borrow levels." (_type_ symbol symbol) symbol) ;; 26 ;; (update-vis-volumes-from-nav-mesh (_type_) none)
|
||||
(do-nothing "Empty method." (_type_) none) ;; 27
|
||||
(load-in-progress? "Is there a load happening now?" (_type_) symbol) ;; 28 ;; (level-status (_type_ symbol) symbol)
|
||||
(is-load-allowed? "Does the exclusive-load setting allow us to load this level?" (_type_ (pointer symbol)) symbol) ;; 29
|
||||
@@ -17330,7 +17312,7 @@
|
||||
(task-node-commands (array game-task-node-command) :offset-assert 416)
|
||||
(task-node-exclusive (array uint16) :offset-assert 420)
|
||||
(task-counter uint32 :offset-assert 424)
|
||||
(unknown-arr4 (array uint16) :offset-assert 428)
|
||||
(talker-state (array uint16) :offset-assert 428)
|
||||
(level-opened uint8 32 :offset-assert 432)
|
||||
(total-deaths int32 :offset-assert 464)
|
||||
(continue-deaths int32 :offset-assert 468)
|
||||
@@ -17567,20 +17549,25 @@
|
||||
(defenum talker-flags
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(tf0 0)
|
||||
(tf1 1)
|
||||
(tf2 2)
|
||||
(tf3 3)
|
||||
(tf4 4)
|
||||
(tf5 5)
|
||||
(tf6 6)
|
||||
(tf7 7)
|
||||
(tf8 8)
|
||||
(play-only-once 0)
|
||||
(reduce-volume 1)
|
||||
(auto-save-on-each-start 2)
|
||||
(auto-save-once-on-exit 3)
|
||||
(only-play-in-region 4)
|
||||
(fade-in 5)
|
||||
(slide-in 6)
|
||||
(bigger-font 7)
|
||||
(long-timeout 8)
|
||||
)
|
||||
;; ---ambient-h:talker-flags
|
||||
|
||||
(deftype talker-speech-class (structure)
|
||||
"Contains metadata about a voice line or hint text being played/displayed."
|
||||
"Contains metadata about a voice line or hint text being played/displayed.
|
||||
In the talker state, there's a pos-state and neg-state.
|
||||
Calling yes-play! adjusts the pos-state and no-play! adjusts the neg-state.
|
||||
Playback is only allowed if the pos-state is less than or equal to pos
|
||||
and neg-state is greater than or equal to neg.
|
||||
"
|
||||
((name string :offset-assert 0)
|
||||
(channel gui-channel :offset-assert 4)
|
||||
(flags talker-flags :offset-assert 6)
|
||||
@@ -17599,11 +17586,11 @@
|
||||
:flag-assert #xe00000020
|
||||
;; field on-close uses ~A with a signed load.
|
||||
(:methods
|
||||
(talker-speech-class-method-9 (_type_) symbol) ;; 9
|
||||
(play-communicator-speech! (_type_) none) ;; 10
|
||||
(talker-speech-class-method-11 (_type_) none) ;; 11
|
||||
(talker-speech-class-method-12 (_type_ int) none) ;; 12
|
||||
(talker-speech-class-method-13 (_type_ int) none) ;; 13
|
||||
(should-play? "Return if the talker is in a state where it should play." (_type_) symbol) ;; 9
|
||||
(mark-played! "Mark something as played by making its state UINT16_MAX" (_type_) none) ;; 10
|
||||
(reset-state! "Reset the state of this talker to 0 (the initial value)" (_type_) none) ;; 11
|
||||
(yes-play! (_type_ int) none) ;; 12
|
||||
(no-play! (_type_ int) none) ;; 13
|
||||
)
|
||||
)
|
||||
|
||||
@@ -19466,11 +19453,6 @@
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(disabled) ;; keep object velocity
|
||||
(af01)
|
||||
(af02)
|
||||
(af03)
|
||||
(af04)
|
||||
(af05)
|
||||
)
|
||||
;; ---aligner-h:align-flags
|
||||
|
||||
@@ -19656,9 +19638,9 @@
|
||||
(sf23 23)
|
||||
(sf24 24)
|
||||
(sf25 25)
|
||||
(sf26 26)
|
||||
(hang 26)
|
||||
(sf27 27)
|
||||
(sf28 28)
|
||||
(invisible 28)
|
||||
(sf29 29)
|
||||
(sf30 30)
|
||||
(sf31 31)
|
||||
@@ -22017,8 +21999,8 @@
|
||||
(unknown-float37 float :offset 5636)
|
||||
(unknown-vector37 vector :inline :offset 5648)
|
||||
(unknown-vector38 vector :inline :offset 5664)
|
||||
(unknown-vector39 vector :inline :offset 5680)
|
||||
(unknown-vector40 vector :inline :offset 5696)
|
||||
(unknown-quat39 quaternion :inline :offset 5680)
|
||||
(unknown-quat40 quaternion :inline :offset 5696)
|
||||
(sliding-start-time time-frame :offset 5712)
|
||||
(unknown-time-frame18 time-frame :offset 5720)
|
||||
(unknown-sound-id00 sound-id :offset 5776)
|
||||
@@ -22466,12 +22448,12 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #x1c005000d0
|
||||
(:methods
|
||||
(process-mask->search-info-flag (_type_) search-info-flag) ;; 20
|
||||
(get-search-info-flag "Get search-info-flag for this process." (_type_) search-info-flag) ;; 20
|
||||
(get-trans "Get the `trans` for this process." (_type_ int) vector) ;; 21
|
||||
(get-quat "Get the quaternion for this process." (_type_ int) quaternion) ;; 22
|
||||
(get-transv "Get the `transv` for this process." (_type_) vector) ;; 23
|
||||
(time-to-apex-or-ground (_type_ int) int) ;; 24
|
||||
(get-water-height (_type_) meters) ;; 25
|
||||
(get-water-height "Get the height of the water that we're in." (_type_) meters) ;; 25
|
||||
(get-notice-time (_type_) time-frame) ;; 26
|
||||
(get-inv-mass (_type_) float) ;; 27
|
||||
)
|
||||
@@ -22551,7 +22533,7 @@
|
||||
check that the [[collide-spec]] of the focus and the process match."
|
||||
(_type_ process-focusable) object) ;; 10
|
||||
(reset-to-collide-spec "Reset this focus with the given [[collide-spec]]." (_type_ collide-spec) none) ;; 11
|
||||
(try-update-focus "Try to set the `handle` of this focus to the given process." (_type_ process-focusable) symbol) ;; 12
|
||||
(focus-on! "Set the `handle` of this focus to the given process. Return if the handle changed." (_type_ process-focusable) symbol) ;; 12
|
||||
)
|
||||
)
|
||||
|
||||
@@ -25794,7 +25776,7 @@
|
||||
(bit-4 4)
|
||||
(bit-5 5)
|
||||
(subtask-complete 6)
|
||||
(bit-7 7)
|
||||
(special 7)
|
||||
(complete 8)
|
||||
(bit-9 9)
|
||||
(bit-10 10)
|
||||
@@ -29132,7 +29114,7 @@
|
||||
(clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) ;; 21
|
||||
(find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float) ;; 22
|
||||
(set-spheres-from-nav-ids (_type_) none) ;; 23
|
||||
(add-root-sphere-to-hash! (_type_ vector int) symbol) ;; 24
|
||||
(check-sphere-blocked! (_type_ vector int) symbol) ;; 24
|
||||
(get-max-rotation-rate (_type_) float) ;; 25
|
||||
(get-sphere-mask (_type_) uint) ;; 26
|
||||
(get-target-speed (_type_) meters) ;; 27
|
||||
@@ -29286,7 +29268,7 @@
|
||||
(add-a-sphere-with-flag (_type_ vector int) int) ;; 27
|
||||
(update-from-spheres (_type_) none) ;; 28
|
||||
(sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none) ;; 29
|
||||
(find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol) ;; 30
|
||||
(check-sphere-blocked (_type_ vector int int) symbol) ;; 30
|
||||
(add-sphere-with-mask-and-id (_type_ vector vector float int) symbol) ;; 31
|
||||
(sphere-hash-method-32 (_type_ sphere int) symbol) ;; 32
|
||||
)
|
||||
@@ -41339,11 +41321,11 @@
|
||||
;; +++enemy-h:enemy-aware
|
||||
(defenum enemy-aware
|
||||
:type uint64
|
||||
(ea0 0)
|
||||
(ea1 1)
|
||||
(ea2 2)
|
||||
(ea3 3)
|
||||
(ea4 4)
|
||||
(unaware 0)
|
||||
(aware1 1)
|
||||
(aware2 2)
|
||||
(hostile 3)
|
||||
(flee 4)
|
||||
)
|
||||
;; ---enemy-h:enemy-aware
|
||||
|
||||
@@ -41388,6 +41370,7 @@
|
||||
(death-start 34)
|
||||
(auto-death-phase-out 35)
|
||||
(has-gem 36)
|
||||
;; these seem to be an extension of the flags for nav-enemy.
|
||||
(ef37 37)
|
||||
(ef38 38)
|
||||
(ef39 39)
|
||||
@@ -41408,8 +41391,10 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xe00000020
|
||||
(:methods
|
||||
(try-update-focus (_type_ process-focusable enemy) symbol :replace) ;; 12
|
||||
(enemy-focus-method-13 (_type_ process-focusable enemy-aware) symbol) ;; 13
|
||||
(focus-on! "Make this enemy focus on the process-focusable. If already focused, update awareness."
|
||||
(_type_ process-focusable enemy) symbol :replace) ;; 12
|
||||
(focus-on-with-awareness! "Focus on the process-focusable, updating the aware."
|
||||
(_type_ process-focusable enemy-aware) symbol) ;; 13
|
||||
)
|
||||
)
|
||||
|
||||
@@ -41463,34 +41448,34 @@
|
||||
(jump-height-min meters :offset-assert 244)
|
||||
(jump-height-factor float :offset-assert 248)
|
||||
(knocked-seek-ry-clamp float :offset-assert 252)
|
||||
(knocked-soft-vxz-lo float :offset-assert 256)
|
||||
(knocked-soft-vxz-hi float :offset-assert 260)
|
||||
(knocked-soft-vy-lo float :offset-assert 264)
|
||||
(knocked-soft-vy-hi float :offset-assert 268)
|
||||
(knocked-medium-vxz-lo float :offset-assert 272)
|
||||
(knocked-medium-vxz-hi float :offset-assert 276)
|
||||
(knocked-medium-vy-lo float :offset-assert 280)
|
||||
(knocked-medium-vy-hi float :offset-assert 284)
|
||||
(knocked-hard-vxz-lo float :offset-assert 288)
|
||||
(knocked-hard-vxz-hi float :offset-assert 292)
|
||||
(knocked-hard-vy-lo float :offset-assert 296)
|
||||
(knocked-hard-vy-hi float :offset-assert 300)
|
||||
(knocked-huge-vxz-lo float :offset-assert 304)
|
||||
(knocked-huge-vxz-hi float :offset-assert 308)
|
||||
(knocked-huge-vy-lo float :offset-assert 312)
|
||||
(knocked-huge-vy-hi float :offset-assert 316)
|
||||
(knocked-yellow-vxz-lo float :offset-assert 320)
|
||||
(knocked-yellow-vxz-hi float :offset-assert 324)
|
||||
(knocked-yellow-vy-lo float :offset-assert 328)
|
||||
(knocked-yellow-vy-hi float :offset-assert 332)
|
||||
(knocked-red-vxz-lo float :offset-assert 336)
|
||||
(knocked-red-vxz-hi float :offset-assert 340)
|
||||
(knocked-red-vy-lo float :offset-assert 344)
|
||||
(knocked-red-vy-hi float :offset-assert 348)
|
||||
(knocked-blue-vxz-lo float :offset-assert 352)
|
||||
(knocked-blue-vxz-hi float :offset-assert 356)
|
||||
(knocked-blue-vy-lo float :offset-assert 360)
|
||||
(knocked-blue-vy-hi float :offset-assert 364)
|
||||
(knocked-soft-vxz-lo meters :offset-assert 256)
|
||||
(knocked-soft-vxz-hi meters :offset-assert 260)
|
||||
(knocked-soft-vy-lo meters :offset-assert 264)
|
||||
(knocked-soft-vy-hi meters :offset-assert 268)
|
||||
(knocked-medium-vxz-lo meters :offset-assert 272)
|
||||
(knocked-medium-vxz-hi meters :offset-assert 276)
|
||||
(knocked-medium-vy-lo meters :offset-assert 280)
|
||||
(knocked-medium-vy-hi meters :offset-assert 284)
|
||||
(knocked-hard-vxz-lo meters :offset-assert 288)
|
||||
(knocked-hard-vxz-hi meters :offset-assert 292)
|
||||
(knocked-hard-vy-lo meters :offset-assert 296)
|
||||
(knocked-hard-vy-hi meters :offset-assert 300)
|
||||
(knocked-huge-vxz-lo meters :offset-assert 304)
|
||||
(knocked-huge-vxz-hi meters :offset-assert 308)
|
||||
(knocked-huge-vy-lo meters :offset-assert 312)
|
||||
(knocked-huge-vy-hi meters :offset-assert 316)
|
||||
(knocked-yellow-vxz-lo meters :offset-assert 320)
|
||||
(knocked-yellow-vxz-hi meters :offset-assert 324)
|
||||
(knocked-yellow-vy-lo meters :offset-assert 328)
|
||||
(knocked-yellow-vy-hi meters :offset-assert 332)
|
||||
(knocked-red-vxz-lo meters :offset-assert 336)
|
||||
(knocked-red-vxz-hi meters :offset-assert 340)
|
||||
(knocked-red-vy-lo meters :offset-assert 344)
|
||||
(knocked-red-vy-hi meters :offset-assert 348)
|
||||
(knocked-blue-vxz-lo meters :offset-assert 352)
|
||||
(knocked-blue-vxz-hi meters :offset-assert 356)
|
||||
(knocked-blue-vy-lo meters :offset-assert 360)
|
||||
(knocked-blue-vy-hi meters :offset-assert 364)
|
||||
(ragdoll-info ragdoll-setup :offset-assert 368)
|
||||
(shadow-size meters :offset-assert 372)
|
||||
(shadow-max-y meters :offset-assert 376)
|
||||
@@ -41534,6 +41519,16 @@
|
||||
(ejf6 6)
|
||||
(ejf7 7)
|
||||
)
|
||||
|
||||
(defenum jump-stage
|
||||
:type int32
|
||||
(init 0)
|
||||
(winding-up 1)
|
||||
(takeoff 2)
|
||||
(in-air 3)
|
||||
(touchdown 4)
|
||||
(landing 5)
|
||||
)
|
||||
;; ---enemy-h:enemy-jump-flags
|
||||
|
||||
(deftype enemy-jump-info (structure)
|
||||
@@ -41658,109 +41653,125 @@
|
||||
gun-dark-2-stretch ;; 49
|
||||
)
|
||||
(:methods
|
||||
(enemy-method-50 (_type_ int) none) ;; 50
|
||||
(accelerate-fall! (_type_ vector) float) ;; 51
|
||||
(damage-enemy! (_type_ object event-message-block) float) ;; 52
|
||||
(reset-penetrate! (_type_) none) ;; 53
|
||||
(get-knockback-dir! (_type_ vector) vector) ;; 54
|
||||
(get-knockback-angle (_type_) degrees) ;; 55
|
||||
(knocked-handler (_type_ vector) object) ;; 56
|
||||
(can-collide-with-focus? (_type_ process-focusable) object) ;; 57
|
||||
(check-water (_type_) object) ;; 58
|
||||
(enemy-common-post (_type_) none) ;; 59
|
||||
(lerp-damage (_type_ float) float) ;; 60
|
||||
(scale-impact-vel-y! (_type_ vector vector float) vector) ;; 61
|
||||
(get-damage-from-attack (_type_ object event-message-block) float) ;; 62
|
||||
(enemy-method-63 (_type_ float) float) ;; 63
|
||||
(update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware) ;; 64
|
||||
(penetrate->next-state (_type_ process event-message-block float) symbol) ;; 65
|
||||
(get-penetrated-by (_type_) penetrate) ;; 66
|
||||
(coin-flip? (_type_) symbol) ;; 67
|
||||
(get-enemy-aware (_type_ enemy-aware) enemy-aware) ;; 68
|
||||
(enemy-method-69 (_type_) none) ;; 69
|
||||
(enemy-method-70 (_type_ process-focusable enemy-aware) none) ;; 70
|
||||
(go-dormant (_type_) object) ;; 71
|
||||
(go-dormant-aware (_type_) object) ;; 72
|
||||
(go-idle (_type_) object) ;; 73
|
||||
(go-ambush-delay (_type_) object) ;; 74
|
||||
(update-collision-action "Change the collision for certain conditions (knocked, etc)" (_type_ int) none) ;; 50
|
||||
(adjust-transv-under-water! "Modify the velocity as needed if the enemy is underwater." (_type_ vector) float) ;; 51
|
||||
(damage-enemy-from-attack! "Given an attack message, apply damage." (_type_ object event-message-block) float) ;; 52
|
||||
(reset-penetrate-later! "After a little bit, reset the penetrate flags back to default." (_type_) none) ;; 53
|
||||
(get-knockback-dir! "Compute the knockback direction for an incoming attack." (_type_ vector) vector) ;; 54
|
||||
(get-knockback-angle "Get the yaw angle for the current knock." (_type_) degrees) ;; 55
|
||||
(knocked-handler "Called when this enemy is knocked." (_type_ vector) object) ;; 56
|
||||
(can-focus-on? "Check that this enemy can focus on the given focusable.
|
||||
This reuses the collide bitmask, but isn't actually a collision." (_type_ process-focusable) object) ;; 57
|
||||
(check-water "Respond to possibly being in water." (_type_) object) ;; 58
|
||||
(enemy-common-post "Common implementation of post. Runs ja-post." (_type_) none) ;; 59
|
||||
(impact-velocity-to-hit-points "Given an impact velocity, compute hit points." (_type_ float) float) ;; 60
|
||||
(attack-direction-from-impact-vel "Compute the direction of an attack given an impact velocity.
|
||||
This reduces the vertical component, probably to avoid sending the enemy into the air too much." (_type_ vector vector float) vector) ;; 61
|
||||
(get-damage-from-attack "Compute hit point damage for an attack message." (_type_ object event-message-block) float) ;; 62
|
||||
(apply-incoming-hitpoint-mods "Modify the hitpoints from an incoming attack.
|
||||
Keeps enemy alive for a bit while being shot with a blue gun.
|
||||
This looks cool because you can shoot them many times." (_type_ float) float) ;; 63
|
||||
(get-awareness-of-proc "Check what the enemies awareness of this pfoc would be. Optionally return more awareness stats in enemy-best-focus." (_type_ process-focusable enemy-best-focus) enemy-aware) ;; 64
|
||||
(msg-for-incoming-attack "Given an attack message, what do we do next? Returns a message name that should be sent to self." (_type_ process event-message-block float) symbol) ;; 65
|
||||
(get-penetrated-by "Figure out the penetrated-by mask for this process." (_type_) penetrate) ;; 66
|
||||
(coin-flip? "Return #t half the time, #f the other." (_type_) symbol) ;; 67
|
||||
(modify-awareness "Apply modifications to awareness based on the reaction time of an enemy and other settings." (_type_ enemy-aware) enemy-aware) ;; 68
|
||||
(focus-on-attacker! "If possible, update this enemies focus to the attacker." (_type_) none) ;; 69
|
||||
(set-focus! "Change our focus to the given process. Optionally, specify awareness." (_type_ process-focusable enemy-aware) none) ;; 70
|
||||
(go-dormant "Go to the dormant state. This disables drawing/processing/collision, and runs no logic." (_type_) object) ;; 71
|
||||
(go-dormant-aware "Go to the dormat aware state.
|
||||
Similar to dormant, drawing/collision are disabled, but enemies can exit dormant-aware." (_type_) object) ;; 72
|
||||
(go-idle "Go to an idle state." (_type_) object) ;; 73
|
||||
(go-ambush "May go to ambush-delay first, if set in the res-lump." (_type_) object) ;; 74
|
||||
(go-stare (_type_) object) ;; 75
|
||||
(go-stare2 (_type_) object) ;; 76
|
||||
(go-directed (_type_) object) ;; 77
|
||||
(go-hostile (_type_) object) ;; 78
|
||||
(go-flee (_type_) object) ;; 79
|
||||
(go-best-state (_type_) object) ;; 80
|
||||
(go-die (_type_) object) ;; 81
|
||||
(event-handler (_type_ process int symbol event-message-block) object :behavior enemy) ;; 82
|
||||
(enemy-touch-handler (_type_ process event-message-block) object) ;; 83
|
||||
(send-attack-on-jump-or-knocked (_type_ process event-message-block) object) ;; 84
|
||||
(knocked-anim (_type_ enemy-knocked-info) symbol) ;; 85
|
||||
(knocked-land-anim (_type_ enemy-knocked-info) symbol) ;; 86
|
||||
(knocked-anim-handler (_type_ int enemy-knocked-info) symbol) ;; 87
|
||||
(enemy-method-88 (_type_ enemy-knocked-info) symbol) ;; 88
|
||||
(within-gspot-range? (_type_) symbol) ;; 89
|
||||
(enemy-method-90 (_type_ ragdoll-proc) none) ;; 90
|
||||
(enemy-method-91 (_type_ enemy-jump-info) object) ;; 91
|
||||
(init-jump-info! (_type_ enemy-jump-info) none) ;; 92
|
||||
(setup-jump! (_type_ enemy-jump-info) none) ;; 93
|
||||
(move-to-gspot! (_type_) float) ;; 94
|
||||
(on-ground? (_type_ enemy-jump-info) symbol) ;; 95
|
||||
(jump-in-air-anim (_type_ enemy-jump-info) symbol) ;; 96
|
||||
(jump-land-anim (_type_ enemy-jump-info) symbol) ;; 97
|
||||
(jump-wind-up-anim (_type_ enemy-jump-info) symbol) ;; 98
|
||||
(jump-anim-handler (_type_ int enemy-jump-info) symbol) ;; 99
|
||||
(in-jump-handler (_type_ int enemy-jump-info) none) ;; 100
|
||||
(enemy-method-101 (_type_ int enemy-jump-info) none) ;; 101
|
||||
(go-directed2 (_type_) object) ;; 102
|
||||
(enemy-method-103 (_type_ vector float) symbol) ;; 103
|
||||
(enemy-method-104 (_type_ vector float) symbol) ;; 104
|
||||
(enemy-method-105 (_type_ float symbol) symbol) ;; 105
|
||||
(find-best-focus (_type_) process) ;; 106
|
||||
(is-pfoc-in-mesh? (_type_ process-focusable vector) symbol) ;; 107
|
||||
(enemy-method-108 (_type_ process-focusable) symbol) ;; 108
|
||||
(enemy-method-109 (_type_) symbol) ;; 109
|
||||
(send-attack (_type_ process touching-shapes-entry uint) symbol) ;; 110
|
||||
(on-attack (_type_ process-focusable) none) ;; 111
|
||||
(get-incoming-attack! (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none) ;; 112
|
||||
(get-focus! (_type_) process-focusable) ;; 113
|
||||
(send-attack-to-all-tshapes (_type_ process-focusable event-message-block) int) ;; 114
|
||||
(set-look-at-mode! (_type_ int) none) ;; 115
|
||||
(stop-look-at! (_type_) none) ;; 116
|
||||
(apply-friction (_type_) none) ;; 117
|
||||
(init-enemy-info! (_type_ enemy-info) none) ;; 118
|
||||
(init-enemy-defaults! (_type_ enemy-info) none) ;; 119
|
||||
(init-enemy-collision! (_type_) none) ;; 120
|
||||
(init-enemy! (_type_) none) ;; 121
|
||||
(go-idle2 (_type_) object) ;; 122
|
||||
(enemy-method-123 (_type_) symbol) ;; 123
|
||||
(disable-ragdoll (_type_) none) ;; 124
|
||||
(ragdoll-settled? (_type_) object) ;; 125
|
||||
(ragdoll-spawn! (_type_ symbol symbol) vector) ;; 126
|
||||
(deactivate-ragdoll! (_type_) none) ;; 127
|
||||
(rnd-float (_type_) float) ;; 128
|
||||
(rnd-float-range (_type_ float float) float) ;; 129
|
||||
(rnd-int (_type_ int) int) ;; 130
|
||||
(enemy-method-131 (_type_ int int) int) ;; 131
|
||||
(set-reaction-time! (_type_ time-frame time-frame) time-frame) ;; 132
|
||||
(rnd-chance? (_type_ float) symbol) ;; 133
|
||||
(enemy-method-134 (_type_ float) symbol) ;; 134
|
||||
(go-directed "Go to the directed state which assumes that something else will control the enemy." (_type_) object) ;; 77
|
||||
(go-hostile "Go to the hostile state, actively trying to attack the target." (_type_) object) ;; 78
|
||||
(go-flee "Go to the flee state, running away." (_type_) object) ;; 79
|
||||
(go-state-for-focused "Go to the appropriate state for the current awareness of the focused process." (_type_) object) ;; 80
|
||||
(go-die "Go to the die state." (_type_) object) ;; 81
|
||||
(event-handler "Commmon handler for events." (_type_ process int symbol event-message-block) object :behavior enemy) ;; 82
|
||||
(enemy-touch-handler "General handler for an event when a process intentionally sends a touch event." (_type_ process event-message-block) object) ;; 83
|
||||
(enemy-touched-handler "General handler for when anything touches an enemy (automatic response)." (_type_ process event-message-block) object) ;; 84
|
||||
(knocked-anim "start the knocked animation." (_type_ enemy-knocked-info) symbol) ;; 85
|
||||
(knocked-land-anim "start the knocked-land animation." (_type_ enemy-knocked-info) symbol) ;; 86
|
||||
(knocked-anim-handler "start or play the approriate animation for an enemy being knocked." (_type_ int enemy-knocked-info) symbol) ;; 87
|
||||
(done-being-knocked? "has the enemy hit the ground or stopped after being knocked back?" (_type_ enemy-knocked-info) symbol) ;; 88
|
||||
(invalid-height? "Return #t if the enemy is too high in the air, or below the ground." (_type_) symbol) ;; 89
|
||||
(copy-ragdoll-orientation-to-root "Apply rotational offset from ragdolling back to the enemy.
|
||||
Used when disabling a ragdoll to update the enemy
|
||||
orientation to match the end of ragdoll orientation." (_type_ ragdoll-proc) none) ;; 90
|
||||
(check-jump-blocked? "Is this jump blocked by something?" (_type_ enemy-jump-info) object) ;; 91
|
||||
(init-jump-info! "Populate an enemy-jump-info for jumping to this enemy's event-param-point" (_type_ enemy-jump-info) none) ;; 92
|
||||
(setup-jump-trajectory! "Compute jump trajectory." (_type_ enemy-jump-info) none) ;; 93
|
||||
(move-to-gspot! "Snap the enemy down onto the cached ground spot (gspot)." (_type_) float) ;; 94
|
||||
(landed-jump-yet? "Is this on, or close to, the ground?" (_type_ enemy-jump-info) symbol) ;; 95
|
||||
(jump-in-air-anim "Start playing the in-air anim" (_type_ enemy-jump-info) symbol) ;; 96
|
||||
(jump-land-anim "Play the landing anim" (_type_ enemy-jump-info) symbol) ;; 97
|
||||
(jump-wind-up-anim "Start playing the wind-up anim" (_type_ enemy-jump-info) symbol) ;; 98
|
||||
(jump-anim-handler (_type_ jump-stage enemy-jump-info) symbol) ;; 99
|
||||
(move-along-ballistic-trajectory-for-jump "Adjust trans, transv for the jump, if we're airborne." (_type_ jump-stage enemy-jump-info) none) ;; 100
|
||||
(adjust-heading-for-jump "Can be overriden. Yaw the enemy in response to an ongoing jump." (_type_ jump-stage enemy-jump-info) none) ;; 101
|
||||
(go-next-state-auto "Pick the next state automatically. Will enter directed state if this enemy is directed, or pick based on focus/aware." (_type_) object) ;; 102
|
||||
(heading-matches-direction? "Does this enemy's heading match the given heading? Threshold in degrees." (_type_ vector float) symbol) ;; 103
|
||||
(pointing-toward? "Is this enemy pointing toward the given point? Threshold in degrees." (_type_ vector float) symbol) ;; 104
|
||||
(pointing-toward-focus? "Is this enemy pointing toward its focused process?" (_type_ float symbol) symbol) ;; 105
|
||||
(find-best-focus "Search for the best thing to focus on." (_type_) process) ;; 106
|
||||
(can-become-hostile-to? "Return if this enemy can become hostile to the process." (_type_ process-focusable vector) symbol) ;; 107
|
||||
(should-flee-from? "Return if this enemy should flee from the process." (_type_ process-focusable) symbol) ;; 108
|
||||
(out-of-bounds? "Has the enemy gone somewhere it shouldn't?
|
||||
Used to kill some enemies that can be knocked of regions." (_type_) symbol) ;; 109
|
||||
(send-attack-from-tshape "Send an attack from this enemy to something else." (_type_ process touching-shapes-entry uint) symbol) ;; 110
|
||||
(on-attack "Handler after this enemy attacks something. By default focuses on the attacked, but could be overriden." (_type_ process-focusable) none) ;; 111
|
||||
(handle-incoming-attack! "Set up this enemy to handle an incoming attack event." (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none) ;; 112
|
||||
(get-focus! "If we're focusing on something alive, return it." (_type_) process-focusable) ;; 113
|
||||
(find-and-damage-attackers "Find things that have attacked us, then deal damage back.
|
||||
This is used for attacks that damage both the player and the enemy,
|
||||
like hitting a guard with a jetboard." (_type_ process-focusable event-message-block) int) ;; 114
|
||||
(set-look-at-mode! "Pick between 1: look at the focus, or 2: look at where you're going." (_type_ int) none) ;; 115
|
||||
(stop-look-at! "Stop looking at something. Disables neck joint mod." (_type_) none) ;; 116
|
||||
(apply-friction "Slow down the enemy due to friction with the ground." (_type_) none) ;; 117
|
||||
(set-enemy-info! "Set the enemy-info" (_type_ enemy-info) none) ;; 118
|
||||
(setup-enemy! "Initialize the enemy by setting all the enemy-specific fields." (_type_ enemy-info) none) ;; 119
|
||||
(init-enemy-collision! "Typical place to construct collision shapes" (_type_) none) ;; 120
|
||||
(init-enemy! "Typical place for shared init code. Runs from entity or process style init." (_type_) none) ;; 121
|
||||
(go-fallback-init "If there's no specific settings for initial state, go to this state after spawning." (_type_) object) ;; 122
|
||||
(allow-ragdoll? "Can this enemy ragdoll now?" (_type_) symbol) ;; 123
|
||||
(disable-ragdoll "Smoothly disable the ragdoll and transition back to normal control." (_type_) none) ;; 124
|
||||
(ragdoll-settled? "Has the ragdoll stopped moving?" (_type_) object) ;; 125
|
||||
(ragdoll-spawn! "If possible, spawn ragdoll and start using it." (_type_ symbol symbol) vector) ;; 126
|
||||
(deactivate-ragdoll! "Deactivate the ragdoll process." (_type_) none) ;; 127
|
||||
(rnd-float "Get a random number from 0 to 1" (_type_) float) ;; 128
|
||||
(rnd-float-range "Get a random float in the range" (_type_ float float) float) ;; 129
|
||||
(rnd-int "Get a random int from to to the specified int" (_type_ int) int) ;; 130
|
||||
(rnd-int-excluding-masked "Get a random int in the range. Exclude a value n by setting the n-th bit of the mask."(_type_ int int) int) ;; 131
|
||||
(rnd-time-frame "Get a random time frame." (_type_ time-frame time-frame) time-frame) ;; 132
|
||||
(rnd-chance? "Returns true with the given probability." (_type_ float) symbol) ;; 133
|
||||
(rnd-chance-for-idle?
|
||||
"Like rnd-chance, but is more likely to return true when the game is close to not fitting in frame rate.
|
||||
This makes enemies start idling more if the game isn't running fast enough." (_type_ float) symbol) ;; 134
|
||||
(enemy-method-135 (_type_) none) ;; 135
|
||||
(set-ground-pat! (_type_ collide-query collide-spec float float float process) pat-surface) ;; 136
|
||||
(enemy-above-ground? (_type_ collide-query vector collide-spec float float float) symbol) ;; 137
|
||||
(try-locate-ground (_type_ meters meters symbol collide-spec) symbol) ;; 138
|
||||
(move-above-ground! (_type_ vector move-above-ground-params) none) ;; 139
|
||||
(update-focus (_type_) process) ;; 140
|
||||
(enemy-method-141 (_type_ float) symbol) ;; 141
|
||||
(penetrate->knocked-type (_type_ penetrate) knocked-type) ;; 142
|
||||
(find-ground-and-set-pat! "Figure out what ground we're standing on and update the ground-pat.
|
||||
Usually this will be done automatically by the collision system.
|
||||
This method should be called after manually repositioning an enemy." (_type_ collide-query collide-spec float float float process) pat-surface) ;; 136
|
||||
(enemy-above-ground? "Is this enemy above the ground?" (_type_ collide-query vector collide-spec float float float) symbol) ;; 137
|
||||
(move-to-ground "Snap the enemy to the ground below." (_type_ meters meters symbol collide-spec) symbol) ;; 138
|
||||
(move-above-ground! "Move the enemy. May keep the enemy snapped to the ground depending on flags." (_type_ vector move-above-ground-params) none) ;; 139
|
||||
(update-focus "Potentially update the focus, if there is something better to focus on." (_type_) process) ;; 140
|
||||
(check-awareness-trigger "Check triggering logic for awareness to see if this enemy can become aware yet." (_type_ float) symbol) ;; 141
|
||||
(penetrate->knocked-type "Based on the penetrate of an attacker, pick the knocked-type." (_type_ penetrate) knocked-type) ;; 142
|
||||
(on-dying (_type_) none) ;; 143
|
||||
(falling? (_type_) symbol) ;; 144
|
||||
(find-offending-pfoc (_type_ process attack-info) process-focusable) ;; 145
|
||||
(play-damage-sound (_type_ int) sound-id) ;; 146
|
||||
(check-victory (_type_) none) ;; 147
|
||||
(go-gun-dark-2-stretch (_type_) object) ;; 148
|
||||
(have-more-than-10-joints? (_type_) object) ;; 149
|
||||
(enemy-method-150 (_type_) symbol) ;; 150
|
||||
(should-move-to-ground? (_type_) symbol) ;; 151
|
||||
(enemy-method-152 (_type_) float) ;; 152
|
||||
(find-offending-pfoc "Figure out the attacker process from the attack message sender and attack-info.
|
||||
This is to handle cases where the attacker process is a non-focusable subprocess,
|
||||
or the attacker is driving a vehicle."(_type_ process attack-info) process-focusable) ;; 145
|
||||
(play-damage-sound "Pick and play the damage/death sound." (_type_ int) sound-id) ;; 146
|
||||
(clear-stale-victory "Remove victory flag if needed." (_type_) none) ;; 147
|
||||
(go-gun-dark-2-stretch "Go to the gun-dark-2-stretch state." (_type_) object) ;; 148
|
||||
(have-more-than-10-joints? "Does what it says, unused" (_type_) object) ;; 149
|
||||
(can-be-nuked? "Can this enemy be instantly destroyed by the nuke?" (_type_) symbol) ;; 150
|
||||
(should-move-to-ground? "Should this enemy be moved to the ground while moving?" (_type_) symbol) ;; 151
|
||||
(gem-chance "The chance of this enemy having a gem." (_type_) float) ;; 152
|
||||
(get-gem-pool-idx (_type_) int) ;; 153
|
||||
(mark-as-dead (_type_) none) ;; 154
|
||||
)
|
||||
@@ -41834,8 +41845,8 @@
|
||||
debug-control ;; 159
|
||||
)
|
||||
(:methods
|
||||
(init-enemy-info! (_type_ nav-enemy-info) none :replace) ;; 118
|
||||
(init-enemy-defaults! (_type_ nav-enemy-info) object :replace) ;; 125
|
||||
(set-enemy-info! (_type_ nav-enemy-info) none :replace) ;; 118
|
||||
(setup-enemy! (_type_ nav-enemy-info) object :replace) ;; 125
|
||||
(normalize-heading! (_type_ nav-control) none) ;; 160
|
||||
(nav-enemy-method-161 (_type_ nav-control) none) ;; 161
|
||||
(nav-enemy-method-162 (_type_) none) ;; 162
|
||||
@@ -41884,13 +41895,16 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern *enemy-dummy-shadow-control* shadow-control)
|
||||
(define-extern get-penetrate-using-from-attack-event (function process-drawable event-message-block penetrate))
|
||||
(define-extern enemy-setup-gem (function object :behavior enemy))
|
||||
(define-extern enemy-init-by-other (function process-drawable enemy-init-by-other-params object :behavior enemy))
|
||||
(define-extern enemy-event-handler (function process int symbol event-message-block object :behavior enemy))
|
||||
(define-extern enemy-simple-post (function none :behavior enemy))
|
||||
(define-extern enemy-falling-post (function none :behavior enemy))
|
||||
(define-extern enemy-die-falling-post (function none :behavior enemy))
|
||||
(define-extern get-penetrate-using-from-attack-event "Given an attack event to an enemy, return the penetrate that should be applied to the enemy"
|
||||
(function process-drawable event-message-block penetrate))
|
||||
(define-extern enemy-setup-gem "Determine if the enemy should have a gem and set drawing masks/particles as needed." (function object :behavior enemy))
|
||||
(define-extern enemy-init-by-other "Function to initialize an enemy from a parent process." (function process-drawable enemy-init-by-other-params object :behavior enemy))
|
||||
(define-extern enemy-event-handler "Default event handler for enemy." (function process int symbol event-message-block object :behavior enemy))
|
||||
(define-extern enemy-simple-post "Default post for enemy." (function none :behavior enemy))
|
||||
(define-extern enemy-falling-post "Post function that simply makes the enemy go down.
|
||||
Collision is enabled, so enemy will bounce off of walls or similar." (function none :behavior enemy))
|
||||
(define-extern enemy-die-falling-post "Post function that causes the enemy to go down until it hits the ground.
|
||||
Doesn't use full collision system - enemy will stop moving as soon as it hits any ground."(function none :behavior enemy))
|
||||
(define-extern *shockwave-knock-scalar* curve2d-fast)
|
||||
(define-extern ja-group-index? (function int symbol :behavior enemy))
|
||||
|
||||
@@ -49371,7 +49385,7 @@
|
||||
in-ditch ;; 192
|
||||
)
|
||||
(:methods
|
||||
(init-enemy-defaults! (_type_ nav-enemy-info) none :replace)
|
||||
;(init-enemy-defaults! (_type_ nav-enemy-info) none :replace)
|
||||
(set-squad (_type_) none) ;; 193
|
||||
(citizen-method-194 (_type_) none) ;; 194
|
||||
(citizen-method-195 (_type_) none) ;; 195
|
||||
|
||||
@@ -3160,6 +3160,9 @@
|
||||
[27, "a0", "process-focusable"],
|
||||
[30, "a0", "process-focusable"]
|
||||
],
|
||||
"(method 20 enemy)": [
|
||||
[[0, 30], "v0", "search-info-flag"]
|
||||
],
|
||||
"(method 59 enemy)": [
|
||||
[57, "a0", "process-focusable"],
|
||||
[60, "a0", "process-focusable"]
|
||||
@@ -3192,7 +3195,9 @@
|
||||
[140, "a1", "process-focusable"]
|
||||
],
|
||||
"(method 140 enemy)": [[18, "a1", "process-focusable"]],
|
||||
"(method 142 enemy)": [[[0, 40], "v0", "knocked-type"]],
|
||||
"get-penetrate-using-from-attack-event": [
|
||||
[[20, 40], "v0", "penetrate"],
|
||||
[2, "v1", "attack-info"],
|
||||
[5, "v1", "attack-info"],
|
||||
[25, "v1", "collide-shape"]
|
||||
@@ -3202,6 +3207,9 @@
|
||||
[67, "s3", "process-drawable"],
|
||||
[68, "a1", "collide-shape"]
|
||||
],
|
||||
"(method 68 enemy)": [
|
||||
[[0, 50], "v0", "enemy-aware"]
|
||||
],
|
||||
"(method 82 enemy)": [
|
||||
[80, "v1", "process-drawable"],
|
||||
[122, "v1", "attack-info"],
|
||||
|
||||
@@ -1903,6 +1903,11 @@
|
||||
"v1-8": "ii"
|
||||
}
|
||||
},
|
||||
"(method 20 enemy)": {
|
||||
"vars": {
|
||||
"v0-0": ["flag", "search-info-flag"]
|
||||
}
|
||||
},
|
||||
"(method 119 enemy)": {
|
||||
"vars": {
|
||||
"a1-5": ["cspec", "collide-spec"]
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
;; +++enemy-aware
|
||||
(defenum enemy-aware
|
||||
:type uint64
|
||||
(ea0 0)
|
||||
(ea1 1)
|
||||
(ea2 2)
|
||||
(ea3 3)
|
||||
(ea4 4)
|
||||
(unaware 0)
|
||||
(aware1 1)
|
||||
(aware2 2)
|
||||
(hostile 3)
|
||||
(flee 4)
|
||||
)
|
||||
;; ---enemy-aware
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
(death-start 34)
|
||||
(auto-death-phase-out 35)
|
||||
(has-gem 36)
|
||||
;; these seem to be an extension of the flags for nav-enemy.
|
||||
(ef37 37)
|
||||
(ef38 38)
|
||||
(ef39 39)
|
||||
@@ -83,6 +84,16 @@
|
||||
(ejf6 6)
|
||||
(ejf7 7)
|
||||
)
|
||||
|
||||
(defenum jump-stage
|
||||
:type int32
|
||||
(init 0)
|
||||
(winding-up 1)
|
||||
(takeoff 2)
|
||||
(in-air 3)
|
||||
(touchdown 4)
|
||||
(landing 5)
|
||||
)
|
||||
;; ---enemy-jump-flags
|
||||
|
||||
|
||||
@@ -96,8 +107,8 @@
|
||||
(flags enemy-flag)
|
||||
)
|
||||
(:methods
|
||||
(try-update-focus (_type_ process-focusable enemy) symbol :replace)
|
||||
(enemy-focus-method-13 (_type_ process-focusable enemy-aware) symbol)
|
||||
(focus-on! (_type_ process-focusable enemy) symbol :replace)
|
||||
(focus-on-with-awareness! (_type_ process-focusable enemy-aware) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -152,34 +163,34 @@
|
||||
(jump-height-min meters)
|
||||
(jump-height-factor float)
|
||||
(knocked-seek-ry-clamp float)
|
||||
(knocked-soft-vxz-lo float)
|
||||
(knocked-soft-vxz-hi float)
|
||||
(knocked-soft-vy-lo float)
|
||||
(knocked-soft-vy-hi float)
|
||||
(knocked-medium-vxz-lo float)
|
||||
(knocked-medium-vxz-hi float)
|
||||
(knocked-medium-vy-lo float)
|
||||
(knocked-medium-vy-hi float)
|
||||
(knocked-hard-vxz-lo float)
|
||||
(knocked-hard-vxz-hi float)
|
||||
(knocked-hard-vy-lo float)
|
||||
(knocked-hard-vy-hi float)
|
||||
(knocked-huge-vxz-lo float)
|
||||
(knocked-huge-vxz-hi float)
|
||||
(knocked-huge-vy-lo float)
|
||||
(knocked-huge-vy-hi float)
|
||||
(knocked-yellow-vxz-lo float)
|
||||
(knocked-yellow-vxz-hi float)
|
||||
(knocked-yellow-vy-lo float)
|
||||
(knocked-yellow-vy-hi float)
|
||||
(knocked-red-vxz-lo float)
|
||||
(knocked-red-vxz-hi float)
|
||||
(knocked-red-vy-lo float)
|
||||
(knocked-red-vy-hi float)
|
||||
(knocked-blue-vxz-lo float)
|
||||
(knocked-blue-vxz-hi float)
|
||||
(knocked-blue-vy-lo float)
|
||||
(knocked-blue-vy-hi float)
|
||||
(knocked-soft-vxz-lo meters)
|
||||
(knocked-soft-vxz-hi meters)
|
||||
(knocked-soft-vy-lo meters)
|
||||
(knocked-soft-vy-hi meters)
|
||||
(knocked-medium-vxz-lo meters)
|
||||
(knocked-medium-vxz-hi meters)
|
||||
(knocked-medium-vy-lo meters)
|
||||
(knocked-medium-vy-hi meters)
|
||||
(knocked-hard-vxz-lo meters)
|
||||
(knocked-hard-vxz-hi meters)
|
||||
(knocked-hard-vy-lo meters)
|
||||
(knocked-hard-vy-hi meters)
|
||||
(knocked-huge-vxz-lo meters)
|
||||
(knocked-huge-vxz-hi meters)
|
||||
(knocked-huge-vy-lo meters)
|
||||
(knocked-huge-vy-hi meters)
|
||||
(knocked-yellow-vxz-lo meters)
|
||||
(knocked-yellow-vxz-hi meters)
|
||||
(knocked-yellow-vy-lo meters)
|
||||
(knocked-yellow-vy-hi meters)
|
||||
(knocked-red-vxz-lo meters)
|
||||
(knocked-red-vxz-hi meters)
|
||||
(knocked-red-vy-lo meters)
|
||||
(knocked-red-vy-hi meters)
|
||||
(knocked-blue-vxz-lo meters)
|
||||
(knocked-blue-vxz-hi meters)
|
||||
(knocked-blue-vy-lo meters)
|
||||
(knocked-blue-vy-hi meters)
|
||||
(ragdoll-info ragdoll-setup)
|
||||
(shadow-size meters)
|
||||
(shadow-max-y meters)
|
||||
@@ -316,80 +327,80 @@
|
||||
gun-dark-2-stretch
|
||||
)
|
||||
(:methods
|
||||
(enemy-method-50 (_type_ int) none)
|
||||
(accelerate-fall! (_type_ vector) float)
|
||||
(damage-enemy! (_type_ object event-message-block) float)
|
||||
(reset-penetrate! (_type_) none)
|
||||
(update-collision-action (_type_ int) none)
|
||||
(adjust-transv-under-water! (_type_ vector) float)
|
||||
(damage-enemy-from-attack! (_type_ object event-message-block) float)
|
||||
(reset-penetrate-later! (_type_) none)
|
||||
(get-knockback-dir! (_type_ vector) vector)
|
||||
(get-knockback-angle (_type_) degrees)
|
||||
(knocked-handler (_type_ vector) object)
|
||||
(can-collide-with-focus? (_type_ process-focusable) object)
|
||||
(can-focus-on? (_type_ process-focusable) object)
|
||||
(check-water (_type_) object)
|
||||
(enemy-common-post (_type_) none)
|
||||
(lerp-damage (_type_ float) float)
|
||||
(scale-impact-vel-y! (_type_ vector vector float) vector)
|
||||
(impact-velocity-to-hit-points (_type_ float) float)
|
||||
(attack-direction-from-impact-vel (_type_ vector vector float) vector)
|
||||
(get-damage-from-attack (_type_ object event-message-block) float)
|
||||
(enemy-method-63 (_type_ float) float)
|
||||
(update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware)
|
||||
(penetrate->next-state (_type_ process event-message-block float) symbol)
|
||||
(apply-incoming-hitpoint-mods (_type_ float) float)
|
||||
(get-awareness-of-proc (_type_ process-focusable enemy-best-focus) enemy-aware)
|
||||
(msg-for-incoming-attack (_type_ process event-message-block float) symbol)
|
||||
(get-penetrated-by (_type_) penetrate)
|
||||
(coin-flip? (_type_) symbol)
|
||||
(get-enemy-aware (_type_ enemy-aware) enemy-aware)
|
||||
(enemy-method-69 (_type_) none)
|
||||
(enemy-method-70 (_type_ process-focusable enemy-aware) none)
|
||||
(modify-awareness (_type_ enemy-aware) enemy-aware)
|
||||
(focus-on-attacker! (_type_) none)
|
||||
(set-focus! (_type_ process-focusable enemy-aware) none)
|
||||
(go-dormant (_type_) object)
|
||||
(go-dormant-aware (_type_) object)
|
||||
(go-idle (_type_) object)
|
||||
(go-ambush-delay (_type_) object)
|
||||
(go-ambush (_type_) object)
|
||||
(go-stare (_type_) object)
|
||||
(go-stare2 (_type_) object)
|
||||
(go-directed (_type_) object)
|
||||
(go-hostile (_type_) object)
|
||||
(go-flee (_type_) object)
|
||||
(go-best-state (_type_) object)
|
||||
(go-state-for-focused (_type_) object)
|
||||
(go-die (_type_) object)
|
||||
(event-handler (_type_ process int symbol event-message-block) object :behavior enemy)
|
||||
(enemy-touch-handler (_type_ process event-message-block) object)
|
||||
(send-attack-on-jump-or-knocked (_type_ process event-message-block) object)
|
||||
(enemy-touched-handler (_type_ process event-message-block) object)
|
||||
(knocked-anim (_type_ enemy-knocked-info) symbol)
|
||||
(knocked-land-anim (_type_ enemy-knocked-info) symbol)
|
||||
(knocked-anim-handler (_type_ int enemy-knocked-info) symbol)
|
||||
(enemy-method-88 (_type_ enemy-knocked-info) symbol)
|
||||
(within-gspot-range? (_type_) symbol)
|
||||
(enemy-method-90 (_type_ ragdoll-proc) none)
|
||||
(enemy-method-91 (_type_ enemy-jump-info) object)
|
||||
(done-being-knocked? (_type_ enemy-knocked-info) symbol)
|
||||
(invalid-height? (_type_) symbol)
|
||||
(copy-ragdoll-orientation-to-root (_type_ ragdoll-proc) none)
|
||||
(check-jump-blocked? (_type_ enemy-jump-info) object)
|
||||
(init-jump-info! (_type_ enemy-jump-info) none)
|
||||
(setup-jump! (_type_ enemy-jump-info) none)
|
||||
(setup-jump-trajectory! (_type_ enemy-jump-info) none)
|
||||
(move-to-gspot! (_type_) float)
|
||||
(on-ground? (_type_ enemy-jump-info) symbol)
|
||||
(landed-jump-yet? (_type_ enemy-jump-info) symbol)
|
||||
(jump-in-air-anim (_type_ enemy-jump-info) symbol)
|
||||
(jump-land-anim (_type_ enemy-jump-info) symbol)
|
||||
(jump-wind-up-anim (_type_ enemy-jump-info) symbol)
|
||||
(jump-anim-handler (_type_ int enemy-jump-info) symbol)
|
||||
(in-jump-handler (_type_ int enemy-jump-info) none)
|
||||
(enemy-method-101 (_type_ int enemy-jump-info) none)
|
||||
(go-directed2 (_type_) object)
|
||||
(enemy-method-103 (_type_ vector float) symbol)
|
||||
(enemy-method-104 (_type_ vector float) symbol)
|
||||
(enemy-method-105 (_type_ float symbol) symbol)
|
||||
(jump-anim-handler (_type_ jump-stage enemy-jump-info) symbol)
|
||||
(move-along-ballistic-trajectory-for-jump (_type_ jump-stage enemy-jump-info) none)
|
||||
(adjust-heading-for-jump (_type_ jump-stage enemy-jump-info) none)
|
||||
(go-next-state-auto (_type_) object)
|
||||
(heading-matches-direction? (_type_ vector float) symbol)
|
||||
(pointing-toward? (_type_ vector float) symbol)
|
||||
(pointing-toward-focus? (_type_ float symbol) symbol)
|
||||
(find-best-focus (_type_) process)
|
||||
(is-pfoc-in-mesh? (_type_ process-focusable vector) symbol)
|
||||
(enemy-method-108 (_type_ process-focusable) symbol)
|
||||
(enemy-method-109 (_type_) symbol)
|
||||
(send-attack (_type_ process touching-shapes-entry uint) symbol)
|
||||
(can-become-hostile-to? (_type_ process-focusable vector) symbol)
|
||||
(should-flee-from? (_type_ process-focusable) symbol)
|
||||
(out-of-bounds? (_type_) symbol)
|
||||
(send-attack-from-tshape (_type_ process touching-shapes-entry uint) symbol)
|
||||
(on-attack (_type_ process-focusable) none)
|
||||
(get-incoming-attack! (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none)
|
||||
(handle-incoming-attack! (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none)
|
||||
(get-focus! (_type_) process-focusable)
|
||||
(send-attack-to-all-tshapes (_type_ process-focusable event-message-block) int)
|
||||
(find-and-damage-attackers (_type_ process-focusable event-message-block) int)
|
||||
(set-look-at-mode! (_type_ int) none)
|
||||
(stop-look-at! (_type_) none)
|
||||
(apply-friction (_type_) none)
|
||||
(init-enemy-info! (_type_ enemy-info) none)
|
||||
(init-enemy-defaults! (_type_ enemy-info) none)
|
||||
(set-enemy-info! (_type_ enemy-info) none)
|
||||
(setup-enemy! (_type_ enemy-info) none)
|
||||
(init-enemy-collision! (_type_) none)
|
||||
(init-enemy! (_type_) none)
|
||||
(go-idle2 (_type_) object)
|
||||
(enemy-method-123 (_type_) symbol)
|
||||
(go-fallback-init (_type_) object)
|
||||
(allow-ragdoll? (_type_) symbol)
|
||||
(disable-ragdoll (_type_) none)
|
||||
(ragdoll-settled? (_type_) object)
|
||||
(ragdoll-spawn! (_type_ symbol symbol) vector)
|
||||
@@ -397,28 +408,28 @@
|
||||
(rnd-float (_type_) float)
|
||||
(rnd-float-range (_type_ float float) float)
|
||||
(rnd-int (_type_ int) int)
|
||||
(enemy-method-131 (_type_ int int) int)
|
||||
(set-reaction-time! (_type_ time-frame time-frame) time-frame)
|
||||
(rnd-int-excluding-masked (_type_ int int) int)
|
||||
(rnd-time-frame (_type_ time-frame time-frame) time-frame)
|
||||
(rnd-chance? (_type_ float) symbol)
|
||||
(enemy-method-134 (_type_ float) symbol)
|
||||
(rnd-chance-for-idle? (_type_ float) symbol)
|
||||
(enemy-method-135 (_type_) none)
|
||||
(set-ground-pat! (_type_ collide-query collide-spec float float float process) pat-surface)
|
||||
(find-ground-and-set-pat! (_type_ collide-query collide-spec float float float process) pat-surface)
|
||||
(enemy-above-ground? (_type_ collide-query vector collide-spec float float float) symbol)
|
||||
(try-locate-ground (_type_ meters meters symbol collide-spec) symbol)
|
||||
(move-to-ground (_type_ meters meters symbol collide-spec) symbol)
|
||||
(move-above-ground! (_type_ vector move-above-ground-params) none)
|
||||
(update-focus (_type_) process)
|
||||
(enemy-method-141 (_type_ float) symbol)
|
||||
(check-awareness-trigger (_type_ float) symbol)
|
||||
(penetrate->knocked-type (_type_ penetrate) knocked-type)
|
||||
(on-dying (_type_) none)
|
||||
(falling? (_type_) symbol)
|
||||
(find-offending-pfoc (_type_ process attack-info) process-focusable)
|
||||
(play-damage-sound (_type_ int) sound-id)
|
||||
(check-victory (_type_) none)
|
||||
(clear-stale-victory (_type_) none)
|
||||
(go-gun-dark-2-stretch (_type_) object)
|
||||
(have-more-than-10-joints? (_type_) object)
|
||||
(enemy-method-150 (_type_) symbol)
|
||||
(can-be-nuked? (_type_) symbol)
|
||||
(should-move-to-ground? (_type_) symbol)
|
||||
(enemy-method-152 (_type_) float)
|
||||
(gem-chance (_type_) float)
|
||||
(get-gem-pool-idx (_type_) int)
|
||||
(mark-as-dead (_type_) none)
|
||||
)
|
||||
@@ -432,20 +443,22 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod try-update-focus ((this enemy-focus) (arg0 process-focusable) (arg1 enemy))
|
||||
(let* ((t9-0 (method-of-type focus try-update-focus))
|
||||
(defmethod focus-on! ((this enemy-focus) (arg0 process-focusable) (arg1 enemy))
|
||||
"Make this enemy focus on the process-focusable. If already focused, update awareness."
|
||||
(let* ((t9-0 (method-of-type focus focus-on!))
|
||||
(s3-0 (t9-0 this arg0))
|
||||
)
|
||||
(when (not s3-0)
|
||||
(logclear! (-> this flags) (enemy-flag look-at-focus))
|
||||
(set! (-> this aware) (get-enemy-aware arg1 (update-awareness! arg1 arg0 (the-as enemy-best-focus #f))))
|
||||
(set! (-> this aware) (modify-awareness arg1 (get-awareness-of-proc arg1 arg0 (the-as enemy-best-focus #f))))
|
||||
)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-focus-method-13 ((this enemy-focus) (arg0 process-focusable) (arg1 enemy-aware))
|
||||
(let* ((t9-0 (method-of-type focus try-update-focus))
|
||||
(defmethod focus-on-with-awareness! ((this enemy-focus) (arg0 process-focusable) (arg1 enemy-aware))
|
||||
"Focus on the process-focusable, updating the aware."
|
||||
(let* ((t9-0 (method-of-type focus focus-on!))
|
||||
(v0-0 (t9-0 this arg0))
|
||||
)
|
||||
(set! (-> this aware) arg1)
|
||||
@@ -462,7 +475,7 @@
|
||||
(let ((t9-0 (method-of-type focus clear-focused)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this aware) (enemy-aware ea0))
|
||||
(set! (-> this aware) (enemy-aware unaware))
|
||||
(logclear! (-> this flags) (enemy-flag look-at-focus))
|
||||
(none)
|
||||
)
|
||||
|
||||
+389
-264
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -125,47 +125,50 @@
|
||||
(-> *talker-speech* 0)
|
||||
)
|
||||
|
||||
(defmethod talker-speech-class-method-9 ((this talker-speech-class))
|
||||
(and (>= (-> *game-info* unknown-arr4 (* (-> this speech) 2)) (-> this pos))
|
||||
(>= (-> this neg) (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1)))
|
||||
(defmethod should-play? ((this talker-speech-class))
|
||||
"Return if the talker is in a state where it should play."
|
||||
(and (>= (-> *game-info* talker-state (* (-> this speech) 2)) (-> this pos))
|
||||
(>= (-> this neg) (-> *game-info* talker-state (+ (* (-> this speech) 2) 1)))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod play-communicator-speech! ((this talker-speech-class))
|
||||
(set! (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1)) (the-as uint #xffff))
|
||||
(defmethod mark-played! ((this talker-speech-class))
|
||||
"Mark something as played by making its state UINT16_MAX"
|
||||
(set! (-> *game-info* talker-state (+ (* (-> this speech) 2) 1)) (the-as uint #xffff))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod talker-speech-class-method-11 ((this talker-speech-class))
|
||||
(set! (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1)) (the-as uint 0))
|
||||
(defmethod reset-state! ((this talker-speech-class))
|
||||
"Reset the state of this talker to 0 (the initial value)"
|
||||
(set! (-> *game-info* talker-state (+ (* (-> this speech) 2) 1)) (the-as uint 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod talker-speech-class-method-12 ((this talker-speech-class) (arg0 int))
|
||||
(defmethod yes-play! ((this talker-speech-class) (arg0 int))
|
||||
(if (>= arg0 0)
|
||||
(set! (-> *game-info* unknown-arr4 (* (-> this speech) 2))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* unknown-arr4 (* (-> this speech) 2))) #xfff0 arg0))
|
||||
(set! (-> *game-info* talker-state (* (-> this speech) 2))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* talker-state (* (-> this speech) 2))) #xfff0 arg0))
|
||||
)
|
||||
(set! (-> *game-info* unknown-arr4 (* (-> this speech) 2))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* unknown-arr4 (* (-> this speech) 2))) 0 (- arg0)))
|
||||
(set! (-> *game-info* talker-state (* (-> this speech) 2))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* talker-state (* (-> this speech) 2))) 0 (- arg0)))
|
||||
)
|
||||
)
|
||||
(if (talker-speech-class-method-9 this)
|
||||
(if (should-play? this)
|
||||
(talker-spawn-func this *entity-pool* (target-pos 0) (the-as region #f))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod talker-speech-class-method-13 ((this talker-speech-class) (arg0 int))
|
||||
(defmethod no-play! ((this talker-speech-class) (arg0 int))
|
||||
(if (>= arg0 0)
|
||||
(set! (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1))) #xfff0 arg0))
|
||||
(set! (-> *game-info* talker-state (+ (* (-> this speech) 2) 1))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* talker-state (+ (* (-> this speech) 2) 1))) #xfff0 arg0))
|
||||
)
|
||||
(set! (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* unknown-arr4 (+ (* (-> this speech) 2) 1))) 0 (- arg0)))
|
||||
(set! (-> *game-info* talker-state (+ (* (-> this speech) 2) 1))
|
||||
(the-as uint (seekl (the-as int (-> *game-info* talker-state (+ (* (-> this speech) 2) 1))) 0 (- arg0)))
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -175,16 +178,16 @@
|
||||
;; WARN: Return type mismatch int vs sound-id.
|
||||
(defun talker-spawn-func ((arg0 talker-speech-class) (arg1 process-tree) (arg2 vector) (arg3 region))
|
||||
(local-vars (s2-0 int))
|
||||
(when (or (not arg0) (zero? (-> arg0 speech)) (not (talker-speech-class-method-9 arg0)))
|
||||
(when (or (not arg0) (zero? (-> arg0 speech)) (not (should-play? arg0)))
|
||||
(set! s2-0 0)
|
||||
(goto cfg-27)
|
||||
)
|
||||
(if (and (or (not (-> *setting-control* user-current play-hints))
|
||||
(= (-> *setting-control* user-current dialog-volume) 0.0)
|
||||
)
|
||||
(logtest? (-> arg0 flags) (talker-flags tf0))
|
||||
(logtest? (-> arg0 flags) (talker-flags play-only-once))
|
||||
)
|
||||
(play-communicator-speech! arg0)
|
||||
(mark-played! arg0)
|
||||
)
|
||||
(set! s2-0
|
||||
(the-as int (lookup-gui-connection-id *gui-control* (-> arg0 name) (-> arg0 channel) (gui-action none)))
|
||||
@@ -217,7 +220,7 @@
|
||||
)
|
||||
|
||||
(defbehavior talker-init talker ((arg0 talker-speech-class) (arg1 vector) (arg2 region))
|
||||
(set! (-> self trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self trans) arg1)
|
||||
(let ((v1-2 (shr (the-as int (-> arg0 channel)) 4)))
|
||||
(when (not (or (or (= v1-2 4) (= v1-2 5))
|
||||
(or (not (-> *setting-control* user-current play-hints))
|
||||
@@ -268,7 +271,7 @@
|
||||
(set! (-> self voicebox) (the-as handle #f))
|
||||
(set! (-> self save?) #f)
|
||||
(set! (-> self grab?) #f)
|
||||
(if (logtest? (-> self message flags) (talker-flags tf5 tf6))
|
||||
(if (logtest? (-> self message flags) (talker-flags fade-in slide-in))
|
||||
(set! (-> self interp) 0.0)
|
||||
(set! (-> self interp) 1.0)
|
||||
)
|
||||
@@ -296,7 +299,7 @@
|
||||
(case (-> this message channel)
|
||||
(((gui-channel notice))
|
||||
(cond
|
||||
((logtest? (-> this message flags) (talker-flags tf7))
|
||||
((logtest? (-> this message flags) (talker-flags bigger-font))
|
||||
(let ((v1-9 gp-0)
|
||||
(a1-1 36)
|
||||
(a0-4 140)
|
||||
@@ -328,11 +331,11 @@
|
||||
(set! (-> v1-15 height) (the float 140))
|
||||
)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning middle large))
|
||||
(if (logtest? (-> this message flags) (talker-flags tf5))
|
||||
(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 tf6))
|
||||
(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)))
|
||||
@@ -382,9 +385,10 @@
|
||||
(defstate idle (talker)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(suspend-for (the-as time-frame (-> self message delay)))
|
||||
(suspend-for (the-as time-frame (-> self message delay))
|
||||
)
|
||||
(while (or (not (time-elapsed? (-> self start-time) (the-as time-frame (+ (-> self message delay) 300))))
|
||||
(and (logtest? (-> self message flags) (talker-flags tf8))
|
||||
(and (logtest? (-> self message flags) (talker-flags long-timeout))
|
||||
(not (time-elapsed? (-> self start-time) (seconds 180)))
|
||||
)
|
||||
)
|
||||
@@ -410,8 +414,8 @@
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(set-time! (-> self state-time))
|
||||
(if (logtest? (-> self message flags) (talker-flags tf0))
|
||||
(play-communicator-speech! (-> self message))
|
||||
(if (logtest? (-> self message flags) (talker-flags play-only-once))
|
||||
(mark-played! (-> self message))
|
||||
)
|
||||
(set-setting! 'hint (process->ppointer self) 0.0 0)
|
||||
(set-setting! 'speech-control #f 0.0 0)
|
||||
@@ -427,12 +431,12 @@
|
||||
(the-as process #f)
|
||||
)
|
||||
)
|
||||
(when (and (nonzero? (-> self voice-id)) (logtest? (-> self message flags) (talker-flags tf1)))
|
||||
(when (and (nonzero? (-> self voice-id)) (logtest? (-> self message flags) (talker-flags reduce-volume)))
|
||||
(add-setting! 'music-volume 'rel 0.25 0)
|
||||
(add-setting! 'sfx-volume 'rel 0.75 0)
|
||||
(add-setting! 'dialog-volume 'rel (-> *setting-control* user-current dialog-volume-talker) 0)
|
||||
)
|
||||
(if (logtest? (-> self message flags) (talker-flags tf2))
|
||||
(if (logtest? (-> self message flags) (talker-flags auto-save-on-each-start))
|
||||
(auto-save-user)
|
||||
)
|
||||
(apply-settings *setting-control*)
|
||||
@@ -456,7 +460,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self message flags) (talker-flags tf3)) (not (-> self save?)))
|
||||
(when (and (logtest? (-> self message flags) (talker-flags auto-save-once-on-exit)) (not (-> self save?)))
|
||||
(set! (-> self save?) #t)
|
||||
(auto-save-user)
|
||||
)
|
||||
@@ -517,7 +521,7 @@
|
||||
(and (nonzero? (-> self message-id))
|
||||
(= (get-status *gui-control* (-> self message-id)) (gui-status active))
|
||||
(or (not (time-elapsed? (-> self state-time) (the-as time-frame (-> self message text-duration))))
|
||||
(and (logtest? (-> self message flags) (talker-flags tf4))
|
||||
(and (logtest? (-> self message flags) (talker-flags only-play-in-region))
|
||||
(-> self region)
|
||||
(point-in-region-debug! (-> self region) (target-pos 0))
|
||||
)
|
||||
@@ -541,7 +545,7 @@
|
||||
(= (get-status *gui-control* (-> self message-id)) (gui-status active))
|
||||
(not (paused?))
|
||||
)
|
||||
(if (logtest? (-> self message flags) (talker-flags tf5))
|
||||
(if (logtest? (-> self message flags) (talker-flags fade-in))
|
||||
(seek! (-> self interp) 1.0 (* 0.5 (seconds-per-frame)))
|
||||
(seek! (-> self interp) 1.0 (* 4.0 (seconds-per-frame)))
|
||||
)
|
||||
@@ -550,9 +554,9 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(when (and (nonzero? (-> self message-id)) (logtest? (-> self message flags) (talker-flags tf5 tf6)))
|
||||
(when (and (nonzero? (-> self message-id)) (logtest? (-> self message flags) (talker-flags fade-in slide-in)))
|
||||
(while (!= (-> self interp) 0.0)
|
||||
(if (logtest? (-> self message flags) (talker-flags tf5))
|
||||
(if (logtest? (-> self message flags) (talker-flags fade-in))
|
||||
(seek! (-> self interp) 0.0 (* 0.5 (seconds-per-frame)))
|
||||
(seek! (-> self interp) 0.0 (* 4.0 (seconds-per-frame)))
|
||||
)
|
||||
@@ -562,8 +566,9 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self message flags) (talker-flags tf3)) (not (-> self save?)))
|
||||
(suspend-for (seconds 1))
|
||||
(when (and (logtest? (-> self message flags) (talker-flags auto-save-once-on-exit)) (not (-> self save?)))
|
||||
(suspend-for (seconds 1)
|
||||
)
|
||||
(set! (-> self save?) #t)
|
||||
(auto-save-user)
|
||||
)
|
||||
|
||||
@@ -5,17 +5,6 @@
|
||||
;; name in dgo: aligner-h
|
||||
;; dgos: GAME
|
||||
|
||||
(defenum align-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(disabled) ;; keep object velocity
|
||||
(af01)
|
||||
(af02)
|
||||
(af03)
|
||||
(af04)
|
||||
(af05)
|
||||
)
|
||||
|
||||
;; +++align-opts
|
||||
(defenum align-opts
|
||||
:bitfield #t
|
||||
@@ -42,11 +31,6 @@
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(disabled) ;; keep object velocity
|
||||
(af01)
|
||||
(af02)
|
||||
(af03)
|
||||
(af04)
|
||||
(af05)
|
||||
)
|
||||
;; ---align-flags
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> this transform 1)) (the-as pointer (-> this transform)) 48)
|
||||
(quaternion-copy! (the-as quaternion (-> this transform 1 rot)) (-> this align quat))
|
||||
(set! (-> this transform 1 scale quad) (-> this align scale quad))
|
||||
(vector-copy! (-> this transform 1 scale) (-> this align scale))
|
||||
(let* ((a2-5 (-> this matrix 1))
|
||||
(a3-0 (-> this matrix))
|
||||
(v1-21 (-> a3-0 0 rvec quad))
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when a2-0
|
||||
(set! (-> gp-0 quad) (-> self sphere quad))
|
||||
(vector-copy! gp-0 (-> self sphere))
|
||||
(set! (-> gp-0 w) 1.0)
|
||||
(vector-matrix*! gp-0 gp-0 (-> (the-as process-drawable a2-0) node-list data v1-5 bone transform))
|
||||
(let ((v1-9 (-> self root)))
|
||||
@@ -221,7 +221,7 @@
|
||||
(let ((s5-1 (-> self root)))
|
||||
(set! (-> s5-1 nav-radius) (-> self sphere r))
|
||||
(set! (-> s5-1 root-prim local-sphere w) (-> self sphere r))
|
||||
(set! (-> s5-1 trans quad) (-> self sphere quad))
|
||||
(vector-copy! (-> s5-1 trans) (-> self sphere))
|
||||
(set! (-> s5-1 trans w) 1.0)
|
||||
(vector-identity! (-> s5-1 scale))
|
||||
(quaternion-identity! (-> s5-1 quat))
|
||||
|
||||
@@ -155,17 +155,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-2 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s4-2 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s4-2 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s4-2 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s4-2 trans quad) (the-as uint128 0))
|
||||
(let ((f30-0 (-> arg0 bounds w)))
|
||||
(matrix-4x4-inverse! s4-2 (-> arg1 data 0 bone transform))
|
||||
(set! (-> arg0 bounds w) 1.0)
|
||||
(vector-matrix*! (-> arg0 bounds) (-> arg0 bounds) s4-2)
|
||||
(set! (-> arg0 bounds w) f30-0)
|
||||
)
|
||||
(let ((s4-2 (new-stack-matrix0))
|
||||
(f30-0 (-> arg0 bounds w))
|
||||
)
|
||||
(matrix-4x4-inverse! s4-2 (-> arg1 data 0 bone transform))
|
||||
(set! (-> arg0 bounds w) 1.0)
|
||||
(vector-matrix*! (-> arg0 bounds) (-> arg0 bounds) s4-2)
|
||||
(set! (-> arg0 bounds w) f30-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -179,7 +175,7 @@
|
||||
(set! (-> v1-2 mat rvec quad) (the-as uint128 0))
|
||||
(set! (-> v1-2 mat uvec quad) (the-as uint128 0))
|
||||
(set! (-> v1-2 mat fvec quad) (the-as uint128 0))
|
||||
(set! (-> v1-2 mat trans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> v1-2 mat trans) (-> this root trans))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
@@ -240,7 +236,7 @@
|
||||
(else
|
||||
(set! (-> arg0 bbox-valid?) #t)
|
||||
(set! (-> arg0 bbox min quad) (-> a1-1 quad))
|
||||
(set! (-> arg0 bbox max quad) (-> a1-1 quad))
|
||||
(vector-copy! (-> arg0 bbox max) a1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -382,8 +378,8 @@
|
||||
(let ((s1-0 (new 'stack-no-clear 'bounding-box))
|
||||
(s0-0 (-> arg0 bbox-valid?))
|
||||
)
|
||||
(set! (-> s1-0 min quad) (-> arg0 bbox min quad))
|
||||
(set! (-> s1-0 max quad) (-> arg0 bbox max quad))
|
||||
(vector-copy! (-> s1-0 min) (-> arg0 bbox min))
|
||||
(vector-copy! (-> s1-0 max) (-> arg0 bbox max))
|
||||
(update-bbox-for-joint this arg0 sv-80)
|
||||
(let* ((v1-7 arg1)
|
||||
(v1-8 (cond
|
||||
@@ -408,7 +404,7 @@
|
||||
(update-bbox-for-joint this (the-as joint-exploder-list sv-64) sv-80)
|
||||
(set! (-> arg0 bbox-valid?) s0-0)
|
||||
(set! (-> arg0 bbox min quad) (-> s1-0 min quad))
|
||||
(set! (-> arg0 bbox max quad) (-> s1-0 max quad))
|
||||
(vector-copy! (-> arg0 bbox max) (-> s1-0 max))
|
||||
s2-0
|
||||
)
|
||||
(else
|
||||
@@ -469,7 +465,7 @@
|
||||
(let* ((s2-0 (-> s4-0 joint s3-0))
|
||||
(s1-0 (-> s2-0 mat trans))
|
||||
)
|
||||
(set! (-> s2-0 prev-pos quad) (-> s1-0 quad))
|
||||
(vector-copy! (-> s2-0 prev-pos) s1-0)
|
||||
(+! (-> s2-0 transv y) f30-0)
|
||||
(when (< 0.0 (-> this tuning friction))
|
||||
(.lvf vf1 (&-> (-> s2-0 transv) quad))
|
||||
@@ -531,7 +527,7 @@
|
||||
(s2-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(vector-! (-> s2-0 move-dist) s3-0 (-> s4-1 prev-pos))
|
||||
(set! (-> s2-0 start-pos quad) (-> s4-1 prev-pos quad))
|
||||
(vector-copy! (-> s2-0 start-pos) (-> s4-1 prev-pos))
|
||||
(let ((v1-11 s2-0))
|
||||
(set! (-> v1-11 radius) 40.96)
|
||||
(set! (-> v1-11 collide-with) (-> this static-params collide-spec))
|
||||
@@ -543,7 +539,7 @@
|
||||
(set! (-> v1-11 action-mask) (collide-action solid))
|
||||
)
|
||||
(when (>= (probe-using-line-sphere *collide-cache* s2-0) 0.0)
|
||||
(set! (-> s3-0 quad) (-> s2-0 best-other-tri intersect quad))
|
||||
(vector-copy! s3-0 (-> s2-0 best-other-tri intersect))
|
||||
(let* ((v1-16 (-> s4-1 transv))
|
||||
(f28-0 (sqrtf (+ (* (-> v1-16 x) (-> v1-16 x)) (* (-> v1-16 z) (-> v1-16 z)))))
|
||||
)
|
||||
@@ -614,8 +610,8 @@
|
||||
)
|
||||
(let ((gp-1 (new 'stack-no-clear 'bounding-box)))
|
||||
(let ((v1-31 (-> self root trans)))
|
||||
(set! (-> gp-1 min quad) (-> v1-31 quad))
|
||||
(set! (-> gp-1 max quad) (-> v1-31 quad))
|
||||
(vector-copy! (-> gp-1 min) v1-31)
|
||||
(vector-copy! (-> gp-1 max) v1-31)
|
||||
)
|
||||
(dotimes (s5-1 (the-as int (+ (-> self tuning max-probes) 1)))
|
||||
(let ((s4-0 (-> self lists data s5-1)))
|
||||
@@ -659,32 +655,14 @@
|
||||
(if (zero? a0-6)
|
||||
(set! a0-6 (-> v1-2 joint-index))
|
||||
)
|
||||
(let* ((a3-0 (-> this parent 0 node-list data a0-6 bone transform))
|
||||
(a2-0 (-> s3-0 mat))
|
||||
(v1-9 (-> a3-0 rvec quad))
|
||||
(a0-8 (-> a3-0 uvec quad))
|
||||
(a1-4 (-> a3-0 fvec quad))
|
||||
(a3-1 (-> a3-0 trans quad))
|
||||
)
|
||||
(set! (-> a2-0 rvec quad) v1-9)
|
||||
(set! (-> a2-0 uvec quad) a0-8)
|
||||
(set! (-> a2-0 fvec quad) a1-4)
|
||||
(set! (-> a2-0 trans quad) a3-1)
|
||||
(let ((a3-0 (-> this parent 0 node-list data a0-6 bone transform)))
|
||||
(matrix-copy! (-> s3-0 mat) a3-0)
|
||||
)
|
||||
(matrix-identity! (-> s3-0 rmat))
|
||||
)
|
||||
(else
|
||||
(let* ((a3-2 (-> this node-list data (-> v1-2 joint-index) bone transform))
|
||||
(a2-1 (-> s3-0 mat))
|
||||
(v1-15 (-> a3-2 rvec quad))
|
||||
(a0-11 (-> a3-2 uvec quad))
|
||||
(a1-5 (-> a3-2 fvec quad))
|
||||
(a3-3 (-> a3-2 trans quad))
|
||||
)
|
||||
(set! (-> a2-1 rvec quad) v1-15)
|
||||
(set! (-> a2-1 uvec quad) a0-11)
|
||||
(set! (-> a2-1 fvec quad) a1-5)
|
||||
(set! (-> a2-1 trans quad) a3-3)
|
||||
(let ((a3-2 (-> this node-list data (-> v1-2 joint-index) bone transform)))
|
||||
(matrix-copy! (-> s3-0 mat) a3-2)
|
||||
)
|
||||
(matrix-identity! (-> s3-0 rmat))
|
||||
)
|
||||
@@ -734,8 +712,8 @@
|
||||
(set! (-> v1-33 head) 0)
|
||||
(let ((s5-1 (-> v1-33 bbox)))
|
||||
(let ((v1-34 (-> gp-0 joint 0 mat trans)))
|
||||
(set! (-> s5-1 min quad) (-> v1-34 quad))
|
||||
(set! (-> s5-1 max quad) (-> v1-34 quad))
|
||||
(vector-copy! (-> s5-1 min) v1-34)
|
||||
(vector-copy! (-> s5-1 max) v1-34)
|
||||
)
|
||||
(dotimes (s4-1 (-> gp-0 num-joints))
|
||||
(add-point! s5-1 (the-as vector (+ (the-as uint (-> gp-0 joint 0 mat trans)) (* 240 s4-1))))
|
||||
@@ -779,9 +757,9 @@
|
||||
(set! (-> v1-8 0 probeless?) #t)
|
||||
)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> self parent 0 root trans quad))
|
||||
(vector-copy! (-> self root trans) (-> self parent 0 root trans))
|
||||
(quaternion-copy! (-> self root quat) (-> self parent 0 root quat))
|
||||
(set! (-> self root scale quad) (-> self parent 0 root scale quad))
|
||||
(vector-copy! (-> self root scale) (-> self parent 0 root scale))
|
||||
(when (-> arg3 art-level)
|
||||
(let ((a1-8 (entity-actor-from-level-name (-> arg3 art-level))))
|
||||
(if a1-8
|
||||
|
||||
@@ -190,7 +190,7 @@ This is used to make jak look toward an enemy, for example."
|
||||
(defmethod new joint-mod-spinner ((allocation symbol) (type-to-make type) (proc process-drawable) (bone-idx int) (axis vector) (rate float))
|
||||
"Create and attach a joint-mod-spinner to a joint."
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> v0-0 spin-axis quad) (-> axis quad))
|
||||
(vector-copy! (-> v0-0 spin-axis) axis)
|
||||
(set! (-> v0-0 spin-rate) rate)
|
||||
(set! (-> v0-0 enable) #t)
|
||||
(set! (-> v0-0 angle) 0.0)
|
||||
@@ -306,7 +306,7 @@ This is used to make jak look toward an enemy, for example."
|
||||
(cspace<-parented-transformq-joint! bone-cspace joint-transform)
|
||||
(let ((s4-0 (vector<-cspace2! (new 'stack-no-clear 'vector) bone-cspace)))
|
||||
(quaternion*! (-> joint-transform quat) (-> joint-transform quat) (-> s3-0 rotation))
|
||||
(set! (-> joint-transform trans quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> joint-transform trans) s4-0)
|
||||
)
|
||||
)
|
||||
(cspace<-transformq! bone-cspace joint-transform)
|
||||
@@ -340,7 +340,7 @@ This is used to make jak look toward an enemy, for example."
|
||||
(set! (-> v1-0 transform quat quad) (-> joint-transform quat quad))
|
||||
)
|
||||
(if (not (logtest? (-> v1-0 flags) (joint-mod-base-flags scale)))
|
||||
(set! (-> v1-0 transform scale quad) (-> joint-transform scale quad))
|
||||
(vector-copy! (-> v1-0 transform scale) (-> joint-transform scale))
|
||||
)
|
||||
(cspace<-parented-transformq-joint! bone-cspace (-> v1-0 transform))
|
||||
)
|
||||
@@ -467,8 +467,8 @@ The translation is kept from the result of the normal parented value."
|
||||
(cspace<-parented-transformq-joint! bone-cspace joint-transform)
|
||||
(matrix<-transformq! gp-0 (-> s4-0 transform))
|
||||
(set! (-> bone-cspace bone transform rvec quad) (-> gp-0 rvec quad))
|
||||
(set! (-> bone-cspace bone transform uvec quad) (-> gp-0 uvec quad))
|
||||
(set! (-> bone-cspace bone transform fvec quad) (-> gp-0 fvec quad))
|
||||
(vector-copy! (-> bone-cspace bone transform uvec) (-> gp-0 uvec))
|
||||
(vector-copy! (-> bone-cspace bone transform fvec) (-> gp-0 fvec))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -66,34 +66,12 @@
|
||||
(new 'stack-no-clear 'matrix)
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(matrix->trans s5-0 s3-0)
|
||||
(set! (-> s5-0 trans quad) (-> s3-0 quad))
|
||||
(vector-copy! (-> s5-0 trans) s3-0)
|
||||
(matrix->trans s4-1 s3-0)
|
||||
(set! (-> s4-1 trans quad) (-> s3-0 quad))
|
||||
)
|
||||
(let* ((a2-0 (-> gp-0 shoulder-matrix-no-ik))
|
||||
(a3-0 s5-0)
|
||||
(v1-22 (-> a3-0 rvec quad))
|
||||
(a0-7 (-> a3-0 uvec quad))
|
||||
(a1-3 (-> a3-0 fvec quad))
|
||||
(a3-1 (-> a3-0 trans quad))
|
||||
)
|
||||
(set! (-> a2-0 rvec quad) v1-22)
|
||||
(set! (-> a2-0 uvec quad) a0-7)
|
||||
(set! (-> a2-0 fvec quad) a1-3)
|
||||
(set! (-> a2-0 trans quad) a3-1)
|
||||
)
|
||||
(let* ((a2-1 (-> gp-0 elbow-matrix-no-ik))
|
||||
(a3-2 s4-1)
|
||||
(v1-23 (-> a3-2 rvec quad))
|
||||
(a0-8 (-> a3-2 uvec quad))
|
||||
(a1-4 (-> a3-2 fvec quad))
|
||||
(a3-3 (-> a3-2 trans quad))
|
||||
)
|
||||
(set! (-> a2-1 rvec quad) v1-23)
|
||||
(set! (-> a2-1 uvec quad) a0-8)
|
||||
(set! (-> a2-1 fvec quad) a1-4)
|
||||
(set! (-> a2-1 trans quad) a3-3)
|
||||
(vector-copy! (-> s4-1 trans) s3-0)
|
||||
)
|
||||
(matrix-copy! (-> gp-0 shoulder-matrix-no-ik) s5-0)
|
||||
(matrix-copy! (-> gp-0 elbow-matrix-no-ik) s4-1)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! sv-784 (new 'stack-no-clear 'vector))
|
||||
(let ((s0-0 (new 'stack-no-clear 'vector))
|
||||
@@ -102,8 +80,8 @@
|
||||
)
|
||||
0.0
|
||||
0.0
|
||||
(set! (-> s2-0 quad) (-> s5-0 trans quad))
|
||||
(set! (-> sv-784 quad) (-> s4-1 trans quad))
|
||||
(vector-copy! s2-0 (-> s5-0 trans))
|
||||
(vector-copy! sv-784 (-> s4-1 trans))
|
||||
(let ((a1-5 s0-0))
|
||||
(let ((v1-27 sv-784))
|
||||
(let ((a0-13 (-> s4-1 uvec)))
|
||||
@@ -122,7 +100,7 @@
|
||||
(if (-> gp-0 callback)
|
||||
((-> gp-0 callback) gp-0 s5-0 s4-1 s0-0)
|
||||
)
|
||||
(set! (-> s1-0 quad) (-> gp-0 handle-pos quad))
|
||||
(vector-copy! s1-0 (-> gp-0 handle-pos))
|
||||
(let ((f30-0 (vector-vector-distance s2-0 sv-784))
|
||||
(f0-12 (vector-vector-distance sv-784 s0-0))
|
||||
)
|
||||
@@ -253,7 +231,7 @@
|
||||
)
|
||||
(set! (-> gp-1 rvec quad) (-> s4-1 trans quad))
|
||||
(matrix*! s4-1 s4-1 a2-20)
|
||||
(set! (-> s4-1 trans quad) (-> gp-1 rvec quad))
|
||||
(vector-copy! (-> s4-1 trans) (-> gp-1 rvec))
|
||||
)
|
||||
(let ((s3-2 (quaternion->matrix (new 'stack-no-clear 'matrix) sv-372))
|
||||
(a2-21 (matrix-4x4-inverse! (new 'stack-no-clear 'matrix) s5-0))
|
||||
@@ -262,7 +240,7 @@
|
||||
(set! (-> gp-2 rvec quad) (-> s5-0 trans quad))
|
||||
(matrix*! s4-1 s4-1 a2-21)
|
||||
(matrix*! s5-0 s5-0 s3-2)
|
||||
(set! (-> s5-0 trans quad) (-> gp-2 rvec quad))
|
||||
(vector-copy! (-> s5-0 trans) (-> gp-2 rvec))
|
||||
)
|
||||
(matrix*! s4-1 s4-1 s5-0)
|
||||
)
|
||||
@@ -292,7 +270,7 @@
|
||||
)
|
||||
|
||||
(defmethod set-ik-target! ((this joint-mod-ik) (pos vector))
|
||||
(set! (-> this handle-pos quad) (-> pos quad))
|
||||
(vector-copy! (-> this handle-pos) pos)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -501,13 +479,13 @@
|
||||
(f30-1 (lerp-scale 0.0 1.0 f0-4 0.85 1.0))
|
||||
)
|
||||
(vector-deg-slerp (-> s5-0 twist) (-> s5-0 twist) s4-0 0.3)
|
||||
(set! (-> s4-0 quad) (-> s5-0 twist quad))
|
||||
(vector-copy! s4-0 (-> s5-0 twist))
|
||||
(seek! (-> s5-0 blend) (-> s5-0 flex-blend) (* 4.0 (seconds-per-frame)))
|
||||
(let ((s3-1 (matrix->scale gp-0 (new 'stack-no-clear 'vector))))
|
||||
(let ((s2-0 (matrix->quat gp-0 (new 'stack-no-clear 'quaternion)))
|
||||
(s0-0 (matrix->trans gp-0 (new 'stack-no-clear 'vector)))
|
||||
)
|
||||
(set! (-> gp-0 uvec quad) (-> s5-0 twist-max quad))
|
||||
(vector-copy! (-> gp-0 uvec) (-> s5-0 twist-max))
|
||||
(vector-cross! (-> gp-0 fvec) (-> gp-0 rvec) (-> gp-0 uvec))
|
||||
(vector-cross! (-> gp-0 rvec) (-> gp-0 uvec) (-> gp-0 fvec))
|
||||
(set! (-> gp-0 rvec w) 0.0)
|
||||
@@ -680,13 +658,13 @@
|
||||
(defmethod trs-set! ((this joint-mod) (trans vector) (quat quaternion) (scale vector))
|
||||
"Set translation, quaternion, scale. A value of #f will skip the set."
|
||||
(if trans
|
||||
(set! (-> this trans quad) (-> trans quad))
|
||||
(vector-copy! (-> this trans) trans)
|
||||
)
|
||||
(if quat
|
||||
(quaternion-copy! (-> this quat) quat)
|
||||
)
|
||||
(if scale
|
||||
(set! (-> this scale quad) (-> scale quad))
|
||||
(vector-copy! (-> this scale) scale)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -699,7 +677,7 @@
|
||||
)
|
||||
(let ((f0-0 (vector-vector-distance (-> this process root trans) pos)))
|
||||
(set! (-> this shutting-down?) #f)
|
||||
(set! (-> this target quad) (-> pos quad))
|
||||
(vector-copy! (-> this target) pos)
|
||||
(if (< f0-0 (-> this max-dist))
|
||||
(set! (-> this blend) 1.0)
|
||||
(set! (-> this blend) 0.0)
|
||||
@@ -755,7 +733,7 @@
|
||||
(if (= (-> this mode) (joint-mod-mode reset))
|
||||
(mode-set! this (joint-mod-mode look-at))
|
||||
)
|
||||
(set! (-> this target quad) (-> target quad))
|
||||
(vector-copy! (-> this target) target)
|
||||
(set! (-> this blend) 1.0)
|
||||
(set! (-> this shutting-down?) #f)
|
||||
)
|
||||
@@ -1130,13 +1108,13 @@
|
||||
"Callback for set joint mod."
|
||||
(let ((s4-0 (the-as joint-mod (-> arg0 param1))))
|
||||
(if (not (logtest? (-> s4-0 track-mode) (track-mode no-trans)))
|
||||
(set! (-> arg1 trans quad) (-> s4-0 trans quad))
|
||||
(vector-copy! (-> arg1 trans) (-> s4-0 trans))
|
||||
)
|
||||
(if (not (logtest? (-> s4-0 track-mode) (track-mode no-rotate)))
|
||||
(quaternion-copy! (-> arg1 quat) (-> s4-0 quat))
|
||||
)
|
||||
(if (not (logtest? (-> s4-0 track-mode) (track-mode no-scale)))
|
||||
(set! (-> arg1 scale quad) (-> s4-0 scale quad))
|
||||
(vector-copy! (-> arg1 scale) (-> s4-0 scale))
|
||||
)
|
||||
)
|
||||
(cspace<-parented-transformq-joint! arg0 arg1)
|
||||
@@ -1156,10 +1134,10 @@
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> s5-0 track-mode) (track-mode no-scale))
|
||||
(set! (-> s3-0 quad) (-> arg1 scale quad))
|
||||
(vector-copy! s3-0 (-> arg1 scale))
|
||||
)
|
||||
((>= (-> s5-0 flex-blend) 1.0)
|
||||
(set! (-> s3-0 quad) (-> s5-0 scale quad))
|
||||
(vector-copy! s3-0 (-> s5-0 scale))
|
||||
)
|
||||
(else
|
||||
(vector-lerp! s3-0 (-> arg1 scale) (-> s5-0 scale) (-> s5-0 flex-blend))
|
||||
@@ -1173,7 +1151,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-15 quad) (-> arg1 scale quad))
|
||||
(vector-copy! v1-15 (-> arg1 scale))
|
||||
(set! (-> v1-15 x) (/ 1.0 (-> v1-15 x)))
|
||||
(set! (-> v1-15 y) (/ 1.0 (-> v1-15 y)))
|
||||
(set! (-> v1-15 z) (/ 1.0 (-> v1-15 z)))
|
||||
@@ -1211,10 +1189,10 @@
|
||||
(set! (-> arg0 bone transform fvec w) 0.0)
|
||||
(cond
|
||||
((logtest? (-> s5-0 track-mode) (track-mode no-trans))
|
||||
(set! (-> arg0 bone transform trans quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> arg0 bone transform trans) s4-0)
|
||||
)
|
||||
((>= (-> s5-0 flex-blend) 1.0)
|
||||
(set! (-> arg0 bone transform trans quad) (-> s5-0 trans quad))
|
||||
(vector-copy! (-> arg0 bone transform trans) (-> s5-0 trans))
|
||||
(set! (-> arg0 bone transform trans w) 1.0)
|
||||
)
|
||||
(else
|
||||
@@ -1336,7 +1314,7 @@
|
||||
|
||||
(defmethod set-target! ((this joint-mod-polar-look-at) (pos vector))
|
||||
"Update the target position."
|
||||
(set! (-> this target quad) (-> pos quad))
|
||||
(vector-copy! (-> this target) pos)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1460,7 +1438,7 @@
|
||||
(if (logtest? (-> s5-0 flags) (joint-mod-polar-flags negate-up))
|
||||
(vector-negate! (-> s4-1 uvec) (-> s4-1 uvec))
|
||||
)
|
||||
(set! (-> s4-1 fvec quad) (-> s3-0 quad))
|
||||
(vector-copy! (-> s4-1 fvec) s3-0)
|
||||
(set-vector! (-> s4-1 trans) 0.0 0.0 0.0 1.0)
|
||||
(matrix-transpose! s4-1 s4-1)
|
||||
(set-vector! (-> s4-1 trans) 0.0 0.0 0.0 1.0)
|
||||
@@ -1556,7 +1534,7 @@
|
||||
(matrix-remove-z-rot (-> arg0 bone transform) a1-25)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 bone transform trans quad) (-> s3-1 quad))
|
||||
(vector-copy! (-> arg0 bone transform trans) s3-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1814,17 +1814,7 @@
|
||||
)
|
||||
(cond
|
||||
((= (the float (the int f0-1)) f0-1)
|
||||
(let* ((mat (matrix-from-joint-anim-frame (-> jacc frames) joint-num (the int frame-num)))
|
||||
(v1-7 (-> mat rvec quad))
|
||||
(a0-3 (-> mat uvec quad))
|
||||
(a1-3 (-> mat fvec quad))
|
||||
(a2-4 (-> mat trans quad))
|
||||
)
|
||||
(set! (-> dest-mat rvec quad) v1-7)
|
||||
(set! (-> dest-mat uvec quad) a0-3)
|
||||
(set! (-> dest-mat fvec quad) a1-3)
|
||||
(set! (-> dest-mat trans quad) a2-4)
|
||||
)
|
||||
(matrix-copy! dest-mat (matrix-from-joint-anim-frame (-> jacc frames) joint-num (the int frame-num)))
|
||||
dest-mat
|
||||
)
|
||||
(else
|
||||
@@ -1939,36 +1929,12 @@
|
||||
|
||||
(defun cspace<-cspace! ((dst cspace) (src cspace))
|
||||
"Set one cspace's bone from another"
|
||||
(let ((v0-0 (-> dst bone transform)))
|
||||
(let* ((a2-0 (-> src bone transform))
|
||||
(v1-2 (-> a2-0 rvec quad))
|
||||
(a0-1 (-> a2-0 uvec quad))
|
||||
(a1-1 (-> a2-0 fvec quad))
|
||||
(a2-1 (-> a2-0 trans quad))
|
||||
)
|
||||
(set! (-> v0-0 rvec quad) v1-2)
|
||||
(set! (-> v0-0 uvec quad) a0-1)
|
||||
(set! (-> v0-0 fvec quad) a1-1)
|
||||
(set! (-> v0-0 trans quad) a2-1)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(matrix-copy! (-> dst bone transform) (-> src bone transform))
|
||||
)
|
||||
|
||||
(defun cspace<-cspace-normalized! ((dst cspace) (src cspace))
|
||||
"Set one cspace's bone from another, and normalize the rows of the matrix."
|
||||
(let ((gp-0 (-> dst bone transform)))
|
||||
(let* ((a2-0 (-> src bone transform))
|
||||
(v1-2 (-> a2-0 rvec quad))
|
||||
(a0-1 (-> a2-0 uvec quad))
|
||||
(a1-1 (-> a2-0 fvec quad))
|
||||
(a2-1 (-> a2-0 trans quad))
|
||||
)
|
||||
(set! (-> gp-0 rvec quad) v1-2)
|
||||
(set! (-> gp-0 uvec quad) a0-1)
|
||||
(set! (-> gp-0 fvec quad) a1-1)
|
||||
(set! (-> gp-0 trans quad) a2-1)
|
||||
)
|
||||
(let ((gp-0 (matrix-copy! (-> dst bone transform) (-> src bone transform))))
|
||||
(vector-normalize! (-> gp-0 rvec) 1.0)
|
||||
(vector-normalize! (-> gp-0 uvec) 1.0)
|
||||
(vector-normalize! (-> gp-0 fvec) 1.0)
|
||||
@@ -1978,20 +1944,7 @@
|
||||
|
||||
(defun cspace<-parent-joint! ((dst cspace) (proc (pointer process-drawable)) (parent-idx int))
|
||||
"Set one cspace's bone to another from the given process-drawable"
|
||||
(let ((v0-0 (-> dst bone transform)))
|
||||
(let* ((a2-1 (-> proc 0 node-list data parent-idx bone transform))
|
||||
(v1-5 (-> a2-1 rvec quad))
|
||||
(a0-2 (-> a2-1 uvec quad))
|
||||
(a1-1 (-> a2-1 fvec quad))
|
||||
(a2-2 (-> a2-1 trans quad))
|
||||
)
|
||||
(set! (-> v0-0 rvec quad) v1-5)
|
||||
(set! (-> v0-0 uvec quad) a0-2)
|
||||
(set! (-> v0-0 fvec quad) a1-1)
|
||||
(set! (-> v0-0 trans quad) a2-2)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(matrix-copy! (-> dst bone transform) (-> proc 0 node-list data parent-idx bone transform))
|
||||
)
|
||||
|
||||
(defun cspace<-rot-yxy! ((dst cspace) (src transform))
|
||||
@@ -2045,39 +1998,14 @@
|
||||
|
||||
(defun cspace<-matrix-no-push-joint! ((dst cspace) (jc joint-control))
|
||||
"Compute animated matrix, using the special 'no-push mode."
|
||||
(let ((v1-2 (matrix-from-control! (scratchpad-object matrix-stack :offset 64) (-> dst joint) jc 'no-push))
|
||||
(v0-1 (-> dst bone transform))
|
||||
)
|
||||
(let ((a0-4 (-> v1-2 rvec quad))
|
||||
(a1-2 (-> v1-2 uvec quad))
|
||||
(a2-1 (-> v1-2 fvec quad))
|
||||
(v1-3 (-> v1-2 trans quad))
|
||||
)
|
||||
(set! (-> v0-1 rvec quad) a0-4)
|
||||
(set! (-> v0-1 uvec quad) a1-2)
|
||||
(set! (-> v0-1 fvec quad) a2-1)
|
||||
(set! (-> v0-1 trans quad) v1-3)
|
||||
)
|
||||
v0-1
|
||||
(let ((v1-2 (matrix-from-control! (scratchpad-object matrix-stack :offset 64) (-> dst joint) jc 'no-push)))
|
||||
(matrix-copy! (-> dst bone transform) v1-2)
|
||||
)
|
||||
)
|
||||
|
||||
(defun cspace<-matrix-joint! ((dst cspace) (src matrix))
|
||||
"Set the cspace from a matrix."
|
||||
(let ((v0-0 (-> dst bone transform)))
|
||||
(let* ((a2-0 src)
|
||||
(v1-1 (-> a2-0 rvec quad))
|
||||
(a0-1 (-> a2-0 uvec quad))
|
||||
(a1-1 (-> a2-0 fvec quad))
|
||||
(a2-1 (-> a2-0 trans quad))
|
||||
)
|
||||
(set! (-> v0-0 rvec quad) v1-1)
|
||||
(set! (-> v0-0 uvec quad) a0-1)
|
||||
(set! (-> v0-0 fvec quad) a1-1)
|
||||
(set! (-> v0-0 trans quad) a2-1)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
(matrix-copy! (-> dst bone transform) src)
|
||||
)
|
||||
|
||||
(defun cspace<-parented-matrix-joint! ((dst cspace) (joint-mat matrix))
|
||||
|
||||
@@ -49,11 +49,7 @@
|
||||
0.0
|
||||
(let ((s4-0 (new-stack-vector0)))
|
||||
0.0
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s3-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 trans quad) (the-as uint128 0))
|
||||
(let ((s3-0 (new-stack-matrix0)))
|
||||
(vector-! (-> s2-0 0) (the-as vector (-> sv-144 inv-mat)) (the-as vector (-> gp-0 inv-mat)))
|
||||
(vector-! (-> s2-0 1) (-> sv-144 inv-mat uvec) (-> gp-0 inv-mat uvec))
|
||||
(vector-! (-> s2-0 2) (-> sv-144 inv-mat fvec) (-> gp-0 inv-mat fvec))
|
||||
@@ -121,7 +117,7 @@
|
||||
(logxor! (-> *camera* master-options) (cam-master-options-u32 FLIP_COMBINER))
|
||||
)
|
||||
)
|
||||
(set! (-> self flip-control-axis quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> self flip-control-axis) s4-0)
|
||||
(when (logtest? (-> *camera* master-options) (cam-master-options-u32 FLIP_COMBINER))
|
||||
(set! f30-0 (- 65536.0 f30-0))
|
||||
(vector-negate! s4-0 s4-0)
|
||||
@@ -252,8 +248,8 @@
|
||||
(set! (-> self tracking no-follow) (-> (the-as camera-slave gp-3) tracking no-follow))
|
||||
(copy-to (-> self tracking tilt-adjust) (the-as cam-float-seeker (+ (the-as uint gp-3) 320)))
|
||||
(copy-to (-> self tracking underwater-blend) (the-as cam-float-seeker (+ (the-as uint gp-3) 368)))
|
||||
(set! (-> self tracking follow-off quad) (-> (the-as camera-slave gp-3) tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> (the-as camera-slave gp-3) tracking follow-pt quad))
|
||||
(vector-copy! (-> self tracking follow-off) (-> (the-as camera-slave gp-3) tracking follow-off))
|
||||
(vector-copy! (-> self tracking follow-pt) (-> (the-as camera-slave gp-3) tracking follow-pt))
|
||||
(let* ((a2-23 (-> self tracking))
|
||||
(a3-7 (-> (the-as camera-slave gp-3) tracking))
|
||||
(v1-37 (-> a3-7 inv-mat rvec quad))
|
||||
@@ -267,7 +263,7 @@
|
||||
(set! (-> a2-23 inv-mat trans quad) a3-8)
|
||||
)
|
||||
(copy-to (-> self tracking point-of-interest-blend) (the-as cam-float-seeker (+ (the-as uint gp-3) 344)))
|
||||
(set! (-> self tracking looking-at quad) (-> (the-as camera-slave gp-3) tracking looking-at quad))
|
||||
(vector-copy! (-> self tracking looking-at) (-> (the-as camera-slave gp-3) tracking looking-at))
|
||||
(set! v0-0 (-> self tracking looking-interesting))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as camera-slave gp-3) tracking looking-interesting quad))
|
||||
)
|
||||
@@ -291,7 +287,7 @@
|
||||
(f30-0 (parameter-ease-sin-clamp (-> self interp-val)))
|
||||
(gp-0 (new-stack-vector0))
|
||||
)
|
||||
(set! (-> gp-0 quad) (-> self trans quad))
|
||||
(vector-copy! gp-0 (-> self trans))
|
||||
(when s5-0
|
||||
(cond
|
||||
((< (-> self interp-val) 1.0)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
;; WARN: Return type mismatch object vs symbol.
|
||||
(defbehavior camera-teleport-to-entity process ((arg0 entity-actor))
|
||||
(let ((gp-0 (new 'stack 'transformq)))
|
||||
(set! (-> gp-0 trans quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> gp-0 trans) (-> arg0 extra trans))
|
||||
(quaternion-copy! (-> gp-0 quat) (-> arg0 quat))
|
||||
(vector-identity! (-> gp-0 scale))
|
||||
(the-as symbol (send-event *camera* 'teleport-to-transformq gp-0))
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
(set! sv-164 (the-as float 0.0))
|
||||
(set! sv-168 0)
|
||||
(set! sv-176 (new-stack-vector0))
|
||||
(set! (-> sv-160 quad) (-> sv-240 quad))
|
||||
(vector-copy! sv-160 sv-240)
|
||||
(set! sv-288 0)
|
||||
(while (< sv-288 (the-as int (-> sv-16 elt-count)))
|
||||
(when (and (!= sv-288 s1-0) (!= sv-288 sv-272))
|
||||
@@ -277,7 +277,7 @@
|
||||
)
|
||||
((zero? sv-168)
|
||||
(vector+float*! sv-160 sv-160 sv-208 f0-8)
|
||||
(set! (-> sv-176 quad) (-> s3-0 sv-288 quad))
|
||||
(vector-copy! sv-176 (-> s3-0 sv-288))
|
||||
(set! sv-164 (the-as float 8192000.0))
|
||||
(set! sv-168 1)
|
||||
)
|
||||
@@ -291,7 +291,7 @@
|
||||
)
|
||||
(else
|
||||
(vector+float*! sv-160 sv-160 sv-208 f0-8)
|
||||
(set! (-> sv-176 quad) (-> s3-0 sv-288 quad))
|
||||
(vector-copy! sv-176 (-> s3-0 sv-288))
|
||||
(set! sv-168 (+ sv-168 1))
|
||||
(if (< (fabs f0-8) (fabs sv-164))
|
||||
(set! sv-164 (- sv-164 f0-8))
|
||||
@@ -322,8 +322,8 @@
|
||||
(format 0 "ERROR <GMJ>: camera editing out of volume points~%")
|
||||
)
|
||||
(else
|
||||
(set! (-> *volume-point* data *volume-point-current* quad) (-> sv-160 quad))
|
||||
(set! (-> *volume-point* data (+ *volume-point-current* 1) quad) (-> sv-240 quad))
|
||||
(vector-copy! (-> *volume-point* data *volume-point-current*) sv-160)
|
||||
(vector-copy! (-> *volume-point* data (+ *volume-point-current* 1)) sv-240)
|
||||
(set! *volume-point-current* (+ *volume-point-current* 2))
|
||||
(+! (-> s2-0 point-count) 2)
|
||||
)
|
||||
@@ -347,8 +347,8 @@
|
||||
(format 0 "ERROR <GMJ>: camera editing out of volume normals~%")
|
||||
)
|
||||
(else
|
||||
(set! (-> *volume-normal* data *volume-normal-current* quad) (-> s0-0 quad))
|
||||
(set! (-> *volume-normal* data (+ *volume-normal-current* 1) quad) (-> s3-0 s1-0 quad))
|
||||
(vector-copy! (-> *volume-normal* data *volume-normal-current*) s0-0)
|
||||
(vector-copy! (-> *volume-normal* data (+ *volume-normal-current* 1)) (-> s3-0 s1-0))
|
||||
(set! *volume-normal-current* (+ *volume-normal-current* 2))
|
||||
(set! (-> s2-0 normal-count) (+ (-> s2-0 normal-count) 2))
|
||||
)
|
||||
@@ -461,7 +461,7 @@
|
||||
(arg0 s3-0 (-> arg1 from) (-> arg1 to) 0.0 (-> arg1 axis) 65536.0)
|
||||
(vector+! s3-0 s3-0 (-> arg1 origin))
|
||||
(dotimes (s2-0 10)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
(vector-copy! s5-0 s3-0)
|
||||
(arg0 s3-0 (-> arg1 from) (-> arg1 to) (* 0.1 (+ 1.0 (the float s2-0))) (-> arg1 axis) 65536.0)
|
||||
(vector+! s3-0 s3-0 (-> arg1 origin))
|
||||
(camera-line s3-0 s5-0 (-> arg1 color))
|
||||
@@ -482,7 +482,7 @@
|
||||
(arg0 s3-0 (-> arg1 from) (-> arg1 to) (-> arg1 axis) 0.0)
|
||||
(vector+! s3-0 s3-0 (-> arg1 origin))
|
||||
(dotimes (s2-0 10)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
(vector-copy! s5-0 s3-0)
|
||||
(arg0 s3-0 (-> arg1 from) (-> arg1 to) (-> arg1 axis) (* 182.04445 (* 18.0 (+ 1.0 (the float s2-0)))))
|
||||
(vector+! s3-0 s3-0 (-> arg1 origin))
|
||||
(camera-line s3-0 s5-0 (-> arg1 color))
|
||||
@@ -501,18 +501,14 @@
|
||||
(if (not arg0)
|
||||
(return #f)
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s5-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 trans quad) (the-as uint128 0))
|
||||
(let ((s4-0 (new-stack-vector0)))
|
||||
(when (and (cam-slave-get-vector-with-offset arg0 s4-0 'trans)
|
||||
(or (!= *camera-layout-blink* 'camera) (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
|
||||
)
|
||||
(cam-slave-get-rot arg0 s5-0)
|
||||
(camera-fov-frame s5-0 s4-0 (* 0.5 (cam-slave-get-fov arg0)) 0.75 1.0 (new 'static 'vector4w :z #xff :w #x80))
|
||||
(let ((s5-0 (new-stack-matrix0))
|
||||
(s4-0 (new-stack-vector0))
|
||||
)
|
||||
(when (and (cam-slave-get-vector-with-offset arg0 s4-0 'trans)
|
||||
(or (!= *camera-layout-blink* 'camera) (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
|
||||
)
|
||||
(cam-slave-get-rot arg0 s5-0)
|
||||
(camera-fov-frame s5-0 s4-0 (* 0.5 (cam-slave-get-fov arg0)) 0.75 1.0 (new 'static 'vector4w :z #xff :w #x80))
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (new-stack-vector0)))
|
||||
@@ -570,28 +566,27 @@
|
||||
(vector-! s4-1 s4-1 s5-4)
|
||||
)
|
||||
(else
|
||||
(set! (-> s4-1 quad)
|
||||
(-> (the-as
|
||||
vector
|
||||
((method-of-type res-lump get-property-struct)
|
||||
arg0
|
||||
'spline-offset
|
||||
'interp
|
||||
-1000000000.0
|
||||
s4-1
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
quad
|
||||
)
|
||||
)
|
||||
(vector-copy!
|
||||
s4-1
|
||||
(the-as
|
||||
vector
|
||||
((method-of-type res-lump get-property-struct)
|
||||
arg0
|
||||
'spline-offset
|
||||
'interp
|
||||
-1000000000.0
|
||||
s4-1
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(curve-get-pos! s5-4 0.0 s3-1)
|
||||
(vector+! s5-4 s5-4 s4-1)
|
||||
(dotimes (s1-1 8)
|
||||
(set! (-> s2-0 quad) (-> s5-4 quad))
|
||||
(vector-copy! s2-0 s5-4)
|
||||
(curve-get-pos! s5-4 (* 0.125 (the float (+ s1-1 1))) s3-1)
|
||||
(vector+! s5-4 s5-4 s4-1)
|
||||
(camera-line s2-0 s5-4 (new 'static 'vector4w :x #xff :y #xff :w #x80))
|
||||
@@ -634,7 +629,7 @@
|
||||
(curve-get-pos! s5-5 0.0 s3-2)
|
||||
(vector+! s5-5 s5-5 s4-2)
|
||||
(dotimes (s1-3 8)
|
||||
(set! (-> s2-1 quad) (-> s5-5 quad))
|
||||
(vector-copy! s2-1 s5-5)
|
||||
(curve-get-pos! s5-5 (* 0.125 (the float (+ s1-3 1))) s3-2)
|
||||
(vector+! s5-5 s5-5 s4-2)
|
||||
(camera-line s2-1 s5-5 (new 'static 'vector4w :z #xff :w #x80))
|
||||
@@ -818,11 +813,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s5-1 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-1 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-1 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-1 trans quad) (the-as uint128 0))
|
||||
(let ((s5-1 (new-stack-matrix0)))
|
||||
(let ((a2-8 (new-stack-vector0)))
|
||||
(set! (-> a2-8 y) -1.0)
|
||||
(forward-down-nopitch->inv-matrix s5-1 (-> *math-camera* inv-camera-rot fvec) a2-8)
|
||||
@@ -1062,7 +1053,7 @@
|
||||
(defbehavior clmf-look-through cam-layout ()
|
||||
(set! (-> *camera-other-fov* data) (cam-slave-get-fov (-> self cam-entity)))
|
||||
(cam-slave-get-vector-with-offset (the-as entity-actor (-> self cam-entity)) *camera-other-trans* 'trans)
|
||||
(set! (-> *camera-other-root* quad) (-> *camera-other-trans* quad))
|
||||
(vector-copy! *camera-other-root* *camera-other-trans*)
|
||||
(cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) *camera-other-matrix*)
|
||||
(set! *camera-look-through-other* 10)
|
||||
(set-setting! 'master-options 'set 0.0 32)
|
||||
@@ -1126,7 +1117,7 @@
|
||||
(if arg0
|
||||
(format #t "setup trans ~M ~M ~M (maya)~%" (-> s1-0 x) (-> s1-0 y) (-> s1-0 z))
|
||||
)
|
||||
(set! (-> s3-1 quad) (-> s1-0 quad))
|
||||
(vector-copy! s3-1 s1-0)
|
||||
(when (the-as vector s5-1)
|
||||
(if arg0
|
||||
(format
|
||||
@@ -1193,7 +1184,7 @@
|
||||
(when s2-0
|
||||
(if s5-1
|
||||
(vector+! s4-1 s2-0 s5-1)
|
||||
(set! (-> s4-1 quad) (-> s2-0 quad))
|
||||
(vector-copy! s4-1 s2-0)
|
||||
)
|
||||
(if arg0
|
||||
(format #t "setup pivot ~M ~M ~M~%" (-> s2-0 x) (-> s2-0 y) (-> s2-0 z))
|
||||
@@ -1239,7 +1230,7 @@
|
||||
(when s2-0
|
||||
(if s5-1
|
||||
(vector+! s4-1 s2-0 s5-1)
|
||||
(set! (-> s4-1 quad) (-> s2-0 quad))
|
||||
(vector-copy! s4-1 s2-0)
|
||||
)
|
||||
(if arg0
|
||||
(format #t "setup align ~M ~M ~M~%" (-> s2-0 x) (-> s2-0 y) (-> s2-0 z))
|
||||
@@ -1285,7 +1276,7 @@
|
||||
(when s2-0
|
||||
(if s5-1
|
||||
(vector+! s4-1 s2-0 s5-1)
|
||||
(set! (-> s4-1 quad) (-> s2-0 quad))
|
||||
(vector-copy! s4-1 s2-0)
|
||||
)
|
||||
(if arg0
|
||||
(format #t "setup interesting ~M ~M ~M~%" (-> s2-0 x) (-> s2-0 y) (-> s2-0 z))
|
||||
|
||||
@@ -35,20 +35,20 @@
|
||||
(set! (-> self tpos-old y) (lerp (-> self tpos-old y) (-> v1-5 y) (* 3.0 (seconds-per-frame))))
|
||||
(set! (-> self tpos-old y) (lerp (-> self tpos-old y) (-> v1-5 y) (* 8.0 (seconds-per-frame))))
|
||||
)
|
||||
(set! (-> self tpos-curr quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(vector-copy! (-> self tpos-curr) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-old-adj) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-curr-adj) (-> self tpos-old))
|
||||
(let ((v0-0 (the-as object (-> self tpos-tgt))))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> self tpos-old quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tpos-old quad) (-> v1-5 quad))
|
||||
(set! (-> self tpos-curr quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-tgt quad) (-> self tpos-old quad))
|
||||
(vector-copy! (-> self tpos-old) v1-5)
|
||||
(vector-copy! (-> self tpos-curr) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-old-adj) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-curr-adj) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-tgt) (-> self tpos-old))
|
||||
(set! (-> self upspeed) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -61,11 +61,11 @@
|
||||
(defbehavior reset-target-tracking camera-master ()
|
||||
(let ((gp-0 (handle->process (-> self focus handle))))
|
||||
(when gp-0
|
||||
(set! (-> self tpos-old quad) (-> (get-trans (the-as process-focusable gp-0) 4) quad))
|
||||
(set! (-> self tpos-curr quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-tgt quad) (-> self tpos-old quad))
|
||||
(vector-copy! (-> self tpos-old) (get-trans (the-as process-focusable gp-0) 4))
|
||||
(vector-copy! (-> self tpos-curr) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-old-adj) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-curr-adj) (-> self tpos-old))
|
||||
(vector-copy! (-> self tpos-tgt) (-> self tpos-old))
|
||||
(quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as process-focusable gp-0) 2))
|
||||
(quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as process-focusable gp-0) 1))
|
||||
(vector-reset! (-> self pitch-off))
|
||||
@@ -114,7 +114,7 @@
|
||||
(let ((gp-0 (handle->process (-> self focus handle))))
|
||||
(cond
|
||||
((and *target* (not gp-0))
|
||||
(try-update-focus (-> self focus) *target*)
|
||||
(focus-on! (-> self focus) *target*)
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(reset-target-tracking)
|
||||
)
|
||||
@@ -153,8 +153,8 @@
|
||||
(+! (-> self under-water) -1)
|
||||
)
|
||||
)
|
||||
(set! (-> self tpos-old quad) (-> self tpos-curr quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-curr-adj quad))
|
||||
(vector-copy! (-> self tpos-old) (-> self tpos-curr))
|
||||
(vector-copy! (-> self tpos-old-adj) (-> self tpos-curr-adj))
|
||||
(quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as process-focusable gp-0) 2))
|
||||
(quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as process-focusable gp-0) 1))
|
||||
(cond
|
||||
@@ -182,7 +182,7 @@
|
||||
(+! (-> self ease-t) (-> self ease-step))
|
||||
)
|
||||
(else
|
||||
(set! (-> self tpos-curr quad) (-> (get-trans (the-as process-focusable gp-0) 4) quad))
|
||||
(vector-copy! (-> self tpos-curr) (get-trans (the-as process-focusable gp-0) 4))
|
||||
)
|
||||
)
|
||||
(when (focus-test? (the-as process-focusable gp-0) edge-grab)
|
||||
@@ -277,7 +277,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self tpos-tgt quad) (-> self tpos-curr quad))
|
||||
(vector-copy! (-> self tpos-tgt) (-> self tpos-curr))
|
||||
(vector-! s5-7 (-> self tpos-curr-adj) (-> self tpos-curr))
|
||||
(let* ((f0-38 (vector-dot s5-7 (-> self local-down)))
|
||||
(f0-39 (cond
|
||||
@@ -642,7 +642,7 @@
|
||||
(deactivate (-> self slave 0))
|
||||
(set! (-> self slave) (the-as (pointer camera-slave) #f))
|
||||
)
|
||||
(set! (-> *camera-combiner* trans quad) (-> (the-as matrix gp-1) rvec quad))
|
||||
(vector-copy! (-> *camera-combiner* trans) (-> (the-as matrix gp-1) rvec))
|
||||
(quaternion->matrix (-> *camera-combiner* inv-camera-rot) (the-as quaternion (+ (the-as uint gp-1) 16)))
|
||||
)
|
||||
(send-event self 'teleport)
|
||||
@@ -656,7 +656,7 @@
|
||||
(deactivate (-> self slave 0))
|
||||
(set! (-> self slave) (the-as (pointer camera-slave) #f))
|
||||
)
|
||||
(set! (-> *camera-combiner* trans quad) (-> *camera-other-trans* quad))
|
||||
(vector-copy! (-> *camera-combiner* trans) *camera-other-trans*)
|
||||
(vector-! gp-2 (-> self tpos-curr-adj) *camera-other-trans*)
|
||||
(vector-normalize! gp-2 1.0)
|
||||
(forward-down->inv-matrix (-> *camera-combiner* inv-camera-rot) gp-2 (new 'static 'vector :y -1.0))
|
||||
@@ -673,7 +673,7 @@
|
||||
(deactivate (-> self slave 0))
|
||||
(set! (-> self slave) (the-as (pointer camera-slave) #f))
|
||||
)
|
||||
(set! (-> *camera-combiner* trans quad) (-> (the-as vector s5-0) quad))
|
||||
(vector-copy! (-> *camera-combiner* trans) (the-as vector s5-0))
|
||||
(vector-! gp-3 (-> self tpos-curr-adj) (the-as vector s5-0))
|
||||
(vector-normalize! gp-3 1.0)
|
||||
(forward-down->inv-matrix (-> *camera-combiner* inv-camera-rot) gp-3 (new 'static 'vector :y -1.0))
|
||||
@@ -690,7 +690,7 @@
|
||||
(logclear! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
)
|
||||
(else
|
||||
(try-update-focus (-> self focus) (the-as process-focusable a1-15))
|
||||
(focus-on! (-> self focus) (the-as process-focusable a1-15))
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(reset-target-tracking)
|
||||
)
|
||||
@@ -834,7 +834,7 @@
|
||||
(if (< (the-as float (-> block param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> block param 0)))
|
||||
)
|
||||
(set! (-> self ease-to quad) (-> (the-as vector (-> block param 1)) quad))
|
||||
(vector-copy! (-> self ease-to) (the-as vector (-> block param 1)))
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_EASE_TO_POS))
|
||||
)
|
||||
)
|
||||
@@ -1074,7 +1074,7 @@
|
||||
|
||||
(defmethod camera-master-method-15 ((this camera-master) (arg0 vector))
|
||||
(if (and (-> this slave) (-> this slave 0 next-state) (= (-> this slave 0 next-state name) 'cam-string))
|
||||
(set! (-> arg0 quad) (-> this slave 0 view-flat quad))
|
||||
(vector-copy! arg0 (-> this slave 0 view-flat))
|
||||
(vector-reset! arg0)
|
||||
)
|
||||
arg0
|
||||
|
||||
@@ -61,11 +61,7 @@
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (new-stack-vector0)))
|
||||
(let ((s3-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s3-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 trans quad) (the-as uint128 0))
|
||||
(let ((s3-0 (new-stack-matrix0)))
|
||||
(matrix-axis-angle! s3-0 (the-as vector (-> self tracking)) (- (-> s5-0 x)))
|
||||
(vector-matrix*! s4-0 (-> self tracking inv-mat fvec) s3-0)
|
||||
(matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y)))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
)
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self saved-pt quad) (-> self trans quad))
|
||||
(vector-copy! (-> self saved-pt) (-> self trans))
|
||||
(set! (-> self blend-from-type) (camera-blend-from-type unknown-1))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-0))
|
||||
0
|
||||
@@ -71,7 +71,7 @@
|
||||
)
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self saved-pt quad) (-> self trans quad))
|
||||
(vector-copy! (-> self saved-pt) (-> self trans))
|
||||
(set! (-> self blend-from-type) (camera-blend-from-type unknown-1))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-0))
|
||||
0
|
||||
@@ -82,7 +82,7 @@
|
||||
(when (not (paused?))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> self fov) (-> *camera* slave 0 fov))
|
||||
(set! (-> self trans quad) (-> self saved-pt quad))
|
||||
(vector-copy! (-> self trans) (-> self saved-pt))
|
||||
(cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f)
|
||||
(when (!= (-> gp-0 w) 0.0)
|
||||
(vector-normalize! gp-0 1.0)
|
||||
@@ -274,9 +274,9 @@
|
||||
(set! s4-0
|
||||
(cond
|
||||
((and (< (vector-vector-distance s2-0 gp-0) 40960.0) (< (cos 3640.889) (vector-dot s5-0 s3-0)))
|
||||
(set! (-> self trans quad) (-> s2-0 quad))
|
||||
(vector-copy! (-> self trans) s2-0)
|
||||
(vector-negate! (the-as vector (-> self tracking)) (-> s0-0 rvec))
|
||||
(set! (-> self tracking inv-mat uvec quad) (-> s0-0 uvec quad))
|
||||
(vector-copy! (-> self tracking inv-mat uvec) (-> s0-0 uvec))
|
||||
(vector-negate! (-> self tracking inv-mat fvec) (-> s0-0 fvec))
|
||||
(set! (-> self fov) (* 2.0 (atan (/ 12.700255 (* 20.3 (-> s1-0 x))) 1.0)))
|
||||
(vector-float*! (the-as vector (-> self tracking)) (the-as vector (-> self tracking)) (/ 1.0 (-> s1-0 x)))
|
||||
@@ -291,9 +291,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 quad) (-> s2-0 quad))
|
||||
(vector-copy! gp-0 s2-0)
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> s3-0 quad))
|
||||
(vector-copy! s5-0 s3-0)
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -330,25 +330,14 @@
|
||||
)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((a2-0 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((v1-8 a2-0)
|
||||
(t0-0 (-> (the-as process-drawable (-> *camera* settings pov-handle process 0))
|
||||
node-list
|
||||
data
|
||||
(-> *camera* settings pov-bone)
|
||||
bone
|
||||
transform
|
||||
)
|
||||
)
|
||||
(a0-9 (-> t0-0 rvec quad))
|
||||
(a1-11 (-> t0-0 uvec quad))
|
||||
(a3-0 (-> t0-0 fvec quad))
|
||||
(t0-1 (-> t0-0 trans quad))
|
||||
)
|
||||
(set! (-> v1-8 rvec quad) a0-9)
|
||||
(set! (-> v1-8 uvec quad) a1-11)
|
||||
(set! (-> v1-8 fvec quad) a3-0)
|
||||
(set! (-> v1-8 trans quad) t0-1)
|
||||
)
|
||||
(matrix-copy! a2-0 (-> (the-as process-drawable (-> *camera* settings pov-handle process 0))
|
||||
node-list
|
||||
data
|
||||
(-> *camera* settings pov-bone)
|
||||
bone
|
||||
transform
|
||||
)
|
||||
)
|
||||
(vector-reset! (-> a2-0 trans))
|
||||
(vector-matrix*! gp-0 (-> *camera* settings pov-offset) a2-0)
|
||||
)
|
||||
@@ -520,12 +509,8 @@
|
||||
(until #f
|
||||
(when (not (paused?))
|
||||
(let ((s4-0 (vector-reset! (new-stack-vector0)))
|
||||
(s5-0 (new 'stack-no-clear 'matrix))
|
||||
(s5-0 (new-stack-matrix0))
|
||||
)
|
||||
(set! (-> s5-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 trans quad) (the-as uint128 0))
|
||||
(when (not (logtest? (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(let ((f30-0 (analog-input
|
||||
(the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
|
||||
@@ -716,7 +701,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> *camera* tpos-curr quad))
|
||||
(vector-copy! s4-0 (-> *camera* tpos-curr))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -779,7 +764,7 @@
|
||||
(vector+! (-> self spline-offset) (-> self spline-offset) (the-as vector a0-8))
|
||||
)
|
||||
)
|
||||
(set! (-> self trans quad) (-> self saved-pt quad))
|
||||
(vector-copy! (-> self trans) (-> self saved-pt))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(set! (-> self spline-follow-dist) (cam-slave-get-float (-> self cam-entity) 'spline-follow-dist 0.0))
|
||||
(cond
|
||||
@@ -837,7 +822,7 @@
|
||||
(when (not (paused?))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
|
||||
(new 'stack 'curve)
|
||||
(set! (-> self trans quad) (-> self saved-pt quad))
|
||||
(vector-copy! (-> self trans) (-> self saved-pt))
|
||||
(cam-curve-pos (-> self trans) (the-as vector #f) (the-as curve #f) #t)
|
||||
)
|
||||
(suspend)
|
||||
@@ -859,7 +844,7 @@
|
||||
)
|
||||
:enter (behavior ()
|
||||
(when (not (-> self enter-has-run))
|
||||
(set! (-> self saved-pt quad) (-> self trans quad))
|
||||
(vector-copy! (-> self saved-pt) (-> self trans))
|
||||
(set! (-> self blend-from-type) (camera-blend-from-type unknown-1))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-1))
|
||||
)
|
||||
@@ -923,9 +908,9 @@
|
||||
(let ((a1-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-0 quad) (-> self trans quad))
|
||||
(vector-copy! a1-0 (-> self trans))
|
||||
(set! (-> a1-0 y) 0.0)
|
||||
(set! (-> s5-0 quad) (-> self velocity quad))
|
||||
(vector-copy! s5-0 (-> self velocity))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(init gp-0 a1-0 81.92 (fmax 819.2 (vector-length s5-0)) 0.75)
|
||||
(set! (-> gp-0 vel quad) (-> s5-0 quad))
|
||||
@@ -967,12 +952,8 @@
|
||||
(f1-2
|
||||
(analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 32.0 110.0 (* 8192.0 (seconds-per-frame)))
|
||||
)
|
||||
(s2-0 (new 'stack-no-clear 'matrix))
|
||||
(s2-0 (new-stack-matrix0))
|
||||
)
|
||||
(set! (-> s2-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s2-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s2-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s2-0 trans quad) (the-as uint128 0))
|
||||
(let ((v1-15 (new 'stack-no-clear 'vector)))
|
||||
0.0
|
||||
(if (-> *camera* settings flip-horizontal)
|
||||
@@ -1050,7 +1031,7 @@
|
||||
(vector-matrix*! arg0 arg1 s4-0)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 quad) (-> arg1 quad))
|
||||
(vector-copy! arg0 arg1)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 SHRINK_MAX_ANGLE))
|
||||
(set! (-> self max-angle-curr) f28-0)
|
||||
)
|
||||
@@ -1129,7 +1110,7 @@
|
||||
)
|
||||
|
||||
(defbehavior cam-circular-code camera-slave ()
|
||||
(set! (-> self pivot-pt quad) (-> self saved-pt quad))
|
||||
(vector-copy! (-> self pivot-pt) (-> self saved-pt))
|
||||
(cam-curve-pos (-> self pivot-pt) (the-as vector #f) (the-as curve #f) #f)
|
||||
(let ((a2-1 (new-stack-vector0))
|
||||
(f0-0 182.04445)
|
||||
@@ -1176,7 +1157,7 @@
|
||||
#f
|
||||
)
|
||||
(('outro-done)
|
||||
(set! (-> self trans quad) (-> *camera-combiner* trans quad))
|
||||
(vector-copy! (-> self trans) (-> *camera-combiner* trans))
|
||||
(cam-circular-position #f)
|
||||
)
|
||||
(else
|
||||
@@ -1192,7 +1173,7 @@
|
||||
(let ((gp-0 (new-stack-vector0)))
|
||||
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
|
||||
(set! (-> self view-off-param) 1.0)
|
||||
(set! (-> self circular-follow quad) (-> *camera* tpos-curr-adj quad))
|
||||
(vector-copy! (-> self circular-follow) (-> *camera* tpos-curr-adj))
|
||||
(set! (-> self max-angle-offset) 0.0)
|
||||
(cond
|
||||
((-> self cam-entity)
|
||||
@@ -1248,7 +1229,7 @@
|
||||
)
|
||||
(else
|
||||
(set! (-> self spline-follow-dist) 0.0)
|
||||
(set! (-> self pivot-pt quad) (-> self saved-pt quad))
|
||||
(vector-copy! (-> self pivot-pt) (-> self saved-pt))
|
||||
(cam-curve-pos (-> self pivot-pt) (the-as vector #f) (the-as curve #f) #f)
|
||||
)
|
||||
)
|
||||
@@ -1257,8 +1238,8 @@
|
||||
(vector-! (-> self pivot-pt) (-> *camera* tpos-curr-adj) (-> self trans))
|
||||
(vector-flatten! (-> self pivot-pt) (-> self pivot-pt) (-> *camera* local-down))
|
||||
(set! (-> self pivot-rad) (vector-length (-> self pivot-pt)))
|
||||
(set! (-> self pivot-pt quad) (-> self trans quad))
|
||||
(set! (-> self saved-pt quad) (-> self pivot-pt quad))
|
||||
(vector-copy! (-> self pivot-pt) (-> self trans))
|
||||
(vector-copy! (-> self saved-pt) (-> self pivot-pt))
|
||||
)
|
||||
(else
|
||||
(vector-! (-> self pivot-pt) (-> *camera* tpos-curr-adj) (-> self trans))
|
||||
@@ -1266,7 +1247,7 @@
|
||||
(vector-flatten! (-> self pivot-pt) (-> self pivot-pt) (-> *camera* local-down))
|
||||
(set! (-> self pivot-rad) (vector-length (-> self pivot-pt)))
|
||||
(vector+! (-> self pivot-pt) (-> self trans) (-> self pivot-pt))
|
||||
(set! (-> self saved-pt quad) (-> self pivot-pt quad))
|
||||
(vector-copy! (-> self saved-pt) (-> self pivot-pt))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1352,18 +1333,18 @@
|
||||
(set! (-> s5-0 z) (+ 1024.0 (-> *CAMERA-bank* default-string-min-z)))
|
||||
)
|
||||
(vector--float*! s5-0 s5-0 (-> *camera* local-down) (-> *CAMERA-bank* default-string-min-y))
|
||||
(set! (-> arg0 quad) (-> s5-0 quad))
|
||||
(vector-copy! arg0 s5-0)
|
||||
(until #f
|
||||
(vector--float*! s4-0 arg0 (-> *camera* local-down) (-> *camera* settings target-height))
|
||||
(set! (-> s3-0 start-pos quad) (-> *camera* tpos-curr-adj quad))
|
||||
(set! (-> s3-0 move-dist quad) (-> arg0 quad))
|
||||
(vector-copy! (-> s3-0 start-pos) (-> *camera* tpos-curr-adj))
|
||||
(vector-copy! (-> s3-0 move-dist) arg0)
|
||||
(if (< (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0)
|
||||
(return #t)
|
||||
)
|
||||
(set! f30-0 (cond
|
||||
((>= -32768.0 f30-0)
|
||||
(format #t "cam-string didn't find a spot~%")
|
||||
(set! (-> arg0 quad) (-> s5-0 quad))
|
||||
(vector-copy! arg0 s5-0)
|
||||
(return #f)
|
||||
f30-0
|
||||
)
|
||||
@@ -1387,7 +1368,7 @@
|
||||
(vector-flatten! (-> self view-flat) arg0 (-> *camera* local-down))
|
||||
(set! (-> self min-z-override) (vector-length (-> self view-flat)))
|
||||
(vector+! (-> self desired-pos) arg0 (-> *camera* tpos-curr-adj))
|
||||
(set! (-> self string-trans quad) (-> self desired-pos quad))
|
||||
(vector-copy! (-> self string-trans) (-> self desired-pos))
|
||||
(tracking-spline-method-10 (-> self position-spline) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
(let ((v0-2 (logclear (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))))
|
||||
@@ -1650,7 +1631,7 @@
|
||||
(f30-0 2.0)
|
||||
)
|
||||
0.0
|
||||
(set! (-> s5-0 start-pos quad) (-> arg0 quad))
|
||||
(vector-copy! (-> s5-0 start-pos) arg0)
|
||||
(vector-! (-> s5-0 move-dist) arg1 arg0)
|
||||
(let ((v1-4 s5-0))
|
||||
(set! (-> v1-4 radius) (-> *CAM_STRING-bank* los-coll-rad2))
|
||||
@@ -1873,8 +1854,8 @@
|
||||
(f26-0 (vector-length arg1))
|
||||
(f30-0 (vector-normalize-ret-len! s4-0 1.0))
|
||||
)
|
||||
(set! (-> s1-0 start-pos quad) (-> arg0 quad))
|
||||
(set! (-> s1-0 move-dist quad) (-> arg1 quad))
|
||||
(vector-copy! (-> s1-0 start-pos) arg0)
|
||||
(vector-copy! (-> s1-0 move-dist) arg1)
|
||||
(let ((v1-5 s1-0))
|
||||
(set! (-> v1-5 radius) (-> *CAM_STRING-bank* los-coll-rad))
|
||||
(set! (-> v1-5 collide-with) (collide-spec backgnd obstacle hit-by-others-list camera-blocker pusher))
|
||||
@@ -2016,18 +1997,19 @@
|
||||
(-> *camera* target-spline point (-> self los-tgt-spline-pt) incarnation)
|
||||
)
|
||||
(logior! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(set! (-> self good-point quad)
|
||||
(-> *camera* target-spline point (-> *camera* target-spline used-point) position quad)
|
||||
)
|
||||
(set! (-> self los-last-pos quad) (-> self good-point quad))
|
||||
(vector-copy!
|
||||
(-> self good-point)
|
||||
(-> *camera* target-spline point (-> *camera* target-spline used-point) position)
|
||||
)
|
||||
(vector-copy! (-> self los-last-pos) (-> self good-point))
|
||||
(when *debug-segment*
|
||||
(let ((a1-22 (new 'stack-no-clear 'vector)))
|
||||
(vector-! a1-22 (-> self good-point) (-> self string-trans))
|
||||
(cam-collision-record-save (-> self string-trans) a1-22 -3 'jump self)
|
||||
)
|
||||
)
|
||||
(set! (-> self desired-pos quad) (-> self good-point quad))
|
||||
(set! (-> self string-trans quad) (-> self good-point quad))
|
||||
(vector-copy! (-> self desired-pos) (-> self good-point))
|
||||
(vector-copy! (-> self string-trans) (-> self good-point))
|
||||
(vector-! (-> self view-flat) (-> self string-trans) (-> *camera* tpos-curr-adj))
|
||||
(vector-flatten! (-> self view-flat) (-> self view-flat) (-> *camera* local-down))
|
||||
(vector-reset! (-> self velocity))
|
||||
@@ -2055,7 +2037,7 @@
|
||||
(set! (-> self los-tgt-spline-pt-incarnation)
|
||||
(-> *camera* target-spline point (-> self los-tgt-spline-pt) incarnation)
|
||||
)
|
||||
(set! (-> self los-last-pos quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self los-last-pos) arg0)
|
||||
)
|
||||
((begin
|
||||
(if *display-cam-los-debug*
|
||||
@@ -2097,16 +2079,16 @@
|
||||
(-> *camera* target-spline point (-> self los-tgt-spline-pt) incarnation)
|
||||
)
|
||||
(logior! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(set! (-> self good-point quad) (-> *camera* target-spline point s2-2 position quad))
|
||||
(set! (-> self los-last-pos quad) (-> self good-point quad))
|
||||
(vector-copy! (-> self good-point) (-> *camera* target-spline point s2-2 position))
|
||||
(vector-copy! (-> self los-last-pos) (-> self good-point))
|
||||
(when *debug-segment*
|
||||
(let ((a1-40 (new 'stack-no-clear 'vector)))
|
||||
(vector-! a1-40 (-> self good-point) (-> self string-trans))
|
||||
(cam-collision-record-save (-> self string-trans) a1-40 -3 'jump self)
|
||||
)
|
||||
)
|
||||
(set! (-> self desired-pos quad) (-> self good-point quad))
|
||||
(set! (-> self string-trans quad) (-> self good-point quad))
|
||||
(vector-copy! (-> self desired-pos) (-> self good-point))
|
||||
(vector-copy! (-> self string-trans) (-> self good-point))
|
||||
(vector-! (-> self view-flat) (-> self string-trans) (-> *camera* tpos-curr-adj))
|
||||
(vector-flatten! (-> self view-flat) (-> self view-flat) (-> *camera* local-down))
|
||||
(vector-reset! (-> self velocity))
|
||||
@@ -2124,7 +2106,7 @@
|
||||
(set! (-> self los-tgt-spline-pt-incarnation)
|
||||
(-> *camera* target-spline point (-> self los-tgt-spline-pt) incarnation)
|
||||
)
|
||||
(set! (-> self los-last-pos quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self los-last-pos) arg0)
|
||||
)
|
||||
(else
|
||||
(if *display-cam-los-debug*
|
||||
@@ -2190,7 +2172,7 @@
|
||||
(-> self good-point)
|
||||
(the-as vector (+ (the-as uint (-> *camera* target-spline)) (* 48 (-> self los-tgt-spline-pt))))
|
||||
)
|
||||
(set! (-> self los-last-pos quad) (-> self good-point quad))
|
||||
(vector-copy! (-> self los-last-pos) (-> self good-point))
|
||||
(when *display-cam-los-debug*
|
||||
(format 0 "going because u(~f) > 0 frame ~D~%" f30-2 (current-time))
|
||||
(format *stdcon* " going because u(~f) > 0 frame ~D~%" f30-2 (current-time))
|
||||
@@ -2787,7 +2769,7 @@
|
||||
(-> *camera* settings target-height)
|
||||
)
|
||||
(vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> self string-trans))
|
||||
(set! (-> s5-0 start-pos quad) (-> self string-trans quad))
|
||||
(vector-copy! (-> s5-0 start-pos) (-> self string-trans))
|
||||
(let ((s4-0 s5-0))
|
||||
(set! (-> s4-0 radius) 409.6)
|
||||
(set! (-> s4-0 collide-with) (collide-spec backgnd obstacle hit-by-others-list camera-blocker pusher))
|
||||
@@ -2883,7 +2865,7 @@
|
||||
(let ((f28-0
|
||||
(cond
|
||||
((logtest? (-> self options) (cam-slave-options-u32 COLLIDE))
|
||||
(set! (-> s5-1 start-pos quad) (-> self string-trans quad))
|
||||
(vector-copy! (-> s5-1 start-pos) (-> self string-trans))
|
||||
(let ((s2-0 s5-1))
|
||||
(set! (-> s2-0 radius) (-> *CAMERA-bank* collide-move-rad))
|
||||
(set! (-> s2-0 collide-with) (collide-spec backgnd obstacle hit-by-others-list camera-blocker pusher))
|
||||
@@ -3003,7 +2985,7 @@
|
||||
)
|
||||
)
|
||||
(logclear! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(set! (-> self desired-pos quad) (-> self good-point quad))
|
||||
(vector-copy! (-> self desired-pos) (-> self good-point))
|
||||
(cam-string-move)
|
||||
(vector-! (-> self view-flat) (-> self string-trans) (-> *camera* tpos-curr-adj))
|
||||
(vector-flatten! (-> self view-flat) (-> self view-flat) (-> *camera* local-down))
|
||||
@@ -3084,8 +3066,8 @@
|
||||
(the-as
|
||||
vector
|
||||
(when (not (or (-> self string-val-locked) (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))))
|
||||
(set! (-> self string-min-val quad) (-> *camera* string-min value quad))
|
||||
(set! (-> self string-max-val quad) (-> *camera* string-max value quad))
|
||||
(vector-copy! (-> self string-min-val) (-> *camera* string-min value))
|
||||
(vector-copy! (-> self string-max-val) (-> *camera* string-max value))
|
||||
(set! (-> self slope-adjust target) 0.0)
|
||||
(when (-> *camera* settings cam-slope)
|
||||
(let ((gp-0 (the-as entity-camera (entity-by-name (-> *camera* settings cam-slope)))))
|
||||
@@ -3186,8 +3168,8 @@
|
||||
(cond
|
||||
((-> block param 0)
|
||||
(set! (-> self string-val-locked) (the-as basic #t))
|
||||
(set! (-> self string-min-val quad) (-> (the-as vector (-> block param 0)) quad))
|
||||
(set! (-> self string-max-val quad) (-> (the-as vector (-> block param 1)) quad))
|
||||
(vector-copy! (-> self string-min-val) (the-as vector (-> block param 0)))
|
||||
(vector-copy! (-> self string-max-val) (the-as vector (-> block param 1)))
|
||||
(set! (-> self string-max-val x) (fmax (-> self string-max-val x) (-> self string-min-val x)))
|
||||
(set! (-> self string-max-val y) (fmax (-> self string-max-val y) (-> self string-min-val y)))
|
||||
(set! (-> self string-max-val z) (fmax (-> self string-max-val z) (-> self string-min-val z)))
|
||||
@@ -3310,7 +3292,7 @@
|
||||
(+ (-> *camera* settings target-height) (-> self view-off y))
|
||||
)
|
||||
(vector+! (-> self desired-pos) (-> self desired-pos) (-> *camera* tpos-curr-adj))
|
||||
(set! (-> self string-trans quad) (-> self desired-pos quad))
|
||||
(vector-copy! (-> self string-trans) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
(let ((gp-2 (new 'stack-no-clear 'collide-query)))
|
||||
(vector--float*!
|
||||
@@ -3365,7 +3347,7 @@
|
||||
(+ (-> *camera* settings target-height) (-> self view-off y))
|
||||
)
|
||||
(vector+! (-> self desired-pos) (-> self desired-pos) (-> *camera* tpos-curr-adj))
|
||||
(set! (-> self string-trans quad) (-> self desired-pos quad))
|
||||
(vector-copy! (-> self string-trans) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
)
|
||||
)
|
||||
@@ -3373,8 +3355,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self trans quad) (-> self string-trans quad))
|
||||
(set! (-> self los-last-pos quad) (-> self string-trans quad))
|
||||
(vector-copy! (-> self trans) (-> self string-trans))
|
||||
(vector-copy! (-> self los-last-pos) (-> self string-trans))
|
||||
(tracking-spline-method-10 (-> self position-spline) (-> self string-trans))
|
||||
(set! (-> self blend-from-type) (camera-blend-from-type unknown-2))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-2))
|
||||
@@ -3447,7 +3429,7 @@
|
||||
(let ((f28-0
|
||||
(cond
|
||||
((logtest? (-> self options) (cam-slave-options-u32 COLLIDE))
|
||||
(set! (-> gp-2 start-pos quad) (-> self trans quad))
|
||||
(vector-copy! (-> gp-2 start-pos) (-> self trans))
|
||||
(let ((s1-0 gp-2))
|
||||
(set! (-> s1-0 radius) (-> *CAMERA-bank* collide-move-rad))
|
||||
(set! (-> s1-0 collide-with) (collide-spec backgnd obstacle hit-by-others-list camera-blocker pusher))
|
||||
@@ -3467,7 +3449,7 @@
|
||||
(cond
|
||||
((>= f28-0 0.0)
|
||||
(vector+float*! (-> self trans) (-> self trans) s5-0 f28-0)
|
||||
(set! (-> s4-0 quad) (-> gp-2 best-other-tri normal quad))
|
||||
(vector-copy! s4-0 (-> gp-2 best-other-tri normal))
|
||||
(vector-flatten! (-> self velocity) (-> self velocity) s4-0)
|
||||
(set! f30-0 (- f30-0 (* f30-0 f28-0)))
|
||||
(set! s2-0 1)
|
||||
@@ -3533,7 +3515,7 @@
|
||||
(vector-normalize! (-> self view-flat) (-> self view-off z))
|
||||
(vector--float*! (-> self desired-pos) (-> self view-flat) (-> *camera* local-down) (-> self view-off y))
|
||||
(vector+! (-> self desired-pos) (-> self desired-pos) (-> self tracking follow-pt))
|
||||
(set! (-> self trans quad) (-> self desired-pos quad))
|
||||
(vector-copy! (-> self trans) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
(set! (-> self blend-from-type) (camera-blend-from-type unknown-2))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-2))
|
||||
@@ -3570,36 +3552,30 @@
|
||||
(let ((f0-16
|
||||
(analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 32.0 110.0 (* 21845.334 (seconds-per-frame)))
|
||||
)
|
||||
(gp-0 (new 'stack-no-clear 'matrix))
|
||||
(gp-0 (new-stack-matrix0))
|
||||
(s3-0 (new-stack-vector0))
|
||||
(s5-0 (new-stack-vector0))
|
||||
(s4-0 (new-stack-vector0))
|
||||
)
|
||||
(set! (-> gp-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 trans quad) (the-as uint128 0))
|
||||
(let ((s3-0 (new-stack-vector0))
|
||||
(s5-0 (new-stack-vector0))
|
||||
(s4-0 (new-stack-vector0))
|
||||
)
|
||||
(if (-> *camera* settings flip-horizontal)
|
||||
(set! f0-16 (- f0-16))
|
||||
)
|
||||
(cond
|
||||
((!= f0-16 0.0)
|
||||
(matrix-axis-angle! gp-0 (-> *camera* local-down) f0-16)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) gp-0)
|
||||
)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 BUTT_CAM))
|
||||
(set-vector! s5-0 0.0 0.0 1.0 1.0)
|
||||
(vector-normalize-copy! s5-0 (-> self view-flat) 1.0)
|
||||
(set! (-> s3-0 quad) (-> *camera* tgt-rot-mat fvec quad))
|
||||
(vector-flatten! s3-0 s3-0 (-> *camera* local-down))
|
||||
(vector-negate! s3-0 s3-0)
|
||||
(set! (-> s4-0 quad) (-> s5-0 quad))
|
||||
(vector-normalize-copy! s4-0 s3-0 1.0)
|
||||
(matrix-from-two-vectors-max-angle-partial! gp-0 s5-0 s4-0 (* 10922.667 (seconds-per-frame)) 0.05)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) gp-0)
|
||||
)
|
||||
(if (-> *camera* settings flip-horizontal)
|
||||
(set! f0-16 (- f0-16))
|
||||
)
|
||||
(cond
|
||||
((!= f0-16 0.0)
|
||||
(matrix-axis-angle! gp-0 (-> *camera* local-down) f0-16)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) gp-0)
|
||||
)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 BUTT_CAM))
|
||||
(set-vector! s5-0 0.0 0.0 1.0 1.0)
|
||||
(vector-normalize-copy! s5-0 (-> self view-flat) 1.0)
|
||||
(vector-copy! s3-0 (-> *camera* tgt-rot-mat fvec))
|
||||
(vector-flatten! s3-0 s3-0 (-> *camera* local-down))
|
||||
(vector-negate! s3-0 s3-0)
|
||||
(vector-copy! s4-0 s5-0)
|
||||
(vector-normalize-copy! s4-0 s3-0 1.0)
|
||||
(matrix-from-two-vectors-max-angle-partial! gp-0 s5-0 s4-0 (* 10922.667 (seconds-per-frame)) 0.05)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3642,11 +3618,7 @@
|
||||
)
|
||||
|
||||
(defbehavior cam-bike-code camera-slave ()
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s4-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s4-0 trans quad) (the-as uint128 0))
|
||||
(let ((s4-0 (new-stack-matrix0)))
|
||||
(let ((gp-0 (new-stack-vector0))
|
||||
(s5-0 (new-stack-vector0))
|
||||
)
|
||||
@@ -3704,7 +3676,7 @@
|
||||
(let ((f28-0
|
||||
(cond
|
||||
((logtest? (-> self options) (cam-slave-options-u32 COLLIDE))
|
||||
(set! (-> gp-3 start-pos quad) (-> self trans quad))
|
||||
(vector-copy! (-> gp-3 start-pos) (-> self trans))
|
||||
(let ((s3-2 gp-3))
|
||||
(set! (-> s3-2 radius) 4096.0)
|
||||
(set! (-> s3-2 collide-with) (collide-spec backgnd obstacle hit-by-others-list camera-blocker pusher))
|
||||
@@ -3760,7 +3732,7 @@
|
||||
(vector-normalize! (-> self view-flat) (-> self view-off z))
|
||||
(vector--float*! (-> self desired-pos) (-> self view-flat) (-> *camera* local-down) (-> self view-off y))
|
||||
(vector+! (-> self desired-pos) (-> self desired-pos) (-> *camera* tpos-curr-adj))
|
||||
(set! (-> self trans quad) (-> self desired-pos quad))
|
||||
(vector-copy! (-> self trans) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
(set! (-> self blend-from-type) (camera-blend-from-type unknown-0))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-1))
|
||||
|
||||
@@ -224,9 +224,9 @@
|
||||
(let ((v1-109 (-> s4-1 bsp nodes (-> s4-1 bsp cam-box-idx)))
|
||||
(a2-7 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a2-7 quad) (-> s4-1 bsp bsp-offset quad))
|
||||
(vector-copy! a2-7 (-> s4-1 bsp bsp-offset))
|
||||
(let ((a3-6 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a3-6 quad) (-> s4-1 bsp bsp-offset quad))
|
||||
(vector-copy! a3-6 (-> s4-1 bsp bsp-offset))
|
||||
(cond
|
||||
((zero? (-> s4-1 bsp cam-using-back))
|
||||
(+! (-> a2-7 x) (the float (* (-> v1-109 front-box-min x) (the int (-> s4-1 bsp bsp-scale x)))))
|
||||
@@ -294,18 +294,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((a2-2 (-> *math-camera* inv-camera-rot))
|
||||
(a3-1 *save-camera-inv-rot*)
|
||||
(v1-14 (-> a3-1 rvec quad))
|
||||
(a0-13 (-> a3-1 uvec quad))
|
||||
(a1-2 (-> a3-1 fvec quad))
|
||||
(a3-2 (-> a3-1 trans quad))
|
||||
)
|
||||
(set! (-> a2-2 rvec quad) v1-14)
|
||||
(set! (-> a2-2 uvec quad) a0-13)
|
||||
(set! (-> a2-2 fvec quad) a1-2)
|
||||
(set! (-> a2-2 trans quad) a3-2)
|
||||
)
|
||||
(matrix-copy! (-> *math-camera* inv-camera-rot) *save-camera-inv-rot*)
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -314,19 +303,8 @@
|
||||
(vector-reset! (-> *math-camera* trans))
|
||||
(matrix-identity! (-> *math-camera* inv-camera-rot))
|
||||
(when *camera-combiner*
|
||||
(let* ((v1-7 (-> *math-camera* inv-camera-rot))
|
||||
(a3-0 (-> *camera-combiner* inv-camera-rot))
|
||||
(a0-2 (-> a3-0 rvec quad))
|
||||
(a1-0 (-> a3-0 uvec quad))
|
||||
(a2-0 (-> a3-0 fvec quad))
|
||||
(a3-1 (-> a3-0 trans quad))
|
||||
)
|
||||
(set! (-> v1-7 rvec quad) a0-2)
|
||||
(set! (-> v1-7 uvec quad) a1-0)
|
||||
(set! (-> v1-7 fvec quad) a2-0)
|
||||
(set! (-> v1-7 trans quad) a3-1)
|
||||
)
|
||||
(set! (-> *math-camera* trans quad) (-> *camera-combiner* trans quad))
|
||||
(matrix-copy! (-> *math-camera* inv-camera-rot) (-> *camera-combiner* inv-camera-rot))
|
||||
(vector-copy! (-> *math-camera* trans) (-> *camera-combiner* trans))
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -342,19 +320,8 @@
|
||||
(defun update-camera ()
|
||||
(with-pp
|
||||
(let ((gp-0 *math-camera*))
|
||||
(let* ((a2-0 (-> gp-0 prev-inv-camera-rot))
|
||||
(a3-0 (-> gp-0 inv-camera-rot))
|
||||
(v1-0 (-> a3-0 rvec quad))
|
||||
(a0-0 (-> a3-0 uvec quad))
|
||||
(a1-0 (-> a3-0 fvec quad))
|
||||
(a3-1 (-> a3-0 trans quad))
|
||||
)
|
||||
(set! (-> a2-0 rvec quad) v1-0)
|
||||
(set! (-> a2-0 uvec quad) a0-0)
|
||||
(set! (-> a2-0 fvec quad) a1-0)
|
||||
(set! (-> a2-0 trans quad) a3-1)
|
||||
)
|
||||
(set! (-> gp-0 prev-trans quad) (-> gp-0 trans quad))
|
||||
(matrix-copy! (-> gp-0 prev-inv-camera-rot) (-> gp-0 inv-camera-rot))
|
||||
(vector-copy! (-> gp-0 prev-trans) (-> gp-0 trans))
|
||||
(when *start-timer*
|
||||
(when (= *timer-value* 180)
|
||||
(format
|
||||
@@ -364,7 +331,7 @@
|
||||
(-> *target* control trans y)
|
||||
(-> *target* control trans z)
|
||||
)
|
||||
(set! (-> *start-pos* quad) (-> *target* control trans quad))
|
||||
(vector-copy! *start-pos* (-> *target* control trans))
|
||||
)
|
||||
(when (= *timer-value* 480)
|
||||
(format
|
||||
@@ -434,61 +401,17 @@
|
||||
)
|
||||
((nonzero? *camera-look-through-other*)
|
||||
(set! (-> gp-0 fov) (-> *camera-other-fov* data))
|
||||
(set! (-> gp-0 trans quad) (-> *camera-other-trans* quad))
|
||||
(vector-copy! (-> gp-0 trans) *camera-other-trans*)
|
||||
(+! (-> gp-0 trans y) f28-0)
|
||||
(let* ((a2-6 (-> gp-0 inv-camera-rot))
|
||||
(a3-5 *camera-other-matrix*)
|
||||
(v1-76 (-> a3-5 rvec quad))
|
||||
(a0-34 (-> a3-5 uvec quad))
|
||||
(a1-7 (-> a3-5 fvec quad))
|
||||
(a3-6 (-> a3-5 trans quad))
|
||||
)
|
||||
(set! (-> a2-6 rvec quad) v1-76)
|
||||
(set! (-> a2-6 uvec quad) a0-34)
|
||||
(set! (-> a2-6 fvec quad) a1-7)
|
||||
(set! (-> a2-6 trans quad) a3-6)
|
||||
)
|
||||
(let* ((a2-7 *save-camera-inv-rot*)
|
||||
(a3-7 *camera-other-matrix*)
|
||||
(v1-77 (-> a3-7 rvec quad))
|
||||
(a0-35 (-> a3-7 uvec quad))
|
||||
(a1-8 (-> a3-7 fvec quad))
|
||||
(a3-8 (-> a3-7 trans quad))
|
||||
)
|
||||
(set! (-> a2-7 rvec quad) v1-77)
|
||||
(set! (-> a2-7 uvec quad) a0-35)
|
||||
(set! (-> a2-7 fvec quad) a1-8)
|
||||
(set! (-> a2-7 trans quad) a3-8)
|
||||
)
|
||||
(matrix-copy! (-> gp-0 inv-camera-rot) *camera-other-matrix*)
|
||||
(matrix-copy! *save-camera-inv-rot* *camera-other-matrix*)
|
||||
)
|
||||
((and *camera-combiner* (not *external-cam-mode*))
|
||||
(set! (-> gp-0 fov) (-> *camera-combiner* fov))
|
||||
(set! (-> gp-0 trans quad) (-> *camera-combiner* trans quad))
|
||||
(vector-copy! (-> gp-0 trans) (-> *camera-combiner* trans))
|
||||
(+! (-> gp-0 trans y) f28-0)
|
||||
(let* ((v1-84 (-> gp-0 inv-camera-rot))
|
||||
(a3-9 (-> *camera-combiner* inv-camera-rot))
|
||||
(a0-40 (-> a3-9 rvec quad))
|
||||
(a1-9 (-> a3-9 uvec quad))
|
||||
(a2-8 (-> a3-9 fvec quad))
|
||||
(a3-10 (-> a3-9 trans quad))
|
||||
)
|
||||
(set! (-> v1-84 rvec quad) a0-40)
|
||||
(set! (-> v1-84 uvec quad) a1-9)
|
||||
(set! (-> v1-84 fvec quad) a2-8)
|
||||
(set! (-> v1-84 trans quad) a3-10)
|
||||
)
|
||||
(let* ((v1-85 *save-camera-inv-rot*)
|
||||
(a3-11 (-> *camera-combiner* inv-camera-rot))
|
||||
(a0-42 (-> a3-11 rvec quad))
|
||||
(a1-10 (-> a3-11 uvec quad))
|
||||
(a2-9 (-> a3-11 fvec quad))
|
||||
(a3-12 (-> a3-11 trans quad))
|
||||
)
|
||||
(set! (-> v1-85 rvec quad) a0-42)
|
||||
(set! (-> v1-85 uvec quad) a1-10)
|
||||
(set! (-> v1-85 fvec quad) a2-9)
|
||||
(set! (-> v1-85 trans quad) a3-12)
|
||||
)
|
||||
(matrix-copy! (-> gp-0 inv-camera-rot) (-> *camera-combiner* inv-camera-rot))
|
||||
(matrix-copy! *save-camera-inv-rot* (-> *camera-combiner* inv-camera-rot))
|
||||
)
|
||||
(*camera*
|
||||
(move-camera-from-pad gp-0)
|
||||
@@ -527,18 +450,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((a2-12 (-> gp-0 inv-camera-rot-smooth))
|
||||
(a3-14 (-> gp-0 inv-camera-rot))
|
||||
(v1-106 (-> a3-14 rvec quad))
|
||||
(a0-51 (-> a3-14 uvec quad))
|
||||
(a1-16 (-> a3-14 fvec quad))
|
||||
(a3-15 (-> a3-14 trans quad))
|
||||
)
|
||||
(set! (-> a2-12 rvec quad) v1-106)
|
||||
(set! (-> a2-12 uvec quad) a0-51)
|
||||
(set! (-> a2-12 fvec quad) a1-16)
|
||||
(set! (-> a2-12 trans quad) a3-15)
|
||||
)
|
||||
(matrix-copy! (-> gp-0 inv-camera-rot-smooth) (-> gp-0 inv-camera-rot))
|
||||
)
|
||||
)
|
||||
(when (and (!= *master-mode* 'menu) *display-camera-info*)
|
||||
@@ -566,20 +478,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (-> gp-0 reset))
|
||||
(let* ((a2-16 (-> gp-0 prev-camera-temp))
|
||||
(a3-19 (-> gp-0 camera-temp))
|
||||
(v1-119 (-> a3-19 rvec quad))
|
||||
(a0-58 (-> a3-19 uvec quad))
|
||||
(a1-20 (-> a3-19 fvec quad))
|
||||
(a3-20 (-> a3-19 trans quad))
|
||||
)
|
||||
(set! (-> a2-16 rvec quad) v1-119)
|
||||
(set! (-> a2-16 uvec quad) a0-58)
|
||||
(set! (-> a2-16 fvec quad) a1-20)
|
||||
(set! (-> a2-16 trans quad) a3-20)
|
||||
(if (zero? (-> gp-0 reset))
|
||||
(matrix-copy! (-> gp-0 prev-camera-temp) (-> gp-0 camera-temp))
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (-> gp-0 camera-temp))
|
||||
(s2-0 (-> gp-0 camera-rot))
|
||||
(s5-3 (-> gp-0 inv-camera-rot))
|
||||
@@ -597,18 +498,7 @@
|
||||
(set! (-> s5-3 trans quad) (-> s4-2 quad))
|
||||
)
|
||||
(when (nonzero? (-> gp-0 reset))
|
||||
(let* ((a2-19 (-> gp-0 prev-camera-temp))
|
||||
(a3-21 (-> gp-0 camera-temp))
|
||||
(v1-125 (-> a3-21 rvec quad))
|
||||
(a0-61 (-> a3-21 uvec quad))
|
||||
(a1-23 (-> a3-21 fvec quad))
|
||||
(a3-22 (-> a3-21 trans quad))
|
||||
)
|
||||
(set! (-> a2-19 rvec quad) v1-125)
|
||||
(set! (-> a2-19 uvec quad) a0-61)
|
||||
(set! (-> a2-19 fvec quad) a1-23)
|
||||
(set! (-> a2-19 trans quad) a3-22)
|
||||
)
|
||||
(matrix-copy! (-> gp-0 prev-camera-temp) (-> gp-0 camera-temp))
|
||||
(set! (-> gp-0 reset) 0)
|
||||
0
|
||||
)
|
||||
@@ -651,7 +541,7 @@
|
||||
)
|
||||
(quaternion->matrix s0-0 (-> gp-0 quat-other))
|
||||
(mem-copy! (the-as pointer s5-4) (the-as pointer s0-0) 64)
|
||||
(set! (-> s5-4 trans quad) (-> gp-0 trans-other quad))
|
||||
(vector-copy! (-> s5-4 trans) (-> gp-0 trans-other))
|
||||
(set! (-> s5-4 trans w) 1.0)
|
||||
(matrix*! s3-2 s5-4 s4-3)
|
||||
(matrix-inverse-of-rot-trans! s2-1 s3-2)
|
||||
|
||||
@@ -269,8 +269,8 @@
|
||||
(defmethod init ((this cam-vector-seeker) (arg0 vector) (arg1 float) (arg2 float) (arg3 float))
|
||||
(cond
|
||||
(arg0
|
||||
(set! (-> this target quad) (-> arg0 quad))
|
||||
(set! (-> this value quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this target) arg0)
|
||||
(vector-copy! (-> this value) arg0)
|
||||
)
|
||||
(else
|
||||
(vector-reset! (-> this target))
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#t
|
||||
)
|
||||
(s3-0
|
||||
(set! (-> arg1 quad) (-> (the-as vector s3-0) quad))
|
||||
(vector-copy! arg1 (the-as vector s3-0))
|
||||
#t
|
||||
)
|
||||
(else
|
||||
@@ -453,7 +453,7 @@
|
||||
)
|
||||
(arg3
|
||||
(set! (-> this vec 0 quad) (-> arg3 cverts 0 quad))
|
||||
(set! (-> this vec 1 quad) (-> arg3 cverts (+ (-> arg3 num-cverts) -1) quad))
|
||||
(vector-copy! (-> this vec 1) (-> arg3 cverts (+ (-> arg3 num-cverts) -1)))
|
||||
)
|
||||
(else
|
||||
(return #f)
|
||||
@@ -519,7 +519,7 @@
|
||||
(set! (-> this max-move) 0.0)
|
||||
(set! (-> this sample-len) 0.0)
|
||||
(set! (-> this used-count) 1)
|
||||
(set! (-> this old-position quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this old-position) arg0)
|
||||
(let ((v1-6 1))
|
||||
(while (!= v1-6 31)
|
||||
(set! (-> this point v1-6 next) (+ v1-6 1))
|
||||
@@ -901,8 +901,8 @@
|
||||
(let ((a2-3 (-> s3-0 cur-pt)))
|
||||
(set! (-> this debug-last-point) a2-3)
|
||||
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> this debug-old-position quad) (-> this old-position quad))
|
||||
(set! (-> this debug-out-position quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this debug-old-position) (-> this old-position))
|
||||
(vector-copy! (-> this debug-out-position) arg0)
|
||||
(vector-! s4-1 arg0 (-> this old-position))
|
||||
(tracking-spline-method-20 this s4-1 a2-3)
|
||||
(vector+! arg0 (-> this old-position) s4-1)
|
||||
@@ -910,7 +910,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this old-position quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this old-position) arg0)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
@@ -1013,7 +1013,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> self fov) (-> *camera-combiner* fov))
|
||||
(set! (-> self velocity quad) (-> *camera-combiner* velocity quad))
|
||||
(vector-copy! (-> self velocity) (-> *camera-combiner* velocity))
|
||||
)
|
||||
(else
|
||||
(vector-reset! (-> self trans))
|
||||
@@ -1159,8 +1159,8 @@
|
||||
(let ((s3-1 (new 'stack-no-clear 'vector)))
|
||||
(curve-length (-> self spline-curve))
|
||||
(if arg3
|
||||
(set! (-> s3-1 quad) (-> self tracking follow-pt quad))
|
||||
(set! (-> s3-1 quad) (-> *camera* tpos-curr-adj quad))
|
||||
(vector-copy! s3-1 (-> self tracking follow-pt))
|
||||
(vector-copy! s3-1 (-> *camera* tpos-curr-adj))
|
||||
)
|
||||
(let ((f0-22
|
||||
(curve-closest-point (-> self spline-curve) s3-1 (-> self spline-tt) 40960.0 10 (-> self spline-follow-dist))
|
||||
@@ -1232,7 +1232,7 @@
|
||||
(update! (-> arg0 underwater-blend) 0.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 old-cam-trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> arg0 old-cam-trans) arg1)
|
||||
(jump-to-target! (-> arg0 tilt-adjust) 0.0)
|
||||
(jump-to-target! (-> arg0 point-of-interest-blend) 0.0)
|
||||
(jump-to-target! (-> arg0 underwater-blend) 0.0)
|
||||
@@ -1240,7 +1240,7 @@
|
||||
)
|
||||
(set! (-> arg0 follow-height-extra target) (-> *camera* settings extra-follow-height))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> arg0 follow-pt quad))
|
||||
(vector-copy! s4-0 (-> arg0 follow-pt))
|
||||
(cond
|
||||
((logtest? (-> *camera* settings slave-options) (cam-slave-options BIKE_MODE))
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector))
|
||||
@@ -1287,7 +1287,7 @@
|
||||
(vector+! (-> arg0 follow-off) (-> arg0 follow-off) s2-0)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 follow-off quad) (-> s2-0 quad))
|
||||
(vector-copy! (-> arg0 follow-off) s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1355,7 +1355,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 follow-off quad) (-> s2-1 quad))
|
||||
(vector-copy! (-> arg0 follow-off) s2-1)
|
||||
(jump-to-target! (-> arg0 follow-height-extra) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -1388,7 +1388,7 @@
|
||||
(vector-! (-> arg0 follow-off) (-> arg0 follow-off) (-> *camera* tpos-curr-adj))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 old-cam-trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> arg0 old-cam-trans) arg1)
|
||||
(-> arg0 follow-pt)
|
||||
)
|
||||
)
|
||||
@@ -1397,11 +1397,7 @@
|
||||
(let ((s4-0 (new-stack-vector0)))
|
||||
0.0
|
||||
0.0
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s5-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 trans quad) (the-as uint128 0))
|
||||
(let ((s5-0 (new-stack-matrix0)))
|
||||
(vector-negate! s4-0 arg1)
|
||||
(vector-flatten! s4-0 s4-0 (-> arg0 fvec))
|
||||
(vector-normalize! s4-0 1.0)
|
||||
@@ -1497,11 +1493,7 @@
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s5-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 trans quad) (the-as uint128 0))
|
||||
(let ((s5-0 (new-stack-matrix0)))
|
||||
(let ((s3-0 (new-stack-vector0))
|
||||
(s2-0 (new-stack-vector0))
|
||||
)
|
||||
@@ -1845,8 +1837,8 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> s0-0 quad) (-> arg1 quad))
|
||||
(set! (-> sv-160 quad) (-> arg2 quad))
|
||||
(vector-copy! s0-0 arg1)
|
||||
(vector-copy! sv-160 arg2)
|
||||
(set! f30-0 (vector-normalize-ret-len! s0-0 1.0))
|
||||
(set! f28-0 (vector-normalize-ret-len! sv-160 1.0))
|
||||
(vector-normalize! (vector-cross! s3-0 arg2 arg1) 1.0)
|
||||
@@ -1916,11 +1908,7 @@
|
||||
(f30-0 1.0)
|
||||
)
|
||||
0.0
|
||||
(let ((s0-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s0-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s0-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s0-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s0-0 trans quad) (the-as uint128 0))
|
||||
(let ((s0-0 (new-stack-matrix0)))
|
||||
(cond
|
||||
(arg3
|
||||
(vector-flatten! s1-0 arg1 arg3)
|
||||
@@ -1936,8 +1924,8 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> s1-0 quad) (-> arg1 quad))
|
||||
(set! (-> sv-160 quad) (-> arg2 quad))
|
||||
(vector-copy! s1-0 arg1)
|
||||
(vector-copy! sv-160 arg2)
|
||||
(set! f28-0 (vector-normalize-ret-len! s1-0 1.0))
|
||||
(set! f26-0 (vector-normalize-ret-len! sv-160 1.0))
|
||||
(vector-normalize! (vector-cross! s3-0 arg2 arg1) 1.0)
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
(set-time! (-> self debounce-start-time))
|
||||
(logclear! (-> self mask) (process-mask actor-pause movie enemy platform projectile))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(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
|
||||
@@ -326,7 +326,7 @@
|
||||
(format #t "ERROR<GMJ>: othercam parent invalid~%")
|
||||
(deactivate self)
|
||||
)
|
||||
(set! (-> *camera-other-root* quad) (-> (the-as process-drawable s2-0) root trans quad))
|
||||
(vector-copy! *camera-other-root* (-> (the-as process-drawable s2-0) root trans))
|
||||
(let ((s4-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index) bone transform))
|
||||
(s3-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index) bone scale))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
@@ -349,10 +349,10 @@
|
||||
(s1-0
|
||||
(when (not (-> self had-valid-frame))
|
||||
(set! (-> self had-valid-frame) #t)
|
||||
(set! (-> self old-pos quad) (-> s5-0 quad))
|
||||
(set! (-> self old-mat-z quad) (-> gp-0 quad))
|
||||
(vector-copy! (-> self old-pos) s5-0)
|
||||
(vector-copy! (-> self old-mat-z) gp-0)
|
||||
)
|
||||
(set! (-> *camera-other-trans* quad) (-> s5-0 quad))
|
||||
(vector-copy! *camera-other-trans* s5-0)
|
||||
(vector-normalize-copy! (-> *camera-other-matrix* rvec) (-> s4-0 rvec) -1.0)
|
||||
(set! (-> *camera-other-matrix* rvec w) 0.0)
|
||||
(vector-normalize-copy! (-> *camera-other-matrix* uvec) (-> s4-0 uvec) 1.0)
|
||||
@@ -362,8 +362,8 @@
|
||||
(vector-reset! (-> *camera-other-matrix* trans))
|
||||
(set! (-> self fov) (othercam-calc (-> s3-0 x)))
|
||||
(set! *camera-look-through-other* 2)
|
||||
(set! (-> self old-pos quad) (-> s5-0 quad))
|
||||
(set! (-> self old-mat-z quad) (-> gp-0 quad))
|
||||
(vector-copy! (-> self old-pos) s5-0)
|
||||
(vector-copy! (-> self old-mat-z) gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun col-rend-draw ((arg0 col-rend) (arg1 col-rend-filter))
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s4-0 rvec quad) (-> (math-camera-matrix) fvec quad))
|
||||
(vector-copy! (-> s4-0 rvec) (-> (math-camera-matrix) fvec))
|
||||
(vector-normalize! (-> s4-0 rvec) 1.0)
|
||||
(let ((s3-1 (the-as collide-cache-tri (-> *collide-cache* tris))))
|
||||
(countdown (s2-0 (-> *collide-cache* num-tris))
|
||||
@@ -174,7 +174,7 @@
|
||||
(let ((v1-0 (-> this track)))
|
||||
(cond
|
||||
((zero? v1-0)
|
||||
(set! (-> this bbox-center quad) (-> (target-pos 0) quad))
|
||||
(vector-copy! (-> this bbox-center) (target-pos 0))
|
||||
(+! (-> this bbox-center y) (* 0.7 f30-0))
|
||||
)
|
||||
((= v1-0 1)
|
||||
@@ -190,7 +190,7 @@
|
||||
(set! (-> s5-0 bbox min x) (- (-> s5-0 bbox min x) f30-0))
|
||||
(set! (-> s5-0 bbox min y) (- (-> s5-0 bbox min y) f30-0))
|
||||
(set! (-> s5-0 bbox min z) (- (-> s5-0 bbox min z) f30-0))
|
||||
(set! (-> s5-0 bbox max quad) (-> this bbox-center quad))
|
||||
(vector-copy! (-> s5-0 bbox max) (-> this bbox-center))
|
||||
(+! (-> s5-0 bbox max x) f30-0)
|
||||
(+! (-> s5-0 bbox max y) f30-0)
|
||||
(+! (-> s5-0 bbox max z) f30-0)
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
(when (nonzero? (-> s5-0 num-tris))
|
||||
(find-grabbable-edges s5-0)
|
||||
(when (nonzero? (-> s5-0 num-edges))
|
||||
(set! (-> s5-0 search-pt quad) (-> this control midpoint-of-hands quad))
|
||||
(vector-copy! (-> s5-0 search-pt) (-> this control midpoint-of-hands))
|
||||
(when (!= (-> *cpad-list* cpads (-> this control cpad number) stick0-speed) 0.0)
|
||||
(set! (-> s5-0 search-dir-vec quad) (-> this control to-target-pt-xz quad))
|
||||
(vector-copy! (-> s5-0 search-dir-vec) (-> this control to-target-pt-xz))
|
||||
(search-for-edges s5-0 (-> s5-0 hold-list))
|
||||
(when (find-best-grab! s5-0 (-> s5-0 hold-list) *edge-grab-info*)
|
||||
(set! (-> *edge-grab-info* found-edge?) #t)
|
||||
@@ -186,15 +186,16 @@
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 tri-vertex 0 quad) (-> s1-0 vertex 0 quad))
|
||||
(set! (-> arg1 world-vertex 4 quad) (-> s1-0 vertex 1 quad))
|
||||
(set! (-> arg1 world-vertex 5 quad) (-> s1-0 vertex 2 quad))
|
||||
(vector-copy! (-> arg1 world-vertex 4) (-> s1-0 vertex 1))
|
||||
(vector-copy! (-> arg1 world-vertex 5) (-> s1-0 vertex 2))
|
||||
(set! (-> arg1 edge-tri-pat) (-> s1-0 pat))
|
||||
(set! (-> arg1 center-hold quad) (-> arg0 center-pt quad))
|
||||
(vector-copy! (-> arg1 center-hold) (-> arg0 center-pt))
|
||||
(set! (-> arg1 world-vertex 0 quad) (-> s2-0 vertex-ptr 0 0 quad))
|
||||
(set! (-> arg1 world-vertex 1 quad) (-> s2-0 vertex-ptr 1 0 quad))
|
||||
(set! (-> arg1 hanging-matrix uvec quad)
|
||||
(-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal quad)
|
||||
)
|
||||
(vector-copy! (-> arg1 world-vertex 1) (-> s2-0 vertex-ptr 1 0))
|
||||
(vector-copy!
|
||||
(-> arg1 hanging-matrix uvec)
|
||||
(-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal)
|
||||
)
|
||||
(vector-normalize!
|
||||
(vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex)))
|
||||
1.0
|
||||
@@ -212,7 +213,7 @@
|
||||
(the-as vector (-> arg1 hanging-matrix))
|
||||
(-> arg1 hanging-matrix uvec)
|
||||
)
|
||||
(set! (-> arg1 hanging-matrix trans quad) (-> arg1 center-hold quad))
|
||||
(vector-copy! (-> arg1 hanging-matrix trans) (-> arg1 center-hold))
|
||||
(transform-vectors!
|
||||
(-> arg1 hanging-matrix)
|
||||
(-> this world-player-spheres)
|
||||
@@ -287,9 +288,7 @@
|
||||
(dotimes (s2-0 6)
|
||||
((method-of-type sphere new) (the-as symbol (-> s5-0 s2-0)) sphere)
|
||||
)
|
||||
(set! (-> s4-0 uvec quad)
|
||||
(-> (the-as collide-shape-moving (-> arg0 process 0 root)) dynam gravity-normal quad)
|
||||
)
|
||||
(vector-copy! (-> s4-0 uvec) (-> (the-as collide-shape-moving (-> arg0 process 0 root)) dynam gravity-normal))
|
||||
(vector-normalize! (vector-! (-> s4-0 fvec) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) 1.0)
|
||||
(vector-normalize! (vector-cross! (-> s4-0 rvec) (-> s4-0 fvec) (-> s4-0 uvec)) 1.0)
|
||||
(vector-cross! (-> s4-0 fvec) (-> s4-0 rvec) (-> s4-0 uvec))
|
||||
@@ -336,7 +335,7 @@
|
||||
)
|
||||
(set! (-> s5-0 left-dot) f30-0)
|
||||
(set! (-> s5-0 found-left?) #t)
|
||||
(set! (-> arg1 adjacent-edge-left-vertex quad) (-> s1-0 vertex-ptr 0 0 quad))
|
||||
(vector-copy! (-> arg1 adjacent-edge-left-vertex) (-> s1-0 vertex-ptr 0 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
@@ -352,7 +351,7 @@
|
||||
)
|
||||
(set! (-> s5-0 right-dot) f30-1)
|
||||
(set! (-> s5-0 found-right?) #t)
|
||||
(set! (-> arg1 adjacent-edge-right-vertex quad) (-> s1-0 vertex-ptr 1 0 quad))
|
||||
(vector-copy! (-> arg1 adjacent-edge-right-vertex) (-> s1-0 vertex-ptr 1 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
@@ -392,7 +391,7 @@
|
||||
(let ((f0-0 (vector-segment-distance-point! arg1 (-> v1-4 vertex-ptr 0 0) (-> v1-4 vertex-ptr 1 0) s2-0)))
|
||||
(when (or (< f30-0 0.0) (< f0-0 f30-0))
|
||||
(set! f30-0 f0-0)
|
||||
(set! (-> arg0 quad) (-> s2-0 quad))
|
||||
(vector-copy! arg0 s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -620,7 +619,7 @@
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector))
|
||||
(s2-0 #t)
|
||||
)
|
||||
(set! (-> s3-0 quad) (-> *target* control midpoint-of-hands quad))
|
||||
(vector-copy! s3-0 (-> *target* control midpoint-of-hands))
|
||||
(while s4-0
|
||||
(+! s5-0 1)
|
||||
(set! (-> s3-0 y) (-> s4-0 center-pt y))
|
||||
|
||||
@@ -531,7 +531,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
|
||||
(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
|
||||
(let ((v0-0 ((method-of-type collide-shape new) allocation type-to-make arg0 arg1)))
|
||||
(set! (-> (the-as collide-shape-moving v0-0) gspot-pos y) -40959590.0)
|
||||
(set! (-> (the-as collide-shape-moving v0-0) gspot-normal quad) (-> *y-vector* quad))
|
||||
(vector-copy! (-> (the-as collide-shape-moving v0-0) gspot-normal) *y-vector*)
|
||||
(set! (-> (the-as collide-shape-moving v0-0) surf) *standard-ground-surface*)
|
||||
(the-as collide-shape-moving v0-0)
|
||||
)
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-0 quad) (-> gp-0 trans quad))
|
||||
(vector-copy! s3-0 (-> gp-0 trans))
|
||||
(vector-! s2-0 (-> arg0 rider-dest) s3-0)
|
||||
(cond
|
||||
((logtest? (-> this root-prim prim-core action) (collide-action pull-rider-can-collide))
|
||||
@@ -378,7 +378,7 @@
|
||||
(set! (-> this root-prim prim-core collide-as) s1-0)
|
||||
)
|
||||
(let ((s1-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-1 quad) (-> s2-0 quad))
|
||||
(vector-copy! s1-1 s2-0)
|
||||
(let ((v1-19 s1-1))
|
||||
(.lvf vf1 (&-> s1-1 quad))
|
||||
(let ((f0-2 (-> pp clock frames-per-second)))
|
||||
|
||||
@@ -653,7 +653,7 @@
|
||||
)
|
||||
(and (= (-> s1-0 best-other-tri pat event) (pat-event none)) (< 0.7 (-> s1-0 best-other-tri normal y)))
|
||||
)
|
||||
(set! (-> arg1 quad) (-> s1-0 best-other-tri intersect quad))
|
||||
(vector-copy! arg1 (-> s1-0 best-other-tri intersect))
|
||||
(set! sv-560 (+ sv-560 1))
|
||||
(if (>= sv-560 2)
|
||||
(return arg1)
|
||||
@@ -937,7 +937,7 @@
|
||||
)
|
||||
|
||||
(defun collide-shape-moving-angle-set! ((arg0 collide-shape-moving) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 surface-normal quad) (-> arg1 quad))
|
||||
(vector-copy! (-> arg0 surface-normal) arg1)
|
||||
(set! (-> arg0 surface-angle) (vector-dot arg1 (-> arg0 dynam gravity-normal)))
|
||||
(set! (-> arg0 poly-angle) (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal)))
|
||||
(set! (-> arg0 touch-angle)
|
||||
@@ -965,7 +965,7 @@
|
||||
((and (= (-> arg1 best-dist) 0.0)
|
||||
(< (vector-length sv-48) (+ -40.96 (-> arg1 best-my-prim prim-core world-sphere w)))
|
||||
)
|
||||
(set! (-> sv-48 quad) (-> arg1 best-other-tri normal quad))
|
||||
(vector-copy! sv-48 (-> arg1 best-other-tri normal))
|
||||
(set! (-> arg0 coverage) 0.0)
|
||||
)
|
||||
(else
|
||||
@@ -985,7 +985,7 @@
|
||||
(if (= (-> arg1 best-dist) 0.0)
|
||||
(move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-52 6.0))
|
||||
)
|
||||
(set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad))
|
||||
(vector-copy! (-> arg0 poly-normal) (-> arg1 best-other-tri normal))
|
||||
(collide-shape-moving-angle-set! arg0 sv-52 arg2)
|
||||
(if (< (-> arg0 poly-angle) -0.2)
|
||||
(set! sv-56 (logior sv-56 (collide-status touch-ceiling)))
|
||||
@@ -1002,12 +1002,12 @@
|
||||
)
|
||||
(else
|
||||
(set! sv-56 (logior sv-56 (collide-status on-surface)))
|
||||
(set! (-> arg0 local-normal quad) (-> sv-52 quad))
|
||||
(vector-copy! (-> arg0 local-normal) sv-52)
|
||||
)
|
||||
)
|
||||
(when (and (not sv-96) (>= (-> arg0 coverage) 0.9))
|
||||
(set! sv-56 (logior sv-56 (collide-status on-ground)))
|
||||
(set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad))
|
||||
(vector-copy! (-> arg0 ground-poly-normal) (-> arg0 poly-normal))
|
||||
(when (!= (-> arg0 poly-pat mode) (pat-mode wall))
|
||||
(set! (-> arg0 ground-pat) (-> arg0 poly-pat))
|
||||
(set! (-> arg0 ground-touch-point quad) (-> arg1 best-other-tri intersect quad))
|
||||
@@ -1025,7 +1025,7 @@
|
||||
(defun cshape-reaction-default ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector))
|
||||
(cshape-reaction-update-state arg0 arg1 arg3)
|
||||
(let ((a1-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-1 quad) (-> arg3 quad))
|
||||
(vector-copy! a1-1 arg3)
|
||||
(when (and (not (logtest? (-> arg0 prev-status) (collide-status on-surface)))
|
||||
(not (logtest? (-> arg0 status) (collide-status touch-wall)))
|
||||
)
|
||||
@@ -1080,7 +1080,7 @@
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-float*! s2-0 arg1 (* arg2 (seconds-per-frame)))
|
||||
(set! (-> s5-0 move-dist quad) (-> s2-0 quad))
|
||||
(vector-copy! (-> s5-0 move-dist) s2-0)
|
||||
(set! (-> s5-0 best-dist) -100000000.0)
|
||||
(set! (-> s5-0 best-my-prim) #f)
|
||||
(set! (-> s5-0 best-other-prim) #f)
|
||||
@@ -1105,7 +1105,7 @@
|
||||
((>= f30-0 0.0)
|
||||
(let ((s2-1 (new 'stack-no-clear 'vector)))
|
||||
(if *display-collision-marks*
|
||||
(set! (-> s2-1 quad) (-> arg1 quad))
|
||||
(vector-copy! s2-1 arg1)
|
||||
)
|
||||
(set! (-> this prev-status) ((-> this reaction) (the-as control-info this) s5-0 arg0 arg1))
|
||||
(when *display-collision-marks*
|
||||
@@ -1154,7 +1154,7 @@
|
||||
((-> this no-reaction) this s5-0 arg0 arg1)
|
||||
(set! (-> this prev-status) (collide-status))
|
||||
(move-by-vector! this s2-0)
|
||||
(set! (-> arg0 quad) (-> arg1 quad))
|
||||
(vector-copy! arg0 arg1)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
@@ -1213,9 +1213,9 @@
|
||||
)
|
||||
(when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset)))
|
||||
(let ((v1-13 (-> this dynam gravity-normal)))
|
||||
(set! (-> this local-normal quad) (-> v1-13 quad))
|
||||
(set! (-> this surface-normal quad) (-> v1-13 quad))
|
||||
(set! (-> this poly-normal quad) (-> v1-13 quad))
|
||||
(vector-copy! (-> this local-normal) v1-13)
|
||||
(vector-copy! (-> this surface-normal) v1-13)
|
||||
(vector-copy! (-> this poly-normal) v1-13)
|
||||
)
|
||||
(set! (-> this coverage) 0.0)
|
||||
(set! (-> this touch-angle) 0.0)
|
||||
@@ -1270,29 +1270,29 @@
|
||||
(let ((s2-0 (-> this max-iteration-count))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-0 quad) (-> arg0 quad))
|
||||
(vector-copy! s3-0 arg0)
|
||||
(let ((s4-0 (-> this status)))
|
||||
(let ((t9-4 (method-of-type collide-shape-moving integrate-and-collide!)))
|
||||
(t9-4 this a1-8)
|
||||
)
|
||||
(set! (-> this max-iteration-count) s2-0)
|
||||
(set! (-> arg0 quad) (-> s3-0 quad))
|
||||
(vector-copy! arg0 s3-0)
|
||||
(logior! (-> this status) s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (new-stack-vector0)))
|
||||
(set! (-> s3-1 quad) (-> arg0 quad))
|
||||
(vector-copy! s3-1 arg0)
|
||||
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-1 quad) (-> arg0 quad))
|
||||
(vector-copy! s4-1 arg0)
|
||||
(let ((t9-5 (method-of-type collide-shape-moving integrate-and-collide!)))
|
||||
(t9-5 this s3-1)
|
||||
)
|
||||
(let ((s1-0 (new-stack-vector0)))
|
||||
(set! (-> s1-0 quad) (-> s4-1 quad))
|
||||
(vector-copy! s1-0 s4-1)
|
||||
(let ((s2-1 (new-stack-vector0)))
|
||||
(set! (-> s2-1 quad) (-> s3-1 quad))
|
||||
(vector-copy! s2-1 s3-1)
|
||||
(let ((v1-32 (new-stack-vector0)))
|
||||
(let ((f0-6 (vector-dot (-> this dynam gravity-normal) s1-0)))
|
||||
0.0
|
||||
@@ -1354,13 +1354,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 quad) (-> s3-1 quad))
|
||||
(vector-copy! arg0 s3-1)
|
||||
(if (and (logtest? (-> this status) (collide-status on-surface))
|
||||
(and (not (logtest? (-> this status) (collide-status touch-wall blocked)))
|
||||
(< (vector-length (-> this btransv)) (vector-length s4-1))
|
||||
)
|
||||
)
|
||||
(set! (-> this btransv quad) (-> s4-1 quad))
|
||||
(vector-copy! (-> this btransv) s4-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1389,7 +1389,7 @@
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> gp-0 quad) (-> this trans quad))
|
||||
(vector-copy! gp-0 (-> this trans))
|
||||
(vector-normalize-copy! (-> this trans) arg0 arg1)
|
||||
(vector+! (-> this trans) (-> this trans) gp-0)
|
||||
(update-transforms this)
|
||||
@@ -1424,9 +1424,9 @@
|
||||
)
|
||||
(when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset)))
|
||||
(let ((v1-13 (-> this dynam gravity-normal)))
|
||||
(set! (-> this local-normal quad) (-> v1-13 quad))
|
||||
(set! (-> this surface-normal quad) (-> v1-13 quad))
|
||||
(set! (-> this poly-normal quad) (-> v1-13 quad))
|
||||
(vector-copy! (-> this local-normal) v1-13)
|
||||
(vector-copy! (-> this surface-normal) v1-13)
|
||||
(vector-copy! (-> this poly-normal) v1-13)
|
||||
)
|
||||
(set! (-> this coverage) 0.0)
|
||||
(set! (-> this touch-angle) 0.0)
|
||||
@@ -1470,11 +1470,11 @@
|
||||
(defmethod move-to-ground-point ((this collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 vector))
|
||||
(move-to-point! this arg0)
|
||||
(set! (-> arg1 y) 0.0)
|
||||
(set! (-> this ground-touch-point quad) (-> arg0 quad))
|
||||
(set! (-> this poly-normal quad) (-> arg2 quad))
|
||||
(set! (-> this surface-normal quad) (-> arg2 quad))
|
||||
(set! (-> this local-normal quad) (-> arg2 quad))
|
||||
(set! (-> this ground-poly-normal quad) (-> arg2 quad))
|
||||
(vector-copy! (-> this ground-touch-point) arg0)
|
||||
(vector-copy! (-> this poly-normal) arg2)
|
||||
(vector-copy! (-> this surface-normal) arg2)
|
||||
(vector-copy! (-> this local-normal) arg2)
|
||||
(vector-copy! (-> this ground-poly-normal) arg2)
|
||||
(logior! (-> this status) (collide-status on-surface on-ground touch-surface))
|
||||
(set! (-> this ground-impact-vel) (- (vector-dot arg1 (-> this dynam gravity-normal))))
|
||||
0
|
||||
@@ -1512,9 +1512,9 @@
|
||||
)
|
||||
(when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset)))
|
||||
(let ((v1-13 (-> this dynam gravity-normal)))
|
||||
(set! (-> this local-normal quad) (-> v1-13 quad))
|
||||
(set! (-> this surface-normal quad) (-> v1-13 quad))
|
||||
(set! (-> this poly-normal quad) (-> v1-13 quad))
|
||||
(vector-copy! (-> this local-normal) v1-13)
|
||||
(vector-copy! (-> this surface-normal) v1-13)
|
||||
(vector-copy! (-> this poly-normal) v1-13)
|
||||
)
|
||||
(set! (-> this coverage) 0.0)
|
||||
(set! (-> this touch-angle) 0.0)
|
||||
@@ -1555,8 +1555,8 @@
|
||||
(arg4 float)
|
||||
(arg5 process)
|
||||
)
|
||||
(set! (-> this gspot-pos quad) (-> this trans quad))
|
||||
(set! (-> arg0 start-pos quad) (-> this trans quad))
|
||||
(vector-copy! (-> this gspot-pos) (-> this trans))
|
||||
(vector-copy! (-> arg0 start-pos) (-> this trans))
|
||||
(vector-reset! (-> arg0 move-dist))
|
||||
(let ((f0-0 (-> this transv y)))
|
||||
(if (< f0-0 0.0)
|
||||
@@ -1585,7 +1585,7 @@
|
||||
)
|
||||
(else
|
||||
(set! (-> this gspot-pos y) -40959590.0)
|
||||
(set! (-> this gspot-normal quad) (-> *y-vector* quad))
|
||||
(vector-copy! (-> this gspot-normal) *y-vector*)
|
||||
#f
|
||||
)
|
||||
)
|
||||
@@ -1600,7 +1600,7 @@
|
||||
(arg4 float)
|
||||
(arg5 float)
|
||||
)
|
||||
(set! (-> arg0 start-pos quad) (-> arg1 quad))
|
||||
(vector-copy! (-> arg0 start-pos) arg1)
|
||||
(+! (-> arg0 start-pos y) arg3)
|
||||
(vector-reset! (-> arg0 move-dist))
|
||||
(set! (-> arg0 move-dist y) (- (+ arg3 arg4)))
|
||||
@@ -1640,14 +1640,14 @@
|
||||
)
|
||||
(set! (-> arg1 on-ground?) #f)
|
||||
(set! (-> arg1 do-move?) #t)
|
||||
(set! (-> arg1 old-gspot-pos quad) (-> this gspot-pos quad))
|
||||
(set! (-> arg1 old-gspot-normal quad) (-> this gspot-normal quad))
|
||||
(vector-copy! (-> arg1 old-gspot-pos) (-> this gspot-pos))
|
||||
(vector-copy! (-> arg1 old-gspot-normal) (-> this gspot-normal))
|
||||
(set! (-> this trans-old-old-old quad) (-> this trans-old-old quad))
|
||||
(set! (-> this trans-old-old quad) (-> this trans-old quad))
|
||||
(set! (-> this trans-old quad) (-> this trans quad))
|
||||
(set! (-> this prev-status) (-> this status))
|
||||
(vector-v+! (-> this trans) (-> this trans) arg0)
|
||||
(set! (-> arg1 new-pos quad) (-> this trans quad))
|
||||
(vector-copy! (-> arg1 new-pos) (-> this trans))
|
||||
(let ((s3-1 (new 'stack-no-clear 'collide-query)))
|
||||
(cond
|
||||
((find-ground this s3-1 (-> arg1 gnd-collide-with) (-> arg1 popup) 81920.0 1024.0 (the-as process #f))
|
||||
@@ -1666,7 +1666,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this trans quad) (-> this trans-old quad))
|
||||
(vector-copy! (-> this trans) (-> this trans-old))
|
||||
(move-to-point! this (-> arg1 new-pos))
|
||||
(when (logtest? (logand (-> arg1 overlaps-params collide-with-filter)
|
||||
(collide-spec hit-by-player-list hit-by-others-list player-list)
|
||||
@@ -1677,8 +1677,8 @@
|
||||
(when (-> arg1 dont-move-if-overlaps?)
|
||||
(set! (-> arg1 do-move?) #f)
|
||||
(move-to-point! this (-> this trans-old))
|
||||
(set! (-> this gspot-pos quad) (-> arg1 old-gspot-pos quad))
|
||||
(set! (-> this gspot-normal quad) (-> arg1 old-gspot-normal quad))
|
||||
(vector-copy! (-> this gspot-pos) (-> arg1 old-gspot-pos))
|
||||
(vector-copy! (-> this gspot-normal) (-> arg1 old-gspot-normal))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1689,11 +1689,11 @@
|
||||
(a0-31 (-> this gspot-normal))
|
||||
(v1-59 (-> arg1 pat))
|
||||
)
|
||||
(set! (-> this ground-touch-point quad) (-> a1-8 quad))
|
||||
(set! (-> this poly-normal quad) (-> a0-31 quad))
|
||||
(set! (-> this surface-normal quad) (-> a0-31 quad))
|
||||
(set! (-> this local-normal quad) (-> a0-31 quad))
|
||||
(set! (-> this ground-poly-normal quad) (-> a0-31 quad))
|
||||
(vector-copy! (-> this ground-touch-point) a1-8)
|
||||
(vector-copy! (-> this poly-normal) a0-31)
|
||||
(vector-copy! (-> this surface-normal) a0-31)
|
||||
(vector-copy! (-> this local-normal) a0-31)
|
||||
(vector-copy! (-> this ground-poly-normal) a0-31)
|
||||
(set! (-> this poly-pat) v1-59)
|
||||
(set! (-> this cur-pat) v1-59)
|
||||
(set! (-> this ground-pat) v1-59)
|
||||
@@ -1720,9 +1720,9 @@
|
||||
)
|
||||
(when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset)))
|
||||
(let ((v1-69 (-> this dynam gravity-normal)))
|
||||
(set! (-> this local-normal quad) (-> v1-69 quad))
|
||||
(set! (-> this surface-normal quad) (-> v1-69 quad))
|
||||
(set! (-> this poly-normal quad) (-> v1-69 quad))
|
||||
(vector-copy! (-> this local-normal) v1-69)
|
||||
(vector-copy! (-> this surface-normal) v1-69)
|
||||
(vector-copy! (-> this poly-normal) v1-69)
|
||||
)
|
||||
(set! (-> this coverage) 0.0)
|
||||
(set! (-> this touch-angle) 0.0)
|
||||
@@ -1778,7 +1778,7 @@
|
||||
(cond
|
||||
((find-ground this s1-1 arg3 arg0 arg1 1024.0 (the-as process #f))
|
||||
(let ((a1-4 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-4 quad) (-> this trans quad))
|
||||
(vector-copy! a1-4 (-> this trans))
|
||||
(set! (-> a1-4 y) (-> s1-1 best-other-tri intersect y))
|
||||
(move-to-point! this a1-4)
|
||||
)
|
||||
@@ -1786,11 +1786,11 @@
|
||||
(a0-21 (-> s1-1 best-other-tri normal))
|
||||
(v1-25 (-> s1-1 best-other-tri pat))
|
||||
)
|
||||
(set! (-> this ground-touch-point quad) (-> a1-5 quad))
|
||||
(set! (-> this poly-normal quad) (-> a0-21 quad))
|
||||
(set! (-> this surface-normal quad) (-> a0-21 quad))
|
||||
(set! (-> this local-normal quad) (-> a0-21 quad))
|
||||
(set! (-> this ground-poly-normal quad) (-> a0-21 quad))
|
||||
(vector-copy! (-> this ground-touch-point) a1-5)
|
||||
(vector-copy! (-> this poly-normal) a0-21)
|
||||
(vector-copy! (-> this surface-normal) a0-21)
|
||||
(vector-copy! (-> this local-normal) a0-21)
|
||||
(vector-copy! (-> this ground-poly-normal) a0-21)
|
||||
(set! (-> this poly-pat) v1-25)
|
||||
(set! (-> this cur-pat) v1-25)
|
||||
(set! (-> this ground-pat) v1-25)
|
||||
@@ -1818,9 +1818,9 @@
|
||||
)
|
||||
(when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset)))
|
||||
(let ((v1-36 (-> this dynam gravity-normal)))
|
||||
(set! (-> this local-normal quad) (-> v1-36 quad))
|
||||
(set! (-> this surface-normal quad) (-> v1-36 quad))
|
||||
(set! (-> this poly-normal quad) (-> v1-36 quad))
|
||||
(vector-copy! (-> this local-normal) v1-36)
|
||||
(vector-copy! (-> this surface-normal) v1-36)
|
||||
(vector-copy! (-> this poly-normal) v1-36)
|
||||
)
|
||||
(set! (-> this coverage) 0.0)
|
||||
(set! (-> this touch-angle) 0.0)
|
||||
@@ -2193,7 +2193,7 @@
|
||||
(defmethod move-to-point! ((this collide-shape) (arg0 vector))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! v1-0 arg0 (-> this trans))
|
||||
(set! (-> this trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this trans) arg0)
|
||||
(let ((a1-2 (-> this root-prim)))
|
||||
(countdown (a0-1 (-> this total-prims))
|
||||
(vector+! (the-as vector (-> a1-2 prim-core)) (the-as vector (-> a1-2 prim-core)) v1-0)
|
||||
@@ -2485,7 +2485,7 @@
|
||||
(fill-cache-for-shape s1-0 8192.0 (-> gp-0 cquery))
|
||||
(let ((s4-1 3))
|
||||
(until (or (<= s4-1 0) (not (should-push-away this s1-0 (-> gp-0 cquery))))
|
||||
(set! (-> gp-0 vec33 quad) (-> s1-0 trans quad))
|
||||
(vector-copy! (-> gp-0 vec33) (-> s1-0 trans))
|
||||
(let* ((f0-4 (+ 2867.2 (-> gp-0 vec33 y)))
|
||||
(f2-2 (+ 5734.4 f0-4))
|
||||
(f1-11 (-> gp-0 cquery best-other-tri intersect y))
|
||||
@@ -2979,12 +2979,12 @@
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s2-1 quad) (-> (the-as process-focusable gp-0) root transv quad))
|
||||
(vector-copy! s2-1 (-> (the-as process-focusable gp-0) root transv))
|
||||
(let* ((v1-26 (-> (the-as process-focusable gp-0) root transv))
|
||||
(f30-0 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z)))))
|
||||
)
|
||||
(if (= f30-0 0.0)
|
||||
(set! (-> s2-1 quad) (-> (vector-z-quaternion! s2-1 (-> (the-as process-focusable gp-0) root quat)) quad))
|
||||
(vector-copy! s2-1 (vector-z-quaternion! s2-1 (-> (the-as process-focusable gp-0) root quat)))
|
||||
)
|
||||
(vector-xz-normalize! s2-1 (fmax f30-0 arg4))
|
||||
)
|
||||
@@ -3031,7 +3031,7 @@
|
||||
(let ((f0-3 (vector-vector-distance-squared s4-0 s1-0)))
|
||||
(when (or (< f30-0 0.0) (< f0-3 f30-0))
|
||||
(set! f30-0 f0-3)
|
||||
(set! (-> s5-0 quad) (-> s1-0 quad))
|
||||
(vector-copy! s5-0 s1-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
(unknown-float37 float :offset 5636)
|
||||
(unknown-vector37 vector :inline :offset 5648)
|
||||
(unknown-vector38 vector :inline :offset 5664)
|
||||
(unknown-vector39 vector :inline :offset 5680)
|
||||
(unknown-vector40 vector :inline :offset 5696)
|
||||
(unknown-quat39 quaternion :inline :offset 5680)
|
||||
(unknown-quat40 quaternion :inline :offset 5696)
|
||||
(sliding-start-time time-frame :offset 5712)
|
||||
(unknown-time-frame18 time-frame :offset 5720)
|
||||
(unknown-sound-id00 sound-id :offset 5776)
|
||||
|
||||
@@ -509,7 +509,7 @@
|
||||
(when arg1
|
||||
(let ((a0-2 (get-touched-tri arg1 arg2 arg3)))
|
||||
(if a0-2
|
||||
(set! (-> arg0 quad) (-> a0-2 intersect quad))
|
||||
(vector-copy! arg0 (-> a0-2 intersect))
|
||||
(touching-prims-entry-method-9 arg1 arg0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -66,16 +66,16 @@
|
||||
(init-vf0-vector)
|
||||
(let ((gp-0 *search-info*))
|
||||
(set! (-> gp-0 match) #f)
|
||||
(set! (-> gp-0 point quad) (-> arg1 quad))
|
||||
(vector-copy! (-> gp-0 point) arg1)
|
||||
(set! (-> gp-0 radius) arg2)
|
||||
(set! (-> gp-0 best) 1000000000000000000000.0)
|
||||
(set! (-> gp-0 rating) (search-info-flag))
|
||||
(set! (-> gp-0 require) arg4)
|
||||
(set! (-> gp-0 mask) arg3)
|
||||
(set! (-> gp-0 rot-base quad) (-> arg5 quad))
|
||||
(vector-copy! (-> gp-0 rot-base) arg5)
|
||||
(if arg6
|
||||
(set! (-> gp-0 back-point quad) (-> arg6 quad))
|
||||
(set! (-> gp-0 back-point quad) (-> gp-0 rot-base quad))
|
||||
(vector-copy! (-> gp-0 back-point) arg6)
|
||||
(vector-copy! (-> gp-0 back-point) (-> gp-0 rot-base))
|
||||
)
|
||||
(set! arg7 (cond
|
||||
((= arg7 65536.0)
|
||||
@@ -99,7 +99,7 @@
|
||||
)
|
||||
)
|
||||
(when s3-0
|
||||
(let ((s1-0 (process-mask->search-info-flag (the-as process-focusable s3-0))))
|
||||
(let ((s1-0 (get-search-info-flag (the-as process-focusable s3-0))))
|
||||
(when (and (and s3-0 (not (logtest? (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead))))
|
||||
(logtest? s1-0 (search-info-flag crate guard attackable enemy attackable-priority high-priority))
|
||||
)
|
||||
@@ -245,7 +245,7 @@
|
||||
)
|
||||
(when (logtest? (search-info-flag probe) (-> gp-0 mask))
|
||||
(let ((a1-13 (new 'stack-no-clear 'collide-query)))
|
||||
(set! (-> a1-13 start-pos quad) (-> gp-0 back-point quad))
|
||||
(vector-copy! (-> a1-13 start-pos) (-> gp-0 back-point))
|
||||
(vector-! (-> a1-13 move-dist) s2-1 (-> gp-0 back-point))
|
||||
(let ((v1-124 a1-13))
|
||||
(set! (-> v1-124 radius) 1228.8)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
(define *los-time-offset* (the-as time-frame 0))
|
||||
|
||||
(defmethod los-control-method-13 ((this los-control) (arg0 collide-query) (arg1 vector) (arg2 int) (arg3 float))
|
||||
(set! (-> arg0 move-dist quad) (-> arg1 quad))
|
||||
(vector-copy! (-> arg0 move-dist) arg1)
|
||||
(vector-length-max! (-> arg0 move-dist) (-> this max-check-distance))
|
||||
(set! (-> arg0 radius) arg3)
|
||||
(set! (-> arg0 collide-with) (the-as collide-spec (logand (the-as collide-spec arg2) (-> this collide-with))))
|
||||
@@ -84,7 +84,7 @@
|
||||
(if (not arg1)
|
||||
(set! arg1 (get-trans arg0 3))
|
||||
)
|
||||
(set! (-> s0-2 start-pos quad) (-> sv-592 quad))
|
||||
(vector-copy! (-> s0-2 start-pos) sv-592)
|
||||
(set! (-> s0-2 ignore-process0) s1-0)
|
||||
(set! (-> s0-2 ignore-process1) (the-as process arg0))
|
||||
(set! (-> s0-2 ignore-pat) (-> (the-as process-focusable s1-0) root pat-ignore-mask))
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
(level-status
|
||||
(let ((a1-3 (car s5-1)))
|
||||
(while (not (null? s5-1))
|
||||
(let ((v1-4 (status-of-level-and-borrows *level* (the-as symbol a1-3) level-status)))
|
||||
(let ((v1-4 (level-status? *level* (the-as symbol a1-3) level-status)))
|
||||
(case level-status
|
||||
(('display)
|
||||
(if (!= v1-4 'active)
|
||||
@@ -1024,6 +1024,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this com-airlock-outer) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
@@ -1082,6 +1083,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this com-airlock-inner) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
@@ -1156,6 +1158,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this cty-door) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
@@ -1209,6 +1212,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this vin-door-ctyinda) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
@@ -1263,6 +1267,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this com-airlock-outer-mhcity) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
@@ -1326,6 +1331,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this hip-door-a) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-bounce-params! ((this base-plat))
|
||||
(set! (-> this basetrans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this basetrans) (-> this root trans))
|
||||
(set! (-> this bouncing) #f)
|
||||
(set! (-> this bounce-scale) 819.2)
|
||||
0
|
||||
@@ -88,7 +88,7 @@
|
||||
(cond
|
||||
((-> self bouncing)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self basetrans quad))
|
||||
(vector-copy! gp-0 (-> self basetrans))
|
||||
(+! (-> gp-0 y) (* (-> self bounce-scale) (update! (-> self smush))))
|
||||
(move-to-point! (-> self root) gp-0)
|
||||
)
|
||||
@@ -119,7 +119,7 @@
|
||||
(spawn (-> this part) (-> this root trans))
|
||||
)
|
||||
(when (nonzero? (-> this sound))
|
||||
(set! (-> this sound trans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this sound trans) (-> this root trans))
|
||||
(update! (-> this sound))
|
||||
)
|
||||
(none)
|
||||
@@ -339,6 +339,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this eco-door) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(let ((f0-0 (res-lump-float (-> this entity) 'scale :default 1.0)))
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
(defmethod move-to! ((this basebutton) (arg0 vector) (arg1 quaternion))
|
||||
(logclear! (-> this button-status) (button-status button-status-2))
|
||||
(if arg0
|
||||
(set! (-> this move-to-pos quad) (-> arg0 quad))
|
||||
(set! (-> this move-to-pos quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this move-to-pos) arg0)
|
||||
(vector-copy! (-> this move-to-pos) (-> this root trans))
|
||||
)
|
||||
(if arg1
|
||||
(quaternion-copy! (-> this move-to-quat) arg1)
|
||||
@@ -122,7 +122,7 @@
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self button-status) (button-status button-status-2))
|
||||
(logclear! (-> self button-status) (button-status button-status-2))
|
||||
(set! (-> self root trans quad) (-> self move-to-pos quad))
|
||||
(vector-copy! (-> self root trans) (-> self move-to-pos))
|
||||
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
|
||||
(rider-post)
|
||||
)
|
||||
@@ -162,7 +162,7 @@
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self button-status) (button-status button-status-2))
|
||||
(logclear! (-> self button-status) (button-status button-status-2))
|
||||
(set! (-> self root trans quad) (-> self move-to-pos quad))
|
||||
(vector-copy! (-> self root trans) (-> self move-to-pos))
|
||||
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
|
||||
)
|
||||
(rider-post)
|
||||
@@ -208,7 +208,7 @@
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self button-status) (button-status button-status-2))
|
||||
(logclear! (-> self button-status) (button-status button-status-2))
|
||||
(set! (-> self root trans quad) (-> self move-to-pos quad))
|
||||
(vector-copy! (-> self root trans) (-> self move-to-pos))
|
||||
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
|
||||
(rider-post)
|
||||
)
|
||||
@@ -243,7 +243,7 @@
|
||||
:post (behavior ()
|
||||
(when (logtest? (-> self button-status) (button-status button-status-2))
|
||||
(logclear! (-> self button-status) (button-status button-status-2))
|
||||
(set! (-> self root trans quad) (-> self move-to-pos quad))
|
||||
(vector-copy! (-> self root trans) (-> self move-to-pos))
|
||||
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
|
||||
)
|
||||
(rider-post)
|
||||
@@ -387,6 +387,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this basebutton) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(local-vars (sv-16 res-tag))
|
||||
(init! this)
|
||||
(set! (-> this button-id) -1)
|
||||
@@ -441,7 +442,7 @@
|
||||
(set! (-> self actor-group) (the-as (pointer actor-group) #f))
|
||||
(set! (-> self actor-group-count) 0)
|
||||
(init-collision! self)
|
||||
(set! (-> self root trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg1)
|
||||
(quaternion-copy! (-> self root quat) arg2)
|
||||
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
|
||||
(prepare-trigger-event! self)
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
(set! (-> s2-1 scale x) (/ f30-1 METER_LENGTH))
|
||||
(set! (-> s2-1 scale y) (/ arg1 METER_LENGTH))
|
||||
(set! (-> s2-1 scale z) 0.0)
|
||||
(set! (-> s1-0 uvec quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad))
|
||||
(vector-copy! (-> s1-0 uvec) (new 'static 'vector :y 1.0 :w 1.0))
|
||||
(vector-cross! (-> s1-0 fvec) (-> s1-0 rvec) (-> s1-0 uvec))
|
||||
(vector-normalize! (-> s1-0 fvec) 1.0)
|
||||
(matrix->quaternion (-> s2-1 quat) s1-0)
|
||||
@@ -199,6 +199,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this blocking-plane) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(logclear! (-> this mask) (process-mask actor-pause))
|
||||
(set! (-> this current-attack-mode) #f)
|
||||
(let ((s5-0 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f))
|
||||
|
||||
@@ -238,6 +238,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this bouncer) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(set! (-> this mods) #f)
|
||||
(init-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
@@ -1984,7 +1984,7 @@
|
||||
(let ((a0-1 (math-camera-matrix))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> a0-1 rvec quad))
|
||||
(vector-copy! s5-0 (-> a0-1 rvec))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
(vector-normalize! s5-0 1.0)
|
||||
(let ((a1-3 (matrix-fr-compose (new 'stack-no-clear 'matrix) *up-vector* s5-0))
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
)
|
||||
(set! (-> this collect-timeout) (seconds 0.33))
|
||||
(set-time! (-> this birth-time))
|
||||
(set! (-> this base quad) (-> this root trans quad))
|
||||
(set! (-> this old-base quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this base) (-> this root trans))
|
||||
(vector-copy! (-> this old-base) (-> this root trans))
|
||||
(set! (-> this pickup-handle) (the-as handle #f))
|
||||
(case (-> this fact pickup-type)
|
||||
(((pickup-type eco-pill-green)
|
||||
@@ -317,8 +317,8 @@
|
||||
(set! (-> self fact pickup-amount) f30-0)
|
||||
)
|
||||
(set! (-> self fact options) (-> arg2 options))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! (-> self root transv quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(vector-copy! (-> self root transv) arg1)
|
||||
(initialize-effects self (-> self fact pickup-type))
|
||||
(set! (-> self notify) (the-as handle #f))
|
||||
(case (-> self fact pickup-type)
|
||||
@@ -355,7 +355,7 @@
|
||||
(set! (-> this pickup-amount) arg2)
|
||||
(set! (-> this pickup-type) arg1)
|
||||
(initialize-allocations this)
|
||||
(set! (-> this root trans quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> this root trans) (-> arg0 extra trans))
|
||||
(initialize-effects this (-> this fact pickup-type))
|
||||
(initialize-options this 0 1024.0 (the-as fact-info #f))
|
||||
(update-transforms (-> this root))
|
||||
@@ -466,7 +466,7 @@
|
||||
(when (nonzero? (-> this collect-effect))
|
||||
(cond
|
||||
((logtest? (-> this collect-effect flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> this root root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to s5-1
|
||||
@@ -475,7 +475,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> this root root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn part-tracker :to s5-1 :group (-> this collect-effect) :callback part-tracker-track-target)
|
||||
)
|
||||
)
|
||||
@@ -483,7 +483,7 @@
|
||||
(when (nonzero? (-> this collect-effect2))
|
||||
(cond
|
||||
((logtest? (-> this collect-effect2 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> this root root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to this
|
||||
@@ -516,7 +516,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> this root root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn
|
||||
part-tracker
|
||||
:to this
|
||||
@@ -702,13 +702,13 @@
|
||||
)
|
||||
(cond
|
||||
((= arg2 'trans)
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(vector-copy! (-> self root trans) (the-as vector (-> arg3 param 0)))
|
||||
(update-transforms (-> self root))
|
||||
(ja-post)
|
||||
)
|
||||
((= arg2 'jump)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self jump-pos quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(vector-copy! (-> self jump-pos) (the-as vector (-> arg3 param 0)))
|
||||
(go-virtual jump)
|
||||
)
|
||||
((= arg2 'pickup)
|
||||
@@ -862,8 +862,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> self jump-pos quad))
|
||||
(set! (-> self base quad) (-> self root trans quad))
|
||||
(vector-copy! (-> self root trans) (-> self jump-pos))
|
||||
(vector-copy! (-> self base) (-> self root trans))
|
||||
(vector-reset! (-> self root transv))
|
||||
(update-transforms (-> self root))
|
||||
(logclear! (-> self flags) (collectable-flag bounce))
|
||||
@@ -904,7 +904,7 @@
|
||||
(if (-> self actor-pause)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
)
|
||||
(set! (-> self base quad) (-> self root trans quad))
|
||||
(vector-copy! (-> self base) (-> self root trans))
|
||||
(logclear! (-> self root root-prim prim-core action) (collide-action solid))
|
||||
(set! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list tobot jak-vehicle))
|
||||
(set! (-> self root root-prim prim-core collide-as) (collide-spec collectable notice-blue-eco-powerup))
|
||||
@@ -967,7 +967,7 @@
|
||||
(if (and *target* (focus-test? *target* dead))
|
||||
(go-virtual fade)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> self base quad))
|
||||
(vector-copy! (-> self root trans) (-> self base))
|
||||
(add-blue-motion #t #f #f #f)
|
||||
(update-transforms (-> self root))
|
||||
(common-post self)
|
||||
@@ -1118,7 +1118,7 @@
|
||||
)
|
||||
:code (behavior ((arg0 handle))
|
||||
(until #f
|
||||
(set! (-> self root trans quad) (-> self base quad))
|
||||
(vector-copy! (-> self root trans) (-> self base))
|
||||
(add-blue-motion #t #f #t #f)
|
||||
(update-transforms (-> self root))
|
||||
(common-post self)
|
||||
@@ -1248,8 +1248,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self base quad) (-> self old-base quad))
|
||||
(set! (-> self root trans quad) (-> self base quad))
|
||||
(vector-copy! (-> self base) (-> self old-base))
|
||||
(vector-copy! (-> self root trans) (-> self base))
|
||||
(let ((v1-26 (-> self root root-prim)))
|
||||
(set! (-> v1-26 prim-core collide-as) (-> self root backup-collide-as))
|
||||
(set! (-> v1-26 prim-core collide-with) (-> self root backup-collide-with))
|
||||
@@ -1281,6 +1281,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this eco-yellow) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-common this arg0 (pickup-type eco-yellow) (-> *FACT-bank* eco-single-inc))
|
||||
)
|
||||
|
||||
@@ -1291,6 +1292,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this eco-red) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-common this arg0 (pickup-type eco-red) (-> *FACT-bank* eco-single-inc))
|
||||
)
|
||||
|
||||
@@ -1301,6 +1303,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this eco-blue) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-common this arg0 (pickup-type eco-blue) (-> *FACT-bank* eco-single-inc))
|
||||
)
|
||||
|
||||
@@ -1311,6 +1314,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this eco-green) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-common this arg0 (pickup-type eco-green) (-> *FACT-bank* eco-single-inc))
|
||||
)
|
||||
|
||||
@@ -1321,6 +1325,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this health) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-common this arg0 (pickup-type health) (-> *FACT-bank* health-default-inc))
|
||||
)
|
||||
|
||||
@@ -1359,6 +1364,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this eco-pill) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init-common this arg0 (pickup-type eco-pill-green) (-> *FACT-bank* health-small-inc))
|
||||
)
|
||||
|
||||
@@ -1476,7 +1482,7 @@
|
||||
:code (behavior ((arg0 handle))
|
||||
(until #f
|
||||
(quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 91022.22 (seconds-per-frame)))
|
||||
(set! (-> self root trans quad) (-> self base quad))
|
||||
(vector-copy! (-> self root trans) (-> self base))
|
||||
(add-blue-motion #t #t #t #f)
|
||||
(let ((f30-0 (-> self bob-amount)))
|
||||
(if (< 0.0 f30-0)
|
||||
@@ -1560,6 +1566,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this money) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(initialize-allocations this)
|
||||
(process-drawable-from-entity! this (-> this entity))
|
||||
(initialize-options this 0 1024.0 (the-as fact-info #f))
|
||||
@@ -1586,9 +1593,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(set! (-> self root transv quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root transv) arg1)
|
||||
(initialize-options
|
||||
self
|
||||
(the-as int (cond
|
||||
@@ -1623,9 +1630,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(set! (-> self root transv quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root transv) arg1)
|
||||
(initialize-options self 4500 0.0 (the-as fact-info #f))
|
||||
(logior! (-> self flags) (collectable-flag no-eco-blue))
|
||||
(update-transforms (-> self root))
|
||||
@@ -1713,13 +1720,13 @@
|
||||
(set! (-> gp-2 y) 0.0)
|
||||
(let ((f30-0 (vector-normalize-ret-len! gp-2 1.0)))
|
||||
(let ((a0-6 gp-2))
|
||||
(set! (-> a0-6 quad) (-> gp-2 quad))
|
||||
(vector-copy! a0-6 gp-2)
|
||||
(set! (-> a0-6 y) 0.0)
|
||||
(vector-normalize! a0-6 1.0)
|
||||
)
|
||||
(vector-float*! gp-2 gp-2 (rand-vu-float-range (/ f30-0 4) (* 0.75 f30-0)))
|
||||
)
|
||||
(set! (-> self root transv quad) (-> gp-2 quad))
|
||||
(vector-copy! (-> self root transv) gp-2)
|
||||
)
|
||||
(set! (-> self root transv y) 81920.0)
|
||||
)
|
||||
@@ -2041,6 +2048,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this trick-point) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(initialize-allocations this)
|
||||
(process-drawable-from-entity! this (-> this entity))
|
||||
(initialize-options this 0 1024.0 (the-as fact-info #f))
|
||||
@@ -2210,8 +2218,8 @@
|
||||
(set! (-> self fact pickup-amount) f30-0)
|
||||
)
|
||||
(set! (-> self fact options) (-> arg2 options))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! (-> self root transv quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(vector-copy! (-> self root transv) arg1)
|
||||
(initialize-effects self (-> self fact pickup-type))
|
||||
(set! (-> self notify) (the-as handle #f))
|
||||
(initialize-options self 4500 1024.0 arg2)
|
||||
@@ -2225,7 +2233,7 @@
|
||||
(set! (-> this pickup-amount) arg2)
|
||||
(set! (-> this pickup-type) arg1)
|
||||
(initialize-allocations this)
|
||||
(set! (-> this root trans quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> this root trans) (-> arg0 extra trans))
|
||||
(initialize-effects this (-> this fact pickup-type))
|
||||
(initialize-options this 0 1024.0 (the-as fact-info #f))
|
||||
(update-transforms (-> this root))
|
||||
@@ -2274,8 +2282,8 @@
|
||||
(set! (-> self fact pickup-amount) f30-0)
|
||||
)
|
||||
(set! (-> self fact options) (-> arg2 options))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! (-> self root transv quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(vector-copy! (-> self root transv) arg1)
|
||||
(initialize-effects self (-> self fact pickup-type))
|
||||
(set! (-> self notify) (the-as handle #f))
|
||||
(initialize-options
|
||||
@@ -2294,6 +2302,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this eco) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((v1-1 (res-lump-value (-> this entity) 'eco-info uint128 :time -1000000000.0)))
|
||||
(set! (-> this type) (cond
|
||||
((= (the-as uint v1-1) 3)
|
||||
@@ -2893,7 +2902,7 @@
|
||||
(return (the-as (pointer process) #f))
|
||||
)
|
||||
(let ((s3-1 (new 'stack-no-clear 'collide-query)))
|
||||
(set! (-> s3-1 start-pos quad) (-> (the-as process-drawable (-> this process)) root trans quad))
|
||||
(vector-copy! (-> s3-1 start-pos) (-> (the-as process-drawable (-> this process)) root trans))
|
||||
(set-vector! (-> s3-1 move-dist) 0.0 -81920.0 0.0 1.0)
|
||||
(+! (-> s3-1 start-pos y) 12288.0)
|
||||
(let ((v1-33 s3-1))
|
||||
@@ -2907,8 +2916,8 @@
|
||||
(set! (-> v1-33 action-mask) (collide-action solid))
|
||||
)
|
||||
(if (>= (fill-and-probe-using-line-sphere *collide-cache* s3-1) 0.0)
|
||||
(set! (-> s3-1 start-pos quad) (-> s3-1 best-other-tri intersect quad))
|
||||
(set! (-> s3-1 start-pos quad) (-> (the-as process-drawable (-> this process)) root trans quad))
|
||||
(vector-copy! (-> s3-1 start-pos) (-> s3-1 best-other-tri intersect))
|
||||
(vector-copy! (-> s3-1 start-pos) (-> (the-as process-drawable (-> this process)) root trans))
|
||||
)
|
||||
(if (= sv-16 (pickup-type fuel-cell))
|
||||
(+! (-> s3-1 start-pos y) 6144.0)
|
||||
|
||||
@@ -487,7 +487,8 @@
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs search-info-flag.
|
||||
(defmethod process-mask->search-info-flag ((this crate))
|
||||
(defmethod get-search-info-flag ((this crate))
|
||||
"Get search-info-flag for this process."
|
||||
(the-as search-info-flag (if (logtest? (actor-option no-track) (-> this fact options))
|
||||
0
|
||||
2
|
||||
@@ -644,7 +645,7 @@
|
||||
)
|
||||
(('fall)
|
||||
(when (not (and (-> self next-state) (= (-> self next-state name) 'fall)))
|
||||
(set! (-> self root transv quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(vector-copy! (-> self root transv) (the-as vector (-> arg3 param 0)))
|
||||
(go-virtual fall)
|
||||
)
|
||||
)
|
||||
@@ -714,7 +715,7 @@
|
||||
(-> self carry)
|
||||
)
|
||||
(('drop)
|
||||
(set! (-> self root transv quad) (-> (the-as vector (-> block param 1)) quad))
|
||||
(vector-copy! (-> self root transv) (the-as vector (-> block param 1)))
|
||||
(go-virtual fall)
|
||||
)
|
||||
)
|
||||
@@ -759,7 +760,7 @@
|
||||
(vector-reset! (-> self root transv))
|
||||
(when (= (vector-length (-> self root transv)) 0.0)
|
||||
(set! (-> self root root-prim local-sphere w) (-> self carry backup-radius))
|
||||
(set! (-> self base quad) (-> self root trans quad))
|
||||
(vector-copy! (-> self base) (-> self root trans))
|
||||
(let ((v1-16 (-> self root root-prim)))
|
||||
(set! (-> v1-16 prim-core collide-as) (-> self root backup-collide-as))
|
||||
(set! (-> v1-16 prim-core collide-with) (-> self root backup-collide-with))
|
||||
@@ -960,11 +961,11 @@
|
||||
((= v1-55 'darkeco)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 197 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root trans))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 197))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root trans))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 197))
|
||||
)
|
||||
)
|
||||
@@ -972,21 +973,21 @@
|
||||
((or (= v1-55 'steel) (= v1-55 'iron))
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 196 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root trans))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 196))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root trans))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 196))
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root trans))
|
||||
(part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root trans))
|
||||
(part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195))
|
||||
)
|
||||
)
|
||||
@@ -1104,7 +1105,7 @@
|
||||
(defbehavior crate-init-by-other crate ((arg0 entity) (arg1 vector) (arg2 symbol) (arg3 fact-info-crate))
|
||||
(process-entity-set! self arg0)
|
||||
(init! self (the-as entity-actor arg0))
|
||||
(set! (-> self root trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg1)
|
||||
(set! (-> self look) arg2)
|
||||
(set! (-> self defense) arg2)
|
||||
(init-skel! self)
|
||||
@@ -1119,6 +1120,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this crate) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init! this arg0)
|
||||
(init-skel! this)
|
||||
(set! (-> this draw light-index) (the-as uint 10))
|
||||
@@ -1303,7 +1305,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this base quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this base) (-> this root trans))
|
||||
(crate-post)
|
||||
(nav-mesh-connect-from-ent this)
|
||||
(none)
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
(let ((f0-9 (* (-> s1-0 gravity) (seconds-per-frame)))
|
||||
(s0-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(set! (-> s1-0 prev-pos quad) (-> s1-0 root trans quad))
|
||||
(vector-copy! (-> s1-0 prev-pos) (-> s1-0 root trans))
|
||||
(+! (-> s1-0 transv y) f0-9)
|
||||
(vector-v+! (the-as vector (-> s1-0 root)) (the-as vector (-> s1-0 root)) (-> s1-0 transv))
|
||||
(quaternion-vector-angle! s0-0 (-> s1-0 rot-axis) (* (-> s1-0 rot-angle) (seconds-per-frame)))
|
||||
@@ -215,7 +215,7 @@
|
||||
(when (nonzero? (-> s1-0 params collide-spec))
|
||||
(let ((s0-1 (new 'stack-no-clear 'vector)))
|
||||
(vector-! (-> cquery move-dist) (the-as vector (-> s1-0 root)) (-> s1-0 prev-pos))
|
||||
(set! (-> cquery start-pos quad) (-> s1-0 prev-pos quad))
|
||||
(vector-copy! (-> cquery start-pos) (-> s1-0 prev-pos))
|
||||
(let ((v1-34 cquery))
|
||||
(set! (-> v1-34 radius) 2048.0)
|
||||
(set! (-> v1-34 collide-with) (-> s1-0 params collide-spec))
|
||||
@@ -431,7 +431,7 @@
|
||||
(let ((joint-transform (-> pdraw node-list data (-> params joints i parent-joint-index) bone transform)))
|
||||
(matrix->quaternion (-> debris root quat) joint-transform)
|
||||
(matrix->trans joint-transform (the-as vector (-> debris root)))
|
||||
(set! (-> debris root scale quad) (-> pdraw root scale quad))
|
||||
(vector-copy! (-> debris root scale) (-> pdraw root scale))
|
||||
(if (nonzero? (-> params joints i offset))
|
||||
(vector-matrix*! (the-as vector (-> debris root)) (-> params joints i offset) joint-transform)
|
||||
)
|
||||
@@ -478,7 +478,7 @@
|
||||
(let ((s0-5 (new 'stack-no-clear 'vector)))
|
||||
(rand-vu-sphere-point-uniform! s0-5 1.0)
|
||||
(vector-normalize! s0-5 1.0)
|
||||
(set! (-> debris rot-axis quad) (-> s0-5 quad))
|
||||
(vector-copy! (-> debris rot-axis) s0-5)
|
||||
)
|
||||
(set! (-> debris rot-angle) (* 182.04445 (-> tuning rot-speed)))
|
||||
(set! (-> debris duration) (the float (-> tuning duration)))
|
||||
@@ -494,7 +494,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> debris draw) draw)
|
||||
(set! (-> draw skeleton bones 0 transform trans quad) (-> *null-vector* quad))
|
||||
(vector-copy! (-> draw skeleton bones 0 transform trans) *null-vector*)
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
(let ((s4-0 (-> gp-0 control collision-spheres 0))
|
||||
(s5-0 (new 'stack-no-clear 'collide-query))
|
||||
)
|
||||
(set! (-> s5-0 start-pos quad) (-> s4-0 prim-core world-sphere quad))
|
||||
(vector-copy! (-> s5-0 start-pos) (-> s4-0 prim-core world-sphere))
|
||||
(+! (-> s5-0 start-pos y) 8192.0)
|
||||
(set! (-> s5-0 start-pos w) 1.0)
|
||||
(vector-reset! (-> s5-0 move-dist))
|
||||
@@ -150,6 +150,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod toggle-fence-collision ((this elevator) (arg0 symbol))
|
||||
(when (and (logtest? (-> this params flags) (elevator-flags fence)) (nonzero? (-> this fence-prim-index)))
|
||||
(let ((v1-7 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child (-> this fence-prim-index))))
|
||||
@@ -725,7 +726,7 @@
|
||||
(f0-9 (+ f30-0 (* (ease-value-in-out (-> self path-pos) 0.08) (- f28-0 f30-0))))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> gp-0 quad) (-> self basetrans quad))
|
||||
(vector-copy! gp-0 (-> self basetrans))
|
||||
(get-point-in-path! (-> self path) (-> self basetrans) f0-9 'interp)
|
||||
(set! (-> self speed) (* (- (-> self basetrans y) (-> gp-0 y)) (-> self clock frames-per-second)))
|
||||
)
|
||||
@@ -855,6 +856,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this elevator) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(local-vars (sv-32 float) (sv-36 path-control) (sv-40 target))
|
||||
(stack-size-set! (-> this main-thread) 1024)
|
||||
(set! (-> this sound-running-loop) #f)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
)
|
||||
0
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
(set! (-> self draw origin quad) (-> self root trans quad))
|
||||
(vector-copy! (-> self draw origin) (-> self root trans))
|
||||
(if (logtest? (enemy-flag directed) (-> self enemy-flags))
|
||||
(logior! (-> self enemy-flags) (enemy-flag directed-ready))
|
||||
)
|
||||
@@ -99,7 +99,7 @@
|
||||
:trans (behavior ()
|
||||
(when (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (> (the-as int (-> self focus aware)) 0))
|
||||
(if (logtest? (enemy-option ambush) (-> self fact enemy-options))
|
||||
(go-ambush-delay self)
|
||||
(go-ambush self)
|
||||
(go-virtual active)
|
||||
)
|
||||
)
|
||||
@@ -218,10 +218,10 @@
|
||||
(let ((gp-1 (-> self focus aware)))
|
||||
(when (logtest? (-> self enemy-flags) (enemy-flag alert))
|
||||
(cond
|
||||
((and (= gp-1 (enemy-aware ea3)) (get-focus! self))
|
||||
((and (= gp-1 (enemy-aware hostile)) (get-focus! self))
|
||||
(go-hostile self)
|
||||
)
|
||||
((= gp-1 (enemy-aware ea4))
|
||||
((= gp-1 (enemy-aware flee))
|
||||
(go-flee self)
|
||||
)
|
||||
(else
|
||||
@@ -248,7 +248,7 @@
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
(go-best-state self)
|
||||
(go-state-for-focused self)
|
||||
)
|
||||
:post enemy-simple-post
|
||||
)
|
||||
@@ -281,7 +281,7 @@
|
||||
((or (>= 2 (the-as int gp-0)) (not (get-focus! self)))
|
||||
(go-stare self)
|
||||
)
|
||||
((= gp-0 (enemy-aware ea4))
|
||||
((= gp-0 (enemy-aware flee))
|
||||
(go-flee self)
|
||||
)
|
||||
)
|
||||
@@ -318,10 +318,10 @@
|
||||
((>= 1 (the-as int gp-0))
|
||||
(go-virtual active)
|
||||
)
|
||||
((and (= gp-0 (enemy-aware ea3)) (get-focus! self))
|
||||
((and (= gp-0 (enemy-aware hostile)) (get-focus! self))
|
||||
(go-hostile self)
|
||||
)
|
||||
((= gp-0 (enemy-aware ea4))
|
||||
((= gp-0 (enemy-aware flee))
|
||||
(go-flee self)
|
||||
)
|
||||
)
|
||||
@@ -365,7 +365,7 @@
|
||||
(ja :num! (seek! max f30-0))
|
||||
)
|
||||
)
|
||||
(go-best-state self)
|
||||
(go-state-for-focused self)
|
||||
)
|
||||
:post enemy-simple-post
|
||||
)
|
||||
@@ -381,7 +381,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (time-elapsed? (-> self state-time) (-> self reaction-time))
|
||||
(if (!= (-> self focus aware) (enemy-aware ea4))
|
||||
(if (!= (-> self focus aware) (enemy-aware flee))
|
||||
(go-stare self)
|
||||
)
|
||||
)
|
||||
@@ -427,17 +427,17 @@
|
||||
(init-jump-info! self gp-0)
|
||||
(if (and (-> self enemy-info use-jump-blocked)
|
||||
(logtest? (enemy-flag jump-check-blocked) (-> self enemy-flags))
|
||||
(enemy-method-91 self gp-0)
|
||||
(check-jump-blocked? self gp-0)
|
||||
)
|
||||
(go-virtual jump-blocked)
|
||||
)
|
||||
(when (logtest? (-> gp-0 flags) (enemy-jump-flags ejf0))
|
||||
(until #f
|
||||
(if (jump-anim-handler self s5-0 gp-0)
|
||||
(if (jump-anim-handler self (the-as jump-stage s5-0) gp-0)
|
||||
(goto cfg-12)
|
||||
)
|
||||
(in-jump-handler self s5-0 gp-0)
|
||||
(enemy-method-101 self s5-0 gp-0)
|
||||
(move-along-ballistic-trajectory-for-jump self (the-as jump-stage s5-0) gp-0)
|
||||
(adjust-heading-for-jump self (the-as jump-stage s5-0) gp-0)
|
||||
(suspend)
|
||||
(set! s5-0 1)
|
||||
)
|
||||
@@ -448,11 +448,11 @@
|
||||
(logclear! (-> self root status) (collide-status on-surface on-ground touch-surface))
|
||||
(let ((s5-1 2))
|
||||
(logior! (-> self focus-status) (focus-status in-air))
|
||||
(until (on-ground? self gp-0)
|
||||
(until (landed-jump-yet? self gp-0)
|
||||
(+! (-> gp-0 hang-time) (- (current-time) (-> self clock old-frame-counter)))
|
||||
(jump-anim-handler self s5-1 gp-0)
|
||||
(in-jump-handler self s5-1 gp-0)
|
||||
(enemy-method-101 self s5-1 gp-0)
|
||||
(jump-anim-handler self (the-as jump-stage s5-1) gp-0)
|
||||
(move-along-ballistic-trajectory-for-jump self (the-as jump-stage s5-1) gp-0)
|
||||
(adjust-heading-for-jump self (the-as jump-stage s5-1) gp-0)
|
||||
(suspend)
|
||||
(set! s5-1 3)
|
||||
)
|
||||
@@ -461,11 +461,11 @@
|
||||
(move-to-gspot! self)
|
||||
(let ((s5-2 4))
|
||||
(until #f
|
||||
(if (jump-anim-handler self s5-2 gp-0)
|
||||
(if (jump-anim-handler self (the-as jump-stage s5-2) gp-0)
|
||||
(goto cfg-19)
|
||||
)
|
||||
(in-jump-handler self s5-2 gp-0)
|
||||
(enemy-method-101 self s5-2 gp-0)
|
||||
(move-along-ballistic-trajectory-for-jump self (the-as jump-stage s5-2) gp-0)
|
||||
(adjust-heading-for-jump self (the-as jump-stage s5-2) gp-0)
|
||||
(suspend)
|
||||
(set! s5-2 5)
|
||||
)
|
||||
@@ -476,7 +476,7 @@
|
||||
(if (logtest? (enemy-flag directed) (-> self enemy-flags))
|
||||
((lambda :behavior enemy () (send-event (ppointer->process (-> self parent)) 'child-jumped)))
|
||||
)
|
||||
(go-directed2 self)
|
||||
(go-next-state-auto self)
|
||||
)
|
||||
:post (behavior ()
|
||||
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
@@ -500,7 +500,7 @@
|
||||
(when (time-elapsed? (-> self state-time) (seconds 0.5))
|
||||
(if (logtest? (enemy-flag directed) (-> self enemy-flags))
|
||||
(go-virtual jump)
|
||||
(go-directed2 self)
|
||||
(go-next-state-auto self)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -610,7 +610,7 @@
|
||||
(if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options))
|
||||
(logior! (-> self enemy-flags) (enemy-flag check-water))
|
||||
)
|
||||
(if (and (enemy-method-123 self) (-> self enemy-info ragdoll-info))
|
||||
(if (and (allow-ragdoll? self) (-> self enemy-info ragdoll-info))
|
||||
(set! (-> self root transv y) 0.0)
|
||||
)
|
||||
(let ((v1-43 (-> self root)))
|
||||
@@ -633,9 +633,9 @@
|
||||
)
|
||||
(when (not (logtest? (-> v1-43 root-prim prim-core action) (collide-action no-normal-reset)))
|
||||
(let ((a0-25 (-> v1-43 dynam gravity-normal)))
|
||||
(set! (-> v1-43 local-normal quad) (-> a0-25 quad))
|
||||
(set! (-> v1-43 surface-normal quad) (-> a0-25 quad))
|
||||
(set! (-> v1-43 poly-normal quad) (-> a0-25 quad))
|
||||
(vector-copy! (-> v1-43 local-normal) a0-25)
|
||||
(vector-copy! (-> v1-43 surface-normal) a0-25)
|
||||
(vector-copy! (-> v1-43 poly-normal) a0-25)
|
||||
)
|
||||
(set! (-> v1-43 coverage) 0.0)
|
||||
(set! (-> v1-43 touch-angle) 0.0)
|
||||
@@ -654,8 +654,8 @@
|
||||
(logclear! (-> self enemy-flags) (enemy-flag trackable))
|
||||
)
|
||||
(set! (-> self root penetrate-using) (penetrate lunge vehicle knocked))
|
||||
(reset-penetrate! self)
|
||||
(enemy-method-50 self 1)
|
||||
(reset-penetrate-later! self)
|
||||
(update-collision-action self 1)
|
||||
(ragdoll-spawn! self #t #f)
|
||||
)
|
||||
:exit (behavior ()
|
||||
@@ -672,12 +672,12 @@
|
||||
(suspend-for (seconds 0.2)
|
||||
)
|
||||
(until (ragdoll-settled? self)
|
||||
(if (or (time-elapsed? (-> self state-time) (seconds 4)) (enemy-method-109 self))
|
||||
(if (or (time-elapsed? (-> self state-time) (seconds 4)) (out-of-bounds? self))
|
||||
(go-die self)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(if (within-gspot-range? self)
|
||||
(if (invalid-height? self)
|
||||
(go-die self)
|
||||
)
|
||||
)
|
||||
@@ -687,7 +687,7 @@
|
||||
(set! (-> gp-1 anim-speed) (rnd-float-range self 0.9 1.1))
|
||||
(set! (-> gp-1 on-surface-count) 0)
|
||||
(set! (-> gp-1 move-count) 0)
|
||||
(until (enemy-method-88 self gp-1)
|
||||
(until (done-being-knocked? self gp-1)
|
||||
(if (time-elapsed? (-> self state-time) (seconds 2))
|
||||
(go-die self)
|
||||
)
|
||||
@@ -712,7 +712,7 @@
|
||||
(suspend)
|
||||
(+! (-> gp-1 move-count) 1)
|
||||
(set! s5-1 3)
|
||||
(if (enemy-method-88 self gp-1)
|
||||
(if (done-being-knocked? self gp-1)
|
||||
(set-time! (-> gp-1 land-can-land-time))
|
||||
)
|
||||
)
|
||||
@@ -720,8 +720,8 @@
|
||||
#f
|
||||
(label cfg-33)
|
||||
(if (and (not (logtest? (enemy-flag death-start) (-> self enemy-flags)))
|
||||
(or (within-gspot-range? self)
|
||||
(enemy-method-109 self)
|
||||
(or (invalid-height? self)
|
||||
(out-of-bounds? self)
|
||||
(time-elapsed? (-> gp-1 land-can-land-time) (-> self enemy-info knocked-can-land-timeout))
|
||||
)
|
||||
)
|
||||
@@ -792,7 +792,7 @@
|
||||
(set! (-> self root penetrate-using)
|
||||
(the-as penetrate (logclear (-> self root penetrate-using) (penetrate knocked)))
|
||||
)
|
||||
(enemy-method-50 self 2)
|
||||
(update-collision-action self 2)
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
@@ -825,9 +825,7 @@
|
||||
:trans (behavior ()
|
||||
(if (and (time-elapsed? (-> self state-time) (seconds 0.01))
|
||||
(and (not (handle->process (-> self ragdoll-proc)))
|
||||
(or (within-gspot-range? self)
|
||||
(time-elapsed? (-> self state-time) (-> self enemy-info knocked-recover-timeout))
|
||||
)
|
||||
(or (invalid-height? self) (time-elapsed? (-> self state-time) (-> self enemy-info knocked-recover-timeout)))
|
||||
)
|
||||
)
|
||||
(go-die self)
|
||||
@@ -858,7 +856,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (enemy-method-109 self)
|
||||
(if (out-of-bounds? self)
|
||||
(go-die self)
|
||||
(go-hostile self)
|
||||
)
|
||||
@@ -867,7 +865,7 @@
|
||||
(when (not (handle->process (-> self ragdoll-proc)))
|
||||
(let ((gp-0 (-> self root)))
|
||||
(if (focus-test? self under-water)
|
||||
(accelerate-fall! self (-> gp-0 transv))
|
||||
(adjust-transv-under-water! self (-> gp-0 transv))
|
||||
(vector-v++!
|
||||
(-> gp-0 transv)
|
||||
(compute-acc-due-to-gravity gp-0 (new 'stack-no-clear 'vector) (-> self enemy-info slip-factor))
|
||||
@@ -888,12 +886,12 @@
|
||||
(a1-5 (new 'stack-no-clear 'collide-query))
|
||||
(s5-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-1 quad) (-> gp-1 gspot-pos quad))
|
||||
(vector-copy! s5-1 (-> gp-1 gspot-pos))
|
||||
(let ((s4-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-1 quad) (-> gp-1 gspot-normal quad))
|
||||
(vector-copy! s4-1 (-> gp-1 gspot-normal))
|
||||
(when (not (find-ground gp-1 a1-5 (-> self enemy-info gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f)))
|
||||
(set! (-> gp-1 gspot-pos quad) (-> s5-1 quad))
|
||||
(set! (-> gp-1 gspot-normal quad) (-> s4-1 quad))
|
||||
(vector-copy! (-> gp-1 gspot-pos) s5-1)
|
||||
(vector-copy! (-> gp-1 gspot-normal) s4-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1314,7 +1312,7 @@
|
||||
(set! (-> self root transv quad) (the-as uint128 0))
|
||||
(gun-dark-2-ragdoll-start self)
|
||||
(let* ((s4-1 self)
|
||||
(s1-0 (method-of-object s4-1 get-incoming-attack!))
|
||||
(s1-0 (method-of-object s4-1 handle-incoming-attack!))
|
||||
(s0-0 proc)
|
||||
)
|
||||
(set! sv-112 block)
|
||||
@@ -1331,7 +1329,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(damage-enemy! self proc block)
|
||||
(damage-enemy-from-attack! self proc block)
|
||||
(set! (-> self incoming penetrate-using) (penetrate vehicle))
|
||||
(set! (-> self incoming knocked-type) (knocked-type vehicle))
|
||||
(set! (-> self incoming attack-direction quad) (the-as uint128 0))
|
||||
@@ -1352,7 +1350,7 @@
|
||||
(else
|
||||
(when (!= (-> (the-as attack-info s5-0) id) (-> self incoming attack-id))
|
||||
(let* ((s2-1 self)
|
||||
(s1-1 (method-of-object s2-1 get-incoming-attack!))
|
||||
(s1-1 (method-of-object s2-1 handle-incoming-attack!))
|
||||
(s0-1 proc)
|
||||
)
|
||||
(set! sv-128 block)
|
||||
@@ -1491,8 +1489,8 @@
|
||||
(let ((s3-0 (new 'stack 'collide-query))
|
||||
(gp-2 (vector-float*! (new 'stack-no-clear 'vector) (-> self root transv) (seconds-per-frame)))
|
||||
)
|
||||
(set! (-> s3-0 start-pos quad) (-> (get-trans self 3) quad))
|
||||
(set! (-> s3-0 move-dist quad) (-> gp-2 quad))
|
||||
(vector-copy! (-> s3-0 start-pos) (get-trans self 3))
|
||||
(vector-copy! (-> s3-0 move-dist) gp-2)
|
||||
(let ((v1-26 s3-0))
|
||||
(set! (-> v1-26 radius) (* 0.7 (-> self root root-prim prim-core world-sphere w)))
|
||||
(set! (-> v1-26 collide-with)
|
||||
@@ -1515,8 +1513,8 @@
|
||||
(v1-31 (-> s3-0 best-other-tri))
|
||||
(f28-0 0.9)
|
||||
)
|
||||
(set! (-> s5-1 quad) (-> v1-31 normal quad))
|
||||
(set! (-> s4-0 quad) (-> v1-31 intersect quad))
|
||||
(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
|
||||
@@ -1528,7 +1526,7 @@
|
||||
(when v1-32
|
||||
(let ((s2-1 (-> (the-as collide-shape-prim-sphere v1-32) cshape process)))
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-0 quad) (-> self root transv quad))
|
||||
(vector-copy! s1-0 (-> self root transv))
|
||||
(let* ((s0-0 s2-1)
|
||||
(v1-37 (if (type? s0-0 process-focusable)
|
||||
s0-0
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
)
|
||||
(if a0-7
|
||||
(move-to-point! (the-as collide-shape a0-7) (-> (the-as process-drawable gp-0) root trans))
|
||||
(set! (-> self root trans quad) (-> (the-as process-drawable gp-0) root trans quad))
|
||||
(vector-copy! (-> self root trans) (-> (the-as process-drawable gp-0) root trans))
|
||||
)
|
||||
)
|
||||
(quaternion-copy! (-> self root quat) (-> (the-as process-drawable gp-0) root quat))
|
||||
@@ -226,7 +226,7 @@
|
||||
)
|
||||
)
|
||||
(when (nonzero? (-> this sound))
|
||||
(set! (-> this sound trans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this sound trans) (-> this root trans))
|
||||
(let ((f30-0 (lerp-scale -0.1 -0.05 (-> this speed) 8192.0 20480.0))
|
||||
(f0-6 (lerp-scale 0.7 1.0 (-> this speed) 8192.0 20480.0))
|
||||
)
|
||||
@@ -290,7 +290,9 @@
|
||||
(swingpole-method-22 self)
|
||||
(suspend)
|
||||
)
|
||||
(suspend-for (seconds 0.5) (swingpole-method-22 self))
|
||||
(suspend-for (seconds 0.5)
|
||||
(swingpole-method-22 self)
|
||||
)
|
||||
(go-virtual idle)
|
||||
)
|
||||
)
|
||||
@@ -320,10 +322,11 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this swingpole) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
"Copy defaults from the entity."
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(init-collision! this)
|
||||
(set! (-> this root trans quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> this root trans) (-> arg0 extra trans))
|
||||
(quaternion-copy! (-> this root quat) (-> arg0 quat))
|
||||
(vector-identity! (-> this root scale))
|
||||
(vector-y-quaternion! (-> this dir) (-> this root quat))
|
||||
@@ -380,7 +383,7 @@
|
||||
)
|
||||
(set! (-> self root) s5-0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> (the-as process-drawable (-> self parent 0)) root trans quad))
|
||||
(vector-copy! (-> self root trans) (-> (the-as process-drawable (-> self parent 0)) root trans))
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(vector-identity! (-> self root scale))
|
||||
(set! (-> self joint-track) arg0)
|
||||
@@ -395,6 +398,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this process-hidden) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
"Copy defaults from the entity."
|
||||
(process-entity-status! this (entity-perm-status dead) #t)
|
||||
(go (method-of-object this die))
|
||||
@@ -565,7 +569,7 @@
|
||||
(s3-0 (new 'stack-no-clear 'collide-query))
|
||||
(f28-0 122880.0)
|
||||
)
|
||||
(set! (-> s3-0 start-pos quad) (-> s4-1 quad))
|
||||
(vector-copy! (-> s3-0 start-pos) s4-1)
|
||||
(vector-normalize-copy! (-> s3-0 move-dist) s5-2 f28-0)
|
||||
(let ((v1-91 s3-0))
|
||||
(set! (-> v1-91 radius) 1638.4)
|
||||
@@ -898,7 +902,7 @@
|
||||
(vector-! (new 'stack-no-clear 'vector) gp-1 (-> self old-grab-pos))
|
||||
)
|
||||
)
|
||||
(set! (-> self old-grab-pos quad) (-> gp-1 quad))
|
||||
(vector-copy! (-> self old-grab-pos) gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1061,7 +1065,7 @@
|
||||
(set! (-> self root) (the-as collide-shape (new 'process 'trsqv)))
|
||||
)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(initialize-skeleton self arg2 (the-as pair 0))
|
||||
(if (type? (-> self root) collide-shape)
|
||||
(update-transforms (-> self root))
|
||||
@@ -1221,11 +1225,11 @@
|
||||
(nonzero? (-> (the-as process-drawable v1-15) node-list))
|
||||
)
|
||||
(spawn-from-cspace (-> self part) (-> (the-as process-drawable v1-15) node-list data (-> self target-joint)))
|
||||
(set! (-> self root trans quad) (-> self part origin trans quad))
|
||||
(vector-copy! (-> self root trans) (-> self part origin trans))
|
||||
)
|
||||
(else
|
||||
(let ((a0-11 (-> self root trans)))
|
||||
(set! (-> self mat trans quad) (-> a0-11 quad))
|
||||
(vector-copy! (-> self mat trans) a0-11)
|
||||
)
|
||||
(spawn-from-mat (-> self part) (-> self mat))
|
||||
)
|
||||
@@ -1302,11 +1306,11 @@
|
||||
(-> self subsampler)
|
||||
(-> (the-as process-drawable v1-15) node-list data (-> self target-joint) bone transform)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> self subsampler spawn-mat trans quad))
|
||||
(vector-copy! (-> self root trans) (-> self subsampler spawn-mat trans))
|
||||
)
|
||||
(else
|
||||
(let ((a0-11 (-> self root trans)))
|
||||
(set! (-> self mat trans quad) (-> a0-11 quad))
|
||||
(vector-copy! (-> self mat trans) a0-11)
|
||||
)
|
||||
(init-with-mat! (-> self subsampler) (-> self mat))
|
||||
)
|
||||
@@ -1334,39 +1338,17 @@
|
||||
(set! (-> self target-joint) (the-as int arg5))
|
||||
)
|
||||
((logtest? (-> arg0 flags) (sp-group-flag sp5))
|
||||
(let* ((s1-1 (-> self mat))
|
||||
(a2-1 (math-camera-matrix))
|
||||
(v1-18 (-> a2-1 rvec quad))
|
||||
(a0-10 (-> a2-1 uvec quad))
|
||||
(a1-2 (-> a2-1 fvec quad))
|
||||
(a2-2 (-> a2-1 trans quad))
|
||||
)
|
||||
(set! (-> s1-1 rvec quad) v1-18)
|
||||
(set! (-> s1-1 uvec quad) a0-10)
|
||||
(set! (-> s1-1 fvec quad) a1-2)
|
||||
(set! (-> s1-1 trans quad) a2-2)
|
||||
)
|
||||
(set! (-> self mat trans quad) (-> (the-as matrix arg5) trans quad))
|
||||
(set! (-> self offset quad) (-> self mat trans quad))
|
||||
(matrix-copy! (-> self mat) (math-camera-matrix))
|
||||
(vector-copy! (-> self mat trans) (-> (the-as matrix arg5) trans))
|
||||
(vector-copy! (-> self offset) (-> self mat trans))
|
||||
)
|
||||
(else
|
||||
(let* ((v1-21 (-> self mat))
|
||||
(a3-1 (the-as matrix arg5))
|
||||
(a0-15 (-> a3-1 rvec quad))
|
||||
(a1-3 (-> a3-1 uvec quad))
|
||||
(a2-3 (-> a3-1 fvec quad))
|
||||
(a3-2 (-> a3-1 trans quad))
|
||||
)
|
||||
(set! (-> v1-21 rvec quad) a0-15)
|
||||
(set! (-> v1-21 uvec quad) a1-3)
|
||||
(set! (-> v1-21 fvec quad) a2-3)
|
||||
(set! (-> v1-21 trans quad) a3-2)
|
||||
)
|
||||
(set! (-> self offset quad) (-> self mat trans quad))
|
||||
(matrix-copy! (-> self mat) (the-as matrix arg5))
|
||||
(vector-copy! (-> self offset) (-> self mat trans))
|
||||
)
|
||||
)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> self mat trans quad))
|
||||
(vector-copy! (-> self root trans) (-> self mat trans))
|
||||
(if (zero? arg0)
|
||||
(go process-drawable-art-error "null group")
|
||||
)
|
||||
@@ -1506,7 +1488,7 @@
|
||||
)
|
||||
(v0-1 (-> arg0 root trans))
|
||||
)
|
||||
(set! (-> v0-1 quad) (-> v1-2 quad))
|
||||
(vector-copy! v0-1 v1-2)
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
@@ -1605,7 +1587,7 @@
|
||||
(let ((a0-26 (-> this lightning))
|
||||
(v1-44 (-> this offset1))
|
||||
)
|
||||
(set! (-> a0-26 state meet data (+ (-> a0-26 state points-to-draw) -1) quad) (-> v1-44 quad))
|
||||
(vector-copy! (-> a0-26 state meet data (+ (-> a0-26 state points-to-draw) -1)) v1-44)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1616,14 +1598,14 @@
|
||||
(let ((gp-1 (-> this lightning))
|
||||
(v1-51 (get-trans a0-22 3))
|
||||
)
|
||||
(set! (-> gp-1 state meet data (+ (-> gp-1 state points-to-draw) -1) quad) (-> v1-51 quad))
|
||||
(vector-copy! (-> gp-1 state meet data (+ (-> gp-1 state points-to-draw) -1)) v1-51)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s5-4 (-> this lightning))
|
||||
(v1-54 (vector<-cspace! (new 'stack-no-clear 'vector) (-> a0-22 node-list data (-> this target-joint1))))
|
||||
)
|
||||
(set! (-> s5-4 state meet data (+ (-> s5-4 state points-to-draw) -1) quad) (-> v1-54 quad))
|
||||
(vector-copy! (-> s5-4 state meet data (+ (-> s5-4 state points-to-draw) -1)) v1-54)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1673,7 +1655,7 @@
|
||||
(let ((gp-1 (-> self lightning spec sound)))
|
||||
(when gp-1
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-1 quad) (-> self offset1 quad))
|
||||
(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)
|
||||
@@ -1682,9 +1664,10 @@
|
||||
)
|
||||
)
|
||||
(if (and v1-28 (nonzero? (-> v1-28 root)))
|
||||
(set! (-> s5-1 quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-28 node-list data (-> self target-joint1))) quad)
|
||||
)
|
||||
(vector-copy!
|
||||
s5-1
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-28 node-list data (-> self target-joint1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1997,6 +1980,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this med-res-level) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(let ((s4-0 (res-lump-struct arg0 'art-name structure))
|
||||
(s3-0 (res-lump-struct (-> this entity) 'level structure))
|
||||
@@ -2085,6 +2069,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(local-vars (sv-16 string))
|
||||
(stack-size-set! (-> this main-thread) 64)
|
||||
(logior! (-> this mask) (process-mask ambient))
|
||||
@@ -2092,7 +2077,7 @@
|
||||
(+! (-> *display* part-clock ref-count) 1)
|
||||
(set! (-> this clock) (-> *display* part-clock))
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(set! (-> this root trans quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> this root trans) (-> arg0 extra trans))
|
||||
(quaternion-copy! (-> this root quat) (-> arg0 quat))
|
||||
(vector-identity! (-> this root scale))
|
||||
(set! (-> this radius) 12288.0)
|
||||
@@ -2429,22 +2414,18 @@
|
||||
|
||||
(defbehavior cam-launcher-joystick camera-slave ()
|
||||
(when (not (logtest? (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> s5-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s5-0 trans quad) (the-as uint128 0))
|
||||
(let ((gp-0 (vector-reset! (new 'stack-no-clear 'vector))))
|
||||
(let* ((f0-0 (analog-input (the-as int (+ (-> *cpad-list* cpads 0 rightx) -128)) 0.0 48.0 110.0 -1.0))
|
||||
(f0-1 (* -546.13336 f0-0))
|
||||
(f0-3 (fmin 546.13336 (fmax -546.13336 f0-1)))
|
||||
)
|
||||
(matrix-axis-angle! s5-0 (-> *camera* local-down) f0-3)
|
||||
(let ((s5-0 (new-stack-matrix0))
|
||||
(gp-0 (vector-reset! (new 'stack-no-clear 'vector)))
|
||||
)
|
||||
(vector-! gp-0 (-> self trans) (-> *camera* tpos-curr))
|
||||
(vector-matrix*! gp-0 gp-0 s5-0)
|
||||
(vector+! (-> self trans) gp-0 (-> *camera* tpos-curr))
|
||||
(let* ((f0-0 (analog-input (the-as int (+ (-> *cpad-list* cpads 0 rightx) -128)) 0.0 48.0 110.0 -1.0))
|
||||
(f0-1 (* -546.13336 f0-0))
|
||||
(f0-3 (fmin 546.13336 (fmax -546.13336 f0-1)))
|
||||
)
|
||||
(matrix-axis-angle! s5-0 (-> *camera* local-down) f0-3)
|
||||
)
|
||||
(vector-! gp-0 (-> self trans) (-> *camera* tpos-curr))
|
||||
(vector-matrix*! gp-0 gp-0 s5-0)
|
||||
(vector+! (-> self trans) gp-0 (-> *camera* tpos-curr))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2466,7 +2447,7 @@
|
||||
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
|
||||
(vector-flatten! gp-0 (-> self tracking inv-mat fvec) (-> *camera* local-down))
|
||||
(vector-normalize! gp-0 1.0)
|
||||
(set! (-> self pivot-pt quad) (-> gp-0 quad))
|
||||
(vector-copy! (-> self pivot-pt) gp-0)
|
||||
(vector+float*! gp-0 gp-0 (-> *camera* local-down) 1000.0)
|
||||
(vector-normalize-copy! (-> self tracking inv-mat fvec) gp-0 1.0)
|
||||
)
|
||||
@@ -2504,11 +2485,7 @@
|
||||
|
||||
(defbehavior cam-launcher-long-joystick camera-slave ()
|
||||
(when (not (logtest? (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(let ((gp-0 (new 'stack-no-clear 'matrix)))
|
||||
(set! (-> gp-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> gp-0 trans quad) (the-as uint128 0))
|
||||
(let ((gp-0 (new-stack-matrix0)))
|
||||
(let* ((f0-0 (analog-input (the-as int (+ (-> *cpad-list* cpads 0 rightx) -128)) 0.0 48.0 110.0 -1.0))
|
||||
(f0-1 (* -546.13336 f0-0))
|
||||
(f0-3 (fmin 546.13336 (fmax -546.13336 f0-1)))
|
||||
@@ -2722,6 +2699,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this launcher) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
|
||||
@@ -2803,7 +2781,7 @@
|
||||
)
|
||||
(set! (-> self root) s2-0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
|
||||
(set-vector! (-> self root quat) 0.0 0.0 0.0 1.0)
|
||||
(update-transforms (the-as collide-shape (-> self root)))
|
||||
@@ -2930,9 +2908,10 @@
|
||||
)
|
||||
)
|
||||
(if a0-6
|
||||
(set! (-> (the-as collide-shape (-> self root)) trans quad)
|
||||
(-> (the-as collide-shape a0-6) root-prim prim-core world-sphere quad)
|
||||
)
|
||||
(vector-copy!
|
||||
(-> (the-as collide-shape (-> self root)) trans)
|
||||
(-> (the-as collide-shape a0-6) root-prim prim-core world-sphere)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2994,7 +2973,7 @@
|
||||
(set! (-> s4-0 event-self) 'touched)
|
||||
(set! (-> self root) s4-0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(set! (-> self duration) arg2)
|
||||
(set! (-> self target) (the-as handle #f))
|
||||
(set! (-> self event) #f)
|
||||
@@ -3031,7 +3010,7 @@
|
||||
(set! (-> self root) s5-0)
|
||||
)
|
||||
(set! (-> (the-as collide-shape (-> self root)) event-self) 'touched)
|
||||
(set! (-> self root trans quad) (-> arg0 spawn-point quad))
|
||||
(vector-copy! (-> self root trans) (-> arg0 spawn-point))
|
||||
(quaternion-copy! (-> self root quat) (-> arg0 spawn-quat))
|
||||
(vector-identity! (-> self root scale))
|
||||
(vector-float*! (-> self root scale) (-> self root scale) (-> arg0 scale))
|
||||
@@ -3144,9 +3123,10 @@
|
||||
(case message
|
||||
(('touched)
|
||||
(let ((s4-0 (new 'stack-no-clear 'mystery-cquery-type0)))
|
||||
(set! (-> s4-0 explosion-trans quad)
|
||||
(-> (the-as collide-shape (-> self root)) root-prim prim-core world-sphere quad)
|
||||
)
|
||||
(vector-copy!
|
||||
(-> 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
|
||||
@@ -3163,7 +3143,7 @@
|
||||
)
|
||||
(cond
|
||||
(v1-6
|
||||
(set! (-> s4-0 proc-trans quad) (-> v1-6 prim-core world-sphere quad))
|
||||
(vector-copy! (-> s4-0 proc-trans) (-> v1-6 prim-core world-sphere))
|
||||
)
|
||||
((begin
|
||||
(let ((s2-2 proc))
|
||||
@@ -3174,7 +3154,7 @@
|
||||
)
|
||||
a0-13
|
||||
)
|
||||
(set! (-> s4-0 proc-trans quad) (-> (get-trans (the-as process-focusable a0-13) 3) quad))
|
||||
(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))
|
||||
@@ -3184,8 +3164,8 @@
|
||||
)
|
||||
)
|
||||
(if v1-12
|
||||
(set! (-> s4-0 proc-trans quad) (-> v1-12 root-prim prim-core world-sphere quad))
|
||||
(set! (-> s4-0 proc-trans quad) (-> (the-as process-focusable s3-0) root trans quad))
|
||||
(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))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3195,7 +3175,7 @@
|
||||
(set! (-> s4-0 dist) (fmax 0.0 (- (-> s4-0 dist) (-> s4-0 proc-trans w))))
|
||||
(set! (-> s4-0 probe) -1.0)
|
||||
(when (< 0.0 (-> s4-0 dist))
|
||||
(set! (-> s4-0 cquery start-pos quad) (-> s4-0 explosion-trans quad))
|
||||
(vector-copy! (-> s4-0 cquery start-pos) (-> s4-0 explosion-trans))
|
||||
(vector-! (-> s4-0 cquery move-dist) (-> s4-0 proc-trans) (-> s4-0 explosion-trans))
|
||||
(let ((v1-23 (-> s4-0 cquery)))
|
||||
(set! (-> v1-23 radius) 40.96)
|
||||
@@ -3318,6 +3298,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this simple-prim) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(allocate-trans-and-strip! this)
|
||||
(process-entity-set! this arg0)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
@@ -3360,8 +3341,8 @@
|
||||
|
||||
(defbehavior simple-prim-init-by-other simple-prim ((arg0 vector) (arg1 vector) (arg2 texture-id))
|
||||
(allocate-trans-and-strip! self)
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! (-> self root scale quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(vector-copy! (-> self root scale) arg1)
|
||||
(set! (-> self strip tex-id) arg2)
|
||||
(go-virtual active)
|
||||
)
|
||||
@@ -3415,7 +3396,7 @@
|
||||
(let ((v1-8 (-> this strip data)))
|
||||
(vector+! s4-0 (-> this root trans) s2-0)
|
||||
(vector+! s4-0 s4-0 s3-0)
|
||||
(set! (-> v1-8 0 pos quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> v1-8 0 pos) s4-0)
|
||||
(set! (-> v1-8 0 stq z) 0.0)
|
||||
(set! (-> v1-8 0 stq x) 0.0)
|
||||
(set! (-> v1-8 0 stq y) 0.0)
|
||||
@@ -3424,7 +3405,7 @@
|
||||
(let ((v1-9 (-> v1-8 1)))
|
||||
(vector+float*! s4-0 (-> this root trans) s2-0 -1.0)
|
||||
(vector+! s4-0 s4-0 s3-0)
|
||||
(set! (-> v1-9 pos quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> v1-9 pos) s4-0)
|
||||
(set! (-> v1-9 stq z) 0.0)
|
||||
(set! (-> v1-9 stq x) 1.0)
|
||||
(set! (-> v1-9 stq y) 0.0)
|
||||
@@ -3433,7 +3414,7 @@
|
||||
(let ((v1-10 (&+ v1-9 32)))
|
||||
(vector+! s4-0 (-> this root trans) s2-0)
|
||||
(vector+float*! s4-0 s4-0 s3-0 -1.0)
|
||||
(set! (-> v1-10 pos quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> v1-10 pos) s4-0)
|
||||
(set! (-> v1-10 stq z) 0.0)
|
||||
(set! (-> v1-10 stq x) 0.0)
|
||||
(set! (-> v1-10 stq y) 1.0)
|
||||
@@ -3442,7 +3423,7 @@
|
||||
(let ((v1-11 (&+ v1-10 32)))
|
||||
(vector+float*! s4-0 (-> this root trans) s2-0 -1.0)
|
||||
(vector+float*! s4-0 s4-0 s3-0 -1.0)
|
||||
(set! (-> v1-11 pos quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> v1-11 pos) s4-0)
|
||||
(set! (-> v1-11 stq z) 0.0)
|
||||
(set! (-> v1-11 stq x) 1.0)
|
||||
(set! (-> v1-11 stq y) 1.0)
|
||||
@@ -3618,6 +3599,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this part-controller) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(local-vars (sv-16 res-tag) (sv-32 string))
|
||||
(stack-size-set! (-> this main-thread) 32)
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
@@ -3712,7 +3694,7 @@
|
||||
(sound-play-by-name (-> self spawn-sound) (new-sound-id) 1024 0 0 (sound-group) gp-1)
|
||||
(cond
|
||||
((logtest? (-> self particle-launchers (-> self current-part-index) 0 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) gp-1)
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to *entity-pool*
|
||||
@@ -3720,7 +3702,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> gp-1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) gp-1)
|
||||
(part-tracker-spawn
|
||||
part-tracker
|
||||
:to *entity-pool*
|
||||
@@ -3751,6 +3733,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this sound-controller) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(stack-size-set! (-> this main-thread) 32)
|
||||
(let ((a0-3 (the-as string ((method-of-type res-lump get-property-struct)
|
||||
arg0
|
||||
@@ -3766,7 +3749,7 @@
|
||||
)
|
||||
(set! (-> this spawn-sound) (string->sound-name a0-3))
|
||||
)
|
||||
(set! (-> this pos quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> this pos) (-> arg0 extra trans))
|
||||
(let ((a1-3 (new 'stack-no-clear 'sync-info-params)))
|
||||
(let ((v1-5 0))
|
||||
(if #f
|
||||
@@ -3859,6 +3842,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this sound-on-path) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(stack-size-set! (-> this main-thread) 32)
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
@@ -3936,7 +3920,7 @@
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(get-point-at-percent-along-path! (-> self path) gp-1 f0-0 'interp)
|
||||
(set! (-> self root trans quad) (-> gp-1 quad))
|
||||
(vector-copy! (-> self root trans) gp-1)
|
||||
(cond
|
||||
((-> self is-spooling?)
|
||||
(case (get-status *gui-control* (the-as sound-id (-> self loop-sound)))
|
||||
@@ -3978,19 +3962,22 @@
|
||||
(set-setting! 'mode-name 'cam-fixed 0.0 0)
|
||||
(set-setting! 'interp-time 'abs 450.0 0)
|
||||
(set-setting! 'entity-name (res-lump-struct (-> self entity) 'camera-name structure) 0.0 0)
|
||||
(suspend-for (-> self pause-time))
|
||||
(suspend-for (-> self pause-time)
|
||||
)
|
||||
(if (-> self blur)
|
||||
(set-setting! 'blur-a 'abs 0.5 0)
|
||||
)
|
||||
(remove-setting! 'mode-name)
|
||||
(remove-setting! 'entity-name)
|
||||
(remove-setting! 'interp-time)
|
||||
(suspend-for (seconds 0.5))
|
||||
(suspend-for (seconds 0.5)
|
||||
)
|
||||
(while (not (process-release? *target*))
|
||||
(suspend)
|
||||
)
|
||||
(remove-setting! 'interp-time)
|
||||
(suspend-for (seconds 0.5))
|
||||
(suspend-for (seconds 0.5)
|
||||
)
|
||||
(remove-setting! 'blur-a)
|
||||
(process-entity-status! self (entity-perm-status no-kill) #f)
|
||||
)
|
||||
@@ -4015,6 +4002,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this level-exit) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(set! (-> this minimap) #f)
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
(a1-4 (-> *part-id-table* 855))
|
||||
(a2-2 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-2 trans quad) (-> v1-2 quad))
|
||||
(vector-copy! (-> a2-2 trans) v1-2)
|
||||
(t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
0
|
||||
@@ -377,7 +377,7 @@
|
||||
(f28-1 (-> *part-id-table* 853 init-specs 4 initial-valuef))
|
||||
)
|
||||
(forward-up->inv-matrix s4-1 s5-1 *up-vector*)
|
||||
(set! (-> s4-1 trans quad) (-> gp-0 quad))
|
||||
(vector-copy! (-> s4-1 trans) gp-0)
|
||||
(set! (-> *part-id-table* 853 init-specs 3 initial-valuef) (* f26-0 f30-1))
|
||||
(set! (-> *part-id-table* 853 init-specs 4 initial-valuef) (* f26-0 f28-1))
|
||||
(launch-particles (-> *part-id-table* 853) s4-1 :origin-is-matrix #t)
|
||||
@@ -395,27 +395,27 @@
|
||||
(a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> s5-0 trans)) 2048.0))
|
||||
(v1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> v1-1 quad) (-> s5-0 trans quad))
|
||||
(vector-copy! v1-1 (-> s5-0 trans))
|
||||
(vector+! v1-1 v1-1 a0-3)
|
||||
(cond
|
||||
((-> this hit-actor?)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) v1-1)
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) v1-1)
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 211))
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> *part-group-id-table* 212 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) v1-1)
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) v1-1)
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212))
|
||||
)
|
||||
)
|
||||
@@ -575,7 +575,7 @@
|
||||
|
||||
(defmethod init-proj-settings! ((this guard-shot))
|
||||
(set! (-> this hit-actor?) #f)
|
||||
(set! (-> this tail-pos quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this tail-pos) (-> this root trans))
|
||||
(set! (-> this attack-mode) 'guard-shot)
|
||||
(set! (-> this max-speed) 819200.0)
|
||||
(set! (-> this move) guard-shot-move)
|
||||
@@ -607,8 +607,8 @@
|
||||
)
|
||||
(set! (-> gp-0 timeout) (seconds 4))
|
||||
(if arg4
|
||||
(set! (-> gp-0 pos quad) (-> arg4 quad))
|
||||
(set! (-> gp-0 pos quad) (-> arg1 quad))
|
||||
(vector-copy! (-> gp-0 pos) arg4)
|
||||
(vector-copy! (-> gp-0 pos) arg1)
|
||||
)
|
||||
(vector-normalize-copy! (-> gp-0 vel) v1-1 arg3)
|
||||
)
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
(a1-4 (-> *part-id-table* 867))
|
||||
(a2-2 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-2 trans quad) (-> v1-2 quad))
|
||||
(vector-copy! (-> a2-2 trans) v1-2)
|
||||
(t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
0
|
||||
@@ -372,7 +372,7 @@
|
||||
(f28-1 (-> *part-id-table* 865 init-specs 5 initial-valuef))
|
||||
)
|
||||
(forward-up->inv-matrix s4-1 s5-1 *up-vector*)
|
||||
(set! (-> s4-1 trans quad) (-> gp-0 quad))
|
||||
(vector-copy! (-> s4-1 trans) gp-0)
|
||||
(set! (-> *part-id-table* 865 init-specs 3 initial-valuef) (* f26-0 f30-1))
|
||||
(set! (-> *part-id-table* 865 init-specs 5 initial-valuef) (* f26-0 f28-1))
|
||||
(launch-particles (-> *part-id-table* 865) s4-1 :origin-is-matrix #t)
|
||||
@@ -390,15 +390,15 @@
|
||||
(a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0))
|
||||
(v1-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> v1-2 quad) (-> gp-0 trans quad))
|
||||
(vector-copy! v1-2 (-> gp-0 trans))
|
||||
(vector+! v1-2 v1-2 a0-3)
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 214 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-2 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) v1-2)
|
||||
(part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 214))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-2 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) v1-2)
|
||||
(part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 214))
|
||||
)
|
||||
)
|
||||
@@ -511,7 +511,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-proj-settings! ((this metalhead-shot))
|
||||
(set! (-> this tail-pos quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this tail-pos) (-> this root trans))
|
||||
(set! (-> this attack-mode) 'metalhead-shot)
|
||||
(set! (-> this max-speed) 532480.0)
|
||||
(set! (-> this move) metalhead-shot-move)
|
||||
@@ -540,7 +540,7 @@
|
||||
(set! (-> gp-0 attack-id) a2-12)
|
||||
)
|
||||
(set! (-> gp-0 timeout) (seconds 4))
|
||||
(set! (-> gp-0 pos quad) (-> arg1 quad))
|
||||
(vector-copy! (-> gp-0 pos) arg1)
|
||||
(vector-normalize-copy! (-> gp-0 vel) v1-1 arg3)
|
||||
)
|
||||
(the-as (pointer metalhead-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*))
|
||||
@@ -639,11 +639,11 @@
|
||||
(defmethod projectile-method-26 ((this metalhead-grenade-shot))
|
||||
(cond
|
||||
((logtest? (-> *part-group-id-table* 104 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> this root trans))
|
||||
(part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 104))
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> this root trans))
|
||||
(part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 104))
|
||||
)
|
||||
)
|
||||
@@ -693,7 +693,7 @@
|
||||
(a1-3 (new 'stack 'collide-query))
|
||||
)
|
||||
0.0
|
||||
(set! (-> a1-3 start-pos quad) (-> self root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> a1-3 start-pos) (-> self root root-prim prim-core world-sphere))
|
||||
(vector-! (-> a1-3 move-dist) (the-as vector (-> s4-1 root-prim prim-core)) (-> a1-3 start-pos))
|
||||
(let ((v1-6 a1-3))
|
||||
(set! (-> v1-6 radius) 40.96)
|
||||
@@ -876,7 +876,7 @@
|
||||
(set! (-> gp-0 attack-id) a2-12)
|
||||
)
|
||||
(set! (-> gp-0 timeout) (seconds 4))
|
||||
(set! (-> gp-0 pos quad) (-> arg1 quad))
|
||||
(vector-copy! (-> gp-0 pos) arg1)
|
||||
(vector-normalize-copy! (-> gp-0 vel) v1-1 arg3)
|
||||
)
|
||||
(the-as (pointer metalhead-grenade-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*))
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
(set! (-> a3-0 y) 40960.0)
|
||||
(set! (-> a3-0 z) 0.0)
|
||||
(set! (-> a3-0 w) 1.0)
|
||||
(set! (-> v1-1 quad) (-> a3-0 quad))
|
||||
(vector-copy! v1-1 a3-0)
|
||||
)
|
||||
(t9-0 a0-0 a1-0 a2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this plat) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(logior! (-> this mask) (process-mask platform))
|
||||
(init-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
@@ -235,13 +236,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self hit-point quad) (-> self root trans quad))
|
||||
(vector-copy! (-> self hit-point) (-> self root trans))
|
||||
(let ((a0-13 (if (type? proc process-focusable)
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self hit-point quad) (-> (get-trans (the-as process-focusable a0-13) 0) quad))
|
||||
(vector-copy! (-> self hit-point) (get-trans (the-as process-focusable a0-13) 0))
|
||||
)
|
||||
(if (zero? (-> self bounce-time))
|
||||
(start-bounce! self)
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
(let ((s1-1 (process->handle arg0))
|
||||
(s2-1 (process->handle arg1))
|
||||
)
|
||||
(suspend-for
|
||||
(+ arg3 arg4)
|
||||
(suspend-for (+ arg3 arg4)
|
||||
(let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1)))))
|
||||
(if v1-8
|
||||
(deactivate self)
|
||||
@@ -47,8 +46,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(suspend-for
|
||||
arg5
|
||||
(suspend-for arg5
|
||||
(let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0))))
|
||||
(arg2 a0-21)
|
||||
)
|
||||
@@ -550,9 +548,7 @@
|
||||
)
|
||||
(s2-0 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s2-0 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-0)) quad)
|
||||
)
|
||||
(vector-copy! (-> s2-0 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-0)))
|
||||
(gp-1 s5-0 s4-0 s2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(dotimes (gp-2 2)
|
||||
@@ -562,9 +558,7 @@
|
||||
(s3-1 (-> *part-id-table* 800))
|
||||
(s1-1 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s1-1 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-58)) quad)
|
||||
)
|
||||
(vector-copy! (-> s1-1 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-58)))
|
||||
(s5-1 s4-1 s3-1 s1-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
@@ -592,9 +586,7 @@
|
||||
)
|
||||
(s2-2 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s2-2 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-2)) quad)
|
||||
)
|
||||
(vector-copy! (-> s2-2 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-2)))
|
||||
(gp-3 s5-2 s4-2 s2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(dotimes (gp-4 2)
|
||||
@@ -604,9 +596,7 @@
|
||||
(s3-3 (-> *part-id-table* 804))
|
||||
(s1-3 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s1-3 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-91)) quad)
|
||||
)
|
||||
(vector-copy! (-> s1-3 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-91)))
|
||||
(s5-3 s4-3 s3-3 s1-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
@@ -653,9 +643,7 @@
|
||||
(s4-7 (-> *part-id-table* 789))
|
||||
(s2-7 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s2-7 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-128)) quad)
|
||||
)
|
||||
(vector-copy! (-> s2-7 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-128)))
|
||||
(gp-7 s5-7 s4-7 s2-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 0 1 (seconds 0.1))
|
||||
@@ -673,9 +661,7 @@
|
||||
)
|
||||
(s2-8 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s2-8 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-6)) quad)
|
||||
)
|
||||
(vector-copy! (-> s2-8 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-6)))
|
||||
(gp-8 s5-8 s4-8 s2-8 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(dotimes (gp-9 2)
|
||||
@@ -685,9 +671,7 @@
|
||||
(s3-9 (-> *part-id-table* 808))
|
||||
(s1-7 *launch-matrix*)
|
||||
)
|
||||
(set! (-> s1-7 trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-152)) quad)
|
||||
)
|
||||
(vector-copy! (-> s1-7 trans) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-152)))
|
||||
(s5-9 s4-9 s3-9 s1-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
(let ((gp-0 (-> arg0 root)))
|
||||
(let ((a1-0 (new 'stack-no-clear 'collide-query)))
|
||||
(let ((a2-0 (-> gp-0 root-prim)))
|
||||
(set! (-> a1-0 start-pos quad) (-> gp-0 trans quad))
|
||||
(vector-copy! (-> a1-0 start-pos) (-> gp-0 trans))
|
||||
(let ((v1-1 (-> a1-0 move-dist)))
|
||||
(.lvf vf1 (&-> (-> gp-0 transv) quad))
|
||||
(let ((f0-0 (seconds-per-frame)))
|
||||
@@ -300,9 +300,9 @@
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (-> self root)))
|
||||
(set! (-> self pre-move-transv quad) (-> gp-0 transv quad))
|
||||
(vector-copy! (-> self pre-move-transv) (-> gp-0 transv))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> gp-0 trans quad))
|
||||
(vector-copy! s5-0 (-> gp-0 trans))
|
||||
((-> self move) self)
|
||||
(projectile-method-39 self)
|
||||
(set! (-> self old-dist (-> self old-dist-count)) (* 0.0625 (vector-vector-distance s5-0 (-> gp-0 trans))))
|
||||
@@ -471,7 +471,7 @@
|
||||
(set! (-> self pick-target) #f)
|
||||
(set! (-> self stop-speed) 204.8)
|
||||
(set! (-> self desired-target) (-> arg0 target-handle))
|
||||
(set! (-> self desired-target-pos quad) (-> arg0 target-pos quad))
|
||||
(vector-copy! (-> self desired-target-pos) (-> arg0 target-pos))
|
||||
(countdown (v1-29 16)
|
||||
(set! (-> self old-dist v1-29) 4095996000.0)
|
||||
)
|
||||
@@ -496,12 +496,12 @@
|
||||
;; of the address, loading a junk value instead.
|
||||
(quaternion-copy! (-> s5-0 quat) (the quaternion (logand (the int (-> self parent 0 root quat)) #xffffffff0)))
|
||||
(vector-identity! (-> s5-0 scale))
|
||||
(set! (-> s5-0 transv quad) (-> arg0 vel quad))
|
||||
(set! (-> self pre-move-transv quad) (-> arg0 vel quad))
|
||||
(vector-copy! (-> s5-0 transv) (-> arg0 vel))
|
||||
(vector-copy! (-> self pre-move-transv) (-> arg0 vel))
|
||||
(vector-normalize-copy! (-> self starting-dir) (-> arg0 vel) 1.0)
|
||||
(vector+float*! (-> self base-target-pos) (-> s5-0 trans) (-> self starting-dir) 2048000.0)
|
||||
)
|
||||
(set! (-> self target-pos quad) (-> self base-target-pos quad))
|
||||
(vector-copy! (-> self target-pos) (-> self base-target-pos))
|
||||
(set! (-> self event-hook) projectile-event-handler)
|
||||
(init-proj-settings! self)
|
||||
(update-transforms (-> self root))
|
||||
@@ -537,7 +537,7 @@
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(projectile-bounce-update-velocity self)
|
||||
(set! (-> s5-0 quad) (-> gp-0 trans quad))
|
||||
(vector-copy! s5-0 (-> gp-0 trans))
|
||||
(vector-v++! s5-0 (-> gp-0 transv))
|
||||
(when (find-ground
|
||||
gp-0
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
(when (cpad-pressed? 0 l2)
|
||||
(cond
|
||||
((-> self entity)
|
||||
(set! (-> self root trans quad) (-> self entity trans quad))
|
||||
(vector-copy! (-> self root trans) (-> self entity trans))
|
||||
)
|
||||
(else
|
||||
(vector-reset! (-> self root trans))
|
||||
@@ -295,9 +295,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)) trans quad)
|
||||
(-> self root trans quad)
|
||||
)
|
||||
(vector-copy!
|
||||
(-> (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)) trans)
|
||||
(-> self root trans)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja :num! (loop!))
|
||||
@@ -331,7 +332,7 @@
|
||||
(set! (-> s5-0 event-self) 'touched)
|
||||
(set! (-> self root) s5-0)
|
||||
)
|
||||
(set! (-> self root trans quad) (-> arg0 orient-tform quad))
|
||||
(vector-copy! (-> self root trans) (-> arg0 orient-tform))
|
||||
(initialize-skeleton
|
||||
self
|
||||
(the-as skeleton-group (art-group-get-by-name *level* "skel-ragdoll-test" (the-as (pointer level) #f)))
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
(let ((v1-1 (the-as object (-> arg3 param 0))))
|
||||
(when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)))
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-contact-force))
|
||||
(set! (-> this player-force-position quad) (-> (the-as rigid-body-control-point v1-1) velocity quad))
|
||||
(vector-copy! (-> this player-force-position) (-> (the-as rigid-body-control-point v1-1) velocity))
|
||||
(vector-reset! (-> this player-force))
|
||||
(set! (-> this player-force y) (* -1.0 (-> this info player-weight)))
|
||||
)
|
||||
@@ -218,7 +218,7 @@
|
||||
)
|
||||
(when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)))
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-contact-force))
|
||||
(set! (-> this player-force-position quad) (-> (the-as process-focusable v1-11) root trans quad))
|
||||
(vector-copy! (-> this player-force-position) (-> (the-as process-focusable v1-11) root trans))
|
||||
(vector-reset! (-> this player-force))
|
||||
(let* ((a1-5 (-> this player-force-position))
|
||||
(f30-0 0.0)
|
||||
@@ -247,7 +247,7 @@
|
||||
)
|
||||
(when v1-31
|
||||
(logior! (-> this flags) (rigid-body-object-flag player-impulse-force))
|
||||
(set! (-> this player-force-position quad) (-> (the-as process-focusable v1-31) root trans quad))
|
||||
(vector-copy! (-> this player-force-position) (-> (the-as process-focusable v1-31) root trans))
|
||||
(let ((f0-14 (fmin
|
||||
(* 0.00012207031
|
||||
(the-as float (-> arg3 param 1))
|
||||
@@ -297,7 +297,7 @@
|
||||
(the-as (function rigid-body-object float) (method-of-object this apply-gravity!))
|
||||
)
|
||||
(set-time! (-> this player-bonk-timeout))
|
||||
(set! (-> this player-force quad) (-> *null-vector* quad))
|
||||
(vector-copy! (-> this player-force) *null-vector*)
|
||||
(set! (-> this root max-iteration-count) (the-as uint 4))
|
||||
(set! (-> this max-time-step) (-> arg0 extra max-time-step))
|
||||
(set! (-> this water-anim) (entity-actor-lookup (-> this entity) 'water-actor 0))
|
||||
@@ -388,6 +388,7 @@
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod init-from-entity! ((this rigid-body-platform) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(logior! (-> this mask) (process-mask platform))
|
||||
(init-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
(set! (-> self sphere-size) (-> arg0 sphere-size))
|
||||
(set! (-> self owner) (-> arg0 owner))
|
||||
(set! (-> self track-joint) (-> arg0 track-joint))
|
||||
(set! (-> self offset-vec quad) (-> arg0 offset-vec quad))
|
||||
(vector-copy! (-> self offset-vec) (-> arg0 offset-vec))
|
||||
(init-collision! self)
|
||||
(initialize-skeleton
|
||||
self
|
||||
@@ -666,7 +666,7 @@
|
||||
:trans (behavior ()
|
||||
(let ((v1-1 (handle->process (-> self owner))))
|
||||
(when v1-1
|
||||
(set! (-> self root trans quad) (-> (the-as process-drawable v1-1) root trans quad))
|
||||
(vector-copy! (-> self root trans) (-> (the-as process-drawable v1-1) root trans))
|
||||
(quaternion-copy! (-> self root quat) (-> (the-as process-drawable v1-1) root quat))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
)
|
||||
(set! (-> this root) s3-0)
|
||||
)
|
||||
(set! (-> this root trans quad) (-> arg0 extra trans quad))
|
||||
(vector-copy! (-> this root trans) (-> arg0 extra trans))
|
||||
(update-transforms (-> this root))
|
||||
(set! (-> this root pause-adjust-distance) 409600.0)
|
||||
(set! (-> this fact) (new 'process 'fact-info this arg1 (-> *FACT-bank* eco-full-inc)))
|
||||
@@ -214,7 +214,7 @@
|
||||
(when v1-9
|
||||
(cond
|
||||
((logtest? (-> self collect-effect flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-9 root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> v1-9 root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to gp-0
|
||||
@@ -223,13 +223,13 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> v1-9 root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> v1-9 root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn part-tracker :to gp-0 :group (-> self collect-effect) :callback part-tracker-track-target)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> self collect-effect2 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to self
|
||||
@@ -238,7 +238,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) (-> self root root-prim prim-core world-sphere))
|
||||
(part-tracker-spawn
|
||||
part-tracker
|
||||
:to self
|
||||
@@ -265,6 +265,7 @@
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this ecovent) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(init! this arg0 (pickup-type eco-green))
|
||||
)
|
||||
|
||||
@@ -413,6 +414,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this light-eco-vent) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
|
||||
(set! (-> s4-0 total-prims) (the-as uint 4))
|
||||
@@ -618,6 +620,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this dark-eco-vent) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
|
||||
(set! (-> s4-0 total-prims) (the-as uint 4))
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
(defmethod get-track-pt-and-scale ((this remote) (arg0 vector))
|
||||
(let ((s4-0 (handle->process (-> this focus handle))))
|
||||
(when s4-0
|
||||
(set! (-> arg0 quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad))
|
||||
(vector-copy! arg0 (get-trans (the-as process-focusable s4-0) 3))
|
||||
(let ((a0-7 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s4-0) 0))))
|
||||
(vector+float*! arg0 arg0 a0-7 (* -16384.0 (- 1.0 (-> this blend))))
|
||||
)
|
||||
@@ -152,10 +152,10 @@
|
||||
(let ((gp-0 (handle->process (-> self focus handle)))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> self parent 0 trans quad))
|
||||
(vector-copy! s5-0 (-> self parent 0 trans))
|
||||
(let ((f30-0 (get-track-pt-and-scale self s5-0)))
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> self parent 0 trans quad))
|
||||
(vector-copy! a1-2 (-> self parent 0 trans))
|
||||
(vector-lerp! (-> self root trans) a1-2 s5-0 (-> self blend))
|
||||
)
|
||||
(+! (-> self root trans y) (* 1638.4 (sin (* 54.613335 (the float (mod (current-time) 1200))))))
|
||||
@@ -230,7 +230,7 @@
|
||||
)
|
||||
)
|
||||
(if a1-1
|
||||
(try-update-focus (-> self focus) (the-as process-focusable a1-1))
|
||||
(focus-on! (-> self focus) (the-as process-focusable a1-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -367,8 +367,8 @@
|
||||
(defbehavior voicebox-init-by-other voicebox ((arg0 vector) (arg1 handle))
|
||||
(set! (-> self hint) arg1)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! (-> self base-trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(vector-copy! (-> self base-trans) arg0)
|
||||
(init self)
|
||||
(set! (-> self event-hook) (-> (method-of-object self enter) event))
|
||||
(go-virtual enter)
|
||||
@@ -415,7 +415,7 @@
|
||||
|
||||
|
||||
(defmethod get-track-pt-and-scale ((this judge) (arg0 vector))
|
||||
(set! (-> arg0 quad) (-> this base-trans quad))
|
||||
(vector-copy! arg0 (-> this base-trans))
|
||||
1.0
|
||||
)
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
)
|
||||
(when s4-0
|
||||
(change-parent self (ppointer->process s4-0))
|
||||
(try-update-focus (-> self focus) (the-as process-focusable s5-2))
|
||||
(focus-on! (-> self focus) (the-as process-focusable s5-2))
|
||||
(go-virtual enter)
|
||||
)
|
||||
)
|
||||
@@ -573,11 +573,12 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this judge) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(setup-collision! this)
|
||||
(init this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(+! (-> this root trans y) 4096.0)
|
||||
(set! (-> this base-trans quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this base-trans) (-> this root trans))
|
||||
(set! (-> this total-time) (seconds 90))
|
||||
(go (method-of-object this wait))
|
||||
)
|
||||
@@ -589,8 +590,8 @@
|
||||
(init self)
|
||||
(vector-identity! (-> self root scale))
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! (-> self base-trans quad) (-> self root trans quad))
|
||||
(vector-copy! (-> self root trans) arg0)
|
||||
(vector-copy! (-> self base-trans) (-> self root trans))
|
||||
(set! (-> self total-time) (seconds 90))
|
||||
(set! (-> self timer?) arg2)
|
||||
(go-virtual wait)
|
||||
|
||||
@@ -650,7 +650,7 @@
|
||||
(set! (-> s5-0 message) 'change-state)
|
||||
(set! (-> s5-0 param 0) (the-as uint target-warp-out))
|
||||
(let ((v1-22 (new 'static 'vector)))
|
||||
(set! (-> v1-22 quad) (-> self center quad))
|
||||
(vector-copy! v1-22 (-> self center))
|
||||
(set! (-> s5-0 param 1) (the-as uint v1-22))
|
||||
)
|
||||
(set! (-> s5-0 param 2) (the-as uint (target-pos 0)))
|
||||
@@ -659,22 +659,21 @@
|
||||
)
|
||||
(script-eval (-> self on-activate))
|
||||
(while (begin
|
||||
(set! v1-38
|
||||
(when (-> self wait-for)
|
||||
(let* ((s5-1 (-> self wait-for))
|
||||
(a1-8 (car s5-1))
|
||||
)
|
||||
(while (not (null? s5-1))
|
||||
(when (not (member (status-of-level-and-borrows *level* (the-as symbol a1-8) #f) '(loaded active)))
|
||||
(set! v1-38 #t)
|
||||
(goto cfg-21)
|
||||
(set! v1-38 (when (-> self wait-for)
|
||||
(let* ((s5-1 (-> self wait-for))
|
||||
(a1-8 (car s5-1))
|
||||
)
|
||||
(while (not (null? s5-1))
|
||||
(when (not (member (level-status? *level* (the-as symbol a1-8) #f) '(loaded active)))
|
||||
(set! v1-38 #t)
|
||||
(goto cfg-21)
|
||||
)
|
||||
(set! s5-1 (cdr s5-1))
|
||||
(set! a1-8 (car s5-1))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(set! s5-1 (cdr s5-1))
|
||||
(set! a1-8 (car s5-1))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(label cfg-21)
|
||||
(or v1-38 (not (time-elapsed? (-> self state-time) (seconds 2))))
|
||||
@@ -688,7 +687,8 @@
|
||||
(set-blackout-frames (seconds 0.05))
|
||||
)
|
||||
(start 'play arg0)
|
||||
(suspend-for (seconds 1))
|
||||
(suspend-for (seconds 1)
|
||||
)
|
||||
(while (and *target* (and (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
@@ -738,7 +738,7 @@
|
||||
(set! (-> this continue) #f)
|
||||
(set! (-> this on-close) #f)
|
||||
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 202) this))
|
||||
(set! (-> this center quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this center) (-> this root trans))
|
||||
(+! (-> this center y) 13516.8)
|
||||
(set! (-> this sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "warpgate" :group 0 :fo-max 30) (-> this root trans) 0.0)
|
||||
@@ -755,7 +755,7 @@
|
||||
(process-drawable-from-entity! self arg0)
|
||||
)
|
||||
(if arg1
|
||||
(set! (-> self root trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg1)
|
||||
)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(init-defaults! self)
|
||||
@@ -765,6 +765,7 @@
|
||||
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod init-from-entity! ((this warp-gate) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(warp-gate-init arg0 (the-as vector #f))
|
||||
)
|
||||
|
||||
@@ -819,14 +820,14 @@
|
||||
(set-time! (-> self state-time))
|
||||
(logclear! (-> self control status) (collide-status on-surface on-ground touch-surface))
|
||||
(set! (-> self control mod-surface) *warp-jump-mods*)
|
||||
(set! (-> self control unknown-vector37 quad) (-> arg0 quad))
|
||||
(set! (-> self control unknown-vector38 quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self control unknown-vector37) arg0)
|
||||
(vector-copy! (-> self control unknown-vector38) arg1)
|
||||
(+! (-> self control unknown-vector37 y) -4096.0)
|
||||
(set! (-> self control unknown-word04) (the-as uint #f))
|
||||
(set! (-> self control unknown-handle02) arg2)
|
||||
(vector-reset! (-> self control transv))
|
||||
(logior! (-> self target-flags) (target-flags tf6))
|
||||
(set! (-> self alt-cam-pos quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self alt-cam-pos) arg1)
|
||||
(forward-up-nopitch->quaternion
|
||||
(-> self control dir-targ)
|
||||
(vector-! (new 'stack-no-clear 'vector) arg1 (-> self control trans))
|
||||
@@ -1155,7 +1156,7 @@
|
||||
(let ((t9-0 (method-of-type warp-gate init-defaults!)))
|
||||
(t9-0 this)
|
||||
)
|
||||
(set! (-> this base-pos quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this base-pos) (-> this root trans))
|
||||
(let ((v1-2 (-> this level-name)))
|
||||
(set! (-> this dust-y) (cond
|
||||
((= v1-2 'nest)
|
||||
@@ -1196,7 +1197,7 @@
|
||||
(let ((f0-9 (-> self dust-y)))
|
||||
(when (!= f0-9 (the-as float #x7f800000))
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> self root trans quad))
|
||||
(vector-copy! a1-2 (-> self root trans))
|
||||
(set! (-> a1-2 y) f0-9)
|
||||
(spawn (-> self part-dust) a1-2)
|
||||
)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
)
|
||||
(('move-to-y)
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> self root trans quad))
|
||||
(vector-copy! a1-2 (-> self root trans))
|
||||
(set! (-> a1-2 y) (the-as float (-> arg3 param 0)))
|
||||
(move-to-point! self a1-2)
|
||||
)
|
||||
@@ -273,7 +273,7 @@
|
||||
)
|
||||
|
||||
(defmethod move-to-point! ((this water-anim) (arg0 vector))
|
||||
(set! (-> this root trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this root trans) arg0)
|
||||
(set! (-> this water-height) (-> this root trans y))
|
||||
(if (nonzero? (-> this sound))
|
||||
(update-trans! (-> this sound) (-> this root trans))
|
||||
@@ -430,6 +430,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this water-anim) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(stub this)
|
||||
(alloc-root! this)
|
||||
(water-anim-init! this)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> arg1 quad))
|
||||
(vector-copy! s5-0 arg1)
|
||||
(set! (-> s5-0 w) 1.0)
|
||||
(when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0)
|
||||
(let* ((s1-0 (-> this sections))
|
||||
@@ -172,7 +172,7 @@
|
||||
(let ((s2-1 (new 'stack-no-clear 'vector))
|
||||
(s1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s2-1 quad) (-> s3-0 pull-dir quad))
|
||||
(vector-copy! s2-1 (-> s3-0 pull-dir))
|
||||
(vector-normalize! s2-1 1.0)
|
||||
(vector-cross! s1-1 s2-1 *y-vector*)
|
||||
(vector-normalize! s1-1 1.0)
|
||||
@@ -218,7 +218,7 @@
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 quad) (-> (get-trans arg0 0) quad))
|
||||
(vector-copy! s5-0 (get-trans arg0 0))
|
||||
(set! (-> s5-0 w) 1.0)
|
||||
(when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0)
|
||||
(let* ((v1-7 (-> this sections))
|
||||
@@ -461,7 +461,7 @@
|
||||
(set! (-> sv-80 speed) (-> this speed))
|
||||
)
|
||||
)
|
||||
(set! (-> sv-80 start quad) (-> s3-0 quad))
|
||||
(vector-copy! (-> sv-80 start) s3-0)
|
||||
(get-point-in-path! s5-0 s3-0 (the float (+ sv-64 1)) 'interp)
|
||||
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
|
||||
(vector-! (-> sv-80 pull-dir) s3-0 (-> sv-80 start))
|
||||
@@ -611,6 +611,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this water-flow) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(set! (-> this root) (the-as collide-shape (new 'process 'trsqv)))
|
||||
(process-drawable-from-entity! (the-as process-drawable this) arg0)
|
||||
(set! (-> this flow) (new 'process 'flow-control (the-as process-drawable this) (the-as res-lump #f)))
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
(set! (-> *water-wake-trail* zbuffer?) #f)
|
||||
|
||||
(set! (-> *water-wake-trail* lie-vector quad) (-> *up-vector* quad))
|
||||
(vector-copy! (-> *water-wake-trail* lie-vector) *up-vector*)
|
||||
|
||||
(set! (-> *water-wake-trail* use-tape-mode?) #t)
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> this base-height) (-> s5-0 base-height))
|
||||
(set! (-> this normal quad) (-> s5-0 normal quad))
|
||||
(vector-copy! (-> this normal) (-> s5-0 normal))
|
||||
(set! (-> this base-ocean-offset) (- (-> s5-0 trans y) (-> s5-0 base-height)))
|
||||
)
|
||||
(cond
|
||||
@@ -256,10 +256,10 @@
|
||||
(logclear! (-> this flags) (water-flag break-surface))
|
||||
)
|
||||
((begin
|
||||
(set! (-> this top 1 quad) (-> this top 0 quad))
|
||||
(vector-copy! (-> this top 1) (-> this top 0))
|
||||
(vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index)))
|
||||
(+! (-> this top 0 y) (-> this top-y-offset))
|
||||
(set! (-> this bottom 1 quad) (-> this bottom 0 quad))
|
||||
(vector-copy! (-> this bottom 1) (-> this bottom 0))
|
||||
(set! (-> this bottom 0 quad) (-> this process control trans quad))
|
||||
(logclear! (-> this flags) (water-flag under-water head-under-water bouncing wading swimming break-surface))
|
||||
(set! (-> this bob-offset) (update! (-> this bob)))
|
||||
@@ -317,7 +317,7 @@
|
||||
(cond
|
||||
((>= (-> this top 0 y) (-> this height))
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-0 quad) (-> this bottom 0 quad))
|
||||
(vector-copy! s3-0 (-> this bottom 0))
|
||||
(let ((v1-82 (-> this process control transv)))
|
||||
(sqrtf (+ (* (-> v1-82 x) (-> v1-82 x)) (* (-> v1-82 z) (-> v1-82 z))))
|
||||
)
|
||||
@@ -345,7 +345,7 @@
|
||||
(s1-0 s0-0 (sv-336 sv-352 a1-11 a2-2) (-> s5-0 normal))
|
||||
)
|
||||
)
|
||||
(set! (-> s2-0 trans quad) (-> s3-0 quad))
|
||||
(vector-copy! (-> s2-0 trans) s3-0)
|
||||
(set! (-> *part-id-table* 762 init-specs 1 initial-valuef) (* 0.000004150391 f30-0))
|
||||
(set! (-> *part-id-table* 762 init-specs 16 initial-valuef) 0.0)
|
||||
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 762) s2-0 :origin-is-matrix #t)
|
||||
@@ -445,7 +445,7 @@
|
||||
(not (logtest? (water-flag jump-out) (-> this flags)))
|
||||
)
|
||||
(let ((v1-191 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-191 quad) (-> this bottom 0 quad))
|
||||
(vector-copy! v1-191 (-> this bottom 0))
|
||||
(set! (-> v1-191 y) (- (-> this height) (-> this swim-height)))
|
||||
(let ((s3-3 (-> this process control)))
|
||||
(when (and (not (logtest? (-> s3-3 status) (collide-status touch-background)))
|
||||
@@ -489,7 +489,7 @@
|
||||
)
|
||||
(logior! (-> this flags) (water-flag swimming))
|
||||
(let ((a1-42 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-42 quad) (-> this bottom 0 quad))
|
||||
(vector-copy! a1-42 (-> this bottom 0))
|
||||
(let ((s4-1 (-> this process control)))
|
||||
(set! (-> a1-42 y) f30-1)
|
||||
(when (not (logtest? (focus-status board pilot) (-> this process focus-status)))
|
||||
@@ -610,7 +610,7 @@
|
||||
(< (-> this height) (-> v0-32 y))
|
||||
)
|
||||
(set! (-> this drip-joint-index) s5-1)
|
||||
(set! (-> this drip-old-pos quad) (-> v0-32 quad))
|
||||
(vector-copy! (-> this drip-old-pos) v0-32)
|
||||
(logior! (-> this flags) (water-flag spawn-drip))
|
||||
)
|
||||
)
|
||||
@@ -696,7 +696,7 @@
|
||||
)
|
||||
(sp-group-flag sp13)
|
||||
)
|
||||
(set! (-> *launch-matrix* trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) arg1)
|
||||
(part-tracker-spawn
|
||||
part-tracker-subsampler
|
||||
:to *entity-pool*
|
||||
@@ -709,7 +709,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> *launch-matrix* trans) arg1)
|
||||
(part-tracker-spawn
|
||||
part-tracker
|
||||
:to *entity-pool*
|
||||
@@ -833,7 +833,7 @@
|
||||
)
|
||||
)
|
||||
(when s1-0
|
||||
(set! (-> arg0 trans quad) (-> arg2 (+ arg3 -1) sphere quad))
|
||||
(vector-copy! (-> arg0 trans) (-> arg2 (+ arg3 -1) sphere))
|
||||
(set-vector! (-> arg0 normal) 0.0 1.0 0.0 1.0)
|
||||
(case (-> (the-as pair (-> (the-as pair s1-0) cdr)) car)
|
||||
(('height)
|
||||
|
||||
@@ -220,8 +220,8 @@
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (nonzero? (-> *collide-cache* num-tris))
|
||||
(set! (-> v1-41 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad))
|
||||
(set! (-> s2-0 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad))
|
||||
(vector-copy! v1-41 (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0))
|
||||
(vector-copy! s2-0 (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0))
|
||||
)
|
||||
(countdown (a1-27 (-> *collide-cache* num-tris))
|
||||
(set! (-> v1-41 x) (fmin
|
||||
@@ -771,45 +771,24 @@
|
||||
(let ((s4-2 (collision-edit-get-prim arg0 (-> this current-prim))))
|
||||
(when s4-2
|
||||
(set! (-> s4-2 local-sphere w) (* (-> s4-2 local-sphere w) f24-0))
|
||||
(let ((s3-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-17 (matrix-local->world #f #f))
|
||||
(v1-107 (-> a2-17 rvec quad))
|
||||
(a0-58 (-> a2-17 uvec quad))
|
||||
(a1-37 (-> a2-17 fvec quad))
|
||||
(a2-18 (-> a2-17 trans quad))
|
||||
)
|
||||
(set! (-> s3-1 rvec quad) v1-107)
|
||||
(set! (-> s3-1 uvec quad) a0-58)
|
||||
(set! (-> s3-1 fvec quad) a1-37)
|
||||
(set! (-> s3-1 trans quad) a2-18)
|
||||
)
|
||||
(let ((s2-1 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-19 (-> arg0 node-list data (-> s4-2 transform-index) bone transform))
|
||||
(v1-111 (-> a2-19 rvec quad))
|
||||
(a0-61 (-> a2-19 uvec quad))
|
||||
(a1-38 (-> a2-19 fvec quad))
|
||||
(a2-20 (-> a2-19 trans quad))
|
||||
)
|
||||
(set! (-> s2-1 rvec quad) v1-111)
|
||||
(set! (-> s2-1 uvec quad) a0-61)
|
||||
(set! (-> s2-1 fvec quad) a1-38)
|
||||
(set! (-> s2-1 trans quad) a2-20)
|
||||
(let ((s3-1 (matrix-copy! (new 'stack-no-clear 'matrix) (matrix-local->world #f #f)))
|
||||
(s2-1
|
||||
(matrix-copy! (new 'stack-no-clear 'matrix) (-> arg0 node-list data (-> s4-2 transform-index) bone transform))
|
||||
)
|
||||
(s1-1 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((s1-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s1-1 x) f30-0)
|
||||
(set! (-> s1-1 y) f28-0)
|
||||
(set! (-> s1-1 z) f26-0)
|
||||
(set! (-> s1-1 w) 1.0)
|
||||
(vector-reset! (-> s3-1 trans))
|
||||
(vector-matrix*! s1-1 s1-1 s3-1)
|
||||
(vector-reset! (-> s2-1 trans))
|
||||
(matrix-transpose! s2-1 s2-1)
|
||||
(vector-matrix*! s1-1 s1-1 s2-1)
|
||||
(+! (-> s4-2 local-sphere x) (-> s1-1 x))
|
||||
(+! (-> s4-2 local-sphere y) (-> s1-1 y))
|
||||
(+! (-> s4-2 local-sphere z) (-> s1-1 z))
|
||||
)
|
||||
)
|
||||
(set! (-> s1-1 x) f30-0)
|
||||
(set! (-> s1-1 y) f28-0)
|
||||
(set! (-> s1-1 z) f26-0)
|
||||
(set! (-> s1-1 w) 1.0)
|
||||
(vector-reset! (-> s3-1 trans))
|
||||
(vector-matrix*! s1-1 s1-1 s3-1)
|
||||
(vector-reset! (-> s2-1 trans))
|
||||
(matrix-transpose! s2-1 s2-1)
|
||||
(vector-matrix*! s1-1 s1-1 s2-1)
|
||||
(+! (-> s4-2 local-sphere x) (-> s1-1 x))
|
||||
(+! (-> s4-2 local-sphere y) (-> s1-1 y))
|
||||
(+! (-> s4-2 local-sphere z) (-> s1-1 z))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
(set! (-> sv-80 z) (+ (-> s2-0 z) (* (sin (* (the float (+ sv-112 1)) (/ 65536.0 arg1))) f28-0)))
|
||||
(set! (-> sv-96 x) (+ (-> s2-0 x) (* (cos (* (the float sv-112) (/ 65536.0 arg1))) f26-0)))
|
||||
(set! (-> sv-96 z) (+ (-> s2-0 z) (* (sin (* (the float sv-112) (/ 65536.0 arg1))) f26-0)))
|
||||
(set! (-> arg0 data s5-0 quad) (-> s0-0 quad))
|
||||
(set! (-> arg0 data (+ s5-0 1) quad) (-> sv-80 quad))
|
||||
(set! (-> arg0 data (+ s5-0 2) quad) (-> sv-96 quad))
|
||||
(vector-copy! (-> arg0 data s5-0) s0-0)
|
||||
(vector-copy! (-> arg0 data (+ s5-0 1)) sv-80)
|
||||
(vector-copy! (-> arg0 data (+ s5-0 2)) sv-96)
|
||||
(+! s5-0 3)
|
||||
(set! sv-112 (+ sv-112 1))
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
(let ((s5-0 (new 'stack 'vector4w-2))
|
||||
(a1-2 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-2 quad) (-> pt quad))
|
||||
(vector-copy! a1-2 pt)
|
||||
(set! (-> a1-2 w) 1.0)
|
||||
(when (transform-point-qword! (the-as vector4w (-> s5-0 vector)) a1-2)
|
||||
(with-dma-buffer-add-bucket ((v1-11 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
@@ -368,9 +368,9 @@
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-3 quad) (-> sv-160 quad))
|
||||
(set! (-> s2-0 quad) (-> sv-176 quad))
|
||||
(set! (-> s1-0 quad) (-> s0-0 quad))
|
||||
(vector-copy! a1-3 sv-160)
|
||||
(vector-copy! s2-0 sv-176)
|
||||
(vector-copy! s1-0 s0-0)
|
||||
(set! (-> a1-3 w) 1.0)
|
||||
(set! (-> s2-0 w) 1.0)
|
||||
(set! (-> s1-0 w) 1.0)
|
||||
@@ -564,8 +564,8 @@
|
||||
(let ((v1-4 (get-debug-line)))
|
||||
(when v1-4
|
||||
(set! (-> v1-4 bucket) bucket)
|
||||
(set! (-> v1-4 v1 quad) (-> p0 quad))
|
||||
(set! (-> v1-4 v2 quad) (-> p1 quad))
|
||||
(vector-copy! (-> v1-4 v1) p0)
|
||||
(vector-copy! (-> v1-4 v2) p1)
|
||||
(set! (-> v1-4 color) color)
|
||||
(set! (-> v1-4 color2) color2)
|
||||
(set! (-> v1-4 mode) mode)
|
||||
@@ -662,9 +662,9 @@
|
||||
(defun-debug add-debug-box ((enable symbol) (bucket bucket-id) (p0 vector) (p1 vector) (color rgba))
|
||||
"Draw an axis-aligned box."
|
||||
(let ((s5-0 (new-stack-vector0)))
|
||||
(set! (-> s5-0 quad) (-> p0 quad))
|
||||
(vector-copy! s5-0 p0)
|
||||
(let ((s1-0 (new-stack-vector0)))
|
||||
(set! (-> s1-0 quad) (-> p0 quad))
|
||||
(vector-copy! s1-0 p0)
|
||||
(when (and enable (not *display-capture-mode*))
|
||||
(set! (-> s1-0 x) (-> p1 x))
|
||||
(add-debug-line #t bucket s5-0 s1-0 color #f (the-as rgba -1))
|
||||
@@ -683,8 +683,8 @@
|
||||
(set! (-> s1-0 y) (-> p0 y))
|
||||
(set! (-> s5-0 x) (-> p1 x))
|
||||
(add-debug-line #t bucket s5-0 s1-0 color #f (the-as rgba -1))
|
||||
(set! (-> s5-0 quad) (-> p1 quad))
|
||||
(set! (-> s1-0 quad) (-> p1 quad))
|
||||
(vector-copy! s5-0 p1)
|
||||
(vector-copy! s1-0 p1)
|
||||
(set! (-> s1-0 x) (-> p0 x))
|
||||
(add-debug-line #t bucket s5-0 s1-0 color #f (the-as rgba -1))
|
||||
(set! (-> s1-0 x) (-> p1 x))
|
||||
@@ -716,8 +716,8 @@
|
||||
(let ((s2-0 (new 'stack-no-clear 'inline-array 'vector 2))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s2-0 0 quad) (-> box min quad))
|
||||
(set! (-> s2-0 1 quad) (-> box max quad))
|
||||
(vector-copy! (-> s2-0 0) (-> box min))
|
||||
(vector-copy! (-> s2-0 1) (-> box max))
|
||||
(set! (-> s1-0 w) 1.0)
|
||||
(dotimes (s0-0 8)
|
||||
(set! (-> s1-0 x) (-> s2-0 (logand s0-0 1) x))
|
||||
@@ -846,7 +846,7 @@
|
||||
(when v1-4
|
||||
(set! (-> v1-4 flags) 0)
|
||||
(set! (-> v1-4 bucket) bucket)
|
||||
(set! (-> v1-4 pos quad) (-> pos quad))
|
||||
(vector-copy! (-> v1-4 pos) pos)
|
||||
(cond
|
||||
(offset
|
||||
(set! (-> v1-4 offset x) (-> offset x))
|
||||
@@ -985,7 +985,7 @@
|
||||
)
|
||||
(forward-down->inv-matrix sv-112 gp-0 s5-0)
|
||||
)
|
||||
(set! (-> sv-112 trans quad) (-> sv-24 quad))
|
||||
(vector-copy! (-> sv-112 trans) sv-24)
|
||||
(set! (-> sv-112 trans w) 1.0)
|
||||
(let ((gp-1 (new 'static 'inline-array vector 3
|
||||
(new 'static 'vector :y 0.5877 :z 0.951 :w 0.951)
|
||||
@@ -1010,7 +1010,7 @@
|
||||
(set! (-> s1-0 y) (* sv-32 (-> gp-1 2 y)))
|
||||
(vector-matrix*! s3-0 s1-0 sv-112)
|
||||
(dotimes (s0-0 10)
|
||||
(set! (-> s4-0 quad) (-> s3-0 quad))
|
||||
(vector-copy! s4-0 s3-0)
|
||||
(set! (-> s1-0 x) (* sv-32 (-> (&-> s5-1 0 data s0-0) 0)))
|
||||
(set! (-> s1-0 y) (* sv-32 (-> (&-> gp-1 0 data s0-0) 0)))
|
||||
(vector-matrix*! s3-0 s1-0 sv-112)
|
||||
@@ -1202,7 +1202,7 @@
|
||||
(curve-evaluate! sv-48 (-> arg4 0) arg2 arg3 arg4 arg5)
|
||||
(set! sv-80 0)
|
||||
(while (< sv-80 sv-64)
|
||||
(set! (-> s0-0 quad) (-> sv-48 quad))
|
||||
(vector-copy! s0-0 sv-48)
|
||||
(curve-evaluate! sv-48 (/ (the float (+ sv-80 1)) (the float sv-64)) arg2 arg3 arg4 arg5)
|
||||
(add-debug-line #t arg1 s0-0 sv-48 arg6 #f (the-as rgba -1))
|
||||
(set! sv-80 (+ sv-80 1))
|
||||
@@ -1230,7 +1230,7 @@
|
||||
(dotimes (s0-0 arg3)
|
||||
(set! sv-96 (new 'stack-no-clear 'vector))
|
||||
(set! (-> sv-96 quad) (the-as uint128 0))
|
||||
(set! (-> sv-96 quad) (-> arg2 s0-0 quad))
|
||||
(vector-copy! sv-96 (-> arg2 s0-0))
|
||||
(if (!= arg5 0.0)
|
||||
(set! (-> sv-96 y) arg5)
|
||||
)
|
||||
@@ -1445,7 +1445,7 @@
|
||||
(set! (-> arg0 points) (the-as (inline-array vector) (malloc 'debug (* (-> arg0 num-points) 16))))
|
||||
)
|
||||
(when (-> arg0 points)
|
||||
(set! (-> arg0 points (-> arg0 h-first) quad) (-> arg2 quad))
|
||||
(vector-copy! (-> arg0 points (-> arg0 h-first)) arg2)
|
||||
(+! (-> arg0 h-first) 1)
|
||||
(when (>= (-> arg0 h-first) (-> arg0 num-points))
|
||||
(set! (-> arg0 h-first) 0)
|
||||
@@ -1472,12 +1472,8 @@
|
||||
|
||||
(defun-debug dma-timeout-cam ()
|
||||
(let ((a0-0 (new-stack-vector0))
|
||||
(a1-0 (new 'stack-no-clear 'matrix))
|
||||
(a1-0 (new-stack-matrix0))
|
||||
)
|
||||
(set! (-> a1-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> a1-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> a1-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> a1-0 trans quad) (the-as uint128 0))
|
||||
(set! (-> a0-0 x) -666764.4)
|
||||
(set! (-> a0-0 y) 21102.984)
|
||||
(set! (-> a0-0 z) 51613.348)
|
||||
@@ -1660,16 +1656,16 @@
|
||||
((not (logtest? s3-0 1))
|
||||
(dotimes (v1-10 3)
|
||||
(set! (-> *boundary-polygon* v1-10 pos quad) (-> arg1 (+ s3-0 v1-10) quad))
|
||||
(set! (-> *boundary-polygon* v1-10 stq quad) (-> s2-0 (+ s3-0 v1-10) quad))
|
||||
(vector-copy! (-> *boundary-polygon* v1-10 stq) (-> s2-0 (+ s3-0 v1-10)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *boundary-polygon* 0 pos quad) (-> arg1 (+ s3-0 1) quad))
|
||||
(set! (-> *boundary-polygon* 1 pos quad) (-> arg1 s3-0 quad))
|
||||
(set! (-> *boundary-polygon* 2 pos quad) (-> arg1 (+ s3-0 2) quad))
|
||||
(set! (-> *boundary-polygon* 0 stq quad) (-> s2-0 (+ s3-0 1) quad))
|
||||
(set! (-> *boundary-polygon* 1 stq quad) (-> s2-0 s3-0 quad))
|
||||
(set! (-> *boundary-polygon* 2 stq quad) (-> s2-0 (+ s3-0 2) quad))
|
||||
(vector-copy! (-> *boundary-polygon* 0 stq) (-> s2-0 (+ s3-0 1)))
|
||||
(vector-copy! (-> *boundary-polygon* 1 stq) (-> s2-0 s3-0))
|
||||
(vector-copy! (-> *boundary-polygon* 2 stq) (-> s2-0 (+ s3-0 2)))
|
||||
)
|
||||
)
|
||||
(render-boundary-tri (-> *boundary-polygon* 0) arg0)
|
||||
|
||||
@@ -607,7 +607,7 @@
|
||||
)
|
||||
(s2-0)
|
||||
)
|
||||
(set! (-> gp-0 trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> gp-0 trans) arg0)
|
||||
(set! (-> gp-0 radius) 2048.0)
|
||||
(set! (-> gp-0 owner) '())
|
||||
gp-0
|
||||
@@ -642,7 +642,7 @@
|
||||
)
|
||||
(s1-0)
|
||||
)
|
||||
(set! (-> s5-0 trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> s5-0 trans) arg0)
|
||||
(set! (-> s5-0 radius) arg1)
|
||||
(set! (-> s5-0 owner) '())
|
||||
s5-0
|
||||
@@ -692,7 +692,7 @@
|
||||
)
|
||||
(s1-0)
|
||||
)
|
||||
(set! (-> gp-0 trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> gp-0 trans) arg0)
|
||||
(set! (-> gp-0 radius) arg1)
|
||||
(set! (-> gp-0 owner) '())
|
||||
(set! (-> gp-0 prefix) (new 'debug 'string 32 *editable-default-name*))
|
||||
@@ -744,7 +744,7 @@
|
||||
)
|
||||
(s1-0)
|
||||
)
|
||||
(set! (-> gp-0 trans quad) (-> arg0 quad))
|
||||
(vector-copy! (-> gp-0 trans) arg0)
|
||||
(set! (-> gp-0 radius) arg1)
|
||||
(set! (-> gp-0 owner) '())
|
||||
(set! (-> gp-0 prefix) (new 'debug 'string 32 "entity"))
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
(.svf (&-> a0-14 quad) vf6)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1))
|
||||
(set! (-> s1-0 quad) (-> s0-0 quad))
|
||||
(vector-copy! s1-0 s0-0)
|
||||
(let ((a0-18 s0-0))
|
||||
(let ((v1-29 s0-0))
|
||||
(let ((a1-12 (-> *math-camera* inv-camera-rot)))
|
||||
@@ -291,7 +291,7 @@
|
||||
(.svf (&-> a0-18 quad) vf6)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1))
|
||||
(set! (-> s1-0 quad) (-> s0-0 quad))
|
||||
(vector-copy! s1-0 s0-0)
|
||||
(let ((a0-22 s0-0))
|
||||
(let ((v1-31 s0-0))
|
||||
(let ((a1-15 (-> *math-camera* inv-camera-rot uvec)))
|
||||
@@ -308,7 +308,7 @@
|
||||
(.svf (&-> a0-22 quad) vf6)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1))
|
||||
(set! (-> s1-0 quad) (-> s0-0 quad))
|
||||
(vector-copy! s1-0 s0-0)
|
||||
(let ((a0-26 s0-0))
|
||||
(let ((v1-33 s0-0))
|
||||
(let ((a1-18 (-> *math-camera* inv-camera-rot)))
|
||||
@@ -464,8 +464,8 @@
|
||||
|
||||
(defmethod manipulator-method-12 ((this manipulator) (arg0 vector))
|
||||
(set! (-> this rotate-ref) (the int (-> *mouse* posx)))
|
||||
(set! (-> this mouse-ref-position quad) (-> arg0 quad))
|
||||
(set! (-> this drag-ref-position quad) (-> this position quad))
|
||||
(vector-copy! (-> this mouse-ref-position) arg0)
|
||||
(vector-copy! (-> this drag-ref-position) (-> this position))
|
||||
(set! (-> this dragging?) #t)
|
||||
(set! (-> this speed quad) (the-as uint128 0))
|
||||
0
|
||||
@@ -483,7 +483,7 @@
|
||||
(init-vf0-vector)
|
||||
(cond
|
||||
((= (-> this mode) (manipulator-mode mm0))
|
||||
(set! (-> this speed quad) (-> this position quad))
|
||||
(vector-copy! (-> this speed) (-> this position))
|
||||
(let ((s5-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))
|
||||
(s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this mouse-ref-position) arg0))
|
||||
)
|
||||
@@ -501,36 +501,36 @@
|
||||
((= (-> this action) (manipulator-action ma1))
|
||||
(cond
|
||||
((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (-> this mat fvec))))
|
||||
(set! (-> s2-0 quad) (-> this mat fvec quad))
|
||||
(set! (-> s1-0 quad) (-> this mat uvec quad))
|
||||
(vector-copy! s2-0 (-> this mat fvec))
|
||||
(vector-copy! s1-0 (-> this mat uvec))
|
||||
)
|
||||
(else
|
||||
(set! (-> s2-0 quad) (-> this mat uvec quad))
|
||||
(set! (-> s1-0 quad) (-> this mat fvec quad))
|
||||
(vector-copy! s2-0 (-> this mat uvec))
|
||||
(vector-copy! s1-0 (-> this mat fvec))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> this action) (manipulator-action ma2))
|
||||
(cond
|
||||
((< (fabs (vector-dot s5-1 (the-as vector (-> this mat)))) (fabs (vector-dot s5-1 (-> this mat fvec))))
|
||||
(set! (-> s2-0 quad) (-> this mat fvec quad))
|
||||
(set! (-> s1-0 quad) (-> this mat rvec quad))
|
||||
(vector-copy! s2-0 (-> this mat fvec))
|
||||
(vector-copy! s1-0 (-> this mat rvec))
|
||||
)
|
||||
(else
|
||||
(set! (-> s2-0 quad) (-> this mat rvec quad))
|
||||
(set! (-> s1-0 quad) (-> this mat fvec quad))
|
||||
(vector-copy! s2-0 (-> this mat rvec))
|
||||
(vector-copy! s1-0 (-> this mat fvec))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> this action) (manipulator-action ma3))
|
||||
(cond
|
||||
((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (the-as vector (-> this mat)))))
|
||||
(set! (-> s2-0 quad) (-> this mat rvec quad))
|
||||
(set! (-> s1-0 quad) (-> this mat uvec quad))
|
||||
(vector-copy! s2-0 (-> this mat rvec))
|
||||
(vector-copy! s1-0 (-> this mat uvec))
|
||||
)
|
||||
(else
|
||||
(set! (-> s2-0 quad) (-> this mat uvec quad))
|
||||
(set! (-> s1-0 quad) (-> this mat rvec quad))
|
||||
(vector-copy! s2-0 (-> this mat uvec))
|
||||
(vector-copy! s1-0 (-> this mat rvec))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -581,16 +581,16 @@
|
||||
)
|
||||
(cond
|
||||
((= (-> this action) (manipulator-action ma4))
|
||||
(set! (-> s2-0 quad) (-> *z-vector* quad))
|
||||
(vector-copy! s2-0 *z-vector*)
|
||||
)
|
||||
((= (-> this action) (manipulator-action ma5))
|
||||
(set! (-> s2-0 quad) (-> *y-vector* quad))
|
||||
(vector-copy! s2-0 *y-vector*)
|
||||
)
|
||||
((= (-> this action) (manipulator-action ma6))
|
||||
(set! (-> s2-0 quad) (-> *x-vector* quad))
|
||||
(vector-copy! s2-0 *x-vector*)
|
||||
)
|
||||
((= (-> this action) (manipulator-action ma7))
|
||||
(set! (-> s2-0 quad) (-> *math-camera* inv-camera-rot fvec quad))
|
||||
(vector-copy! s2-0 (-> *math-camera* inv-camera-rot fvec))
|
||||
)
|
||||
)
|
||||
(vector-normalize! s2-0 1.0)
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! ((this viewer) (arg0 entity-actor))
|
||||
"Set up a newly created process from the entity that created it."
|
||||
(set! *viewer* this)
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
@@ -216,7 +217,7 @@
|
||||
(set! *viewer* self)
|
||||
(process-entity-set! self arg2)
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg1 quad))
|
||||
(vector-copy! (-> self root trans) arg1)
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
|
||||
(init-viewer arg0 arg0)
|
||||
|
||||
@@ -851,7 +851,7 @@
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags shdf08))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(vector-copy! s5-0 s4-0)
|
||||
)
|
||||
(else
|
||||
(when (not (paused?))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
(bit-4 4)
|
||||
(bit-5 5)
|
||||
(subtask-complete 6)
|
||||
(bit-7 7)
|
||||
(special 7)
|
||||
(complete 8)
|
||||
(bit-9 9)
|
||||
(bit-10 10)
|
||||
|
||||
@@ -693,7 +693,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 entity-link) v1-4)
|
||||
(set! (-> v1-4 trans quad) (-> this trans quad))
|
||||
(vector-copy! (-> v1-4 trans) (-> this trans))
|
||||
)
|
||||
(set! (-> this extra perm aid) arg2)
|
||||
(set! (-> this extra level) arg1)
|
||||
@@ -889,14 +889,14 @@
|
||||
(let ((enemy-option (res-lump-value sv-40 'enemy-options enemy-option :time -1000000000.0)))
|
||||
(cond
|
||||
((logtest? (enemy-option spawner) (the-as uint128 enemy-option))
|
||||
(set! (-> sv-20 quad) (-> sv-36 quad))
|
||||
(set! (-> sv-24 quad) (-> sv-36 quad))
|
||||
(vector-copy! sv-20 sv-36)
|
||||
(vector-copy! sv-24 sv-36)
|
||||
(set! sv-28 (the-as float -409.6))
|
||||
(set! sv-32 (the-as float 409.6))
|
||||
)
|
||||
((string-prefix= "battle" (res-lump-struct sv-40 'name string))
|
||||
(set! (-> sv-20 quad) (-> sv-36 quad))
|
||||
(set! (-> sv-24 quad) (-> sv-36 quad))
|
||||
(vector-copy! sv-20 sv-36)
|
||||
(vector-copy! sv-24 sv-36)
|
||||
(set! sv-48 (new 'static 'res-tag))
|
||||
(let ((v1-29 (res-lump-data sv-40 'actor-groups (pointer actor-group) :tag-ptr (& sv-48))))
|
||||
(when (and v1-29 (nonzero? (-> sv-48 elt-count)))
|
||||
@@ -919,8 +919,8 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> sv-20 quad) (-> sv-36 quad))
|
||||
(set! (-> sv-24 quad) (-> sv-36 quad))
|
||||
(vector-copy! sv-20 sv-36)
|
||||
(vector-copy! sv-24 sv-36)
|
||||
)
|
||||
)
|
||||
(+! (-> sv-20 x) sv-28)
|
||||
@@ -1946,7 +1946,7 @@
|
||||
(defun process-drawable-scale-from-entity! ((arg0 process-drawable) (arg1 entity))
|
||||
(let ((v1-1 (res-lump-struct arg1 'scale vector)))
|
||||
(if v1-1
|
||||
(set! (-> arg0 root scale quad) (-> v1-1 quad))
|
||||
(vector-copy! (-> arg0 root scale) v1-1)
|
||||
(vector-identity! (-> arg0 root scale))
|
||||
)
|
||||
)
|
||||
@@ -1957,7 +1957,7 @@
|
||||
;; WARN: Return type mismatch process-drawable vs none.
|
||||
(defun process-drawable-from-entity! ((arg0 process-drawable) (arg1 entity-actor))
|
||||
(logior! (-> arg0 mask) (process-mask actor-pause))
|
||||
(set! (-> arg0 root trans quad) (-> arg1 extra trans quad))
|
||||
(vector-copy! (-> arg0 root trans) (-> arg1 extra trans))
|
||||
(quaternion-copy! (-> arg0 root quat) (-> arg1 quat))
|
||||
(vector-identity! (-> arg0 root scale))
|
||||
(none)
|
||||
|
||||
@@ -397,15 +397,17 @@
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> s2-1 flags) (sp-group-flag sp13))
|
||||
(set! (-> *launch-matrix* trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad)
|
||||
)
|
||||
(vector-copy!
|
||||
(-> *launch-matrix* trans)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2))
|
||||
)
|
||||
(part-tracker-spawn part-tracker-subsampler :to (-> this process) :group s2-1)
|
||||
)
|
||||
(else
|
||||
(set! (-> *launch-matrix* trans quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad)
|
||||
)
|
||||
(vector-copy!
|
||||
(-> *launch-matrix* trans)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2))
|
||||
)
|
||||
(part-tracker-spawn part-tracker :to (-> this process) :group s2-1)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
(sf23 23)
|
||||
(sf24 24)
|
||||
(sf25 25)
|
||||
(sf26 26)
|
||||
(hang 26)
|
||||
(sf27 27)
|
||||
(sf28 28)
|
||||
(invisible 28)
|
||||
(sf29 29)
|
||||
(sf30 30)
|
||||
(sf31 31)
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
(task-node-commands (array game-task-node-command))
|
||||
(task-node-exclusive (array uint16))
|
||||
(task-counter uint32)
|
||||
(unknown-arr4 (array uint16))
|
||||
(talker-state (array uint16))
|
||||
(level-opened uint8 32)
|
||||
(total-deaths int32)
|
||||
(continue-deaths int32)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
(dotimes (ii 3)
|
||||
(set! (-> this want-sound ii) (-> arg0 want-sound ii name))
|
||||
)
|
||||
(set! (-> this camera-trans quad) (-> *camera-combiner* trans quad))
|
||||
(vector-copy! (-> this camera-trans) (-> *camera-combiner* trans))
|
||||
(when *camera-combiner*
|
||||
(let ((rot (-> *camera-combiner* inv-camera-rot))
|
||||
(continue-rot (-> this camera-rot))
|
||||
@@ -207,7 +207,7 @@
|
||||
)
|
||||
|
||||
(defmethod move-camera! ((this continue-point))
|
||||
(set! (-> *camera-combiner* trans quad) (-> this camera-trans quad))
|
||||
(vector-copy! (-> *camera-combiner* trans) (-> this camera-trans))
|
||||
(let ((gp-0 (-> *camera-combiner* inv-camera-rot))
|
||||
(s5-0 (-> this camera-rot))
|
||||
)
|
||||
@@ -382,7 +382,7 @@
|
||||
(when (or (and (-> subtask manager) (handle->process (-> subtask manager manager)))
|
||||
(and (-> subtask manager)
|
||||
(-> subtask manager level)
|
||||
(= (status-of-level-and-borrows *level* (-> subtask manager level) #f) 'active)
|
||||
(= (level-status? *level* (-> subtask manager level) #f) 'active)
|
||||
)
|
||||
(and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level)))
|
||||
)
|
||||
@@ -515,8 +515,8 @@
|
||||
(set! (-> this dark-crystal) 0.0)
|
||||
(set! (-> this karma) 0.0)
|
||||
(set! (-> this perm-list length) 0)
|
||||
(dotimes (v1-57 (-> this unknown-arr4 allocated-length))
|
||||
(set! (-> this unknown-arr4 v1-57) (the-as uint 0))
|
||||
(dotimes (v1-57 (-> this talker-state allocated-length))
|
||||
(set! (-> this talker-state v1-57) (the-as uint 0))
|
||||
)
|
||||
(set! (-> this death-movie-tick) (rand-vu-int-count 10))
|
||||
(set! (-> this gun-type) (pickup-type gun-red-1))
|
||||
@@ -2081,8 +2081,8 @@
|
||||
(set! (-> gp-0 perm-list length) 0)
|
||||
0
|
||||
)
|
||||
(if (zero? (-> gp-0 unknown-arr4))
|
||||
(set! (-> gp-0 unknown-arr4) (new 'global 'boxed-array uint16 1460))
|
||||
(if (zero? (-> gp-0 talker-state))
|
||||
(set! (-> gp-0 talker-state) (new 'global 'boxed-array uint16 1460))
|
||||
)
|
||||
(when (zero? (-> gp-0 death-pos))
|
||||
(set! (-> gp-0 death-pos) (new 'global 'vector-array 64))
|
||||
|
||||
@@ -1159,7 +1159,7 @@
|
||||
(mem-copy! (the-as pointer (+ s2-12 (* s1-6 16))) (the-as pointer (-> this task-perm-list data s1-6)) 16)
|
||||
)
|
||||
(let ((a0-111 (+ s2-12 (logand -16 (+ (* s3-4 16) 15))))
|
||||
(v1-187 (-> this unknown-arr4 allocated-length))
|
||||
(v1-187 (-> this talker-state allocated-length))
|
||||
)
|
||||
(let ((a1-118 (the-as object (+ a0-111 0))))
|
||||
(set! (-> (the-as (inline-array game-save-tag) a1-118) 0 elt-type) (game-save-elt talker-state))
|
||||
@@ -1168,7 +1168,7 @@
|
||||
)
|
||||
(let ((a0-112 (+ a0-111 16)))
|
||||
(dotimes (a1-119 v1-187)
|
||||
(set! (-> (the-as (pointer uint16) (+ a0-112 (* a1-119 2))) 0) (-> this unknown-arr4 a1-119))
|
||||
(set! (-> (the-as (pointer uint16) (+ a0-112 (* a1-119 2))) 0) (-> this talker-state a1-119))
|
||||
)
|
||||
(let ((a0-113 (+ a0-112 (logand -16 (+ (* v1-187 2) 15))))
|
||||
(v1-193 (-> this game-score allocated-length))
|
||||
@@ -1989,17 +1989,17 @@
|
||||
)
|
||||
)
|
||||
(((game-save-elt talker-state))
|
||||
(let ((v1-116 (-> this unknown-arr4 allocated-length))
|
||||
(let ((v1-116 (-> this talker-state allocated-length))
|
||||
(a0-153 (-> (the-as game-save-tag s4-0) elt-count))
|
||||
)
|
||||
(dotimes (a1-82 v1-116)
|
||||
(cond
|
||||
((>= a1-82 a0-153)
|
||||
(set! (-> this unknown-arr4 a1-82) (the-as uint 0))
|
||||
(set! (-> this talker-state a1-82) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(set! (-> this unknown-arr4 a1-82) (-> (&+ (the-as game-save-tag s4-0) 16) user-uint16 a1-82))
|
||||
(set! (-> this talker-state a1-82) (-> (&+ (the-as game-save-tag s4-0) 16) user-uint16 a1-82))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -392,9 +392,9 @@
|
||||
)
|
||||
"Initialize the screen-filter with the given settings."
|
||||
(set! (-> this draw?) #t)
|
||||
(set! (-> this color quad) (-> arg0 quad))
|
||||
(set! (-> this color-src quad) (-> arg0 quad))
|
||||
(set! (-> this color-dest quad) (-> arg1 quad))
|
||||
(vector-copy! (-> this color) arg0)
|
||||
(vector-copy! (-> this color-src) arg0)
|
||||
(vector-copy! (-> this color-dest) arg1)
|
||||
(set! (-> this extra x) arg2)
|
||||
(set! (-> this extra y) 0.0)
|
||||
(set! (-> this bucket) arg3)
|
||||
|
||||
@@ -944,7 +944,7 @@
|
||||
)
|
||||
)
|
||||
(('pov-offset)
|
||||
(set! (-> this pov-offset quad) (-> (the-as vector arg2) quad))
|
||||
(vector-copy! (-> this pov-offset) (the-as vector arg2))
|
||||
)
|
||||
(('string-max-length)
|
||||
(case arg1
|
||||
@@ -1161,20 +1161,20 @@
|
||||
)
|
||||
(('string-startup-vector)
|
||||
(set! (-> this use-string-startup-vector) #t)
|
||||
(set! (-> this string-startup-vector quad) (-> (the-as vector arg2) quad))
|
||||
(vector-copy! (-> this string-startup-vector) (the-as vector arg2))
|
||||
)
|
||||
(('look-at-point)
|
||||
(set! (-> this use-look-at-point) #t)
|
||||
(set! (-> this look-at-point quad) (-> (the-as vector arg2) quad))
|
||||
(vector-copy! (-> this look-at-point) (the-as vector arg2))
|
||||
)
|
||||
(('point-of-interest)
|
||||
(set! (-> this use-point-of-interest) #t)
|
||||
(set! (-> this point-of-interest quad) (-> (the-as vector arg2) quad))
|
||||
(vector-copy! (-> this point-of-interest) (the-as vector arg2))
|
||||
(set! (-> this handle-of-interest) (the-as handle #f))
|
||||
)
|
||||
(('mouse-tumble-point)
|
||||
(set! (-> this use-mouse-tumble-point) #t)
|
||||
(set! (-> this mouse-tumble-point quad) (-> (the-as vector arg2) quad))
|
||||
(vector-copy! (-> this mouse-tumble-point) (the-as vector arg2))
|
||||
)
|
||||
(('handle-of-interest)
|
||||
(let ((a0-128 (new 'static 'handle :process arg1 :pid arg3)))
|
||||
@@ -1425,7 +1425,7 @@
|
||||
(set! (-> s5-0 allow-error) (-> s4-0 allow-error))
|
||||
(set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod))
|
||||
(set! (-> s5-0 slow-time) (-> s4-0 slow-time))
|
||||
(if (and (-> s4-0 mirror) (= (status-of-level-and-borrows *level* 'ctywide #f) 'active))
|
||||
(if (and (-> s4-0 mirror) (= (level-status? *level* 'ctywide #f) 'active))
|
||||
(set! (-> s5-0 mirror) #f)
|
||||
(set! (-> s5-0 mirror) (-> s4-0 mirror))
|
||||
)
|
||||
@@ -1919,7 +1919,7 @@
|
||||
(set! (-> s5-1 fov-priority) (-> s4-1 fov-priority))
|
||||
(set! (-> s5-1 pov-handle) (-> s4-1 pov-handle))
|
||||
(set! (-> s5-1 pov-bone) (-> s4-1 pov-bone))
|
||||
(set! (-> s5-1 pov-offset quad) (-> s4-1 pov-offset quad))
|
||||
(vector-copy! (-> s5-1 pov-offset) (-> s4-1 pov-offset))
|
||||
(set! (-> s5-1 string-default) (-> s4-1 string-default))
|
||||
(set! (-> s5-1 string-max-length-default) (-> s4-1 string-max-length-default))
|
||||
(set! (-> s5-1 string-min-length-default) (-> s4-1 string-min-length-default))
|
||||
@@ -1942,7 +1942,7 @@
|
||||
(set! (-> s5-1 gun-max-height) (-> s4-1 string-max-height))
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 string-local-down quad) (-> s4-1 string-local-down quad))
|
||||
(vector-copy! (-> s5-1 string-local-down) (-> s4-1 string-local-down))
|
||||
(set! (-> s5-1 slave-options) (-> s4-1 slave-options))
|
||||
(seek! (-> s5-1 matrix-blend-max-angle) (-> s4-1 matrix-blend-max-angle) 182.04445)
|
||||
(seek! (-> s5-1 matrix-blend-max-partial) (-> s4-1 matrix-blend-max-partial) 0.05)
|
||||
@@ -1967,13 +1967,13 @@
|
||||
(set! (-> s5-1 interp-time) (-> s4-1 interp-time))
|
||||
(set! (-> s5-1 interp-time-priority) (-> s4-1 interp-time-priority))
|
||||
(set! (-> s5-1 use-string-startup-vector) (-> s4-1 use-string-startup-vector))
|
||||
(set! (-> s5-1 string-startup-vector quad) (-> s4-1 string-startup-vector quad))
|
||||
(vector-copy! (-> s5-1 string-startup-vector) (-> s4-1 string-startup-vector))
|
||||
(set! (-> s5-1 use-look-at-point) (-> s4-1 use-look-at-point))
|
||||
(set! (-> s5-1 look-at-point quad) (-> s4-1 look-at-point quad))
|
||||
(vector-copy! (-> s5-1 look-at-point) (-> s4-1 look-at-point))
|
||||
(set! (-> s5-1 use-point-of-interest) (-> s4-1 use-point-of-interest))
|
||||
(set! (-> s5-1 point-of-interest quad) (-> s4-1 point-of-interest quad))
|
||||
(vector-copy! (-> s5-1 point-of-interest) (-> s4-1 point-of-interest))
|
||||
(set! (-> s5-1 use-mouse-tumble-point) (-> s4-1 use-mouse-tumble-point))
|
||||
(set! (-> s5-1 mouse-tumble-point quad) (-> s4-1 mouse-tumble-point quad))
|
||||
(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)
|
||||
@@ -1983,10 +1983,10 @@
|
||||
)
|
||||
(when a0-159
|
||||
(set! (-> s5-1 use-point-of-interest) #t)
|
||||
(set! (-> s5-1 point-of-interest quad) (-> (get-trans (the-as process-focusable a0-159) 4) quad))
|
||||
(vector-copy! (-> s5-1 point-of-interest) (get-trans (the-as process-focusable a0-159) 4))
|
||||
)
|
||||
)
|
||||
(set! (-> this cam-default point-of-interest quad) (-> s5-1 point-of-interest quad))
|
||||
(vector-copy! (-> this cam-default point-of-interest) (-> s5-1 point-of-interest))
|
||||
(set! (-> s5-1 butt-handle) (-> s4-1 butt-handle))
|
||||
(set! (-> s5-1 butt-angle) (-> s4-1 butt-angle))
|
||||
(set! (-> s5-1 extra-follow-height) (-> s4-1 extra-follow-height))
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
|
||||
(defmethod task-arrow-method-23 ((this task-arrow) (arg0 vector))
|
||||
(let ((s5-0 (new 'stack-no-clear 'cquery-with-vec)))
|
||||
(set! (-> s5-0 vec0 quad) (-> arg0 quad))
|
||||
(set! (-> s5-0 cquery start-pos quad) (-> s5-0 vec0 quad))
|
||||
(vector-copy! (-> s5-0 vec0) arg0)
|
||||
(vector-copy! (-> s5-0 cquery start-pos) (-> s5-0 vec0))
|
||||
(+! (-> s5-0 cquery start-pos y) 20480.0)
|
||||
(set-vector! (-> s5-0 cquery move-dist) 0.0 -81920.0 0.0 1.0)
|
||||
(let ((v1-4 (-> s5-0 cquery)))
|
||||
@@ -85,7 +85,7 @@
|
||||
(vector+float*! (-> s5-0 vec0) (-> s5-0 cquery start-pos) (-> s5-0 cquery move-dist) f0-7)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 quad) (-> s5-0 vec0 quad))
|
||||
(vector-copy! arg0 (-> s5-0 vec0))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -142,7 +142,7 @@
|
||||
((-> this moving)
|
||||
(cond
|
||||
((logtest? (-> this flags) (task-arrow-flags taf6))
|
||||
(set! (-> this root trans quad) (-> this pos quad))
|
||||
(vector-copy! (-> this root trans) (-> this pos))
|
||||
(if (logtest? (-> this flags) (task-arrow-flags taf4))
|
||||
(seek! (-> this rod-of-god-scale) 0.0 (* 8.0 (seconds-per-frame)))
|
||||
(seek! (-> this rod-of-god-scale) 1.0 (* 8.0 (seconds-per-frame)))
|
||||
@@ -157,13 +157,13 @@
|
||||
(cond
|
||||
((< (* f0-26 f0-26) (vector-vector-xz-distance-squared (-> this pos) (-> this root trans)))
|
||||
(kill-callback (-> *minimap* engine) (-> this minimap))
|
||||
(set! (-> this root trans quad) (-> this pos quad))
|
||||
(vector-copy! (-> this root trans) (-> this pos))
|
||||
(if (not (logtest? (-> this flags) (task-arrow-flags taf5)))
|
||||
(set! (-> this minimap) (add-icon! *minimap* this (-> this map-icon) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this root trans quad) (-> this pos quad))
|
||||
(vector-copy! (-> this root trans) (-> this pos))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -172,7 +172,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this pos quad) (-> this root trans quad))
|
||||
(vector-copy! (-> this pos) (-> this root trans))
|
||||
(if (logtest? (-> this flags) (task-arrow-flags taf4))
|
||||
(seek! (-> this rod-of-god-scale) 0.0 (* 8.0 (seconds-per-frame)))
|
||||
(seek! (-> this rod-of-god-scale) 1.0 (* 8.0 (seconds-per-frame)))
|
||||
@@ -218,7 +218,7 @@
|
||||
(else
|
||||
(+! (-> this theta) (* 32768.0 (seconds-per-frame)))
|
||||
(+! (-> this phi) (* 9102.223 (seconds-per-frame)))
|
||||
(set! (-> this root trans quad) (-> this pos quad))
|
||||
(vector-copy! (-> this root trans) (-> this pos))
|
||||
(set! (-> this root trans y) (+ 28672.0 (* 4096.0 (cos (-> this theta))) (-> this pos y)))
|
||||
)
|
||||
)
|
||||
@@ -238,7 +238,7 @@
|
||||
(case message
|
||||
(('set-position)
|
||||
(let ((a0-3 (the-as object (-> block param 0))))
|
||||
(set! (-> self pos quad) (-> (the-as vector a0-3) quad))
|
||||
(vector-copy! (-> self pos) (the-as vector a0-3))
|
||||
)
|
||||
(if (logtest? (-> self flags) (task-arrow-flags taf3))
|
||||
(task-arrow-method-23 self (-> self pos))
|
||||
@@ -317,7 +317,7 @@
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-1 quad) (-> (math-camera-matrix) fvec quad))
|
||||
(vector-copy! gp-1 (-> (math-camera-matrix) fvec))
|
||||
(let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (math-camera-pos) (-> self root trans))))
|
||||
(set! (-> gp-1 y) 0.0)
|
||||
(set! (-> s5-1 y) 0.0)
|
||||
@@ -380,11 +380,11 @@
|
||||
)
|
||||
(set! (-> self root) s5-0)
|
||||
)
|
||||
(set! (-> self pos quad) (-> arg0 pos quad))
|
||||
(vector-copy! (-> self pos) (-> arg0 pos))
|
||||
(if (logtest? (-> self flags) (task-arrow-flags taf3))
|
||||
(task-arrow-method-23 self (-> self pos))
|
||||
)
|
||||
(set! (-> self root trans quad) (-> self pos quad))
|
||||
(vector-copy! (-> self root trans) (-> self pos))
|
||||
(quaternion-copy! (-> self root quat) (-> arg0 quat))
|
||||
(quaternion-copy! (-> self base-quat) (-> arg0 quat))
|
||||
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
|
||||
|
||||
@@ -781,7 +781,7 @@
|
||||
(spawn-resetter! *resetter-control* (-> s4-1 reset fail-info) (the-as game-task-node-info #f))
|
||||
(return 0)
|
||||
)
|
||||
((= (status-of-level-and-borrows *level* 'wasall #f) 'active)
|
||||
((= (level-status? *level* 'wasall #f) 'active)
|
||||
(set! gp-1 "wasdoors-desert")
|
||||
(if (and (-> *game-info* current-continue)
|
||||
(logtest? (continue-flags race) (-> *game-info* current-continue flags))
|
||||
@@ -2537,14 +2537,15 @@
|
||||
(process-release? *target*)
|
||||
)
|
||||
:code (behavior ()
|
||||
(suspend-for (seconds 1) (let ((f30-0 (lerp-scale 1.0 0.0 (the float (- (current-time) time)) 0.0 300.0)))
|
||||
(set-filter-color!
|
||||
(lerp-scale 1.0 1.25 f30-0 0.0 1.0)
|
||||
(lerp-scale 1.0 0.875 f30-0 0.0 1.0)
|
||||
(lerp-scale 1.0 0.25 f30-0 0.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend-for (seconds 1)
|
||||
(let ((f30-0 (lerp-scale 1.0 0.0 (the float (- (current-time) time)) 0.0 300.0)))
|
||||
(set-filter-color!
|
||||
(lerp-scale 1.0 1.25 f30-0 0.0 1.0)
|
||||
(lerp-scale 1.0 0.875 f30-0 0.0 1.0)
|
||||
(lerp-scale 1.0 0.25 f30-0 0.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (if (-> self retry?)
|
||||
(-> self params retry)
|
||||
(-> self params fail)
|
||||
|
||||
@@ -112,8 +112,8 @@
|
||||
|
||||
(defmethod set-to-point! ((this bounding-box) (arg0 vector))
|
||||
"Set the box to be a single point."
|
||||
(set! (-> this min quad) (-> arg0 quad))
|
||||
(set! (-> this max quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this min) arg0)
|
||||
(vector-copy! (-> this max) arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
|
||||
|
||||
(deftype lissajous (structure)
|
||||
"A curve where the x and y position are set by two different sinusoids.
|
||||
This stores the parameters and state for evaluating this curve."
|
||||
((x-mag float)
|
||||
(y-mag float)
|
||||
(theta float)
|
||||
@@ -52,18 +54,20 @@
|
||||
)
|
||||
:pack-me
|
||||
(:methods
|
||||
(lissajous-method-9 (_type_ vector) vector)
|
||||
(evaluate! (_type_ vector) vector)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype lissajous-interp (structure)
|
||||
"Handles interpolating between two different lissajous parameters, and also
|
||||
stepping forward the dynamics."
|
||||
((current lissajous :inline)
|
||||
(dest lissajous :inline)
|
||||
(rate lissajous :inline)
|
||||
)
|
||||
(:methods
|
||||
(lissajous-interp-method-9 (_type_ vector) vector)
|
||||
(lissajous-interp-method-10 (_type_) float)
|
||||
(evaluate! (_type_ vector) vector)
|
||||
(update! (_type_) float)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
(defun vector-reflect-flat-gravity! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> arg1 quad))
|
||||
(vector-copy! s4-0 arg1)
|
||||
(vector-reflect-flat! arg0 s4-0 arg2)
|
||||
;; og:preserve-this
|
||||
(let* ((s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-0 1.0)) ;; src normalized
|
||||
@@ -698,7 +698,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-rot-diff! ((arg0 vector) (arg1 matrix) (arg2 matrix))
|
||||
(defun matrix-rot-diff! ((arg0 quaternion) (arg1 matrix) (arg2 matrix))
|
||||
"Get the difference of rotation between two matrices, expressed as a quaternion."
|
||||
(let ((s3-0 (new-stack-quaternion0))
|
||||
(s2-0 (new-stack-quaternion0))
|
||||
@@ -715,8 +715,8 @@
|
||||
)
|
||||
(let ((f30-1 (* 2.0 (acos (-> s5-0 w)))))
|
||||
(set! (-> arg0 quad) (-> s5-0 quad))
|
||||
(vector-negate! arg0 arg0)
|
||||
(if (= (vector-normalize-ret-len! arg0 1.0) 0.0)
|
||||
(vector-negate! (the-as vector arg0) (the-as vector arg0))
|
||||
(if (= (vector-normalize-ret-len! (the-as vector arg0) 1.0) 0.0)
|
||||
(set! (-> arg0 y) 1.0)
|
||||
)
|
||||
f30-1
|
||||
@@ -750,11 +750,11 @@
|
||||
"Slerp for vectors. (imagine that they are the z axis of two frames)"
|
||||
(cond
|
||||
((>= 0.0 arg3)
|
||||
(set! (-> arg0 quad) (-> arg1 quad))
|
||||
(vector-copy! arg0 arg1)
|
||||
arg0
|
||||
)
|
||||
((>= arg3 1.0)
|
||||
(set! (-> arg0 quad) (-> arg2 quad))
|
||||
(vector-copy! arg0 arg2)
|
||||
arg0
|
||||
)
|
||||
(else
|
||||
@@ -775,10 +775,10 @@
|
||||
(local-vars (sv-112 (function float float float float)))
|
||||
(cond
|
||||
((>= 0.0 arg3)
|
||||
(set! (-> arg0 quad) (-> arg1 quad))
|
||||
(vector-copy! arg0 arg1)
|
||||
)
|
||||
((>= arg3 1.0)
|
||||
(set! (-> arg0 quad) (-> arg2 quad))
|
||||
(vector-copy! arg0 arg2)
|
||||
)
|
||||
(else
|
||||
(let* ((s0-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 1.0))
|
||||
@@ -1433,7 +1433,7 @@
|
||||
(-> arg0 num-knots)
|
||||
)
|
||||
(dotimes (s2-0 s3-0)
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(vector-copy! s5-0 s4-0)
|
||||
(curve-evaluate!
|
||||
s4-0
|
||||
(/ (the float (+ s2-0 1)) (the float s3-0))
|
||||
@@ -1601,11 +1601,13 @@
|
||||
(vector-normalize! arg0 1.0)
|
||||
)
|
||||
|
||||
(defmethod lissajous-interp-method-9 ((this lissajous-interp) (arg0 vector))
|
||||
(lissajous-method-9 (-> this current) arg0)
|
||||
(defmethod evaluate! ((this lissajous-interp) (arg0 vector))
|
||||
"Set the x and y component of the vector to the current point on the curve."
|
||||
(evaluate! (-> this current) arg0)
|
||||
)
|
||||
|
||||
(defmethod lissajous-interp-method-10 ((this lissajous-interp))
|
||||
(defmethod update! ((this lissajous-interp))
|
||||
"Update both the interpolation, and the curves themselves."
|
||||
(seek! (-> this current x-mag) (-> this dest x-mag) (-> this rate x-mag))
|
||||
(seek! (-> this current y-mag) (-> this dest y-mag) (-> this rate y-mag))
|
||||
(seek! (-> this current theta-rate) (-> this dest theta-rate) (-> this rate theta-rate))
|
||||
@@ -1617,7 +1619,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod lissajous-method-9 ((this lissajous) (arg0 vector))
|
||||
(defmethod evaluate! ((this lissajous) (arg0 vector))
|
||||
"Set the x and y component of the vector to the current point on the curve."
|
||||
0.0
|
||||
0.0
|
||||
(let ((f30-0 (* (cos (* (-> this theta) (-> this wx))) (-> this x-mag)))
|
||||
|
||||
@@ -108,13 +108,13 @@
|
||||
)
|
||||
(else
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> this curve cverts (the int (the float (the int f24-0))) quad))
|
||||
(vector-copy! s4-0 (-> this curve cverts (the int (the float (the int f24-0)))))
|
||||
0.0
|
||||
(let ((f0-16 (vector-vector-distance s5-0 s4-0)))
|
||||
(cond
|
||||
((< f0-16 f26-0)
|
||||
(set! f26-0 (- f26-0 f0-16))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(vector-copy! s5-0 s4-0)
|
||||
f24-0
|
||||
)
|
||||
(else
|
||||
@@ -148,13 +148,13 @@
|
||||
)
|
||||
(cond
|
||||
((< arg1 0.0)
|
||||
(set! (-> arg0 quad) (-> this curve cverts 0 quad))
|
||||
(vector-copy! arg0 (-> this curve cverts 0))
|
||||
)
|
||||
((>= f0-3 (the float (+ a1-1 -1)))
|
||||
(set! (-> arg0 quad) (-> this curve cverts (+ a1-1 -1) quad))
|
||||
(vector-copy! arg0 (-> this curve cverts (+ a1-1 -1)))
|
||||
)
|
||||
((or (= arg2 'exact) (= f0-3 arg1))
|
||||
(set! (-> arg0 quad) (-> this curve cverts (the int f0-3) quad))
|
||||
(vector-copy! arg0 (-> this curve cverts (the int f0-3)))
|
||||
)
|
||||
(else
|
||||
(vector-lerp!
|
||||
@@ -174,7 +174,7 @@
|
||||
(cond
|
||||
((> (-> this curve num-cverts) 0)
|
||||
(let ((a0-2 (rand-vu-int-count (-> this curve num-cverts))))
|
||||
(set! (-> arg0 quad) (-> this curve cverts a0-2 quad))
|
||||
(vector-copy! arg0 (-> this curve cverts a0-2))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -182,7 +182,7 @@
|
||||
(if pp
|
||||
(format #t "current process is ~A~%" (-> pp name))
|
||||
)
|
||||
(set! (-> arg0 quad) (-> *null-vector* quad))
|
||||
(vector-copy! arg0 *null-vector*)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
@@ -381,7 +381,7 @@
|
||||
(vector+float*! sv-116 arg0 arg1 (-> s1-0 x))
|
||||
(cond
|
||||
((and s0-0 (not sv-120))
|
||||
(set! (-> sv-108 quad) (-> sv-116 quad))
|
||||
(vector-copy! sv-108 sv-116)
|
||||
(set! sv-112 (vector-vector-distance-squared sv-116 arg0))
|
||||
(set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y)))
|
||||
(set! sv-120 #t)
|
||||
@@ -389,7 +389,7 @@
|
||||
((and s0-0 sv-120)
|
||||
(let ((f0-22 (vector-vector-distance-squared sv-116 arg0)))
|
||||
(when (< f0-22 (the-as float sv-112))
|
||||
(set! (-> sv-108 quad) (-> sv-116 quad))
|
||||
(vector-copy! sv-108 sv-116)
|
||||
(set! sv-112 f0-22)
|
||||
(set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y)))
|
||||
)
|
||||
@@ -405,7 +405,7 @@
|
||||
(f0-33 (* f0-32 f0-32))
|
||||
)
|
||||
(when (< f0-33 (the-as float sv-112))
|
||||
(set! (-> sv-108 quad) (-> s0-1 quad))
|
||||
(vector-copy! sv-108 s0-1)
|
||||
(set! sv-112 f0-33)
|
||||
(set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y)))
|
||||
)
|
||||
@@ -416,7 +416,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> sv-96 quad) (-> sv-100 quad))
|
||||
(vector-copy! sv-96 sv-100)
|
||||
)
|
||||
)
|
||||
(set! sv-124 (/ sv-124 (the float (+ (-> this curve num-cverts) -1))))
|
||||
@@ -439,12 +439,12 @@
|
||||
(f28-0 0.0)
|
||||
)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-0 quad) (-> arg0 quad))
|
||||
(vector-copy! s3-0 arg0)
|
||||
(set! (-> s3-0 y) 0.0)
|
||||
(get-point-in-path! this s4-0 0.0 'interp)
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(dotimes (s1-0 (+ (-> this curve num-cverts) -1))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(vector-copy! s5-0 s4-0)
|
||||
(get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp)
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(let ((f0-5 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0)))
|
||||
@@ -469,10 +469,10 @@
|
||||
(f28-0 0.0)
|
||||
)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-0 quad) (-> arg0 quad))
|
||||
(vector-copy! s3-0 arg0)
|
||||
(get-point-in-path! this s4-0 0.0 'interp)
|
||||
(dotimes (s1-0 (+ (-> this curve num-cverts) -1))
|
||||
(set! (-> s5-0 quad) (-> s4-0 quad))
|
||||
(vector-copy! s5-0 s4-0)
|
||||
(get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp)
|
||||
(let ((f0-2 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0)))
|
||||
(when (< f0-2 f30-0)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
(set! sv-148 (the-as float 0.0))
|
||||
(set! sv-152 0)
|
||||
(set! sv-160 (new-stack-vector0))
|
||||
(set! (-> sv-144 quad) (-> sv-224 quad))
|
||||
(vector-copy! sv-144 sv-224)
|
||||
(set! sv-256 0)
|
||||
(while (< sv-256 (-> this num-planes))
|
||||
(when (and (!= sv-256 s3-0) (!= sv-256 sv-240))
|
||||
@@ -78,7 +78,7 @@
|
||||
)
|
||||
((zero? sv-152)
|
||||
(vector+float*! sv-144 sv-144 sv-192 f0-6)
|
||||
(set! (-> sv-160 quad) (-> s2-0 sv-256 quad))
|
||||
(vector-copy! sv-160 (-> s2-0 sv-256))
|
||||
(set! sv-148 (the-as float 8192000.0))
|
||||
(set! sv-152 1)
|
||||
)
|
||||
@@ -92,7 +92,7 @@
|
||||
)
|
||||
(else
|
||||
(vector+float*! sv-144 sv-144 sv-192 f0-6)
|
||||
(set! (-> sv-160 quad) (-> s2-0 sv-256 quad))
|
||||
(vector-copy! sv-160 (-> s2-0 sv-256))
|
||||
(set! sv-152 (+ sv-152 1))
|
||||
(if (< (fabs f0-6) (fabs sv-148))
|
||||
(set! sv-148 (- sv-148 f0-6))
|
||||
@@ -123,8 +123,8 @@
|
||||
(format 0 "ERROR <AG>: vol-control #x~X out of volume points~%" this)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg1 data (-> arg1 length) quad) (-> sv-144 quad))
|
||||
(set! (-> arg1 data (+ (-> arg1 length) 1) quad) (-> sv-224 quad))
|
||||
(vector-copy! (-> arg1 data (-> arg1 length)) sv-144)
|
||||
(vector-copy! (-> arg1 data (+ (-> arg1 length) 1)) sv-224)
|
||||
(+! (-> arg1 length) 2)
|
||||
(+! (-> this point-count) 2)
|
||||
)
|
||||
@@ -147,8 +147,8 @@
|
||||
(format 0 "ERROR <AG>: vol-control #x~X out of volume normals~%" this)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg2 data (-> arg2 length) quad) (-> s1-0 quad))
|
||||
(set! (-> arg2 data (+ (-> arg2 length) 1) quad) (-> s2-0 s3-0 quad))
|
||||
(vector-copy! (-> arg2 data (-> arg2 length)) s1-0)
|
||||
(vector-copy! (-> arg2 data (+ (-> arg2 length) 1)) (-> s2-0 s3-0))
|
||||
(+! (-> arg2 length) 2)
|
||||
(set! (-> this normal-count) (+ (-> this normal-count) 2))
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
(let ((gp-0 *math-camera*))
|
||||
(let ((v1-0 *hfrag-vu1-constants-base*))
|
||||
(dotimes (a0-1 81)
|
||||
(set! (-> arg0 base far-verts a0-1 quad) (-> v1-0 far-verts a0-1 quad))
|
||||
(vector-copy! (-> arg0 base far-verts a0-1) (-> v1-0 far-verts a0-1))
|
||||
)
|
||||
)
|
||||
(case *subdivide-draw-mode*
|
||||
@@ -231,8 +231,8 @@
|
||||
(new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2))
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> arg0 matrix)) (the-as pointer (-> gp-0 camera-temp)) 64)
|
||||
(set! (-> arg0 hvdf-offset quad) (-> gp-0 hvdf-off quad))
|
||||
(set! (-> arg0 hmge-scale quad) (-> gp-0 hmge-scale quad))
|
||||
(vector-copy! (-> arg0 hvdf-offset) (-> gp-0 hvdf-off))
|
||||
(vector-copy! (-> arg0 hmge-scale) (-> gp-0 hmge-scale))
|
||||
(set-vector! (-> arg0 fog) (-> gp-0 pfog0) (-> gp-0 fog-min) (-> gp-0 fog-max) 3072.0)
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -816,9 +816,9 @@
|
||||
((< (fabs (-> sv-72 z)) (fabs (-> sv-72 x)))
|
||||
(when (< (-> sv-72 x) 0.0)
|
||||
(let ((v1-15 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-15 quad) (-> sv-64 quad))
|
||||
(set! (-> sv-64 quad) (-> sv-68 quad))
|
||||
(set! (-> sv-68 quad) (-> v1-15 quad))
|
||||
(vector-copy! v1-15 sv-64)
|
||||
(vector-copy! sv-64 sv-68)
|
||||
(vector-copy! sv-68 v1-15)
|
||||
)
|
||||
(vector-negate! sv-72 sv-72)
|
||||
)
|
||||
@@ -883,9 +883,9 @@
|
||||
(else
|
||||
(when (< (-> sv-72 z) 0.0)
|
||||
(let ((v1-42 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-42 quad) (-> sv-64 quad))
|
||||
(set! (-> sv-64 quad) (-> sv-68 quad))
|
||||
(set! (-> sv-68 quad) (-> v1-42 quad))
|
||||
(vector-copy! v1-42 sv-64)
|
||||
(vector-copy! sv-64 sv-68)
|
||||
(vector-copy! sv-68 v1-42)
|
||||
)
|
||||
(vector-negate! sv-72 sv-72)
|
||||
)
|
||||
|
||||
@@ -46,12 +46,8 @@
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defun-debug clip-restore ()
|
||||
(let ((a0-0 (new-stack-vector0))
|
||||
(a1-0 (new 'stack-no-clear 'matrix))
|
||||
(a1-0 (new-stack-matrix0))
|
||||
)
|
||||
(set! (-> a1-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> a1-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> a1-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> a1-0 trans quad) (the-as uint128 0))
|
||||
(set! (-> a0-0 x) 92648.22)
|
||||
(set! (-> a0-0 y) 238025.03)
|
||||
(set! (-> a0-0 z) 199836.31)
|
||||
|
||||
@@ -271,10 +271,10 @@
|
||||
)
|
||||
(set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1))
|
||||
(set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d)))
|
||||
(set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad))
|
||||
(set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad))
|
||||
(set! (-> arg0 invh-scale quad) (-> v1-0 inv-hmge-scale quad))
|
||||
(set! (-> arg0 guard quad) (-> v1-0 guard quad))
|
||||
(vector-copy! (-> arg0 hvdf-offset) (-> v1-0 hvdf-off))
|
||||
(vector-copy! (-> arg0 hmge-scale) (-> v1-0 hmge-scale))
|
||||
(vector-copy! (-> arg0 invh-scale) (-> v1-0 inv-hmge-scale))
|
||||
(vector-copy! (-> arg0 guard) (-> v1-0 guard))
|
||||
)
|
||||
(set-tfrag-dists! (-> arg0 dists))
|
||||
(none)
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
)
|
||||
(cond
|
||||
((-> this zoom-blur-2d)
|
||||
(set! (-> s5-0 quad) (-> this zoom-blur-pos quad))
|
||||
(vector-copy! s5-0 (-> this zoom-blur-pos))
|
||||
(let* ((f2-0 (* (/ f28-0 512) (-> s5-0 x)))
|
||||
(f0-6 (- f26-0 (- f28-0 f2-0)))
|
||||
(f3-1 (* (/ f28-0 416) (-> s5-0 y)))
|
||||
@@ -483,7 +483,7 @@
|
||||
|
||||
(defmethod setup-zoom-blur-2d ((this blit-displays-work) (arg0 vector) (arg1 int) (arg2 float) (arg3 symbol))
|
||||
(set! (-> this zoom-blur-2d) arg3)
|
||||
(set! (-> this zoom-blur-pos quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this zoom-blur-pos) arg0)
|
||||
(set! (-> this zoom-blur-texels) arg1)
|
||||
(set! (-> this zoom-blur-alpha-target) arg2)
|
||||
0
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
(set! (-> s5-0 tri-strip-gif word 3) (shr (make-u128 0 (shl #x303e4000 32)) 32))
|
||||
(set! (-> s5-0 ad-gif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1))
|
||||
(set! (-> s5-0 ad-gif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d)))
|
||||
(set! (-> s5-0 hvdf-offset quad) (-> *math-camera* hvdf-off quad))
|
||||
(vector-copy! (-> s5-0 hvdf-offset) (-> *math-camera* hvdf-off))
|
||||
(quad-copy! (the-as pointer (-> s5-0 perspective)) (the-as pointer (-> *math-camera* perspective)) 4)
|
||||
(set-vector! (-> s5-0 fog) (-> *math-camera* pfog0) (-> *math-camera* fog-min) (-> *math-camera* fog-max) 0.0)
|
||||
(set-vector!
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
)
|
||||
(set! (-> s5-0 ad-gif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1))
|
||||
(set! (-> s5-0 ad-gif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d)))
|
||||
(set! (-> s5-0 hvdf-offset quad) (-> *math-camera* hvdf-off quad))
|
||||
(vector-copy! (-> s5-0 hvdf-offset) (-> *math-camera* hvdf-off))
|
||||
(quad-copy! (-> s5-0 perspective) (the-as pointer (-> *math-camera* perspective)) 4)
|
||||
(set-vector! (-> s5-0 fog) (-> *math-camera* pfog0) (-> *math-camera* fog-min) (-> *math-camera* fog-max) 0.0)
|
||||
)
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
(set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0)
|
||||
(set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x7 :nreg #x1))
|
||||
(set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d)))
|
||||
(set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad))
|
||||
(set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad))
|
||||
(set! (-> arg0 invh-scale quad) (-> v1-0 inv-hmge-scale quad))
|
||||
(set! (-> arg0 guard quad) (-> v1-0 guard quad))
|
||||
(vector-copy! (-> arg0 hvdf-offset) (-> v1-0 hvdf-off))
|
||||
(vector-copy! (-> arg0 hmge-scale) (-> v1-0 hmge-scale))
|
||||
(vector-copy! (-> arg0 invh-scale) (-> v1-0 inv-hmge-scale))
|
||||
(vector-copy! (-> arg0 guard) (-> v1-0 guard))
|
||||
)
|
||||
(set! (-> arg0 flush dword 0) (the-as uint #x3f80000080808080))
|
||||
(set! (-> arg0 flush dword 1) (the-as uint 1))
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
(defmethod set-point! ((this lightning-control) (arg0 int) (arg1 vector))
|
||||
(let ((v1-0 (-> this state)))
|
||||
(when (and (-> v1-0 path) (>= arg0 0) (< arg0 (-> v1-0 path length)))
|
||||
(set! (-> v1-0 path data arg0 quad) (-> arg1 quad))
|
||||
(vector-copy! (-> v1-0 path data arg0) arg1)
|
||||
(when (and (< (+ (-> v1-0 points-to-draw) -1) arg0) (case (-> v1-0 mode)
|
||||
((2 3)
|
||||
#t
|
||||
@@ -161,8 +161,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-0 line data arg0 quad) (-> arg1 quad))
|
||||
(set! (-> v1-0 meet data arg0 quad) (-> arg1 quad))
|
||||
(vector-copy! (-> v1-0 line data arg0) arg1)
|
||||
(vector-copy! (-> v1-0 meet data arg0) arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defmethod set-last-meet-point ((this lightning-control) (arg0 vector))
|
||||
(set! (-> this state meet data (+ (-> this state points-to-draw) -1) quad) (-> arg0 quad))
|
||||
(vector-copy! (-> this state meet data (+ (-> this state points-to-draw) -1)) arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
)
|
||||
(set! (-> s3-0 z) (the float (-> arg1 index)))
|
||||
(set! (-> s3-0 w) 1.0)
|
||||
(set! (-> this desired-points data arg0 quad) (-> s3-0 quad))
|
||||
(vector-copy! (-> this desired-points data arg0) s3-0)
|
||||
)
|
||||
(set! (-> this current-points data arg0 z) (the float (-> arg1 index)))
|
||||
(-> this desired-points data arg0)
|
||||
@@ -285,7 +285,7 @@
|
||||
(and (logtest? (-> a2-13 span-flags) 2) (not (logtest? (-> a2-13 span-flags) 1)))
|
||||
)
|
||||
(dotimes (v1-55 s3-0)
|
||||
(set! (-> this current-points data (+ v1-55 s5-0) quad) (-> this desired-points data (+ v1-55 s5-0) quad))
|
||||
(vector-copy! (-> this current-points data (+ v1-55 s5-0)) (-> this desired-points data (+ v1-55 s5-0)))
|
||||
)
|
||||
)
|
||||
(lightning-bolt-method-20 this s5-0 a2-13)
|
||||
@@ -296,7 +296,7 @@
|
||||
(when (time-elapsed? (-> this last-generate-time) (-> this new-inner-point-generate-time))
|
||||
(lightning-bolt-method-20 this s5-0 (-> this spans-internal data (-> this num-active-spans)))
|
||||
(if (-> this snap-inner-points?)
|
||||
(set! (-> this current-points data s5-0 quad) (-> this desired-points data s5-0 quad))
|
||||
(vector-copy! (-> this current-points data s5-0) (-> this desired-points data s5-0))
|
||||
)
|
||||
(set-time! (-> this last-generate-time))
|
||||
(set! (-> this new-inner-point-generate-time) (rand-vu-int-range
|
||||
@@ -414,7 +414,7 @@
|
||||
)
|
||||
|
||||
(defun matrix<-vector-yz2! ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(vector-copy! (-> arg0 fvec) arg1)
|
||||
(vector-cross! (-> arg0 rvec) arg2 arg1)
|
||||
(vector-normalize! (-> arg0 rvec) 1.0)
|
||||
(vector-cross! (-> arg0 uvec) arg1 (-> arg0 rvec))
|
||||
@@ -555,7 +555,7 @@
|
||||
(matrix<-vector-yz2! sv-224 sv-240 (choose-nice-perp sv-240))
|
||||
(let ((f30-0 (-> sv-96 random-offset-size-start)))
|
||||
(lightning-bolt-method-19 this sv-104 sv-48 (+ sv-48 1) sv-224 f30-0 sv-236)
|
||||
(set! (-> sv-232 quad) (-> this current-points data sv-48 quad))
|
||||
(vector-copy! sv-232 (-> this current-points data sv-48))
|
||||
(set! (-> sv-232 x) (* (-> sv-232 x) f30-0))
|
||||
(set! (-> sv-232 y) (* (-> sv-232 y) f30-0))
|
||||
)
|
||||
@@ -568,7 +568,7 @@
|
||||
(dotimes (s4-1 (-> sv-100 num-inner-points))
|
||||
(set! sv-256 (+ sv-48 1 s4-1))
|
||||
(lightning-bolt-method-19 this sv-104 (+ sv-256 -1) sv-256 sv-224 sv-248 sv-236)
|
||||
(set! (-> sv-232 quad) (-> this current-points data sv-256 quad))
|
||||
(vector-copy! sv-232 (-> this current-points data sv-256))
|
||||
(set! (-> sv-232 x) (* (-> sv-232 x) sv-248))
|
||||
(set! (-> sv-232 y) (* (-> sv-232 y) sv-248))
|
||||
(set! (-> sv-232 z) (- (-> sv-232 z) sv-244))
|
||||
@@ -598,7 +598,7 @@
|
||||
(vector-normalize! sv-428 1.0)
|
||||
(matrix<-vector-yz2! sv-416 sv-428 (choose-nice-perp sv-428))
|
||||
(let ((f0-33 (-> sv-288 random-offset-size-start)))
|
||||
(set! (-> sv-424 quad) (-> this current-points data sv-48 quad))
|
||||
(vector-copy! sv-424 (-> this current-points data sv-48))
|
||||
(set! (-> sv-424 x) (* (-> sv-424 x) f0-33))
|
||||
(set! (-> sv-424 y) (* (-> sv-424 y) f0-33))
|
||||
)
|
||||
@@ -766,7 +766,7 @@
|
||||
(defmethod lightning-bolt-method-18 ((this lightning-bolt) (arg0 prim-strip) (arg1 vector) (arg2 rgba) (arg3 float) (arg4 float))
|
||||
(when (< (-> arg0 num-verts) (-> arg0 allocated-num-verts))
|
||||
(let ((v1-5 (-> arg0 data (-> arg0 num-verts))))
|
||||
(set! (-> v1-5 pos quad) (-> arg1 quad))
|
||||
(vector-copy! (-> v1-5 pos) arg1)
|
||||
(set! (-> v1-5 col) arg2)
|
||||
(set! (-> v1-5 stq x) arg3)
|
||||
(set! (-> v1-5 stq y) arg4)
|
||||
@@ -782,7 +782,7 @@
|
||||
(init! (-> self bolt) 2 (+ (-> arg0 num-inner-points) 2) (-> arg0 appearance))
|
||||
(set! (-> self lifetime) (-> arg0 lifetime))
|
||||
(set! (-> self bolt span-pts-start data 0 quad) (-> arg0 start-pt quad))
|
||||
(set! (-> self bolt span-pts-start data 1 quad) (-> arg0 end-pt quad))
|
||||
(vector-copy! (-> self bolt span-pts-start data 1) (-> arg0 end-pt))
|
||||
(set! (-> self bolt spans-internal data 0 num-inner-points) (-> arg0 num-inner-points))
|
||||
(set! (-> self bolt spans data 0 inner-random-offset-size) (-> arg0 inner-random-offset-size))
|
||||
(set! (-> self bolt spans data 0 random-offset-size-start) (-> arg0 random-offset-size-start))
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
)
|
||||
(when sv-32
|
||||
(dotimes (v1-43 gp-0)
|
||||
(set! (-> sv-20 data v1-43 quad) (-> sv-24 data v1-43 quad))
|
||||
(vector-copy! (-> sv-20 data v1-43) (-> sv-24 data v1-43))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -382,7 +382,7 @@
|
||||
(case (-> sv-16 rand-func)
|
||||
((2)
|
||||
(set! (-> sv-24 data 0 quad) (-> sv-28 data 0 quad))
|
||||
(set! (-> sv-24 data s4-0 quad) (-> sv-28 data s4-0 quad))
|
||||
(vector-copy! (-> sv-24 data s4-0) (-> sv-28 data s4-0))
|
||||
(lightning-trail-fractal-gen (-> sv-24 data) (-> sv-28 data) 0 s4-0 (-> s5-0 box-size) sv-16)
|
||||
)
|
||||
(else
|
||||
@@ -391,7 +391,7 @@
|
||||
)
|
||||
(when sv-32
|
||||
(dotimes (v1-63 gp-0)
|
||||
(set! (-> sv-20 data v1-63 quad) (-> sv-28 data v1-63 quad))
|
||||
(vector-copy! (-> sv-20 data v1-63) (-> sv-28 data v1-63))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -642,18 +642,7 @@
|
||||
(set! (-> v1-81 base) (the-as pointer (the-as dma-packet (&+ (the-as dma-packet a0-73) 16))))
|
||||
)
|
||||
(set! sv-176 (the-as gcf-control (-> arg0 base)))
|
||||
(let* ((v1-84 (-> sv-176 matrix))
|
||||
(a3-31 (-> sv-16 perspective))
|
||||
(a0-76 (-> a3-31 rvec quad))
|
||||
(a1-88 (-> a3-31 uvec quad))
|
||||
(a2-58 (-> a3-31 fvec quad))
|
||||
(a3-32 (-> a3-31 trans quad))
|
||||
)
|
||||
(set! (-> v1-84 rvec quad) a0-76)
|
||||
(set! (-> v1-84 uvec quad) a1-88)
|
||||
(set! (-> v1-84 fvec quad) a2-58)
|
||||
(set! (-> v1-84 trans quad) a3-32)
|
||||
)
|
||||
(matrix-copy! (-> sv-176 matrix) (-> sv-16 perspective))
|
||||
(quad-copy! (the-as pointer (-> sv-176 giftag)) (the-as pointer (-> s1-0 giftag)) 3)
|
||||
(set! (-> sv-176 giftag num-strips) (the-as uint 1))
|
||||
(set! (-> sv-176 num-dps) (the-as uint (* sv-144 2)))
|
||||
|
||||
@@ -228,7 +228,7 @@ Without this corrector, the fogginess of the world would change as the FOV chang
|
||||
(set-vector! (-> arg0 sprite-2d fvec) 0.0 0.0 (- f0-48) 0.0)
|
||||
(set-vector! (-> arg0 sprite-2d trans) 0.0 0.0 (* 500000000.0 f0-48) (* 60.0 f0-48 (-> arg0 pfog0)))
|
||||
)
|
||||
(set! (-> arg0 sprite-2d-hvdf quad) (-> arg0 hvdf-off quad))
|
||||
(vector-copy! (-> arg0 sprite-2d-hvdf) (-> arg0 hvdf-off))
|
||||
(set! (-> arg0 sprite-2d-hvdf x) 2048.0)
|
||||
(set! (-> arg0 sprite-2d-hvdf y) 2048.0)
|
||||
(set! (-> arg0 sprite-2d-hvdf z) (-> arg0 hvdf-off z))
|
||||
@@ -354,12 +354,8 @@ Without this corrector, the fogginess of the world would change as the FOV chang
|
||||
)
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
(let ((a0-5 (new-stack-vector0))
|
||||
(s3-0 (new 'stack-no-clear 'matrix))
|
||||
(s3-0 (new-stack-matrix0))
|
||||
)
|
||||
(set! (-> s3-0 rvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 uvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 fvec quad) (the-as uint128 0))
|
||||
(set! (-> s3-0 trans quad) (the-as uint128 0))
|
||||
(vector-negate! a0-5 (-> arg0 rot))
|
||||
(matrix-rotate-zyx! s3-0 (-> arg0 rot))
|
||||
(vector-matrix*! s4-0 s4-0 s3-0)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
(defun get-sphere-interp ((arg0 sphere) (arg1 vector) (arg2 float) (arg3 float))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
0.0
|
||||
(set! (-> v1-0 quad) (-> arg0 quad))
|
||||
(vector-copy! v1-0 arg0)
|
||||
(vector-! v1-0 arg1 v1-0)
|
||||
(let ((f1-0 (vector-length v1-0)))
|
||||
(/ (fmax 0.0 (fmin (- f1-0 arg2) arg3)) arg3)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
(cond
|
||||
((logtest? (-> *time-of-day-context* mode) (ash 16 v1-0))
|
||||
(if (-> *time-of-day-context* overide-enable)
|
||||
(set! (-> arg0 times v1-0 quad) (-> *time-of-day-context* times v1-0 quad))
|
||||
(vector-copy! (-> arg0 times v1-0) (-> *time-of-day-context* times v1-0))
|
||||
(set! (-> arg0 times v1-0 w) 1.0)
|
||||
)
|
||||
)
|
||||
@@ -234,13 +234,13 @@
|
||||
(a0-16 (-> arg0 light-group))
|
||||
)
|
||||
(set! (-> v1-26 0 quad) (-> a2-1 amb-color quad))
|
||||
(set! (-> a1-2 quad) (-> a2-1 lgt-color quad))
|
||||
(set! (-> arg0 times 2 quad) (-> a1-2 quad))
|
||||
(set! (-> arg0 times 3 quad) (-> a1-2 quad))
|
||||
(set! (-> arg0 times 4 quad) (-> a1-2 quad))
|
||||
(vector-copy! a1-2 (-> a2-1 lgt-color))
|
||||
(vector-copy! (-> arg0 times 2) a1-2)
|
||||
(vector-copy! (-> arg0 times 3) a1-2)
|
||||
(vector-copy! (-> arg0 times 4) a1-2)
|
||||
(set! (-> a0-16 0 ambi color quad) (-> v1-26 0 quad))
|
||||
)
|
||||
(set! (-> arg0 current-sky-color quad) (-> arg1 mood-sky-table data s3-0 quad))
|
||||
(vector-copy! (-> arg0 current-sky-color) (-> arg1 mood-sky-table data s3-0))
|
||||
(mem-copy! (the-as pointer (-> arg0 current-fog)) (the-as pointer (-> arg1 mood-fog-table data s3-0)) 48)
|
||||
)
|
||||
(else
|
||||
@@ -251,9 +251,9 @@
|
||||
(let ((s0-0 (-> arg0 light-group)))
|
||||
(vector4-lerp! (the-as vector s1-0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0)
|
||||
(vector4-lerp! sv-64 (-> sv-32 lgt-color) (-> sv-48 lgt-color) f30-0)
|
||||
(set! (-> arg0 times 2 quad) (-> sv-64 quad))
|
||||
(set! (-> arg0 times 3 quad) (-> sv-64 quad))
|
||||
(set! (-> arg0 times 4 quad) (-> sv-64 quad))
|
||||
(vector-copy! (-> arg0 times 2) sv-64)
|
||||
(vector-copy! (-> arg0 times 3) sv-64)
|
||||
(vector-copy! (-> arg0 times 4) sv-64)
|
||||
(set! (-> s0-0 0 ambi color quad) (-> s1-0 0 quad))
|
||||
)
|
||||
)
|
||||
@@ -350,7 +350,7 @@
|
||||
(-> *level* level-default mood-context times 1)
|
||||
)
|
||||
(when arg1
|
||||
(set! (-> arg0 times 1 quad) (-> *level* level-default mood-context times 1 quad))
|
||||
(vector-copy! (-> arg0 times 1) (-> *level* level-default mood-context times 1))
|
||||
(set! (-> arg0 times 1 w) 1.0)
|
||||
)
|
||||
)
|
||||
@@ -764,10 +764,10 @@
|
||||
(v1-7 (-> arg0 times 1))
|
||||
)
|
||||
(set! (-> a1-7 0 quad) (-> (the-as (inline-array vector) (+ a0-6 16)) 0 quad))
|
||||
(set! (-> v1-7 quad) (-> (the-as (inline-array vector) (+ a0-6 0)) 0 quad))
|
||||
(set! (-> arg0 times 2 quad) (-> v1-7 quad))
|
||||
(set! (-> arg0 times 3 quad) (-> v1-7 quad))
|
||||
(set! (-> arg0 times 4 quad) (-> v1-7 quad))
|
||||
(vector-copy! v1-7 (-> (the-as (inline-array vector) (+ a0-6 0)) 0))
|
||||
(vector-copy! (-> arg0 times 2) v1-7)
|
||||
(vector-copy! (-> arg0 times 3) v1-7)
|
||||
(vector-copy! (-> arg0 times 4) v1-7)
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -778,9 +778,9 @@
|
||||
)
|
||||
(vector4-lerp! (the-as vector a0-14) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0)
|
||||
(vector4-lerp! s4-0 (the-as vector (+ s3-0 0)) (the-as vector (+ s2-0 0)) f30-0)
|
||||
(set! (-> arg0 times 2 quad) (-> s4-0 quad))
|
||||
(set! (-> arg0 times 3 quad) (-> s4-0 quad))
|
||||
(set! (-> arg0 times 4 quad) (-> s4-0 quad))
|
||||
(vector-copy! (-> arg0 times 2) s4-0)
|
||||
(vector-copy! (-> arg0 times 3) s4-0)
|
||||
(vector-copy! (-> arg0 times 4) s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
(defmethod ocean-mid-setup-constants ((this ocean) (arg0 ocean-mid-constants))
|
||||
(let ((v1-0 *math-camera*))
|
||||
(set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad))
|
||||
(set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad))
|
||||
(set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad))
|
||||
(vector-copy! (-> arg0 hmge-scale) (-> v1-0 hmge-scale))
|
||||
(vector-copy! (-> arg0 inv-hmge-scale) (-> v1-0 inv-hmge-scale))
|
||||
(vector-copy! (-> arg0 hvdf-offset) (-> v1-0 hvdf-off))
|
||||
(set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0)
|
||||
)
|
||||
(set-vector! (-> arg0 constants) -0.25 -0.5 0.0 393216.0)
|
||||
@@ -399,18 +399,7 @@
|
||||
(set! (-> a0-1 base) (&+ (the-as pointer a1-1) 16))
|
||||
)
|
||||
(let ((s3-0 (the-as object (-> arg0 base))))
|
||||
(let* ((t0-4 (the-as matrix s3-0))
|
||||
(t1-2 v1-3)
|
||||
(a0-2 (-> t1-2 rvec quad))
|
||||
(a1-3 (-> t1-2 uvec quad))
|
||||
(a3-4 (-> t1-2 fvec quad))
|
||||
(t1-3 (-> t1-2 trans quad))
|
||||
)
|
||||
(set! (-> t0-4 rvec quad) a0-2)
|
||||
(set! (-> t0-4 uvec quad) a1-3)
|
||||
(set! (-> t0-4 fvec quad) a3-4)
|
||||
(set! (-> t0-4 trans quad) t1-3)
|
||||
)
|
||||
(matrix-copy! (the-as matrix s3-0) v1-3)
|
||||
(let ((s2-0 (the-as object (&+ (the-as pointer s3-0) 48))))
|
||||
(vector-matrix*! s4-0 arg1 v1-3)
|
||||
(set! (-> (the-as vector s2-0) x) (-> s4-0 x))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user