[decompiler] clean up vector detection and add vector float product detection (#638)

* change

* recognize vector float product and update tests
This commit is contained in:
water111 2021-06-27 17:24:35 -04:00 committed by GitHub
parent bfb1fbe1fc
commit a6d5c4eda3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
146 changed files with 1085 additions and 1653 deletions

View file

@ -291,6 +291,12 @@ std::string get_simple_expression_op_name(SimpleExpression::Kind kind) {
return "max.ui";
case SimpleExpression::Kind::PCPYLD:
return "pcypld";
case SimpleExpression::Kind::VECTOR_PLUS:
return "vector+!2";
case SimpleExpression::Kind::VECTOR_MINUS:
return "vector-!2";
case SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT:
return "vector-float*!2";
default:
assert(false);
return {};
@ -342,6 +348,10 @@ int get_simple_expression_arg_count(SimpleExpression::Kind kind) {
case SimpleExpression::Kind::MAX_UNSIGNED:
case SimpleExpression::Kind::PCPYLD:
return 2;
case SimpleExpression::Kind::VECTOR_PLUS:
case SimpleExpression::Kind::VECTOR_MINUS:
case SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT:
return 3;
default:
assert(false);
return -1;
@ -362,6 +372,18 @@ SimpleExpression::SimpleExpression(Kind kind, const SimpleAtom& arg0, const Simp
assert(get_simple_expression_arg_count(kind) == 2);
}
SimpleExpression::SimpleExpression(Kind kind,
const SimpleAtom& arg0,
const SimpleAtom& arg1,
const SimpleAtom& arg2)
: n_args(3) {
m_args[0] = arg0;
m_args[1] = arg1;
m_args[2] = arg2;
m_kind = kind;
assert(get_simple_expression_arg_count(kind) == 3);
}
goos::Object SimpleExpression::to_form(const std::vector<DecompilerLabel>& labels,
const Env& env) const {
std::vector<goos::Object> forms;

View file

@ -223,6 +223,9 @@ class SimpleExpression {
MIN_UNSIGNED,
MAX_UNSIGNED,
PCPYLD,
VECTOR_PLUS,
VECTOR_MINUS,
VECTOR_FLOAT_PRODUCT
};
// how many arguments?
@ -235,6 +238,10 @@ class SimpleExpression {
SimpleExpression() = default;
SimpleExpression(Kind kind, const SimpleAtom& arg0);
SimpleExpression(Kind kind, const SimpleAtom& arg0, const SimpleAtom& arg1);
SimpleExpression(Kind kind,
const SimpleAtom& arg0,
const SimpleAtom& arg1,
const SimpleAtom& arg2);
goos::Object to_form(const std::vector<DecompilerLabel>& labels, const Env& env) const;
std::string to_string(const Env& env) const;
bool operator==(const SimpleExpression& other) const;
@ -256,7 +263,7 @@ class SimpleExpression {
private:
Kind m_kind = Kind::INVALID;
SimpleAtom m_args[2];
SimpleAtom m_args[3];
s8 n_args = -1;
};

View file

@ -195,6 +195,11 @@ TP_Type SimpleExpression::get_type(const TypeState& input,
case Kind::MOD_UNSIGNED:
case Kind::PCPYLD:
return TP_Type::make_from_ts("uint");
case Kind::VECTOR_PLUS:
case Kind::VECTOR_MINUS:
return TP_Type::make_from_ts("vector");
case Kind::VECTOR_FLOAT_PRODUCT:
return TP_Type::make_from_ts("vector");
default:
throw std::runtime_error("Simple expression cannot get_type: " +
to_form(env.file->labels, env).print());

View file

@ -1541,6 +1541,12 @@ std::string fixed_operator_to_string(FixedOperatorKind kind) {
return ".asm.sllv.r0";
case FixedOperatorKind::ASM_MADDS:
return ".asm.madd.s";
case FixedOperatorKind::VECTOR_MINUS:
return "vector-!";
case FixedOperatorKind::VECTOR_PLUS:
return "vector+!";
case FixedOperatorKind::VECTOR_FLOAT_PRODUCT:
return "vector-float*!";
default:
assert(false);
return "";

View file

@ -190,6 +190,17 @@ class SimpleExpressionElement : public FormElement {
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects);
void update_from_stack_vector_plus_minus(bool is_add,
const Env& env,
FormPool& pool,
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects);
void update_from_stack_vector_float_product(const Env& env,
FormPool& pool,
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects);
const SimpleExpression& expr() const { return m_expr; }

View file

@ -950,6 +950,54 @@ void SimpleExpressionElement::update_from_stack_pcypld(const Env& env,
result->push_back(new_form);
}
void SimpleExpressionElement::update_from_stack_vector_plus_minus(bool is_add,
const Env& env,
FormPool& pool,
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects) {
std::vector<Form*> popped_args =
pop_to_forms({m_expr.get_arg(0).var(), m_expr.get_arg(1).var(), m_expr.get_arg(2).var()}, env,
pool, stack, allow_side_effects);
for (int i = 0; i < 3; i++) {
auto arg_type = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(i).var().reg());
if (arg_type.typespec() != TypeSpec("vector")) {
popped_args.at(i) = cast_form(popped_args.at(i), TypeSpec("vector"), pool, env);
}
}
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(is_add ? FixedOperatorKind::VECTOR_PLUS
: FixedOperatorKind::VECTOR_MINUS),
std::vector<Form*>{popped_args.at(0), popped_args.at(1), popped_args.at(2)});
result->push_back(new_form);
}
void SimpleExpressionElement::update_from_stack_vector_float_product(
const Env& env,
FormPool& pool,
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects) {
std::vector<Form*> popped_args =
pop_to_forms({m_expr.get_arg(0).var(), m_expr.get_arg(1).var(), m_expr.get_arg(2).var()}, env,
pool, stack, allow_side_effects);
for (int i = 0; i < 3; i++) {
auto arg_type = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(i).var().reg());
TypeSpec desired_type(i == 2 ? "float" : "vector");
if (arg_type.typespec() != desired_type) {
popped_args.at(i) = cast_form(popped_args.at(i), desired_type, pool, env);
}
}
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::VECTOR_FLOAT_PRODUCT),
std::vector<Form*>{popped_args.at(0), popped_args.at(1), popped_args.at(2)});
result->push_back(new_form);
}
void SimpleExpressionElement::update_from_stack_copy_first_int_2(const Env& env,
FixedOperatorKind kind,
FormPool& pool,
@ -1559,6 +1607,15 @@ void SimpleExpressionElement::update_from_stack(const Env& env,
case SimpleExpression::Kind::PCPYLD:
update_from_stack_pcypld(env, pool, stack, result, allow_side_effects);
break;
case SimpleExpression::Kind::VECTOR_PLUS:
update_from_stack_vector_plus_minus(true, env, pool, stack, result, allow_side_effects);
break;
case SimpleExpression::Kind::VECTOR_MINUS:
update_from_stack_vector_plus_minus(false, env, pool, stack, result, allow_side_effects);
break;
case SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT:
update_from_stack_vector_float_product(env, pool, stack, result, allow_side_effects);
break;
default:
throw std::runtime_error(
fmt::format("SimpleExpressionElement::update_from_stack NYI for {}", to_string(env)));
@ -3786,110 +3843,6 @@ Form* is_load_store_vector_to_reg(const Register& reg,
return mr.maps.forms.at(0);
}
/*!
* try to convert to an assembly op, return nullptr if we can't.
*/
const AsmOp* get_asm_op(FormElement* form) {
auto as_asm = dynamic_cast<OpenGoalAsmOpElement*>(form);
if (as_asm) {
return as_asm->op();
}
auto two = dynamic_cast<AsmOpElement*>(form);
if (two) {
return two->op();
}
return nullptr;
}
/*!
* Is this vmove.w vfX, vf0? This is a common trick to set the w field.
*/
bool is_set_w_1(const Register& reg, FormElement* form, const Env&) {
auto as_asm = get_asm_op(form);
if (!as_asm) {
return false;
}
auto instr = as_asm->instruction();
if (instr.kind != InstructionKind::VMOVE) {
return false;
}
if (instr.cop2_dest != 1) {
return false;
}
if (!instr.get_src(0).is_reg(Register(Reg::VF, 0))) {
return false;
}
if (!instr.get_dst(0).is_reg(reg)) {
return false;
}
return true;
}
/*!
* Is this a COP2 op in the form vblah.mask vfX, vfY, vfZ?
*/
bool is_vf_3op_dst(InstructionKind kind,
u8 dest_mask,
const Register& dst,
const Register& src0,
const Register& src1,
FormElement* form) {
auto as_asm = get_asm_op(form);
if (!as_asm) {
return false;
}
auto instr = as_asm->instruction();
if (instr.kind != kind) {
return false;
}
if (instr.cop2_dest != dest_mask) {
return false;
}
if (!instr.get_src(0).is_reg(src0)) {
return false;
}
if (!instr.get_src(1).is_reg(src1)) {
return false;
}
if (!instr.get_dst(0).is_reg(dst)) {
return false;
}
return true;
}
/*!
* Make a vf register.
*/
Register vfr(int idx) {
return Register(Reg::VF, idx);
}
/*!
* Try to pop a variable from the stack again. If we are detecting a macro that flips argument
* evaluation order, we can use this to fix it up and remove temporaries.
* If the previous pop succeeded, this does nothing.
*/
Form* repop_arg(Form* in, FormStack& stack, const Env& env, FormPool& pool) {
auto as_atom = form_as_atom(in);
if (as_atom && as_atom->is_var()) {
return pop_to_forms({as_atom->var()}, env, pool, stack, true).at(0);
}
return in;
}
/*!
* Imagine:
* x = foo
@ -3934,122 +3887,6 @@ std::optional<RegisterAccess> form_as_ra(Form* form) {
return {};
}
/*!
* Handle an inlined call to vector-!
*/
bool try_vector_add_sub_inline(const Env& env,
FormPool& pool,
FormStack& stack,
bool is_add,
FormElement* store_element) {
// we are looking for 5 ops, none are sets, the store element is passed in separately, before
// propagating
auto elts = stack.try_getting_active_stack_entries({false, false, false, false});
if (!elts) {
return false;
}
int idx = 0;
if (is_add) {
// third (.vmove.w vf6 vf0)
if (!is_set_w_1(Register(Reg::VF, 6), elts->at(idx++).elt, env)) {
return false;
}
}
// check first: (.lvf vf4 (&-> arg1 quad))
auto first =
is_load_store_vector_to_reg(Register(Reg::VF, 4), elts->at(idx++).elt, true, nullptr);
if (!first) {
return false;
}
// second (.lvf vf5 (&-> a0-1 quad))
auto second =
is_load_store_vector_to_reg(Register(Reg::VF, 5), elts->at(idx++).elt, true, nullptr);
if (!second) {
return false;
}
if (!is_add) {
// third (.vmove.w vf6 vf0)
if (!is_set_w_1(Register(Reg::VF, 6), elts->at(idx++).elt, env)) {
return false;
}
}
// 4th (.vsub.xyz vf6 vf4 vf5)
if (!is_vf_3op_dst(is_add ? InstructionKind::VADD : InstructionKind::VSUB, 14, vfr(6), vfr(4),
vfr(5), elts->at(idx++).elt)) {
return false;
}
// 5th (and remember the index)
int store_idx = -1;
auto store = is_load_store_vector_to_reg(Register(Reg::VF, 6), store_element, false, &store_idx);
if (!store) {
return false;
}
// the store here _should_ have failed propagation and just given us a variable.
// if this is causing issues, we can run this check before propagating, as well call this from
// the function that attempts the pop.
auto store_var = form_as_ra(store);
if (!store_var) {
env.func->warnings.general_warning("Almost found vector add/sub, but couldn't get store var.");
return false;
}
// remove these from the stack.
stack.pop(4);
// ignore the store as a use. This will allow the entire vector-! expression to be expression
// propagated, if it is appropriate.
if (store_var) {
auto menv = const_cast<Env*>(&env);
menv->disable_use(*store_var);
}
// repop the arguments in the opposite order. this can eliminate temporaries as this will
// use the opposite order of the original attempt.
second = repop_arg(second, stack, env, pool);
first = repop_arg(first, stack, env, pool);
// now try to see if we can pop the first arg (destination vector).
bool got_orig = false;
RegisterAccess orig;
store = repop_passthrough_arg(store, stack, env, &orig, &got_orig);
// create the actual vector-! form
Form* new_thing = pool.alloc_single_element_form<GenericElement>(
nullptr,
GenericOperator::make_function(pool.alloc_single_element_form<ConstantTokenElement>(
nullptr, is_add ? "vector+!" : "vector-!")),
std::vector<Form*>{store, first, second});
if (got_orig) {
// we got a value for the destination. because we used the special repop passthrough,
// we're responsible for inserting a set to set the var that we "stole" from.
// We do this through push_value_to_reg, so it can be propagated if needed, but only if
// somebody will actually read the output.
// to tell, we look at the live out of the store op and the end - the earlier one would of
// course be live out always because the store will read it again.
auto& op_info = env.reg_use().op.at(store_idx);
if (op_info.live.find(orig.reg()) == op_info.live.end()) {
// nobody reads it, don't bother.
stack.push_form_element(new_thing->elts().at(0), true);
} else {
stack.push_value_to_reg(orig, new_thing, true, TypeSpec("vector"));
}
} else {
stack.push_form_element(new_thing->elts().at(0), true);
}
return true;
}
bool try_vector_reset_inline(const Env& env,
FormPool& pool,
FormStack& stack,
@ -4132,14 +3969,6 @@ void VectorFloatLoadStoreElement::push_to_stack(const Env& env, FormPool& pool,
auto name = env.func->guessed_name.to_string();
// don't find vector-! inside of vector-!.
if (!m_is_load && name != "vector-!" && name != "vector+!" && name != "vector-reset!") {
if (try_vector_add_sub_inline(env, pool, stack, true, this)) {
return;
}
if (try_vector_add_sub_inline(env, pool, stack, false, this)) {
return;
}
if (try_vector_reset_inline(env, pool, stack, this)) {
return;
}

View file

@ -148,6 +148,9 @@ enum class FixedOperatorKind {
ADDRESS_OF,
ASM_SLLV_R0,
ASM_MADDS,
VECTOR_PLUS,
VECTOR_MINUS,
VECTOR_FLOAT_PRODUCT,
INVALID
};

View file

@ -45,6 +45,10 @@ Register rsp() {
return make_gpr(Reg::SP);
}
Register make_vf(int idx) {
return Register(Reg::VF, idx);
}
/////////////////////////
// Variable Helpers
/////////////////////////
@ -1393,6 +1397,100 @@ std::unique_ptr<AtomicOp> convert_4(const Instruction& i0,
// OP 5 Conversions
//////////////////////
std::unique_ptr<AtomicOp> convert_vector_plus(const Instruction& i0,
const Instruction& i1,
const Instruction& i2,
const Instruction& i3,
const Instruction& i4,
int idx) {
// vmove.w vf6, vf0
if (i0.kind != InstructionKind::VMOVE || i0.get_src(0).get_reg() != make_vf(0) ||
i0.get_dst(0).get_reg() != make_vf(6) || i0.cop2_dest != 1) {
return nullptr;
}
// lqc2 vf4, 0(a1) (src1)
if (i1.kind != InstructionKind::LQC2 || i1.get_dst(0).get_reg() != make_vf(4) ||
!i1.get_src(0).is_imm(0)) {
return nullptr;
}
Register src1 = i1.get_src(1).get_reg();
// lqc2 vf5, 0(a2) (src2)
if (i2.kind != InstructionKind::LQC2 || i2.get_dst(0).get_reg() != make_vf(5) ||
!i2.get_src(0).is_imm(0)) {
return nullptr;
}
Register src2 = i2.get_src(1).get_reg();
// vadd.xyz vf6, vf4, vf5
if (i3.kind != InstructionKind::VADD || i3.get_dst(0).get_reg() != make_vf(6) ||
i3.get_src(0).get_reg() != make_vf(4) || i3.get_src(1).get_reg() != make_vf(5) ||
i3.cop2_dest != 14) {
return nullptr;
}
// sqc2 vf6, 0(a0) (dst)
if (i4.kind != InstructionKind::SQC2 || i4.get_src(0).get_reg() != make_vf(6) ||
!i4.get_src(1).is_imm(0)) {
return nullptr;
}
Register dst = i4.get_src(2).get_reg();
return std::make_unique<SetVarOp>(
make_dst_var(dst, idx),
SimpleExpression(SimpleExpression::Kind::VECTOR_PLUS, make_src_atom(dst, idx),
make_src_atom(src1, idx), make_src_atom(src2, idx)),
idx);
}
std::unique_ptr<AtomicOp> convert_vector_minus(const Instruction& i0,
const Instruction& i1,
const Instruction& i2,
const Instruction& i3,
const Instruction& i4,
int idx) {
// lqc2 vf4, 0(a1) (src1)
if (i0.kind != InstructionKind::LQC2 || i0.get_dst(0).get_reg() != make_vf(4) ||
!i0.get_src(0).is_imm(0)) {
return nullptr;
}
Register src1 = i0.get_src(1).get_reg();
// lqc2 vf5, 0(a2) (src2)
if (i1.kind != InstructionKind::LQC2 || i1.get_dst(0).get_reg() != make_vf(5) ||
!i1.get_src(0).is_imm(0)) {
return nullptr;
}
Register src2 = i1.get_src(1).get_reg();
// vmove.w vf6, vf0
if (i2.kind != InstructionKind::VMOVE || i2.get_src(0).get_reg() != make_vf(0) ||
i2.get_dst(0).get_reg() != make_vf(6) || i2.cop2_dest != 1) {
return nullptr;
}
// vadd.xyz vf6, vf4, vf5
if (i3.kind != InstructionKind::VSUB || i3.get_dst(0).get_reg() != make_vf(6) ||
i3.get_src(0).get_reg() != make_vf(4) || i3.get_src(1).get_reg() != make_vf(5) ||
i3.cop2_dest != 14) {
return nullptr;
}
// sqc2 vf6, 0(a0) (dst)
if (i4.kind != InstructionKind::SQC2 || i4.get_src(0).get_reg() != make_vf(6) ||
!i4.get_src(1).is_imm(0)) {
return nullptr;
}
Register dst = i4.get_src(2).get_reg();
return std::make_unique<SetVarOp>(
make_dst_var(dst, idx),
SimpleExpression(SimpleExpression::Kind::VECTOR_MINUS, make_src_atom(dst, idx),
make_src_atom(src1, idx), make_src_atom(src2, idx)),
idx);
}
std::unique_ptr<AtomicOp> convert_5(const Instruction& i0,
const Instruction& i1,
const Instruction& i2,
@ -1410,6 +1508,86 @@ std::unique_ptr<AtomicOp> convert_5(const Instruction& i0,
i3.get_src(0).is_reg(s6) && i4.kind == InstructionKind::MFLO1 && i4.get_dst(0).is_reg(s6)) {
return std::make_unique<SpecialOp>(SpecialOp::Kind::SUSPEND, idx);
}
auto as_vector_plus = convert_vector_plus(i0, i1, i2, i3, i4, idx);
if (as_vector_plus) {
return as_vector_plus;
}
auto as_vector_minus = convert_vector_minus(i0, i1, i2, i3, i4, idx);
if (as_vector_minus) {
return as_vector_minus;
}
return nullptr;
}
std::unique_ptr<AtomicOp> convert_vector_float_product(const Instruction& i0,
const Instruction& i1,
const Instruction& i2,
const Instruction& i3,
const Instruction& i4,
const Instruction& i5,
int idx) {
// lqc2 vf1, 0(vect_in)
if (i0.kind != InstructionKind::LQC2 || i0.get_dst(0).get_reg() != make_vf(1) ||
!i0.get_src(0).is_imm(0)) {
return nullptr;
}
Register vec_src = i0.get_src(1).get_reg();
// mfc1 gpr_temp, float_in
if (i1.kind != InstructionKind::MFC1) {
return nullptr;
}
Register gpr_temp = i1.get_dst(0).get_reg();
Register float_src = i1.get_src(0).get_reg();
// qmtc2.i vf2, gpr_temp
if (i2.kind != InstructionKind::QMTC2 || i2.get_dst(0).get_reg() != make_vf(2) ||
i2.get_src(0).get_reg() != gpr_temp) {
return nullptr;
}
// vaddx.w vf1, vf0, vf0
if (i3.kind != InstructionKind::VADD_BC || i3.get_dst(0).get_reg() != make_vf(1) ||
i3.get_src(0).get_reg() != make_vf(0) || i3.get_src(1).get_reg() != make_vf(0) ||
i3.cop2_bc != 0 || i3.cop2_dest != 1) {
return nullptr;
}
// vmulx.xyz vf1, vf1, vf2
if (i4.kind != InstructionKind::VMUL_BC || i4.get_dst(0).get_reg() != make_vf(1) ||
i4.get_src(0).get_reg() != make_vf(1) || i4.get_src(1).get_reg() != make_vf(2) ||
i4.cop2_dest != 14 || i4.cop2_bc != 0) {
return nullptr;
}
// sqc2 vf1, 0(gE)
if (i5.kind != InstructionKind::SQC2 || i5.get_src(0).get_reg() != make_vf(1) ||
!i5.get_src(1).is_imm(0)) {
return nullptr;
}
Register dst = i5.get_src(2).get_reg();
return std::make_unique<SetVarOp>(
make_dst_var(dst, idx),
SimpleExpression(SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT, make_src_atom(dst, idx),
make_src_atom(vec_src, idx), make_src_atom(float_src, idx)),
idx);
}
std::unique_ptr<AtomicOp> convert_6(const Instruction& i0,
const Instruction& i1,
const Instruction& i2,
const Instruction& i3,
const Instruction& i4,
const Instruction& i5,
int idx) {
auto as_vector_float_product = convert_vector_float_product(i0, i1, i2, i3, i4, i5, idx);
if (as_vector_float_product) {
return as_vector_float_product;
}
return nullptr;
}
@ -1445,7 +1623,16 @@ int convert_block_to_atomic_ops(int begin_idx,
warnings.warn_sq_lq();
}
if (n_instr >= 5) {
if (n_instr >= 6) {
// try 6 instructions
op = convert_6(instr[0], instr[1], instr[2], instr[3], instr[4], instr[5], op_idx);
if (op) {
converted = true;
length = 6;
}
}
if (!converted && n_instr >= 5) {
// try 5 instructions
op = convert_5(instr[0], instr[1], instr[2], instr[3], instr[4], op_idx);
if (op) {

View file

@ -336,6 +336,23 @@ FormElement* fix_up_abs_2(LetElement* in, const Env& env, FormPool& pool) {
return in;
}
FormElement* rewrite_empty_let(LetElement* in, const Env&, FormPool&) {
if (in->entries().size() != 1) {
return nullptr;
}
if (!in->body()->elts().empty()) {
return nullptr;
}
auto reg = in->entries().at(0).dest.reg();
if (reg.get_kind() == Reg::GPR && !reg.allowed_local_gpr()) {
return nullptr;
}
return in->entries().at(0).src->try_as_single_element();
}
/*!
* Attempt to rewrite a let as another form. If it cannot be rewritten, this will return nullptr.
*/
@ -360,6 +377,11 @@ FormElement* rewrite_let(LetElement* in, const Env& env, FormPool& pool) {
return as_abs_2;
}
auto as_unused = rewrite_empty_let(in, env, pool);
if (as_unused) {
return as_unused;
}
// nothing matched.
return nullptr;
}

View file

@ -8,28 +8,10 @@
;; definition for function position-in-front-of-camera!
(defun position-in-front-of-camera! ((arg0 vector) (arg1 float) (arg2 float))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((v1-0 arg0))
(let ((a0-2 (-> *math-camera* inv-camera-rot vector 2))
(f0-0 arg1)
)
(.lvf vf1 (&-> a0-2 quad))
(let ((a0-3 f0-0))
(.mov vf2 a0-3)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-0 quad) vf1)
)
(vector+float*! arg0 arg0 (-> *math-camera* inv-camera-rot vector 1) arg2)
(vector+! arg0 arg0 (-> *math-camera* trans))
arg0
)
(vector-float*! arg0 (-> *math-camera* inv-camera-rot vector 2) arg1)
(vector+float*! arg0 arg0 (-> *math-camera* inv-camera-rot vector 1) arg2)
(vector+! arg0 arg0 (-> *math-camera* trans))
arg0
)
;; definition for function matrix-local->world

View file

@ -238,77 +238,37 @@
;; INFO: Return type mismatch int vs none.
;; TODO - vector-float*! replacement
(defmethod TODO-RENAME-10 cam-vector-seeker ((obj cam-vector-seeker) (arg0 vector))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((f0-0 0.0))
)
(cond
(arg0
(vector+! gp-0 (-> obj target) arg0)
(vector-! gp-0 gp-0 (-> obj value))
)
(else
(vector-! gp-0 (-> obj target) (-> obj value))
)
)
(let ((f30-1 (* (-> obj max-partial) (vector-length gp-0))))
(let ((v1-3 gp-0))
(let ((a0-5 gp-0)
(f0-3 (* (-> obj accel) (-> *display* time-adjust-ratio)))
)
(.lvf vf1 (&-> a0-5 quad))
(let ((a0-6 f0-3))
(.mov vf2 a0-6)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-3 quad) vf1)
)
(vector+! (-> obj vel) (-> obj vel) gp-0)
(let ((f0-4 (vector-length (-> obj vel)))
(f1-2 (fmin f30-1 (-> obj max-vel)))
)
(when (< f1-2 f0-4)
(let ((v1-6 (-> obj vel)))
(let ((a0-9 (-> obj vel))
(f0-5 (/ f1-2 f0-4))
)
(.lvf vf1 (&-> a0-9 quad))
(let ((a0-10 f0-5))
(.mov vf2 a0-10)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-6 quad) vf1)
)
)
)
)
(let ((v1-7 gp-0))
(let ((a0-11 (-> obj vel))
(f0-6 (-> *display* time-adjust-ratio))
)
(.lvf vf1 (&-> a0-11 quad))
(let ((a0-12 f0-6))
(.mov vf2 a0-12)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-7 quad) vf1)
)
(vector+! (-> obj value) (-> obj value) gp-0)
(let ((gp-0 (new 'stack-no-clear 'vector)))
0.0
(cond
(arg0
(vector+! gp-0 (-> obj target) arg0)
(vector-! gp-0 gp-0 (-> obj value))
)
(else
(vector-! gp-0 (-> obj target) (-> obj value))
)
)
(let ((v0-2 0))
(let ((f30-1 (* (-> obj max-partial) (vector-length gp-0))))
(vector-float*!
gp-0
gp-0
(* (-> obj accel) (-> *display* time-adjust-ratio))
)
(vector+! (-> obj vel) (-> obj vel) gp-0)
(let ((f0-4 (vector-length (-> obj vel)))
(f1-2 (fmin f30-1 (-> obj max-vel)))
)
(if (< f1-2 f0-4)
(vector-float*! (-> obj vel) (-> obj vel) (/ f1-2 f0-4))
)
)
)
(none)
(vector-float*! gp-0 (-> obj vel) (-> *display* time-adjust-ratio))
(vector+! (-> obj value) (-> obj value) gp-0)
)
0
(none)
)
;; definition of type cam-rotation-tracker

View file

@ -11,72 +11,42 @@
;; definition for function update-wind
;; INFO: Return type mismatch int vs none.
(defun update-wind ((arg0 wind-work) (arg1 (array uint8)))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(let* ((f0-1 (+ (-> arg0 wind-normal w) (rand-vu-float-range -1024.0 1024.0)))
(f30-1 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0)))
)
(init-vf0-vector)
(let*
((f0-1 (+ (-> arg0 wind-normal w) (rand-vu-float-range -1024.0 1024.0)))
(f30-1 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0)))
)
(set! (-> arg0 wind-normal w) f30-1)
(set! (-> arg0 wind-normal x) (cos f30-1))
(set! (-> arg0 wind-normal z) (sin f30-1))
)
(set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1))
(let* ((s4-0 (logand (-> arg0 wind-time) 63))
(f0-4 (rand-vu-float-range 0.0 100.0))
(v1-5 (/ (-> arg0 wind-time) (the-as uint 120)))
(f1-6
(*
0.008333334
(the float (mod (-> arg0 wind-time) (the-as uint 120)))
)
(set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1))
(let* ((s4-0 (logand (-> arg0 wind-time) 63))
(f0-4 (rand-vu-float-range 0.0 100.0))
(v1-5 (/ (-> arg0 wind-time) (the-as uint 120)))
(f1-6 (* 0.008333334
(the float (mod (-> arg0 wind-time) (the-as uint 120)))
)
)
(f2-4
(*
0.0625
(the float (-> arg1 (mod (the-as int v1-5) (-> arg1 length))))
)
(f2-4 (* 0.0625
(the float (-> arg1 (mod (the-as int v1-5) (-> arg1 length))))
)
)
(f0-5
(*
(+
(*
(-
(*
0.0625
(the
float
(-> arg1 (mod (the-as int (+ v1-5 1)) (-> arg1 length)))
)
)
f2-4
)
f1-6
)
f2-4
)
f0-4
)
(f0-5 (* (+ (* (- (* 0.0625
(the float (-> arg1 (mod (the-as int (+ v1-5 1)) (-> arg1 length)))
)
)
f2-4
)
f1-6
)
f2-4
)
f0-4
)
)
)
)
(set! (-> *wind-work* wind-force s4-0) f0-5)
(let ((v1-14 (-> *wind-work* wind-array s4-0)))
(let ((a0-15 (-> arg0 wind-normal)))
(.lvf vf1 (&-> a0-15 quad))
)
(let ((a0-16 f0-5))
(.mov vf2 a0-16)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-14 quad) vf1)
)
(vector-float*! (-> *wind-work* wind-array s4-0) (-> arg0 wind-normal) f0-5)
)
(let ((v0-4 0))
)
(none)
)
0
(none)
)

View file

@ -521,26 +521,8 @@
(defun vector-v! ((arg0 vector))
"Convert a velocity to a displacement per frame. The velocity should be in X/actual_second"
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((v1-0 arg0))
(let ((a1-0 arg0)
(f0-0 (-> *display* seconds-per-frame))
)
(.lvf vf1 (&-> a1-0 quad))
(let ((a1-1 f0-0))
(.mov vf2 a1-1)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-0 quad) vf1)
)
arg0
)
(vector-float*! arg0 arg0 (-> *display* seconds-per-frame))
arg0
)
(defun vector-v+! ((result vector) (position vector) (velocity vector))
@ -564,26 +546,7 @@
(defun vector-v*float! ((delta-p vector) (velocity vector) (scale float))
"Go from velocity to delta-p per frame, scaling by scale"
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((v0-0 delta-p))
(let ((v1-0 velocity)
(f0-1 (* scale (-> *display* seconds-per-frame)))
)
(.lvf vf1 (&-> v1-0 quad))
(let ((v1-1 f0-1))
(.mov vf2 v1-1)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v0-0 quad) vf1)
v0-0
)
)
(vector-float*! delta-p velocity (* scale (-> *display* seconds-per-frame)))
)
(defun vector-v*float++! ((position vector) (velocity vector) (scale float))

View file

@ -548,80 +548,30 @@
;; definition for method 10 of type oscillating-vector
;; todo vector-float*!
(defmethod dummy-10 oscillating-vector ((obj oscillating-vector) (arg0 vector))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(cond
(arg0
(vector+! s5-0 (-> obj target) arg0)
(vector-! s5-0 s5-0 (-> obj value))
)
(else
(vector-! s5-0 (-> obj target) (-> obj value))
)
)
(let ((v1-3 s5-0))
(let ((a0-4 s5-0)
(f0-1 (* (-> obj accel) (-> *display* time-adjust-ratio)))
)
(.lvf vf1 (&-> a0-4 quad))
(let ((a0-5 f0-1))
(.mov vf2 a0-5)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-3 quad) vf1)
)
(vector+! (-> obj vel) (-> obj vel) s5-0)
(let ((f0-2 (vector-length (-> obj vel))))
(when (< (-> obj max-vel) f0-2)
(let ((v1-6 (-> obj vel)))
(let ((a0-8 (-> obj vel))
(f0-3 (/ (-> obj max-vel) f0-2))
)
(.lvf vf1 (&-> a0-8 quad))
(let ((a0-9 f0-3))
(.mov vf2 a0-9)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-6 quad) vf1)
)
)
)
(let ((v1-7 (-> obj vel)))
(let ((a0-10 (-> obj vel))
(f0-4 (-> obj damping))
)
(.lvf vf1 (&-> a0-10 quad))
(let ((a0-11 f0-4))
(.mov vf2 a0-11)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-7 quad) vf1)
)
(let ((v1-8 s5-0))
(let ((a0-12 (-> obj vel))
(f0-5 (-> *display* time-adjust-ratio))
)
(.lvf vf1 (&-> a0-12 quad))
(let ((a0-13 f0-5))
(.mov vf2 a0-13)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-8 quad) vf1)
)
(vector+! (-> obj value) (-> obj value) s5-0)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(cond
(arg0
(vector+! s5-0 (-> obj target) arg0)
(vector-! s5-0 s5-0 (-> obj value))
)
(else
(vector-! s5-0 (-> obj target) (-> obj value))
)
)
(-> obj value)
(vector-float*!
s5-0
s5-0
(* (-> obj accel) (-> *display* time-adjust-ratio))
)
(vector+! (-> obj vel) (-> obj vel) s5-0)
(let ((f0-2 (vector-length (-> obj vel))))
(if (< (-> obj max-vel) f0-2)
(vector-float*! (-> obj vel) (-> obj vel) (/ (-> obj max-vel) f0-2))
)
)
(vector-float*! (-> obj vel) (-> obj vel) (-> obj damping))
(vector-float*! s5-0 (-> obj vel) (-> *display* time-adjust-ratio))
(vector+! (-> obj value) (-> obj value) s5-0)
)
(-> obj value)
)

View file

@ -411,8 +411,7 @@
)
)
)
(let ((v0-0 0))
)
0
(none)
)
@ -434,8 +433,7 @@
(vector4-lerp! s5-0 s5-0 (-> arg0 fog-color) f0-8)
)
)
(let ((v0-3 0))
)
0
(none)
)
@ -478,8 +476,7 @@
(vector4-lerp! s5-0 s5-0 (-> arg0 fog-color) f0-15)
)
)
(let ((v0-6 0))
)
0
(none)
)

