mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
[decompiler] do not use time-elapsed? on unsigned comps (#3031)
This commit is contained in:
@@ -5284,14 +5284,14 @@ FormElement* ConditionElement::make_time_elapsed(const Env& env,
|
||||
std::vector<Form*> args;
|
||||
args.push_back(time_elapsed);
|
||||
args.push_back(time);
|
||||
if (m_kind == IR2_Condition::Kind::LESS_THAN_SIGNED ||
|
||||
m_kind == IR2_Condition::Kind::LESS_THAN_UNSIGNED) {
|
||||
// TODO - how to handle unsigned case?
|
||||
if (m_kind == IR2_Condition::Kind::LESS_THAN_SIGNED) {
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_compare(IR2_Condition::Kind::FALSE),
|
||||
pool.form<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("time-elapsed?")),
|
||||
make_casts_if_needed(args, types, TypeSpec("time-frame"), pool, env)));
|
||||
} else {
|
||||
} else if (m_kind == IR2_Condition::Kind::GEQ_SIGNED) {
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("time-elapsed?")),
|
||||
make_casts_if_needed(args, types, TypeSpec("time-frame"), pool, env));
|
||||
|
||||
Reference in New Issue
Block a user