mirror of
https://github.com/zeldaret/tmc
synced 2026-08-26 16:07:15 -04:00
Rename metaTiles
Now the 16x16 tiles are just called tiles and the 8x8 tiles are called subTiles.
This commit is contained in:
@@ -30,7 +30,7 @@ void AngryStatue(Entity* this) {
|
||||
void AngryStatue_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->hitbox = (Hitbox*)&gUnk_080FD178;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(this), this->collisionLayer);
|
||||
InitializeAnimation(this, this->type);
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -102,18 +102,18 @@ void BakerOven_Action2(BakerOvenEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0809CDF0(BakerOvenEntity* this) {
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
this->unk_80 = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3f) |
|
||||
(((super->y.HALF.HI - gRoomControls.origin_y) >> 4 & 0x3f) << 6);
|
||||
|
||||
metaTilePos = this->unk_80;
|
||||
SetMetaTile(SPECIAL_META_TILE_46, metaTilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_36, metaTilePos + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(-1, -2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(0, -2), super->collisionLayer);
|
||||
tilePos = this->unk_80;
|
||||
SetTile(SPECIAL_TILE_46, tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_36, tilePos + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(-1, -2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(0, -2), super->collisionLayer);
|
||||
}
|
||||
|
||||
@@ -258,8 +258,8 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
|
||||
this->tilePos = TILE(super->x.HALF.HI, this->unk_6c);
|
||||
while (TRUE) {
|
||||
this->tilePos = TILE(super->x.HALF.HI, this->unk_6c);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, LAYER_TOP);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
this->unk_6c += 0x10;
|
||||
if (this->unk_6c >= gRoomControls.origin_y + gRoomControls.height)
|
||||
break;
|
||||
@@ -308,7 +308,7 @@ void Beanstalk_Action1Type8SubAction0(BeanstalkEntity* this) {
|
||||
|
||||
super->spriteOrientation.flipY = 2;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
super->subAction = 1;
|
||||
obj = CreateObjectWithParent(super, CHUCHU_BOSS_PARTICLE, 0, 0);
|
||||
if (obj != NULL) {
|
||||
@@ -339,13 +339,13 @@ void Beanstalk_Action1Type9(BeanstalkEntity* this) {
|
||||
super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
|
||||
if (gPlayerState.floor_type == SURFACE_LADDER) {
|
||||
super->spritePriority.b0 = 0;
|
||||
if (sub_080B1A0C(super, 0, -24) != SPECIAL_META_TILE_20) {
|
||||
SetMetaTile(SPECIAL_META_TILE_20, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
if (sub_080B1A0C(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)) {
|
||||
SetMetaTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
SetTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ void BigBarrel_Type4(BigBarrelEntity* this) {
|
||||
flame->collisionLayer = 2;
|
||||
flame->spritePriority.b0 = 2;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_118, COORD_TO_TILE(super), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_118, COORD_TO_TILE(super), LAYER_TOP);
|
||||
break;
|
||||
case 2:
|
||||
if (--super->timer) {
|
||||
|
||||
+76
-76
@@ -129,127 +129,127 @@ void sub_08099910(BigIceBlockEntity* this) {
|
||||
u32 uVar2;
|
||||
s32 vvv;
|
||||
u32 tileIndex;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
metaTilePos = COORD_TO_TILE(super);
|
||||
this->unk_6e = metaTilePos;
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
this->unk_6e = tilePos;
|
||||
uVar2 = (((super->x.HALF.HI & 8)) >> 0x3) + ((super->y.HALF.HI & 8) >> 2);
|
||||
this->unk_6c = uVar2;
|
||||
|
||||
switch (uVar2) {
|
||||
default:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos - 0x41, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos - 0x40, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - 0x41, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - 0x40, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer);
|
||||
break;
|
||||
case 1:
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_36;
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_36;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_121;
|
||||
tileIndex = SPECIAL_TILE_121;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x41, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos - 0x40, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_37;
|
||||
SetTile(tileIndex, tilePos - 0x41, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - 0x40, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_37;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_123;
|
||||
tileIndex = SPECIAL_TILE_123;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_36;
|
||||
SetTile(tileIndex, tilePos - 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos - 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_36;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_121;
|
||||
tileIndex = SPECIAL_TILE_121;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_37;
|
||||
SetTile(tileIndex, tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos + 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_37;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_123;
|
||||
tileIndex = SPECIAL_TILE_123;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 1, super->collisionLayer);
|
||||
SetTile(tileIndex, tilePos + 1, super->collisionLayer);
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_35;
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_35;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_119;
|
||||
tileIndex = SPECIAL_TILE_119;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x41, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_35;
|
||||
SetTile(tileIndex, tilePos - 0x41, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_35;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_119;
|
||||
tileIndex = SPECIAL_TILE_119;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x40, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_38;
|
||||
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);
|
||||
tileIndex = SPECIAL_TILE_38;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_124;
|
||||
tileIndex = SPECIAL_TILE_124;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_38;
|
||||
SetTile(tileIndex, tilePos + 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos + 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_38;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_124;
|
||||
tileIndex = SPECIAL_TILE_124;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 0x40, super->collisionLayer);
|
||||
SetTile(tileIndex, tilePos + 0x40, super->collisionLayer);
|
||||
break;
|
||||
case 3:
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_39;
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_39;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_117;
|
||||
tileIndex = SPECIAL_TILE_117;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x41, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_35;
|
||||
SetTile(tileIndex, tilePos - 0x41, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_35;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_119;
|
||||
tileIndex = SPECIAL_TILE_119;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x40, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_40;
|
||||
SetTile(tileIndex, tilePos - 0x40, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos - 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_40;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_118;
|
||||
tileIndex = SPECIAL_TILE_118;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos - 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_36;
|
||||
SetTile(tileIndex, tilePos - 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos - 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_36;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_121;
|
||||
tileIndex = SPECIAL_TILE_121;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_37;
|
||||
SetTile(tileIndex, tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos + 1, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_37;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_123;
|
||||
tileIndex = SPECIAL_TILE_123;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 1, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_41;
|
||||
SetTile(tileIndex, tilePos + 1, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos + 0x3f, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_41;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_120;
|
||||
tileIndex = SPECIAL_TILE_120;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_38;
|
||||
SetTile(tileIndex, tilePos + 0x3f, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos + 0x40, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_38;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_124;
|
||||
tileIndex = SPECIAL_TILE_124;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 0x40, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(metaTilePos + 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_META_TILE_42;
|
||||
SetTile(tileIndex, tilePos + 0x40, super->collisionLayer);
|
||||
vvv = GetVvvAtTilePos(tilePos + 0x41, super->collisionLayer);
|
||||
tileIndex = SPECIAL_TILE_42;
|
||||
if (vvv == VVV_18) {
|
||||
tileIndex = SPECIAL_META_TILE_122;
|
||||
tileIndex = SPECIAL_TILE_122;
|
||||
}
|
||||
SetMetaTile(tileIndex, metaTilePos + 0x41, super->collisionLayer);
|
||||
SetTile(tileIndex, tilePos + 0x41, super->collisionLayer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ extern const u8 BigPushableLever_PushedOffsets[];
|
||||
|
||||
void BigPushableLever_SetIdle(BigPushableLeverEntity*);
|
||||
bool32 BigPushableLever_ShouldStartPushing(BigPushableLeverEntity*);
|
||||
void BigPushableLever_SetMetaTiles(BigPushableLeverEntity*);
|
||||
void BigPushableLever_SetTiles(BigPushableLeverEntity*);
|
||||
void BigPushableLever_CalculateSpriteOffsets(BigPushableLeverEntity*);
|
||||
|
||||
void BigPushableLever(BigPushableLeverEntity* this) {
|
||||
@@ -48,8 +48,8 @@ void BigPushableLever_Init(BigPushableLeverEntity* this) {
|
||||
void BigPushableLever_Idle(BigPushableLeverEntity* this) {
|
||||
if (BigPushableLever_ShouldStartPushing(this)) {
|
||||
super->action = PUSHING;
|
||||
SetMetaTile(this->tileIndexUpper, this->tilePositionUpper, super->collisionLayer);
|
||||
SetMetaTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer);
|
||||
SetTile(this->tileIndexUpper, this->tilePositionUpper, super->collisionLayer);
|
||||
SetTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer);
|
||||
EnqueueSFX(SFX_132);
|
||||
RequestPriorityDuration(super, 30);
|
||||
if (PlayerCanBeMoved()) {
|
||||
@@ -78,38 +78,38 @@ void BigPushableLever_Pushing(BigPushableLeverEntity* this) {
|
||||
void BigPushableLever_SetIdle(BigPushableLeverEntity* this) {
|
||||
super->action = IDLE;
|
||||
this->timer = 60;
|
||||
BigPushableLever_SetMetaTiles(this);
|
||||
BigPushableLever_SetTiles(this);
|
||||
}
|
||||
|
||||
void BigPushableLever_SetMetaTiles(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 = GetMetaTileIndex(this->tilePositionUpper, super->collisionLayer);
|
||||
this->tileIndexLower = GetMetaTileIndex(this->tilePositionLower, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_87, this->tilePositionUpper, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_88, this->tilePositionLower, super->collisionLayer);
|
||||
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);
|
||||
InitializeAnimation(super, 1);
|
||||
} else {
|
||||
super->type2 = 1;
|
||||
this->tilePositionUpper = COORD_TO_TILE_OFFSET(super, 0x10, 0);
|
||||
this->tilePositionLower = this->tilePositionUpper - 1;
|
||||
this->tileIndexUpper = GetMetaTileIndex(this->tilePositionUpper, super->collisionLayer);
|
||||
this->tileIndexLower = GetMetaTileIndex(this->tilePositionLower, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_85, this->tilePositionUpper, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_86, this->tilePositionLower, super->collisionLayer);
|
||||
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);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
}
|
||||
|
||||
bool32 BigPushableLever_ShouldStartPushing(BigPushableLeverEntity* this) {
|
||||
if (GetMetaTileIndex(this->tilePositionLower, super->collisionLayer) == SPECIAL_META_TILE_89) {
|
||||
if (GetTileIndex(this->tilePositionLower, super->collisionLayer) == SPECIAL_TILE_89) {
|
||||
if (--this->timer == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
BigPushableLever_CalculateSpriteOffsets(this);
|
||||
SetMetaTile(gUnk_081236E8[super->type2], this->tilePositionLower, super->collisionLayer);
|
||||
SetTile(gUnk_081236E8[super->type2], this->tilePositionLower, super->collisionLayer);
|
||||
} else {
|
||||
this->timer = 60;
|
||||
super->spriteOffsetX = 0;
|
||||
@@ -139,8 +139,8 @@ void (*const BigPushableLever_Actions[])(BigPushableLeverEntity*) = {
|
||||
BigPushableLever_Pushing,
|
||||
};
|
||||
const u16 gUnk_081236E8[] = {
|
||||
SPECIAL_META_TILE_88,
|
||||
SPECIAL_META_TILE_86,
|
||||
SPECIAL_TILE_88,
|
||||
SPECIAL_TILE_86,
|
||||
};
|
||||
const u8 BigPushableLever_InitialOffsets[] = {
|
||||
0, 0, 0, 0, 255, 0, 0, 0,
|
||||
|
||||
+38
-38
@@ -26,7 +26,7 @@ void BlockPushed(BlockPushedEntity* this) {
|
||||
|
||||
void BlockPushed_Init(BlockPushedEntity* this) {
|
||||
u16 tmp;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
if (gRoomControls.area == AREA_MINISH_PATHS) {
|
||||
UnloadGFXSlots(super);
|
||||
@@ -40,50 +40,50 @@ void BlockPushed_Init(BlockPushedEntity* this) {
|
||||
super->timer = 32;
|
||||
super->speed = 0x80;
|
||||
super->spritePriority.b0 = 6;
|
||||
metaTilePos = COORD_TO_TILE(super);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
tmp = super->type * 8;
|
||||
super->x.HALF.HI += tmp;
|
||||
super->y.HALF.HI += tmp;
|
||||
super->hitbox = (Hitbox*)gUnk_0811F64C[super->type];
|
||||
this->unk_68 = GetMetaTileType(metaTilePos, super->collisionLayer);
|
||||
this->unk_68 = GetTileType(tilePos, super->collisionLayer);
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
sub_080832D8(metaTilePos, this);
|
||||
sub_080832D8(tilePos, this);
|
||||
break;
|
||||
case 1:
|
||||
sub_080832D8(metaTilePos, this);
|
||||
sub_080832D8(metaTilePos + 1, this);
|
||||
sub_080832D8(metaTilePos + 0x40, this);
|
||||
sub_080832D8(metaTilePos + 0x41, this);
|
||||
sub_080832D8(tilePos, this);
|
||||
sub_080832D8(tilePos + 1, this);
|
||||
sub_080832D8(tilePos + 0x40, this);
|
||||
sub_080832D8(tilePos + 0x41, this);
|
||||
break;
|
||||
case 2:
|
||||
sub_080832D8(metaTilePos, this);
|
||||
sub_080832D8(metaTilePos + 1, this);
|
||||
sub_080832D8(metaTilePos + 2, this);
|
||||
sub_080832D8(metaTilePos + 0x40, this);
|
||||
sub_080832D8(metaTilePos + 0x41, this);
|
||||
sub_080832D8(metaTilePos + 0x42, this);
|
||||
sub_080832D8(metaTilePos + 0x80, this);
|
||||
sub_080832D8(metaTilePos + 0x81, this);
|
||||
sub_080832D8(metaTilePos + 0x82, this);
|
||||
sub_080832D8(tilePos, this);
|
||||
sub_080832D8(tilePos + 1, this);
|
||||
sub_080832D8(tilePos + 2, this);
|
||||
sub_080832D8(tilePos + 0x40, this);
|
||||
sub_080832D8(tilePos + 0x41, this);
|
||||
sub_080832D8(tilePos + 0x42, this);
|
||||
sub_080832D8(tilePos + 0x80, this);
|
||||
sub_080832D8(tilePos + 0x81, this);
|
||||
sub_080832D8(tilePos + 0x82, this);
|
||||
break;
|
||||
default:
|
||||
sub_080832D8(metaTilePos, this);
|
||||
sub_080832D8(metaTilePos + 1, this);
|
||||
sub_080832D8(metaTilePos + 2, this);
|
||||
sub_080832D8(metaTilePos + 3, this);
|
||||
sub_080832D8(metaTilePos + 0x40, this);
|
||||
sub_080832D8(metaTilePos + 0x41, this);
|
||||
sub_080832D8(metaTilePos + 0x42, this);
|
||||
sub_080832D8(metaTilePos + 0x43, this);
|
||||
sub_080832D8(metaTilePos + 0x80, this);
|
||||
sub_080832D8(metaTilePos + 0x81, this);
|
||||
sub_080832D8(metaTilePos + 0x82, this);
|
||||
sub_080832D8(metaTilePos + 0x83, this);
|
||||
sub_080832D8(metaTilePos + 0xc0, this);
|
||||
sub_080832D8(metaTilePos + 0xc1, this);
|
||||
sub_080832D8(metaTilePos + 0xc2, this);
|
||||
sub_080832D8(metaTilePos + 0xc3, this);
|
||||
sub_080832D8(tilePos, this);
|
||||
sub_080832D8(tilePos + 1, this);
|
||||
sub_080832D8(tilePos + 2, this);
|
||||
sub_080832D8(tilePos + 3, this);
|
||||
sub_080832D8(tilePos + 0x40, this);
|
||||
sub_080832D8(tilePos + 0x41, this);
|
||||
sub_080832D8(tilePos + 0x42, this);
|
||||
sub_080832D8(tilePos + 0x43, this);
|
||||
sub_080832D8(tilePos + 0x80, this);
|
||||
sub_080832D8(tilePos + 0x81, this);
|
||||
sub_080832D8(tilePos + 0x82, this);
|
||||
sub_080832D8(tilePos + 0x83, this);
|
||||
sub_080832D8(tilePos + 0xc0, this);
|
||||
sub_080832D8(tilePos + 0xc1, this);
|
||||
sub_080832D8(tilePos + 0xc2, this);
|
||||
sub_080832D8(tilePos + 0xc3, this);
|
||||
break;
|
||||
}
|
||||
EnqueueSFX(SFX_10F);
|
||||
@@ -147,18 +147,18 @@ void sub_080830B8(BlockPushedEntity* this) {
|
||||
DeleteEntity(super);
|
||||
}
|
||||
|
||||
void sub_080832D8(u32 metaTilePos, BlockPushedEntity* this) {
|
||||
void sub_080832D8(u32 tilePos, BlockPushedEntity* this) {
|
||||
if (super->collisionLayer != 2) {
|
||||
if ((super->direction & 8) != 0) {
|
||||
sub_0807B7D8(META_TILE_TYPE_33, metaTilePos, super->collisionLayer);
|
||||
sub_0807B7D8(TILE_TYPE_33, tilePos, super->collisionLayer);
|
||||
} else {
|
||||
sub_0807B7D8(META_TILE_TYPE_32, metaTilePos, super->collisionLayer);
|
||||
sub_0807B7D8(TILE_TYPE_32, tilePos, super->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
if ((super->direction & 8) != 0) {
|
||||
sub_0807B7D8(META_TILE_TYPE_47, metaTilePos, super->collisionLayer);
|
||||
sub_0807B7D8(TILE_TYPE_47, tilePos, super->collisionLayer);
|
||||
} else {
|
||||
sub_0807B7D8(META_TILE_TYPE_46, metaTilePos, super->collisionLayer);
|
||||
sub_0807B7D8(TILE_TYPE_46, tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -18,7 +18,7 @@ typedef struct {
|
||||
u16 y;
|
||||
u16 unk7c;
|
||||
u16 unk7e;
|
||||
u16 tile;
|
||||
u16 tilePos;
|
||||
u8 width;
|
||||
u8 height;
|
||||
} BoardEntity;
|
||||
@@ -49,12 +49,12 @@ void Board_Init(BoardEntity* this) {
|
||||
this->height = size[1];
|
||||
this->x = super->x.HALF.HI - (this->width >> 1);
|
||||
this->y = super->y.HALF.HI - (this->height >> 1);
|
||||
this->tile = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
super->collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
super->spritePriority.b0 = 6;
|
||||
if (super->type == 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_116, this->tile + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_116, this->tilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
}
|
||||
sub_08098BE8(this);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ void sub_08098BE8(BoardEntity* this) {
|
||||
if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity.base) && PlayerCanBeMoved() &&
|
||||
gPlayerEntity.base.z.HALF.HI == 0) {
|
||||
gPlayerState.field_0x14 = 1;
|
||||
sub_0807AAF8(&gPlayerEntity.base, this->tile);
|
||||
sub_0807AAF8(&gPlayerEntity.base, this->tilePos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0x8];
|
||||
u16 metaTilePos;
|
||||
u16 metaTileIndex;
|
||||
u16 tilePos;
|
||||
u16 tileIndex;
|
||||
u8 collisionData;
|
||||
u8 unk75;
|
||||
u8 filler2[0x10];
|
||||
@@ -59,7 +59,7 @@ void Bollard_Action1(BollardEntity* this) {
|
||||
}
|
||||
super->action = 2;
|
||||
InitializeAnimation(super, 3);
|
||||
SetMetaTile(this->metaTileIndex, this->metaTilePos, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
EnqueueSFX(SFX_1A5);
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ void Bollard_Action4(BollardEntity* this) {
|
||||
|
||||
void sub_0808B3AC(BollardEntity* this) {
|
||||
super->spritePriority.b0 = 4;
|
||||
this->metaTilePos = COORD_TO_TILE(super);
|
||||
this->metaTileIndex = GetMetaTileIndex(this->metaTilePos, super->collisionLayer);
|
||||
this->collisionData = GetCollisionDataAtMetaTilePos(this->metaTilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_11, this->metaTilePos, super->collisionLayer);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
this->collisionData = GetCollisionDataAtTilePos(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_11, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0808B41C(BollardEntity* this) {
|
||||
|
||||
+18
-18
@@ -175,31 +175,31 @@ void sub_0808C4BC(BossDoorEntity* this) {
|
||||
|
||||
void sub_0808C500(BossDoorEntity* this) {
|
||||
if ((this->unk_76 == 0) || (this->unk_76 == 2)) {
|
||||
this->unk_78 = GetMetaTileIndex(this->unk_74 - 1, super->collisionLayer);
|
||||
this->unk_7a = GetMetaTileIndex(this->unk_74, super->collisionLayer);
|
||||
this->unk_7c = GetMetaTileIndex(this->unk_74 + 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74 - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74 + 1, super->collisionLayer);
|
||||
this->unk_78 = GetTileIndex(this->unk_74 - 1, super->collisionLayer);
|
||||
this->unk_7a = GetTileIndex(this->unk_74, super->collisionLayer);
|
||||
this->unk_7c = GetTileIndex(this->unk_74 + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74 - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74 + 1, super->collisionLayer);
|
||||
} else {
|
||||
this->unk_78 = GetMetaTileIndex(this->unk_74 - 0x40, super->collisionLayer);
|
||||
this->unk_7a = GetMetaTileIndex(this->unk_74, super->collisionLayer);
|
||||
this->unk_7c = GetMetaTileIndex(this->unk_74 + 0x40, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74 - 0x40, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74 + 0x40, super->collisionLayer);
|
||||
this->unk_78 = GetTileIndex(this->unk_74 - 0x40, super->collisionLayer);
|
||||
this->unk_7a = GetTileIndex(this->unk_74, super->collisionLayer);
|
||||
this->unk_7c = GetTileIndex(this->unk_74 + 0x40, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74 - 0x40, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74 + 0x40, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808C5D0(BossDoorEntity* this) {
|
||||
if ((this->unk_76 == 0) || (this->unk_76 == 2)) {
|
||||
SetMetaTile(this->unk_78, this->unk_74 - 1, super->collisionLayer);
|
||||
SetMetaTile(this->unk_7a, this->unk_74, super->collisionLayer);
|
||||
SetMetaTile(this->unk_7c, this->unk_74 + 1, super->collisionLayer);
|
||||
SetTile(this->unk_78, this->unk_74 - 1, super->collisionLayer);
|
||||
SetTile(this->unk_7a, this->unk_74, super->collisionLayer);
|
||||
SetTile(this->unk_7c, this->unk_74 + 1, super->collisionLayer);
|
||||
} else {
|
||||
SetMetaTile(this->unk_78, this->unk_74 - 0x40, super->collisionLayer);
|
||||
SetMetaTile(this->unk_7a, this->unk_74, super->collisionLayer);
|
||||
SetMetaTile(this->unk_7c, this->unk_74 + 0x40, super->collisionLayer);
|
||||
SetTile(this->unk_78, this->unk_74 - 0x40, super->collisionLayer);
|
||||
SetTile(this->unk_7a, this->unk_74, super->collisionLayer);
|
||||
SetTile(this->unk_7c, this->unk_74 + 0x40, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -68,8 +68,8 @@ void Bush_Init(BushEntity* this) {
|
||||
super->collisionMask = 4;
|
||||
super->hitbox = (Hitbox*)&gUnk_081205B4;
|
||||
this->unk_72 = 0;
|
||||
this->unk_70 = GetMetaTileIndex(COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
this->unk_70 = GetTileIndex(COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
InitializeAnimation(super, gUnk_08120588[super->type].unk_0);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ void Bush_Action2SubAction2(BushEntity* this) {
|
||||
if (this->unk_72 == 0) {
|
||||
this->unk_72 = 1;
|
||||
super->spriteOffsetX = 0;
|
||||
SetMetaTileByIndex(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
if (((gPlayerState.gustJarState & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
|
||||
Bush_Action2SubAction5(this);
|
||||
|
||||
+34
-34
@@ -13,7 +13,7 @@ typedef struct {
|
||||
/*0x68*/ u8 unused1[8];
|
||||
/*0x70*/ u16 unk_70;
|
||||
/*0x72*/ u16 unk_72;
|
||||
/*0x74*/ u16 metaTilePos;
|
||||
/*0x74*/ u16 tilePos;
|
||||
/*0x76*/ u8 unused2[14];
|
||||
/*0x84*/ u16 unk_84;
|
||||
/*0x86*/ u16 unk_86;
|
||||
@@ -42,12 +42,12 @@ void Button_Init(ButtonEntity* this) {
|
||||
if (this->unk_84 != 0) {
|
||||
super->collisionLayer = this->unk_84;
|
||||
}
|
||||
this->metaTilePos = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) |
|
||||
this->tilePos = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) |
|
||||
((((super->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) << 6);
|
||||
this->unk_72 = GetMetaTileType(this->metaTilePos, super->collisionLayer);
|
||||
this->unk_72 = GetTileType(this->tilePos, super->collisionLayer);
|
||||
if (super->type == 0 && CheckFlags(this->unk_86)) {
|
||||
super->action = 5;
|
||||
SetMetaTileType(META_TILE_TYPE_122, this->metaTilePos, super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_122, this->tilePos, super->collisionLayer);
|
||||
} else {
|
||||
if (sub_08081E3C(this)) {
|
||||
super->action = 2;
|
||||
@@ -60,7 +60,7 @@ void Button_Init(ButtonEntity* this) {
|
||||
void Button_Action1(ButtonEntity* this) {
|
||||
if (sub_08081E3C(this)) {
|
||||
super->action = 2;
|
||||
this->unk_72 = GetMetaTileType(this->metaTilePos, super->collisionLayer);
|
||||
this->unk_72 = GetTileType(this->tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,12 +81,12 @@ void Button_Action2(ButtonEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_08081F7C(ButtonEntity*, u32 metaTileType);
|
||||
u32 sub_08081F7C(ButtonEntity*, u32 tileType);
|
||||
u32 sub_08081D28(ButtonEntity*);
|
||||
void sub_08081E6C(ButtonEntity*);
|
||||
|
||||
void Button_Action3(ButtonEntity* this) {
|
||||
if (!sub_08081F7C(this, META_TILE_TYPE_120))
|
||||
if (!sub_08081F7C(this, TILE_TYPE_120))
|
||||
return;
|
||||
if (!sub_08081D28(this)) {
|
||||
super->action = 4;
|
||||
@@ -106,7 +106,7 @@ void Button_Action4(ButtonEntity* this) {
|
||||
super->timer--;
|
||||
if (super->subtimer != 0) {
|
||||
super->subtimer = 0;
|
||||
SetMetaTile(SPECIAL_META_TILE_53, this->metaTilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_53, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
if (sub_08081CB0(this)) {
|
||||
super->action = 3;
|
||||
@@ -115,13 +115,13 @@ void Button_Action4(ButtonEntity* this) {
|
||||
} else {
|
||||
super->action = 2;
|
||||
ClearFlag(this->unk_86);
|
||||
SetMetaTileType(META_TILE_TYPE_119, this->metaTilePos, super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_119, this->tilePos, super->collisionLayer);
|
||||
SoundReq(SFX_BUTTON_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void Button_Action5(ButtonEntity* this) {
|
||||
if (sub_08081F7C(this, META_TILE_TYPE_122)) {
|
||||
if (sub_08081F7C(this, TILE_TYPE_122)) {
|
||||
sub_08081E6C(this);
|
||||
}
|
||||
}
|
||||
@@ -132,14 +132,14 @@ bool32 sub_08081CB0(ButtonEntity* this) {
|
||||
u16 tileType;
|
||||
if (sub_08081D74(this)) {
|
||||
this->unk_70 = -1;
|
||||
if (GetMetaTileType(this->metaTilePos, super->collisionLayer) == SPECIAL_META_TILE_53) {
|
||||
sub_0807B7D8(0x78, this->metaTilePos, super->collisionLayer);
|
||||
if (GetTileType(this->tilePos, super->collisionLayer) == SPECIAL_TILE_53) {
|
||||
sub_0807B7D8(0x78, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
return TRUE;
|
||||
} else {
|
||||
tileType = GetMetaTileType(this->metaTilePos, super->collisionLayer);
|
||||
if (tileType != 0x77 && tileType != 0x79 && tileType != SPECIAL_META_TILE_53) {
|
||||
this->unk_70 = GetMetaTileIndex(this->metaTilePos, super->collisionLayer);
|
||||
tileType = GetTileType(this->tilePos, super->collisionLayer);
|
||||
if (tileType != 0x77 && tileType != 0x79 && tileType != SPECIAL_TILE_53) {
|
||||
this->unk_70 = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ bool32 sub_08081D28(ButtonEntity* this) {
|
||||
if (this->unk_70 == 0xFFFF) {
|
||||
return FALSE;
|
||||
}
|
||||
if (GetMetaTileIndex(this->metaTilePos, super->collisionLayer) != this->unk_70) {
|
||||
if (GetTileIndex(this->tilePos, super->collisionLayer) != this->unk_70) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ u32 sub_08081E0C(Entity*);
|
||||
|
||||
Entity* sub_08081D74(ButtonEntity* this) {
|
||||
Entity* ent;
|
||||
if (GetCollisionDataAtMetaTilePos(this->metaTilePos, super->collisionLayer) == COLLISION_DATA_15) {
|
||||
if (GetCollisionDataAtTilePos(this->tilePos, super->collisionLayer) == COLLISION_DATA_15) {
|
||||
return NULL;
|
||||
}
|
||||
ent = 0;
|
||||
@@ -204,7 +204,7 @@ u32 sub_08081E3C(ButtonEntity* this) {
|
||||
};
|
||||
const u16* tmp1;
|
||||
s32 tmp2;
|
||||
tmp2 = GetMetaTileType(this->metaTilePos, super->collisionLayer);
|
||||
tmp2 = GetTileType(this->tilePos, super->collisionLayer);
|
||||
tmp1 = gUnk_0811EE50;
|
||||
do {
|
||||
if (*tmp1 == tmp2)
|
||||
@@ -220,34 +220,34 @@ extern u16 gMapDataTopSpecial[0x2000];
|
||||
extern u16 gMapDataBottomSpecial[];
|
||||
|
||||
void sub_08081E6C(ButtonEntity* this) {
|
||||
u32 metaTileType;
|
||||
u32 tileType;
|
||||
MapLayer* mapLayer;
|
||||
u16* tmp2;
|
||||
u16* tmp;
|
||||
u16* tmp3;
|
||||
u32 metaTilePos = this->metaTilePos;
|
||||
u32 tilePos = this->tilePos;
|
||||
u32 layer = super->collisionLayer;
|
||||
u32 specialMetaTile = GetMetaTileType(metaTilePos, layer);
|
||||
u32 specialTile = GetTileType(tilePos, layer);
|
||||
|
||||
if (specialMetaTile < 0x4000)
|
||||
if (specialTile < 0x4000)
|
||||
return;
|
||||
mapLayer = GetLayerByIndex(layer);
|
||||
metaTileType = (super->type == 0 ? META_TILE_TYPE_122 : META_TILE_TYPE_120);
|
||||
tmp = mapLayer->metatiles;
|
||||
tmp = tmp + (mapLayer->unkData2[metaTileType] << 2);
|
||||
tileType = (super->type == 0 ? TILE_TYPE_122 : TILE_TYPE_120);
|
||||
tmp = mapLayer->tiles;
|
||||
tmp = tmp + (mapLayer->unkData2[tileType] << 2);
|
||||
tmp2 = (layer == 2 ? gMapDataTopSpecial : gMapDataBottomSpecial);
|
||||
tmp2 += (((0x3f & metaTilePos) << 1) + ((0xfc0 & metaTilePos) << 2));
|
||||
tmp2 += (((0x3f & tilePos) << 1) + ((0xfc0 & tilePos) << 2));
|
||||
if (sub_08081F00((u32*)tmp2, (u32*)tmp))
|
||||
return;
|
||||
SetMetaTileType(metaTileType, metaTilePos, layer);
|
||||
SetMetaTile(specialMetaTile, metaTilePos, layer);
|
||||
SetTileType(tileType, tilePos, layer);
|
||||
SetTile(specialTile, tilePos, layer);
|
||||
}
|
||||
|
||||
// Are the two tiles already set to the correct one
|
||||
bool32 sub_08081F00(u32* screenblock, u32* metatileList) {
|
||||
if (screenblock[0] != metatileList[0])
|
||||
bool32 sub_08081F00(u32* screenblock, u32* tileList) {
|
||||
if (screenblock[0] != tileList[0])
|
||||
return FALSE;
|
||||
if (screenblock[0x40] != metatileList[1])
|
||||
if (screenblock[0x40] != tileList[1])
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -267,7 +267,7 @@ void sub_08081F24(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_08081F7C(ButtonEntity* this, u32 metaTileType) {
|
||||
bool32 sub_08081F7C(ButtonEntity* this, u32 tileType) {
|
||||
u16 tmp;
|
||||
if (super->timer == 0)
|
||||
return TRUE;
|
||||
@@ -277,11 +277,11 @@ bool32 sub_08081F7C(ButtonEntity* this, u32 metaTileType) {
|
||||
} else {
|
||||
if (super->timer == 6) {
|
||||
SetFlag(this->unk_86);
|
||||
SetMetaTileType(metaTileType, this->metaTilePos, super->collisionLayer);
|
||||
SetTileType(tileType, this->tilePos, super->collisionLayer);
|
||||
sub_08081F24(super);
|
||||
SoundReq(SFX_BUTTON_PRESS);
|
||||
if (this->unk_70 != 0xFFFF)
|
||||
SetMetaTile(this->unk_70, this->metaTilePos, super->collisionLayer);
|
||||
SetTile(this->unk_70, this->tilePos, super->collisionLayer);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
+25
-25
@@ -13,7 +13,7 @@
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0x18];
|
||||
u16 tile;
|
||||
u16 tilePos;
|
||||
} CabinFurnitureEntity;
|
||||
|
||||
void CabinFurniture_Init(CabinFurnitureEntity* this);
|
||||
@@ -35,47 +35,47 @@ void CabinFurniture_Init(CabinFurnitureEntity* this) {
|
||||
u32 uVar6;
|
||||
u32 uVar7;
|
||||
|
||||
this->tile = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
layer = super->collisionLayer;
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
super->action = 2;
|
||||
super->spritePriority.b0 = 6;
|
||||
uVar7 = this->tile;
|
||||
uVar7 = this->tilePos;
|
||||
uVar6 = uVar7 - 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar6, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7 + 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7 + 0x3f, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7 + 0x40, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7 + 0x41, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, uVar7 - 0x41, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, uVar7 - 0x40, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, uVar7 - 0x3f, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, uVar7 - 0x81, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, uVar7 - 0x80, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar6, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7 + 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7 + 0x3f, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7 + 0x40, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7 + 0x41, layer);
|
||||
SetTile(SPECIAL_TILE_61, uVar7 - 0x41, layer);
|
||||
SetTile(SPECIAL_TILE_61, uVar7 - 0x40, layer);
|
||||
SetTile(SPECIAL_TILE_38, uVar7 - 0x3f, layer);
|
||||
SetTile(SPECIAL_TILE_38, uVar7 - 0x81, layer);
|
||||
SetTile(SPECIAL_TILE_38, uVar7 - 0x80, layer);
|
||||
break;
|
||||
case 1:
|
||||
super->action = 1;
|
||||
uVar6 = this->tile;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar6, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar6 + 0x40, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_37, uVar6 + 0x41, layer);
|
||||
uVar6 = this->tilePos;
|
||||
SetTile(SPECIAL_TILE_34, uVar6, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar6 + 0x40, layer);
|
||||
SetTile(SPECIAL_TILE_37, uVar6 + 0x41, layer);
|
||||
if (CheckLocalFlag(0x4f) == 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_47, uVar6 + 1, layer);
|
||||
SetTile(SPECIAL_TILE_47, uVar6 + 1, layer);
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_45, uVar6 + 1, layer);
|
||||
SetTile(SPECIAL_TILE_45, uVar6 + 1, layer);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
super->action = 1;
|
||||
uVar7 = this->tile;
|
||||
uVar7 = this->tilePos;
|
||||
uVar6 = uVar7 - 0x41;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar6, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7 - 0x40, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7 - 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, uVar7, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar6, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7 - 0x40, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7 - 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, uVar7, layer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,11 +94,11 @@ void CarlovObject_Type1Init(CarlovObjectEntity* this) {
|
||||
this->unk_72 = super->y.HALF.HI;
|
||||
super->spritePriority.b0 = 5;
|
||||
this->unk_76 = COORD_TO_TILE(super);
|
||||
this->unk_74 = GetMetaTileIndex(this->unk_76, super->collisionLayer);
|
||||
this->unk_74 = GetTileIndex(this->unk_76, super->collisionLayer);
|
||||
if (super->timer == 0) {
|
||||
super->action = 1;
|
||||
super->subtimer = 120;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_76, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_76, super->collisionLayer);
|
||||
} else {
|
||||
super->action = 3;
|
||||
super->spriteSettings.draw = 0;
|
||||
@@ -112,7 +112,7 @@ void CarlovObject_Type1Action1(CarlovObjectEntity* this) {
|
||||
super->action = 2;
|
||||
super->timer = 7;
|
||||
super->direction = 0;
|
||||
SetMetaTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
EnqueueSFX(SFX_10B);
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ void CarlovObject_Type1Action4(CarlovObjectEntity* this) {
|
||||
super->action = 5;
|
||||
sub_08083814(super, 2);
|
||||
EnqueueSFX(SFX_10B);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_76, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_76, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[8];
|
||||
/*0x70*/ u16 tilePosition;
|
||||
/*0x70*/ u16 tilePos;
|
||||
/*0x72*/ u16 unk_72;
|
||||
/*0x74*/ u8 unk_74[0x12];
|
||||
/*0x86*/ u16 unk_86;
|
||||
@@ -230,14 +230,14 @@ void ChestSpawner_Type2Action7(ChestSpawnerEntity* this) {
|
||||
|
||||
void ChestSpawner_Type0Init(ChestSpawnerEntity* this) {
|
||||
super->action++;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
super->hitbox = (Hitbox*)&gUnk_0811F8A8;
|
||||
if (GetMetaTileTypeByEntity(super) == META_TILE_TYPE_116) {
|
||||
if (GetTileTypeByEntity(super) == TILE_TYPE_116) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (CheckFlags(this->unk_86)) {
|
||||
super->action = 3;
|
||||
sub_0807B7D8(0x73, this->tilePosition, super->collisionLayer);
|
||||
sub_0807B7D8(0x73, this->tilePos, super->collisionLayer);
|
||||
if ((super->type & 1) == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -251,7 +251,7 @@ void ChestSpawner_Type0Action1(ChestSpawnerEntity* this) {
|
||||
}
|
||||
|
||||
void ChestSpawner_Type0Action2(ChestSpawnerEntity* this) {
|
||||
sub_0807B7D8(0x73, this->tilePosition, super->collisionLayer);
|
||||
sub_0807B7D8(0x73, this->tilePos, super->collisionLayer);
|
||||
switch (super->type) {
|
||||
case 6:
|
||||
case 7:
|
||||
@@ -271,7 +271,7 @@ void ChestSpawner_Type0Action2(ChestSpawnerEntity* this) {
|
||||
|
||||
void ChestSpawner_Type0Action3(ChestSpawnerEntity* this) {
|
||||
if ((super->type == 1) || (super->type == 7)) {
|
||||
if (GetMetaTileTypeByEntity(super) == META_TILE_TYPE_116) {
|
||||
if (GetTileTypeByEntity(super) == TILE_TYPE_116) {
|
||||
DeleteEntity(super);
|
||||
} else {
|
||||
if (!CheckFlags(this->unk_86)) {
|
||||
@@ -279,7 +279,7 @@ void ChestSpawner_Type0Action3(ChestSpawnerEntity* this) {
|
||||
this->unk_72--;
|
||||
} else {
|
||||
super->action = 1;
|
||||
RestorePrevTileEntity(this->tilePosition, super->collisionLayer);
|
||||
RestorePrevTileEntity(this->tilePos, super->collisionLayer);
|
||||
CreateDust(super);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,13 +54,13 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
|
||||
if (CheckGlobalFlag(WATERBEAN_OUT)) {
|
||||
if (CheckGlobalFlag(WATERBEAN_PUT) == 0) {
|
||||
PositionRelative(&gPlayerEntity.base, super, 0, 0x10000);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, 0xdc, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, 0xdc, super->collisionLayer);
|
||||
} else {
|
||||
if (CheckLocalFlag(super->type2) == 0) {
|
||||
InitializeAnimation(super, 10);
|
||||
super->y.HALF.HI += 4;
|
||||
super->action = 4;
|
||||
SetMetaTile(SPECIAL_META_TILE_59, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_59, COORD_TO_TILE(super), super->collisionLayer);
|
||||
return;
|
||||
}
|
||||
super->type2 = 0;
|
||||
@@ -107,7 +107,7 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
|
||||
InitializeAnimation(super, 0xb);
|
||||
super->y.HALF.HI += 4;
|
||||
super->action = 4;
|
||||
SetMetaTile(SPECIAL_META_TILE_50, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_50, COORD_TO_TILE(super), super->collisionLayer);
|
||||
return;
|
||||
} else {
|
||||
super->type2 = 0;
|
||||
@@ -232,8 +232,8 @@ void CrenelBeanSprout_Action3(CrenelBeanSproutEntity* this) {
|
||||
}
|
||||
|
||||
void CrenelBeanSprout_Action4(CrenelBeanSproutEntity* this) {
|
||||
static const u16 gUnk_0812319C[] = { SPECIAL_META_TILE_60, SPECIAL_META_TILE_51 };
|
||||
if (gUnk_0812319C[super->type >> 1] == GetMetaTileTypeByEntity(super)) {
|
||||
static const u16 gUnk_0812319C[] = { SPECIAL_TILE_60, SPECIAL_TILE_51 };
|
||||
if (gUnk_0812319C[super->type >> 1] == GetTileTypeByEntity(super)) {
|
||||
GetNextFrame(super);
|
||||
gPlayerState.keepFacing |= 0x80;
|
||||
gPlayerState.field_0xa |= 0x80;
|
||||
@@ -329,5 +329,5 @@ void sub_08096A78(CrenelBeanSproutEntity* this) {
|
||||
SnapToTile(super);
|
||||
super->y.HALF.HI += 4;
|
||||
super->action = 3;
|
||||
SetMetaTile(SPECIAL_META_TILE_59, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_59, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
@@ -367,11 +367,11 @@ void CuccoMinigame_TellObjective(void) {
|
||||
}
|
||||
|
||||
void sub_080A1648(void) {
|
||||
SetMetaTileType(SPECIAL_META_TILE_127, TILE_POS(54, 52), LAYER_BOTTOM);
|
||||
SetMetaTileType(SPECIAL_META_TILE_127, TILE_POS(55, 52), LAYER_BOTTOM);
|
||||
SetMetaTileType(SPECIAL_META_TILE_127, TILE_POS(56, 52), LAYER_BOTTOM);
|
||||
SetMetaTileType(SPECIAL_META_TILE_126, TILE_POS(53, 53), LAYER_BOTTOM);
|
||||
SetMetaTileType(SPECIAL_META_TILE_126, TILE_POS(53, 57), LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_127, TILE_POS(54, 52), LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_127, TILE_POS(55, 52), LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_127, TILE_POS(56, 52), LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_126, TILE_POS(53, 53), LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_126, TILE_POS(53, 57), LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void sub_080A169C(void) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[0x18];
|
||||
/*0x80*/ u16 metaTilePos;
|
||||
/*0x80*/ u16 tilePos;
|
||||
/*0x82*/ u16 unk_82;
|
||||
/*0x84*/ u8 unk_84;
|
||||
/*0x85*/ u8 unk_85;
|
||||
@@ -42,7 +42,7 @@ void DoubleBookshelf(DoubleBookshelfEntity* this) {
|
||||
void DoubleBookshelf_Init(DoubleBookshelfEntity* this) {
|
||||
DoubleBookshelfEntity* child;
|
||||
super->frameIndex = super->type;
|
||||
this->metaTilePos = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
if (super->type != 0) {
|
||||
super->action = 1;
|
||||
if (this->unk_84 == 0) {
|
||||
@@ -73,7 +73,7 @@ void DoubleBookshelf_Init(DoubleBookshelfEntity* this) {
|
||||
}
|
||||
|
||||
void DoubleBookshelf_Action1(DoubleBookshelfEntity* this) {
|
||||
GetMetaTileType(this->unk_82, super->collisionLayer);
|
||||
GetTileType(this->unk_82, super->collisionLayer);
|
||||
sub_0809B234(this);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void DoubleBookshelf_Action2(DoubleBookshelfEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
if (--super->timer == 0) {
|
||||
super->action = 1;
|
||||
this->metaTilePos = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
SetPlayerControl(CONTROL_ENABLED);
|
||||
sub_0809B0B0(this);
|
||||
EnqueueSFX(SFX_BUTTON_PRESS);
|
||||
@@ -93,45 +93,45 @@ void DoubleBookshelf_Action3(DoubleBookshelfEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0809B0B0(DoubleBookshelfEntity* this) {
|
||||
u32 tilePos = this->metaTilePos - 1;
|
||||
u32 tilePos = this->tilePos - 1;
|
||||
u32 layer = super->collisionLayer;
|
||||
switch (super->subAction) {
|
||||
case 0:
|
||||
this->unk_84 = 0;
|
||||
this->unk_82 = tilePos + 2;
|
||||
SetMetaTile(SPECIAL_META_TILE_130, tilePos - 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 2, layer);
|
||||
SetTile(SPECIAL_TILE_130, tilePos - 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 2, layer);
|
||||
break;
|
||||
case 1:
|
||||
this->unk_84 = 1;
|
||||
this->unk_82 = tilePos;
|
||||
SetMetaTile(SPECIAL_META_TILE_95, tilePos, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 2, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_130, tilePos + 3, layer);
|
||||
SetTile(SPECIAL_TILE_95, tilePos, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 2, layer);
|
||||
SetTile(SPECIAL_TILE_130, tilePos + 3, layer);
|
||||
break;
|
||||
case 2:
|
||||
this->unk_84 = 1;
|
||||
this->unk_82 = tilePos;
|
||||
SetMetaTile(SPECIAL_META_TILE_130, tilePos + 3, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 2, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_95, tilePos, layer);
|
||||
SetTile(SPECIAL_TILE_130, tilePos + 3, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 2, layer);
|
||||
SetTile(SPECIAL_TILE_95, tilePos, layer);
|
||||
SetFlag(((DoubleBookshelfEntity*)super->parent)->unk_86);
|
||||
break;
|
||||
case 3:
|
||||
this->unk_84 = 0;
|
||||
this->unk_82 = tilePos + 2;
|
||||
SetMetaTile(SPECIAL_META_TILE_130, tilePos - 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_95, tilePos + 2, layer);
|
||||
SetTile(SPECIAL_TILE_130, tilePos - 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, layer);
|
||||
SetTile(SPECIAL_TILE_95, tilePos + 2, layer);
|
||||
ClearFlag(((DoubleBookshelfEntity*)super->parent)->unk_86);
|
||||
break;
|
||||
case 4:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 1, layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + 2, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 1, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 2, layer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ void sub_0809B274(DoubleBookshelfEntity* this) {
|
||||
case 1:
|
||||
if (player->x.HALF.HI + 0x1c > super->x.HALF.HI) {
|
||||
this->unk_84 = 2;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->metaTilePos + 2, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + 2, LAYER_BOTTOM);
|
||||
sub_0809B358((DoubleBookshelfEntity*)super->child);
|
||||
return;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void sub_0809B274(DoubleBookshelfEntity* this) {
|
||||
return;
|
||||
}
|
||||
this->unk_84 = 1;
|
||||
RestorePrevTileEntity(this->metaTilePos + 2, 1);
|
||||
RestorePrevTileEntity(this->tilePos + 2, 1);
|
||||
sub_0809B38C((DoubleBookshelfEntity*)super->child);
|
||||
return;
|
||||
}
|
||||
@@ -181,34 +181,34 @@ void sub_0809B274(DoubleBookshelfEntity* this) {
|
||||
|
||||
void sub_0809B334(DoubleBookshelfEntity* this) {
|
||||
s32 index;
|
||||
u32 tilePos = this->metaTilePos - 0x81;
|
||||
u32 tilePos = this->tilePos - 0x81;
|
||||
for (index = 2; index >= 0; index--, tilePos++) {
|
||||
SetMetaTile(SPECIAL_META_TILE_38, tilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_38, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B358(DoubleBookshelfEntity* this) {
|
||||
static const u16 gUnk_08123D68[] = { SPECIAL_META_TILE_34, SPECIAL_META_TILE_34, SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_38, SPECIAL_META_TILE_116, SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_38, SPECIAL_META_TILE_116, SPECIAL_META_TILE_34,
|
||||
SPECIAL_META_TILE_34 };
|
||||
static const u16 gUnk_08123D68[] = { SPECIAL_TILE_34, SPECIAL_TILE_34, SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_38, SPECIAL_TILE_116, SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_38, SPECIAL_TILE_116, SPECIAL_TILE_34,
|
||||
SPECIAL_TILE_34 };
|
||||
s32 index;
|
||||
const u16* array = &gUnk_08123D68[this->unk_84];
|
||||
u32 metaTilePos = this->metaTilePos + TILE_POS(-2, -2);
|
||||
u32 tilePos = this->tilePos + TILE_POS(-2, -2);
|
||||
for (index = 4; index >= 0;) {
|
||||
SetMetaTile(*array, metaTilePos, LAYER_BOTTOM);
|
||||
SetTile(*array, tilePos, LAYER_BOTTOM);
|
||||
index--;
|
||||
metaTilePos++;
|
||||
tilePos++;
|
||||
array += 2;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B38C(DoubleBookshelfEntity* this) {
|
||||
s32 index;
|
||||
u32 metaTilePos = this->metaTilePos + TILE_POS(-2, -2);
|
||||
u32 tilePos = this->tilePos + TILE_POS(-2, -2);
|
||||
for (index = 4; index >= 0;) {
|
||||
RestorePrevTileEntity(metaTilePos, 1);
|
||||
RestorePrevTileEntity(tilePos, 1);
|
||||
index--;
|
||||
metaTilePos++;
|
||||
tilePos++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,9 +306,9 @@ void sub_08087F58(FigurineDeviceEntity* this) {
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
case 1:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_78 - 1, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_78, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_78 + 1, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_78 - 1, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_78, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_78 + 1, LAYER_BOTTOM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void Fireplace_Init(FireplaceEntity* this) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
sub_0807B7D8(0x30b, TILE(super->x.HALF.HI, super->y.HALF.HI), 2);
|
||||
SetMetaTile(SPECIAL_META_TILE_97, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_97, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
}
|
||||
Fireplace_Action1(this);
|
||||
}
|
||||
@@ -50,14 +50,14 @@ void Fireplace_Action1(FireplaceEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0809B7C0(FireplaceEntity* this) {
|
||||
u32 tileType = GetMetaTileTypeByEntity(super);
|
||||
if (tileType != SPECIAL_META_TILE_97 && tileType != SPECIAL_META_TILE_98) {
|
||||
u32 tileType = GetTileTypeByEntity(super);
|
||||
if (tileType != SPECIAL_TILE_97 && tileType != SPECIAL_TILE_98) {
|
||||
sub_0809B7DC(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B7DC(FireplaceEntity* this) {
|
||||
sub_0807B7D8(0xc3 << 2, TILE(super->x.HALF.HI, super->y.HALF.HI), 2);
|
||||
SetMetaTile(SPECIAL_META_TILE_98, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_98, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
super->timer = 1;
|
||||
}
|
||||
|
||||
@@ -114,33 +114,33 @@ void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) {
|
||||
|
||||
void sub_0809C0A8(FrozenWaterElementEntity* this) {
|
||||
u32 position = COORD_TO_TILE(super);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-2, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(2, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-2, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(2, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 5), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 5), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 5), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 6), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 6), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-3, 7), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-2, 7), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 7), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 7), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(2, 7), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(3, 7), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-2, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(2, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-2, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(2, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 5), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 5), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 5), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 6), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 6), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-3, 7), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-2, 7), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 7), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 7), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(2, 7), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(3, 7), super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0809C23C(FrozenWaterElementEntity* this) {
|
||||
|
||||
+70
-70
@@ -216,14 +216,14 @@ static void FurnitureInit(FurnitureEntity* this) {
|
||||
break;
|
||||
case 0x40:
|
||||
super->y.HALF.HI = (super->y.HALF.HI & ~0xF) | 4;
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos - 128, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos - 64, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos - 128, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos - 64, LAYER_BOTTOM);
|
||||
break;
|
||||
case 0x80:
|
||||
super->frameIndex = 0;
|
||||
super->y.HALF.HI = (super->y.HALF.HI & ~0xF) | 6;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos, super->collisionLayer);
|
||||
break;
|
||||
case 0x200:
|
||||
break;
|
||||
@@ -259,9 +259,9 @@ static void FurnitureInit(FurnitureEntity* this) {
|
||||
tilePos = this->tilePos - 129;
|
||||
cnt = super->type != 26 ? 3 : 2;
|
||||
for (i = 0; i < cnt; ++i, ++tilePos) {
|
||||
SetMetaTile(SPECIAL_META_TILE_38, tilePos, LAYER_TOP);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, tilePos, LAYER_BOTTOM);
|
||||
SetVvvAtMetaTilePos(VVV_0, tilePos + TILE_POS(0, 1), 1);
|
||||
SetTile(SPECIAL_TILE_38, tilePos, LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_38, tilePos, LAYER_BOTTOM);
|
||||
SetVvvAtTilePos(VVV_0, tilePos + TILE_POS(0, 1), 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -286,22 +286,22 @@ static void FurnitureInit(FurnitureEntity* this) {
|
||||
case STAIRCASE:
|
||||
super->collisionLayer = 1;
|
||||
super->spriteOrientation.flipY = 2;
|
||||
SetMetaTile(SPECIAL_META_TILE_116, this->tilePos - 64, super->collisionLayer);
|
||||
SetVvvAtMetaTilePos(VVV_63, this->tilePos - 64, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos + 64, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_116, this->tilePos - 64, super->collisionLayer);
|
||||
SetVvvAtTilePos(VVV_63, this->tilePos - 64, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos + 64, super->collisionLayer);
|
||||
break;
|
||||
case MINISH_CHEESE:
|
||||
if (super->type2 != 0)
|
||||
super->spriteOffsetX = -4;
|
||||
break;
|
||||
case WOODEN_TABLE:
|
||||
SetMetaTile(SPECIAL_META_TILE_35, this->tilePos - 65, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_35, this->tilePos - 64, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_35, this->tilePos - 63, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_35, this->tilePos - 65, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_35, this->tilePos - 64, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_35, this->tilePos - 63, super->collisionLayer);
|
||||
break;
|
||||
case LOW_BOOKSHELF:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePos + 65, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + 65, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,20 +339,20 @@ static void FurnitureUpdate(FurnitureEntity* this) {
|
||||
case 0x80:
|
||||
if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI + 8) {
|
||||
if (gPlayerState.floor_type != SURFACE_LADDER &&
|
||||
GetMetaTileTypeByEntity(super) == SPECIAL_META_TILE_23) {
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePos + TILE_POS(0, -2), super->collisionLayer);
|
||||
GetTileTypeByEntity(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);
|
||||
}
|
||||
} else {
|
||||
if (gPlayerEntity.base.collisionLayer & 2) {
|
||||
gPlayerEntity.base.collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(&gPlayerEntity.base);
|
||||
}
|
||||
if (GetMetaTileTypeByEntity(super) != SPECIAL_META_TILE_23) {
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_20, this->tilePos + TILE_POS(0, -2), super->collisionLayer);
|
||||
if (GetTileTypeByEntity(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);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -377,103 +377,103 @@ static void sub_08090B6C(FurnitureEntity* this) {
|
||||
num = 2;
|
||||
}
|
||||
for (i = -num; i <= num; ++i) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + i, layer);
|
||||
}
|
||||
if (px & 8) {
|
||||
sub_08090CDC(SPECIAL_META_TILE_36, tilePos - i, layer);
|
||||
sub_08090CDC(SPECIAL_META_TILE_37, tilePos + i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_36, tilePos - i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_37, tilePos + i, layer);
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos - i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - i, layer);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
num = w2 / 8;
|
||||
for (i = -num; i <= num; i++) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + i, layer);
|
||||
}
|
||||
if (px & 8) {
|
||||
sub_08090CDC(SPECIAL_META_TILE_36, tilePos - i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_36, tilePos - i, layer);
|
||||
if (i != 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + i, layer);
|
||||
}
|
||||
} else {
|
||||
if (i != 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos - i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - i, layer);
|
||||
}
|
||||
sub_08090CDC(SPECIAL_META_TILE_37, tilePos + i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_37, tilePos + i, layer);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
num = w2 / 4;
|
||||
for (i = -num; i < num; ++i) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + i, layer);
|
||||
}
|
||||
if (px & 8) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + i, layer);
|
||||
} else {
|
||||
sub_08090CDC(SPECIAL_META_TILE_36, tilePos - i - 1, layer);
|
||||
sub_08090CDC(SPECIAL_META_TILE_37, tilePos + i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_36, tilePos - i - 1, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_37, tilePos + i, layer);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
num = w2 / 4;
|
||||
for (i = -num; i <= num; ++i) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePos + i, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + i, layer);
|
||||
}
|
||||
if (px & 8) {
|
||||
sub_08090CDC(SPECIAL_META_TILE_37, tilePos + i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_37, tilePos + i, layer);
|
||||
} else {
|
||||
sub_08090CDC(SPECIAL_META_TILE_36, tilePos - i, layer);
|
||||
sub_08090CDC(SPECIAL_TILE_36, tilePos - i, layer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_08090CDC(u32 metaTileIndex, u32 metaTilePos, u32 layer) {
|
||||
u16 cur = GetMetaTileIndex(metaTilePos, layer);
|
||||
static void sub_08090CDC(u32 tileIndex, u32 tilePos, u32 layer) {
|
||||
u16 cur = GetTileIndex(tilePos, layer);
|
||||
u32 next = cur;
|
||||
|
||||
if ((cur & 0x4000) == 0) {
|
||||
SetMetaTile(metaTileIndex, metaTilePos, layer);
|
||||
SetTile(tileIndex, tilePos, layer);
|
||||
} else {
|
||||
switch (cur) {
|
||||
case SPECIAL_META_TILE_37:
|
||||
if (metaTileIndex == SPECIAL_META_TILE_36)
|
||||
next = SPECIAL_META_TILE_34;
|
||||
if (metaTileIndex == SPECIAL_META_TILE_44)
|
||||
next = SPECIAL_META_TILE_34;
|
||||
case SPECIAL_TILE_37:
|
||||
if (tileIndex == SPECIAL_TILE_36)
|
||||
next = SPECIAL_TILE_34;
|
||||
if (tileIndex == SPECIAL_TILE_44)
|
||||
next = SPECIAL_TILE_34;
|
||||
break;
|
||||
case SPECIAL_META_TILE_45:
|
||||
if (metaTileIndex == SPECIAL_META_TILE_44)
|
||||
next = SPECIAL_META_TILE_43;
|
||||
if (metaTileIndex == SPECIAL_META_TILE_36)
|
||||
next = SPECIAL_META_TILE_34;
|
||||
case SPECIAL_TILE_45:
|
||||
if (tileIndex == SPECIAL_TILE_44)
|
||||
next = SPECIAL_TILE_43;
|
||||
if (tileIndex == SPECIAL_TILE_36)
|
||||
next = SPECIAL_TILE_34;
|
||||
break;
|
||||
case SPECIAL_META_TILE_36:
|
||||
if (metaTileIndex == SPECIAL_META_TILE_37)
|
||||
next = SPECIAL_META_TILE_34;
|
||||
if (metaTileIndex == SPECIAL_META_TILE_45)
|
||||
next = SPECIAL_META_TILE_34;
|
||||
case SPECIAL_TILE_36:
|
||||
if (tileIndex == SPECIAL_TILE_37)
|
||||
next = SPECIAL_TILE_34;
|
||||
if (tileIndex == SPECIAL_TILE_45)
|
||||
next = SPECIAL_TILE_34;
|
||||
break;
|
||||
case SPECIAL_META_TILE_44:
|
||||
if (metaTileIndex == SPECIAL_META_TILE_45)
|
||||
next = SPECIAL_META_TILE_43;
|
||||
if (metaTileIndex == SPECIAL_META_TILE_37)
|
||||
next = SPECIAL_META_TILE_34;
|
||||
case SPECIAL_TILE_44:
|
||||
if (tileIndex == SPECIAL_TILE_45)
|
||||
next = SPECIAL_TILE_43;
|
||||
if (tileIndex == SPECIAL_TILE_37)
|
||||
next = SPECIAL_TILE_34;
|
||||
break;
|
||||
case SPECIAL_META_TILE_34:
|
||||
case SPECIAL_META_TILE_35:
|
||||
case SPECIAL_META_TILE_38:
|
||||
case SPECIAL_META_TILE_39:
|
||||
case SPECIAL_META_TILE_40:
|
||||
case SPECIAL_META_TILE_41:
|
||||
case SPECIAL_META_TILE_42:
|
||||
case SPECIAL_META_TILE_43:
|
||||
case SPECIAL_TILE_34:
|
||||
case SPECIAL_TILE_35:
|
||||
case SPECIAL_TILE_38:
|
||||
case SPECIAL_TILE_39:
|
||||
case SPECIAL_TILE_40:
|
||||
case SPECIAL_TILE_41:
|
||||
case SPECIAL_TILE_42:
|
||||
case SPECIAL_TILE_43:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
SetMetaTile(next, metaTilePos, layer);
|
||||
SetTile(next, tilePos, layer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -15,8 +15,8 @@
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0x8];
|
||||
u16 tile;
|
||||
u16 tile2;
|
||||
u16 tilePos;
|
||||
u16 tilePos2;
|
||||
u16 tileIndex;
|
||||
u16 tileIndex2;
|
||||
u8 filler2[0xe];
|
||||
@@ -56,12 +56,12 @@ void GentariCurtain_Init(GentariCurtainEntity* this) {
|
||||
super->spritePriority.b0 = 6;
|
||||
super->x.HALF.HI += 2;
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
this->tile = COORD_TO_TILE_OFFSET(super, 0, 8);
|
||||
this->tile2 = COORD_TO_TILE_OFFSET(super, 0, -8);
|
||||
this->tileIndex = GetMetaTileIndex(this->tile, LAYER_BOTTOM);
|
||||
this->tileIndex2 = GetMetaTileIndex(this->tile2, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tile, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tile2, LAYER_BOTTOM);
|
||||
this->tilePos = COORD_TO_TILE_OFFSET(super, 0, 8);
|
||||
this->tilePos2 = COORD_TO_TILE_OFFSET(super, 0, -8);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, LAYER_BOTTOM);
|
||||
this->tileIndex2 = GetTileIndex(this->tilePos2, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos2, LAYER_BOTTOM);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
} else {
|
||||
super->action = 1;
|
||||
@@ -81,8 +81,8 @@ void GentariCurtain_Action2(GentariCurtainEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 3;
|
||||
SetMetaTile(this->tileIndex, this->tile, LAYER_BOTTOM);
|
||||
SetMetaTile(this->tileIndex2, this->tile2, LAYER_BOTTOM);
|
||||
SetTile(this->tileIndex, this->tilePos, LAYER_BOTTOM);
|
||||
SetTile(this->tileIndex2, this->tilePos2, LAYER_BOTTOM);
|
||||
sub_08092214(this);
|
||||
sub_0809223C(this);
|
||||
InitAnimationForceUpdate(super, 1);
|
||||
|
||||
@@ -52,36 +52,36 @@ void sub_0808E55C(GiantBookLadderEntity* this) {
|
||||
case 2:
|
||||
tilePos = this->unk74;
|
||||
unaff_r9 = tilePos + TILE_POS(-1, -4);
|
||||
SetMetaTile(SPECIAL_META_TILE_143, unaff_r9, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_143, tilePos + TILE_POS(0, -4), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_108, tilePos + TILE_POS(-2, -4), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_109, tilePos + TILE_POS(1, -4), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_143, unaff_r9, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_143, tilePos + TILE_POS(0, -4), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_108, tilePos + TILE_POS(-2, -4), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_109, tilePos + TILE_POS(1, -4), super->collisionLayer);
|
||||
type = super->type;
|
||||
uVar5 = 6;
|
||||
if (type != 0) {
|
||||
uVar5 = 4;
|
||||
SetMetaTile(SPECIAL_META_TILE_114, tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, tilePos + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, tilePos + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, tilePos + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, tilePos + TILE_POS(0, 2), super->collisionLayer);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
tilePos = this->unk74;
|
||||
unaff_r9 = tilePos - 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_142, unaff_r9, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_142, tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_142, unaff_r9, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_142, tilePos, super->collisionLayer);
|
||||
uVar5 = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
for (uVar4 = 0; uVar4 < uVar5; uVar4++) {
|
||||
unaff_r9 += 0x40;
|
||||
SetMetaTile(SPECIAL_META_TILE_142, unaff_r9, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_142, unaff_r9 + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_142, unaff_r9, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_142, unaff_r9 + 1, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_0808E670(GiantBookLadderEntity* this) {
|
||||
return GetMetaTileType(this->unk74 - 0x101, LAYER_BOTTOM);
|
||||
return GetTileType(this->unk74 - 0x101, LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,6 @@ void sub_0808D618(Entity* this) {
|
||||
((((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) * 64);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
SetMetaTile(16500, tilePos + arr[i], LAYER_BOTTOM);
|
||||
SetTile(16500, tilePos + arr[i], LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -12,7 +12,7 @@
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0xC];
|
||||
u16 metaTilePos;
|
||||
u16 tilePos;
|
||||
} GiantRock2Entity;
|
||||
|
||||
void GiantRock2_Init(GiantRock2Entity* this);
|
||||
@@ -28,22 +28,22 @@ void GiantRock2(Entity* this) {
|
||||
|
||||
void GiantRock2_Init(GiantRock2Entity* this) {
|
||||
u32 collisionLayer;
|
||||
u16 metaTilePos;
|
||||
u16 tilePos;
|
||||
int index;
|
||||
u32 tileIndex;
|
||||
|
||||
super->action = 1;
|
||||
this->metaTilePos = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
collisionLayer = super->collisionLayer;
|
||||
super->spritePriority.b0 = 7;
|
||||
metaTilePos = (this->metaTilePos - TILE_POS(0, 2));
|
||||
tileIndex = SPECIAL_META_TILE_34;
|
||||
tilePos = (this->tilePos - TILE_POS(0, 2));
|
||||
tileIndex = SPECIAL_TILE_34;
|
||||
for (index = 4; index > -1; index--) {
|
||||
SetMetaTile(tileIndex, metaTilePos - 2, collisionLayer);
|
||||
SetMetaTile(tileIndex, metaTilePos - 1, collisionLayer);
|
||||
SetMetaTile(tileIndex, metaTilePos, collisionLayer);
|
||||
SetMetaTile(tileIndex, metaTilePos + 1, collisionLayer);
|
||||
metaTilePos += TILE_POS(0, 1);
|
||||
SetTile(tileIndex, tilePos - 2, collisionLayer);
|
||||
SetTile(tileIndex, tilePos - 1, collisionLayer);
|
||||
SetTile(tileIndex, tilePos, collisionLayer);
|
||||
SetTile(tileIndex, tilePos + 1, collisionLayer);
|
||||
tilePos += TILE_POS(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+54
-54
@@ -11,7 +11,7 @@
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[0xe];
|
||||
/*0x76*/ u16 tilePosition;
|
||||
/*0x76*/ u16 tilePos;
|
||||
/*0x78*/ u16 unk_78;
|
||||
/*0x7a*/ u16 unk_7a;
|
||||
} GiantTwigEntity;
|
||||
@@ -70,7 +70,7 @@ void GiantTwig(GiantTwigEntity* this) {
|
||||
void GiantTwig_Type0Init(GiantTwigEntity* this) {
|
||||
Entity* obj;
|
||||
super->action = 1;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
super->frameIndex = 1;
|
||||
@@ -116,7 +116,7 @@ void GiantTwig_Type1Init(GiantTwigEntity* this) {
|
||||
super->action = 1;
|
||||
super->frameIndex = (super->type2 & 1) + 3;
|
||||
super->spritePriority.b0 = 7;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
sub_08093A1C(this);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ void GiantTwig_Type2Init(GiantTwigEntity* this) {
|
||||
super->frameIndex = (super->type2 & 1) + 5;
|
||||
super->spriteRendering.b3 = 3;
|
||||
super->spritePriority.b0 = 7;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
if ((super->type2 & 1) != 0) {
|
||||
super->spriteOffsetX = 8;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ void GiantTwig_Type2Idle(GiantTwigEntity* this) {
|
||||
|
||||
void sub_08093984(GiantTwigEntity* this) {
|
||||
u32 index;
|
||||
const s16* metaTileOffsets;
|
||||
const s16* tileOffsets;
|
||||
|
||||
if (super->type2 != 0) {
|
||||
static const s16 gUnk_081228F8[] = {
|
||||
@@ -150,7 +150,7 @@ void sub_08093984(GiantTwigEntity* this) {
|
||||
TILE_POS(-1, 0), TILE_POS(0, 0), TILE_POS(1, 0), TILE_POS(2, 0), TILE_POS(-1, 1),
|
||||
TILE_POS(0, 1), TILE_POS(1, 1), TILE_POS(2, 1), TILE_POS(3, 1),
|
||||
};
|
||||
metaTileOffsets = gUnk_081228F8;
|
||||
tileOffsets = gUnk_081228F8;
|
||||
} else {
|
||||
static const s16 gUnk_0812291E[] = {
|
||||
TILE_POS(-1, -2), TILE_POS(0, -2), TILE_POS(1, -2), TILE_POS(2, -2), TILE_POS(-2, -1),
|
||||
@@ -158,11 +158,11 @@ void sub_08093984(GiantTwigEntity* this) {
|
||||
TILE_POS(-1, 0), TILE_POS(0, 0), TILE_POS(1, 0), TILE_POS(2, 0), TILE_POS(-3, 1),
|
||||
TILE_POS(-2, 1), TILE_POS(-1, 1), TILE_POS(0, 1), TILE_POS(1, 1),
|
||||
};
|
||||
metaTileOffsets = gUnk_0812291E;
|
||||
tileOffsets = gUnk_0812291E;
|
||||
}
|
||||
|
||||
for (index = 0; index < 0x13; index++) {
|
||||
SetMetaTile(SPECIAL_META_TILE_116, metaTileOffsets[index] + this->tilePosition, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_116, tileOffsets[index] + this->tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void GiantTwig_Type3Init(GiantTwigEntity* this) {
|
||||
super->action = 1;
|
||||
super->frameIndex = (super->type2 & 3) + 7;
|
||||
super->spritePriority.b0 = 7;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
sub_08093A1C(this);
|
||||
ChangeObjPalette(super, 0x7a);
|
||||
}
|
||||
@@ -181,47 +181,47 @@ void GiantTwig_Type3Idle(GiantTwigEntity* this) {
|
||||
void sub_08093A1C(GiantTwigEntity* this) {
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
SetMetaTile(SPECIAL_META_TILE_36, this->tilePosition + TILE_POS(-4, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(-3, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(-2, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_41, this->tilePosition + TILE_POS(-4, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(-3, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(-2, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePosition + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePosition + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_39, this->tilePosition + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_35, this->tilePosition + TILE_POS(2, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_109, this->tilePosition + TILE_POS(3, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_41, this->tilePosition + TILE_POS(1, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(2, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(3, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_36, this->tilePos + TILE_POS(-4, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(-3, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(-2, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_41, this->tilePos + TILE_POS(-4, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(-3, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(-2, 2), 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);
|
||||
SetTile(SPECIAL_TILE_39, this->tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_35, this->tilePos + TILE_POS(2, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_109, this->tilePos + TILE_POS(3, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_41, this->tilePos + TILE_POS(1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(2, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(3, 2), super->collisionLayer);
|
||||
break;
|
||||
case 1:
|
||||
if ((super->type2 & 1) != 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_109, this->tilePosition + TILE_POS(-1, -2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_41, this->tilePosition + TILE_POS(-2, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_109, this->tilePosition + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_110, this->tilePosition + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_109, this->tilePosition + TILE_POS(2, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_109, this->tilePos + TILE_POS(-1, -2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_41, this->tilePos + TILE_POS(-2, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_109, this->tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_110, this->tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_109, this->tilePos + TILE_POS(2, 1), super->collisionLayer);
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_108, this->tilePosition + TILE_POS(1, -2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_108, this->tilePosition + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_42, this->tilePosition + TILE_POS(2, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_108, this->tilePosition + TILE_POS(-2, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_111, this->tilePosition + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_108, this->tilePos + TILE_POS(1, -2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_108, this->tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_42, this->tilePos + TILE_POS(2, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_108, this->tilePos + TILE_POS(-2, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_111, this->tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos, super->collisionLayer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -230,12 +230,12 @@ void sub_08093C70(GiantTwigEntity* this) {
|
||||
if (this->unk_78 != 0) {
|
||||
if (gPlayerState.heldObject != 0) {
|
||||
this->unk_78 = 0;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePosition + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, this->tilePosition + TILE_POS(1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, this->tilePos + TILE_POS(1, 2), super->collisionLayer);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -243,12 +243,12 @@ void sub_08093C70(GiantTwigEntity* this) {
|
||||
if (--this->unk_7a == 0) {
|
||||
this->unk_78++;
|
||||
this->unk_7a = 0x3c;
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePosition + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePosition + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_39, this->tilePosition + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePosition + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePosition + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_41, this->tilePosition + TILE_POS(1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_39, this->tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(-1, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(0, 2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_41, this->tilePos + TILE_POS(1, 2), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,20 +42,20 @@ void HiddenLadderDown_Init(HiddenLadderDownEntity* this) {
|
||||
if (CheckFlags(this->unk_86) != 0) {
|
||||
super->action = 2;
|
||||
super->spriteSettings.draw = TRUE;
|
||||
SetMetaTileType(META_TILE_TYPE_418, *puVar3 + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_419, *puVar3 + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_420, *puVar3 + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_421, *puVar3 + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_422, *puVar3 + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_423, *puVar3 + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_424, *puVar3 + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_425, *puVar3 + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTileType(META_TILE_TYPE_426, *puVar3 + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_418, *puVar3 + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_419, *puVar3 + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_420, *puVar3 + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_421, *puVar3 + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_422, *puVar3 + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_423, *puVar3 + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_424, *puVar3 + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_425, *puVar3 + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_426, *puVar3 + TILE_POS(1, 1), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
void HiddenLadderDown_Action1(HiddenLadderDownEntity* this) {
|
||||
if (GetMetaTileType(this->unk_70, super->collisionLayer) == 0x1a6) {
|
||||
if (GetTileType(this->unk_70, super->collisionLayer) == 0x1a6) {
|
||||
super->action = 2;
|
||||
super->spriteSettings.draw = TRUE;
|
||||
SetFlag(this->unk_86);
|
||||
|
||||
@@ -218,7 +218,7 @@ void sub_08081188(ItemOnGroundEntity* this) {
|
||||
void sub_080811AC(ItemOnGroundEntity* this) {
|
||||
super->action = 2;
|
||||
super->spriteSettings.draw = 0;
|
||||
this->unk_6e = GetMetaTileTypeByEntity(super);
|
||||
this->unk_6e = GetTileTypeByEntity(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 != GetMetaTileTypeByEntity(super)) {
|
||||
this->unk_6e != GetTileTypeByEntity(super)) {
|
||||
super->direction = 0;
|
||||
super->speed = 0;
|
||||
super->spriteSettings.draw = 1;
|
||||
|
||||
+12
-12
@@ -68,32 +68,32 @@ void JailBars_Action3(JailBarsEntity* this) {
|
||||
|
||||
static void SetJailBarTiles(JailBarsEntity* this, u32 arg1) {
|
||||
static const s16 gUnk_08124960[] = {
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
-0x3,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
-0x2,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
-0x1,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
0x0,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
0x1,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
0x2,
|
||||
-0x1,
|
||||
};
|
||||
static const s16 gUnk_0812497A[] = {
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
-0x3,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
-0x2,
|
||||
SPECIAL_META_TILE_136,
|
||||
SPECIAL_TILE_136,
|
||||
-0x1,
|
||||
SPECIAL_META_TILE_135,
|
||||
SPECIAL_TILE_135,
|
||||
0x0,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
0x1,
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_TILE_35,
|
||||
0x2,
|
||||
-0x1,
|
||||
};
|
||||
|
||||
@@ -182,10 +182,10 @@ void sub_0808C13C(JarPortalEntity* this) {
|
||||
void sub_0808C148(JarPortalEntity* this, bool32 setTiles) {
|
||||
u32 tilePos = COORD_TO_TILE(super);
|
||||
if (!setTiles) {
|
||||
SetMetaTile(SPECIAL_META_TILE_146, tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_147, tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_148, tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_149, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_146, tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_147, tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_148, tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_149, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
} else {
|
||||
RestorePrevTileEntity(tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
RestorePrevTileEntity(tilePos + 0, super->collisionLayer);
|
||||
|
||||
@@ -38,7 +38,7 @@ void LadderUp(Entity* this) {
|
||||
return;
|
||||
}
|
||||
this->y.HALF.HI = (this->y.HALF.HI & 0xfff0) + 0xc;
|
||||
SetMetaTile(SPECIAL_META_TILE_35, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_35, COORD_TO_TILE(this), this->collisionLayer);
|
||||
break;
|
||||
case 1:
|
||||
if (GravityUpdate(this, Q_8_8(16.0)) == 0) {
|
||||
@@ -67,17 +67,17 @@ void LadderUp(Entity* this) {
|
||||
if (this->type2 == 0) {
|
||||
if (gPlayerEntity.base.y.HALF.HI < this->y.HALF.HI) {
|
||||
if (gPlayerState.floor_type != SURFACE_LADDER &&
|
||||
(GetMetaTileTypeByEntity(this) == SPECIAL_META_TILE_23)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_35, COORD_TO_TILE(this), this->collisionLayer);
|
||||
(GetTileTypeByEntity(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 (GetMetaTileTypeByEntity(this) != SPECIAL_META_TILE_23) {
|
||||
SetMetaTile(SPECIAL_META_TILE_23, COORD_TO_TILE(this), this->collisionLayer);
|
||||
if (GetTileTypeByEntity(this) != SPECIAL_TILE_23) {
|
||||
SetTile(SPECIAL_TILE_23, COORD_TO_TILE(this), this->collisionLayer);
|
||||
if (this->type == 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_23, COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_23, COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer);
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_20, COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_20, COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,13 +88,13 @@ void LightDoor_Action4(LightDoorEntity* this) {
|
||||
void sub_080850FC(LightDoorEntity* this) {
|
||||
u32 tilePos = COORD_TO_TILE(super);
|
||||
u32 layer = super->collisionLayer;
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(-1, -1), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(0, -1), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(1, -1), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(-1, 0), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(0, 0), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(1, 0), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(-1, 1), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(0, 1), layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, tilePos + TILE_POS(1, 1), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(-1, -1), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(0, -1), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(1, -1), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(-1, 0), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(0, 0), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(1, 0), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(-1, 1), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(0, 1), layer);
|
||||
SetTile(SPECIAL_TILE_61, tilePos + TILE_POS(1, 1), layer);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ static void sub_0809EAD8(LightableSwitchEntity* this) {
|
||||
UpdateRailMovement(super, (u16**)&super->child, &this->unk_74);
|
||||
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_80, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_80, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ void LinkEmptyingBottle_Init(LinkEmptyingBottleEntity* this) {
|
||||
gUnk_08122A18[gPlayerEntity.base.animationState | 1] << 0x10);
|
||||
}
|
||||
CopyPosition(super->child, super);
|
||||
sub_08094980(this, SPECIAL_META_TILE_50, SPECIAL_META_TILE_51);
|
||||
sub_08094980(this, SPECIAL_META_TILE_97, SPECIAL_META_TILE_34);
|
||||
sub_08094980(this, SPECIAL_TILE_50, SPECIAL_TILE_51);
|
||||
sub_08094980(this, SPECIAL_TILE_97, SPECIAL_TILE_34);
|
||||
break;
|
||||
case 1:
|
||||
effect = CreateFx(super, FX_GREEN_SPLASH2, 0);
|
||||
@@ -61,8 +61,8 @@ void LinkEmptyingBottle_Init(LinkEmptyingBottleEntity* this) {
|
||||
super->timer = 0;
|
||||
super->spritePriority.b0 = 0;
|
||||
super->spriteRendering.b3 = 0;
|
||||
sub_08094980(this, SPECIAL_META_TILE_59, SPECIAL_META_TILE_60);
|
||||
sub_08094980(this, SPECIAL_META_TILE_97, SPECIAL_META_TILE_34);
|
||||
sub_08094980(this, SPECIAL_TILE_59, SPECIAL_TILE_60);
|
||||
sub_08094980(this, SPECIAL_TILE_97, SPECIAL_TILE_34);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -119,7 +119,7 @@ void sub_08094980(LinkEmptyingBottleEntity* this, u32 searchTileIndex, u32 repla
|
||||
xOffset = gUnk_08122A28[index];
|
||||
yOffset = gUnk_08122A28[index + 1];
|
||||
if (searchTileIndex == sub_080B1A0C(super, xOffset, yOffset)) {
|
||||
SetMetaTile(replaceTileIndex, TILE(super->x.HALF.HI + xOffset, super->y.HALF.HI + yOffset),
|
||||
SetTile(replaceTileIndex, TILE(super->x.HALF.HI + xOffset, super->y.HALF.HI + yOffset),
|
||||
super->collisionLayer);
|
||||
}
|
||||
index += 2;
|
||||
|
||||
@@ -118,7 +118,7 @@ void LockedDoor_Init(LockedDoorEntity* this) {
|
||||
super->spritePriority.b0 = 5;
|
||||
super->frame = super->type & 0xF;
|
||||
this->unk_76 = TILE(super->x.HALF.HI, super->y.HALF.HI);
|
||||
this->unk_74 = GetMetaTileIndex(this->unk_76, super->collisionLayer);
|
||||
this->unk_74 = GetTileIndex(this->unk_76, super->collisionLayer);
|
||||
switch (super->type2) {
|
||||
case 0:
|
||||
if (!CheckFlags(this->unk_86)) {
|
||||
@@ -164,7 +164,7 @@ void LockedDoor_Action1(LockedDoorEntity* this) {
|
||||
if (--super->timer == 0) {
|
||||
super->action = 2;
|
||||
super->timer = 7;
|
||||
SetMetaTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
EnqueueSFX(SFX_10B);
|
||||
}
|
||||
}
|
||||
@@ -264,12 +264,12 @@ void sub_080836A0(LockedDoorEntity* this) {
|
||||
super->spriteSettings.draw = 1;
|
||||
super->x.HALF.HI = this->unk_70;
|
||||
super->y.HALF.HI = this->unk_72;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_76, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_76, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_080836DC(Entity* this, u32 unk_0, u32 unk_1) {
|
||||
const struct_0811F680* tmp;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, unk_1, this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, unk_1, this->collisionLayer);
|
||||
this->timer = 7;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->direction = (unk_0 << 3) ^ DirectionSouth;
|
||||
|
||||
+28
-28
@@ -76,38 +76,38 @@ void sub_0809E5F0(MacroAcornEntity* this) {
|
||||
this->unk_80 = position;
|
||||
switch (super->type) {
|
||||
case 2:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(3, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_109, position + TILE_POS(4, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(3, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_109, position + TILE_POS(4, -1), LAYER_BOTTOM);
|
||||
case 0:
|
||||
SetMetaTile(SPECIAL_META_TILE_108, position + TILE_POS(-2, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-2, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_110, position + TILE_POS(-2, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_111, position + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_108, position + TILE_POS(-2, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-2, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_110, position + TILE_POS(-2, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_111, position + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
break;
|
||||
case 3:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-4, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_108, position + TILE_POS(-5, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-4, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_108, position + TILE_POS(-5, -1), LAYER_BOTTOM);
|
||||
case 1:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-2, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_109, position + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-2, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_110, position + TILE_POS(-2, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, position + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_111, position + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-2, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_109, position + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-2, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_110, position + TILE_POS(-2, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, position + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_111, position + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+19
-19
@@ -136,26 +136,26 @@ void MacroBook_Action3(MacroBookEntity* this) {
|
||||
void sub_0809A958(MacroBookEntity* this) {
|
||||
|
||||
static const u16 tileIndices[] = {
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_META_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
SPECIAL_TILE_116,
|
||||
0,
|
||||
0,
|
||||
SPECIAL_META_TILE_34,
|
||||
SPECIAL_META_TILE_34,
|
||||
SPECIAL_TILE_34,
|
||||
SPECIAL_TILE_34,
|
||||
};
|
||||
int index;
|
||||
int index2;
|
||||
@@ -169,7 +169,7 @@ void sub_0809A958(MacroBookEntity* this) {
|
||||
for (index = 0; index < 5; index++, tilePos += 0x40) {
|
||||
for (index2 = 0; index2 < 4; index2++, tileIndexPtr++) {
|
||||
if ((*tileIndexPtr & 0x4000) != 0) {
|
||||
SetMetaTile(*tileIndexPtr, tilePos + index2, LAYER_BOTTOM);
|
||||
SetTile(*tileIndexPtr, tilePos + index2, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,21 +82,21 @@ void MacroDecoration_Action1(MacroDecorationEntity* this) {
|
||||
|
||||
void sub_08097EB8(MacroDecorationEntity* this) {
|
||||
static const s16 tilePosArray[] = {
|
||||
0xff7e, SPECIAL_META_TILE_137, 0xff7f, SPECIAL_META_TILE_34,
|
||||
0xff80, SPECIAL_META_TILE_34, 0xff81, SPECIAL_META_TILE_138,
|
||||
0xffbe, SPECIAL_META_TILE_34, 0xffbf, SPECIAL_META_TILE_34,
|
||||
0xffc0, SPECIAL_META_TILE_34, 0xffc1, SPECIAL_META_TILE_34,
|
||||
0xfffe, SPECIAL_META_TILE_34, 0xffff, SPECIAL_META_TILE_34,
|
||||
0, SPECIAL_META_TILE_34, 1, SPECIAL_META_TILE_34,
|
||||
2, SPECIAL_META_TILE_139, 0x3e, SPECIAL_META_TILE_34,
|
||||
0x3f, SPECIAL_META_TILE_34, 0x40, SPECIAL_META_TILE_38,
|
||||
0x41, SPECIAL_META_TILE_34, 0x7e, SPECIAL_META_TILE_140,
|
||||
0x7f, SPECIAL_META_TILE_140, 0x7fff, 0xffff,
|
||||
0xff7e, SPECIAL_TILE_137, 0xff7f, SPECIAL_TILE_34,
|
||||
0xff80, SPECIAL_TILE_34, 0xff81, SPECIAL_TILE_138,
|
||||
0xffbe, SPECIAL_TILE_34, 0xffbf, SPECIAL_TILE_34,
|
||||
0xffc0, SPECIAL_TILE_34, 0xffc1, SPECIAL_TILE_34,
|
||||
0xfffe, SPECIAL_TILE_34, 0xffff, SPECIAL_TILE_34,
|
||||
0, SPECIAL_TILE_34, 1, SPECIAL_TILE_34,
|
||||
2, SPECIAL_TILE_139, 0x3e, SPECIAL_TILE_34,
|
||||
0x3f, SPECIAL_TILE_34, 0x40, SPECIAL_TILE_38,
|
||||
0x41, SPECIAL_TILE_34, 0x7e, SPECIAL_TILE_140,
|
||||
0x7f, SPECIAL_TILE_140, 0x7fff, 0xffff,
|
||||
};
|
||||
const s16* tilePosPtr;
|
||||
u16 tile = COORD_TO_TILE(super);
|
||||
u16 tilePos = COORD_TO_TILE(super);
|
||||
for (tilePosPtr = tilePosArray; *tilePosPtr != 0x7fff; tilePosPtr += 2) {
|
||||
SetMetaTile((u16)tilePosPtr[1], tile + tilePosPtr[0], LAYER_BOTTOM);
|
||||
SetTile((u16)tilePosPtr[1], tilePos + tilePosPtr[0], LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ void MacroShoe_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->hitbox = (Hitbox*)MacroShoe_TypeHitboxes[this->type];
|
||||
if (this->type2 == 1) {
|
||||
SetMetaTile(SPECIAL_META_TILE_36, TILE_POS(16, 16), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, TILE_POS(17, 16), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_37, TILE_POS(18, 16), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_36, TILE_POS(16, 16), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_38, TILE_POS(17, 16), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_37, TILE_POS(18, 16), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -71,11 +71,11 @@ void Mask_Init(MaskEntity* this) {
|
||||
super->frameIndex = super->type2 & 0x3f;
|
||||
|
||||
this->unk_7e = COORD_TO_TILE(super);
|
||||
this->unk_7c = GetMetaTileIndex(this->unk_7e, LAYER_BOTTOM);
|
||||
this->unk_7c = GetTileIndex(this->unk_7e, LAYER_BOTTOM);
|
||||
|
||||
this->unk_7a = GetCollisionDataAtMetaTilePos(this->unk_7e, LAYER_BOTTOM);
|
||||
this->unk_7a = GetCollisionDataAtTilePos(this->unk_7e, LAYER_BOTTOM);
|
||||
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_7e, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_7e, LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
// Probably related to knocking it down
|
||||
@@ -100,7 +100,7 @@ void Mask_Action1(MaskEntity* this) {
|
||||
}
|
||||
|
||||
// Presumably, make the mask fall
|
||||
SetMetaTile(this->unk_7c, this->unk_7e, LAYER_BOTTOM);
|
||||
SetTile(this->unk_7c, this->unk_7e, LAYER_BOTTOM);
|
||||
|
||||
SetCollisionData(this->unk_7a, this->unk_7e, 1);
|
||||
|
||||
|
||||
@@ -117,16 +117,16 @@ void MetalDoor_Action4(MetalDoorEntity* this) {
|
||||
}
|
||||
|
||||
void sub_080A080C(MetalDoorEntity* this) {
|
||||
this->unk_76 = GetMetaTileIndex(this->unk_74 - 1, super->collisionLayer);
|
||||
this->unk_78 = GetMetaTileIndex(this->unk_74, super->collisionLayer);
|
||||
this->unk_7a = GetMetaTileIndex(this->unk_74 + 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74 - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_74 + 1, super->collisionLayer);
|
||||
this->unk_76 = GetTileIndex(this->unk_74 - 1, super->collisionLayer);
|
||||
this->unk_78 = GetTileIndex(this->unk_74, super->collisionLayer);
|
||||
this->unk_7a = GetTileIndex(this->unk_74 + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74 - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_74 + 1, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_080A0870(MetalDoorEntity* this) {
|
||||
SetMetaTile(this->unk_76, this->unk_74 - 1, super->collisionLayer);
|
||||
SetMetaTile(this->unk_78, this->unk_74, super->collisionLayer);
|
||||
SetMetaTile(this->unk_7a, this->unk_74 + 1, super->collisionLayer);
|
||||
SetTile(this->unk_76, this->unk_74 - 1, super->collisionLayer);
|
||||
SetTile(this->unk_78, this->unk_74, super->collisionLayer);
|
||||
SetTile(this->unk_7a, this->unk_74 + 1, super->collisionLayer);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ void Minecart_Init(MinecartEntity* this) {
|
||||
super->speed = 0x700;
|
||||
super->spritePriority.b1 = 3;
|
||||
InitAnimationForceUpdate(super, super->type2 + 4 + super->animationState);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
void Minecart_Action1(MinecartEntity* this) {
|
||||
@@ -289,7 +289,7 @@ void Minecart_Action6(MinecartEntity* this) {
|
||||
minecartData->room = gRoomControls.room;
|
||||
minecartData->animationState = super->animationState;
|
||||
InitAnimationForceUpdate(super, super->animationState + 0x10);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
gPlayerEntity.base.spritePriority.b0 = super->spritePriority.b0 - 1;
|
||||
|
||||
@@ -13,8 +13,8 @@ typedef struct {
|
||||
/*0x68*/ u8 unk_68[8];
|
||||
/*0x70*/ u16 unk_70;
|
||||
/*0x72*/ u16 unk_72;
|
||||
/*0x74*/ u16 metaTileIndex;
|
||||
/*0x76*/ u16 metaTilePos;
|
||||
/*0x74*/ u16 tileIndex;
|
||||
/*0x76*/ u16 tilePos;
|
||||
/*0x78*/ u8 unk_78[0x6];
|
||||
/*0x7e*/ u8 unk_7e;
|
||||
/*0x7f*/ u8 unk_7f[0x7];
|
||||
@@ -52,8 +52,8 @@ void MinecartDoor_Init(MinecartDoorEntity* this) {
|
||||
this->unk_70 = super->x.HALF.HI;
|
||||
this->unk_72 = super->y.HALF.HI;
|
||||
super->spritePriority.b0 = 5;
|
||||
this->metaTilePos = COORD_TO_TILE(super);
|
||||
this->metaTileIndex = GetMetaTileIndex(this->metaTilePos, super->collisionLayer);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
super->frameIndex = super->type;
|
||||
if (sub_08096CEC(this)) {
|
||||
if (this->unk_7e != 0) {
|
||||
@@ -64,7 +64,7 @@ void MinecartDoor_Init(MinecartDoorEntity* this) {
|
||||
} else {
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->metaTilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ void MinecartDoor_Action1(MinecartDoorEntity* this) {
|
||||
super->action = 2;
|
||||
super->timer = 7;
|
||||
super->direction = super->type << 3;
|
||||
SetMetaTile(this->metaTileIndex, this->metaTilePos, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
EnqueueSFX(SFX_10B);
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void MinecartDoor_Action3(MinecartDoorEntity* this) {
|
||||
}
|
||||
if (bVar3 == FALSE) {
|
||||
super->action = 4;
|
||||
sub_080836DC(super, super->type, this->metaTilePos);
|
||||
sub_080836DC(super, super->type, this->tilePos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void MinishVillageObject_Type1(MinishVillageObjectEntity* this) {
|
||||
super->subtimer = 0;
|
||||
super->frameIndex = 0;
|
||||
super->spritePriority.b0 = 7;
|
||||
SetMetaTile(SPECIAL_META_TILE_105, COORD_TO_TILE(super) - TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_105, COORD_TO_TILE(super) - TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
break;
|
||||
case 2:
|
||||
if ((gRoomTransition.frameCount & 3U) == 0) {
|
||||
@@ -205,7 +205,7 @@ void MinishVillageObject_Type8(MinishVillageObjectEntity* this) {
|
||||
}
|
||||
|
||||
void MinishVillageObject_Type8_Init(MinishVillageObjectEntity* this) {
|
||||
u32 tilePosition;
|
||||
u32 tilePos;
|
||||
super->spritePriority.b0 = 7;
|
||||
super->frameIndex = super->type2;
|
||||
super->action = 2;
|
||||
@@ -218,11 +218,11 @@ void MinishVillageObject_Type8_Init(MinishVillageObjectEntity* this) {
|
||||
SoundReq(SFX_179);
|
||||
} else {
|
||||
super->timer = 8;
|
||||
tilePosition = COORD_TO_TILE(super);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
if (super->type2 != 0) {
|
||||
tilePosition -= 0x40;
|
||||
tilePos -= 0x40;
|
||||
}
|
||||
SetMetaTile(SPECIAL_META_TILE_105, tilePosition, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_105, tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ void MinishVillageObject_Type8_Action1(MinishVillageObjectEntity* this) {
|
||||
super->timer = 8;
|
||||
super->spriteRendering.alphaBlend = 0;
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
SetMetaTile(SPECIAL_META_TILE_105, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_105, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ void ObjectA(ObjectAEntity* this) {
|
||||
super->action = 1;
|
||||
super->hitbox = (Hitbox*)&gHitbox_2;
|
||||
if (super->collisionLayer == LAYER_BOTTOM) {
|
||||
uVar2 = META_TILE_TYPE_38;
|
||||
uVar2 = TILE_TYPE_38;
|
||||
} else {
|
||||
uVar2 = META_TILE_TYPE_52;
|
||||
uVar2 = TILE_TYPE_52;
|
||||
}
|
||||
this->unk_70 = uVar2;
|
||||
if (CheckFlags(this->unk_86) != 0) {
|
||||
SetMetaTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
if ((gRoomControls.reload_flags & 1) != 0) {
|
||||
gUpdateVisibleTiles = 0;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ void ObjectA(ObjectAEntity* this) {
|
||||
AddInteractableSmallKeyLock(super);
|
||||
}
|
||||
} else if (super->interactType != INTERACTION_NONE) {
|
||||
SetMetaTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetFlag(this->unk_86);
|
||||
CreateDust(super);
|
||||
ModDungeonKeys(-1);
|
||||
|
||||
@@ -108,14 +108,14 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
|
||||
}
|
||||
|
||||
if (this->unk7b & 0x40) {
|
||||
tileType = (u32)GetMetaTileType(this->tilePos - 1, super->collisionLayer);
|
||||
tileType = (u32)GetTileType(this->tilePos - 1, super->collisionLayer);
|
||||
} else {
|
||||
tileType = (u32)GetMetaTileType(this->tilePos + 1, super->collisionLayer);
|
||||
tileType = (u32)GetTileType(this->tilePos + 1, super->collisionLayer);
|
||||
}
|
||||
|
||||
switch (tileType) {
|
||||
case SPECIAL_META_TILE_48:
|
||||
case SPECIAL_META_TILE_49:
|
||||
case SPECIAL_TILE_48:
|
||||
case SPECIAL_TILE_49:
|
||||
super->action = 3;
|
||||
super->direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
|
||||
super->speed = 0x80;
|
||||
@@ -134,23 +134,23 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
|
||||
if (this->unk7b & 0x80) {
|
||||
this->unk7b &= ~0x80;
|
||||
if ((this->unk7b & 0x40) != 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_44, this->tilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePos + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_44, this->tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos + 1, super->collisionLayer);
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_45, this->tilePos + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_45, this->tilePos + 1, super->collisionLayer);
|
||||
}
|
||||
} else if (this->unk7b & 0x40) {
|
||||
if (xDist >= 5) {
|
||||
this->unk7b &= ~(0x40 | 0x80);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_45, this->tilePos + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_45, this->tilePos + 1, super->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
if (-xDist > 4) {
|
||||
this->unk7b |= 0x40;
|
||||
SetMetaTile(SPECIAL_META_TILE_44, this->tilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_61, this->tilePos + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_44, this->tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_61, this->tilePos + 1, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,18 +191,18 @@ void ObjectBlockingStairs_Action4(ObjectBlockingStairsEntity* this) {
|
||||
}
|
||||
|
||||
void sub_080931A4(ObjectBlockingStairsEntity* this, u32 param_2) {
|
||||
static const u16 gUnk_08122850[] = { SPECIAL_META_TILE_39, SPECIAL_META_TILE_35, SPECIAL_META_TILE_40,
|
||||
SPECIAL_META_TILE_44, SPECIAL_META_TILE_43, SPECIAL_META_TILE_45,
|
||||
SPECIAL_META_TILE_41, SPECIAL_META_TILE_38, SPECIAL_META_TILE_42 };
|
||||
static const u16 gUnk_08122862[] = { SPECIAL_META_TILE_39, SPECIAL_META_TILE_35, SPECIAL_META_TILE_40,
|
||||
SPECIAL_META_TILE_36, SPECIAL_META_TILE_34, SPECIAL_META_TILE_37,
|
||||
SPECIAL_META_TILE_41, SPECIAL_META_TILE_38, SPECIAL_META_TILE_42 };
|
||||
static const u16 gUnk_08122874[] = { SPECIAL_META_TILE_39, SPECIAL_META_TILE_35, SPECIAL_META_TILE_35,
|
||||
SPECIAL_META_TILE_36, SPECIAL_META_TILE_34, SPECIAL_META_TILE_34,
|
||||
SPECIAL_META_TILE_41, SPECIAL_META_TILE_38, SPECIAL_META_TILE_38 };
|
||||
static const u16 gUnk_08122886[] = { SPECIAL_META_TILE_35, SPECIAL_META_TILE_35, SPECIAL_META_TILE_40,
|
||||
SPECIAL_META_TILE_34, SPECIAL_META_TILE_34, SPECIAL_META_TILE_37,
|
||||
SPECIAL_META_TILE_38, SPECIAL_META_TILE_38, SPECIAL_META_TILE_42 };
|
||||
static const u16 gUnk_08122850[] = { SPECIAL_TILE_39, SPECIAL_TILE_35, SPECIAL_TILE_40,
|
||||
SPECIAL_TILE_44, SPECIAL_TILE_43, SPECIAL_TILE_45,
|
||||
SPECIAL_TILE_41, SPECIAL_TILE_38, SPECIAL_TILE_42 };
|
||||
static const u16 gUnk_08122862[] = { SPECIAL_TILE_39, SPECIAL_TILE_35, SPECIAL_TILE_40,
|
||||
SPECIAL_TILE_36, SPECIAL_TILE_34, SPECIAL_TILE_37,
|
||||
SPECIAL_TILE_41, SPECIAL_TILE_38, SPECIAL_TILE_42 };
|
||||
static const u16 gUnk_08122874[] = { SPECIAL_TILE_39, SPECIAL_TILE_35, SPECIAL_TILE_35,
|
||||
SPECIAL_TILE_36, SPECIAL_TILE_34, SPECIAL_TILE_34,
|
||||
SPECIAL_TILE_41, SPECIAL_TILE_38, SPECIAL_TILE_38 };
|
||||
static const u16 gUnk_08122886[] = { SPECIAL_TILE_35, SPECIAL_TILE_35, SPECIAL_TILE_40,
|
||||
SPECIAL_TILE_34, SPECIAL_TILE_34, SPECIAL_TILE_37,
|
||||
SPECIAL_TILE_38, SPECIAL_TILE_38, SPECIAL_TILE_42 };
|
||||
|
||||
u32 collisionLayer;
|
||||
const u16* pTileTypes;
|
||||
@@ -232,7 +232,7 @@ void sub_080931A4(ObjectBlockingStairsEntity* this, u32 param_2) {
|
||||
|
||||
for (index = 0, iVar5 = 0; index < 9; index++) {
|
||||
u32 pos = tilePos + iVar5 + index - 1;
|
||||
SetMetaTile(pTileTypes[index], pos, collisionLayer);
|
||||
SetTile(pTileTypes[index], pos, collisionLayer);
|
||||
switch (index) {
|
||||
case 2:
|
||||
iVar5 = 0x3d;
|
||||
|
||||
+12
-12
@@ -148,8 +148,8 @@ void ObjectOnPillar_Action4(ObjectOnPillarEntity* this) {
|
||||
|
||||
bool32 sub_08097008(ObjectOnPillarEntity* this) {
|
||||
Entity* effect;
|
||||
u32 tileType = GetMetaTileType(this->tilePos, super->collisionLayer);
|
||||
if (tileType != SPECIAL_META_TILE_54) {
|
||||
u32 tileType = GetTileType(this->tilePos, super->collisionLayer);
|
||||
if (tileType != SPECIAL_TILE_54) {
|
||||
switch (sub_08097074(tileType)) {
|
||||
case 1:
|
||||
super->direction = (((tileType - 0x37) & 3) << 3);
|
||||
@@ -173,8 +173,8 @@ bool32 sub_08097008(ObjectOnPillarEntity* this) {
|
||||
u32 sub_08097074(u32 tileType) {
|
||||
|
||||
static const KeyValuePair gUnk_0812327C[] = {
|
||||
{ SPECIAL_META_TILE_55, 1 }, { SPECIAL_META_TILE_56, 1 }, { SPECIAL_META_TILE_57, 1 },
|
||||
{ SPECIAL_META_TILE_58, 1 }, { META_TILE_TYPE_122, 2 }, { META_TILE_TYPE_120, 2 },
|
||||
{ SPECIAL_TILE_55, 1 }, { SPECIAL_TILE_56, 1 }, { SPECIAL_TILE_57, 1 },
|
||||
{ SPECIAL_TILE_58, 1 }, { TILE_TYPE_122, 2 }, { TILE_TYPE_120, 2 },
|
||||
};
|
||||
static const u16 gUnk_0812327CEnd = 0;
|
||||
const KeyValuePair* entry = gUnk_0812327C;
|
||||
@@ -190,8 +190,8 @@ void sub_08097098(ObjectOnPillarEntity* this) {
|
||||
u16 tileType;
|
||||
this->unk_76 = 0x20;
|
||||
EnqueueSFX(SFX_10F);
|
||||
SetMetaTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
tileType = GetMetaTileType(gUnk_080B4488[super->direction >> 3] + this->tilePos, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
tileType = GetTileType(gUnk_080B4488[super->direction >> 3] + this->tilePos, super->collisionLayer);
|
||||
if ((tileType == 0x79) || tileType == 0x77) {
|
||||
super->spriteOffsetY = 2;
|
||||
}
|
||||
@@ -199,8 +199,8 @@ void sub_08097098(ObjectOnPillarEntity* this) {
|
||||
|
||||
void sub_080970F4(ObjectOnPillarEntity* this) {
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetMetaTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_54, this->tilePos, super->collisionLayer);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_54, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
|
||||
bool32 sub_08097144(ObjectOnPillarEntity* this) {
|
||||
@@ -222,8 +222,8 @@ bool32 sub_08097194(ObjectOnPillarEntity* this) {
|
||||
if (sub_0800442E(super)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
u32 tileType = GetMetaTileTypeByEntity(super);
|
||||
if (tileType == META_TILE_TYPE_113 || tileType == META_TILE_TYPE_114 || tileType == SPECIAL_META_TILE_32) {
|
||||
u32 tileType = GetTileTypeByEntity(super);
|
||||
if (tileType == TILE_TYPE_113 || tileType == TILE_TYPE_114 || tileType == SPECIAL_TILE_32) {
|
||||
SetFlag(this->flag);
|
||||
EnqueueSFX(SFX_10B);
|
||||
sub_080971E0(this);
|
||||
@@ -253,13 +253,13 @@ void sub_080971E0(ObjectOnPillarEntity* this) {
|
||||
super->action = 4;
|
||||
super->frameIndex = 1;
|
||||
super->spritePriority.b0 = 7;
|
||||
SetMetaTile(0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
case 1:
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
if (sub_08097348(tilePos) == 0) {
|
||||
SetMetaTileType(META_TILE_TYPE_115, tilePos, super->collisionLayer);
|
||||
SetTileType(TILE_TYPE_115, tilePos, super->collisionLayer);
|
||||
}
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
|
||||
@@ -351,7 +351,7 @@ bool32 sub_0809A6F8(u32 param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
if (sub_0809A758(param_1, param_2) != 0) {
|
||||
if (gUnk_081238A0[param_3] != 0) {
|
||||
if ((param_4 & 1) != 0) {
|
||||
SetMetaTileByIndex(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6,
|
||||
SetTileByIndex(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6,
|
||||
LAYER_BOTTOM);
|
||||
} else {
|
||||
RestorePrevTileEntity((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
|
||||
@@ -23,7 +23,7 @@ void PalaceArchway_Init(Entity* this) {
|
||||
this->frameIndex = this->type2;
|
||||
this->spriteRendering.b3 = 3;
|
||||
this->spritePriority.b0 = 7;
|
||||
SetMetaTile(SPECIAL_META_TILE_105, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_105, COORD_TO_TILE(this), this->collisionLayer);
|
||||
}
|
||||
|
||||
void PalaceArchway_Action1(Entity* this) {
|
||||
|
||||
+3
-3
@@ -42,7 +42,7 @@ void Paper_Type0(Entity* this) {
|
||||
}
|
||||
this->spriteSettings.draw = 0;
|
||||
}
|
||||
SetMetaTile(SPECIAL_META_TILE_81, COORD_TO_TILE(this), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_81, COORD_TO_TILE(this), LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void Paper_Type1(Entity* this) {
|
||||
@@ -62,8 +62,8 @@ void Paper_Type2(Entity* this) {
|
||||
this->action = 1;
|
||||
this->y.HALF.HI++;
|
||||
this->spriteOffsetY = -1;
|
||||
SetMetaTile(SPECIAL_META_TILE_81, COORD_TO_TILE(this) - 1, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_81, COORD_TO_TILE(this), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_81, COORD_TO_TILE(this) - 1, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_81, COORD_TO_TILE(this), LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void Paper_Action1(Entity* this) {
|
||||
|
||||
@@ -52,7 +52,7 @@ void PlayerClone_Init(PlayerCloneEntity* this) {
|
||||
super->y.HALF.HI = (super->y.HALF.HI & 0xfff0) | 8;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
InitializeAnimation(super, 8);
|
||||
SetMetaTile(SPECIAL_META_TILE_22, this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_22, this->tilePos, super->collisionLayer);
|
||||
SoundReq(SFX_112);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void PlayerClone_Action1(PlayerCloneEntity* this) {
|
||||
if ((this->unk78 != 0) && (this->unk7a != 0)) {
|
||||
((PlayerCloneEntity*)gPlayerClones[super->type])->unk70 = 1;
|
||||
}
|
||||
CloneTile(META_TILE_TYPE_789, this->tilePos, super->collisionLayer);
|
||||
CloneTile(TILE_TYPE_789, this->tilePos, super->collisionLayer);
|
||||
super->child = sub_08077CF8(1, super->type + 1, 0, ((GenericEntity*)gPlayerState.item)->field_0x68.HALF.LO);
|
||||
if (super->child != NULL) {
|
||||
super->child->parent = super;
|
||||
@@ -87,7 +87,7 @@ void PlayerClone_Action1(PlayerCloneEntity* this) {
|
||||
sub_0806FDA0(super);
|
||||
PlayerClone_Action2(this);
|
||||
} else if (gPlayerState.chargeState.action != 4) {
|
||||
CloneTile(META_TILE_TYPE_789, this->tilePos, super->collisionLayer);
|
||||
CloneTile(TILE_TYPE_789, this->tilePos, super->collisionLayer);
|
||||
gPlayerClones[super->type] = NULL;
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
@@ -191,8 +191,8 @@ void sub_08084CAC(PlayerCloneEntity* this) {
|
||||
|
||||
if (((PlayerCloneEntity*)gPlayerClones[super->type])->unk70 == 0) {
|
||||
ptr = &gUnk_080B4468[super->animationState & 6];
|
||||
if (GetVvvForMetaTileType(
|
||||
GetMetaTileType(COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]), super->collisionLayer)) == VVV_114) {
|
||||
if (GetVvvForTileType(
|
||||
GetTileType(COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]), super->collisionLayer)) == VVV_114) {
|
||||
((PlayerCloneEntity*)gPlayerClones[0])->unk6c |= (1 << super->type);
|
||||
} else {
|
||||
((PlayerCloneEntity*)gPlayerClones[0])->unk6c &= ~(1 << super->type);
|
||||
|
||||
+21
-21
@@ -79,12 +79,12 @@ void Pot_Init(PotEntity* this) {
|
||||
ResolveCollisionLayer(super);
|
||||
}
|
||||
|
||||
this->unk_70 = GetMetaTileIndex(COORD_TO_TILE(super), super->collisionLayer);
|
||||
if (this->unk_70 == SPECIAL_META_TILE_0) {
|
||||
this->unk_70 = GetTileIndex(COORD_TO_TILE(super), super->collisionLayer);
|
||||
if (this->unk_70 == SPECIAL_TILE_0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
SetMetaTile(SPECIAL_META_TILE_0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
InitializeAnimation(super, 5);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ void Pot_Action1(PotEntity* this) {
|
||||
super->subAction = 0;
|
||||
break;
|
||||
case 0x1D:
|
||||
SetMetaTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
super->action = 5;
|
||||
super->zVelocity = Q_16_16(2.625);
|
||||
super->spriteOffsetY = 0;
|
||||
@@ -107,33 +107,33 @@ void Pot_Action1(PotEntity* this) {
|
||||
Pot_Action5(this);
|
||||
break;
|
||||
default:
|
||||
tileType = GetMetaTileTypeByEntity(super);
|
||||
tileType = GetTileTypeByEntity(super);
|
||||
if (tileType != 0x4000) {
|
||||
switch (tileType) {
|
||||
case SPECIAL_META_TILE_4:
|
||||
case SPECIAL_META_TILE_3:
|
||||
case SPECIAL_META_TILE_2:
|
||||
case SPECIAL_META_TILE_1:
|
||||
super->direction = (tileType - SPECIAL_META_TILE_1) * 8;
|
||||
case SPECIAL_TILE_4:
|
||||
case SPECIAL_TILE_3:
|
||||
case SPECIAL_TILE_2:
|
||||
case SPECIAL_TILE_1:
|
||||
super->direction = (tileType - SPECIAL_TILE_1) * 8;
|
||||
super->timer = 32;
|
||||
super->action = 4;
|
||||
if (gPlayerState.flags & PL_MINISH) {
|
||||
super->speed >>= 1;
|
||||
super->timer = 64;
|
||||
}
|
||||
SetMetaTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
EnqueueSFX(SFX_10F);
|
||||
break;
|
||||
case SPECIAL_META_TILE_103:
|
||||
SetMetaTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
case SPECIAL_TILE_103:
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
default:
|
||||
if (GetVvvAtEntity(super) == VVV_13) {
|
||||
CreateFx(super, FX_FALL_DOWN, 0);
|
||||
} else if (tileType == SPECIAL_META_TILE_5) {
|
||||
} else if (tileType == SPECIAL_TILE_5) {
|
||||
gPlayerState.lastSwordMove = SWORD_MOVE_BREAK_POT;
|
||||
SetMetaTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
BreakPot(this, NULL);
|
||||
break;
|
||||
@@ -159,7 +159,7 @@ void sub_08082510(PotEntity* this) {
|
||||
super->hitType = 1;
|
||||
super->collisionMask = gPlayerEntity.base.collisionMask;
|
||||
super->spriteOffsetY = 0;
|
||||
SetMetaTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
super->subAction++;
|
||||
}
|
||||
|
||||
@@ -223,15 +223,15 @@ void Pot_Action4(PotEntity* this) {
|
||||
super->speed <<= 1;
|
||||
}
|
||||
|
||||
this->unk_70 = GetMetaTileIndex(COORD_TO_TILE(super), super->collisionLayer);
|
||||
tileType = GetMetaTileTypeByEntity(super);
|
||||
this->unk_70 = GetTileIndex(COORD_TO_TILE(super), super->collisionLayer);
|
||||
tileType = GetTileTypeByEntity(super);
|
||||
switch (tileType) {
|
||||
case 0x71:
|
||||
case 0x72:
|
||||
BreakPot(this, NULL);
|
||||
break;
|
||||
default:
|
||||
SetMetaTile(SPECIAL_META_TILE_0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
RegisterCarryEntity(super);
|
||||
break;
|
||||
}
|
||||
@@ -254,7 +254,7 @@ void sub_0808270C(PotEntity* this) {
|
||||
if ((gPlayerState.gustJarState & 0xF) != 0x1 || (super->contactFlags & 0x7F) != 0x13) {
|
||||
super->spriteOffsetX = 0;
|
||||
super->action = 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_0, COORD_TO_TILE(super), super->collisionLayer);
|
||||
} else {
|
||||
sub_0806F4E8(super);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void sub_08082778(PotEntity* this) {
|
||||
super->timer = 1;
|
||||
super->spriteOffsetX = 0;
|
||||
super->spriteOffsetY = -2;
|
||||
SetMetaTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
if ((gPlayerState.gustJarState & 0xF) != 0x1 || (super->contactFlags & 0x7F) != 0x13) {
|
||||
|
||||
@@ -60,7 +60,7 @@ void PullableMushroom_Init(PullableMushroomEntity* this) {
|
||||
super->spritePriority.b0 = 4;
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD224;
|
||||
super->carryFlags = 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
super->health = 1;
|
||||
super->collisionFlags = 7;
|
||||
super->hitType = 0x6e;
|
||||
|
||||
@@ -149,20 +149,20 @@ void PushableFurniture_Action1(PushableFurnitureEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0808FB68(PushableFurnitureEntity* this) {
|
||||
u32 tileIndex = GetMetaTileIndex(this->unk_70, super->collisionLayer);
|
||||
u32 tileIndex = GetTileIndex(this->unk_70, super->collisionLayer);
|
||||
switch (tileIndex) {
|
||||
case SPECIAL_META_TILE_48:
|
||||
case SPECIAL_META_TILE_49:
|
||||
case SPECIAL_TILE_48:
|
||||
case SPECIAL_TILE_49:
|
||||
super->action = 2;
|
||||
super->direction = (((tileIndex - 0x30) & 1) << 4) | 8;
|
||||
SetPlayerControl(CONTROL_1);
|
||||
sub_0808FD44(this, 0);
|
||||
break;
|
||||
default:
|
||||
tileIndex = GetMetaTileIndex(this->unk_72, super->collisionLayer);
|
||||
tileIndex = GetTileIndex(this->unk_72, super->collisionLayer);
|
||||
switch (tileIndex) {
|
||||
case SPECIAL_META_TILE_48:
|
||||
case SPECIAL_META_TILE_49:
|
||||
case SPECIAL_TILE_48:
|
||||
case SPECIAL_TILE_49:
|
||||
super->action = 2;
|
||||
super->direction = (((tileIndex - 0x30) & 1) << 4) | 8;
|
||||
SetPlayerControl(CONTROL_1);
|
||||
@@ -175,8 +175,8 @@ void sub_0808FB68(PushableFurnitureEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0808FBFC(PushableFurnitureEntity* this) {
|
||||
u32 tileIndex = GetMetaTileIndex(this->unk_7c, super->collisionLayer);
|
||||
if (tileIndex != SPECIAL_META_TILE_74) {
|
||||
u32 tileIndex = GetTileIndex(this->unk_7c, super->collisionLayer);
|
||||
if (tileIndex != SPECIAL_TILE_74) {
|
||||
super->action = 2;
|
||||
super->direction = ((tileIndex - 0x4bU) & 3) << 3;
|
||||
SetPlayerControl(CONTROL_1);
|
||||
@@ -283,38 +283,38 @@ void sub_0808FD44(PushableFurnitureEntity* this, u32 param_2) {
|
||||
}
|
||||
EnqueueSFX(SFX_10F);
|
||||
sub_08090254(this);
|
||||
GetMetaTileIndex(tmp + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
GetTileIndex(tmp + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0808FDE8(PushableFurnitureEntity* this) {
|
||||
u32 uVar1;
|
||||
s32 iVar2;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
metaTilePos = (u32)this->unk_70;
|
||||
uVar1 = GetCollisionDataAtMetaTilePos(metaTilePos - 1, LAYER_BOTTOM);
|
||||
iVar2 = GetMetaTileIndex(metaTilePos, LAYER_BOTTOM);
|
||||
if (iVar2 == SPECIAL_META_TILE_46) {
|
||||
tilePos = (u32)this->unk_70;
|
||||
uVar1 = GetCollisionDataAtTilePos(tilePos - 1, LAYER_BOTTOM);
|
||||
iVar2 = GetTileIndex(tilePos, LAYER_BOTTOM);
|
||||
if (iVar2 == SPECIAL_TILE_46) {
|
||||
if ((((uVar1 & 0xf0) != 0) && ((uVar1 & 0xf0) != 0x50)) || ((uVar1 & 5) == 0)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_44, metaTilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_44, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
} else {
|
||||
iVar2 = GetCollisionDataAtMetaTilePos(metaTilePos, LAYER_BOTTOM);
|
||||
iVar2 = GetCollisionDataAtTilePos(tilePos, LAYER_BOTTOM);
|
||||
if ((iVar2 == 5) && ((((uVar1 & 0xf0) == 0 || ((uVar1 & 0xf0) == 0x50)) && ((uVar1 & 5) != 0)))) {
|
||||
SetMetaTile(SPECIAL_META_TILE_46, metaTilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_46, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
metaTilePos = (u32)this->unk_72;
|
||||
uVar1 = GetCollisionDataAtMetaTilePos(metaTilePos + 1, LAYER_BOTTOM);
|
||||
iVar2 = GetMetaTileIndex(metaTilePos, LAYER_BOTTOM);
|
||||
if (iVar2 == SPECIAL_META_TILE_47) {
|
||||
tilePos = (u32)this->unk_72;
|
||||
uVar1 = GetCollisionDataAtTilePos(tilePos + 1, LAYER_BOTTOM);
|
||||
iVar2 = GetTileIndex(tilePos, LAYER_BOTTOM);
|
||||
if (iVar2 == SPECIAL_TILE_47) {
|
||||
if ((((uVar1 & 0xf0) != 0) && ((uVar1 & 0xf0) != 0x50)) || ((uVar1 & 10) == 0)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_45, metaTilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_45, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
} else {
|
||||
iVar2 = GetCollisionDataAtMetaTilePos(metaTilePos, LAYER_BOTTOM);
|
||||
iVar2 = GetCollisionDataAtTilePos(tilePos, LAYER_BOTTOM);
|
||||
if (((iVar2 == 10) && (((uVar1 & 0xf0) == 0 || ((uVar1 & 0xf0) == 0x50)))) && ((uVar1 & 10) != 0)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_47, metaTilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_47, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,24 +361,24 @@ void sub_0808FF50(PushableFurnitureEntity* this) {
|
||||
switch (this->unk_80) {
|
||||
case 0:
|
||||
this->unk_70 = tmp;
|
||||
this->unk_74 = GetMetaTileIndex(this->unk_70, LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_74, tmp, LAYER_BOTTOM);
|
||||
this->unk_74 = GetTileIndex(this->unk_70, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_74, tmp, LAYER_BOTTOM);
|
||||
break;
|
||||
case 1:
|
||||
if ((tmp2 & 8) != 0) {
|
||||
this->unk_70 = this->unk_7c;
|
||||
this->unk_74 = GetMetaTileIndex(this->unk_70, LAYER_BOTTOM);
|
||||
SetMetaTile(gUnk_08121EE4[this->unk_81], position, LAYER_BOTTOM);
|
||||
this->unk_74 = GetTileIndex(this->unk_70, LAYER_BOTTOM);
|
||||
SetTile(gUnk_08121EE4[this->unk_81], position, LAYER_BOTTOM);
|
||||
this->unk_72 = tmp + 1;
|
||||
this->unk_76 = GetMetaTileIndex(this->unk_72, LAYER_BOTTOM);
|
||||
this->unk_76 = GetTileIndex(this->unk_72, LAYER_BOTTOM);
|
||||
sub_08090094(this, gUnk_08121EE4[this->unk_81 + 4], this->unk_72);
|
||||
sub_0809028C(this, 1);
|
||||
} else {
|
||||
this->unk_72 = this->unk_7c;
|
||||
this->unk_76 = GetMetaTileIndex(this->unk_72, LAYER_BOTTOM);
|
||||
SetMetaTile(gUnk_08121EE4[this->unk_81], position, LAYER_BOTTOM);
|
||||
this->unk_76 = GetTileIndex(this->unk_72, LAYER_BOTTOM);
|
||||
SetTile(gUnk_08121EE4[this->unk_81], position, LAYER_BOTTOM);
|
||||
this->unk_70 = tmp - 1;
|
||||
this->unk_74 = GetMetaTileIndex(this->unk_70, LAYER_BOTTOM);
|
||||
this->unk_74 = GetTileIndex(this->unk_70, LAYER_BOTTOM);
|
||||
sub_08090094(this, gUnk_08121EE4[this->unk_81 + 2], this->unk_70);
|
||||
sub_0809028C(this, 0);
|
||||
}
|
||||
@@ -392,92 +392,92 @@ void sub_08090094(PushableFurnitureEntity* this, u32 tileIndex, u32 tilePos) {
|
||||
u32 newTileIndex;
|
||||
u32 tmp2;
|
||||
|
||||
tmp1 = GetCollisionDataAtMetaTilePos(tilePos, 1);
|
||||
newTileIndex = GetMetaTileIndex(tilePos, LAYER_BOTTOM);
|
||||
tmp1 = GetCollisionDataAtTilePos(tilePos, 1);
|
||||
newTileIndex = GetTileIndex(tilePos, LAYER_BOTTOM);
|
||||
if ((newTileIndex & 0x4000) == 0) {
|
||||
newTileIndex = tileIndex;
|
||||
switch (newTileIndex) {
|
||||
case SPECIAL_META_TILE_37:
|
||||
case SPECIAL_TILE_37:
|
||||
if (tmp1 == 5) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
}
|
||||
SetMetaTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
SetTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
return;
|
||||
case SPECIAL_META_TILE_45:
|
||||
case SPECIAL_META_TILE_47:
|
||||
case SPECIAL_TILE_45:
|
||||
case SPECIAL_TILE_47:
|
||||
if (tmp1 == 5) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
}
|
||||
SetMetaTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
SetTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
return;
|
||||
case SPECIAL_META_TILE_36:
|
||||
case SPECIAL_META_TILE_44:
|
||||
case SPECIAL_META_TILE_46:
|
||||
case SPECIAL_TILE_36:
|
||||
case SPECIAL_TILE_44:
|
||||
case SPECIAL_TILE_46:
|
||||
if (tmp1 == 10) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
}
|
||||
SetMetaTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
SetTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
return;
|
||||
default:
|
||||
SetMetaTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
SetTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
return;
|
||||
}
|
||||
}
|
||||
switch (newTileIndex) {
|
||||
case SPECIAL_META_TILE_34:
|
||||
case SPECIAL_TILE_34:
|
||||
default:
|
||||
return;
|
||||
case SPECIAL_META_TILE_37:
|
||||
if (tileIndex == SPECIAL_META_TILE_36) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
case SPECIAL_TILE_37:
|
||||
if (tileIndex == SPECIAL_TILE_36) {
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
this->unk_83 |= 0x10;
|
||||
}
|
||||
if (tileIndex == SPECIAL_META_TILE_44) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
if (tileIndex == SPECIAL_TILE_44) {
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
this->unk_83 |= 0x10;
|
||||
}
|
||||
break;
|
||||
case SPECIAL_META_TILE_45:
|
||||
case SPECIAL_META_TILE_47:
|
||||
if (tileIndex == SPECIAL_META_TILE_44) {
|
||||
newTileIndex = SPECIAL_META_TILE_43;
|
||||
case SPECIAL_TILE_45:
|
||||
case SPECIAL_TILE_47:
|
||||
if (tileIndex == SPECIAL_TILE_44) {
|
||||
newTileIndex = SPECIAL_TILE_43;
|
||||
this->unk_83 |= 0x10;
|
||||
}
|
||||
if (tileIndex == SPECIAL_META_TILE_36) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
if (tileIndex == SPECIAL_TILE_36) {
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
this->unk_83 |= 0x10;
|
||||
}
|
||||
break;
|
||||
case SPECIAL_META_TILE_36:
|
||||
if (tileIndex == SPECIAL_META_TILE_37) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
case SPECIAL_TILE_36:
|
||||
if (tileIndex == SPECIAL_TILE_37) {
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
this->unk_83 |= 0x20;
|
||||
}
|
||||
if (tileIndex == SPECIAL_META_TILE_45) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
if (tileIndex == SPECIAL_TILE_45) {
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
this->unk_83 |= 0x20;
|
||||
}
|
||||
break;
|
||||
case SPECIAL_META_TILE_44:
|
||||
case SPECIAL_META_TILE_46:
|
||||
if (tileIndex == SPECIAL_META_TILE_45) {
|
||||
newTileIndex = SPECIAL_META_TILE_43;
|
||||
case SPECIAL_TILE_44:
|
||||
case SPECIAL_TILE_46:
|
||||
if (tileIndex == SPECIAL_TILE_45) {
|
||||
newTileIndex = SPECIAL_TILE_43;
|
||||
this->unk_83 |= 0x20;
|
||||
}
|
||||
if (tileIndex == SPECIAL_META_TILE_37) {
|
||||
newTileIndex = SPECIAL_META_TILE_34;
|
||||
if (tileIndex == SPECIAL_TILE_37) {
|
||||
newTileIndex = SPECIAL_TILE_34;
|
||||
this->unk_83 |= 0x20;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
SetMetaTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
SetTile(newTileIndex, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void sub_08090254(PushableFurnitureEntity* this) {
|
||||
SetMetaTileByIndex(this->unk_74, this->unk_70, super->collisionLayer);
|
||||
SetTileByIndex(this->unk_74, this->unk_70, super->collisionLayer);
|
||||
if (this->unk_80 == 1) {
|
||||
SetMetaTileByIndex(this->unk_76, this->unk_72, super->collisionLayer);
|
||||
SetTileByIndex(this->unk_76, this->unk_72, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 (GetMetaTileType(uVar2, 2)) {
|
||||
switch (GetTileType(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 (GetMetaTileType(pos - 1, 1)) {
|
||||
switch (GetTileType(pos - 1, 1)) {
|
||||
case 0x300:
|
||||
break;
|
||||
default:
|
||||
@@ -516,7 +516,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
switch (GetMetaTileType(pos - 1, 2)) {
|
||||
switch (GetTileType(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 (GetMetaTileType(pos, 2)) {
|
||||
switch (GetTileType(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 (GetMetaTileType(uVar2 + 1, 1)) {
|
||||
switch (GetTileType(uVar2 + 1, 1)) {
|
||||
case 0x300:
|
||||
break;
|
||||
default:
|
||||
@@ -557,7 +557,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
switch (GetMetaTileType(uVar2 + 1, 2)) {
|
||||
switch (GetTileType(uVar2 + 1, 2)) {
|
||||
case 0x300:
|
||||
this->unk_83 |= 8;
|
||||
break;
|
||||
@@ -573,18 +573,18 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) {
|
||||
}
|
||||
|
||||
void sub_08090480(u32 param_1, u32 tilePos) {
|
||||
SetMetaTile(gUnk_08121EF0[param_1], tilePos, LAYER_BOTTOM);
|
||||
SetTile(gUnk_08121EF0[param_1], tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void sub_08090498(PushableFurnitureEntity* this) {
|
||||
u32 tmp = this->unk_70 - 0x80;
|
||||
RestorePrevTileEntity(tmp, 1);
|
||||
if (((this->unk_83 & 1) != 0) && (GetMetaTileType(tmp, 2) == 0x306)) {
|
||||
if (((this->unk_83 & 1) != 0) && (GetTileType(tmp, 2) == 0x306)) {
|
||||
SetCollisionData(0x62, tmp, 1);
|
||||
}
|
||||
tmp = this->unk_72 - 0x80;
|
||||
RestorePrevTileEntity(tmp, 1);
|
||||
if (((this->unk_83 & 2) != 0) && (GetMetaTileType(tmp, 2) == 0x308)) {
|
||||
if (((this->unk_83 & 2) != 0) && (GetTileType(tmp, 2) == 0x308)) {
|
||||
SetCollisionData(99, tmp, 1);
|
||||
}
|
||||
}
|
||||
@@ -618,12 +618,12 @@ void (*const PushableFurniture_Actions[])(PushableFurnitureEntity*) = {
|
||||
PushableFurniture_Action2,
|
||||
};
|
||||
const u16 gUnk_08121EE4[] = {
|
||||
SPECIAL_META_TILE_43, SPECIAL_META_TILE_34, SPECIAL_META_TILE_44,
|
||||
SPECIAL_META_TILE_36, SPECIAL_META_TILE_45, SPECIAL_META_TILE_37,
|
||||
SPECIAL_TILE_43, SPECIAL_TILE_34, SPECIAL_TILE_44,
|
||||
SPECIAL_TILE_36, SPECIAL_TILE_45, SPECIAL_TILE_37,
|
||||
};
|
||||
const u16 gUnk_08121EF0[] = {
|
||||
SPECIAL_META_TILE_38,
|
||||
SPECIAL_META_TILE_101,
|
||||
SPECIAL_META_TILE_102,
|
||||
SPECIAL_TILE_38,
|
||||
SPECIAL_TILE_101,
|
||||
SPECIAL_TILE_102,
|
||||
0,
|
||||
};
|
||||
|
||||
+36
-36
@@ -38,22 +38,22 @@ void PushableGrave(PushableGraveEntity* this) {
|
||||
}
|
||||
|
||||
void PushableGrave_Init(PushableGraveEntity* this) {
|
||||
u32 tilePosition;
|
||||
u32 tilePos;
|
||||
u32 tileIndex;
|
||||
|
||||
super->spriteSettings.draw = 1;
|
||||
super->frameIndex = super->type;
|
||||
super->updatePriority = 3;
|
||||
tilePosition = COORD_TO_TILE(super);
|
||||
this->unk_6a = GetMetaTileIndex(tilePosition - 0x41, super->collisionLayer);
|
||||
this->unk_6c = GetMetaTileIndex(tilePosition - 0x40, super->collisionLayer);
|
||||
this->unk_6e = GetMetaTileIndex(tilePosition - 0x3f, super->collisionLayer);
|
||||
this->unk_70 = GetMetaTileIndex(tilePosition - 1, super->collisionLayer);
|
||||
this->unk_72 = GetMetaTileIndex(tilePosition, super->collisionLayer);
|
||||
this->unk_74 = GetMetaTileIndex(tilePosition + 1, super->collisionLayer);
|
||||
this->unk_76 = GetMetaTileIndex(tilePosition + 0x3f, super->collisionLayer);
|
||||
this->unk_78 = GetMetaTileIndex(tilePosition + 0x40, super->collisionLayer);
|
||||
this->unk_7a = GetMetaTileIndex(tilePosition + 0x41, super->collisionLayer);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
this->unk_6a = GetTileIndex(tilePos - 0x41, super->collisionLayer);
|
||||
this->unk_6c = GetTileIndex(tilePos - 0x40, super->collisionLayer);
|
||||
this->unk_6e = GetTileIndex(tilePos - 0x3f, super->collisionLayer);
|
||||
this->unk_70 = GetTileIndex(tilePos - 1, super->collisionLayer);
|
||||
this->unk_72 = GetTileIndex(tilePos, super->collisionLayer);
|
||||
this->unk_74 = GetTileIndex(tilePos + 1, super->collisionLayer);
|
||||
this->unk_76 = GetTileIndex(tilePos + 0x3f, super->collisionLayer);
|
||||
this->unk_78 = GetTileIndex(tilePos + 0x40, super->collisionLayer);
|
||||
this->unk_7a = GetTileIndex(tilePos + 0x41, super->collisionLayer);
|
||||
if (sub_0809798C(this)) {
|
||||
if (super->type == 0) {
|
||||
super->y.HALF.HI -= 0x16;
|
||||
@@ -64,19 +64,19 @@ void PushableGrave_Init(PushableGraveEntity* this) {
|
||||
|
||||
} else {
|
||||
super->action = 1;
|
||||
tilePosition = COORD_TO_TILE(super);
|
||||
this->unk_68 = tilePosition;
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
this->unk_68 = tilePos;
|
||||
tileIndex = PushableGrave_Tiles[super->type2];
|
||||
if (super->type == 0) {
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD578;
|
||||
SetMetaTile(tileIndex, tilePosition - 1, super->collisionLayer);
|
||||
SetMetaTile(tileIndex, tilePosition, super->collisionLayer);
|
||||
SetTile(tileIndex, tilePos - 1, super->collisionLayer);
|
||||
SetTile(tileIndex, tilePos, super->collisionLayer);
|
||||
super->y.HALF.HI += 2;
|
||||
} else {
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD570;
|
||||
SetMetaTile(tileIndex, tilePosition, super->collisionLayer);
|
||||
SetTile(tileIndex, tilePos, super->collisionLayer);
|
||||
if (super->type2 == 2) {
|
||||
SetMultipleTiles((TileData*)gUnk_081232C0, tilePosition, super->collisionLayer);
|
||||
SetMultipleTiles((TileData*)gUnk_081232C0, tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,13 +130,13 @@ void PushableGrave_Action4(PushableGraveEntity* this) {
|
||||
}
|
||||
|
||||
void sub_080977F4(PushableGraveEntity* this) {
|
||||
u32 tilePosition;
|
||||
u32 tilePos;
|
||||
super->action = 4;
|
||||
super->spriteOffsetY = 0;
|
||||
tilePosition = COORD_TO_TILE(super);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePosition, super->collisionLayer);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer);
|
||||
if (super->type == 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, tilePosition - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos - 1, super->collisionLayer);
|
||||
}
|
||||
if (this->pushedFlag != 0) {
|
||||
SetFlag(this->pushedFlag);
|
||||
@@ -144,28 +144,28 @@ void sub_080977F4(PushableGraveEntity* this) {
|
||||
}
|
||||
|
||||
bool32 sub_0809785C(PushableGraveEntity* this) {
|
||||
u32 tilePosition;
|
||||
u32 tilePos;
|
||||
|
||||
if (super->type != 0) {
|
||||
if (super->type2 != 0) {
|
||||
if ((CheckFlags(this->pushedFlag) != 0) ||
|
||||
GetMetaTileType(this->unk_68, super->collisionLayer) == SPECIAL_META_TILE_63) {
|
||||
GetTileType(this->unk_68, super->collisionLayer) == SPECIAL_TILE_63) {
|
||||
super->action = 3;
|
||||
super->timer = 64;
|
||||
super->subtimer = 0;
|
||||
super->direction = 0;
|
||||
super->speed = 0x40;
|
||||
tilePosition = this->unk_68;
|
||||
SetMetaTileByIndex(this->unk_72, tilePosition, super->collisionLayer);
|
||||
tilePos = this->unk_68;
|
||||
SetTileByIndex(this->unk_72, tilePos, super->collisionLayer);
|
||||
if (super->type2 == 2) {
|
||||
SetMetaTileByIndex(this->unk_6a, tilePosition + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6c, tilePosition + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_6e, tilePosition + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_70, tilePosition + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_74, tilePosition + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_76, tilePosition + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_78, tilePosition + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTileByIndex(this->unk_7a, tilePosition + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_6a, tilePos + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_6c, tilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_6e, tilePos + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_70, tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_74, tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_76, tilePos + TILE_POS(-1, 1), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_78, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTileByIndex(this->unk_7a, tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
}
|
||||
SoundReq(SFX_10F);
|
||||
return TRUE;
|
||||
@@ -206,7 +206,7 @@ const u8 gUnk_081232C0[] = {
|
||||
255, 61, 64, 1, 0, 61, 64, 63, 0, 61, 64, 65, 0, 255, 255,
|
||||
};
|
||||
const u16 PushableGrave_Tiles[] = {
|
||||
SPECIAL_META_TILE_34,
|
||||
SPECIAL_META_TILE_62,
|
||||
SPECIAL_META_TILE_62,
|
||||
SPECIAL_TILE_34,
|
||||
SPECIAL_TILE_62,
|
||||
SPECIAL_TILE_62,
|
||||
};
|
||||
|
||||
+12
-12
@@ -31,7 +31,7 @@ extern const u8 PushableLever_PushedOffsets[];
|
||||
|
||||
void PushableLever_SetIdle(PushableLeverEntity*);
|
||||
bool32 PushableLever_ShouldStartPushing(PushableLeverEntity* this);
|
||||
void PushableLever_SetMetaTiles(PushableLeverEntity*);
|
||||
void PushableLever_SetTiles(PushableLeverEntity*);
|
||||
void PushableLever_CalculateSpriteOffsets(PushableLeverEntity*);
|
||||
|
||||
void PushableLever(PushableLeverEntity* this) {
|
||||
@@ -48,7 +48,7 @@ void PushableLever_Idle(PushableLeverEntity* this) {
|
||||
super->action = PUSHING;
|
||||
super->spriteOffsetX = 0;
|
||||
super->spriteOffsetY = 0;
|
||||
SetMetaTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
EnqueueSFX(SFX_16A);
|
||||
RequestPriorityDuration(super, 30);
|
||||
if (PlayerCanBeMoved()) {
|
||||
@@ -77,32 +77,32 @@ void PushableLever_Pushing(PushableLeverEntity* this) {
|
||||
void PushableLever_SetIdle(PushableLeverEntity* this) {
|
||||
super->action = IDLE;
|
||||
this->timer = 60;
|
||||
PushableLever_SetMetaTiles(this);
|
||||
PushableLever_SetTiles(this);
|
||||
}
|
||||
|
||||
void PushableLever_SetMetaTiles(PushableLeverEntity* this) {
|
||||
void PushableLever_SetTiles(PushableLeverEntity* this) {
|
||||
if (CheckFlags(this->pushedFlag) == FALSE) {
|
||||
super->type2 = 0;
|
||||
this->tilePos = COORD_TO_TILE_OFFSET(super, 0, 0x10);
|
||||
this->tileIndex = GetMetaTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_83, this->tilePos, super->collisionLayer);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_83, this->tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, 1);
|
||||
} else {
|
||||
super->type2 = 1;
|
||||
this->tilePos = COORD_TO_TILE_OFFSET(super, 0x10, 0);
|
||||
this->tileIndex = GetMetaTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_82, this->tilePos, super->collisionLayer);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_82, this->tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
}
|
||||
|
||||
bool32 PushableLever_ShouldStartPushing(PushableLeverEntity* this) {
|
||||
if (GetMetaTileIndex(this->tilePos, super->collisionLayer) == SPECIAL_META_TILE_84) {
|
||||
if (GetTileIndex(this->tilePos, super->collisionLayer) == SPECIAL_TILE_84) {
|
||||
if (--this->timer == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
PushableLever_CalculateSpriteOffsets(this);
|
||||
SetMetaTile(PushableLever_Tiles[super->type2], this->tilePos, super->collisionLayer);
|
||||
SetTile(PushableLever_Tiles[super->type2], this->tilePos, super->collisionLayer);
|
||||
} else {
|
||||
this->timer = 60;
|
||||
super->spriteOffsetX = 0;
|
||||
@@ -132,8 +132,8 @@ void (*const PushableLever_Actions[])(PushableLeverEntity*) = {
|
||||
PushableLever_Pushing,
|
||||
};
|
||||
const u16 PushableLever_Tiles[] = {
|
||||
SPECIAL_META_TILE_83,
|
||||
SPECIAL_META_TILE_82,
|
||||
SPECIAL_TILE_83,
|
||||
SPECIAL_TILE_82,
|
||||
};
|
||||
const u8 PushableLever_InitialOffsets[] = {
|
||||
0, 0, 0, 0, 255, 0, 0, 0,
|
||||
|
||||
+11
-11
@@ -41,12 +41,12 @@ void PushableRock_Action1(PushableRockEntity* this) {
|
||||
u32 tileType;
|
||||
u32 tmp;
|
||||
|
||||
tileType = GetMetaTileType(this->tilePos, super->collisionLayer);
|
||||
tileType = GetTileType(this->tilePos, super->collisionLayer);
|
||||
switch (tileType) {
|
||||
case SPECIAL_META_TILE_28:
|
||||
case SPECIAL_META_TILE_29:
|
||||
case SPECIAL_META_TILE_30:
|
||||
case SPECIAL_META_TILE_31:
|
||||
case SPECIAL_TILE_28:
|
||||
case SPECIAL_TILE_29:
|
||||
case SPECIAL_TILE_30:
|
||||
case SPECIAL_TILE_31:
|
||||
tmp = (tileType - 0x1c);
|
||||
super->animationState = tmp * 2;
|
||||
super->direction = tmp * 8;
|
||||
@@ -55,7 +55,7 @@ void PushableRock_Action1(PushableRockEntity* this) {
|
||||
} else {
|
||||
super->spriteSettings.flipX = 0;
|
||||
}
|
||||
SetMetaTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
super->action = 2;
|
||||
InitializeAnimation(super, (super->animationState >> 1) + 1);
|
||||
EnqueueSFX(SFX_10F);
|
||||
@@ -89,11 +89,11 @@ void PushableRock_Action3(PushableRockEntity* this) {
|
||||
void sub_0808A644(PushableRockEntity* this) {
|
||||
u32 vvv;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetMetaTileIndex(this->tilePos, super->collisionLayer);
|
||||
this->collisionData = GetCollisionDataAtMetaTilePos(this->tilePos, super->collisionLayer);
|
||||
vvv = GetVvvAtMetaTilePos(this->tilePos, super->collisionLayer);
|
||||
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)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_21, this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_21, this->tilePos, super->collisionLayer);
|
||||
super->action = 3;
|
||||
if (!CheckFlags(this->pushedFlag)) {
|
||||
SetFlag(this->pushedFlag);
|
||||
@@ -103,7 +103,7 @@ void sub_0808A644(PushableRockEntity* this) {
|
||||
InitializeAnimation(super, 6);
|
||||
}
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_27, this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_27, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+33
-33
@@ -30,7 +30,7 @@ extern const u16 gUnk_08120CBC[];
|
||||
extern const u16 gUnk_08120CCC[];
|
||||
extern const u16 gUnk_08120D6C[];
|
||||
|
||||
u32 sub_0808968C(u32 metaTileType);
|
||||
u32 sub_0808968C(u32 tileType);
|
||||
bool32 sub_0808965C(PushableStatueEntity*);
|
||||
void sub_08089454(PushableStatueEntity*);
|
||||
void sub_080894C8(PushableStatueEntity*);
|
||||
@@ -58,16 +58,16 @@ void PushableStatue_Init(PushableStatueEntity* this) {
|
||||
}
|
||||
|
||||
void PushableStatue_Action1(PushableStatueEntity* this) {
|
||||
u16 metaTileType;
|
||||
u16 tileType;
|
||||
Entity* obj;
|
||||
|
||||
if (sub_0800442E(super) == 0) {
|
||||
metaTileType = GetMetaTileType(this->unk_84, super->collisionLayer);
|
||||
if (metaTileType != SPECIAL_META_TILE_11) {
|
||||
switch (sub_0808968C(metaTileType)) {
|
||||
tileType = GetTileType(this->unk_84, super->collisionLayer);
|
||||
if (tileType != SPECIAL_TILE_11) {
|
||||
switch (sub_0808968C(tileType)) {
|
||||
case 1:
|
||||
super->action = 3;
|
||||
super->direction = ((metaTileType - 0xc) & 3) << 3;
|
||||
super->direction = ((tileType - 0xc) & 3) << 3;
|
||||
sub_08089538(this);
|
||||
break;
|
||||
case 0:
|
||||
@@ -78,7 +78,7 @@ void PushableStatue_Action1(PushableStatueEntity* this) {
|
||||
sub_080894FC(this);
|
||||
break;
|
||||
case 2:
|
||||
this->unk_80 = metaTileType;
|
||||
this->unk_80 = tileType;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -99,7 +99,7 @@ void PushableStatue_Action2(PushableStatueEntity* this) {
|
||||
}
|
||||
|
||||
void PushableStatue_SubAction0(PushableStatueEntity* this) {
|
||||
u16 metaTileType;
|
||||
u16 tileType;
|
||||
Entity* obj;
|
||||
u32 index;
|
||||
const s8* ptr;
|
||||
@@ -110,11 +110,11 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) {
|
||||
ptr = &gUnk_08120CB4[index];
|
||||
PositionRelative(super, &gPlayerEntity.base, Q_16_16(ptr[0]), Q_16_16(ptr[1]));
|
||||
}
|
||||
metaTileType = GetMetaTileType(this->unk_84, super->collisionLayer);
|
||||
if (metaTileType != SPECIAL_META_TILE_11) {
|
||||
switch (sub_0808968C(metaTileType)) {
|
||||
tileType = GetTileType(this->unk_84, super->collisionLayer);
|
||||
if (tileType != SPECIAL_TILE_11) {
|
||||
switch (sub_0808968C(tileType)) {
|
||||
case 1:
|
||||
super->direction = DirectionFromAnimationState((metaTileType - 0xc) & 3);
|
||||
super->direction = DirectionFromAnimationState((tileType - 0xc) & 3);
|
||||
sub_08089538(this);
|
||||
break;
|
||||
case 0:
|
||||
@@ -125,7 +125,7 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) {
|
||||
sub_080894FC(this);
|
||||
return;
|
||||
case 2:
|
||||
this->unk_80 = metaTileType;
|
||||
this->unk_80 = tileType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -157,17 +157,17 @@ void PushableStatue_Action4(PushableStatueEntity* this) {
|
||||
} else {
|
||||
super->spriteSettings.draw = 1;
|
||||
super->action = 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_11, this->unk_84, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_11, this->unk_84, super->collisionLayer);
|
||||
sub_080894C8(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08089454(PushableStatueEntity* this) {
|
||||
this->unk_84 = COORD_TO_TILE(super);
|
||||
this->unk_80 = GetMetaTileIndex(this->unk_84, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_11, this->unk_84, super->collisionLayer);
|
||||
if (super->collisionLayer == 2 && GetMetaTileType(this->unk_84, 1) == 0x310) {
|
||||
SetMetaTile(SPECIAL_META_TILE_11, this->unk_84, LAYER_BOTTOM);
|
||||
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) {
|
||||
SetTile(SPECIAL_TILE_11, this->unk_84, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,15 +193,15 @@ void sub_080894FC(PushableStatueEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08089538(PushableStatueEntity* this) {
|
||||
u16 metaTileType;
|
||||
u16 tileType;
|
||||
this->unk_86 = 0x20;
|
||||
EnqueueSFX(SFX_10F);
|
||||
SetMetaTile(this->unk_80, this->unk_84, super->collisionLayer);
|
||||
if ((super->collisionLayer == 2) && (GetMetaTileType(this->unk_84, LAYER_BOTTOM) == SPECIAL_META_TILE_11)) {
|
||||
CloneTile(META_TILE_TYPE_784, this->unk_84, 1);
|
||||
SetTile(this->unk_80, this->unk_84, super->collisionLayer);
|
||||
if ((super->collisionLayer == 2) && (GetTileType(this->unk_84, LAYER_BOTTOM) == SPECIAL_TILE_11)) {
|
||||
CloneTile(TILE_TYPE_784, this->unk_84, 1);
|
||||
}
|
||||
metaTileType = GetMetaTileType(this->unk_84 + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
if ((metaTileType == META_TILE_TYPE_121) || (metaTileType == META_TILE_TYPE_119)) {
|
||||
tileType = GetTileType(this->unk_84 + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
if ((tileType == TILE_TYPE_121) || (tileType == TILE_TYPE_119)) {
|
||||
super->spriteOffsetY = -2;
|
||||
}
|
||||
}
|
||||
@@ -239,11 +239,11 @@ bool32 sub_0808965C(PushableStatueEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_0808968C(u32 metaTileType) {
|
||||
u32 sub_0808968C(u32 tileType) {
|
||||
const u16* it;
|
||||
|
||||
for (it = gUnk_08120D6C; *it != 0; it += 2) {
|
||||
if (*it == metaTileType) {
|
||||
if (*it == tileType) {
|
||||
return it[1];
|
||||
}
|
||||
}
|
||||
@@ -264,7 +264,7 @@ bool32 sub_080896B0(void) {
|
||||
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 = GetVvvAtMetaTilePos(uVar4, gPlayerEntity.base.collisionLayer);
|
||||
vvv = GetVvvAtTilePos(uVar4, gPlayerEntity.base.collisionLayer);
|
||||
if ((vvv - 0x26 > 1) && (vvv != VVV_41)) {
|
||||
mapLayer = GetLayerByIndex(gPlayerEntity.base.collisionLayer);
|
||||
iVar2 = (uVar4 * 0x10000) >> 0x10;
|
||||
@@ -297,17 +297,17 @@ const u16 gUnk_08120CCC[] = {
|
||||
78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81,
|
||||
};
|
||||
const u16 gUnk_08120D6C[] = {
|
||||
SPECIAL_META_TILE_12,
|
||||
SPECIAL_TILE_12,
|
||||
1,
|
||||
SPECIAL_META_TILE_13,
|
||||
SPECIAL_TILE_13,
|
||||
1,
|
||||
SPECIAL_META_TILE_14,
|
||||
SPECIAL_TILE_14,
|
||||
1,
|
||||
SPECIAL_META_TILE_15,
|
||||
SPECIAL_TILE_15,
|
||||
1,
|
||||
META_TILE_TYPE_122,
|
||||
TILE_TYPE_122,
|
||||
2,
|
||||
META_TILE_TYPE_120,
|
||||
TILE_TYPE_120,
|
||||
2,
|
||||
0,
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ void Railtrack_Action3(RailtrackEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
static const u16 gUnk_081205E0[] = { SPECIAL_META_TILE_24, SPECIAL_META_TILE_25 };
|
||||
static const u16 gUnk_081205E0[] = { SPECIAL_TILE_24, SPECIAL_TILE_25 };
|
||||
|
||||
void sub_08085394(RailtrackEntity* this) {
|
||||
u32 specialTile;
|
||||
@@ -141,25 +141,25 @@ void sub_08085394(RailtrackEntity* this) {
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
|
||||
this->unk_74 = *(layerData - offsetset);
|
||||
SetMetaTile(specialTile, tilePos - offsetset, super->collisionLayer);
|
||||
SetTile(specialTile, tilePos - offsetset, super->collisionLayer);
|
||||
|
||||
this->unk_76 = layerData[0x0];
|
||||
SetMetaTile(specialTile, tilePos, super->collisionLayer);
|
||||
SetTile(specialTile, tilePos, super->collisionLayer);
|
||||
|
||||
this->unk_78 = layerData[offsetset];
|
||||
SetMetaTile(specialTile, tilePos + offsetset, super->collisionLayer);
|
||||
SetTile(specialTile, tilePos + offsetset, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0808543C(RailtrackEntity* this) {
|
||||
s8* cVar1;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
s8 offset;
|
||||
|
||||
offset = gUnk_080B4488[super->animationState / 2][0];
|
||||
metaTilePos = COORD_TO_TILE(super);
|
||||
SetMetaTile(this->unk_74, metaTilePos - offset, super->collisionLayer);
|
||||
SetMetaTile(this->unk_76, metaTilePos, super->collisionLayer);
|
||||
SetMetaTile(this->unk_78, metaTilePos + offset, super->collisionLayer);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
SetTile(this->unk_74, tilePos - offset, super->collisionLayer);
|
||||
SetTile(this->unk_76, tilePos, super->collisionLayer);
|
||||
SetTile(this->unk_78, tilePos + offset, super->collisionLayer);
|
||||
}
|
||||
|
||||
u32 sub_080854A8(RailtrackEntity* this) {
|
||||
|
||||
@@ -31,7 +31,7 @@ void RotatingTrapdoor_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
x = 0;
|
||||
y = 0;
|
||||
switch (GetMetaTileTypeByEntity(this)) {
|
||||
switch (GetTileTypeByEntity(this)) {
|
||||
case 0x343:
|
||||
x = 0x10;
|
||||
case 0x344:
|
||||
|
||||
+16
-16
@@ -85,8 +85,8 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) {
|
||||
}
|
||||
} else {
|
||||
if (!sub_0800442E(super)) {
|
||||
tileType = GetMetaTileType(this->tilePos, super->collisionLayer);
|
||||
if (tileType != SPECIAL_META_TILE_90) {
|
||||
tileType = GetTileType(this->tilePos, super->collisionLayer);
|
||||
if (tileType != SPECIAL_TILE_90) {
|
||||
switch (sub_08099618(tileType)) {
|
||||
case 1:
|
||||
super->action = 2;
|
||||
@@ -100,7 +100,7 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) {
|
||||
if (obj != NULL) {
|
||||
CopyPosition(super, obj);
|
||||
}
|
||||
SetMetaTile(this->unk_6c, this->tilePos, super->collisionLayer);
|
||||
SetTile(this->unk_6c, this->tilePos, super->collisionLayer);
|
||||
DeleteEntity(super);
|
||||
break;
|
||||
|
||||
@@ -159,7 +159,7 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
if (super->timer == 0x30) {
|
||||
SetMetaTile(this->unk_6c, this->tilePos, super->collisionLayer);
|
||||
SetTile(this->unk_6c, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
SetAffineInfo(super, 0x100, (0x3c - super->timer) * 0x20 + 0x100, 0);
|
||||
if ((super->timer & 1) != 0) {
|
||||
@@ -177,19 +177,19 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) {
|
||||
|
||||
void sub_08099468(SmallIceBlockEntity* this) {
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->unk_6c = GetMetaTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_90, this->tilePos, super->collisionLayer);
|
||||
this->unk_6c = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_90, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_080994B8(SmallIceBlockEntity* this) {
|
||||
u16 tileType;
|
||||
|
||||
EnqueueSFX(SFX_ICE_BLOCK_SLIDE);
|
||||
SetMetaTile(this->unk_6c, this->tilePos, super->collisionLayer);
|
||||
if ((super->collisionLayer == 2) && (GetMetaTileType(this->tilePos, 1) == SPECIAL_META_TILE_90)) {
|
||||
CloneTile(META_TILE_TYPE_784, this->tilePos, 1);
|
||||
SetTile(this->unk_6c, this->tilePos, super->collisionLayer);
|
||||
if ((super->collisionLayer == 2) && (GetTileType(this->tilePos, 1) == SPECIAL_TILE_90)) {
|
||||
CloneTile(TILE_TYPE_784, this->tilePos, 1);
|
||||
}
|
||||
tileType = GetMetaTileType(this->tilePos + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
tileType = GetTileType(this->tilePos + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
if (tileType == 0x79 || tileType == 0x77) {
|
||||
super->spriteOffsetY = -2;
|
||||
}
|
||||
@@ -326,17 +326,17 @@ const u16 gUnk_08123748[] = {
|
||||
277,
|
||||
};
|
||||
const u16 gUnk_08123750[] = {
|
||||
SPECIAL_META_TILE_91,
|
||||
SPECIAL_TILE_91,
|
||||
1,
|
||||
SPECIAL_META_TILE_92,
|
||||
SPECIAL_TILE_92,
|
||||
1,
|
||||
SPECIAL_META_TILE_93,
|
||||
SPECIAL_TILE_93,
|
||||
1,
|
||||
SPECIAL_META_TILE_94,
|
||||
SPECIAL_TILE_94,
|
||||
1,
|
||||
META_TILE_TYPE_122,
|
||||
TILE_TYPE_122,
|
||||
2,
|
||||
META_TILE_TYPE_120,
|
||||
TILE_TYPE_120,
|
||||
2,
|
||||
0,
|
||||
};
|
||||
|
||||
@@ -63,22 +63,22 @@ void sub_080878CC(Entity* this) {
|
||||
s32 itX;
|
||||
s32 itY;
|
||||
u32 layer;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
x = this->x.HALF.HI;
|
||||
y = this->y.HALF.HI;
|
||||
layer = this->collisionLayer;
|
||||
for (itX = -0x10; itX < 0x11; itX += 0x10) {
|
||||
for (itY = -0x10; itY < 0x11; itY += 0x10) {
|
||||
metaTilePos = TILE((u32)x + itX, (u32)y + itY);
|
||||
if (GetVvvAtMetaTilePos(metaTilePos, (u8)layer) == VVV_46) {
|
||||
switch (GetMetaTileType(metaTilePos, layer)) {
|
||||
tilePos = TILE((u32)x + itX, (u32)y + itY);
|
||||
if (GetVvvAtTilePos(tilePos, (u8)layer) == VVV_46) {
|
||||
switch (GetTileType(tilePos, layer)) {
|
||||
case 0x368:
|
||||
case 0x367:
|
||||
DoTileInteraction(this, 3, x + itX, y + itY);
|
||||
break;
|
||||
default:
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, layer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, layer);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -24,20 +24,20 @@ void StoneTablet(Entity* this) {
|
||||
void StoneTablet_Init(Entity* this) {
|
||||
// TODO recreate as TileData[]
|
||||
static const u16 gUnk_081232EC[] = {
|
||||
SPECIAL_META_TILE_34, -2, SPECIAL_META_TILE_34, -1, SPECIAL_META_TILE_34, 0, SPECIAL_META_TILE_34, 1, 0xffff,
|
||||
SPECIAL_TILE_34, -2, SPECIAL_TILE_34, -1, SPECIAL_TILE_34, 0, SPECIAL_TILE_34, 1, 0xffff,
|
||||
};
|
||||
static const u16 gUnk_081232FE[] = {
|
||||
SPECIAL_META_TILE_101,
|
||||
SPECIAL_TILE_101,
|
||||
-65,
|
||||
SPECIAL_META_TILE_34,
|
||||
SPECIAL_TILE_34,
|
||||
-64,
|
||||
SPECIAL_META_TILE_102,
|
||||
SPECIAL_TILE_102,
|
||||
-63,
|
||||
SPECIAL_META_TILE_41,
|
||||
SPECIAL_TILE_41,
|
||||
-1,
|
||||
SPECIAL_META_TILE_38,
|
||||
SPECIAL_TILE_38,
|
||||
0,
|
||||
SPECIAL_META_TILE_42,
|
||||
SPECIAL_TILE_42,
|
||||
1,
|
||||
0xffff,
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ static u32 sub_0809E9A0(void) {
|
||||
vvv = VVV_0;
|
||||
} else {
|
||||
ptr = &gUnk_080B4468[gPlayerEntity.base.animationState & 6];
|
||||
vvv = GetVvvAtMetaTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), 1);
|
||||
vvv = GetVvvAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), 1);
|
||||
}
|
||||
|
||||
return vvv;
|
||||
|
||||
@@ -30,8 +30,8 @@ void TreeThorns(Entity* this) {
|
||||
this->collisionMask = 1;
|
||||
this->hitbox = (Hitbox*)&gHitbox_1;
|
||||
tilePos = COORD_TO_TILE(this);
|
||||
SetMetaTile(SPECIAL_META_TILE_102, tilePos - 1, *layer);
|
||||
SetMetaTile(SPECIAL_META_TILE_101, tilePos, *layer);
|
||||
SetTile(SPECIAL_TILE_102, tilePos - 1, *layer);
|
||||
SetTile(SPECIAL_TILE_101, tilePos, *layer);
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
ent = CreateObject(TREE_THORNS, 1, 0);
|
||||
if (ent != NULL) {
|
||||
|
||||
@@ -39,7 +39,7 @@ void UnusedSkull_Init(UnusedSkullEntity* this) {
|
||||
super->hurtType = 0x47;
|
||||
super->collisionMask = 2;
|
||||
super->hitbox = (Hitbox*)&gHitbox_4;
|
||||
SetMetaTile(SPECIAL_META_TILE_80, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_80, COORD_TO_TILE(super), super->collisionLayer);
|
||||
if (super->type == 1 || CheckFlags(this->unk_86)) {
|
||||
super->action = 3;
|
||||
SetFlag(this->unk_86);
|
||||
|
||||
@@ -77,7 +77,7 @@ void WaterfallOpening(Entity* this) {
|
||||
case 2:
|
||||
if ((this->subAction == 0)) {
|
||||
this->subAction = 1;
|
||||
SetMetaTileType(META_TILE_TYPE_57, COORD_TO_TILE(this), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_57, COORD_TO_TILE(this), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -34,12 +34,12 @@ void Well_Init(WellEntity* this) {
|
||||
super->action = 1;
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
this->unk_80 = tilePos;
|
||||
SetMetaTile(SPECIAL_META_TILE_125, this->unk_80, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_125, this->unk_80, LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void Well_Action1(WellEntity* this) {
|
||||
u32 tileIndex = GetMetaTileType(this->unk_80, LAYER_BOTTOM);
|
||||
if (tileIndex != SPECIAL_META_TILE_125) {
|
||||
u32 tileIndex = GetTileType(this->unk_80, LAYER_BOTTOM);
|
||||
if (tileIndex != SPECIAL_TILE_125) {
|
||||
PausePlayer();
|
||||
gPlayerEntity.base.x.WORD = super->x.WORD;
|
||||
gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI + 4;
|
||||
|
||||
Reference in New Issue
Block a user