mirror of
https://github.com/zeldaret/tmc
synced 2026-08-29 17:12:35 -04:00
Rename vvv to actTile
This commit is contained in:
@@ -46,7 +46,7 @@ void BombableWallManager_Init(BombableWallManager* this) {
|
||||
}
|
||||
|
||||
void BombableWallManager_Action1(BombableWallManager* this) {
|
||||
if (GetVvvAtTilePos(this->tilePos, this->layer) != VVV_46) {
|
||||
if (GetActTileAtTilePos(this->tilePos, this->layer) != ACT_TILE_46) {
|
||||
super->action = 2;
|
||||
super->timer = 90;
|
||||
BombableWallManager_DestroyWall(this);
|
||||
@@ -62,7 +62,7 @@ void BombableWallManager_Action2(BombableWallManager* this) {
|
||||
}
|
||||
|
||||
u32 BombableWallManager_GetBombableType(u32 tilePos, u32 layer) {
|
||||
u32 tileType = GetTileType(tilePos, layer);
|
||||
u32 tileType = GetTileTypeAtTilePos(tilePos, layer);
|
||||
|
||||
switch (tileType) {
|
||||
case TILE_TYPE_236:
|
||||
|
||||
@@ -29,7 +29,7 @@ void DestructibleTileObserveManager_Main(DestructibleTileObserveManager* this) {
|
||||
|
||||
void sub_0805CFF0(DestructibleTileObserveManager_unk* param_1) {
|
||||
if (!CheckLocalFlag(param_1->flag)) {
|
||||
u32 tileType = GetTileType(param_1->tilePos, param_1->tileLayer);
|
||||
u32 tileType = GetTileTypeAtTilePos(param_1->tilePos, param_1->tileLayer);
|
||||
if (param_1->tileType == tileType) {
|
||||
SetLocalFlag(param_1->flag);
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ void DiggingCaveEntranceManager_Init(DiggingCaveEntranceManager* this) {
|
||||
tileIndex = SPECIAL_TILE_128;
|
||||
for (entrance = GetDiggingCaveEntranceForRoom(entrance, room); entrance != 0;
|
||||
entrance = GetDiggingCaveEntranceForRoom(entrance, room)) {
|
||||
SetTile(tileIndex, entrance->sourceTilePosition + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePosition + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePosition + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePos + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePos + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePos + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
entrance++;
|
||||
}
|
||||
}
|
||||
@@ -80,8 +80,8 @@ bool32 DiggingCaveEntranceManager_CheckEnterEntrance(DiggingCaveEntranceManager*
|
||||
if (gDiggingCaveEntranceTransition.isDiggingCave) {
|
||||
offsetX = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x;
|
||||
offsetY = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y;
|
||||
offsetX2 = (entr->sourceTilePosition & TILE_POS_X_COMPONENT) * 16 + 8;
|
||||
offsetY2 = ((entr->sourceTilePosition & TILE_POS_Y_COMPONENT) >> 6) * 16 + 0x18;
|
||||
offsetX2 = (entr->sourceTilePos & TILE_POS_X_COMPONENT) * 16 + 8;
|
||||
offsetY2 = ((entr->sourceTilePos & TILE_POS_Y_COMPONENT) >> 6) * 16 + 0x18;
|
||||
tmp = offsetX - offsetX2;
|
||||
if (tmp + 0x18 > 0x30 || offsetY - offsetY2 + 8 > 0x10U)
|
||||
return FALSE;
|
||||
@@ -90,9 +90,9 @@ bool32 DiggingCaveEntranceManager_CheckEnterEntrance(DiggingCaveEntranceManager*
|
||||
DiggingCaveEntranceManager_EnterEntrance(this, entr);
|
||||
return TRUE;
|
||||
} else {
|
||||
if (COORD_TO_TILE(&gPlayerEntity.base) != entr->sourceTilePosition)
|
||||
if (COORD_TO_TILE(&gPlayerEntity.base) != entr->sourceTilePos)
|
||||
return FALSE;
|
||||
offsetY2 = gRoomControls.origin_y + ((entr->sourceTilePosition >> 6) << 4) + 6;
|
||||
offsetY2 = gRoomControls.origin_y + ((entr->sourceTilePos >> 6) << 4) + 6;
|
||||
if (gPlayerEntity.base.y.HALF.HI >= offsetY2)
|
||||
return FALSE;
|
||||
DiggingCaveEntranceManager_EnterEntrance(this, entr);
|
||||
@@ -111,9 +111,9 @@ void DiggingCaveEntranceManager_EnterEntrance(DiggingCaveEntranceManager* this,
|
||||
gRoomControls.room = entr->targetRoom;
|
||||
gDiggingCaveEntranceTransition.entrance = entr;
|
||||
gDiggingCaveEntranceTransition.offsetX = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x -
|
||||
((entr->sourceTilePosition & TILE_POS_X_COMPONENT) * 16);
|
||||
((entr->sourceTilePos & TILE_POS_X_COMPONENT) * 16);
|
||||
gDiggingCaveEntranceTransition.offsetY = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y -
|
||||
((entr->sourceTilePosition & TILE_POS_Y_COMPONENT) >> 2);
|
||||
((entr->sourceTilePos & TILE_POS_Y_COMPONENT) >> 2);
|
||||
|
||||
#ifndef EU
|
||||
isDiggingCave = gDiggingCaveEntranceTransition.isDiggingCave;
|
||||
@@ -130,7 +130,7 @@ void DiggingCaveEntranceManager_EnterEntrance(DiggingCaveEntranceManager* this,
|
||||
}
|
||||
|
||||
const DiggingCaveEntrance* GetDiggingCaveEntranceForRoom(const DiggingCaveEntrance* entr, int room) {
|
||||
for (; entr->sourceTilePosition != 0xffff; entr++) {
|
||||
for (; entr->sourceTilePos != 0xffff; entr++) {
|
||||
if (entr->sourceRoom == room)
|
||||
return entr;
|
||||
}
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
void FlameManager_Main(FlameManager* this) {
|
||||
if (super->action == 0) {
|
||||
this->tilePos = TILE(this->tilePos, this->field_0x3a);
|
||||
if (GetTileType(this->tilePos, LAYER_TOP) == TILE_TYPE_117) {
|
||||
if (GetTileTypeAtTilePos(this->tilePos, LAYER_TOP) == TILE_TYPE_117) {
|
||||
super->action = 1;
|
||||
SetTile(SPECIAL_TILE_106, this->tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
if (GetTileType(this->tilePos, LAYER_BOTTOM) == SPECIAL_TILE_107) {
|
||||
if (GetTileTypeAtTilePos(this->tilePos, LAYER_BOTTOM) == SPECIAL_TILE_107) {
|
||||
sub_0807B7D8(TILE_TYPE_118, this->tilePos, LAYER_TOP);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (GetTileType(this->tilePos, LAYER_TOP) == TILE_TYPE_118) {
|
||||
if (GetTileTypeAtTilePos(this->tilePos, LAYER_TOP) == TILE_TYPE_118) {
|
||||
SetTile(SPECIAL_TILE_107, this->tilePos, LAYER_BOTTOM);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void LightLevelSetManager_Type2(LightLevelSetManager* this) {
|
||||
((s16)this->field_0x38 >> 4 & 0x3fU) | ((s32)((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
super->action = 1;
|
||||
} else {
|
||||
if (GetTileType(this->field_0x20, super->type2) == TILE_TYPE_118) {
|
||||
if (GetTileTypeAtTilePos(this->field_0x20, super->type2) == TILE_TYPE_118) {
|
||||
SetFlag(this->field_0x3e);
|
||||
ChangeLightLevel(super->timer);
|
||||
DeleteThisEntity();
|
||||
@@ -103,7 +103,7 @@ void LightLevelSetManager_Type3(LightLevelSetManager* this) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (GetTileType(this->field_0x20, super->type2) != TILE_TYPE_118) {
|
||||
if (GetTileTypeAtTilePos(this->field_0x20, super->type2) != TILE_TYPE_118) {
|
||||
return;
|
||||
}
|
||||
SetFlag(this->field_0x3e);
|
||||
|
||||
@@ -32,7 +32,7 @@ void sub_0805CBD0(Manager29* this) {
|
||||
super->action = 1;
|
||||
this->unk_38 = (this->unk_38 >> 4 & 0x3fU) | (((this->unk_3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
this->unk_3a = (this->unk_3c >> 4 & 0x3f) | (((this->unk_36 + this->unk_37 * 0x100) >> 4 & 0x3fU) << 6);
|
||||
this->unk_3c = GetTileType(this->unk_38, this->layer);
|
||||
this->unk_3c = GetTileTypeAtTilePos(this->unk_38, this->layer);
|
||||
mapLayer = GetLayerByIndex(this->layer);
|
||||
this->unk_28 = (u16*)mapLayer->tileTypes;
|
||||
this->unk_2c = &mapLayer->mapData[(s16)this->unk_3a];
|
||||
|
||||
@@ -42,7 +42,7 @@ void MinishPortalManager_Main(MinishPortalManager* this) {
|
||||
gArea.portal_mode = 3;
|
||||
}
|
||||
}
|
||||
if (GetVvvAtRoomCoords(this->unk_38, this->unk_3a, super->timer) == VVV_61) {
|
||||
if (GetActTileAtRoomCoords(this->unk_38, this->unk_3a, super->timer) == ACT_TILE_61) {
|
||||
CreateMagicSparkles(this->unk_38 + gRoomControls.origin_x, this->unk_3a + gRoomControls.origin_y,
|
||||
super->timer);
|
||||
if (super->subtimer == 0) {
|
||||
|
||||
@@ -121,7 +121,7 @@ void MiscManager_Type0(MiscManager* this) {
|
||||
void sub_08058F44(u32 x, u32 y, u32 flag) {
|
||||
if (CheckRoomFlag(flag))
|
||||
return;
|
||||
if (sub_080B1A48(x, y, LAYER_BOTTOM) != TILE_TYPE_97)
|
||||
if (GetTileTypeAtRoomCoords(x, y, LAYER_BOTTOM) != TILE_TYPE_97)
|
||||
return;
|
||||
SetTileType(TILE_TYPE_38, ((x >> 4) & 0x3F) | (((y >> 4) & 0x3F) << 6), LAYER_BOTTOM);
|
||||
sub_08058F84(x, y);
|
||||
|
||||
@@ -31,7 +31,7 @@ void TilePuzzleManager_Main(TilePuzzleManager* this) {
|
||||
this->player_current_tile = COORD_TO_TILE((&gPlayerEntity.base));
|
||||
if (this->player_current_tile != this->player_previous_tile) {
|
||||
this->player_previous_tile = this->player_current_tile;
|
||||
switch (GetTileType(this->player_current_tile, super->type2)) {
|
||||
switch (GetTileTypeAtTilePos(this->player_current_tile, super->type2)) {
|
||||
case TILE_TYPE_791:
|
||||
// stepped on a red tile again
|
||||
super->action = FAILED;
|
||||
|
||||
Reference in New Issue
Block a user