document tile asm functions

This commit is contained in:
theo3
2023-12-31 17:29:08 -08:00
parent 5049daabc5
commit 37ac9cb0fb
147 changed files with 973 additions and 931 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ void AngryStatue(Entity* this) {
void AngryStatue_Init(Entity* this) {
this->action = 1;
this->hitbox = (Hitbox*)&gUnk_080FD178;
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
SetBottomTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
InitializeAnimation(this, this->type);
}
+8 -8
View File
@@ -107,12 +107,12 @@ void sub_0809CDF0(BakerOvenEntity* this) {
(((super->y.HALF.HI - gRoomControls.origin_y) >> 4 & 0x3f) << 6);
y = this->unk_80;
SetTile(0x402e, y - 0x01, super->collisionLayer);
SetTile(0x4022, y - 0x00, super->collisionLayer);
SetTile(0x4022, y + 0x01, super->collisionLayer);
SetTile(0x4026, y - 0x41, super->collisionLayer);
SetTile(0x4026, y - 0x40, super->collisionLayer);
SetTile(0x4024, y - 0x3f, super->collisionLayer);
SetTile(0x4026, y - 0x81, super->collisionLayer);
SetTile(0x4026, y - 0x80, super->collisionLayer);
SetBottomTile(0x402e, y - 0x01, super->collisionLayer);
SetBottomTile(0x4022, y - 0x00, super->collisionLayer);
SetBottomTile(0x4022, y + 0x01, super->collisionLayer);
SetBottomTile(0x4026, y - 0x41, super->collisionLayer);
SetBottomTile(0x4026, y - 0x40, super->collisionLayer);
SetBottomTile(0x4024, y - 0x3f, super->collisionLayer);
SetBottomTile(0x4026, y - 0x81, super->collisionLayer);
SetBottomTile(0x4026, y - 0x80, super->collisionLayer);
}
+5 -5
View File
@@ -257,8 +257,8 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
this->unk_70 = TILE(super->x.HALF.HI, this->unk_6c);
while (TRUE) {
this->unk_70 = TILE(super->x.HALF.HI, this->unk_6c);
SetTile(0x4017, this->unk_70, 2);
SetTile(0x4017, this->unk_70, 1);
SetBottomTile(0x4017, this->unk_70, 2);
SetBottomTile(0x4017, this->unk_70, 1);
this->unk_6c += 0x10;
if (this->unk_6c >= gRoomControls.origin_y + gRoomControls.height)
break;
@@ -307,7 +307,7 @@ void Beanstalk_Action1Type8SubAction0(BeanstalkEntity* this) {
super->spriteOrientation.flipY = 2;
this->unk_70 = COORD_TO_TILE(super);
SetTile(0x4017, this->unk_70, 1);
SetBottomTile(0x4017, this->unk_70, 1);
super->subAction = 1;
obj = CreateObjectWithParent(super, CHUCHU_BOSS_PARTICLE, 0, 0);
if (obj != NULL) {
@@ -339,12 +339,12 @@ void Beanstalk_Action1Type9(BeanstalkEntity* this) {
if (gPlayerState.floor_type == SURFACE_LADDER) {
super->spritePriority.b0 = 0;
if (sub_080B1A0C(super, 0, -0x18) != 0x4014) {
SetTile(0x4014, COORD_TO_TILE_OFFSET(super, 0, 0x18), 1);
SetBottomTile(0x4014, COORD_TO_TILE_OFFSET(super, 0, 0x18), 1);
}
} else {
super->spritePriority.b0 = 5;
if (this->unk_72 != sub_080B1A0C(super, 0, -0x18)) {
SetTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 0x18), 1);
SetBottomTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 0x18), 1);
}
}
}
+25 -25
View File
@@ -137,10 +137,10 @@ void sub_08099910(BigIceBlockEntity* this) {
switch (uVar2) {
default:
SetTile(0x4022, position - 0x41, super->collisionLayer);
SetTile(0x4022, position - 0x40, super->collisionLayer);
SetTile(0x4022, position - 1, super->collisionLayer);
SetTile(0x4022, position, super->collisionLayer);
SetBottomTile(0x4022, position - 0x41, super->collisionLayer);
SetBottomTile(0x4022, position - 0x40, super->collisionLayer);
SetBottomTile(0x4022, position - 1, super->collisionLayer);
SetBottomTile(0x4022, position, super->collisionLayer);
break;
case 1:
iVar1 = sub_080B1AE0(position - 0x41, super->collisionLayer);
@@ -148,27 +148,27 @@ void sub_08099910(BigIceBlockEntity* this) {
if (iVar1 == 0x12) {
uVar3 = 0x4079;
}
SetTile(uVar3, position - 0x41, super->collisionLayer);
SetTile(0x4022, position - 0x40, super->collisionLayer);
SetBottomTile(uVar3, position - 0x41, super->collisionLayer);
SetBottomTile(0x4022, position - 0x40, super->collisionLayer);
iVar1 = sub_080B1AE0(position - 0x3f, super->collisionLayer);
uVar3 = 0x4025;
if (iVar1 == 0x12) {
uVar3 = 0x407b;
}
SetTile(uVar3, position - 0x3f, super->collisionLayer);
SetBottomTile(uVar3, position - 0x3f, super->collisionLayer);
iVar1 = sub_080B1AE0(position - 1, super->collisionLayer);
uVar3 = 0x4024;
if (iVar1 == 0x12) {
uVar3 = 0x4079;
}
SetTile(uVar3, position - 1, super->collisionLayer);
SetTile(0x4022, position, super->collisionLayer);
SetBottomTile(uVar3, position - 1, super->collisionLayer);
SetBottomTile(0x4022, position, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 1, super->collisionLayer);
uVar3 = 0x4025;
if (iVar1 == 0x12) {
uVar3 = 0x407b;
}
SetTile(uVar3, position + 1, super->collisionLayer);
SetBottomTile(uVar3, position + 1, super->collisionLayer);
return;
break;
case 2:
@@ -177,27 +177,27 @@ void sub_08099910(BigIceBlockEntity* this) {
if (iVar1 == 0x12) {
uVar3 = 0x4077;
}
SetTile(uVar3, position - 0x41, super->collisionLayer);
SetBottomTile(uVar3, position - 0x41, super->collisionLayer);
iVar1 = sub_080B1AE0(position - 0x40, super->collisionLayer);
uVar3 = 0x4023;
if (iVar1 == 0x12) {
uVar3 = 0x4077;
}
SetTile(uVar3, position - 0x40, super->collisionLayer);
SetTile(0x4022, position - 1, super->collisionLayer);
SetTile(0x4022, position, super->collisionLayer);
SetBottomTile(uVar3, position - 0x40, super->collisionLayer);
SetBottomTile(0x4022, position - 1, super->collisionLayer);
SetBottomTile(0x4022, position, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 0x3f, super->collisionLayer);
uVar3 = 0x4026;
if (iVar1 == 0x12) {
uVar3 = 0x407c;
}
SetTile(uVar3, position + 0x3f, super->collisionLayer);
SetBottomTile(uVar3, position + 0x3f, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 0x40, super->collisionLayer);
uVar3 = 0x4026;
if (iVar1 == 0x12) {
uVar3 = 0x407c;
}
SetTile(uVar3, position + 0x40, super->collisionLayer);
SetBottomTile(uVar3, position + 0x40, super->collisionLayer);
break;
case 3:
iVar1 = sub_080B1AE0(position - 0x41, super->collisionLayer);
@@ -205,50 +205,50 @@ void sub_08099910(BigIceBlockEntity* this) {
if (iVar1 == 0x12) {
uVar3 = 0x4075;
}
SetTile(uVar3, position - 0x41, super->collisionLayer);
SetBottomTile(uVar3, position - 0x41, super->collisionLayer);
iVar1 = sub_080B1AE0(position - 0x40, super->collisionLayer);
uVar3 = 0x4023;
if (iVar1 == 0x12) {
uVar3 = 0x4077;
}
SetTile(uVar3, position - 0x40, super->collisionLayer);
SetBottomTile(uVar3, position - 0x40, super->collisionLayer);
iVar1 = sub_080B1AE0(position - 0x3f, super->collisionLayer);
uVar3 = 0x4028;
if (iVar1 == 0x12) {
uVar3 = 0x4076;
}
SetTile(uVar3, position - 0x3f, super->collisionLayer);
SetBottomTile(uVar3, position - 0x3f, super->collisionLayer);
iVar1 = sub_080B1AE0(position - 1, super->collisionLayer);
uVar3 = 0x4024;
if (iVar1 == 0x12) {
uVar3 = 0x4079;
}
SetTile(uVar3, position - 1, super->collisionLayer);
SetTile(0x4022, position, super->collisionLayer);
SetBottomTile(uVar3, position - 1, super->collisionLayer);
SetBottomTile(0x4022, position, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 1, super->collisionLayer);
uVar3 = 0x4025;
if (iVar1 == 0x12) {
uVar3 = 0x407b;
}
SetTile(uVar3, position + 1, super->collisionLayer);
SetBottomTile(uVar3, position + 1, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 0x3f, super->collisionLayer);
uVar3 = 0x4029;
if (iVar1 == 0x12) {
uVar3 = 0x4078;
}
SetTile(uVar3, position + 0x3f, super->collisionLayer);
SetBottomTile(uVar3, position + 0x3f, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 0x40, super->collisionLayer);
uVar3 = 0x4026;
if (iVar1 == 0x12) {
uVar3 = 0x407c;
}
SetTile(uVar3, position + 0x40, super->collisionLayer);
SetBottomTile(uVar3, position + 0x40, super->collisionLayer);
iVar1 = sub_080B1AE0(position + 0x41, super->collisionLayer);
uVar3 = 0x402a;
if (iVar1 == 0x12) {
uVar3 = 0x407a;
}
SetTile(uVar3, position + 0x41, super->collisionLayer);
SetBottomTile(uVar3, position + 0x41, super->collisionLayer);
break;
}
}
+7 -7
View File
@@ -50,8 +50,8 @@ void BigPushableLever_Init(BigPushableLeverEntity* this) {
void BigPushableLever_Idle(BigPushableLeverEntity* this) {
if (BigPushableLever_ShouldStartPushing(this)) {
super->action = PUSHING;
SetTile(this->tileIndexUpper, this->tilePositionUpper, super->collisionLayer);
SetTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer);
SetBottomTile(this->tileIndexUpper, this->tilePositionUpper, super->collisionLayer);
SetBottomTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer);
EnqueueSFX(SFX_132);
RequestPriorityDuration(super, 30);
if (PlayerCanBeMoved()) {
@@ -90,8 +90,8 @@ void BigPushableLever_SetTiles(BigPushableLeverEntity* this) {
this->tilePositionLower = this->tilePositionUpper - 0x40;
this->tileIndexUpper = GetTileIndex(this->tilePositionUpper, super->collisionLayer);
this->tileIndexLower = GetTileIndex(this->tilePositionLower, super->collisionLayer);
SetTile(0x4057, this->tilePositionUpper, super->collisionLayer);
SetTile(0x4058, this->tilePositionLower, super->collisionLayer);
SetBottomTile(0x4057, this->tilePositionUpper, super->collisionLayer);
SetBottomTile(0x4058, this->tilePositionLower, super->collisionLayer);
InitializeAnimation(super, 1);
} else {
super->type2 = 1;
@@ -99,8 +99,8 @@ void BigPushableLever_SetTiles(BigPushableLeverEntity* this) {
this->tilePositionLower = this->tilePositionUpper - 1;
this->tileIndexUpper = GetTileIndex(this->tilePositionUpper, super->collisionLayer);
this->tileIndexLower = GetTileIndex(this->tilePositionLower, super->collisionLayer);
SetTile(0x4055, this->tilePositionUpper, super->collisionLayer);
SetTile(0x4056, this->tilePositionLower, super->collisionLayer);
SetBottomTile(0x4055, this->tilePositionUpper, super->collisionLayer);
SetBottomTile(0x4056, this->tilePositionLower, super->collisionLayer);
InitializeAnimation(super, 0);
}
}
@@ -111,7 +111,7 @@ bool32 BigPushableLever_ShouldStartPushing(BigPushableLeverEntity* this) {
return TRUE;
}
BigPushableLever_CalculateSpriteOffsets(this);
SetTile(gUnk_081236E8[super->type2], this->tilePositionLower, super->collisionLayer);
SetBottomTile(gUnk_081236E8[super->type2], this->tilePositionLower, super->collisionLayer);
} else {
this->timer = 60;
super->spriteOffsetX = 0;
+1 -1
View File
@@ -53,7 +53,7 @@ void Board_Init(BoardEntity* this) {
UpdateSpriteForCollisionLayer(super);
super->spritePriority.b0 = 6;
if (super->type == 0) {
SetTile(0x4074, this->tile - 0x40, super->collisionLayer);
SetBottomTile(0x4074, this->tile - 0x40, super->collisionLayer);
}
sub_08098BE8(this);
}
+2 -2
View File
@@ -58,7 +58,7 @@ void Bollard_Action1(BollardEntity* this) {
}
super->action = 2;
InitializeAnimation(super, 3);
SetTile(this->tileIndex, this->tile, super->collisionLayer);
SetBottomTile(this->tileIndex, this->tile, super->collisionLayer);
EnqueueSFX(SFX_1A5);
}
@@ -95,7 +95,7 @@ void sub_0808B3AC(BollardEntity* this) {
this->tile = COORD_TO_TILE(super);
this->tileIndex = GetTileIndex(this->tile, super->collisionLayer);
this->unk74 = sub_080B1B44(this->tile, super->collisionLayer);
SetTile(0x400b, this->tile, super->collisionLayer);
SetBottomTile(0x400b, this->tile, super->collisionLayer);
}
void sub_0808B41C(BollardEntity* this) {
+12 -12
View File
@@ -177,28 +177,28 @@ void sub_0808C500(BossDoorEntity* this) {
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(0x4022, this->unk_74 - 1, super->collisionLayer);
SetTile(0x4022, this->unk_74, super->collisionLayer);
SetTile(0x4022, this->unk_74 + 1, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74 - 1, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74 + 1, super->collisionLayer);
} else {
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(0x4022, this->unk_74 - 0x40, super->collisionLayer);
SetTile(0x4022, this->unk_74, super->collisionLayer);
SetTile(0x4022, this->unk_74 + 0x40, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74 - 0x40, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74 + 0x40, super->collisionLayer);
}
}
void sub_0808C5D0(BossDoorEntity* this) {
if ((this->unk_76 == 0) || (this->unk_76 == 2)) {
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);
SetBottomTile(this->unk_78, this->unk_74 - 1, super->collisionLayer);
SetBottomTile(this->unk_7a, this->unk_74, super->collisionLayer);
SetBottomTile(this->unk_7c, this->unk_74 + 1, super->collisionLayer);
} else {
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);
SetBottomTile(this->unk_78, this->unk_74 - 0x40, super->collisionLayer);
SetBottomTile(this->unk_7a, this->unk_74, super->collisionLayer);
SetBottomTile(this->unk_7c, this->unk_74 + 0x40, super->collisionLayer);
}
}
+1 -1
View File
@@ -68,7 +68,7 @@ void Bush_Init(BushEntity* this) {
super->hitbox = (Hitbox*)&gUnk_081205B4;
this->unk_72 = 0;
this->unk_70 = GetTileIndex(COORD_TO_TILE(super), super->collisionLayer);
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
InitializeAnimation(super, gUnk_08120588[super->type].unk_0);
}
+4 -4
View File
@@ -105,7 +105,7 @@ void Button_Action4(ButtonEntity* this) {
super->timer--;
if (super->subtimer != 0) {
super->subtimer = 0;
SetTile(0x4035, this->unk_74, super->collisionLayer);
SetBottomTile(0x4035, this->unk_74, super->collisionLayer);
}
if (sub_08081CB0(this)) {
super->action = 3;
@@ -230,7 +230,7 @@ void sub_08081E6C(ButtonEntity* this) {
if (tile < 0x4000)
return;
r1 = GetLayerByIndex(r5);
r1 = GetTileBuffer(r5);
r4 = (super->type == 0 ? 0x7a : 0x78);
tmp = r1->metatiles;
tmp = tmp + (r1->unkData2[r4] << 2);
@@ -239,7 +239,7 @@ void sub_08081E6C(ButtonEntity* this) {
if (sub_08081F00((u32*)tmp2, (u32*)tmp))
return;
SetTileType(r4, r6, r5);
SetTile(tile, r6, r5);
SetBottomTile(tile, r6, r5);
}
u32 sub_08081F00(u32* unk1, u32* unk2) {
@@ -279,7 +279,7 @@ bool32 sub_08081F7C(ButtonEntity* this, u32 r7) {
sub_08081F24(super);
SoundReq(SFX_BUTTON_PRESS);
if (this->unk_70 != 0xFFFF)
SetTile(this->unk_70, this->unk_74, super->collisionLayer);
SetBottomTile(this->unk_70, this->unk_74, super->collisionLayer);
return FALSE;
}
}
+20 -20
View File
@@ -43,38 +43,38 @@ void CabinFurniture_Init(CabinFurnitureEntity* this) {
super->spritePriority.b0 = 6;
uVar7 = this->tile;
uVar6 = uVar7 - 1;
SetTile(0x4022, uVar6, uVar1);
SetTile(0x4022, uVar7, uVar1);
SetTile(0x4022, uVar7 + 1, uVar1);
SetTile(0x4022, uVar7 + 0x3f, uVar1);
SetTile(0x4022, uVar7 + 0x40, uVar1);
SetTile(0x4022, uVar7 + 0x41, uVar1);
SetTile(0x403d, uVar7 - 0x41, uVar1);
SetTile(0x403d, uVar7 - 0x40, uVar1);
SetTile(0x4026, uVar7 - 0x3f, uVar1);
SetTile(0x4026, uVar7 - 0x81, uVar1);
SetTile(0x4026, uVar7 - 0x80, uVar1);
SetBottomTile(0x4022, uVar6, uVar1);
SetBottomTile(0x4022, uVar7, uVar1);
SetBottomTile(0x4022, uVar7 + 1, uVar1);
SetBottomTile(0x4022, uVar7 + 0x3f, uVar1);
SetBottomTile(0x4022, uVar7 + 0x40, uVar1);
SetBottomTile(0x4022, uVar7 + 0x41, uVar1);
SetBottomTile(0x403d, uVar7 - 0x41, uVar1);
SetBottomTile(0x403d, uVar7 - 0x40, uVar1);
SetBottomTile(0x4026, uVar7 - 0x3f, uVar1);
SetBottomTile(0x4026, uVar7 - 0x81, uVar1);
SetBottomTile(0x4026, uVar7 - 0x80, uVar1);
break;
case 1:
super->action = 1;
uVar6 = this->tile;
SetTile(0x4022, uVar6, uVar1);
SetTile(0x4022, uVar6 + 0x40, uVar1);
SetTile(0x4025, uVar6 + 0x41, uVar1);
SetBottomTile(0x4022, uVar6, uVar1);
SetBottomTile(0x4022, uVar6 + 0x40, uVar1);
SetBottomTile(0x4025, uVar6 + 0x41, uVar1);
if (CheckLocalFlag(0x4f) == 0) {
SetTile(0x402f, uVar6 + 1, uVar1);
SetBottomTile(0x402f, uVar6 + 1, uVar1);
} else {
SetTile(0x402d, uVar6 + 1, uVar1);
SetBottomTile(0x402d, uVar6 + 1, uVar1);
}
break;
case 2:
super->action = 1;
uVar7 = this->tile;
uVar6 = uVar7 - 0x41;
SetTile(0x4022, uVar6, uVar1);
SetTile(0x4022, uVar7 - 0x40, uVar1);
SetTile(0x4022, uVar7 - 1, uVar1);
SetTile(0x4022, uVar7, uVar1);
SetBottomTile(0x4022, uVar6, uVar1);
SetBottomTile(0x4022, uVar7 - 0x40, uVar1);
SetBottomTile(0x4022, uVar7 - 1, uVar1);
SetBottomTile(0x4022, uVar7, uVar1);
break;
}
}
+3 -3
View File
@@ -97,7 +97,7 @@ void CarlovObject_Type1Init(CarlovObjectEntity* this) {
if (super->timer == 0) {
super->action = 1;
super->subtimer = 120;
SetTile(0x4022, this->unk_76, super->collisionLayer);
SetBottomTile(0x4022, this->unk_76, super->collisionLayer);
} else {
super->action = 3;
super->spriteSettings.draw = 0;
@@ -111,7 +111,7 @@ void CarlovObject_Type1Action1(CarlovObjectEntity* this) {
super->action = 2;
super->timer = 7;
super->direction = 0;
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
SetBottomTile(this->unk_74, this->unk_76, super->collisionLayer);
EnqueueSFX(SFX_10B);
}
}
@@ -140,7 +140,7 @@ void CarlovObject_Type1Action4(CarlovObjectEntity* this) {
super->action = 5;
sub_08083814(super, 2);
EnqueueSFX(SFX_10B);
SetTile(0x4022, this->unk_76, super->collisionLayer);
SetBottomTile(0x4022, this->unk_76, super->collisionLayer);
}
}
+4 -4
View File
@@ -54,13 +54,13 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
if (CheckGlobalFlag(WATERBEAN_OUT)) {
if (CheckGlobalFlag(WATERBEAN_PUT) == 0) {
PositionRelative(&gPlayerEntity.base, super, 0, 0x10000);
SetTile(0x4022, 0xdc, super->collisionLayer);
SetBottomTile(0x4022, 0xdc, super->collisionLayer);
} else {
if (CheckLocalFlag(super->type2) == 0) {
InitializeAnimation(super, 10);
super->y.HALF.HI += 4;
super->action = 4;
SetTile(0x403b, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x403b, 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;
SetTile(0x4032, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4032, COORD_TO_TILE(super), super->collisionLayer);
return;
} else {
super->type2 = 0;
@@ -329,5 +329,5 @@ void sub_08096A78(CrenelBeanSproutEntity* this) {
SnapToTile(super);
super->y.HALF.HI += 4;
super->action = 3;
SetTile(0x403b, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x403b, COORD_TO_TILE(super), super->collisionLayer);
}
+20 -20
View File
@@ -98,39 +98,39 @@ void sub_0809B0B0(DoubleBookshelfEntity* this) {
case 0:
this->unk_84 = 0;
this->unk_82 = position + 2;
SetTile(0x4082, position - 1, layer);
SetTile(0x4022, position, layer);
SetTile(0x4022, position + 1, layer);
SetTile(0x4022, position + 2, layer);
SetBottomTile(0x4082, position - 1, layer);
SetBottomTile(0x4022, position, layer);
SetBottomTile(0x4022, position + 1, layer);
SetBottomTile(0x4022, position + 2, layer);
break;
case 1:
this->unk_84 = 1;
this->unk_82 = position;
SetTile(0x405f, position, layer);
SetTile(0x4022, position + 1, layer);
SetTile(0x4022, position + 2, layer);
SetTile(0x4082, position + 3, layer);
SetBottomTile(0x405f, position, layer);
SetBottomTile(0x4022, position + 1, layer);
SetBottomTile(0x4022, position + 2, layer);
SetBottomTile(0x4082, position + 3, layer);
break;
case 2:
this->unk_84 = 1;
this->unk_82 = position;
SetTile(0x4082, position + 3, layer);
SetTile(0x4022, position + 2, layer);
SetTile(0x405f, position, layer);
SetBottomTile(0x4082, position + 3, layer);
SetBottomTile(0x4022, position + 2, layer);
SetBottomTile(0x405f, position, layer);
SetFlag(((DoubleBookshelfEntity*)super->parent)->unk_86);
break;
case 3:
this->unk_84 = 0;
this->unk_82 = position + 2;
SetTile(0x4082, position - 1, layer);
SetTile(0x4022, position, layer);
SetTile(0x405f, position + 2, layer);
SetBottomTile(0x4082, position - 1, layer);
SetBottomTile(0x4022, position, layer);
SetBottomTile(0x405f, position + 2, layer);
ClearFlag(((DoubleBookshelfEntity*)super->parent)->unk_86);
break;
case 4:
SetTile(0x4022, position, layer);
SetTile(0x4022, position + 1, layer);
SetTile(0x4022, position + 2, layer);
SetBottomTile(0x4022, position, layer);
SetBottomTile(0x4022, position + 1, layer);
SetBottomTile(0x4022, position + 2, layer);
break;
}
}
@@ -157,7 +157,7 @@ void sub_0809B274(DoubleBookshelfEntity* this) {
case 1:
if (player->x.HALF.HI + 0x1c > super->x.HALF.HI) {
this->unk_84 = 2;
SetTile(0x4022, this->unk_80 + 2, 1);
SetBottomTile(0x4022, this->unk_80 + 2, 1);
sub_0809B358((DoubleBookshelfEntity*)super->child);
return;
}
@@ -182,7 +182,7 @@ void sub_0809B334(DoubleBookshelfEntity* this) {
s32 index;
u32 position = this->unk_80 - 0x81;
for (index = 2; index >= 0; index--, position++) {
SetTile(0x4026, position, 1);
SetBottomTile(0x4026, position, 1);
}
}
@@ -194,7 +194,7 @@ void sub_0809B358(DoubleBookshelfEntity* this) {
const u16* array = &gUnk_08123D68[this->unk_84];
u32 position = this->unk_80 - 0x82;
for (index = 4; index >= 0;) {
SetTile(*array, position, 1);
SetBottomTile(*array, position, 1);
index--;
position++;
array += 2;
+3 -3
View File
@@ -305,9 +305,9 @@ void sub_08087F58(FigurineDeviceEntity* this) {
switch (super->type) {
case 0:
case 1:
SetTile(0x4022, this->unk_78 - 1, 1);
SetTile(0x4022, this->unk_78, 1);
SetTile(0x4022, this->unk_78 + 1, 1);
SetBottomTile(0x4022, this->unk_78 - 1, 1);
SetBottomTile(0x4022, this->unk_78, 1);
SetBottomTile(0x4022, this->unk_78 + 1, 1);
break;
}
}
+2 -2
View File
@@ -35,7 +35,7 @@ void Fireplace_Init(FireplaceEntity* this) {
DeleteThisEntity();
} else {
sub_0807B7D8(0x30b, TILE(super->x.HALF.HI, super->y.HALF.HI), 2);
SetTile(0x4061, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
SetBottomTile(0x4061, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
}
Fireplace_Action1(this);
}
@@ -57,6 +57,6 @@ void sub_0809B7C0(FireplaceEntity* this) {
void sub_0809B7DC(FireplaceEntity* this) {
sub_0807B7D8(0xc3 << 2, TILE(super->x.HALF.HI, super->y.HALF.HI), 2);
SetTile(0x4062, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
SetBottomTile(0x4062, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
super->timer = 1;
}
+27 -27
View File
@@ -113,33 +113,33 @@ void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) {
void sub_0809C0A8(FrozenWaterElementEntity* this) {
u32 position = COORD_TO_TILE(super);
SetTile(0x4022, position - 0x41, super->collisionLayer);
SetTile(0x4022, position - 0x40, super->collisionLayer);
SetTile(0x4022, position - 0x3f, super->collisionLayer);
SetTile(0x4022, position - 2, super->collisionLayer);
SetTile(0x4022, position - 1, super->collisionLayer);
SetTile(0x4022, position, super->collisionLayer);
SetTile(0x4022, position + 1, super->collisionLayer);
SetTile(0x4022, position + 2, super->collisionLayer);
SetTile(0x4022, position + 0x3e, super->collisionLayer);
SetTile(0x4022, position + 0x3f, super->collisionLayer);
SetTile(0x4022, position + 0x40, super->collisionLayer);
SetTile(0x4022, position + 0x41, super->collisionLayer);
SetTile(0x4022, position + 0x42, super->collisionLayer);
SetTile(0x4022, position + 0x7f, super->collisionLayer);
SetTile(0x4022, position + 0x80, super->collisionLayer);
SetTile(0x4022, position + 0x81, super->collisionLayer);
SetTile(0x4022, position + 0x13f, super->collisionLayer);
SetTile(0x4022, position + 0x140, super->collisionLayer);
SetTile(0x4022, position + 0x141, super->collisionLayer);
SetTile(0x4022, position + 0x17f, super->collisionLayer);
SetTile(0x4022, position + 0x181, super->collisionLayer);
SetTile(0x4022, position + 0x1bd, super->collisionLayer);
SetTile(0x4022, position + 0x1be, super->collisionLayer);
SetTile(0x4022, position + 0x1bf, super->collisionLayer);
SetTile(0x4022, position + 0x1c1, super->collisionLayer);
SetTile(0x4022, position + 0x1c2, super->collisionLayer);
SetTile(0x4022, position + 0x1c3, super->collisionLayer);
SetBottomTile(0x4022, position - 0x41, super->collisionLayer);
SetBottomTile(0x4022, position - 0x40, super->collisionLayer);
SetBottomTile(0x4022, position - 0x3f, super->collisionLayer);
SetBottomTile(0x4022, position - 2, super->collisionLayer);
SetBottomTile(0x4022, position - 1, super->collisionLayer);
SetBottomTile(0x4022, position, super->collisionLayer);
SetBottomTile(0x4022, position + 1, super->collisionLayer);
SetBottomTile(0x4022, position + 2, super->collisionLayer);
SetBottomTile(0x4022, position + 0x3e, super->collisionLayer);
SetBottomTile(0x4022, position + 0x3f, super->collisionLayer);
SetBottomTile(0x4022, position + 0x40, super->collisionLayer);
SetBottomTile(0x4022, position + 0x41, super->collisionLayer);
SetBottomTile(0x4022, position + 0x42, super->collisionLayer);
SetBottomTile(0x4022, position + 0x7f, super->collisionLayer);
SetBottomTile(0x4022, position + 0x80, super->collisionLayer);
SetBottomTile(0x4022, position + 0x81, super->collisionLayer);
SetBottomTile(0x4022, position + 0x13f, super->collisionLayer);
SetBottomTile(0x4022, position + 0x140, super->collisionLayer);
SetBottomTile(0x4022, position + 0x141, super->collisionLayer);
SetBottomTile(0x4022, position + 0x17f, super->collisionLayer);
SetBottomTile(0x4022, position + 0x181, super->collisionLayer);
SetBottomTile(0x4022, position + 0x1bd, super->collisionLayer);
SetBottomTile(0x4022, position + 0x1be, super->collisionLayer);
SetBottomTile(0x4022, position + 0x1bf, super->collisionLayer);
SetBottomTile(0x4022, position + 0x1c1, super->collisionLayer);
SetBottomTile(0x4022, position + 0x1c2, super->collisionLayer);
SetBottomTile(0x4022, position + 0x1c3, super->collisionLayer);
}
void sub_0809C23C(FrozenWaterElementEntity* this) {
+28 -28
View File
@@ -217,14 +217,14 @@ static void FurnitureInit(FurnitureEntity* this) {
break;
case 0x40:
super->y.HALF.HI = (super->y.HALF.HI & ~0xF) | 4;
SetTile(0x4017, this->tile - 128, 1);
SetTile(0x4017, this->tile - 64, 1);
SetBottomTile(0x4017, this->tile - 128, 1);
SetBottomTile(0x4017, this->tile - 64, 1);
break;
case 0x80:
super->frameIndex = 0;
super->y.HALF.HI = (super->y.HALF.HI & ~0xF) | 6;
this->tile = COORD_TO_TILE(super);
SetTile(0x4026, this->tile, super->collisionLayer);
SetBottomTile(0x4026, this->tile, super->collisionLayer);
break;
case 0x200:
break;
@@ -260,8 +260,8 @@ static void FurnitureInit(FurnitureEntity* this) {
tile = this->tile - 129;
cnt = super->type != 26 ? 3 : 2;
for (i = 0; i < cnt; ++i, ++tile) {
SetTile(0x4026, tile, 2);
SetTile(0x4026, tile, 1);
SetBottomTile(0x4026, tile, 2);
SetBottomTile(0x4026, tile, 1);
sub_080001D0(0, tile + 64, 1);
}
break;
@@ -287,22 +287,22 @@ static void FurnitureInit(FurnitureEntity* this) {
case STAIRCASE:
super->collisionLayer = 1;
super->spriteOrientation.flipY = 2;
SetTile(0x4074, this->tile - 64, super->collisionLayer);
SetBottomTile(0x4074, this->tile - 64, super->collisionLayer);
sub_080001D0(63, this->tile - 64, super->collisionLayer);
SetTile(0x4017, this->tile, super->collisionLayer);
SetTile(0x4017, this->tile + 64, super->collisionLayer);
SetBottomTile(0x4017, this->tile, super->collisionLayer);
SetBottomTile(0x4017, this->tile + 64, super->collisionLayer);
break;
case MINISH_CHEESE:
if (super->type2 != 0)
super->spriteOffsetX = -4;
break;
case WOODEN_TABLE:
SetTile(0x4023, this->tile - 65, super->collisionLayer);
SetTile(0x4023, this->tile - 64, super->collisionLayer);
SetTile(0x4023, this->tile - 63, super->collisionLayer);
SetBottomTile(0x4023, this->tile - 65, super->collisionLayer);
SetBottomTile(0x4023, this->tile - 64, super->collisionLayer);
SetBottomTile(0x4023, this->tile - 63, super->collisionLayer);
break;
case LOW_BOOKSHELF:
SetTile(0x4022, this->tile + 65, super->collisionLayer);
SetBottomTile(0x4022, this->tile + 65, super->collisionLayer);
}
}
@@ -340,9 +340,9 @@ static void FurnitureUpdate(FurnitureEntity* this) {
case 0x80:
if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI + 8) {
if (gPlayerState.floor_type != SURFACE_LADDER && GetTileTypeByEntity(super) == 0x4017) {
SetTile(0x4026, this->tile, super->collisionLayer);
SetTile(0x403D, this->tile - 64, super->collisionLayer);
SetTile(0x403D, this->tile - 128, super->collisionLayer);
SetBottomTile(0x4026, this->tile, super->collisionLayer);
SetBottomTile(0x403D, this->tile - 64, super->collisionLayer);
SetBottomTile(0x403D, this->tile - 128, super->collisionLayer);
}
} else {
if (gPlayerEntity.base.collisionLayer & 2) {
@@ -350,9 +350,9 @@ static void FurnitureUpdate(FurnitureEntity* this) {
UpdateSpriteForCollisionLayer(&gPlayerEntity.base);
}
if (GetTileTypeByEntity(super) != 0x4017) {
SetTile(0x4017, this->tile, super->collisionLayer);
SetTile(0x4017, this->tile - 64, super->collisionLayer);
SetTile(0x4014, this->tile - 128, super->collisionLayer);
SetBottomTile(0x4017, this->tile, super->collisionLayer);
SetBottomTile(0x4017, this->tile - 64, super->collisionLayer);
SetBottomTile(0x4014, this->tile - 128, super->collisionLayer);
}
}
break;
@@ -377,28 +377,28 @@ static void sub_08090B6C(FurnitureEntity* this) {
num = 2;
}
for (i = -num; i <= num; ++i) {
SetTile(0x4022, tile + i, cl);
SetBottomTile(0x4022, tile + i, cl);
}
if (px & 8) {
sub_08090CDC(0x4024, tile - i, cl);
sub_08090CDC(0x4025, tile + i, cl);
} else {
SetTile(0x4022, tile - i, cl);
SetBottomTile(0x4022, tile - i, cl);
}
break;
case 1:
num = w2 / 8;
for (i = -num; i <= num; i++) {
SetTile(0x4022, tile + i, cl);
SetBottomTile(0x4022, tile + i, cl);
}
if (px & 8) {
sub_08090CDC(0x4024, tile - i, cl);
if (i != 0) {
SetTile(0x4022, tile + i, cl);
SetBottomTile(0x4022, tile + i, cl);
}
} else {
if (i != 0) {
SetTile(0x4022, tile - i, cl);
SetBottomTile(0x4022, tile - i, cl);
}
sub_08090CDC(0x4025, tile + i, cl);
}
@@ -406,10 +406,10 @@ static void sub_08090B6C(FurnitureEntity* this) {
case 2:
num = w2 / 4;
for (i = -num; i < num; ++i) {
SetTile(0x4022, tile + i, cl);
SetBottomTile(0x4022, tile + i, cl);
}
if (px & 8) {
SetTile(0x4022, tile + i, cl);
SetBottomTile(0x4022, tile + i, cl);
} else {
sub_08090CDC(0x4024, tile - i - 1, cl);
sub_08090CDC(0x4025, tile + i, cl);
@@ -418,7 +418,7 @@ static void sub_08090B6C(FurnitureEntity* this) {
case 3:
num = w2 / 4;
for (i = -num; i <= num; ++i) {
SetTile(0x4022, tile + i, cl);
SetBottomTile(0x4022, tile + i, cl);
}
if (px & 8) {
sub_08090CDC(0x4025, tile + i, cl);
@@ -436,7 +436,7 @@ static void sub_08090CDC(u32 id, u32 pos, u32 layer) {
u32 id2;
if ((cur & 0x4000) == 0) {
SetTile(id, pos, layer);
SetBottomTile(id, pos, layer);
} else {
switch (cur) {
case 0x4025:
@@ -474,7 +474,7 @@ static void sub_08090CDC(u32 id, u32 pos, u32 layer) {
default:
return;
}
SetTile(next, pos, layer);
SetBottomTile(next, pos, layer);
}
}
+4 -4
View File
@@ -59,8 +59,8 @@ void GentariCurtain_Init(GentariCurtainEntity* this) {
this->tile2 = COORD_TO_TILE_OFFSET(super, 0, -8);
this->tileIndex = GetTileIndex(this->tile, 1);
this->tileIndex2 = GetTileIndex(this->tile2, 1);
SetTile(0x4022, this->tile, 1);
SetTile(0x4022, this->tile2, 1);
SetBottomTile(0x4022, this->tile, 1);
SetBottomTile(0x4022, this->tile2, 1);
InitAnimationForceUpdate(super, 0);
} else {
super->action = 1;
@@ -80,8 +80,8 @@ void GentariCurtain_Action2(GentariCurtainEntity* this) {
UpdateAnimationSingleFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
super->action = 3;
SetTile(this->tileIndex, this->tile, 1);
SetTile(this->tileIndex2, this->tile2, 1);
SetBottomTile(this->tileIndex, this->tile, 1);
SetBottomTile(this->tileIndex2, this->tile2, 1);
sub_08092214(this);
sub_0809223C(this);
InitAnimationForceUpdate(super, 1);
+12 -12
View File
@@ -50,33 +50,33 @@ void sub_0808E55C(GiantBookLadderEntity* this) {
case 2:
position = this->unk74;
unaff_r9 = position - 0x101;
SetTile(0x408f, unaff_r9, super->collisionLayer);
SetTile(0x408f, position - 0x100, super->collisionLayer);
SetTile(0x406c, position - 0x102, super->collisionLayer);
SetTile(0x406d, position - 0xff, super->collisionLayer);
SetBottomTile(0x408f, unaff_r9, super->collisionLayer);
SetBottomTile(0x408f, position - 0x100, super->collisionLayer);
SetBottomTile(0x406c, position - 0x102, super->collisionLayer);
SetBottomTile(0x406d, position - 0xff, super->collisionLayer);
type = super->type;
uVar5 = 6;
if (type != 0) {
uVar5 = 4;
SetTile(0x4072, position + 0x3f, super->collisionLayer);
SetTile(0x4072, position + 0x40, super->collisionLayer);
SetTile(0x4072, position + 0x7f, super->collisionLayer);
SetTile(0x4072, position + 0x80, super->collisionLayer);
SetBottomTile(0x4072, position + 0x3f, super->collisionLayer);
SetBottomTile(0x4072, position + 0x40, super->collisionLayer);
SetBottomTile(0x4072, position + 0x7f, super->collisionLayer);
SetBottomTile(0x4072, position + 0x80, super->collisionLayer);
}
break;
case 1:
position = this->unk74;
unaff_r9 = position - 1;
SetTile(0x408e, unaff_r9, super->collisionLayer);
SetTile(0x408e, position, super->collisionLayer);
SetBottomTile(0x408e, unaff_r9, super->collisionLayer);
SetBottomTile(0x408e, position, super->collisionLayer);
uVar5 = 2;
break;
}
for (uVar4 = 0; uVar4 < uVar5; uVar4++) {
unaff_r9 += 0x40;
SetTile(0x408e, unaff_r9, super->collisionLayer);
SetTile(0x408e, unaff_r9 + 1, super->collisionLayer);
SetBottomTile(0x408e, unaff_r9, super->collisionLayer);
SetBottomTile(0x408e, unaff_r9 + 1, super->collisionLayer);
}
}
+1 -1
View File
@@ -35,6 +35,6 @@ void sub_0808D618(Entity* this) {
((((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) * 64);
for (i = 0; i < 13; i++) {
SetTile(16500, tilePos + arr[i], 1);
SetBottomTile(16500, tilePos + arr[i], 1);
}
}
+4 -4
View File
@@ -38,10 +38,10 @@ void GiantRock2_Init(GiantRock2Entity* this) {
position = (this->tile - 0x80);
tileIndex = 0x4022;
for (index = 4; index > -1; index--) {
SetTile(tileIndex, position - 2, collisionLayer);
SetTile(tileIndex, position - 1, collisionLayer);
SetTile(tileIndex, position, collisionLayer);
SetTile(tileIndex, position + 1, collisionLayer);
SetBottomTile(tileIndex, position - 2, collisionLayer);
SetBottomTile(tileIndex, position - 1, collisionLayer);
SetBottomTile(tileIndex, position, collisionLayer);
SetBottomTile(tileIndex, position + 1, collisionLayer);
position += 0x40;
}
}
+46 -46
View File
@@ -155,7 +155,7 @@ void sub_08093984(GiantTwigEntity* this) {
}
for (index = 0; index < 0x13; index++) {
SetTile(0x4074, array[index] + this->tilePosition, 1);
SetBottomTile(0x4074, array[index] + this->tilePosition, 1);
}
}
@@ -174,47 +174,47 @@ void GiantTwig_Type3Idle(GiantTwigEntity* this) {
void sub_08093A1C(GiantTwigEntity* this) {
switch (super->type) {
case 0:
SetTile(0x4024, this->tilePosition + 0x3c, super->collisionLayer);
SetTile(0x4022, this->tilePosition + 0x3d, super->collisionLayer);
SetTile(0x4022, this->tilePosition + 0x3e, super->collisionLayer);
SetTile(0x4029, this->tilePosition + 0x7c, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x7d, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x7e, super->collisionLayer);
SetTile(0x403d, this->tilePosition + 0x40, super->collisionLayer);
SetTile(0x403d, this->tilePosition + 0x80, super->collisionLayer);
SetTile(0x4027, this->tilePosition + 0x41, super->collisionLayer);
SetTile(0x4023, this->tilePosition + 0x42, super->collisionLayer);
SetTile(0x406d, this->tilePosition + 0x43, super->collisionLayer);
SetTile(0x4029, this->tilePosition + 0x81, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x82, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x83, super->collisionLayer);
SetBottomTile(0x4024, this->tilePosition + 0x3c, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x3d, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x3e, super->collisionLayer);
SetBottomTile(0x4029, this->tilePosition + 0x7c, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x7d, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x7e, super->collisionLayer);
SetBottomTile(0x403d, this->tilePosition + 0x40, super->collisionLayer);
SetBottomTile(0x403d, this->tilePosition + 0x80, super->collisionLayer);
SetBottomTile(0x4027, this->tilePosition + 0x41, super->collisionLayer);
SetBottomTile(0x4023, this->tilePosition + 0x42, super->collisionLayer);
SetBottomTile(0x406d, this->tilePosition + 0x43, super->collisionLayer);
SetBottomTile(0x4029, this->tilePosition + 0x81, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x82, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x83, super->collisionLayer);
break;
case 1:
if ((super->type2 & 1) != 0) {
SetTile(0x406d, this->tilePosition - 0x81, super->collisionLayer);
SetTile(0x4022, this->tilePosition - 0x41, super->collisionLayer);
SetTile(0x4029, this->tilePosition - 2, super->collisionLayer);
SetTile(0x4026, this->tilePosition - 1, super->collisionLayer);
SetTile(0x4022, this->tilePosition, super->collisionLayer);
SetTile(0x406d, this->tilePosition + 1, super->collisionLayer);
SetTile(0x406e, this->tilePosition + 0x40, super->collisionLayer);
SetTile(0x4022, this->tilePosition + 0x41, super->collisionLayer);
SetTile(0x406d, this->tilePosition + 0x42, super->collisionLayer);
SetBottomTile(0x406d, this->tilePosition - 0x81, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition - 0x41, super->collisionLayer);
SetBottomTile(0x4029, this->tilePosition - 2, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition - 1, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition, super->collisionLayer);
SetBottomTile(0x406d, this->tilePosition + 1, super->collisionLayer);
SetBottomTile(0x406e, this->tilePosition + 0x40, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x41, super->collisionLayer);
SetBottomTile(0x406d, this->tilePosition + 0x42, super->collisionLayer);
} else {
SetTile(0x406c, this->tilePosition - 0x7f, super->collisionLayer);
SetTile(0x4022, this->tilePosition - 0x3f, super->collisionLayer);
SetTile(0x406c, this->tilePosition - 1, super->collisionLayer);
SetTile(0x4022, this->tilePosition, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 1, super->collisionLayer);
SetTile(0x402a, this->tilePosition + 2, super->collisionLayer);
SetTile(0x406c, this->tilePosition + 0x3e, super->collisionLayer);
SetTile(0x4022, this->tilePosition + 0x3f, super->collisionLayer);
SetTile(0x406f, this->tilePosition + 0x40, super->collisionLayer);
SetBottomTile(0x406c, this->tilePosition - 0x7f, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition - 0x3f, super->collisionLayer);
SetBottomTile(0x406c, this->tilePosition - 1, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 1, super->collisionLayer);
SetBottomTile(0x402a, this->tilePosition + 2, super->collisionLayer);
SetBottomTile(0x406c, this->tilePosition + 0x3e, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x3f, super->collisionLayer);
SetBottomTile(0x406f, this->tilePosition + 0x40, super->collisionLayer);
return;
}
break;
case 3:
SetTile(0x4022, this->tilePosition, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition, super->collisionLayer);
break;
}
}
@@ -223,12 +223,12 @@ void sub_08093C70(GiantTwigEntity* this) {
if (this->unk_78 != 0) {
if (gPlayerState.heldObject != 0) {
this->unk_78 = 0;
SetTile(0x4022, this->tilePosition + 0x3f, super->collisionLayer);
SetTile(0x4022, this->tilePosition + 0x40, super->collisionLayer);
SetTile(0x4022, this->tilePosition + 0x41, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x7f, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x80, super->collisionLayer);
SetTile(0x4026, this->tilePosition + 0x81, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x3f, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x40, super->collisionLayer);
SetBottomTile(0x4022, this->tilePosition + 0x41, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x7f, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x80, super->collisionLayer);
SetBottomTile(0x4026, this->tilePosition + 0x81, super->collisionLayer);
}
} else {
@@ -236,12 +236,12 @@ void sub_08093C70(GiantTwigEntity* this) {
if (--this->unk_7a == 0) {
this->unk_78++;
this->unk_7a = 0x3c;
SetTile(0x403d, this->tilePosition + 0x3f, super->collisionLayer);
SetTile(0x403d, this->tilePosition + 0x40, super->collisionLayer);
SetTile(0x4027, this->tilePosition + 0x41, super->collisionLayer);
SetTile(0x403d, this->tilePosition + 0x7f, super->collisionLayer);
SetTile(0x403d, this->tilePosition + 0x80, super->collisionLayer);
SetTile(0x4029, this->tilePosition + 0x81, super->collisionLayer);
SetBottomTile(0x403d, this->tilePosition + 0x3f, super->collisionLayer);
SetBottomTile(0x403d, this->tilePosition + 0x40, super->collisionLayer);
SetBottomTile(0x4027, this->tilePosition + 0x41, super->collisionLayer);
SetBottomTile(0x403d, this->tilePosition + 0x7f, super->collisionLayer);
SetBottomTile(0x403d, this->tilePosition + 0x80, super->collisionLayer);
SetBottomTile(0x4029, this->tilePosition + 0x81, super->collisionLayer);
}
}
}
+4 -4
View File
@@ -183,10 +183,10 @@ void sub_0808C148(JarPortalEntity* this, u32 a2) {
pos = COORD_TO_TILE(super);
if (!a2) {
SetTile(16530, pos - 1, super->collisionLayer);
SetTile(16531, pos, super->collisionLayer);
SetTile(16532, pos + 63, super->collisionLayer);
SetTile(16533, pos + 64, super->collisionLayer);
SetBottomTile(16530, pos - 1, super->collisionLayer);
SetBottomTile(16531, pos, super->collisionLayer);
SetBottomTile(16532, pos + 63, super->collisionLayer);
SetBottomTile(16533, pos + 64, super->collisionLayer);
} else {
RestorePrevTileEntity(pos - 1, super->collisionLayer);
RestorePrevTileEntity(pos, super->collisionLayer);
+5 -5
View File
@@ -37,7 +37,7 @@ void LadderUp(Entity* this) {
return;
}
this->y.HALF.HI = (this->y.HALF.HI & 0xfff0) + 0xc;
SetTile(0x4023, COORD_TO_TILE(this), this->collisionLayer);
SetBottomTile(0x4023, COORD_TO_TILE(this), this->collisionLayer);
break;
case 1:
if (GravityUpdate(this, Q_8_8(16.0)) == 0) {
@@ -66,16 +66,16 @@ void LadderUp(Entity* this) {
if (this->type2 == 0) {
if (gPlayerEntity.base.y.HALF.HI < this->y.HALF.HI) {
if (gPlayerState.floor_type != SURFACE_LADDER && (GetTileTypeByEntity(this) == 0x4017)) {
SetTile(0x4023, COORD_TO_TILE(this), this->collisionLayer);
SetBottomTile(0x4023, COORD_TO_TILE(this), this->collisionLayer);
RestorePrevTileEntity(COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
}
} else {
if (GetTileTypeByEntity(this) != 0x4017) {
SetTile(0x4017, COORD_TO_TILE(this), this->collisionLayer);
SetBottomTile(0x4017, COORD_TO_TILE(this), this->collisionLayer);
if (this->type == 0) {
SetTile(0x4017, COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
SetBottomTile(0x4017, COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
} else {
SetTile(0x4014, COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
SetBottomTile(0x4014, COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
}
}
}
+9 -9
View File
@@ -87,13 +87,13 @@ void LightDoor_Action4(LightDoorEntity* this) {
void sub_080850FC(LightDoorEntity* this) {
u32 position = COORD_TO_TILE(super);
u32 layer = super->collisionLayer;
SetTile(0x403d, position - 0x41, layer);
SetTile(0x403d, position - 0x40, layer);
SetTile(0x403d, position - 0x3f, layer);
SetTile(0x403d, position - 1, layer);
SetTile(0x403d, position, layer);
SetTile(0x403d, position + 1, layer);
SetTile(0x403d, position + 0x3f, layer);
SetTile(0x403d, position + 0x40, layer);
SetTile(0x403d, position + 0x41, layer);
SetBottomTile(0x403d, position - 0x41, layer);
SetBottomTile(0x403d, position - 0x40, layer);
SetBottomTile(0x403d, position - 0x3f, layer);
SetBottomTile(0x403d, position - 1, layer);
SetBottomTile(0x403d, position, layer);
SetBottomTile(0x403d, position + 1, layer);
SetBottomTile(0x403d, position + 0x3f, layer);
SetBottomTile(0x403d, position + 0x40, layer);
SetBottomTile(0x403d, position + 0x41, layer);
}
+1 -1
View File
@@ -99,7 +99,7 @@ static void sub_0809EAD8(LightableSwitchEntity* this) {
UpdateRailMovement(super, (u16**)&super->child, &this->unk_74);
} else {
SetTile(0x4050, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4050, COORD_TO_TILE(super), super->collisionLayer);
}
}
+4 -4
View File
@@ -329,10 +329,10 @@ void LilypadLarge_Action2(LilypadLargeEntity* this) {
void sub_08085A44(LilypadLargeEntity* this) {
super->speed = 0x200;
if (GetRelativeCollisionTile(super, 0x10, 0x18) != 0x11) {
if (GetActTileRelative(super, 0x10, 0x18) != 0x11) {
super->direction = 0x18;
} else {
if (GetRelativeCollisionTile(super, -0x10, 0x18) != 0x11) {
if (GetActTileRelative(super, -0x10, 0x18) != 0x11) {
super->direction = 8;
} else {
super->direction = 0x10;
@@ -353,7 +353,7 @@ void sub_08085A98(LilypadLargeEntity* this) {
this->unk_78.WORD -= 0x20000;
SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
}
if (GetRelativeCollisionTile(super, 0, 0x18) != 0x11) {
if (GetActTileRelative(super, 0, 0x18) != 0x11) {
super->subAction = 2;
if (gArea.locationIndex == 0x1b) {
super->y.HALF.HI += 0xd0;
@@ -456,7 +456,7 @@ void LilypadLarge_Action5(LilypadLargeEntity* this) {
void sub_08085D28(LilypadLargeEntity* this) {
if (((gPlayerState.framestate != PL_STATE_TALKEZLO) && ((gPlayerState.flags & PL_FLAGS2) != 0)) &&
(GetRelativeCollisionTile(super, 0, 0x18) == 0x11)) {
(GetActTileRelative(super, 0, 0x18) == 0x11)) {
super->action = 2;
super->subAction = 0;
PausePlayer();
+2 -2
View File
@@ -118,8 +118,8 @@ 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)) {
SetTile(replaceTileIndex, TILE(super->x.HALF.HI + xOffset, super->y.HALF.HI + yOffset),
super->collisionLayer);
SetBottomTile(replaceTileIndex, TILE(super->x.HALF.HI + xOffset, super->y.HALF.HI + yOffset),
super->collisionLayer);
}
index += 2;
}
+3 -3
View File
@@ -162,7 +162,7 @@ void LockedDoor_Action1(LockedDoorEntity* this) {
if (--super->timer == 0) {
super->action = 2;
super->timer = 7;
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
SetBottomTile(this->unk_74, this->unk_76, super->collisionLayer);
EnqueueSFX(SFX_10B);
}
}
@@ -262,12 +262,12 @@ void sub_080836A0(LockedDoorEntity* this) {
super->spriteSettings.draw = 1;
super->x.HALF.HI = this->unk_70;
super->y.HALF.HI = this->unk_72;
SetTile(0x4022, this->unk_76, super->collisionLayer);
SetBottomTile(0x4022, this->unk_76, super->collisionLayer);
}
void sub_080836DC(Entity* this, u32 unk_0, u32 unk_1) {
const struct_0811F680* tmp;
SetTile(0x4022, unk_1, this->collisionLayer);
SetBottomTile(0x4022, unk_1, this->collisionLayer);
this->timer = 7;
this->spriteSettings.draw = 1;
this->direction = (unk_0 << 3) ^ DirectionSouth;
+28 -28
View File
@@ -74,38 +74,38 @@ void sub_0809E5F0(MacroAcornEntity* this) {
this->unk_80 = position;
switch (super->type) {
case 2:
SetTile(0x4022, position - 0x3d, 1);
SetTile(0x406d, position - 0x3c, 1);
SetBottomTile(0x4022, position - 0x3d, 1);
SetBottomTile(0x406d, position - 0x3c, 1);
case 0:
SetTile(0x406c, position - 0x42, 1);
SetTile(0x4022, position - 0x41, 1);
SetTile(0x4022, position - 0x40, 1);
SetTile(0x4022, position - 0x3f, 1);
SetTile(0x4022, position - 2, 1);
SetTile(0x4022, position - 1, 1);
SetTile(0x4022, position, 1);
SetTile(0x4022, position + 1, 1);
SetTile(0x406e, position + 0x3e, 1);
SetTile(0x4022, position + 0x3f, 1);
SetTile(0x4022, position + 0x40, 1);
SetTile(0x406f, position + 0x41, 1);
SetBottomTile(0x406c, position - 0x42, 1);
SetBottomTile(0x4022, position - 0x41, 1);
SetBottomTile(0x4022, position - 0x40, 1);
SetBottomTile(0x4022, position - 0x3f, 1);
SetBottomTile(0x4022, position - 2, 1);
SetBottomTile(0x4022, position - 1, 1);
SetBottomTile(0x4022, position, 1);
SetBottomTile(0x4022, position + 1, 1);
SetBottomTile(0x406e, position + 0x3e, 1);
SetBottomTile(0x4022, position + 0x3f, 1);
SetBottomTile(0x4022, position + 0x40, 1);
SetBottomTile(0x406f, position + 0x41, 1);
break;
case 3:
SetTile(0x4022, position - 0x44, 1);
SetTile(0x406c, position - 0x45, 1);
SetBottomTile(0x4022, position - 0x44, 1);
SetBottomTile(0x406c, position - 0x45, 1);
case 1:
SetTile(0x4022, position - 0x42, 1);
SetTile(0x4022, position - 0x41, 1);
SetTile(0x4022, position - 0x40, 1);
SetTile(0x406d, position - 0x3f, 1);
SetTile(0x4022, position - 2, 1);
SetTile(0x4022, position - 1, 1);
SetTile(0x4022, position, 1);
SetTile(0x4022, position + 1, 1);
SetTile(0x406e, position + 0x3e, 1);
SetTile(0x4022, position + 0x3f, 1);
SetTile(0x4022, position + 0x40, 1);
SetTile(0x406f, position + 0x41, 1);
SetBottomTile(0x4022, position - 0x42, 1);
SetBottomTile(0x4022, position - 0x41, 1);
SetBottomTile(0x4022, position - 0x40, 1);
SetBottomTile(0x406d, position - 0x3f, 1);
SetBottomTile(0x4022, position - 2, 1);
SetBottomTile(0x4022, position - 1, 1);
SetBottomTile(0x4022, position, 1);
SetBottomTile(0x4022, position + 1, 1);
SetBottomTile(0x406e, position + 0x3e, 1);
SetBottomTile(0x4022, position + 0x3f, 1);
SetBottomTile(0x4022, position + 0x40, 1);
SetBottomTile(0x406f, position + 0x41, 1);
break;
}
}
+1 -1
View File
@@ -150,7 +150,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) {
SetTile(*tileIndexPtr, tilePos + index2, 1);
SetBottomTile(*tileIndexPtr, tilePos + index2, 1);
}
}
}
+1 -1
View File
@@ -87,7 +87,7 @@ void sub_08097EB8(MacroDecorationEntity* this) {
const s16* tilePosPtr;
u16 tile = COORD_TO_TILE(super);
for (tilePosPtr = tilePosArray; *tilePosPtr != 0x7fff; tilePosPtr += 2) {
SetTile((u16)tilePosPtr[1], tile + tilePosPtr[0], 1);
SetBottomTile((u16)tilePosPtr[1], tile + tilePosPtr[0], 1);
}
}
+3 -3
View File
@@ -39,9 +39,9 @@ void MacroShoe_Init(Entity* this) {
this->action = 1;
this->hitbox = (Hitbox*)MacroShoe_TypeHitboxes[this->type];
if (this->type2 == 1) {
SetTile(0x4024, 0x410, 1);
SetTile(0x4026, 0x411, 1);
SetTile(0x4025, 0x412, 1);
SetBottomTile(0x4024, 0x410, 1);
SetBottomTile(0x4026, 0x411, 1);
SetBottomTile(0x4025, 0x412, 1);
}
}
+2 -2
View File
@@ -74,7 +74,7 @@ void Mask_Init(MaskEntity* this) {
this->unk_7a = sub_080B1B44(this->unk_7e, 1);
SetTile(0x4022, this->unk_7e, 1);
SetBottomTile(0x4022, this->unk_7e, 1);
}
// Probably related to knocking it down
@@ -99,7 +99,7 @@ void Mask_Action1(MaskEntity* this) {
}
// Presumably, make the mask fall
SetTile(this->unk_7c, this->unk_7e, 1);
SetBottomTile(this->unk_7c, this->unk_7e, 1);
sub_08000148(this->unk_7a, this->unk_7e, 1);
+6 -6
View File
@@ -118,13 +118,13 @@ void sub_080A080C(MetalDoorEntity* this) {
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(0x4022, this->unk_74 - 1, super->collisionLayer);
SetTile(0x4022, this->unk_74, super->collisionLayer);
SetTile(0x4022, this->unk_74 + 1, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74 - 1, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74, super->collisionLayer);
SetBottomTile(0x4022, this->unk_74 + 1, super->collisionLayer);
}
void sub_080A0870(MetalDoorEntity* this) {
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);
SetBottomTile(this->unk_76, this->unk_74 - 1, super->collisionLayer);
SetBottomTile(this->unk_78, this->unk_74, super->collisionLayer);
SetBottomTile(this->unk_7a, this->unk_74 + 1, super->collisionLayer);
}
+5 -5
View File
@@ -59,7 +59,7 @@ void Minecart_Init(MinecartEntity* this) {
super->speed = 0x700;
super->spritePriority.b1 = 3;
InitAnimationForceUpdate(super, super->type2 + 4 + super->animationState);
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
}
void Minecart_Action1(MinecartEntity* this) {
@@ -163,9 +163,9 @@ void Minecart_Action3(MinecartEntity* this) {
super->subtimer = 60;
}
uVar3 = GetRelativeCollisionTile(super, gUnk_081223C8[super->animationState * 2],
gUnk_081223C8[super->animationState * 2 + 1]);
iVar2 = sub_08007DD6(uVar3, gUnk_081223D8[super->animationState]);
uVar3 = GetActTileRelative(super, gUnk_081223C8[super->animationState * 2],
gUnk_081223C8[super->animationState * 2 + 1]);
iVar2 = ActTileToTile(uVar3, gUnk_081223D8[super->animationState]);
if (iVar2 == 0) {
super->direction = DirectionTurnAround(super->direction);
super->animationState = AnimationStateFlip90(super->animationState);
@@ -290,7 +290,7 @@ void Minecart_Action6(MinecartEntity* this) {
minecartData->room = gRoomControls.room;
minecartData->animationState = super->animationState;
InitAnimationForceUpdate(super, super->animationState + 0x10);
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
} else {
UpdateAnimationSingleFrame(super);
gPlayerEntity.base.spritePriority.b0 = super->spritePriority.b0 - 1;
+2 -2
View File
@@ -63,7 +63,7 @@ void MinecartDoor_Init(MinecartDoorEntity* this) {
} else {
super->action = 1;
super->spriteSettings.draw = 1;
SetTile(0x4022, this->unk_76, super->collisionLayer);
SetBottomTile(0x4022, this->unk_76, super->collisionLayer);
}
}
}
@@ -73,7 +73,7 @@ void MinecartDoor_Action1(MinecartDoorEntity* this) {
super->action = 2;
super->timer = 7;
super->direction = super->type << 3;
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
SetBottomTile(this->unk_74, this->unk_76, super->collisionLayer);
EnqueueSFX(SFX_10B);
}
}
+3 -3
View File
@@ -83,7 +83,7 @@ void MinishVillageObject_Type1(Entity* this) {
this->subtimer = 0;
this->frameIndex = 0;
this->spritePriority.b0 = 7;
SetTile(0x4069, COORD_TO_TILE(this) - 0x40, 1);
SetBottomTile(0x4069, COORD_TO_TILE(this) - 0x40, 1);
break;
case 2:
if ((gRoomTransition.frameCount & 3U) == 0) {
@@ -217,7 +217,7 @@ void MinishVillageObject_Type8_Init(Entity* this) {
if (this->type2 != 0) {
tilePosition -= 0x40;
}
SetTile(0x4069, tilePosition, this->collisionLayer);
SetBottomTile(0x4069, tilePosition, this->collisionLayer);
}
}
@@ -230,7 +230,7 @@ void MinishVillageObject_Type8_Action1(Entity* this) {
this->timer = 8;
this->spriteRendering.alphaBlend = 0;
gScreen.controls.layerFXControl = 0;
SetTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
SetBottomTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
}
}
}
+1 -1
View File
@@ -40,7 +40,7 @@ void Object30_Init(Object30Entity* this) {
const u16* ptr;
switch (super->type) {
case 0:
data = GetLayerByIndex(super->collisionLayer);
data = GetTileBuffer(super->collisionLayer);
ptr = &data->mapData[sub_0806F798(super)];
this->unk_6c = (u16*)ptr;
this->unk_68 = ptr[0];
+1 -1
View File
@@ -34,7 +34,7 @@ void Object37(Entity* this) {
void Object37_Init(Object37Entity* this) {
u16* puVar1;
puVar1 = GetLayerByIndex(super->collisionLayer)->mapData + sub_0806F798(super);
puVar1 = GetTileBuffer(super->collisionLayer)->mapData + sub_0806F798(super);
this->unk78 = puVar1;
this->unk70 = *puVar1;
super->action = 1;
+9 -9
View File
@@ -133,23 +133,23 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
if (this->unk7b & 0x80) {
this->unk7b &= ~0x80;
if ((this->unk7b & 0x40) != 0) {
SetTile(0x402c, this->tilePos - 1, super->collisionLayer);
SetTile(0x403d, this->tilePos + 1, super->collisionLayer);
SetBottomTile(0x402c, this->tilePos - 1, super->collisionLayer);
SetBottomTile(0x403d, this->tilePos + 1, super->collisionLayer);
} else {
SetTile(0x403d, this->tilePos - 1, super->collisionLayer);
SetTile(0x402d, this->tilePos + 1, super->collisionLayer);
SetBottomTile(0x403d, this->tilePos - 1, super->collisionLayer);
SetBottomTile(0x402d, this->tilePos + 1, super->collisionLayer);
}
} else if (this->unk7b & 0x40) {
if (xDist >= 5) {
this->unk7b &= ~(0x40 | 0x80);
SetTile(0x403d, this->tilePos - 1, super->collisionLayer);
SetTile(0x402d, this->tilePos + 1, super->collisionLayer);
SetBottomTile(0x403d, this->tilePos - 1, super->collisionLayer);
SetBottomTile(0x402d, this->tilePos + 1, super->collisionLayer);
}
} else {
if (-xDist > 4) {
this->unk7b |= 0x40;
SetTile(0x402c, this->tilePos - 1, super->collisionLayer);
SetTile(0x403d, this->tilePos + 1, super->collisionLayer);
SetBottomTile(0x402c, this->tilePos - 1, super->collisionLayer);
SetBottomTile(0x403d, this->tilePos + 1, super->collisionLayer);
}
}
}
@@ -223,7 +223,7 @@ void sub_080931A4(ObjectBlockingStairsEntity* this, u32 param_2) {
for (index = 0, iVar5 = 0; index < 9; index++) {
u32 pos = tilePos + iVar5 + index - 1;
SetTile(pTileTypes[index], pos, collisionLayer);
SetBottomTile(pTileTypes[index], pos, collisionLayer);
switch (index) {
case 2:
iVar5 = 0x3d;
+3 -3
View File
@@ -192,7 +192,7 @@ void sub_08097098(ObjectOnPillarEntity* this) {
u16 tileType;
this->unk_76 = 0x20;
EnqueueSFX(SFX_10F);
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
tileType = GetTileType(gUnk_080B4488[super->direction >> 3] + this->tilePosition, super->collisionLayer);
if ((tileType == 0x79) || tileType == 0x77) {
super->spriteOffsetY = 2;
@@ -202,7 +202,7 @@ void sub_08097098(ObjectOnPillarEntity* this) {
void sub_080970F4(ObjectOnPillarEntity* this) {
this->tilePosition = COORD_TO_TILE(super);
this->tileIndex = GetTileIndex(this->tilePosition, super->collisionLayer);
SetTile(0x4036, this->tilePosition, super->collisionLayer);
SetBottomTile(0x4036, this->tilePosition, super->collisionLayer);
}
bool32 sub_08097144(ObjectOnPillarEntity* this) {
@@ -255,7 +255,7 @@ void sub_080971E0(ObjectOnPillarEntity* this) {
super->action = 4;
super->frameIndex = 1;
super->spritePriority.b0 = 7;
SetTile(0, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0, COORD_TO_TILE(super), super->collisionLayer);
DeleteThisEntity();
break;
case 1:
+1 -1
View File
@@ -152,7 +152,7 @@ void ObjectOnSpinyBeetle_Action2Subaction2(ObjectOnSpinyBeetleEntity* this) {
}
void ObjectOnSpinyBeetle_Action2Subaction3(ObjectOnSpinyBeetleEntity* this) {
switch (sub_080043E8(super)) {
switch (GetTileHazardType(super)) {
case 2:
CreateFx(super, FX_WATER_SPLASH, 0);
break;
+1 -1
View File
@@ -22,7 +22,7 @@ void PalaceArchway_Init(Entity* this) {
this->frameIndex = this->type2;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 7;
SetTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
SetBottomTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
}
void PalaceArchway_Action1(Entity* this) {
+3 -3
View File
@@ -40,7 +40,7 @@ void Paper_Type0(Entity* this) {
}
this->spriteSettings.draw = 0;
}
SetTile(0x4051, COORD_TO_TILE(this), 1);
SetBottomTile(0x4051, COORD_TO_TILE(this), 1);
}
void Paper_Type1(Entity* this) {
@@ -60,8 +60,8 @@ void Paper_Type2(Entity* this) {
this->action = 1;
this->y.HALF.HI++;
this->spriteOffsetY = -1;
SetTile(0x4051, COORD_TO_TILE(this) - 1, 1);
SetTile(0x4051, COORD_TO_TILE(this), 1);
SetBottomTile(0x4051, COORD_TO_TILE(this) - 1, 1);
SetBottomTile(0x4051, COORD_TO_TILE(this), 1);
}
void Paper_Action1(Entity* this) {
+2 -2
View File
@@ -51,7 +51,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);
SetTile(0x4016, this->tilePos, super->collisionLayer);
SetBottomTile(0x4016, this->tilePos, super->collisionLayer);
SoundReq(SFX_112);
}
@@ -109,7 +109,7 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
if (gPlayerEntity.base.iframes >= 1) {
gPlayerState.chargeState.action = 1;
} else {
GetActTile(super);
GetActTile(super); // leftover from debugging?
sub_08084B1C(this);
super->x.HALF.HI = gPlayerEntity.base.x.HALF.HI + this->unk78;
super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI + this->unk7a;
+12 -12
View File
@@ -48,7 +48,7 @@ void sub_0808270C(PotEntity* this);
void sub_080826FC(PotEntity* this);
extern void RegisterCarryEntity(Entity*);
extern void sub_08016A6C(Entity*);
extern void CheckOnLayerTransition(Entity*);
void Pot(PotEntity* this) {
static void (*const Pot_Actions[])(PotEntity*) = {
@@ -83,7 +83,7 @@ void Pot_Init(PotEntity* this) {
DeleteThisEntity();
}
SetTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
InitializeAnimation(super, 5);
}
@@ -96,7 +96,7 @@ void Pot_Action1(PotEntity* this) {
super->subAction = 0;
break;
case 0x1D:
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
super->action = 5;
super->zVelocity = Q_16_16(2.625);
super->spriteOffsetY = 0;
@@ -120,11 +120,11 @@ void Pot_Action1(PotEntity* this) {
super->speed >>= 1;
super->timer = 64;
}
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
EnqueueSFX(SFX_10F);
break;
case 0x4067:
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
DeleteThisEntity();
break;
default:
@@ -132,7 +132,7 @@ void Pot_Action1(PotEntity* this) {
CreateFx(super, FX_FALL_DOWN, 0);
} else if (tileType == 0x4005) {
gPlayerState.lastSwordMove = SWORD_MOVE_BREAK_POT;
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
}
BreakPot(this, NULL);
break;
@@ -158,7 +158,7 @@ void sub_08082510(PotEntity* this) {
super->hitType = 1;
super->flags2 = gPlayerEntity.base.flags2;
super->spriteOffsetY = 0;
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
super->subAction++;
}
@@ -170,7 +170,7 @@ void sub_08082588(PotEntity* this) {
}
void sub_0808259C(PotEntity* this) {
switch (sub_080043E8(super)) {
switch (GetTileHazardType(super)) {
case 2:
CreateFx(super, FX_WATER_SPLASH, 0);
break;
@@ -209,7 +209,7 @@ void Pot_Action4(PotEntity* this) {
sub_0800445C(super);
if (super->timer-- != 0) {
LinearMoveUpdate(super);
sub_08016A6C(super);
CheckOnLayerTransition(super);
return;
}
@@ -230,7 +230,7 @@ void Pot_Action4(PotEntity* this) {
BreakPot(this, NULL);
break;
default:
SetTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
RegisterCarryEntity(super);
break;
}
@@ -253,7 +253,7 @@ void sub_0808270C(PotEntity* this) {
if ((gPlayerState.field_0x1c & 0xF) != 0x1 || (super->contactFlags & 0x7F) != 0x13) {
super->spriteOffsetX = 0;
super->action = 1;
SetTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4000, COORD_TO_TILE(super), super->collisionLayer);
} else {
sub_0806F4E8(super);
}
@@ -264,7 +264,7 @@ void sub_08082778(PotEntity* this) {
super->timer = 1;
super->spriteOffsetX = 0;
super->spriteOffsetY = -2;
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
}
if ((gPlayerState.field_0x1c & 0xF) != 0x1 || (super->contactFlags & 0x7F) != 0x13) {
+1 -1
View File
@@ -59,7 +59,7 @@ void PullableMushroom_Init(PullableMushroomEntity* this) {
super->spritePriority.b0 = 4;
super->hitbox = (Hitbox*)&gUnk_080FD224;
super->carryFlags = 1;
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0x6e;
+13 -13
View File
@@ -295,12 +295,12 @@ void sub_0808FDE8(PushableFurnitureEntity* this) {
iVar2 = GetTileIndex(uVar3, 1);
if (iVar2 == 0x402e) {
if ((((uVar1 & 0xf0) != 0) && ((uVar1 & 0xf0) != 0x50)) || ((uVar1 & 5) == 0)) {
SetTile(0x402c, uVar3, 1);
SetBottomTile(0x402c, uVar3, 1);
}
} else {
iVar2 = sub_080B1B44(uVar3, 1);
if ((iVar2 == 5) && ((((uVar1 & 0xf0) == 0 || ((uVar1 & 0xf0) == 0x50)) && ((uVar1 & 5) != 0)))) {
SetTile(0x402e, uVar3, 1);
SetBottomTile(0x402e, uVar3, 1);
}
}
uVar3 = (u32)this->unk_72;
@@ -308,12 +308,12 @@ void sub_0808FDE8(PushableFurnitureEntity* this) {
iVar2 = GetTileIndex(uVar3, 1);
if (iVar2 == 0x402f) {
if ((((uVar1 & 0xf0) != 0) && ((uVar1 & 0xf0) != 0x50)) || ((uVar1 & 10) == 0)) {
SetTile(0x402d, uVar3, 1);
SetBottomTile(0x402d, uVar3, 1);
}
} else {
iVar2 = sub_080B1B44(uVar3, 1);
if (((iVar2 == 10) && (((uVar1 & 0xf0) == 0 || ((uVar1 & 0xf0) == 0x50)))) && ((uVar1 & 10) != 0)) {
SetTile(0x402f, uVar3, 1);
SetBottomTile(0x402f, uVar3, 1);
}
}
}
@@ -361,13 +361,13 @@ void sub_0808FF50(PushableFurnitureEntity* this) {
case 0:
this->unk_70 = tmp;
this->unk_74 = GetTileIndex(this->unk_70, 1);
SetTile(0x404a, tmp, 1);
SetBottomTile(0x404a, tmp, 1);
break;
case 1:
if ((tmp2 & 8) != 0) {
this->unk_70 = this->unk_7c;
this->unk_74 = GetTileIndex(this->unk_70, 1);
SetTile(gUnk_08121EE4[this->unk_81], position, 1);
SetBottomTile(gUnk_08121EE4[this->unk_81], position, 1);
this->unk_72 = tmp + 1;
this->unk_76 = GetTileIndex(this->unk_72, 1);
sub_08090094(this, gUnk_08121EE4[this->unk_81 + 4], this->unk_72);
@@ -375,7 +375,7 @@ void sub_0808FF50(PushableFurnitureEntity* this) {
} else {
this->unk_72 = this->unk_7c;
this->unk_76 = GetTileIndex(this->unk_72, 1);
SetTile(gUnk_08121EE4[this->unk_81], position, 1);
SetBottomTile(gUnk_08121EE4[this->unk_81], position, 1);
this->unk_70 = tmp - 1;
this->unk_74 = GetTileIndex(this->unk_70, 1);
sub_08090094(this, gUnk_08121EE4[this->unk_81 + 2], this->unk_70);
@@ -400,14 +400,14 @@ void sub_08090094(PushableFurnitureEntity* this, u32 param_2, u32 tilePos) {
if (tmp1 == 5) {
index = 0x4022;
}
SetTile(index, tilePos, 1);
SetBottomTile(index, tilePos, 1);
return;
case 0x402d:
case 0x402f:
if (tmp1 == 5) {
index = 0x4022;
}
SetTile(index, tilePos, 1);
SetBottomTile(index, tilePos, 1);
return;
case 0x4024:
case 0x402c:
@@ -415,10 +415,10 @@ void sub_08090094(PushableFurnitureEntity* this, u32 param_2, u32 tilePos) {
if (tmp1 == 10) {
index = 0x4022;
}
SetTile(index, tilePos, 1);
SetBottomTile(index, tilePos, 1);
return;
default:
SetTile(index, tilePos, 1);
SetBottomTile(index, tilePos, 1);
return;
}
}
@@ -470,7 +470,7 @@ void sub_08090094(PushableFurnitureEntity* this, u32 param_2, u32 tilePos) {
break;
}
SetTile(index, tilePos, 1);
SetBottomTile(index, tilePos, 1);
}
void sub_08090254(PushableFurnitureEntity* this) {
@@ -572,7 +572,7 @@ void sub_0809028C(PushableFurnitureEntity* this, u32 param_2) {
}
void sub_08090480(u32 param_1, u32 param_2) {
SetTile(gUnk_08121EF0[param_1], param_2, 1);
SetBottomTile(gUnk_08121EF0[param_1], param_2, 1);
}
void sub_08090498(PushableFurnitureEntity* this) {
+5 -5
View File
@@ -68,12 +68,12 @@ void PushableGrave_Init(PushableGraveEntity* this) {
tileIndex = PushableGrave_Tiles[super->type2];
if (super->type == 0) {
super->hitbox = (Hitbox*)&gUnk_080FD578;
SetTile(tileIndex, tilePosition - 1, super->collisionLayer);
SetTile(tileIndex, tilePosition, super->collisionLayer);
SetBottomTile(tileIndex, tilePosition - 1, super->collisionLayer);
SetBottomTile(tileIndex, tilePosition, super->collisionLayer);
super->y.HALF.HI += 2;
} else {
super->hitbox = (Hitbox*)&gUnk_080FD570;
SetTile(tileIndex, tilePosition, super->collisionLayer);
SetBottomTile(tileIndex, tilePosition, super->collisionLayer);
if (super->type2 == 2) {
SetMultipleTiles((TileData*)gUnk_081232C0, tilePosition, super->collisionLayer);
}
@@ -133,9 +133,9 @@ void sub_080977F4(PushableGraveEntity* this) {
super->action = 4;
super->spriteOffsetY = 0;
tilePosition = COORD_TO_TILE(super);
SetTile(0x4022, tilePosition, super->collisionLayer);
SetBottomTile(0x4022, tilePosition, super->collisionLayer);
if (super->type == 0) {
SetTile(0x4022, tilePosition - 1, super->collisionLayer);
SetBottomTile(0x4022, tilePosition - 1, super->collisionLayer);
}
if (this->pushedFlag != 0) {
SetFlag(this->pushedFlag);
+4 -4
View File
@@ -50,7 +50,7 @@ void PushableLever_Idle(PushableLeverEntity* this) {
super->action = PUSHING;
super->spriteOffsetX = 0;
super->spriteOffsetY = 0;
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
EnqueueSFX(SFX_16A);
RequestPriorityDuration(super, 30);
if (PlayerCanBeMoved()) {
@@ -87,13 +87,13 @@ void PushableLever_SetTiles(PushableLeverEntity* this) {
super->type2 = 0;
this->tilePosition = COORD_TO_TILE_OFFSET(super, 0, 0x10);
this->tileIndex = GetTileIndex(this->tilePosition, super->collisionLayer);
SetTile(TILE_INITIAL, this->tilePosition, super->collisionLayer);
SetBottomTile(TILE_INITIAL, this->tilePosition, super->collisionLayer);
InitializeAnimation(super, 1);
} else {
super->type2 = 1;
this->tilePosition = COORD_TO_TILE_OFFSET(super, 0x10, 0);
this->tileIndex = GetTileIndex(this->tilePosition, super->collisionLayer);
SetTile(TILE_PUSHED, this->tilePosition, super->collisionLayer);
SetBottomTile(TILE_PUSHED, this->tilePosition, super->collisionLayer);
InitializeAnimation(super, 0);
}
}
@@ -104,7 +104,7 @@ bool32 PushableLever_ShouldStartPushing(PushableLeverEntity* this) {
return TRUE;
}
PushableLever_CalculateSpriteOffsets(this);
SetTile(PushableLever_Tiles[super->type2], this->tilePosition, super->collisionLayer);
SetBottomTile(PushableLever_Tiles[super->type2], this->tilePosition, super->collisionLayer);
} else {
this->timer = 60;
super->spriteOffsetX = 0;
+3 -3
View File
@@ -54,7 +54,7 @@ void PushableRock_Action1(PushableRockEntity* this) {
} else {
super->spriteSettings.flipX = 0;
}
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
super->action = 2;
InitializeAnimation(super, (super->animationState >> 1) + 1);
EnqueueSFX(SFX_10F);
@@ -92,7 +92,7 @@ void sub_0808A644(PushableRockEntity* this) {
this->unk_72 = sub_080B1B44(this->tilePosition, super->collisionLayer);
tmp = sub_080B1AE0(this->tilePosition, super->collisionLayer);
if ((tmp == 0x19) || (tmp == 0xf0)) {
SetTile(0x4015, this->tilePosition, super->collisionLayer);
SetBottomTile(0x4015, this->tilePosition, super->collisionLayer);
super->action = 3;
if (!CheckFlags(this->pushedFlag)) {
SetFlag(this->pushedFlag);
@@ -102,7 +102,7 @@ void sub_0808A644(PushableRockEntity* this) {
InitializeAnimation(super, 6);
}
} else {
SetTile(0x401b, this->tilePosition, super->collisionLayer);
SetBottomTile(0x401b, this->tilePosition, super->collisionLayer);
}
}
+5 -5
View File
@@ -155,7 +155,7 @@ void PushableStatue_Action4(PushableStatueEntity* this) {
} else {
super->spriteSettings.draw = 1;
super->action = 1;
SetTile(0x400b, this->unk_84, super->collisionLayer);
SetBottomTile(0x400b, this->unk_84, super->collisionLayer);
sub_080894C8(this);
}
}
@@ -163,9 +163,9 @@ void PushableStatue_Action4(PushableStatueEntity* this) {
void sub_08089454(PushableStatueEntity* this) {
this->unk_84 = COORD_TO_TILE(super);
this->unk_80 = GetTileIndex(this->unk_84, super->collisionLayer);
SetTile(0x400b, this->unk_84, super->collisionLayer);
SetBottomTile(0x400b, this->unk_84, super->collisionLayer);
if (super->collisionLayer == 2 && GetTileType(this->unk_84, 1) == 0x310) {
SetTile(0x400b, this->unk_84, 1);
SetBottomTile(0x400b, this->unk_84, 1);
}
}
@@ -194,7 +194,7 @@ void sub_08089538(PushableStatueEntity* this) {
u16 tileType;
this->unk_86 = 0x20;
EnqueueSFX(SFX_10F);
SetTile(this->unk_80, this->unk_84, super->collisionLayer);
SetBottomTile(this->unk_80, this->unk_84, super->collisionLayer);
if ((super->collisionLayer == 2) && (GetTileType(this->unk_84, 1) == 0x400b)) {
CloneTile(0x310, this->unk_84, 1);
}
@@ -264,7 +264,7 @@ bool32 sub_080896B0(void) {
uVar4 = COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]) - uVar1;
val = sub_080B1AE0(uVar4, gPlayerEntity.base.collisionLayer);
if ((val - 0x26 > 1) && (val != 0x29)) {
layer = GetLayerByIndex(gPlayerEntity.base.collisionLayer);
layer = GetTileBuffer(gPlayerEntity.base.collisionLayer);
iVar2 = (uVar4 * 0x10000) >> 0x10;
tmp1 = layer->collisionData[iVar2];
tmp2 = layer->collisionData[(iVar2 - uVar1)];
+7 -7
View File
@@ -65,7 +65,7 @@ void Railtrack_Init(RailtrackEntity* this) {
}
}
InitializeAnimation(super, super->animationState);
this->unk_70 = &GetLayerByIndex(super->collisionLayer)->mapData[COORD_TO_TILE(super)];
this->unk_70 = &GetTileBuffer(super->collisionLayer)->mapData[COORD_TO_TILE(super)];
sub_08085394(this);
}
@@ -140,13 +140,13 @@ void sub_08085394(RailtrackEntity* this) {
tile = COORD_TO_TILE(super);
this->unk_74 = *(layerData - offset);
SetTile(uVar1, tile - offset, super->collisionLayer);
SetBottomTile(uVar1, tile - offset, super->collisionLayer);
this->unk_76 = layerData[0x0];
SetTile(uVar1, tile - 0x0, super->collisionLayer);
SetBottomTile(uVar1, tile - 0x0, super->collisionLayer);
this->unk_78 = layerData[offset];
SetTile(uVar1, tile + offset, super->collisionLayer);
SetBottomTile(uVar1, tile + offset, super->collisionLayer);
}
void sub_0808543C(RailtrackEntity* this) {
@@ -156,9 +156,9 @@ void sub_0808543C(RailtrackEntity* this) {
temp = gUnk_080B4488[super->animationState / 2][0];
uVar2 = COORD_TO_TILE(super);
SetTile(this->unk_74, uVar2 - temp, super->collisionLayer);
SetTile(this->unk_76, uVar2, super->collisionLayer);
SetTile(this->unk_78, uVar2 + temp, super->collisionLayer);
SetBottomTile(this->unk_74, uVar2 - temp, super->collisionLayer);
SetBottomTile(this->unk_76, uVar2, super->collisionLayer);
SetBottomTile(this->unk_78, uVar2 + temp, super->collisionLayer);
}
u32 sub_080854A8(RailtrackEntity* this) {
+4 -4
View File
@@ -99,7 +99,7 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) {
if (obj != NULL) {
CopyPosition(super, obj);
}
SetTile(this->unk_6c, this->unk_70, super->collisionLayer);
SetBottomTile(this->unk_6c, this->unk_70, super->collisionLayer);
DeleteEntity(super);
break;
@@ -158,7 +158,7 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) {
DeleteThisEntity();
} else {
if (super->timer == 0x30) {
SetTile(this->unk_6c, this->unk_70, super->collisionLayer);
SetBottomTile(this->unk_6c, this->unk_70, super->collisionLayer);
}
SetAffineInfo(super, 0x100, (0x3c - super->timer) * 0x20 + 0x100, 0);
if ((super->timer & 1) != 0) {
@@ -177,14 +177,14 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) {
void sub_08099468(SmallIceBlockEntity* this) {
this->unk_70 = COORD_TO_TILE(super);
this->unk_6c = GetTileIndex(this->unk_70, super->collisionLayer);
SetTile(0x405a, this->unk_70, super->collisionLayer);
SetBottomTile(0x405a, this->unk_70, super->collisionLayer);
}
void sub_080994B8(SmallIceBlockEntity* this) {
u16 tileType;
EnqueueSFX(SFX_ICE_BLOCK_SLIDE);
SetTile(this->unk_6c, this->unk_70, super->collisionLayer);
SetBottomTile(this->unk_6c, this->unk_70, super->collisionLayer);
if ((super->collisionLayer == 2) && (GetTileType(this->unk_70, 1) == 0x405a)) {
CloneTile(0x310, this->unk_70, 1);
}
+3 -3
View File
@@ -74,14 +74,14 @@ void sub_080878CC(Entity* this) {
switch (GetTileType(pos, layer)) {
case 0x368:
case 0x367:
sub_08008796(this, 3, x + itX, y + itY);
DoTileInteraction(this, 3, x + itX, y + itY);
break;
default:
SetTile(0x4022, pos, layer);
SetBottomTile(0x4022, pos, layer);
break;
}
} else {
sub_08008796(this, 3, x + itX, y + itY);
DoTileInteraction(this, 3, x + itX, y + itY);
}
}
}
+2 -2
View File
@@ -29,8 +29,8 @@ void TreeThorns(Entity* this) {
this->flags2 = 1;
this->hitbox = (Hitbox*)&gHitbox_1;
tilePos = COORD_TO_TILE(this);
SetTile(0x4066, tilePos - 1, *layer);
SetTile(0x4065, tilePos, *layer);
SetBottomTile(0x4066, tilePos - 1, *layer);
SetBottomTile(0x4065, tilePos, *layer);
UpdateSpriteForCollisionLayer(this);
ent = CreateObject(TREE_THORNS, 1, 0);
if (ent != NULL) {
+1 -1
View File
@@ -38,7 +38,7 @@ void UnusedSkull_Init(UnusedSkullEntity* this) {
super->hurtType = 0x47;
super->flags2 = 2;
super->hitbox = (Hitbox*)&gHitbox_4;
SetTile(0x4050, COORD_TO_TILE(super), super->collisionLayer);
SetBottomTile(0x4050, COORD_TO_TILE(super), super->collisionLayer);
if (super->type == 1 || CheckFlags(this->unk_86)) {
super->action = 3;
SetFlag(this->unk_86);
+1 -1
View File
@@ -33,7 +33,7 @@ void Well_Init(WellEntity* this) {
super->action = 1;
tilePos = COORD_TO_TILE(super);
this->unk_80 = tilePos;
SetTile(16509, this->unk_80, 1);
SetBottomTile(16509, this->unk_80, 1);
}
void Well_Action1(WellEntity* this) {