View file

@ -226,5 +226,4 @@
)
;; failed to figure out what this is:
(let ((v0-18 0))
)
0

View file

@ -193,5 +193,4 @@
)
;; failed to figure out what this is:
(let ((v0-10 0))
)
0

View file

@ -154,5 +154,4 @@
)
;; failed to figure out what this is:
(let ((v0-13 0))
)
0

View file

@ -16,8 +16,7 @@
(set! *redline-index* (+ *redline-index* 1))
(when (>= *redline-index* 400)
(set! *redline-index* 0)
(let ((v0-1 0))
)
0
)
(none)
)
@ -42,8 +41,7 @@
(set! *blueline-index* (+ *blueline-index* 1))
(when (>= *blueline-index* 400)
(set! *blueline-index* 0)
(let ((v0-1 0))
)
0
)
(none)
)
@ -68,8 +66,7 @@
(set! *greenline-index* (+ *greenline-index* 1))
(when (>= *greenline-index* 400)
(set! *greenline-index* 0)
(let ((v0-1 0))
)
0
)
(none)
)
@ -94,8 +91,7 @@
(set! *yellowline-index* (+ *yellowline-index* 1))
(when (>= *yellowline-index* 400)
(set! *yellowline-index* 0)
(let ((v0-1 0))
)
0
)
(none)
)
@ -120,8 +116,7 @@
(set! *timeplot-index* (+ *timeplot-index* 1))
(when (>= *timeplot-index* 400)
(set! *timeplot-index* 0)
(let ((v0-1 0))
)
0
)
(none)
)
@ -137,10 +132,6 @@
(define-perm *cam-layout* symbol #f)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0
)

