diff options
Diffstat (limited to 'src/enemy')
| -rw-r--r-- | src/enemy/armos.c | 8 | ||||
| -rw-r--r-- | src/enemy/businessScrub.c | 4 | ||||
| -rw-r--r-- | src/enemy/chuchu.c | 24 | ||||
| -rw-r--r-- | src/enemy/chuchuBoss.c | 2 | ||||
| -rw-r--r-- | src/enemy/doorMimic.c | 4 | ||||
| -rw-r--r-- | src/enemy/enemy64.c | 16 | ||||
| -rw-r--r-- | src/enemy/eyegore.c | 20 | ||||
| -rw-r--r-- | src/enemy/flyingPot.c | 12 | ||||
| -rw-r--r-- | src/enemy/flyingSkull.c | 16 | ||||
| -rw-r--r-- | src/enemy/gyorgFemale.c | 2 | ||||
| -rw-r--r-- | src/enemy/helmasaur.c | 4 | ||||
| -rw-r--r-- | src/enemy/mazaalBracelet.c | 3 | ||||
| -rw-r--r-- | src/enemy/mazaalMacro.c | 2 | ||||
| -rw-r--r-- | src/enemy/octorokGolden.c | 2 | ||||
| -rw-r--r-- | src/enemy/pesto.c | 3 | ||||
| -rw-r--r-- | src/enemy/rollobite.c | 2 | ||||
| -rw-r--r-- | src/enemy/rupeeLike.c | 2 | ||||
| -rw-r--r-- | src/enemy/spinyBeetle.c | 4 | ||||
| -rw-r--r-- | src/enemy/stalfos.c | 2 | ||||
| -rw-r--r-- | src/enemy/vaatiProjectile.c | 2 | ||||
| -rw-r--r-- | src/enemy/wizzrobeFire.c | 4 | ||||
| -rw-r--r-- | src/enemy/wizzrobeIce.c | 4 | ||||
| -rw-r--r-- | src/enemy/wizzrobeWind.c | 6 |
23 files changed, 75 insertions, 73 deletions
diff --git a/src/enemy/armos.c b/src/enemy/armos.c index bd164871..db597408 100644 --- a/src/enemy/armos.c +++ b/src/enemy/armos.c @@ -403,11 +403,11 @@ void sub_080307D4(ArmosEntity* this) { void sub_080307EC(ArmosEntity* this) { u32 position = COORD_TO_TILE(super); this->unk_78 = GetTileIndex(position, super->collisionLayer); - SetTile(0x4022, position, (u32)super->collisionLayer); + SetBottomTile(0x4022, position, (u32)super->collisionLayer); } void sub_08030834(ArmosEntity* this) { - SetTile(this->unk_78, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_78, COORD_TO_TILE(super), super->collisionLayer); } bool32 sub_0803086C(ArmosEntity* this) { @@ -435,11 +435,11 @@ bool32 sub_0803086C(ArmosEntity* this) { return TRUE; } } else { - SetTile(0x4022, pos, super->collisionLayer); + SetBottomTile(0x4022, pos, super->collisionLayer); } } else { if (CheckPlayerInRegion(centerX, centerY + 6, 2, 5) != 0) { - SetTile(0x4049, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(0x4049, COORD_TO_TILE(super), super->collisionLayer); } } } diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c index a770f1d9..5a2f0d9b 100644 --- a/src/enemy/businessScrub.c +++ b/src/enemy/businessScrub.c @@ -442,7 +442,7 @@ void sub_08028FFC(BusinessScrubEntity* this) { super->x.HALF.HI = this->unk_78; super->y.HALF.HI = this->unk_7a; InitializeAnimation(super, 0); - SetTile(0x4022, this->unk_76, super->collisionLayer); + SetBottomTile(0x4022, this->unk_76, super->collisionLayer); } void sub_08029078(BusinessScrubEntity* this) { @@ -456,7 +456,7 @@ void sub_08029078(BusinessScrubEntity* this) { super->spriteIndex = 0xd0; sub_08028FDC(this); sub_080290E0(this, 1); - SetTile(this->unk_74, this->unk_76, super->collisionLayer); + SetBottomTile(this->unk_74, this->unk_76, super->collisionLayer); } } diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c index 41ac71c4..95a08744 100644 --- a/src/enemy/chuchu.c +++ b/src/enemy/chuchu.c @@ -34,7 +34,7 @@ void sub_0801FAF8(ChuchuEntity* this); void sub_0801FB14(ChuchuEntity* this); void sub_0801FB34(ChuchuEntity* this); void sub_0801FB68(ChuchuEntity* this); -u32 sub_0801FBD0(ChuchuEntity* this); +u32 CheckWaterTile(ChuchuEntity* this); void Chuchu_JumpAtPlayer(ChuchuEntity* this); extern void (*const Chuchu_Functions[])(ChuchuEntity*); @@ -72,7 +72,7 @@ void Chuchu(ChuchuEntity* this) { /* ... */ break; case 2: - sub_080043A8(super); + CreateDrownFX(super); return; } } @@ -196,7 +196,7 @@ void sub_0801F0C8(ChuchuEntity* this) { } void sub_0801F12C(ChuchuEntity* this) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { sub_0801F328(this); } else { if ((super->subtimer++ & 7) == 0) { @@ -232,7 +232,7 @@ void sub_0801F1B0(ChuchuEntity* this) { } if (super->frame & ANIM_DONE) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { sub_0801F328(this); } else { sub_0801F340(this); @@ -261,7 +261,7 @@ void sub_0801F270(ChuchuEntity* this) { ProcessMovement5(super); GetNextFrame(super); - if (sub_0801FBD0(this)) + if (CheckWaterTile(this)) return; if (--super->timer != 0) @@ -390,7 +390,7 @@ void sub_0801F4EC(ChuchuEntity* this) { } void sub_0801F508(ChuchuEntity* this) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { this->unk_83 = 0; sub_0801F730(this); } else { @@ -429,7 +429,7 @@ void sub_0801F584(ChuchuEntity* this) { } if (super->frame & ANIM_DONE) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { this->unk_83 = 0; sub_0801F730(this); } else { @@ -464,7 +464,7 @@ void sub_0801F688(ChuchuEntity* this) { if (this->unk_83) this->unk_83--; - if (sub_0801FBD0(this) || this->unk_83) { + if (CheckWaterTile(this) || this->unk_83) { super->direction = sub_08049F84(super, 1); ProcessMovement5(super); GetNextFrame(super); @@ -572,7 +572,7 @@ void sub_0801F884(ChuchuEntity* this) { } void sub_0801F8C0(ChuchuEntity* this) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { sub_0801FAE0(this); } else if (sub_08049FDC(super, 1) == 0) { sub_0801F730(this); @@ -605,7 +605,7 @@ void sub_0801F940(ChuchuEntity* this) { } if (super->frame & ANIM_DONE) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { sub_0801FAE0(this); } else { super->action = 6; @@ -635,7 +635,7 @@ void sub_0801F9E0(ChuchuEntity* this) { } void sub_0801FA30(ChuchuEntity* this) { - if (sub_0801FBD0(this)) { + if (CheckWaterTile(this)) { super->direction = sub_08049F84(super, 1); ProcessMovement5(super); GetNextFrame(super); @@ -714,7 +714,7 @@ void sub_0801FB68(ChuchuEntity* this) { super->zVelocity = 0; } -u32 sub_0801FBD0(ChuchuEntity* this) { +u32 CheckWaterTile(ChuchuEntity* this) { if (GetActTile(super) == 0x10) { return 1; } else { diff --git a/src/enemy/chuchuBoss.c b/src/enemy/chuchuBoss.c index 0f054bdd..c9ee902c 100644 --- a/src/enemy/chuchuBoss.c +++ b/src/enemy/chuchuBoss.c @@ -561,7 +561,7 @@ void sub_080262A8(ChuchuBossEntity* this) { gPlayerEntity.base.animationState = 0; gRoomControls.camera_target = super; gRoomControls.scrollSpeed = 1; - SetTile(0x4022, 0x2c8, 1); + SetBottomTile(0x4022, 0x2c8, 1); } } diff --git a/src/enemy/doorMimic.c b/src/enemy/doorMimic.c index 344e284b..b7c57037 100644 --- a/src/enemy/doorMimic.c +++ b/src/enemy/doorMimic.c @@ -48,7 +48,7 @@ void DoorMimic_OnCollision(DoorMimicEntity* this) { } void DoorMimic_OnDeath(DoorMimicEntity* this) { - SetTile(this->unk_7c, this->unk_7e, super->collisionLayer); + SetBottomTile(this->unk_7c, this->unk_7e, super->collisionLayer); CreateFx(super, FX_POT_SHATTER, 0); EnemyDisableRespawn(super); DeleteThisEntity(); @@ -125,7 +125,7 @@ void sub_080221C0(DoorMimicEntity* this) { u32 tile = COORD_TO_TILE(super) + gUnk_080B4488[super->type2]; this->unk_7e = tile; this->unk_7c = GetTileIndex(tile, super->collisionLayer); - SetTile(gUnk_080CB79C[super->type2], tile, super->collisionLayer); + SetBottomTile(gUnk_080CB79C[super->type2], tile, super->collisionLayer); } // clang-format off diff --git a/src/enemy/enemy64.c b/src/enemy/enemy64.c index 62bd707b..be47abc9 100644 --- a/src/enemy/enemy64.c +++ b/src/enemy/enemy64.c @@ -85,10 +85,10 @@ void Enemy64_Init(Enemy64Entity* this) { Entity* tail; if (CheckFlags(0x7c)) { - SetTile(0x4081, 10, 2); - SetTile(0x4081, 0x4a, 2); - SetTile(0x4081, 0x8a, 2); - SetTile(0x4081, 0xca, 2); + SetBottomTile(0x4081, 10, 2); + SetBottomTile(0x4081, 0x4a, 2); + SetBottomTile(0x4081, 0x8a, 2); + SetBottomTile(0x4081, 0xca, 2); DeleteThisEntity(); } else { sub_0807B7D8(0x323, 10, 1); @@ -440,19 +440,19 @@ void Enemy64_Action4_SubAction7(Enemy64Entity* this) { DeleteThisEntity(); } else if (super->timer == 16) { sub_0807B7D8(0x36, 0xca, 1); - SetTile(0x4081, 0xca, 2); + SetBottomTile(0x4081, 0xca, 2); SoundReq(SFX_HEART_GET); } else if (super->timer == 24) { sub_0807B7D8(0x36, 0x8a, 1); - SetTile(0x4081, 0x8a, 2); + SetBottomTile(0x4081, 0x8a, 2); SoundReq(SFX_HEART_GET); } else if (super->timer == 32) { sub_0807B7D8(0x36, 0x4a, 1); - SetTile(0x4081, 0x4a, 2); + SetBottomTile(0x4081, 0x4a, 2); SoundReq(SFX_HEART_GET); } else if (super->timer == 40) { sub_0807B7D8(0x36, 10, 1); - SetTile(0x4081, 10, 2); + SetBottomTile(0x4081, 10, 2); SoundReq(SFX_HEART_GET); } } diff --git a/src/enemy/eyegore.c b/src/enemy/eyegore.c index b023469c..3b4ee58c 100644 --- a/src/enemy/eyegore.c +++ b/src/enemy/eyegore.c @@ -335,18 +335,18 @@ void sub_08030F00(EyegoreEntity* this) { this->unk_84 = tileIndex; tileIndex = GetTileIndex(position + 0x41, super->collisionLayer); this->unk_86 = tileIndex; - SetTile(0x4022, position, super->collisionLayer); - SetTile(0x4022, position + 1, super->collisionLayer); - SetTile(0x4022, position + 0x40, super->collisionLayer); - SetTile(0x4022, position + 0x41, super->collisionLayer); + SetBottomTile(0x4022, position, super->collisionLayer); + SetBottomTile(0x4022, position + 1, super->collisionLayer); + SetBottomTile(0x4022, position + 0x40, super->collisionLayer); + SetBottomTile(0x4022, position + 0x41, super->collisionLayer); } void sub_08030FB4(EyegoreEntity* this) { u32 position = COORD_TO_TILE_OFFSET(super, 8, 0x14); - SetTile(this->unk_80, position, super->collisionLayer); - SetTile(this->unk_82, position + 1, super->collisionLayer); - SetTile(this->unk_84, position + 0x40, super->collisionLayer); - SetTile(this->unk_86, position + 0x41, super->collisionLayer); + SetBottomTile(this->unk_80, position, super->collisionLayer); + SetBottomTile(this->unk_82, position + 1, super->collisionLayer); + SetBottomTile(this->unk_84, position + 0x40, super->collisionLayer); + SetBottomTile(this->unk_86, position + 0x41, super->collisionLayer); } void sub_08031024(EyegoreEntity* this) { @@ -439,8 +439,8 @@ void sub_08031024(EyegoreEntity* this) { void sub_08031250(EyegoreEntity* this) { u32 tmp2; u32 tmp = (u32)super->animationState * 4; - sub_08008796(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp], super->y.HALF.HI + gUnk_080CE2C0[tmp + 1]); - sub_08008796(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp + 2], super->y.HALF.HI + gUnk_080CE2C0[tmp + 3]); + DoTileInteraction(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp], super->y.HALF.HI + gUnk_080CE2C0[tmp + 1]); + DoTileInteraction(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp + 2], super->y.HALF.HI + gUnk_080CE2C0[tmp + 3]); if (this->unk_79 != 0) { tmp2 = 0; if ((super->x.HALF.HI - (u32)this->unk_74) + 2 < 5) { diff --git a/src/enemy/flyingPot.c b/src/enemy/flyingPot.c index 74f0a3b5..cc868bc0 100644 --- a/src/enemy/flyingPot.c +++ b/src/enemy/flyingPot.c @@ -99,7 +99,7 @@ void FlyingPot_OnCollision(FlyingPotEntity* this) { super->zVelocity = Q_16_16(2.625); super->spritePriority.b1 = 1; - SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); + SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); } else if (super->z.HALF.HI != 0) { sub_08037408(this); } @@ -145,7 +145,7 @@ void FlyingPot_SubAction2(FlyingPotEntity* this) { COLLISION_OFF(super); super->spriteOffsetX = 0; - SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); + SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); } if (sub_0806F520(super)) { @@ -177,7 +177,7 @@ void FlyingPot_Init(FlyingPotEntity* this) { tile = TILE(super->x.HALF.HI, super->y.HALF.HI); this->tileIndex = GetTileIndex(tile, super->collisionLayer); - SetTile(0x4000, tile, super->collisionLayer); + SetBottomTile(0x4000, tile, super->collisionLayer); InitializeAnimation(super, 5); } @@ -185,7 +185,7 @@ void FlyingPot_Action1(FlyingPotEntity* this) { sub_08037418(this); if (GetTileTypeByEntity(super) != 0x4000) { - SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); + SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); sub_08037408(this); } @@ -210,7 +210,7 @@ void FlyingPot_Action2(FlyingPotEntity* this) { super->flags2 = 0xF; super->hitbox = &gUnk_080FD34C; - SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); + SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer); } } @@ -257,7 +257,7 @@ void sub_08037418(FlyingPotEntity* this) { u32 tile = COORD_TO_TILE(super); if (GetTileIndex(tile, super->collisionLayer) == 0x4067) { - SetTile(this->tileIndex, tile, super->collisionLayer); + SetBottomTile(this->tileIndex, tile, super->collisionLayer); DeleteThisEntity(); } } diff --git a/src/enemy/flyingSkull.c b/src/enemy/flyingSkull.c index 7318f358..23ba5c87 100644 --- a/src/enemy/flyingSkull.c +++ b/src/enemy/flyingSkull.c @@ -50,7 +50,7 @@ void FlyingSkull_OnCollision(FlyingSkullEntity* this) { COLLISION_OFF(super); super->zVelocity = Q_16_16(2.625); super->spritePriority.b1 = 1; - SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); } else if (super->z.HALF.HI) { sub_0803A0E0(this); } @@ -89,7 +89,7 @@ void sub_08039CE0(FlyingSkullEntity* this) { super->timer = 1; super->z.HALF.HI = -1; super->spriteOffsetX = 0; - SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); } if (sub_0806F520(super)) { @@ -121,7 +121,7 @@ void sub_08039D74(FlyingSkullEntity* this) { tmp = COORD_TO_TILE(super); this->unk_0x74 = GetTileIndex(tmp, super->collisionLayer); - SetTile(0x4060, tmp, super->collisionLayer); + SetBottomTile(0x4060, tmp, super->collisionLayer); InitializeAnimation(super, 0); } @@ -130,7 +130,7 @@ void sub_08039DD8(FlyingSkullEntity* this) { if (super->type == 0) { if (GetTileTypeByEntity(super) == 0x4073) { - SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); sub_0803A0E0(this); } @@ -147,7 +147,7 @@ void sub_08039DD8(FlyingSkullEntity* this) { if (player != NULL) { player->type2 = 1; CopyPosition(super, player); - SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); DeleteEntity(super); } } @@ -167,7 +167,7 @@ void sub_08039EE4(FlyingSkullEntity* this) { super->hitbox = (Hitbox*)&gUnk_080FD340; gPlayerEntity.base.animationState; this->unk_0x76 = gPlayerEntity.base.animationState; - SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); } void sub_08039F4C(FlyingSkullEntity* this) { @@ -200,7 +200,7 @@ void sub_08039FAC(FlyingSkullEntity* this) { super->hitType = 0xa0; super->flags2 = 0xf; super->hitbox = (Hitbox*)&gUnk_080FD34C; - SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer); } } @@ -249,7 +249,7 @@ void sub_0803A0E0(FlyingSkullEntity* this) { void sub_0803A100(FlyingSkullEntity* this) { u32 tile = COORD_TO_TILE(super); if (GetTileIndex(tile, super->collisionLayer) == 0x4067) { - SetTile(this->unk_0x74, tile, super->collisionLayer); + SetBottomTile(this->unk_0x74, tile, super->collisionLayer); DeleteThisEntity(); } } diff --git a/src/enemy/gyorgFemale.c b/src/enemy/gyorgFemale.c index fbc0a222..baa1105b 100644 --- a/src/enemy/gyorgFemale.c +++ b/src/enemy/gyorgFemale.c @@ -250,7 +250,7 @@ void sub_080464C0(GyorgFemaleEntity* this) { void sub_08046518(void) { u16* ptr = gMapTop.metatileTypes; u16* sl = &gMapTop.mapData[sub_08046518_offset]; - u16* stack1 = &gMapTop.mapDataClone[sub_08046518_offset]; + u16* stack1 = &gMapTop.mapDataOriginal[sub_08046518_offset]; u8* stack2 = &gMapTop.unkData3[sub_08046518_offset]; u8* r6 = &gMapTop.collisionData[sub_08046518_offset]; u32 i; diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c index 4a43753e..ab1437cc 100644 --- a/src/enemy/helmasaur.c +++ b/src/enemy/helmasaur.c @@ -373,8 +373,8 @@ void sub_0802C1C0(HelmasaurEntity* this) { void sub_0802C1CC(HelmasaurEntity* this) { const s8* ptr = &gUnk_080CD464[super->animationState << 2]; - sub_08008796(super, 9, super->x.HALF.HI + ptr[0], super->y.HALF.HI + ptr[1]); - sub_08008796(super, 9, super->x.HALF.HI + ptr[2], super->y.HALF.HI + ptr[3]); + DoTileInteraction(super, 9, super->x.HALF.HI + ptr[0], super->y.HALF.HI + ptr[1]); + DoTileInteraction(super, 9, super->x.HALF.HI + ptr[2], super->y.HALF.HI + ptr[3]); } void sub_0802C218(HelmasaurEntity* this) { diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c index 65e917a2..15e84846 100644 --- a/src/enemy/mazaalBracelet.c +++ b/src/enemy/mazaalBracelet.c @@ -167,7 +167,8 @@ void MazaalBracelet_OnCollision(MazaalBraceletEntity* this) { if (super->type < 2) { if (super->action != 0x2b) { - if ((0 < super->iframes) && ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15) || (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe))))) { + if ((0 < super->iframes) && ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15) || + (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe))))) { super->action = 0x28; COLLISION_OFF(super); entity = (MazaalBraceletEntity*)super->parent; diff --git a/src/enemy/mazaalMacro.c b/src/enemy/mazaalMacro.c index a404cbdc..ef417421 100644 --- a/src/enemy/mazaalMacro.c +++ b/src/enemy/mazaalMacro.c @@ -96,7 +96,7 @@ void sub_08034CC4(MazaalMacroEntity* this) { this->unk_78 = 0x4b0; sub_08034F70(this); InitializeAnimation(super, super->type); - SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer); + SetBottomTile(0x4022, COORD_TO_TILE(super), super->collisionLayer); entity = CreateEnemy(MAZAAL_MACRO, 2); if (entity != NULL) { super->child = entity; diff --git a/src/enemy/octorokGolden.c b/src/enemy/octorokGolden.c index 82bb3c8f..0d6e6ddf 100644 --- a/src/enemy/octorokGolden.c +++ b/src/enemy/octorokGolden.c @@ -117,7 +117,7 @@ void sub_08037E14(Entity* this) { s32 x, y; this->timer = 8; dir = (GetFacingDirection(this, &gPlayerEntity.base) + 4) & 0x18; - layer = (u8*)GetLayerByIndex(this->collisionLayer)->collisionData; + layer = (u8*)GetTileBuffer(this->collisionLayer)->collisionData; ptr = gUnk_080CF498 + (dir >> 2); x = this->x.HALF.HI + *ptr; y = this->y.HALF.HI + *(ptr + 1); diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c index f0bdb5a2..e386d4b6 100644 --- a/src/enemy/pesto.c +++ b/src/enemy/pesto.c @@ -446,7 +446,8 @@ void sub_080244E8(PestoEntity* this) { super->timer = 12; this->unk_83 &= ~0x80; entity = super->child; - SetTile(((PestoEntity*)entity)->unk_70, COORD_TO_TILE(entity), entity->collisionLayer); + SetBottomTile(((PestoEntity*)entity)->unk_70, COORD_TO_TILE(entity), + entity->collisionLayer); DeleteEntity(entity); super->z.HALF.HI -= 0xe; this->unk_78 -= 0xe; diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c index 6031dd12..db6233e1 100644 --- a/src/enemy/rollobite.c +++ b/src/enemy/rollobite.c @@ -276,7 +276,7 @@ bool32 Rollobite_TryToHoleUp(RollobiteEntity* this) { super->y.HALF.HI += 13; super->zVelocity = Q_16_16(2.0); InitializeAnimation(super, super->animationState + 0x14); - SetTile(0x4034, tile, super->collisionLayer); + SetBottomTile(0x4034, tile, super->collisionLayer); return TRUE; } } diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c index 4831bf3b..7ebff811 100644 --- a/src/enemy/rupeeLike.c +++ b/src/enemy/rupeeLike.c @@ -40,7 +40,7 @@ void RupeeLike(RupeeLikeEntity* this) { u32 uVar1; if (super->type2 == 0) { - uVar1 = (u8)sub_080043E8(super); + uVar1 = (u8)GetTileHazardType(super); if (uVar1 != 0) { if (super->action == 4) { sub_080296D8(this); diff --git a/src/enemy/spinyBeetle.c b/src/enemy/spinyBeetle.c index d729bc52..297b3b51 100644 --- a/src/enemy/spinyBeetle.c +++ b/src/enemy/spinyBeetle.c @@ -94,7 +94,7 @@ void SpinyBeetle_Init(SpinyBeetleEntity* this) { this->unk_7b = 0; this->tile = COORD_TO_TILE(super); this->tileIndex = GetTileIndex(this->tile, super->collisionLayer); - SetTile(0x4022, this->tile, super->collisionLayer); + SetBottomTile(0x4022, this->tile, super->collisionLayer); obj = CreateObject(OBJECT_ON_BEETLE, super->type, 0); if (obj == NULL) { @@ -259,7 +259,7 @@ void sub_08033B44(SpinyBeetleEntity* this) { } } - SetTile(0x4022, this->tile, super->collisionLayer); + SetBottomTile(0x4022, this->tile, super->collisionLayer); InitializeAnimation(super, 0); } diff --git a/src/enemy/stalfos.c b/src/enemy/stalfos.c index 6c86aa18..b4a26dfb 100644 --- a/src/enemy/stalfos.c +++ b/src/enemy/stalfos.c @@ -437,7 +437,7 @@ void sub_08039AD4(StalfosEntity* this) { super->action = 0xb; super->child = projectile; InitAnimationForceUpdate(super, super->animationState + 0x18); - SetTile(0x4067, position, super->collisionLayer); + SetBottomTile(0x4067, position, super->collisionLayer); return; } } diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c index a7efe411..3df5abe6 100644 --- a/src/enemy/vaatiProjectile.c +++ b/src/enemy/vaatiProjectile.c @@ -285,6 +285,6 @@ void sub_0803E4D8(VaatiProjectileEntity* this) { tile = TILE(super->x.HALF.HI, super->y.HALF.HI + 8); if (sub_080B1B44(tile, gPlayerEntity.base.collisionLayer) != 0xff) { - SetTile(0x4074, tile, gPlayerEntity.base.collisionLayer); + SetBottomTile(0x4074, tile, gPlayerEntity.base.collisionLayer); } } diff --git a/src/enemy/wizzrobeFire.c b/src/enemy/wizzrobeFire.c index 0253a142..b4c6656c 100644 --- a/src/enemy/wizzrobeFire.c +++ b/src/enemy/wizzrobeFire.c @@ -26,7 +26,7 @@ void WizzrobeFire_OnCollision(WizzrobeEntity* this) { } EnemyFunctionHandlerAfterCollision(super, WizzrobeFire_Functions); if (super->health == 0) { - SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); + SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer); } } @@ -111,7 +111,7 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) { super->timer = 40; super->subtimer = 0; super->flags &= ~0x80; - SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); + SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer); EnqueueSFX(SFX_156); InitializeAnimation(super, super->direction >> 3); } diff --git a/src/enemy/wizzrobeIce.c b/src/enemy/wizzrobeIce.c index def00092..ae2dbcfe 100644 --- a/src/enemy/wizzrobeIce.c +++ b/src/enemy/wizzrobeIce.c @@ -35,7 +35,7 @@ void WizzrobeIce_OnCollision(WizzrobeEntity* this) { } } if (super->health == 0) { - SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); + SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer); } } @@ -118,7 +118,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) { super->timer = 40; super->subtimer = 0; super->flags &= ~0x80; - SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); + SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer); EnqueueSFX(SFX_156); InitializeAnimation(super, super->direction >> 3); } diff --git a/src/enemy/wizzrobeWind.c b/src/enemy/wizzrobeWind.c index b4aeca23..18ee7116 100644 --- a/src/enemy/wizzrobeWind.c +++ b/src/enemy/wizzrobeWind.c @@ -42,7 +42,7 @@ void WizzrobeWind_OnCollision(WizzrobeEntity* this) { } } if (super->health == 0) { - SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); + SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer); } } @@ -135,7 +135,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) { super->subtimer = 0; super->flags &= ~0x80; EnqueueSFX(SFX_156); - SetTile(this->tileIndex, this->tilePosition, super->collisionLayer); + SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer); InitializeAnimation(super, super->direction >> 3); } break; @@ -208,7 +208,7 @@ void sub_0802F888(WizzrobeEntity* this) { super->direction = (sub_08049F84(super, 3) + 4) & 0x18; this->tilePosition = COORD_TO_TILE(super); this->tileIndex = GetTileIndex(this->tilePosition, super->collisionLayer); - SetTile(0x4071, this->tilePosition, super->collisionLayer); + SetBottomTile(0x4071, this->tilePosition, super->collisionLayer); } void sub_0802F8E4(WizzrobeEntity* this) { |
