diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-07-22 11:18:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-22 11:18:11 -0700 |
| commit | aabd340b51c818bc5c46017298b59747be2e4bf6 (patch) | |
| tree | ebc2ef5c182015dbb074b854df7fded338452ba8 /src/object | |
| parent | 4d8d6717695d615484324b75775e89eba509bf9b (diff) | |
| parent | b5ab963454438489b5fa462a0f19f693ca065574 (diff) | |
Merge pull request #535 from hatal175/sub_080878CC
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/object20.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/object/object20.c b/src/object/object20.c index cf8c1d55..41996212 100644 --- a/src/object/object20.c +++ b/src/object/object20.c @@ -59,13 +59,12 @@ void sub_08087888(Entity* this) { } } -NONMATCH("asm/non_matching/object20/sub_080878CC.inc", void sub_080878CC(Entity* this)) { +void sub_080878CC(Entity* this) { s32 x; s32 y; s32 itX; s32 itY; u32 layer; - u32 tileType; u32 pos; x = this->x.HALF.HI; @@ -74,13 +73,15 @@ NONMATCH("asm/non_matching/object20/sub_080878CC.inc", void sub_080878CC(Entity* for (itX = -0x10; itX < 0x11; itX += 0x10) { for (itY = -0x10; itY < 0x11; itY += 0x10) { pos = TILE((u32)x + itX, (u32)y + itY); - if (sub_080B1AE0(pos, layer) == 0x2e) { - tileType = GetTileType(pos, layer); - if (tileType == 0x368 || tileType == 0x367 - /*(tileType < 0x369) && (0x366 < tileType)*/) { - sub_08008796(this, 3, x + itX, y + itY); - } else { - SetTile(0x4022, pos, layer); + if (sub_080B1AE0(pos, (u8)layer) == 0x2e) { + switch (GetTileType(pos, layer)) { + case 0x368: + case 0x367: + sub_08008796(this, 3, x + itX, y + itY); + break; + default: + SetTile(0x4022, pos, layer); + break; } } else { sub_08008796(this, 3, x + itX, y + itY); @@ -88,4 +89,3 @@ NONMATCH("asm/non_matching/object20/sub_080878CC.inc", void sub_080878CC(Entity* } } } -END_NONMATCH |