View file

@ -23,9 +23,4 @@
(define-perm *camera-orbit-target* process-drawable #f)
;; failed to figure out what this is:
(let ((v0-0 0))
)
0

View file

@ -3,28 +3,10 @@
;; definition for function position-in-front-of-camera!
(defun position-in-front-of-camera! ((arg0 vector) (arg1 float) (arg2 float))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((v1-0 arg0))
(let ((a0-2 (-> *math-camera* inv-camera-rot vector 2))
(f0-0 arg1)
)
(.lvf vf1 (&-> a0-2 quad))
(let ((a0-3 f0-0))
(.mov vf2 a0-3)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-0 quad) vf1)
)
(vector+float*! arg0 arg0 (-> *math-camera* inv-camera-rot vector 1) arg2)
(vector+! arg0 arg0 (-> *math-camera* trans))
arg0
)
(vector-float*! arg0 (-> *math-camera* inv-camera-rot vector 2) arg1)
(vector+float*! arg0 arg0 (-> *math-camera* inv-camera-rot vector 1) arg2)
(vector+! arg0 arg0 (-> *math-camera* trans))
arg0
)
;; definition for function matrix-local->world
@ -93,8 +75,7 @@
(send-event-function *camera* a1-2)
)
)
(let ((v0-4 0))
)
0
(none)
)
)

