[decomp] fix up gun decomp (#2067)

I did some manual modifications in a few places to work around some
truly mysterious control flow, and some unsupported stack array stuff.

Also fixes a bug in decompiling static improper lists.

As far as I can tell, guns work, other than some graphical issues and
the crazy particle spawning issue, but I strongly suspect these are
problems with the sparticle/graphics side.
This commit is contained in:
water111
2022-12-30 14:07:32 -05:00
committed by GitHub
parent 997c1ab60a
commit f6c5504f6f
16 changed files with 3587 additions and 56 deletions
+2 -1
View File
@@ -574,7 +574,8 @@ bool try_splitting_nested_sc(FormPool& pool, Function& func, ShortCircuitElement
ASSERT(ir->entries.at(i).branch_delay.has_value());
bool is_and = delay_slot_sets_false(branch.first, *ir->entries.at(i).branch_delay);
bool is_or = delay_slot_sets_truthy(branch.first, *ir->entries.at(i).branch_delay);
ASSERT_MSG(is_and != is_or, fmt::format("bad nested sc in {}", func.name()));
ASSERT_MSG(is_and != is_or,
fmt::format("bad nested sc in {}: {}", func.name(), ir->to_string(func.ir2.env)));
if (first_different == -1) {
// haven't seen a change yet.