mirror of
https://github.com/zeldaret/tmc
synced 2026-07-10 15:13:59 -04:00
@@ -308,11 +308,11 @@ void sub_08046078(BusinessScrubPrologueEntity* this) {
|
||||
}
|
||||
|
||||
EnqueueSFX(SFX_16E);
|
||||
sub_0807BA8C(0x7a2, 1);
|
||||
sub_0807BA8C(0x7a3, 1);
|
||||
sub_0807BA8C(0x7a5, 1);
|
||||
sub_0807BA8C(0x7a6, 1);
|
||||
sub_0807BA8C(0x7a7, 1);
|
||||
RestorePrevTileEntity(0x7a2, 1);
|
||||
RestorePrevTileEntity(0x7a3, 1);
|
||||
RestorePrevTileEntity(0x7a5, 1);
|
||||
RestorePrevTileEntity(0x7a6, 1);
|
||||
RestorePrevTileEntity(0x7a7, 1);
|
||||
|
||||
ent = CreateFx(super, FX_BIG_EXPLOSION2, 0x40);
|
||||
if (ent != NULL) {
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ void sub_0802D170(GleerokEntity* this) {
|
||||
gPlayerEntity.x.HALF.HI = gRoomControls.origin_x + 0x98;
|
||||
gPlayerEntity.y.HALF.HI = gRoomControls.origin_y + 0xd8;
|
||||
gPlayerEntity.animationState = 0;
|
||||
sub_0807BA8C(COORD_TO_TILE(&gPlayerEntity), 2);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(&gPlayerEntity), 2);
|
||||
gRoomControls.camera_target = super;
|
||||
SetFade(6, 8);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ void sub_08034D4C(Entity* this) {
|
||||
void sub_08034DC8(Entity* this) {
|
||||
if (gRoomTransition.field_0x39 == 0) {
|
||||
CreateFx(this, FX_GIANT_EXPLOSION4, 0);
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(this), this->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -221,7 +221,7 @@ void sub_08034FA0(Entity* this) {
|
||||
break;
|
||||
default:
|
||||
if (this->health == 0) {
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(this), this->collisionLayer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ void sub_0805BDB4(Manager23* this) {
|
||||
if (--this->field_0x22 == 0) {
|
||||
CreateDustAt(*(s16*)&this->field_0x38, *(s16*)&this->field_0x3a, this->manager.unk_0b);
|
||||
ClearFlag(this->field_0x3e);
|
||||
sub_0807BA8C(this->field_0x20, this->manager.unk_0b);
|
||||
RestorePrevTileEntity(this->field_0x20, this->manager.unk_0b);
|
||||
ChangeLightLevel(-this->manager.unk_0e);
|
||||
this->manager.action = 1;
|
||||
} else {
|
||||
|
||||
@@ -86,7 +86,7 @@ void sub_0805D11C(Manager2B* this) {
|
||||
entity_iterator = &this->field_0x20[counter];
|
||||
entity = *entity_iterator;
|
||||
*entity_iterator = NULL;
|
||||
sub_0807BA8C(COORD_TO_TILE(entity), entity->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(entity), entity->collisionLayer);
|
||||
DeleteEntity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void Manager30_Main(Manager30* this) {
|
||||
for (i = 0; i < this->height; i++) {
|
||||
tmp = this->own_tile + (i << 6);
|
||||
for (j = 0; j < this->width; j++) {
|
||||
sub_0807BA8C(tmp + j, this->manager.unk_0b);
|
||||
RestorePrevTileEntity(tmp + j, this->manager.unk_0b);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -74,7 +74,7 @@ void sub_08057BA4(Manager5* this) {
|
||||
} else {
|
||||
if (!this->manager.unk_0f)
|
||||
return;
|
||||
sub_0807BA8C(this->unk_38 | (this->unk_3a << 6), this->unk_3c);
|
||||
RestorePrevTileEntity(this->unk_38 | (this->unk_3a << 6), this->unk_3c);
|
||||
sub_08057CA4(this, this->unk_2c, this->unk_2e);
|
||||
this->manager.unk_0f--;
|
||||
SoundReq(SFX_HEART_GET);
|
||||
|
||||
@@ -226,7 +226,8 @@ void sub_08059124(ManagerF* this) {
|
||||
default:
|
||||
if (!--this->manager.unk_0e) {
|
||||
CreateDustAt(this->unk_38, this->unk_3a, this->manager.unk_0b);
|
||||
sub_0807BA8C(((this->unk_38 >> 4) & 0x3f) | ((this->unk_3a >> 4) & 0x3f) << 6, this->manager.unk_0b);
|
||||
RestorePrevTileEntity(((this->unk_38 >> 4) & 0x3f) | ((this->unk_3a >> 4) & 0x3f) << 6,
|
||||
this->manager.unk_0b);
|
||||
SoundReq(SFX_TASK_COMPLETE);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@ void sub_08067534(Entity* this) {
|
||||
void sub_0806757C(Entity* this) {
|
||||
if (this->subAction != 0) {
|
||||
if (this->subAction >= 3) {
|
||||
sub_0807BA8C(0xe81, 1);
|
||||
sub_0807BA8C(0xe82, 1);
|
||||
sub_0807BA8C(0xe83, 1);
|
||||
sub_0807BA8C(0xec3, 1);
|
||||
RestorePrevTileEntity(0xe81, 1);
|
||||
RestorePrevTileEntity(0xe82, 1);
|
||||
RestorePrevTileEntity(0xe83, 1);
|
||||
RestorePrevTileEntity(0xec3, 1);
|
||||
} else {
|
||||
LoadFixedGFX(this, gUnk_08110E68[this->subAction]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ void sub_0806A0A4(Entity* this) {
|
||||
if (CheckLocalFlag(MACHI_02_DOG) == 0) {
|
||||
dialog = 3;
|
||||
SetLocalFlag(MACHI_02_DOG);
|
||||
sub_0807BA8C(TILE(this->x.HALF.HI, this->y.HALF.HI - 8), (u32)this->collisionLayer);
|
||||
RestorePrevTileEntity(TILE(this->x.HALF.HI, this->y.HALF.HI - 8), (u32)this->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
dialog = 2;
|
||||
|
||||
+6
-6
@@ -262,12 +262,12 @@ void sub_08062788(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_080627E8(Entity* this, ScriptExecutionContext* context) {
|
||||
sub_0807BA8C(0x60b, 1);
|
||||
sub_0807BA8C(0x60c, 1);
|
||||
sub_0807BA8C(0x60d, 1);
|
||||
sub_0807BA8C(0x64b, 1);
|
||||
sub_0807BA8C(0x64c, 1);
|
||||
sub_0807BA8C(0x64d, 1);
|
||||
RestorePrevTileEntity(0x60b, 1);
|
||||
RestorePrevTileEntity(0x60c, 1);
|
||||
RestorePrevTileEntity(0x60d, 1);
|
||||
RestorePrevTileEntity(0x64b, 1);
|
||||
RestorePrevTileEntity(0x64c, 1);
|
||||
RestorePrevTileEntity(0x64d, 1);
|
||||
}
|
||||
|
||||
void Kid_Head(Entity* this) {
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ void sub_0806DCA0(void) {
|
||||
while (*tiles != 0) {
|
||||
u32 tile = *tiles;
|
||||
tiles = tiles + 1;
|
||||
sub_0807BA8C(tile, 1);
|
||||
RestorePrevTileEntity(tile, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -484,7 +484,7 @@ u32 sub_080611D4(Entity* this) {
|
||||
ptr = (s8*)gUnk_0810AC4C;
|
||||
a = ptr[x];
|
||||
b = ptr[x + 1];
|
||||
uVar2 = sub_080B1A8C(this, a, b);
|
||||
uVar2 = GetRelativeCollisionTile(this, a, b);
|
||||
ptr2 = gUnk_0810AC54;
|
||||
|
||||
do {
|
||||
|
||||
@@ -109,8 +109,8 @@ void sub_0806387C(Entity* this) {
|
||||
if (r5 > 0x81) {
|
||||
r4 = 2;
|
||||
SetLocalFlag(SUB_0806387C_FLAG2);
|
||||
sub_0807BA8C(0xa17, 1);
|
||||
sub_0807BA8C(0xa57, 1);
|
||||
RestorePrevTileEntity(0xa17, 1);
|
||||
RestorePrevTileEntity(0xa57, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -181,6 +181,6 @@ void sub_08066FB8(void) {
|
||||
while (*puVar2 != 0) {
|
||||
uVar1 = *puVar2;
|
||||
puVar2++;
|
||||
sub_0807BA8C(uVar1, 1);
|
||||
RestorePrevTileEntity(uVar1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+25
-25
@@ -260,37 +260,37 @@ void sub_08099C18(BigIceBlockEntity* this) {
|
||||
u32 tmp = this->unk_6e;
|
||||
switch (this->unk_6c) {
|
||||
default:
|
||||
sub_0807BA8C(tmp - 0x41, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 1, super->collisionLayer);
|
||||
sub_0807BA8C(tmp, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp, super->collisionLayer);
|
||||
break;
|
||||
case 1:
|
||||
sub_0807BA8C(tmp - 0x41, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 0x3f, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 1, super->collisionLayer);
|
||||
sub_0807BA8C(tmp, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x3f, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 1, super->collisionLayer);
|
||||
break;
|
||||
case 2:
|
||||
sub_0807BA8C(tmp - 0x41, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 1, super->collisionLayer);
|
||||
sub_0807BA8C(tmp, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 0x3f, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 0x3f, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 0x40, super->collisionLayer);
|
||||
break;
|
||||
case 3:
|
||||
sub_0807BA8C(tmp - 0x41, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 0x3f, super->collisionLayer);
|
||||
sub_0807BA8C(tmp - 1, super->collisionLayer);
|
||||
sub_0807BA8C(tmp, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 1, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 0x3f, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(tmp + 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 0x3f, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp - 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 0x3f, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(tmp + 0x41, super->collisionLayer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ void ChestSpawner_Type0Action3(ChestSpawnerEntity* this) {
|
||||
this->unk_72--;
|
||||
} else {
|
||||
super->action = 1;
|
||||
sub_0807BA8C(this->tilePosition, super->collisionLayer);
|
||||
RestorePrevTileEntity(this->tilePosition, super->collisionLayer);
|
||||
CreateDust(super);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
}
|
||||
PositionRelative(&gPlayerEntity, super, 0, 0x10000);
|
||||
if (GetTileUnderEntity(super) == 0x19) {
|
||||
sub_0807BA8C(0xdc, super->collisionLayer);
|
||||
RestorePrevTileEntity(0xdc, super->collisionLayer);
|
||||
sub_08096A78(this);
|
||||
}
|
||||
if ((gPlayerState.field_0x92 & 0xc0) == 0) {
|
||||
@@ -193,7 +193,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
super->zVelocity = 0x20000;
|
||||
super->spritePriority.b1 = 1;
|
||||
super->spriteSettings.shadow = 1;
|
||||
sub_0807BA8C(0xdc, super->collisionLayer);
|
||||
RestorePrevTileEntity(0xdc, super->collisionLayer);
|
||||
SoundReq(SFX_PLY_VO5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,9 +350,9 @@ void sub_080A1648(void) {
|
||||
}
|
||||
|
||||
void sub_080A169C(void) {
|
||||
sub_0807BA8C(0xd36, 1);
|
||||
sub_0807BA8C(0xd37, 1);
|
||||
sub_0807BA8C(0xd38, 1);
|
||||
sub_0807BA8C(0xd75, 1);
|
||||
sub_0807BA8C(0xe75, 1);
|
||||
RestorePrevTileEntity(0xd36, 1);
|
||||
RestorePrevTileEntity(0xd37, 1);
|
||||
RestorePrevTileEntity(0xd38, 1);
|
||||
RestorePrevTileEntity(0xd75, 1);
|
||||
RestorePrevTileEntity(0xe75, 1);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ void sub_0809B274(DoubleBookshelfEntity* this) {
|
||||
return;
|
||||
}
|
||||
this->unk_84 = 1;
|
||||
sub_0807BA8C(this->unk_80 + 2, 1);
|
||||
RestorePrevTileEntity(this->unk_80 + 2, 1);
|
||||
sub_0809B38C((DoubleBookshelfEntity*)super->child);
|
||||
return;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void sub_0809B38C(DoubleBookshelfEntity* this) {
|
||||
s32 index;
|
||||
u32 uVar1 = this->unk_80 - 0x82;
|
||||
for (index = 4; index >= 0;) {
|
||||
sub_0807BA8C(uVar1, 1);
|
||||
RestorePrevTileEntity(uVar1, 1);
|
||||
index--;
|
||||
uVar1++;
|
||||
}
|
||||
|
||||
@@ -147,31 +147,31 @@ void sub_0809C0A8(FrozenWaterElementEntity* this) {
|
||||
|
||||
void sub_0809C23C(FrozenWaterElementEntity* this) {
|
||||
u32 position = COORD_TO_TILE(super);
|
||||
sub_0807BA8C(position - 0x41, super->collisionLayer);
|
||||
sub_0807BA8C(position - 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(position - 0x3f, super->collisionLayer);
|
||||
sub_0807BA8C(position - 2, super->collisionLayer);
|
||||
sub_0807BA8C(position - 1, super->collisionLayer);
|
||||
sub_0807BA8C(position, super->collisionLayer);
|
||||
sub_0807BA8C(position + 1, super->collisionLayer);
|
||||
sub_0807BA8C(position + 2, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x3e, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x3f, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x40, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x41, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x42, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x7f, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x80, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x81, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x13f, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x140, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x141, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x17f, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x181, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x1bd, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x1be, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x1bf, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x1c1, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x1c2, super->collisionLayer);
|
||||
sub_0807BA8C(position + 0x1c3, super->collisionLayer);
|
||||
RestorePrevTileEntity(position - 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(position - 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(position - 0x3f, super->collisionLayer);
|
||||
RestorePrevTileEntity(position - 2, super->collisionLayer);
|
||||
RestorePrevTileEntity(position - 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(position, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 2, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x3e, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x3f, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x40, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x41, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x42, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x7f, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x80, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x81, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x13f, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x140, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x141, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x17f, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x181, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x1bd, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x1be, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x1bf, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x1c1, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x1c2, super->collisionLayer);
|
||||
RestorePrevTileEntity(position + 0x1c3, super->collisionLayer);
|
||||
}
|
||||
|
||||
@@ -169,9 +169,9 @@ void sub_0808C148(Entity* this, u32 a2) {
|
||||
SetTile(16532, pos + 63, this->collisionLayer);
|
||||
SetTile(16533, pos + 64, this->collisionLayer);
|
||||
} else {
|
||||
sub_0807BA8C(pos - 1, this->collisionLayer);
|
||||
sub_0807BA8C(pos, this->collisionLayer);
|
||||
sub_0807BA8C(pos + 63, this->collisionLayer);
|
||||
sub_0807BA8C(pos + 64, this->collisionLayer);
|
||||
RestorePrevTileEntity(pos - 1, this->collisionLayer);
|
||||
RestorePrevTileEntity(pos, this->collisionLayer);
|
||||
RestorePrevTileEntity(pos + 63, this->collisionLayer);
|
||||
RestorePrevTileEntity(pos + 64, this->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void LadderUp(Entity* this) {
|
||||
if (gPlayerEntity.y.HALF.HI < this->y.HALF.HI) {
|
||||
if (gPlayerState.floor_type != 0x1e && (GetTileTypeByEntity(this) == 0x4017)) {
|
||||
SetTile(0x4023, COORD_TO_TILE(this), this->collisionLayer);
|
||||
sub_0807BA8C(COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
if (GetTileTypeByEntity(this) != 0x4017) {
|
||||
|
||||
@@ -102,10 +102,10 @@ void sub_08085A1C(LilypadLargeEntity* this) {
|
||||
|
||||
void sub_08085A44(LilypadLargeEntity* this) {
|
||||
super->speed = 0x200;
|
||||
if (sub_080B1A8C(super, 0x10, 0x18) != 0x11) {
|
||||
if (GetRelativeCollisionTile(super, 0x10, 0x18) != 0x11) {
|
||||
super->direction = 0x18;
|
||||
} else {
|
||||
if (sub_080B1A8C(super, 0xfffffff0, 0x18) != 0x11) {
|
||||
if (GetRelativeCollisionTile(super, 0xfffffff0, 0x18) != 0x11) {
|
||||
super->direction = 8;
|
||||
} else {
|
||||
super->direction = 0x10;
|
||||
@@ -126,7 +126,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 (sub_080B1A8C(super, 0, 0x18) != 0x11) {
|
||||
if (GetRelativeCollisionTile(super, 0, 0x18) != 0x11) {
|
||||
super->subAction = 2;
|
||||
if (gArea.locationIndex == 0x1b) {
|
||||
super->y.HALF.HI += 0xd0;
|
||||
@@ -229,7 +229,7 @@ void sub_08085D10(LilypadLargeEntity* this) {
|
||||
|
||||
void sub_08085D28(LilypadLargeEntity* this) {
|
||||
if (((gPlayerState.framestate != PL_STATE_TALKEZLO) && ((gPlayerState.flags & PL_FLAGS2) != 0)) &&
|
||||
(sub_080B1A8C(super, 0, 0x18) == 0x11)) {
|
||||
(GetRelativeCollisionTile(super, 0, 0x18) == 0x11)) {
|
||||
super->action = 2;
|
||||
super->subAction = 0;
|
||||
sub_08078B48();
|
||||
|
||||
@@ -159,7 +159,7 @@ void sub_0809A9D4(MacroBookEntity* this) {
|
||||
tilePos = this->tilePos - 0x82;
|
||||
for (index = 0; index < 5; index++, tilePos += 0x40) {
|
||||
for (index2 = 0; index2 < 4; index2++) {
|
||||
sub_0807BA8C(tilePos + index2, 1);
|
||||
RestorePrevTileEntity(tilePos + index2, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ void sub_080918A4(MinecartEntity* this) {
|
||||
super->hurtType = 0x18;
|
||||
super->damage = 8;
|
||||
sub_0801766C(super);
|
||||
sub_0807BA8C(COORD_TO_TILE(super), super->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(super), super->collisionLayer);
|
||||
SoundReq(SFX_137);
|
||||
}
|
||||
} else {
|
||||
@@ -158,8 +158,8 @@ void sub_080919AC(MinecartEntity* this) {
|
||||
super->field_0xf = 0x3c;
|
||||
}
|
||||
|
||||
uVar3 = sub_080B1A8C(super, gUnk_081223C8[super->animationState * 2],
|
||||
gUnk_081223C8[super->animationState * 2 + 1]);
|
||||
uVar3 = GetRelativeCollisionTile(super, gUnk_081223C8[super->animationState * 2],
|
||||
gUnk_081223C8[super->animationState * 2 + 1]);
|
||||
iVar2 = sub_08007DD6(uVar3, gUnk_081223D8[super->animationState]);
|
||||
if (iVar2 == 0) {
|
||||
super->direction = DirectionTurnAround(super->direction);
|
||||
|
||||
@@ -77,7 +77,7 @@ void Object11_Init(Object11Entity* this) {
|
||||
|
||||
void Object11_Action1(Object11Entity* this) {
|
||||
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->bitfield & 0x7f) != 0x13)) {
|
||||
sub_0807BA8C(COORD_TO_TILE(super), super->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(super), super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ void sub_08094708(Object67Entity* this, u32 param_2, u32 param_3) {
|
||||
int index;
|
||||
|
||||
for (index = this->unk74 * 2 + 8; index != 0; index--) {
|
||||
sub_0807BA8C(TILE(param_2, param_3), 2);
|
||||
RestorePrevTileEntity(TILE(param_2, param_3), 2);
|
||||
param_2 = param_2 + this->unk78;
|
||||
param_3 = param_3 + this->unk7c;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ void sub_08093248(ObjectBlockingStairsEntity* this) {
|
||||
tilePos = this->tilePos - 0x40;
|
||||
collisionLayer = super->collisionLayer;
|
||||
for (index = 0, iVar4 = 0; index < 9; index++) {
|
||||
sub_0807BA8C(tilePos + iVar4 + index - 1, collisionLayer);
|
||||
RestorePrevTileEntity(tilePos + iVar4 + index - 1, collisionLayer);
|
||||
switch (index) {
|
||||
case 2:
|
||||
iVar4 = 0x3d;
|
||||
|
||||
@@ -336,7 +336,7 @@ bool32 sub_0809A6F8(u32 param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
if ((param_4 & 1) != 0) {
|
||||
sub_0807B9B8(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
} else {
|
||||
sub_0807BA8C((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
RestorePrevTileEntity((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
@@ -72,7 +72,7 @@ void PlayerClone_Action1(PlayerCloneEntity* this) {
|
||||
if ((this->unk78 != 0) && (this->unk7a != 0)) {
|
||||
((PlayerCloneEntity*)gPlayerClones[super->type])->unk70 = 1;
|
||||
}
|
||||
sub_08000152(0x315, this->tilePos, super->collisionLayer);
|
||||
CloneTile(0x315, 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;
|
||||
@@ -81,7 +81,7 @@ void PlayerClone_Action1(PlayerCloneEntity* this) {
|
||||
sub_0806FDA0(super);
|
||||
PlayerClone_Action2(this);
|
||||
} else if (gPlayerState.chargeState.action != 4) {
|
||||
sub_08000152(0x315, this->tilePos, super->collisionLayer);
|
||||
CloneTile(0x315, this->tilePos, super->collisionLayer);
|
||||
gPlayerClones[super->type] = NULL;
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
|
||||
@@ -353,12 +353,12 @@ void sub_08090480(u32 param_1, u32 param_2) {
|
||||
|
||||
void sub_08090498(PushableFurnitureEntity* this) {
|
||||
u32 tmp = this->unk_70 - 0x80;
|
||||
sub_0807BA8C(tmp, 1);
|
||||
RestorePrevTileEntity(tmp, 1);
|
||||
if (((this->unk_83 & 1) != 0) && (GetTileType(tmp, 2) == 0x306)) {
|
||||
sub_08000148(0x62, tmp, 1);
|
||||
}
|
||||
tmp = this->unk_72 - 0x80;
|
||||
sub_0807BA8C(tmp, 1);
|
||||
RestorePrevTileEntity(tmp, 1);
|
||||
if (((this->unk_83 & 2) != 0) && (GetTileType(tmp, 2) == 0x308)) {
|
||||
sub_08000148(99, tmp, 1);
|
||||
}
|
||||
|
||||
@@ -181,8 +181,8 @@ bool32 sub_0809785C(PushableGraveEntity* this) {
|
||||
super->field_0xf = 0x3c;
|
||||
super->direction = 0;
|
||||
super->speed = 0x40;
|
||||
sub_0807BA8C(this->unk_68, super->collisionLayer);
|
||||
sub_0807BA8C(this->unk_68 - 1, super->collisionLayer);
|
||||
RestorePrevTileEntity(this->unk_68, super->collisionLayer);
|
||||
RestorePrevTileEntity(this->unk_68 - 1, super->collisionLayer);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void sub_08089538(PushableStatueEntity* this) {
|
||||
EnqueueSFX(SFX_10F);
|
||||
SetTile(this->unk_80, this->unk_84, super->collisionLayer);
|
||||
if ((super->collisionLayer == 2) && (GetTileType(this->unk_84, 1) == 0x400b)) {
|
||||
sub_08000152(0x310, this->unk_84, 1);
|
||||
CloneTile(0x310, this->unk_84, 1);
|
||||
}
|
||||
tileType = GetTileType(this->unk_84 + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
if ((tileType == 0x79) || (tileType == 0x77)) {
|
||||
|
||||
@@ -189,7 +189,7 @@ void sub_080994B8(SmallIceBlockEntity* this) {
|
||||
EnqueueSFX(SFX_ICE_BLOCK_SLIDE);
|
||||
SetTile(this->unk_6c, this->unk_70, super->collisionLayer);
|
||||
if ((super->collisionLayer == 2) && (GetTileType(this->unk_70, 1) == 0x405a)) {
|
||||
sub_08000152(0x310, this->unk_70, 1);
|
||||
CloneTile(0x310, this->unk_70, 1);
|
||||
}
|
||||
tileType = GetTileType(this->unk_70 + gUnk_080B4488[super->direction >> 3], super->collisionLayer);
|
||||
if (tileType == 0x79 || tileType == 0x77) {
|
||||
|
||||
+7
-7
@@ -278,7 +278,7 @@ extern void sub_08079744(Entity*);
|
||||
extern void sub_0807AE20(Entity*);
|
||||
extern u32 sub_0807A894(Entity*);
|
||||
extern u32 sub_080797C4(void);
|
||||
extern void sub_0800892E(Entity*);
|
||||
extern void UpdateIcePlayerVelocity(Entity*);
|
||||
extern void sub_08078F24(void);
|
||||
extern void sub_0807B068(Entity*);
|
||||
extern u32 sub_0807A2F8(u32);
|
||||
@@ -730,7 +730,7 @@ static void PlayerBounceUpdate(Entity* this) {
|
||||
|
||||
COLLISION_ON(this);
|
||||
|
||||
if ((gPlayerState.field_0x14 == 0) && sub_08008B22()) {
|
||||
if ((gPlayerState.field_0x14 == 0) && PlayerCheckNEastTile()) {
|
||||
gPlayerState.field_0x11 = 7;
|
||||
ResolvePlayerAnimation();
|
||||
SetPlayerActionNormal();
|
||||
@@ -2140,7 +2140,7 @@ static void PlayerRollUpdate(Entity* this) {
|
||||
|
||||
if (gPlayerState.floor_type == SURFACE_ICE) {
|
||||
// roll in place when on ice
|
||||
sub_0800892E(this);
|
||||
UpdateIcePlayerVelocity(this);
|
||||
} else {
|
||||
switch (this->frame & 0xf) {
|
||||
case 0:
|
||||
@@ -2268,7 +2268,7 @@ static void sub_08072ACC(Entity* this) {
|
||||
this->spritePriority.b1 = 1;
|
||||
gPlayerState.jump_status = 0x41;
|
||||
sub_0807921C();
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
RestorePrevTileEntity(COORD_TO_TILE(this), this->collisionLayer);
|
||||
} else {
|
||||
this->animationState = Direction8ToAnimationState(gPlayerState.field_0xd);
|
||||
this->field_0xf++;
|
||||
@@ -2321,7 +2321,7 @@ static void sub_08072C48(Entity* this) {
|
||||
|
||||
sub_08008790(this, 7);
|
||||
if (gPlayerState.field_0x14) {
|
||||
if (sub_08008B22()) {
|
||||
if (PlayerCheckNEastTile()) {
|
||||
gPlayerState.field_0x11 = 7;
|
||||
if (!(gPlayerState.flags & PL_MINISH)) {
|
||||
SetPlayerActionNormal();
|
||||
@@ -2443,7 +2443,7 @@ void sub_08072D54(Entity* this) {
|
||||
}
|
||||
sub_08008790(this, 7);
|
||||
if (gPlayerState.field_0x14 != 0) {
|
||||
if (sub_08008B22()) {
|
||||
if (PlayerCheckNEastTile()) {
|
||||
gPlayerState.field_0x11 = 7;
|
||||
if (!(gPlayerState.flags & PL_MINISH)) {
|
||||
SetPlayerActionNormal();
|
||||
@@ -3739,7 +3739,7 @@ void SurfaceAction_20(Entity* this) {
|
||||
if (e != NULL) {
|
||||
e->actionDelay = 1;
|
||||
UpdateSpriteForCollisionLayer(e);
|
||||
sub_08000152(57, gPlayerState.field_0x22[0], this->collisionLayer);
|
||||
CloneTile(57, gPlayerState.field_0x22[0], this->collisionLayer);
|
||||
}
|
||||
}
|
||||
SurfaceAction_Water(this);
|
||||
|
||||
@@ -272,7 +272,7 @@ void PlayerItemBottle_UseEmptyBottle(Entity* this) {
|
||||
if (this->spriteSettings.flipX != 0) {
|
||||
iVar2 = -iVar2;
|
||||
}
|
||||
if (sub_080B1A8C(this, iVar2, (s8)ptr2[1]) == 0x10) {
|
||||
if (GetRelativeCollisionTile(this, iVar2, (s8)ptr2[1]) == 0x10) {
|
||||
this->type2 = ITEM_BOTTLE_WATER;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-5
@@ -1191,7 +1191,7 @@ bool32 sub_08079D48(void) {
|
||||
if (!sub_08079C30(&gPlayerEntity)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
if (!sub_08008B22()) {
|
||||
if (!PlayerCheckNEastTile()) {
|
||||
if (!sub_08007DD6((u16)GetTileUnderEntity(&gPlayerEntity), gUnk_0811C268)) {
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1329,7 +1329,7 @@ void EnablePlayerDraw(Entity* this) {
|
||||
}
|
||||
|
||||
bool32 sub_0807A2B8(void) {
|
||||
if (sub_08008B22()) {
|
||||
if (PlayerCheckNEastTile()) {
|
||||
return TRUE;
|
||||
} else {
|
||||
if (((gPlayerState.jump_status & 200) == 0) && (gPlayerEntity.collisionLayer != 1)) {
|
||||
@@ -1640,7 +1640,7 @@ void SetTileType(u32 tileType, u32 position, u32 layer) {
|
||||
} else if (tileType >= 0x4000) { // The tile type actually directly is a tileIndex
|
||||
SetTile(tileType, position, layer);
|
||||
} else {
|
||||
sub_0807BA8C(position, layer);
|
||||
RestorePrevTileEntity(position, layer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1670,7 +1670,7 @@ ASM_FUNC("asm/non_matching/playerUtils/sub_0807B778.inc", void sub_0807B778(u32
|
||||
|
||||
void sub_0807B7D8(u32 param_1, u32 param_2, u32 param_3) {
|
||||
if (param_1 == 53) {
|
||||
sub_08000152(53, param_2, param_3);
|
||||
CloneTile(53, param_2, param_3);
|
||||
sub_0807B778(param_2, param_3);
|
||||
sub_0807B778(param_2 + 1, param_3);
|
||||
sub_0807B778(param_2 - 1, param_3);
|
||||
@@ -1747,7 +1747,7 @@ void sub_0807B9B8(u32 tileIndex, u32 position, u32 layer) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0807BA8C(u32 position, u32 layer) {
|
||||
void RestorePrevTileEntity(u32 position, u32 layer) {
|
||||
u32 tileIndex;
|
||||
u32 tileType;
|
||||
LayerStruct* data;
|
||||
@@ -2012,6 +2012,9 @@ void sub_0807C810(void) {
|
||||
gUpdateVisibleTiles = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to create a copy of the map data for temporary cutscene changes.
|
||||
*/
|
||||
void CloneMapData(void) {
|
||||
gRoomTransition.field_0x2c[0] = 1;
|
||||
MemCopy(&gMapBottom.mapData, &gMapBottom.mapDataClone, 0x2000);
|
||||
|
||||
@@ -122,7 +122,7 @@ void sub_080AA544(Entity* this) {
|
||||
sub_0807B7D8(gUnk_08129FE4[this->type2], param - tmp[this->type2], this->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
sub_0807BA8C(TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
|
||||
RestorePrevTileEntity(TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
|
||||
SetFlag((u16)this->speed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,6 +231,6 @@ void sub_080AAA68(Entity* this) {
|
||||
|
||||
void sub_080AAAA8(Entity* this) {
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
sub_0807BA8C(TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
|
||||
RestorePrevTileEntity(TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
+17
-17
@@ -3692,7 +3692,7 @@ void sub_0804D810(void) {
|
||||
while (*puVar2 != 0) {
|
||||
uVar1 = *puVar2;
|
||||
puVar2++;
|
||||
sub_0807BA8C(uVar1, 1);
|
||||
RestorePrevTileEntity(uVar1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6000,34 +6000,34 @@ void sub_0804F8E0(void) {
|
||||
}
|
||||
|
||||
void sub_0804F928(void) {
|
||||
sub_0807BA8C(0x41d, 1);
|
||||
sub_0807BA8C(0x621, 1);
|
||||
RestorePrevTileEntity(0x41d, 1);
|
||||
RestorePrevTileEntity(0x621, 1);
|
||||
}
|
||||
|
||||
void sub_0804F944(void) {
|
||||
sub_0807BA8C(0x41e, 1);
|
||||
sub_0807BA8C(0x620, 1);
|
||||
RestorePrevTileEntity(0x41e, 1);
|
||||
RestorePrevTileEntity(0x620, 1);
|
||||
}
|
||||
|
||||
void sub_0804F960(void) {
|
||||
sub_0807BA8C(0x41f, 1);
|
||||
sub_0807BA8C(0x4e5, 1);
|
||||
sub_0807BA8C(0x61f, 1);
|
||||
sub_0807BA8C(0x559, 1);
|
||||
RestorePrevTileEntity(0x41f, 1);
|
||||
RestorePrevTileEntity(0x4e5, 1);
|
||||
RestorePrevTileEntity(0x61f, 1);
|
||||
RestorePrevTileEntity(0x559, 1);
|
||||
}
|
||||
|
||||
void sub_0804F994(void) {
|
||||
sub_0807BA8C(0x420, 1);
|
||||
sub_0807BA8C(0x525, 1);
|
||||
sub_0807BA8C(0x61e, 1);
|
||||
sub_0807BA8C(0x519, 1);
|
||||
RestorePrevTileEntity(0x420, 1);
|
||||
RestorePrevTileEntity(0x525, 1);
|
||||
RestorePrevTileEntity(0x61e, 1);
|
||||
RestorePrevTileEntity(0x519, 1);
|
||||
}
|
||||
|
||||
void sub_0804F9C8(void) {
|
||||
sub_0807BA8C(0x421, 1);
|
||||
sub_0807BA8C(0x565, 1);
|
||||
sub_0807BA8C(0x61d, 1);
|
||||
sub_0807BA8C(0x4d9, 1);
|
||||
RestorePrevTileEntity(0x421, 1);
|
||||
RestorePrevTileEntity(0x565, 1);
|
||||
RestorePrevTileEntity(0x61d, 1);
|
||||
RestorePrevTileEntity(0x4d9, 1);
|
||||
}
|
||||
|
||||
u32 sub_unk3_HyruleField_TrilbyHighlands(void) {
|
||||
|
||||
Reference in New Issue
Block a user