View file

@ -10,8 +10,7 @@
;; failed to figure out what this is:
(when (or (not *camera-look-through-other*) (zero? *camera-look-through-other*))
(set! *camera-look-through-other* 0)
(let ((v1-4 0))
)
0
)
;; definition (perm) for symbol *camera-other-fov*, type bfloat
@ -34,5 +33,4 @@
(define-perm *camera-other-root* vector (vector-reset! (new 'global 'vector)))
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -247,8 +247,7 @@
(set! (-> obj accel) arg1)
(set! (-> obj max-vel) arg2)
(set! (-> obj max-partial) arg3)
(let ((v0-0 0))
)
0
(none)
)
@ -264,18 +263,15 @@
(set! (-> obj accel) (-> arg0 accel))
(set! (-> obj max-vel) (-> arg0 max-vel))
(set! (-> obj max-partial) (-> arg0 max-partial))
(let ((v0-0 0))
)
0
(none)
)
;; definition for method 11 of type cam-float-seeker
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-11 cam-float-seeker ((obj cam-float-seeker) (arg0 float))
(let ((f0-0 0.0))
)
(let ((f0-1 0.0))
)
0.0
0.0
(let* ((f1-2 (- (+ (-> obj target) arg0) (-> obj value)))
(f0-5 (* (-> obj max-partial) (fabs f1-2)))
)
@ -293,8 +289,7 @@
(let ((f0-10 (* (-> obj vel) (-> *display* time-adjust-ratio))))
(set! (-> obj value) (+ (-> obj value) f0-10))
)
(let ((v0-0 0))
)
0
(none)
)
@ -358,8 +353,7 @@
(set! (-> obj accel) arg1)
(set! (-> obj max-vel) arg2)
(set! (-> obj max-partial) arg3)
(let ((v0-0 0))
)
0
(none)
)
@ -369,77 +363,37 @@
TODO-RENAME-10
cam-vector-seeker
((obj cam-vector-seeker) (arg0 vector))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((f0-0 0.0))
(let ((gp-0 (new 'stack-no-clear 'vector)))
0.0
(cond
(arg0
(vector+! gp-0 (-> obj target) arg0)
(vector-! gp-0 gp-0 (-> obj value))
)
(cond
(arg0
(vector+! gp-0 (-> obj target) arg0)
(vector-! gp-0 gp-0 (-> obj value))
)
(else
(vector-! gp-0 (-> obj target) (-> obj value))
)
(else
(vector-! gp-0 (-> obj target) (-> obj value))
)
(let ((f30-1 (* (-> obj max-partial) (vector-length gp-0))))
(let ((v1-3 gp-0))
(let ((a0-5 gp-0)
(f0-3 (* (-> obj accel) (-> *display* time-adjust-ratio)))
)
(.lvf vf1 (&-> a0-5 quad))
(let ((a0-6 f0-3))
(.mov vf2 a0-6)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-3 quad) vf1)
)
(vector+! (-> obj vel) (-> obj vel) gp-0)
(let ((f0-4 (vector-length (-> obj vel)))
(f1-2 (fmin f30-1 (-> obj max-vel)))
)
(when (< f1-2 f0-4)
(let ((v1-6 (-> obj vel)))
(let ((a0-9 (-> obj vel))
(f0-5 (/ f1-2 f0-4))
)
(.lvf vf1 (&-> a0-9 quad))
(let ((a0-10 f0-5))
(.mov vf2 a0-10)
)
(let ((f30-1 (* (-> obj max-partial) (vector-length gp-0))))
(vector-float*!
gp-0
gp-0
(* (-> obj accel) (-> *display* time-adjust-ratio))
)
(vector+! (-> obj vel) (-> obj vel) gp-0)
(let ((f0-4 (vector-length (-> obj vel)))
(f1-2 (fmin f30-1 (-> obj max-vel)))
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-6 quad) vf1)
)
)
(if (< f1-2 f0-4)
(vector-float*! (-> obj vel) (-> obj vel) (/ f1-2 f0-4))
)
)
(let ((v1-7 gp-0))
(let ((a0-11 (-> obj vel))
(f0-6 (-> *display* time-adjust-ratio))
)
(.lvf vf1 (&-> a0-11 quad))
(let ((a0-12 f0-6))
(.mov vf2 a0-12)
)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-7 quad) vf1)
)
(vector+! (-> obj value) (-> obj value) gp-0)
)
(let ((v0-2 0))
)
(none)
(vector-float*! gp-0 (-> obj vel) (-> *display* time-adjust-ratio))
(vector+! (-> obj value) (-> obj value) gp-0)
)
0
(none)
)
;; definition of type cam-rotation-tracker
@ -790,5 +744,4 @@
)
;; failed to figure out what this is:
(let ((v0-28 0))
)
0

View file

@ -192,5 +192,4 @@
)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -50,12 +50,7 @@
(y-rat (-> math-cam y-ratio))
(cull-info (-> math-cam cull-info))
)
(let
((unused-x-thing
(/ (+ 1.0 (* (* 4.0 x-rat) x-rat)) (+ 1.0 (* x-rat x-rat)))
)
)
)
(/ (+ 1.0 (* (* 4.0 x-rat) x-rat)) (+ 1.0 (* x-rat x-rat)))
(let ((y-thing (/ (+ 1.0 (* (* 4.0 y-rat) y-rat)) (+ 1.0 (* y-rat y-rat)))))
(set!
(-> cull-info x-fact)
@ -149,8 +144,7 @@
(let ((fog-constant-1 100.0)
(fog-constant-2 16760631.0)
)
(let ((f0-21 16777115.0))
)
16777115.0
(let
((fog-at-near-plane
(/
@ -275,12 +269,9 @@
)
)
)
(let ((v1-17 0))
)
(let ((v1-20 (make-u128 0 (shl #x301ec000 32))))
)
(let ((v1-23 (make-u128 0 (shl #x303ec000 32))))
)
0
(make-u128 0 (shl #x301ec000 32))
(make-u128 0 (shl #x303ec000 32))
(let ((pfog (-> math-cam pfog0)))
(let ((vis-gif-0 (-> math-cam vis-gifs)))
(set! (-> vis-gif-0 0 fog0) (the-as uint pfog))
@ -478,8 +469,7 @@
(vf31 :class vf)
)
(init-vf0-vector)
(let ((v1-0 0))
)
0
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
(.lvf vf25 (&-> *math-camera* camera-temp vector 1 quad))
(.lvf vf26 (&-> *math-camera* camera-temp vector 2 quad))
@ -526,8 +516,7 @@
(vf31 :class vf)
)
(init-vf0-vector)
(let ((v1-0 0))
)
0
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
(.lvf vf25 (&-> *math-camera* camera-temp vector 1 quad))
(.lvf vf26 (&-> *math-camera* camera-temp vector 2 quad))
@ -574,8 +563,7 @@
(vf31 :class vf)
)
(init-vf0-vector)
(let ((v1-0 0))
)
0
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
(.lvf vf25 (&-> *math-camera* camera-temp vector 1 quad))
(.lvf vf26 (&-> *math-camera* camera-temp vector 2 quad))
@ -598,8 +586,7 @@
(.add.vf vf28 vf28 vf30)
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(.svf (&-> arg0 quad) vf28)
(let ((a0-2 (zero? (logand v1-7 63))))
)
(zero? (logand v1-7 63))
(.mov v0-0 vf23)
v0-0
)

View file

@ -47,5 +47,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -104,5 +104,4 @@
)
;; failed to figure out what this is:
(let ((v0-9 0))
)
0

View file

@ -37,8 +37,7 @@
drawable-tree-collide-fragment
((obj drawable-tree-collide-fragment) (arg0 int))
(dummy-11 (-> obj data 0) (-> obj length))
(let ((v0-1 0))
)
0
(none)
)
@ -49,8 +48,7 @@
drawable-tree-collide-fragment
((obj drawable-tree-collide-fragment) (arg0 int))
(dummy-12 (-> obj data 0) (-> obj length))
(let ((v0-1 0))
)
0
(none)
)
@ -61,8 +59,7 @@
drawable-tree-collide-fragment
((obj drawable-tree-collide-fragment) (arg0 int))
(dummy-13 (-> obj data 0) (-> obj length))
(let ((v0-1 0))
)
0
(none)
)
@ -162,8 +159,7 @@
drawable-inline-array-collide-fragment
((obj drawable-inline-array-collide-fragment) (arg0 int))
(dummy-11 (the-as collide-fragment (-> obj data)) (-> obj length))
(let ((v0-1 0))
)
0
(none)
)
@ -174,8 +170,7 @@
drawable-inline-array-collide-fragment
((obj drawable-inline-array-collide-fragment) (arg0 int))
(dummy-12 (the-as collide-fragment (-> obj data)) (-> obj length))
(let ((v0-1 0))
)
0
(none)
)
@ -186,8 +181,7 @@
drawable-inline-array-collide-fragment
((obj drawable-inline-array-collide-fragment) (arg0 int))
(dummy-13 (the-as collide-fragment (-> obj data)) (-> obj length))
(let ((v0-1 0))
)
0
(none)
)
@ -214,7 +208,3 @@
)
obj
)

View file

@ -108,8 +108,7 @@
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(let ((a2-0 (-> type-to-make size)))
)
(-> type-to-make size)
(let ((gp-0 (t9-0 allocation v1-1)))
((method-of-type touching-prims-entry-pool init-list!)
(the-as touching-prims-entry-pool gp-0)
@ -187,8 +186,7 @@
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(let ((a2-0 (-> type-to-make size)))
)
(-> type-to-make size)
(let ((obj (the-as touching-list (t9-0 allocation v1-1))))
(set! (-> obj num-touching-shapes) 0)
(set! (-> obj resolve-u) 0)

View file

@ -509,5 +509,4 @@
)
;; failed to figure out what this is:
(let ((v0-37 0))
)
0

View file

@ -63,5 +63,4 @@
(define *res-key-string* (new 'global 'string 64 (the-as string #f)))
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -62,5 +62,4 @@
(define *__private-assert-info* (new 'static '__assert-info-private-struct))
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -66,5 +66,4 @@
)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -83,8 +83,7 @@
)
)
)
(let ((v0-10 0))
)
0
(none)
)
@ -131,8 +130,7 @@
(add-debug-line #t arg0 s4-0 s2-0 arg3 #f (the-as rgba -1))
)
)
(let ((v0-2 0))
)
0
(none)
)
)

View file

@ -129,8 +129,7 @@
(set! (-> obj to-spr-waits) (+ (-> obj to-spr-waits) arg1))
(set! (-> obj from-spr-waits) (+ (-> obj from-spr-waits) arg2))
)
(let ((v0-0 0))
)
0
(none)
)

