diff options
| author | Tal Hayon <talhayon1@gmail.com> | 2022-01-13 17:00:40 +0200 |
|---|---|---|
| committer | Tal Hayon <talhayon1@gmail.com> | 2022-01-13 17:00:40 +0200 |
| commit | d4bc136bd7013be31dc06bda95be4de0f9a7b6fa (patch) | |
| tree | dbf8ab14484e290ba33fc22bd72a0185286895f2 /src | |
| parent | db40a8d833f88d98f4dc0413c131c04083f76f94 (diff) | |
Match sub_080177A0
Diffstat (limited to 'src')
| -rw-r--r-- | src/collision.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/collision.c b/src/collision.c index 32e963e6..f33bcb3f 100644 --- a/src/collision.c +++ b/src/collision.c @@ -177,22 +177,19 @@ NONMATCH("asm/non_matching/arm_proxy/sub_08017744.inc", void sub_08017744(Entity } END_NONMATCH -// regalloc -NONMATCH("asm/non_matching/arm_proxy/sub_080177A0.inc", bool32 sub_080177A0(Entity* this, Entity* that)) { +bool32 sub_080177A0(Entity* this, Entity* that) { u32 this_d; u32 depth; if ((this->collisionLayer & that->collisionLayer) != 0) { Hitbox* bb_this = this->hitbox; Hitbox* bb_that = that->hitbox; - u32 this_w = bb_this->width; - u32 that_w = bb_that->width; - u32 sumw = this_w + that_w; + u32 this_len = bb_this->width; + u32 sumw = this_len + bb_that->width; if ((((this->x.HALF.HI - that->x.HALF.HI) + bb_this->offset_x) - bb_that->offset_x) + sumw <= (sumw)*2) { - u32 this_h = bb_this->height; - u32 that_h = bb_that->height; - u32 sumh = this_h + that_h; - if ((((this->y.HALF.HI - that->y.HALF.HI) + bb_this->offset_y) - bb_that->offset_y) + sumh <= (sumh)*2) { + this_len = bb_this->height; + sumw = this_len + bb_that->height; + if ((((this->y.HALF.HI - that->y.HALF.HI) + bb_this->offset_y) - bb_that->offset_y) + sumw <= (sumw)*2) { if ((this->field_0x3c & 0x10) != 0) this_d = ((Hitbox3D*)bb_this)->depth; else @@ -208,7 +205,6 @@ NONMATCH("asm/non_matching/arm_proxy/sub_080177A0.inc", bool32 sub_080177A0(Enti } return FALSE; } -END_NONMATCH bool32 sub_08017850(Entity* this) { if (sub_08079F8C()) |
