decomp for jak1, methods only

This commit is contained in:
water
2023-09-23 11:53:51 -04:00
parent 53336adfa0
commit 104f85a8d6
53 changed files with 177 additions and 382 deletions
+19
View File
@@ -3892,6 +3892,25 @@ void FunctionCallElement::update_from_stack(const Env& env,
}
}
// detect call-parent-method
{
const auto& guessed_name = env.func->guessed_name;
if (guessed_name.kind == FunctionName::FunctionKind::METHOD) {
auto mr_find_parent =
match(Matcher::func(Matcher::symbol("find-parent-method"),
{Matcher::symbol(env.func->method_of_type),
Matcher::integer(env.func->guessed_name.method_id)}),
unstacked.at(0)
);
if (mr_find_parent.matched) {
new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_function(pool.form<ConstantTokenElement>("call-parent-method")),
arg_forms);
}
}
}
result->push_back(new_form);
}