View file

@ -50,5 +50,4 @@
)
;; failed to figure out what this is:
(let ((v0-0 0))
)
0

View file

@ -182,8 +182,7 @@
(&- (-> arg1 base) (the-as uint (-> arg1 data)))
)
(crash!)
(let ((v1-2 0))
)
0
)
(dma-send
arg0
@ -201,8 +200,7 @@
(&- (-> arg1 base) (the-as uint (-> arg1 data)))
)
(crash!)
(let ((v1-2 0))
)
0
)
(dma-send-chain arg0 (the-as uint (-> arg1 data)))
(none)

View file

@ -285,10 +285,8 @@
(+ (+ s2-1 4) (the-as int data))
count
)
(let ((v1-21 (-> s3-1 (* 3 s2-1))))
)
(let ((v1-26 (-> s3-1 (+ (* 3 s2-1) 1))))
)
(-> s3-1 (* 3 s2-1))
(-> s3-1 (+ (* 3 s2-1) 1))
)
)
)
@ -402,172 +400,158 @@
)
(-> *vif-disasm-table* cmd-template-idx tag)
)
(let* ((print-kind (-> *vif-disasm-table* cmd-template-idx print))
(v0-1 (cond
((zero? print-kind)
(format
stream
" (~s :irq ~D)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
)
)
((= print-kind 1)
(format
stream
" (~s :irq ~D :~s #x~X)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> *vif-disasm-table* cmd-template-idx string2)
(-> first-tag imm)
)
)
((= print-kind 2)
(let
((stcycl-imm (the-as vif-stcycl-imm (-> first-tag imm)))
)
(format
stream
" (~s :irq ~D :wl ~D :cl ~D)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> stcycl-imm wl)
(-> stcycl-imm cl)
)
)
)
((= print-kind 3)
(set! packet-size 8)
(format
stream
" (~s :irq ~D :~s #x~X)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> *vif-disasm-table* cmd-template-idx string2)
(-> data 1)
)
)
((= print-kind 4)
(set! packet-size 20)
(format
stream
" (~s :irq ~D :~s "
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> *vif-disasm-table* cmd-template-idx string2)
)
(format
stream
"#x~X #x~X #x~X #x~X)~%"
(-> data 1)
(-> data 2)
(-> data 3)
(-> data 4)
)
)
((= print-kind 5)
(format
stream
" (~s :irq ~D :instructions #x~D :addr #x~X)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> first-tag num)
(-> first-tag imm)
)
)
((= print-kind 6)
(if (-> first-tag imm)
(set! packet-size #x100000)
(set!
packet-size
(the-as int (* (-> first-tag imm) 16))
)
)
(format
stream
" (~s :irq ~D :qwc #x~D)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> first-tag imm)
)
(set! data-ptr (&-> data 1))
(set! data-idx 0)
(while (< data-idx (the-as int (-> first-tag imm)))
(format
stream
" #x~X: #x~8x #x~8x #x~8x #x~8x~%"
(+ (+ (* data-idx 16) 4) (the-as int data))
(-> data-ptr (* data-idx 4))
(-> data-ptr (+ (* data-idx 4) 1))
(-> data-ptr (+ (* data-idx 4) 2))
(-> data-ptr (+ (* data-idx 4) 3))
)
(set! data-idx (+ data-idx 1))
)
#f
)
((= print-kind 7)
(set!
packet-size
(the-as
int
(+
(logand
-4
(the-as
int
(+
(*
(-> *vif-disasm-table* cmd-template-idx val)
(-> first-tag num)
)
3
)
)
)
4
)
)
)
(set!
unpack-imm
(the-as vif-unpack-imm (-> first-tag imm))
)
(format
stream
" (~s :irq ~D :num ~D :addr #x~X "
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> first-tag num)
(-> unpack-imm addr)
)
(format
stream
":msk ~D :flg ~D :usn ~D [skip ~d])~%"
(-> first-tag msk)
(-> unpack-imm flg)
(-> unpack-imm usn)
(the-as uint packet-size)
)
(if details
(disasm-vif-details
stream
(the-as (pointer uint8) data)
(logand cmd (vif-cmd cmd-mask))
(the-as int (-> first-tag num))
)
)
)
((= print-kind 8)
(format
stream
" (*unknown* vif-tag #x~X)~%"
(-> first-tag cmd)
)
)
)
(let ((print-kind (-> *vif-disasm-table* cmd-template-idx print)))
(cond
((zero? print-kind)
(format
stream
" (~s :irq ~D)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
)
)
((= print-kind 1)
(format
stream
" (~s :irq ~D :~s #x~X)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> *vif-disasm-table* cmd-template-idx string2)
(-> first-tag imm)
)
)
((= print-kind 2)
(let ((stcycl-imm (the-as vif-stcycl-imm (-> first-tag imm))))
(format
stream
" (~s :irq ~D :wl ~D :cl ~D)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> stcycl-imm wl)
(-> stcycl-imm cl)
)
)
)
((= print-kind 3)
(set! packet-size 8)
(format
stream
" (~s :irq ~D :~s #x~X)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> *vif-disasm-table* cmd-template-idx string2)
(-> data 1)
)
)
((= print-kind 4)
(set! packet-size 20)
(format
stream
" (~s :irq ~D :~s "
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> *vif-disasm-table* cmd-template-idx string2)
)
(format
stream
"#x~X #x~X #x~X #x~X)~%"
(-> data 1)
(-> data 2)
(-> data 3)
(-> data 4)
)
)
((= print-kind 5)
(format
stream
" (~s :irq ~D :instructions #x~D :addr #x~X)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> first-tag num)
(-> first-tag imm)
)
)
((= print-kind 6)
(if (-> first-tag imm)
(set! packet-size #x100000)
(set! packet-size (the-as int (* (-> first-tag imm) 16)))
)
(format
stream
" (~s :irq ~D :qwc #x~D)~%"
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> first-tag imm)
)
(set! data-ptr (&-> data 1))
(set! data-idx 0)
(while (< data-idx (the-as int (-> first-tag imm)))
(format
stream
" #x~X: #x~8x #x~8x #x~8x #x~8x~%"
(+ (+ (* data-idx 16) 4) (the-as int data))
(-> data-ptr (* data-idx 4))
(-> data-ptr (+ (* data-idx 4) 1))
(-> data-ptr (+ (* data-idx 4) 2))
(-> data-ptr (+ (* data-idx 4) 3))
)
(set! data-idx (+ data-idx 1))
)
#f
)
((= print-kind 7)
(set!
packet-size
(the-as
int
(+
(logand
-4
(the-as
int
(+
(*
(-> *vif-disasm-table* cmd-template-idx val)
(-> first-tag num)
)
3
)
)
)
4
)
)
)
(set! unpack-imm (the-as vif-unpack-imm (-> first-tag imm)))
(format
stream
" (~s :irq ~D :num ~D :addr #x~X "
(-> *vif-disasm-table* cmd-template-idx string1)
(-> first-tag irq)
(-> first-tag num)
(-> unpack-imm addr)
)
(format
stream
":msk ~D :flg ~D :usn ~D [skip ~d])~%"
(-> first-tag msk)
(-> unpack-imm flg)
(-> unpack-imm usn)
(the-as uint packet-size)
)
(if details
(disasm-vif-details
stream
(the-as (pointer uint8) data)
(logand cmd (vif-cmd cmd-mask))
(the-as int (-> first-tag num))
)
)
)
((= print-kind 8)
(format stream " (*unknown* vif-tag #x~X)~%" (-> first-tag cmd))
)
)
)
(set! cmd-template-idx (-> *vif-disasm-table* length))
)
@ -777,8 +761,7 @@
(+ (the-as uint data-2) (the-as uint (* (+ qwc 1) 16)))
)
)
(let ((v1-68 data-2))
)
data-2
)
((= (-> current-tag id) (dma-tag-id next))
(set! addr (&-> (the-as (pointer uint64) data-2) 2))
@ -799,8 +782,7 @@
(set! end-condition 'error)
)
(set! data-2 (the-as dma-packet (-> current-tag addr)))
(let ((v1-88 data-2))
)
data-2
)
(else
(cond
@ -823,13 +805,11 @@
(cond
((zero? call-depth)
(set! ra-1 (&+ addr qwc))
(let ((v1-108 (the-as (pointer uint64) ra-1)))
)
(the-as (pointer uint64) ra-1)
)
(else
(set! ra-2 (&+ addr qwc))
(let ((v1-111 (the-as (pointer uint64) ra-2)))
)
(the-as (pointer uint64) ra-2)
)
)
)
@ -851,13 +831,11 @@
(cond
((zero? v1-123)
(set! data-2 (the-as dma-packet ra-1))
(let ((v1-125 data-2))
)
data-2
)
((= v1-123 1)
(set! data-2 (the-as dma-packet ra-2))
(let ((v1-127 data-2))
)
data-2
)
(else
(set! end-condition #t)
@ -865,26 +843,22 @@
)
)
(set! call-depth (+ call-depth -1))
(let ((v1-131 call-depth))
)
call-depth
)
((= (-> current-tag id) (dma-tag-id end))
(set! addr (&-> (the-as (pointer uint64) data-2) 2))
(set! qwc (the-as int (-> current-tag qwc)))
(set! end-condition #t)
(let ((v0-17 (if mode-2
(disasm-vif-tag
(the-as
(pointer vif-tag)
(&-> (the-as (pointer uint64) data-2) 1)
)
(the-as int (+ (* qwc 4) 2))
stream-2
(= mode-2 'details)
)
)
)
)
(if mode-2
(disasm-vif-tag
(the-as
(pointer vif-tag)
(&-> (the-as (pointer uint64) data-2) 1)
)
(the-as int (+ (* qwc 4) 2))
stream-2
(= mode-2 'details)
)
)
)
(else

View file

@ -12,8 +12,7 @@
(cond
((zero? v1-0)
(crash!)
(let ((a1-0 0))
)
0
)
(else
(+! v1-0 -1)
@ -21,8 +20,7 @@
)
)
)
(let ((v0-0 0))
)
0
(none)
)
@ -50,8 +48,7 @@
(.sync.l)
(set! (-> arg0 chcr) (new 'static 'dma-chcr :str #x1))
(.sync.l)
(let ((v0-2 0))
)
0
(none)
)
@ -82,8 +79,7 @@
(new 'static 'dma-chcr :dir #x1 :mod #x1 :tte #x1 :str #x1)
)
(.sync.l)
(let ((v0-2 0))
)
0
(none)
)
@ -111,8 +107,7 @@
(.sync.l)
(set! (-> arg0 chcr) (new 'static 'dma-chcr :dir #x1 :mod #x1 :str #x1))
(.sync.l)
(let ((v0-2 0))
)
0
(none)
)
@ -142,8 +137,7 @@
(new 'static 'dma-chcr :dir #x1 :mod #x1 :tte #x1 :str #x1)
)
(.sync.l)
(let ((v0-1 0))
)
0
(none)
)
@ -167,8 +161,7 @@
(dma-sync (the-as pointer s5-0) 0 0)
)
)
(let ((v0-3 0))
)
0
(none)
)
@ -193,8 +186,7 @@
(dma-sync (the-as pointer s5-0) 0 0)
)
)
(let ((v0-2 0))
)
0
(none)
)
@ -218,8 +210,7 @@
(dma-sync (the-as pointer s5-0) 0 0)
)
)
(let ((v0-3 0))
)
0
(none)
)
@ -244,8 +235,7 @@
(dma-sync (the-as pointer s5-0) 0 0)
)
)
(let ((v0-2 0))
)
0
(none)
)
@ -254,8 +244,7 @@
(defun dma-initialize ()
(set! (-> (the-as vif-bank #x10003800) err me0) 1)
(set! (-> (the-as vif-bank #x10003c00) err me0) 1)
(let ((v0-0 0))
)
0
(none)
)
@ -267,8 +256,7 @@
(set! (-> v1-0 a0-0) (the-as uint #xabadbeef))
)
)
(let ((v0-0 0))
)
0
(none)
)
@ -280,8 +268,7 @@
(set! (-> v1-0 a0-0) (the-as uint #xabadbeef))
)
)
(let ((v0-0 0))
)
0
(none)
)
@ -351,8 +338,7 @@
(reset-path)
(reset-graph 1 1 *video-reset-parm* 1)
(format 0 "gkernel: vif1 path reset!~%")
(let ((v0-5 0))
)
0
(none)
)
@ -397,8 +383,7 @@
)
)
)
(let ((v0-5 0))
)
0
(none)
)

