diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2024-01-06 16:14:12 +0100 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2024-01-06 16:15:34 +0100 |
| commit | 06dc15859867c7f2db22ea6e289e28ff12b0b6c9 (patch) | |
| tree | ae4991dfff60d689953033fb75345cc65628684a /src/object | |
| parent | aced0bef691dbc41bdd39b6e62662d2436877a4b (diff) | |
Rename vvv to actTile
Diffstat (limited to 'src/object')
31 files changed, 159 insertions, 159 deletions
diff --git a/src/object/beanstalk.c b/src/object/beanstalk.c index 8fcbd27e..e445d415 100644 --- a/src/object/beanstalk.c +++ b/src/object/beanstalk.c @@ -333,18 +333,18 @@ void Beanstalk_Action1Type9(BeanstalkEntity* this) { if (super->subAction == 0) { super->subAction = 1; super->y.HALF.HI += 0x28; - this->unk_72 = sub_080B1A0C(super, 0, -24); + this->unk_72 = GetTileTypeRelativeToEntity(super, 0, -24); } super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY; super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3; if (gPlayerState.floor_type == SURFACE_LADDER) { super->spritePriority.b0 = 0; - if (sub_080B1A0C(super, 0, -24) != SPECIAL_TILE_20) { + if (GetTileTypeRelativeToEntity(super, 0, -24) != SPECIAL_TILE_20) { SetTile(SPECIAL_TILE_20, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM); } } else { super->spritePriority.b0 = 5; - if (this->unk_72 != sub_080B1A0C(super, 0, -24)) { + if (this->unk_72 != GetTileTypeRelativeToEntity(super, 0, -24)) { SetTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM); } } diff --git a/src/object/bigIceBlock.c b/src/object/bigIceBlock.c index a4398c99..dd204c78 100644 --- a/src/object/bigIceBlock.c +++ b/src/object/bigIceBlock.c @@ -127,7 +127,7 @@ void sub_08099880(BigIceBlockEntity* this) { void sub_08099910(BigIceBlockEntity* this) { u32 uVar2; - s32 vvv; + s32 actTile; u32 tileIndex; u32 tilePos; @@ -144,109 +144,109 @@ void sub_08099910(BigIceBlockEntity* this) { SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer); break; case 1: - vvv = GetVvvAtTilePos(tilePos - 0x41, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x41, super->collisionLayer); tileIndex = SPECIAL_TILE_36; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_121; } SetTile(tileIndex, tilePos - 0x41, super->collisionLayer); SetTile(SPECIAL_TILE_34, tilePos - 0x40, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos - 0x3f, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x3f, super->collisionLayer); tileIndex = SPECIAL_TILE_37; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_123; } SetTile(tileIndex, tilePos - 0x3f, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos - 1, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 1, super->collisionLayer); tileIndex = SPECIAL_TILE_36; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_121; } SetTile(tileIndex, tilePos - 1, super->collisionLayer); SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 1, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 1, super->collisionLayer); tileIndex = SPECIAL_TILE_37; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_123; } SetTile(tileIndex, tilePos + 1, super->collisionLayer); return; break; case 2: - vvv = GetVvvAtTilePos(tilePos - 0x41, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x41, super->collisionLayer); tileIndex = SPECIAL_TILE_35; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_119; } SetTile(tileIndex, tilePos - 0x41, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos - 0x40, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x40, super->collisionLayer); tileIndex = SPECIAL_TILE_35; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_119; } SetTile(tileIndex, tilePos - 0x40, super->collisionLayer); SetTile(SPECIAL_TILE_34, tilePos - 1, super->collisionLayer); SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 0x3f, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 0x3f, super->collisionLayer); tileIndex = SPECIAL_TILE_38; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_124; } SetTile(tileIndex, tilePos + 0x3f, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 0x40, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 0x40, super->collisionLayer); tileIndex = SPECIAL_TILE_38; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_124; } SetTile(tileIndex, tilePos + 0x40, super->collisionLayer); break; case 3: - vvv = GetVvvAtTilePos(tilePos - 0x41, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x41, super->collisionLayer); tileIndex = SPECIAL_TILE_39; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_117; } SetTile(tileIndex, tilePos - 0x41, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos - 0x40, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x40, super->collisionLayer); tileIndex = SPECIAL_TILE_35; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_119; } SetTile(tileIndex, tilePos - 0x40, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos - 0x3f, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 0x3f, super->collisionLayer); tileIndex = SPECIAL_TILE_40; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_118; } SetTile(tileIndex, tilePos - 0x3f, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos - 1, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos - 1, super->collisionLayer); tileIndex = SPECIAL_TILE_36; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_121; } SetTile(tileIndex, tilePos - 1, super->collisionLayer); SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 1, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 1, super->collisionLayer); tileIndex = SPECIAL_TILE_37; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_123; } SetTile(tileIndex, tilePos + 1, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 0x3f, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 0x3f, super->collisionLayer); tileIndex = SPECIAL_TILE_41; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_120; } SetTile(tileIndex, tilePos + 0x3f, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 0x40, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 0x40, super->collisionLayer); tileIndex = SPECIAL_TILE_38; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_124; } SetTile(tileIndex, tilePos + 0x40, super->collisionLayer); - vvv = GetVvvAtTilePos(tilePos + 0x41, super->collisionLayer); + actTile = GetActTileAtTilePos(tilePos + 0x41, super->collisionLayer); tileIndex = SPECIAL_TILE_42; - if (vvv == VVV_18) { + if (actTile == ACT_TILE_18) { tileIndex = SPECIAL_TILE_122; } SetTile(tileIndex, tilePos + 0x41, super->collisionLayer); diff --git a/src/object/bigPushableLever.c b/src/object/bigPushableLever.c index 5847ca65..e7efcd56 100644 --- a/src/object/bigPushableLever.c +++ b/src/object/bigPushableLever.c @@ -11,8 +11,8 @@ typedef struct { /*0x00*/ Entity base; /*0x68*/ u8 unk_68[8]; - /*0x70*/ u16 tilePositionUpper; - /*0x72*/ u16 tilePositionLower; + /*0x70*/ u16 tilePosUpper; + /*0x72*/ u16 tilePosLower; /*0x74*/ u16 tileIndexUpper; /*0x76*/ u16 tileIndexLower; /*0x78*/ u8 unk_78[12]; @@ -48,8 +48,8 @@ void BigPushableLever_Init(BigPushableLeverEntity* this) { void BigPushableLever_Idle(BigPushableLeverEntity* this) { if (BigPushableLever_ShouldStartPushing(this)) { super->action = PUSHING; - SetTile(this->tileIndexUpper, this->tilePositionUpper, super->collisionLayer); - SetTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer); + SetTile(this->tileIndexUpper, this->tilePosUpper, super->collisionLayer); + SetTile(this->tileIndexLower, this->tilePosLower, super->collisionLayer); EnqueueSFX(SFX_132); RequestPriorityDuration(super, 30); if (PlayerCanBeMoved()) { @@ -84,32 +84,32 @@ void BigPushableLever_SetIdle(BigPushableLeverEntity* this) { void BigPushableLever_SetTiles(BigPushableLeverEntity* this) { if (!CheckFlags(this->pushedFlag)) { super->type2 = 0; - this->tilePositionUpper = COORD_TO_TILE_OFFSET(super, 0, 0x10); - this->tilePositionLower = this->tilePositionUpper - 0x40; - this->tileIndexUpper = GetTileIndex(this->tilePositionUpper, super->collisionLayer); - this->tileIndexLower = GetTileIndex(this->tilePositionLower, super->collisionLayer); - SetTile(SPECIAL_TILE_87, this->tilePositionUpper, super->collisionLayer); - SetTile(SPECIAL_TILE_88, this->tilePositionLower, super->collisionLayer); + this->tilePosUpper = COORD_TO_TILE_OFFSET(super, 0, 0x10); + this->tilePosLower = this->tilePosUpper - 0x40; + this->tileIndexUpper = GetTileIndex(this->tilePosUpper, super->collisionLayer); + this->tileIndexLower = GetTileIndex(this->tilePosLower, super->collisionLayer); + SetTile(SPECIAL_TILE_87, this->tilePosUpper, super->collisionLayer); + SetTile(SPECIAL_TILE_88, this->tilePosLower, super->collisionLayer); InitializeAnimation(super, 1); } else { super->type2 = 1; - this->tilePositionUpper = COORD_TO_TILE_OFFSET(super, 0x10, 0); - this->tilePositionLower = this->tilePositionUpper - 1; - this->tileIndexUpper = GetTileIndex(this->tilePositionUpper, super->collisionLayer); - this->tileIndexLower = GetTileIndex(this->tilePositionLower, super->collisionLayer); - SetTile(SPECIAL_TILE_85, this->tilePositionUpper, super->collisionLayer); - SetTile(SPECIAL_TILE_86, this->tilePositionLower, super->collisionLayer); + this->tilePosUpper = COORD_TO_TILE_OFFSET(super, 0x10, 0); + this->tilePosLower = this->tilePosUpper - 1; + this->tileIndexUpper = GetTileIndex(this->tilePosUpper, super->collisionLayer); + this->tileIndexLower = GetTileIndex(this->tilePosLower, super->collisionLayer); + SetTile(SPECIAL_TILE_85, this->tilePosUpper, super->collisionLayer); + SetTile(SPECIAL_TILE_86, this->tilePosLower, super->collisionLayer); InitializeAnimation(super, 0); } } bool32 BigPushableLever_ShouldStartPushing(BigPushableLeverEntity* this) { - if (GetTileIndex(this->tilePositionLower, super->collisionLayer) == SPECIAL_TILE_89) { + if (GetTileIndex(this->tilePosLower, super->collisionLayer) == SPECIAL_TILE_89) { if (--this->timer == 0) { return TRUE; } BigPushableLever_CalculateSpriteOffsets(this); - SetTile(gUnk_081236E8[super->type2], this->tilePositionLower, super->collisionLayer); + SetTile(gUnk_081236E8[super->type2], this->tilePosLower, super->collisionLayer); } else { this->timer = 60; super->spriteOffsetX = 0; diff --git a/src/object/blockPushed.c b/src/object/blockPushed.c index b6933775..85f45ce9 100644 --- a/src/object/blockPushed.c +++ b/src/object/blockPushed.c @@ -45,7 +45,7 @@ void BlockPushed_Init(BlockPushedEntity* this) { super->x.HALF.HI += tmp; super->y.HALF.HI += tmp; super->hitbox = (Hitbox*)gUnk_0811F64C[super->type]; - this->unk_68 = GetTileType(tilePos, super->collisionLayer); + this->unk_68 = GetTileTypeAtTilePos(tilePos, super->collisionLayer); switch (super->type) { case 0: sub_080832D8(tilePos, this); diff --git a/src/object/button.c b/src/object/button.c index 7c238e5b..ef014914 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -44,7 +44,7 @@ void Button_Init(ButtonEntity* this) { } this->tilePos = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) | ((((super->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) << 6); - this->unk_72 = GetTileType(this->tilePos, super->collisionLayer); + this->unk_72 = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); if (super->type == 0 && CheckFlags(this->unk_86)) { super->action = 5; SetTileType(TILE_TYPE_122, this->tilePos, super->collisionLayer); @@ -60,7 +60,7 @@ void Button_Init(ButtonEntity* this) { void Button_Action1(ButtonEntity* this) { if (sub_08081E3C(this)) { super->action = 2; - this->unk_72 = GetTileType(this->tilePos, super->collisionLayer); + this->unk_72 = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); } } @@ -132,12 +132,12 @@ bool32 sub_08081CB0(ButtonEntity* this) { u16 tileType; if (sub_08081D74(this)) { this->unk_70 = -1; - if (GetTileType(this->tilePos, super->collisionLayer) == SPECIAL_TILE_53) { + if (GetTileTypeAtTilePos(this->tilePos, super->collisionLayer) == SPECIAL_TILE_53) { sub_0807B7D8(0x78, this->tilePos, super->collisionLayer); } return TRUE; } else { - tileType = GetTileType(this->tilePos, super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); if (tileType != 0x77 && tileType != 0x79 && tileType != SPECIAL_TILE_53) { this->unk_70 = GetTileIndex(this->tilePos, super->collisionLayer); return TRUE; @@ -204,7 +204,7 @@ u32 sub_08081E3C(ButtonEntity* this) { }; const u16* tmp1; s32 tmp2; - tmp2 = GetTileType(this->tilePos, super->collisionLayer); + tmp2 = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); tmp1 = gUnk_0811EE50; do { if (*tmp1 == tmp2) @@ -223,21 +223,21 @@ void sub_08081E6C(ButtonEntity* this) { u32 tileType; MapLayer* mapLayer; u16* tmp2; - u16* tmp; + u16* subTiles; u16* tmp3; u32 tilePos = this->tilePos; u32 layer = super->collisionLayer; - u32 specialTile = GetTileType(tilePos, layer); + u32 specialTile = GetTileTypeAtTilePos(tilePos, layer); if (specialTile < 0x4000) return; mapLayer = GetLayerByIndex(layer); tileType = (super->type == 0 ? TILE_TYPE_122 : TILE_TYPE_120); - tmp = mapLayer->tiles; - tmp = tmp + (mapLayer->unkData2[tileType] << 2); + subTiles = mapLayer->subTiles; + subTiles = subTiles + (mapLayer->tileIndices[tileType] << 2); tmp2 = (layer == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial); tmp2 += (((0x3f & tilePos) << 1) + ((0xfc0 & tilePos) << 2)); - if (sub_08081F00((u32*)tmp2, (u32*)tmp)) + if (sub_08081F00((u32*)tmp2, (u32*)subTiles)) return; SetTileType(tileType, tilePos, layer); SetTile(specialTile, tilePos, layer); diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c index 8fea49c9..7ea08cda 100644 --- a/src/object/chestSpawner.c +++ b/src/object/chestSpawner.c @@ -232,7 +232,7 @@ void ChestSpawner_Type0Init(ChestSpawnerEntity* this) { super->action++; this->tilePos = COORD_TO_TILE(super); super->hitbox = (Hitbox*)&gUnk_0811F8A8; - if (GetTileTypeByEntity(super) == TILE_TYPE_116) { + if (GetTileTypeAtEntity(super) == TILE_TYPE_116) { DeleteThisEntity(); } if (CheckFlags(this->unk_86)) { @@ -271,7 +271,7 @@ void ChestSpawner_Type0Action2(ChestSpawnerEntity* this) { void ChestSpawner_Type0Action3(ChestSpawnerEntity* this) { if ((super->type == 1) || (super->type == 7)) { - if (GetTileTypeByEntity(super) == TILE_TYPE_116) { + if (GetTileTypeAtEntity(super) == TILE_TYPE_116) { DeleteEntity(super); } else { if (!CheckFlags(this->unk_86)) { diff --git a/src/object/crenelBeanSprout.c b/src/object/crenelBeanSprout.c index 578e3ef6..b57c4c8c 100644 --- a/src/object/crenelBeanSprout.c +++ b/src/object/crenelBeanSprout.c @@ -168,13 +168,13 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) { tmp = gPlayerEntity.base.animationState & 6; this->unk_70 = ((super->x.HALF.HI + (s8)gUnk_08123184[tmp]) & -0x10) | 8; this->unk_72 = ((super->y.HALF.HI + (s8)gUnk_08123184[(tmp) + 1]) & -0x10) | 8; - if (GetVvvAtWorldCoords(this->unk_70, this->unk_72, super->collisionLayer) == VVV_25) { + if (GetActTileAtWorldCoords(this->unk_70, this->unk_72, super->collisionLayer) == ACT_TILE_25) { gHUD.rActionPlayerState = R_ACTION_THROW; } else { gHUD.rActionPlayerState = R_ACTION_NONE; } PositionRelative(&gPlayerEntity.base, super, 0, 0x10000); - if (GetVvvAtEntity(super) == VVV_25) { + if (GetActTileAtEntity(super) == ACT_TILE_25) { RestorePrevTileEntity(0xdc, super->collisionLayer); sub_08096A78(this); } @@ -233,7 +233,7 @@ void CrenelBeanSprout_Action3(CrenelBeanSproutEntity* this) { void CrenelBeanSprout_Action4(CrenelBeanSproutEntity* this) { static const u16 gUnk_0812319C[] = { SPECIAL_TILE_60, SPECIAL_TILE_51 }; - if (gUnk_0812319C[super->type >> 1] == GetTileTypeByEntity(super)) { + if (gUnk_0812319C[super->type >> 1] == GetTileTypeAtEntity(super)) { GetNextFrame(super); gPlayerState.keepFacing |= 0x80; gPlayerState.field_0xa |= 0x80; diff --git a/src/object/cutsceneMiscObject.c b/src/object/cutsceneMiscObject.c index 3c26788f..2427c370 100644 --- a/src/object/cutsceneMiscObject.c +++ b/src/object/cutsceneMiscObject.c @@ -332,7 +332,7 @@ void CutsceneMiscObject_Type5(CutsceneMiscObjectEntity* this) { super->zVelocity = 0; SetEntityPriority(super, PRIO_PLAYER_EVENT); InitializeAnimation(super, 0); - if (GetVvvAtEntity(super) == VVV_13) { + if (GetActTileAtEntity(super) == ACT_TILE_13) { super->action = 3; } break; diff --git a/src/object/doubleBookshelf.c b/src/object/doubleBookshelf.c index 0438f353..eb3c267e 100644 --- a/src/object/doubleBookshelf.c +++ b/src/object/doubleBookshelf.c @@ -73,7 +73,7 @@ void DoubleBookshelf_Init(DoubleBookshelfEntity* this) { } void DoubleBookshelf_Action1(DoubleBookshelfEntity* this) { - GetTileType(this->unk_82, super->collisionLayer); + GetTileTypeAtTilePos(this->unk_82, super->collisionLayer); sub_0809B234(this); } diff --git a/src/object/fireplace.c b/src/object/fireplace.c index 8adfe936..4fd32aec 100644 --- a/src/object/fireplace.c +++ b/src/object/fireplace.c @@ -50,7 +50,7 @@ void Fireplace_Action1(FireplaceEntity* this) { } void sub_0809B7C0(FireplaceEntity* this) { - u32 tileType = GetTileTypeByEntity(super); + u32 tileType = GetTileTypeAtEntity(super); if (tileType != SPECIAL_TILE_97 && tileType != SPECIAL_TILE_98) { sub_0809B7DC(this); } diff --git a/src/object/furniture.c b/src/object/furniture.c index d54eea37..44cb7449 100644 --- a/src/object/furniture.c +++ b/src/object/furniture.c @@ -261,7 +261,7 @@ static void FurnitureInit(FurnitureEntity* this) { for (i = 0; i < cnt; ++i, ++tilePos) { SetTile(SPECIAL_TILE_38, tilePos, LAYER_TOP); SetTile(SPECIAL_TILE_38, tilePos, LAYER_BOTTOM); - SetVvvAtTilePos(VVV_0, tilePos + TILE_POS(0, 1), 1); + SetActTileAtTilePos(ACT_TILE_0, tilePos + TILE_POS(0, 1), 1); } break; } @@ -287,7 +287,7 @@ static void FurnitureInit(FurnitureEntity* this) { super->collisionLayer = 1; super->spriteOrientation.flipY = 2; SetTile(SPECIAL_TILE_116, this->tilePos - 64, super->collisionLayer); - SetVvvAtTilePos(VVV_63, this->tilePos - 64, super->collisionLayer); + SetActTileAtTilePos(ACT_TILE_63, this->tilePos - 64, super->collisionLayer); SetTile(SPECIAL_TILE_23, this->tilePos, super->collisionLayer); SetTile(SPECIAL_TILE_23, this->tilePos + 64, super->collisionLayer); break; @@ -339,7 +339,7 @@ static void FurnitureUpdate(FurnitureEntity* this) { case 0x80: if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI + 8) { if (gPlayerState.floor_type != SURFACE_LADDER && - GetTileTypeByEntity(super) == SPECIAL_TILE_23) { + GetTileTypeAtEntity(super) == SPECIAL_TILE_23) { SetTile(SPECIAL_TILE_38, this->tilePos, super->collisionLayer); SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(0, -1), super->collisionLayer); SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(0, -2), super->collisionLayer); @@ -349,7 +349,7 @@ static void FurnitureUpdate(FurnitureEntity* this) { gPlayerEntity.base.collisionLayer = 1; UpdateSpriteForCollisionLayer(&gPlayerEntity.base); } - if (GetTileTypeByEntity(super) != SPECIAL_TILE_23) { + if (GetTileTypeAtEntity(super) != SPECIAL_TILE_23) { SetTile(SPECIAL_TILE_23, this->tilePos, super->collisionLayer); SetTile(SPECIAL_TILE_23, this->tilePos + TILE_POS(0, -1), super->collisionLayer); SetTile(SPECIAL_TILE_20, this->tilePos + TILE_POS(0, -2), super->collisionLayer); diff --git a/src/object/giantBookLadder.c b/src/object/giantBookLadder.c index 1be5f63c..5f18d1b4 100644 --- a/src/object/giantBookLadder.c +++ b/src/object/giantBookLadder.c @@ -83,5 +83,5 @@ void sub_0808E55C(GiantBookLadderEntity* this) { } u32 sub_0808E670(GiantBookLadderEntity* this) { - return GetTileType(this->unk74 - 0x101, LAYER_BOTTOM); + return GetTileTypeAtTilePos(this->unk74 - 0x101, LAYER_BOTTOM); } diff --git a/src/object/hiddenLadderDown.c b/src/object/hiddenLadderDown.c index d02a22f4..dd7ed7d5 100644 --- a/src/object/hiddenLadderDown.c +++ b/src/object/hiddenLadderDown.c @@ -55,7 +55,7 @@ void HiddenLadderDown_Init(HiddenLadderDownEntity* this) { } void HiddenLadderDown_Action1(HiddenLadderDownEntity* this) { - if (GetTileType(this->unk_70, super->collisionLayer) == 0x1a6) { + if (GetTileTypeAtTilePos(this->unk_70, super->collisionLayer) == 0x1a6) { super->action = 2; super->spriteSettings.draw = TRUE; SetFlag(this->unk_86); diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index 7f27236a..7d7b8917 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -218,7 +218,7 @@ void sub_08081188(ItemOnGroundEntity* this) { void sub_080811AC(ItemOnGroundEntity* this) { super->action = 2; super->spriteSettings.draw = 0; - this->unk_6e = GetTileTypeByEntity(super); + this->unk_6e = GetTileTypeAtEntity(super); } void sub_080811C8(ItemOnGroundEntity* this) { @@ -285,7 +285,7 @@ void sub_080812A0(ItemOnGroundEntity* this) { void sub_080812A8(ItemOnGroundEntity* this) { if (GetCollisionDataAtEntity(super) != COLLISION_DATA_15 && - this->unk_6e != GetTileTypeByEntity(super)) { + this->unk_6e != GetTileTypeAtEntity(super)) { super->direction = 0; super->speed = 0; super->spriteSettings.draw = 1; diff --git a/src/object/ladderUp.c b/src/object/ladderUp.c index 002146d7..5e5727fa 100644 --- a/src/object/ladderUp.c +++ b/src/object/ladderUp.c @@ -67,12 +67,12 @@ void LadderUp(Entity* this) { if (this->type2 == 0) { if (gPlayerEntity.base.y.HALF.HI < this->y.HALF.HI) { if (gPlayerState.floor_type != SURFACE_LADDER && - (GetTileTypeByEntity(this) == SPECIAL_TILE_23)) { + (GetTileTypeAtEntity(this) == SPECIAL_TILE_23)) { SetTile(SPECIAL_TILE_35, COORD_TO_TILE(this), this->collisionLayer); RestorePrevTileEntity(COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer); } } else { - if (GetTileTypeByEntity(this) != SPECIAL_TILE_23) { + if (GetTileTypeAtEntity(this) != SPECIAL_TILE_23) { SetTile(SPECIAL_TILE_23, COORD_TO_TILE(this), this->collisionLayer); if (this->type == 0) { SetTile(SPECIAL_TILE_23, COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer); diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c index 05111754..03cca48a 100644 --- a/src/object/lilypadLarge.c +++ b/src/object/lilypadLarge.c @@ -331,10 +331,10 @@ void LilypadLarge_Action2(LilypadLargeEntity* this) { void sub_08085A44(LilypadLargeEntity* this) { super->speed = 0x200; - if (GetVvvRelativeToEntity(super, 0x10, 0x18) != VVV_17) { + if (GetActTileRelativeToEntity(super, 0x10, 0x18) != ACT_TILE_17) { super->direction = 0x18; } else { - if (GetVvvRelativeToEntity(super, -0x10, 0x18) != VVV_17) { + if (GetActTileRelativeToEntity(super, -0x10, 0x18) != ACT_TILE_17) { super->direction = 8; } else { super->direction = 0x10; @@ -355,7 +355,7 @@ void sub_08085A98(LilypadLargeEntity* this) { this->unk_78.WORD -= 0x20000; SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI); } - if (GetVvvRelativeToEntity(super, 0, 0x18) != VVV_17) { + if (GetActTileRelativeToEntity(super, 0, 0x18) != ACT_TILE_17) { super->subAction = 2; if (gArea.locationIndex == 27) { // AREA_TEMPLE_OF_DROPLETS super->y.HALF.HI += 0xd0; @@ -388,7 +388,7 @@ void sub_08085B40(LilypadLargeEntity* this) { } } else { ResetCollisionLayer(super); - if (GetVvvAtEntity(super) == VVV_13) { + if (GetActTileAtEntity(super) == ACT_TILE_13) { ResetCollisionLayer(&gPlayerEntity.base); LilypadLarge_Action4(this); super->direction = GetFacingDirection(&gPlayerEntity.base, super); @@ -410,7 +410,7 @@ void sub_08085B40(LilypadLargeEntity* this) { super->timer |= 0x80; this->unk_70 = 0; this->unk_6c = 0; - if (GetVvvAtEntity(super) == VVV_13) { + if (GetActTileAtEntity(super) == ACT_TILE_13) { super->action = 4; } } @@ -458,7 +458,7 @@ void LilypadLarge_Action5(LilypadLargeEntity* this) { void sub_08085D28(LilypadLargeEntity* this) { if (((gPlayerState.framestate != PL_STATE_TALKEZLO) && ((gPlayerState.flags & PL_FLAGS2) != 0)) && - (GetVvvRelativeToEntity(super, 0, 0x18) == VVV_17)) { + (GetActTileRelativeToEntity(super, 0, 0x18) == ACT_TILE_17)) { super->action = 2; super->subAction = 0; PausePlayer(); diff --git a/src/object/linkEmptyingBottle.c b/src/object/linkEmptyingBottle.c index 84d1da82..fff00408 100644 --- a/src/object/linkEmptyingBottle.c +++ b/src/object/linkEmptyingBottle.c @@ -15,7 +15,7 @@ typedef struct { /*0x68*/ u8 unk_68; } LinkEmptyingBottleEntity; -extern u32 sub_080B1A0C(Entity*, s32, s32); +extern u32 GetTileTypeRelativeToEntity(Entity*, s32, s32); void LinkEmptyingBottle_Init(LinkEmptyingBottleEntity*); void LinkEmptyingBottle_Action1(LinkEmptyingBottleEntity*); @@ -118,7 +118,7 @@ void sub_08094980(LinkEmptyingBottleEntity* this, u32 searchTileIndex, u32 repla while (index < 10) { xOffset = gUnk_08122A28[index]; yOffset = gUnk_08122A28[index + 1]; - if (searchTileIndex == sub_080B1A0C(super, xOffset, yOffset)) { + if (searchTileIndex == GetTileTypeRelativeToEntity(super, xOffset, yOffset)) { SetTile(replaceTileIndex, TILE(super->x.HALF.HI + xOffset, super->y.HALF.HI + yOffset), super->collisionLayer); } diff --git a/src/object/minecart.c b/src/object/minecart.c index f8ed1789..075bb3e4 100644 --- a/src/object/minecart.c +++ b/src/object/minecart.c @@ -131,7 +131,7 @@ void Minecart_Action2(MinecartEntity* this) { void Minecart_Action3(MinecartEntity* this) { static const s8 offsetCoords[] = { 0, -7, 7, 0, 0, 7, -7, 0 }; - u32 vvv; + u32 actTile; gRoomControls.scrollSpeed = 7; if ((gPlayerState.flags & PL_IN_MINECART) == 0) { @@ -163,14 +163,14 @@ void Minecart_Action3(MinecartEntity* this) { super->subtimer = 60; } - vvv = GetVvvRelativeToEntity(super, offsetCoords[super->animationState * 2], + actTile = GetActTileRelativeToEntity(super, offsetCoords[super->animationState * 2], offsetCoords[super->animationState * 2 + 1]); - if (FindValueForKey(vvv, gUnk_081223D8[super->animationState]) == 0) { + if (FindValueForKey(actTile, gUnk_081223D8[super->animationState]) == 0) { super->direction = DirectionTurnAround(super->direction); super->animationState = AnimationStateFlip90(super->animationState); } else { - switch (vvv) { - case VVV_100: + switch (actTile) { + case ACT_TILE_100: super->flags &= ~ENT_PERSIST; super->hitType = 1; super->collisionFlags = 0x47; @@ -190,15 +190,15 @@ void Minecart_Action3(MinecartEntity* this) { SoundReq(SFX_PLY_VO4); SoundReq(SFX_139); return; - case VVV_103: - case VVV_104: - case VVV_105: - case VVV_106: - case VVV_108: - case VVV_109: - case VVV_110: - case VVV_111: - if (vvv == GetVvvAtEntity(super)) { + case ACT_TILE_103: + case ACT_TILE_104: + case ACT_TILE_105: + case ACT_TILE_106: + case ACT_TILE_108: + case ACT_TILE_109: + case ACT_TILE_110: + case ACT_TILE_111: + if (actTile == GetActTileAtEntity(super)) { Minecart_Action4(this); gPlayerEntity.base.animationState = super->animationState << 1; return; @@ -220,8 +220,8 @@ void Minecart_Action3(MinecartEntity* this) { void Minecart_Action4(MinecartEntity* this) { SnapToTile(super); CopyPosition(super, &gPlayerEntity.base); - switch (GetVvvAtEntity(super)) { - case VVV_103: + switch (GetActTileAtEntity(super)) { + case ACT_TILE_103: if (super->direction == DirectionWest) { super->direction = DirectionNorth; super->animationState = 0; @@ -230,7 +230,7 @@ void Minecart_Action4(MinecartEntity* this) { super->animationState = 1; } break; - case VVV_104: + case ACT_TILE_104: if (super->direction == DirectionEast) { super->direction = DirectionSouth; super->animationState = 2; @@ -239,7 +239,7 @@ void Minecart_Action4(MinecartEntity* this) { super->animationState = 3; } break; - case VVV_105: + case ACT_TILE_105: if (super->direction == DirectionEast) { super->direction = DirectionNorth; super->animationState = 0; @@ -248,7 +248,7 @@ void Minecart_Action4(MinecartEntity* this) { super->animationState = 3; } break; - case VVV_106: + case ACT_TILE_106: if (super->direction == DirectionWest) { super->direction = DirectionSouth; super->animationState = 2; @@ -343,18 +343,18 @@ const KeyValuePair* const gUnk_081223D8[] = { gUnk_08122436, }; const KeyValuePair gUnk_081223E8[] = { - { VVV_242, 1 }, { VVV_101, 1 }, { VVV_104, 1 }, { VVV_106, 1 }, { VVV_100, 1 }, { VVV_41, 1 }, + { ACT_TILE_242, 1 }, { ACT_TILE_101, 1 }, { ACT_TILE_104, 1 }, { ACT_TILE_106, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 }, }; const u16 gUnk_081223E8End = 0; const KeyValuePair gUnk_08122402[] = { - { VVV_243, 1 }, { VVV_102, 1 }, { VVV_104, 1 }, { VVV_105, 1 }, { VVV_100, 1 }, { VVV_41, 1 }, + { ACT_TILE_243, 1 }, { ACT_TILE_102, 1 }, { ACT_TILE_104, 1 }, { ACT_TILE_105, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 }, }; const u16 gUnk_08122402End = 0; const KeyValuePair gUnk_0812241C[] = { - { VVV_242, 1 }, { VVV_101, 1 }, { VVV_103, 1 }, { VVV_105, 1 }, { VVV_100, 1 }, { VVV_41, 1 }, + { ACT_TILE_242, 1 }, { ACT_TILE_101, 1 }, { ACT_TILE_103, 1 }, { ACT_TILE_105, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 }, }; const u16 gUnk_0812241CEnd = 0; const KeyValuePair gUnk_08122436[] = { - { VVV_243, 1 }, { VVV_102, 1 }, { VVV_106, 1 }, { VVV_103, 1 }, { VVV_100, 1 }, { VVV_41, 1 }, + { ACT_TILE_243, 1 }, { ACT_TILE_102, 1 }, { ACT_TILE_106, 1 }, { ACT_TILE_103, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 }, }; const u16 gUnk_08122436End = 0; diff --git a/src/object/objectBlockingStairs.c b/src/object/objectBlockingStairs.c index 2e00c122..76ff017f 100644 --- a/src/object/objectBlockingStairs.c +++ b/src/object/objectBlockingStairs.c @@ -108,9 +108,9 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) { } if (this->unk7b & 0x40) { - tileType = (u32)GetTileType(this->tilePos - 1, super->collisionLayer); + tileType = (u32)GetTileTypeAtTilePos(this->tilePos - 1, super->collisionLayer); } else { - tileType = (u32)GetTileType(this->tilePos + 1, super->collisionLayer); + tileType = (u32)GetTileTypeAtTilePos(this->tilePos + 1, super->collisionLayer); } switch (tileType) { diff --git a/src/object/objectOnPillar.c b/src/object/objectOnPillar.c index 76ad4984..f48d7bcd 100644 --- a/src/object/objectOnPillar.c +++ b/src/object/objectOnPillar.c @@ -148,7 +148,7 @@ void ObjectOnPillar_Action4(ObjectOnPillarEntity* this) { bool32 sub_08097008(ObjectOnPillarEntity* this) { Entity* effect; - u32 tileType = GetTileType(this->tilePos, super->collisionLayer); + u32 tileType = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); if (tileType != SPECIAL_TILE_54) { switch (sub_08097074(tileType)) { case 1: @@ -191,7 +191,7 @@ void sub_08097098(ObjectOnPillarEntity* this) { this->unk_76 = 0x20; EnqueueSFX(SFX_10F); SetTile(this->tileIndex, this->tilePos, super->collisionLayer); - tileType = GetTileType(gUnk_080B4488[super->direction >> 3] + this->tilePos, super->collisionLayer); + tileType = GetTileTypeAtTilePos(gUnk_080B4488[super->direction >> 3] + this->tilePos, super->collisionLayer); if ((tileType == 0x79) || tileType == 0x77) { super->spriteOffsetY = 2; } @@ -206,7 +206,7 @@ void sub_080970F4(ObjectOnPillarEntity* this) { bool32 sub_08097144(ObjectOnPillarEntity* this) { LinearMoveUpdate(super); sub_0800445C(super); - if (GetVvvAtEntity(super) == VVV_25) { + if (GetActTileAtEntity(super) == ACT_TILE_25) { super->spriteOffsetY = 2; } if ((--this->unk_76 == 0) && sub_08097194(this) == FALSE) { @@ -222,7 +222,7 @@ bool32 sub_08097194(ObjectOnPillarEntity* this) { if (sub_0800442E(super)) { return TRUE; } else { - u32 tileType = GetTileTypeByEntity(super); + u32 tileType = GetTileTypeAtEntity(super); if (tileType == TILE_TYPE_113 || tileType == TILE_TYPE_114 || tileType == SPECIAL_TILE_32) { SetFlag(this->flag); EnqueueSFX(SFX_10B); diff --git a/src/object/playerClone.c b/src/object/playerClone.c index 4eafeb31..3a39e465 100644 --- a/src/object/playerClone.c +++ b/src/object/playerClone.c @@ -110,7 +110,7 @@ void PlayerClone_Action2(PlayerCloneEntity* this) { if (gPlayerEntity.base.iframes >= 1) { gPlayerState.chargeState.action = 1; } else { - GetVvvAtEntity(super); // TODO why is the return value not used? // leftover from debugging? + GetActTileAtEntity(super); // TODO why is the return value not used? // leftover from debugging? sub_08084B1C(this); super->x.HALF.HI = gPlayerEntity.base.x.HALF.HI + this->unk78; super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI + this->unk7a; @@ -191,8 +191,8 @@ void sub_08084CAC(PlayerCloneEntity* this) { if (((PlayerCloneEntity*)gPlayerClones[super->type])->unk70 == 0) { ptr = &gUnk_080B4468[super->animationState & 6]; - if (GetVvvForTileType( - GetTileType(COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]), super->collisionLayer)) == VVV_114) { + if (GetActTileForTileType( + GetTileTypeAtTilePos(COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]), super->collisionLayer)) == ACT_TILE_114) { ((PlayerCloneEntity*)gPlayerClones[0])->unk6c |= (1 << super->type); } else { ((PlayerCloneEntity*)gPlayerClones[0])->unk6c &= ~(1 << super->type); diff --git a/src/object/pot.c b/src/object/pot.c index ed8504a7..adfcb75d 100644 --- a/src/object/pot.c +++ b/src/object/pot.c @@ -107,7 +107,7 @@ void Pot_Action1(PotEntity* this) { Pot_Action5(this); break; default: - tileType = GetTileTypeByEntity(super); + tileType = GetTileTypeAtEntity(super); if (tileType != 0x4000) { switch (tileType) { case SPECIAL_TILE_4: @@ -129,7 +129,7 @@ void Pot_Action1(PotEntity* this) { DeleteThisEntity(); break; default: - if (GetVvvAtEntity(super) == VVV_13) { + if (GetActTileAtEntity(super) == ACT_TILE_13) { CreateFx(super, FX_FALL_DOWN, 0); } else if (tileType == SPECIAL_TILE_5) { gPlayerState.lastSwordMove = SWORD_MOVE_BREAK_POT; @@ -224,7 +224,7 @@ void Pot_Action4(PotEntity* this) { } this->unk_70 = GetTileIndex(COORD_TO_TILE(super), super->collisionLayer); - tileType = GetTileTypeByEntity(super); + tileType = GetTileTypeAtEntity(super); switch (tileType) { case 0x71: case 0x72: diff --git a/src/object/pushableFurniture.c b/src/object/pushableFurniture.c index 04682181..677ecd1b 100644 --- a/src/object/pushableFurniture.c +++ b/src/object/pushableFurniture.c @@ -492,7 +492,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) { if ((this->unk_83 & 0x20) != 0) { sub_08090480(0, uVar2 + 1); } else { - switch (GetTileType(uVar2, 2)) { + switch (GetTileTypeAtTilePos(uVar2, 2)) { case 0x301: this->unk_83 |= 8; break; @@ -506,7 +506,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) { sub_08090480(0, uVar2); } if ((this->unk_83 & 0x10) != 0) { - switch (GetTileType(pos - 1, 1)) { + switch (GetTileTypeAtTilePos(pos - 1, 1)) { case 0x300: break; default: @@ -516,7 +516,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) { } return; } - switch (GetTileType(pos - 1, 2)) { + switch (GetTileTypeAtTilePos(pos - 1, 2)) { case 0x300: this->unk_83 |= 4; break; @@ -533,7 +533,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) { if ((this->unk_83 & 0x10) != 0) { sub_08090480(0, pos - 1); } else { - switch (GetTileType(pos, 2)) { + switch (GetTileTypeAtTilePos(pos, 2)) { case 0x302: this->unk_83 |= 4; break; @@ -547,7 +547,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) { sub_08090480(0, uVar2); } if ((this->unk_83 & 0x20) != 0) { - switch (GetTileType(uVar2 + 1, 1)) { + switch (GetTileTypeAtTilePos(uVar2 + 1, 1)) { case 0x300: break; default: @@ -557,7 +557,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) { } return; } - switch (GetTileType(uVar2 + 1, 2)) { + switch (GetTileTypeAtTilePos(uVar2 + 1, 2)) { case 0x300: this->unk_83 |= 8; break; @@ -579,12 +579,12 @@ void sub_08090480(u32 param_1, u32 tilePos) { void sub_08090498(PushableFurnitureEntity* this) { u32 tmp = this->unk_70 - 0x80; RestorePrevTileEntity(tmp, 1); - if (((this->unk_83 & 1) != 0) && (GetTileType(tmp, 2) == 0x306)) { + if (((this->unk_83 & 1) != 0) && (GetTileTypeAtTilePos(tmp, 2) == 0x306)) { SetCollisionData(0x62, tmp, 1); } tmp = this->unk_72 - 0x80; RestorePrevTileEntity(tmp, 1); - if (((this->unk_83 & 2) != 0) && (GetTileType(tmp, 2) == 0x308)) { + if (((this->unk_83 & 2) != 0) && (GetTileTypeAtTilePos(tmp, 2) == 0x308)) { SetCollisionData(99, tmp, 1); } } diff --git a/src/object/pushableGrave.c b/src/object/pushableGrave.c index 1c21581d..4ba81982 100644 --- a/src/object/pushableGrave.c +++ b/src/object/pushableGrave.c @@ -149,7 +149,7 @@ bool32 sub_0809785C(PushableGraveEntity* this) { if (super->type != 0) { if (super->type2 != 0) { if ((CheckFlags(this->pushedFlag) != 0) || - GetTileType(this->unk_68, super->collisionLayer) == SPECIAL_TILE_63) { + GetTileTypeAtTilePos(this->unk_68, super->collisionLayer) == SPECIAL_TILE_63) { super->action = 3; super->timer = 64; super->subtimer = 0; diff --git a/src/object/pushableRock.c b/src/object/pushableRock.c index b8c98047..f58afa79 100644 --- a/src/object/pushableRock.c +++ b/src/object/pushableRock.c @@ -41,7 +41,7 @@ void PushableRock_Action1(PushableRockEntity* this) { u32 tileType; u32 tmp; - tileType = GetTileType(this->tilePos, super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); switch (tileType) { case SPECIAL_TILE_28: case SPECIAL_TILE_29: @@ -87,12 +87,12 @@ void PushableRock_Action3(PushableRockEntity* this) { } void sub_0808A644(PushableRockEntity* this) { - u32 vvv; + u32 actTile; this->tilePos = COORD_TO_TILE(super); this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer); this->collisionData = GetCollisionDataAtTilePos(this->tilePos, super->collisionLayer); - vvv = GetVvvAtTilePos(this->tilePos, super->collisionLayer); - if ((vvv == VVV_25) || (vvv == VVV_240)) { + actTile = GetActTileAtTilePos(this->tilePos, super->collisionLayer); + if ((actTile == ACT_TILE_25) || (actTile == ACT_TILE_240)) { SetTile(SPECIAL_TILE_21, this->tilePos, super->collisionLayer); super->action = 3; if (!CheckFlags(this->pushedFlag)) { diff --git a/src/object/pushableStatue.c b/src/object/pushableStatue.c index 1649bcef..35fbb3bd 100644 --- a/src/object/pushableStatue.c +++ b/src/object/pushableStatue.c @@ -62,7 +62,7 @@ void PushableStatue_Action1(PushableStatueEntity* this) { Entity* obj; if (sub_0800442E(super) == 0) { - tileType = GetTileType(this->unk_84, super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->unk_84, super->collisionLayer); if (tileType != SPECIAL_TILE_11) { switch (sub_0808968C(tileType)) { case 1: @@ -110,7 +110,7 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) { ptr = &gUnk_08120CB4[index]; PositionRelative(super, &gPlayerEntity.base, Q_16_16(ptr[0]), Q_16_16(ptr[1])); } - tileType = GetTileType(this->unk_84, super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->unk_84, super->collisionLayer); if (tileType != SPECIAL_TILE_11) { switch (sub_0808968C(tileType)) { case 1: @@ -166,7 +166,7 @@ void sub_08089454(PushableStatueEntity* this) { this->unk_84 = COORD_TO_TILE(super); this->unk_80 = GetTileIndex(this->unk_84, super->collisionLayer); SetTile(SPECIAL_TILE_11, this->unk_84, super->collisionLayer); - if (super->collisionLayer == 2 && GetTileType(this->unk_84, 1) == 0x310) { + if (super->collisionLayer == 2 && GetTileTypeAtTilePos(this->unk_84, 1) == 0x310) { SetTile(SPECIAL_TILE_11, this->unk_84, LAYER_BOTTOM); } } @@ -197,10 +197,10 @@ void sub_08089538(PushableStatueEntity* this) { this->unk_86 = 0x20; EnqueueSFX(SFX_10F); SetTile(this->unk_80, this->unk_84, super->collisionLayer); - if ((super->collisionLayer == 2) && (GetTileType(this->unk_84, LAYER_BOTTOM) == SPECIAL_TILE_11)) { + if ((super->collisionLayer == 2) && (GetTileTypeAtTilePos(this->unk_84, LAYER_BOTTOM) == SPECIAL_TILE_11)) { CloneTile(TILE_TYPE_784, this->unk_84, 1); } - tileType = GetTileType(this->unk_84 + gUnk_080B4488[super->direction >> 3], super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->unk_84 + gUnk_080B4488[super->direction >> 3], super->collisionLayer); if ((tileType == TILE_TYPE_121) || (tileType == TILE_TYPE_119)) { super->spriteOffsetY = -2; } @@ -258,14 +258,14 @@ bool32 sub_080896B0(void) { const s16* ptr; u32 tmp1; u32 tmp2; - u32 vvv; + u32 actTile; if (((gPlayerState.heldObject & 0x1f) == 0x12) && ((gPlayerEntity.base.frame & 1) != 0)) { ptr = &gUnk_080B4468[gPlayerEntity.base.animationState & 6]; uVar1 = gUnk_080B4488[gPlayerEntity.base.animationState >> 1]; uVar4 = COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]) - uVar1; - vvv = GetVvvAtTilePos(uVar4, gPlayerEntity.base.collisionLayer); - if ((vvv - 0x26 > 1) && (vvv != VVV_41)) { + actTile = GetActTileAtTilePos(uVar4, gPlayerEntity.base.collisionLayer); + if ((actTile - 0x26 > 1) && (actTile != ACT_TILE_41)) { mapLayer = GetLayerByIndex(gPlayerEntity.base.collisionLayer); iVar2 = (uVar4 * 0x10000) >> 0x10; tmp1 = mapLayer->collisionData[iVar2]; diff --git a/src/object/rotatingTrapdoor.c b/src/object/rotatingTrapdoor.c index f8e05f49..3351b1d7 100644 --- a/src/object/rotatingTrapdoor.c +++ b/src/object/rotatingTrapdoor.c @@ -31,7 +31,7 @@ void RotatingTrapdoor_Init(Entity* this) { this->action = 1; x = 0; y = 0; - switch (GetTileTypeByEntity(this)) { + switch (GetTileTypeAtEntity(this)) { case 0x343: x = 0x10; case 0x344: diff --git a/src/object/smallIceBlock.c b/src/object/smallIceBlock.c index ebd83cbe..8aab1f91 100644 --- a/src/object/smallIceBlock.c +++ b/src/object/smallIceBlock.c @@ -85,7 +85,7 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) { } } else { if (!sub_0800442E(super)) { - tileType = GetTileType(this->tilePos, super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer); if (tileType != SPECIAL_TILE_90) { switch (sub_08099618(tileType)) { case 1: @@ -186,10 +186,10 @@ void sub_080994B8(SmallIceBlockEntity* this) { EnqueueSFX(SFX_ICE_BLOCK_SLIDE); SetTile(this->unk_6c, this->tilePos, super->collisionLayer); - if ((super->collisionLayer == 2) && (GetTileType(this->tilePos, 1) == SPECIAL_TILE_90)) { + if ((super->collisionLayer == 2) && (GetTileTypeAtTilePos(this->tilePos, 1) == SPECIAL_TILE_90)) { CloneTile(TILE_TYPE_784, this->tilePos, 1); } - tileType = GetTileType(this->tilePos + gUnk_080B4488[super->direction >> 3], super->collisionLayer); + tileType = GetTileTypeAtTilePos(this->tilePos + gUnk_080B4488[super->direction >> 3], super->collisionLayer); if (tileType == 0x79 || tileType == 0x77) { super->spriteOffsetY = -2; } diff --git a/src/object/smokeParticle.c b/src/object/smokeParticle.c index 91145f3d..ac05de1f 100644 --- a/src/object/smokeParticle.c +++ b/src/object/smokeParticle.c @@ -71,8 +71,8 @@ void sub_080878CC(Entity* this) { for (itX = -0x10; itX < 0x11; itX += 0x10) { for (itY = -0x10; itY < 0x11; itY += 0x10) { tilePos = TILE((u32)x + itX, (u32)y + itY); - if (GetVvvAtTilePos(tilePos, (u8)layer) == VVV_46) { - switch (GetTileType(tilePos, layer)) { + if (GetActTileAtTilePos(tilePos, (u8)layer) == ACT_TILE_46) { + switch (GetTileTypeAtTilePos(tilePos, layer)) { case 0x368: case 0x367: DoTileInteraction(this, 3, x + itX, y + itY); diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index 67542aa8..283d64be 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -60,7 +60,7 @@ void TreeHidingPortal_Action1(TreeHidingPortalEntity* this) { } } } - if (sub_0809E9A0() == VVV_84) { + if (sub_0809E9A0() == ACT_TILE_84) { super->action = 2; super->timer = 15; SetPlayerControl(1); @@ -110,15 +110,15 @@ static void sub_0809E96C(TreeHidingPortalEntity* this) { } static u32 sub_0809E9A0(void) { - u32 vvv; + u32 actTile; const s16* ptr; if (gPlayerEntity.base.action != PLAYER_BOUNCE) { - vvv = VVV_0; + actTile = ACT_TILE_0; } else { ptr = &gUnk_080B4468[gPlayerEntity.base.animationState & 6]; - vvv = GetVvvAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), 1); + actTile = GetActTileAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), 1); } - return vvv; + return actTile; } diff --git a/src/object/well.c b/src/object/well.c index b4b9b962..0e19e21a 100644 --- a/src/object/well.c +++ b/src/object/well.c @@ -38,7 +38,7 @@ void Well_Init(WellEntity* this) { } void Well_Action1(WellEntity* this) { - u32 tileIndex = GetTileType(this->unk_80, LAYER_BOTTOM); + u32 tileIndex = GetTileTypeAtTilePos(this->unk_80, LAYER_BOTTOM); if (tileIndex != SPECIAL_TILE_125) { PausePlayer(); gPlayerEntity.base.x.WORD = super->x.WORD; |
