decomp3: spawn target, add merc and particle buckets and some temporary hacks (#3445)

This includes all the collision stuff needed to spawn `target`,
decompiles the sparticle code and adds some of the PC hacks needed for
merc to run (it doesn't work quite right and looks bad, likely due to a
combination of code copied from Jak 2 and the time of day hacks).

There are a bunch of temporary hacks (see commits) in place to prevent
the game from crashing quite as much, but it is still extremely prone to
doing so due to lots of missing functions/potentially bad decomp.

---------

Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
Hat Kid
2024-04-05 06:07:39 +02:00
committed by GitHub
parent a7efd59919
commit 93afb02cf4
581 changed files with 117237 additions and 3689 deletions
@@ -5505,6 +5505,14 @@ FormElement* ConditionElement::make_generic(const Env& env,
casted);
}
case IR2_Condition::Kind::LEQ_ZERO_UNSIGNED: {
auto casted = make_casts_if_needed(source_forms, types, TypeSpec("uint"), pool, env);
auto zero = pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(0));
casted.push_back(zero);
return pool.alloc_element<GenericElement>(GenericOperator::make_fixed(FixedOperatorKind::LEQ),
casted);
}
case IR2_Condition::Kind::GEQ_ZERO_SIGNED: {
return make_geq_zero_signed_check_generic(env, pool, source_forms, types);
}