View file

@ -46,5 +46,4 @@
)
;; failed to figure out what this is:
(let ((v0-5 0))
)
0

View file

@ -114,5 +114,4 @@
)
;; failed to figure out what this is:
(let ((v0-10 0))
)
0

View file

@ -15,5 +15,4 @@
(define *collide-nodes* 0)
;; failed to figure out what this is:
(let ((v0-1 0))
)
0

View file

@ -49,5 +49,4 @@
)
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -20,5 +20,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -18,6 +18,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -155,5 +155,4 @@
)
;; failed to figure out what this is:
(let ((v0-0 0))
)
0

View file

@ -267,8 +267,7 @@
)
)
)
(let ((v0-1 0))
)
0
(none)
)
)
@ -290,8 +289,7 @@
)
)
)
(let ((v0-1 0))
)
0
(none)
)
)

View file

@ -310,5 +310,4 @@
)
;; failed to figure out what this is:
(let ((v0-20 0))
)
0

View file

@ -75,11 +75,9 @@
;; INFO: Return type mismatch int vs none.
(defmethod set-channel-offset! effect-control ((obj effect-control) (arg0 int))
(set! (-> obj channel-offset) arg0)
(let ((v0-0 0))
)
0
(none)
)
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -189,5 +189,4 @@
)
;; failed to figure out what this is:
(let ((v0-8 0))
)
0

View file

@ -348,5 +348,4 @@
)
;; failed to figure out what this is:
(let ((v0-18 0))
)
0

View file

@ -326,5 +326,4 @@
)
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -116,5 +116,4 @@
)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -218,5 +218,4 @@
)
;; failed to figure out what this is:
(let ((v0-7 0))
)
0

View file

@ -2,5 +2,4 @@
(in-package goal)
;; failed to figure out what this is:
(let ((v0-0 0))
)
0

View file

@ -74,5 +74,4 @@
)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -194,5 +194,4 @@
)
;; failed to figure out what this is:
(let ((v0-8 0))
)
0

View file

@ -58,8 +58,7 @@
(if *progress-process*
(TODO-RENAME-23 (-> *progress-process* 0) (get-aspect-ratio) arg0)
)
(let ((v0-5 0))
)
0
(none)
)
@ -91,8 +90,7 @@
(if *progress-process*
(TODO-RENAME-23 (-> *progress-process* 0) arg0 (get-video-mode))
)
(let ((v0-4 0))
)
0
(none)
)

View file

@ -65,5 +65,4 @@
)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -54,5 +54,4 @@
)
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -117,8 +117,7 @@
(let ((s3-0 s4-0)
(s2-0 (-> (the-as res-lump s5-1) tag s4-0))
)
(let ((v1-10 0))
)
0
(while (= (-> s2-0 name) (-> (the-as res-lump s5-1) tag s4-0 name))
(let
((v1-12
@ -167,8 +166,7 @@
(let ((s3-1 s4-1)
(s2-1 (-> (the-as res-lump s5-2) tag s4-1))
)
(let ((v1-29 0))
)
0
(while (= (-> s2-1 name) (-> (the-as res-lump s5-2) tag s4-1 name))
(let
((v1-31

View file

@ -80,5 +80,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -24,5 +24,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -64,5 +64,4 @@
)
;; failed to figure out what this is:
(let ((v0-4 0))
)
0

View file

@ -107,5 +107,4 @@
)
;; failed to figure out what this is:
(let ((v0-8 0))
)
0

View file

@ -775,5 +775,4 @@
)
;; failed to figure out what this is:
(let ((v0-20 0))
)
0

View file

@ -80,5 +80,4 @@
)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -185,5 +185,4 @@
(define *generic-debug* (new 'global 'generic-debug))
;; failed to figure out what this is:
(let ((v0-17 0))
)
0

View file

@ -345,5 +345,4 @@
(define *post-draw-hook* nothing)
;; failed to figure out what this is:
(let ((v0-12 0))
)
0

View file

@ -89,8 +89,7 @@
(cond
((zero? (logand psm 2))
(set! (-> env dthe) (new 'static 'gs-dthe))
(let ((v1-7 0))
)
0
)
(else
(set! (-> env dthe) (new 'static 'gs-dthe :dthe #x1))
@ -109,8 +108,7 @@
(cond
((zero? ztest)
(set! (-> env test1) (new 'static 'gs-test))
(let ((v1-16 0))
)
0
)
(else
(set! (-> env test1) (new 'static 'gs-test :zte #x1 :ztst ztest))

View file

@ -73,5 +73,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -110,5 +110,4 @@
)
;; failed to figure out what this is:
(let ((v0-8 0))
)
0

View file

@ -206,5 +206,4 @@
)
;; failed to figure out what this is:
(let ((v0-19 0))
)
0

View file

@ -39,8 +39,7 @@
(defun
light-group-process!
((arg0 vu-lights) (arg1 light-group) (arg2 vector) (arg3 vector))
(let ((f0-0 (rotate-y<-vector+vector arg3 arg2)))
)
(rotate-y<-vector+vector arg3 arg2)
(vu-lights<-light-group! arg0 arg1)
(none)
)

View file

@ -281,5 +281,4 @@
)
;; failed to figure out what this is:
(let ((v0-18 0))
)
0

View file

@ -718,5 +718,4 @@
)
;; failed to figure out what this is:
(let ((v0-47 0))
)
0

View file

@ -258,5 +258,4 @@
)
;; failed to figure out what this is:
(let ((v0-15 0))
)
0

View file

@ -818,5 +818,4 @@
)
;; failed to figure out what this is:
(let ((v0-64 0))
)
0

View file

@ -61,8 +61,7 @@
)
)
)
(let ((v0-0 0))
)
0
(none)
)
@ -84,8 +83,7 @@
(set! (-> arg0 frame-save) (-> *display* integral-frame-counter))
)
)
(let ((v0-0 0))
)
0
(none)
)
@ -126,8 +124,7 @@
)
)
(set! (-> *ripple-globals* count) 0)
(let ((v0-4 0))
)
0
)
(none)
)

View file

@ -60,5 +60,4 @@
(define *fake-shadow-buffer* *fake-shadow-buffer-1*)
;; failed to figure out what this is:
(let ((v0-6 0))
)
0

View file

@ -465,5 +465,4 @@
)
;; failed to figure out what this is:
(let ((v0-23 0))
)
0

View file

@ -309,5 +309,4 @@
(define *cloud-drawn* #f)
;; failed to figure out what this is:
(let ((v0-27 0))
)
0

View file

@ -152,5 +152,4 @@
)
;; failed to figure out what this is:
(let ((v0-7 0))
)
0

View file

@ -215,5 +215,4 @@
(set! (-> sparticle-launch-control heap-base) (the-as uint 32))
;; failed to figure out what this is:
(let ((v0-12 0))
)
0

View file

@ -158,5 +158,4 @@
)
;; failed to figure out what this is:
(let ((v0-8 0))
)
0

View file

@ -403,5 +403,4 @@
(define *ocean-base-page* 0)
;; failed to figure out what this is:
(let ((v0-25 0))
)
0

View file

@ -397,5 +397,4 @@
(define *collide-stats* (new 'global 'collide-stats))
;; failed to figure out what this is:
(let ((v0-33 0))
)
0

View file

@ -476,5 +476,4 @@
)
;; failed to figure out what this is:
(let ((v0-30 0))
)
0

View file

@ -464,5 +464,4 @@
)
;; failed to figure out what this is:
(let ((v0-30 0))
)
0

View file

@ -265,5 +265,4 @@
)
;; failed to figure out what this is:
(let ((v0-16 0))
)
0

View file

@ -422,5 +422,4 @@
(define *instance-tie-work-copy* (the-as basic #f))
;; failed to figure out what this is:
(let ((v0-18 0))
)
0

View file

@ -218,5 +218,4 @@
(define *time-of-day-context* (new 'static 'time-of-day-context))
;; failed to figure out what this is:
(let ((v0-13 0))
)
0

View file

@ -238,5 +238,4 @@
)
;; failed to figure out what this is:
(let ((v0-12 0))
)
0

View file

@ -178,5 +178,4 @@
)
;; failed to figure out what this is:
(let ((v0-7 0))
)
0

View file

@ -7,70 +7,54 @@
;; definition for function update-wind
;; INFO: Return type mismatch int vs none.
(defun update-wind ((arg0 wind-work) (arg1 (array uint8)))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(let* ((f0-1 (+ (-> arg0 wind-normal w) (rand-vu-float-range -1024.0 1024.0)))
(f30-1 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0)))
)
(init-vf0-vector)
(let*
((f0-1 (+ (-> arg0 wind-normal w) (rand-vu-float-range -1024.0 1024.0)))
(f30-1 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0)))
)
(set! (-> arg0 wind-normal w) f30-1)
(set! (-> arg0 wind-normal x) (cos f30-1))
(set! (-> arg0 wind-normal z) (sin f30-1))
)
(set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1))
(let* ((s4-0 (logand (-> arg0 wind-time) 63))
(f0-4 (rand-vu-float-range 0.0 100.0))
(v1-5 (/ (-> arg0 wind-time) (the-as uint 120)))
(f1-6
(*
0.008333334
(the float (mod (-> arg0 wind-time) (the-as uint 120)))
)
)
(f2-4
(*
0.0625
(the float (-> arg1 (mod (the-as int v1-5) (-> arg1 length))))
)
)
(f0-5
(*
(+
(*
(-
(*
0.0625
(the
float
(-> arg1 (mod (the-as int (+ v1-5 1)) (-> arg1 length)))
)
)
f2-4
)
f1-6
)
f2-4
)
f0-4
)
(set! (-> arg0 wind-normal w) f30-1)
(set! (-> arg0 wind-normal x) (cos f30-1))
(set! (-> arg0 wind-normal z) (sin f30-1))
)
(set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1))
(let* ((s4-0 (logand (-> arg0 wind-time) 63))
(f0-4 (rand-vu-float-range 0.0 100.0))
(v1-5 (/ (-> arg0 wind-time) (the-as uint 120)))
(f1-6
(*
0.008333334
(the float (mod (-> arg0 wind-time) (the-as uint 120)))
)
)
(set! (-> *wind-work* wind-force s4-0) f0-5)
(let ((v1-14 (-> *wind-work* wind-array s4-0)))
(.lvf vf1 (&-> (-> arg0 wind-normal) quad))
(let ((a0-16 f0-5))
(.mov vf2 a0-16)
)
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> v1-14 quad) vf1)
)
)
(let ((v0-4 0))
)
(none)
(f2-4
(*
0.0625
(the float (-> arg1 (mod (the-as int v1-5) (-> arg1 length))))
)
)
(f0-5
(*
(+
(*
(-
(*
0.0625
(the
float
(-> arg1 (mod (the-as int (+ v1-5 1)) (-> arg1 length)))
)
)
f2-4
)
f1-6
)
f2-4
)
f0-4
)
)
)
(set! (-> *wind-work* wind-force s4-0) f0-5)
(vector-float*! (-> *wind-work* wind-array s4-0) (-> arg0 wind-normal) f0-5)
)
0
(none)
)

View file

@ -136,8 +136,7 @@
(defun str-load-cancel ()
(set! *load-str-lock* #f)
(set! *que-str-lock* #t)
(let ((v0-0 0))
)
0
(none)
)
@ -150,10 +149,8 @@
(set! (-> cmd address) addr)
(set! (-> cmd result) (load-msg-result done))
)
(let ((v1-2 0))
)
(let ((v0-2 0))
)
0
0
(none)
)
@ -165,8 +162,7 @@
(charp<-string (-> cmd basename) name)
(set! (-> cmd result) (load-msg-result error))
)
(let ((v0-2 0))
)
0
(none)
)
@ -185,8 +181,7 @@
)
)
(set! *que-str-lock* #f)
(let ((v0-3 0))
)
0
(none)
)
@ -199,10 +194,8 @@
(charp<-string (&-> cmd basename 1) name)
(set! (-> cmd result) (load-msg-result done))
)
(let ((v1-3 0))
)
(let ((v0-2 0))
)
0
0
(none)
)
@ -215,8 +208,7 @@
(charp<-string (&-> cmd basename 1) name)
(set! (-> cmd result) (load-msg-result error))
)
(let ((v0-2 0))
)
0
(none)
)
@ -230,8 +222,7 @@
(call *play-str-rpc* (the-as uint 0) (the-as pointer 0) (the-as uint 0))
)
)
(let ((v0-2 0))
)
0
(none)
)
@ -314,8 +305,7 @@
(let ((cmd (add-element *load-dgo-rpc*)))
(call *load-dgo-rpc* (the-as uint 2) cmd (the-as uint 32))
)
(let ((v0-3 0))
)
0
(none)
)
@ -413,7 +403,6 @@
(set! (-> arg0 0) (the-as uint #xffffffff))
(set! arg0 (&-> arg0 1))
)
(let ((v0-0 0))
)
0
(none)
)

View file

@ -272,5 +272,4 @@
)
;; failed to figure out what this is:
(let ((v0-12 0))
)
0

View file

@ -95,11 +95,9 @@
;; INFO: Return type mismatch int vs none.
(defun ramdisk-sync ()
(sync *ramdisk-rpc* #t)
(let ((v0-1 0))
)
0
(none)
)
;; failed to figure out what this is:
(let ((v0-7 0))
)
0

View file

@ -39,5 +39,4 @@
)
;; failed to figure out what this is:
(let ((v0-2 0))
)
0

View file

@ -40,12 +40,9 @@
(f2-0 (* f24-0 f22-0))
(f3-0 (* f24-0 f4-0))
)
(let ((v1-7 0))
)
(let ((v1-8 0))
)
(let ((v1-9 0))
)
0
0
0
(let* ((v1-12 (logand (/ (the int (-> s5-0 w)) 4) 1))
(a1-2 (-> EulSafe (logand (/ (the int (-> s5-0 w)) 8) 3)))
(a0-21 (-> EulNext (+ a1-2 v1-12)))
@ -227,12 +224,9 @@
;; definition for function matrix->eul
(defun matrix->eul ((arg0 euler-angles) (arg1 matrix) (arg2 int))
(let ((v1-0 0))
)
(let ((v1-1 0))
)
(let ((v1-2 0))
)
0
0
0
(let* ((v1-4 (logand (/ arg2 4) 1))
(s3-0 (-> EulSafe (logand (/ arg2 8) 3)))
(s2-0 (-> EulNext (+ s3-0 v1-4)))

Some files were not shown because too many files have changed in this diff Show more