mirror of
https://github.com/zeldaret/tmc
synced 2026-08-25 23:54:15 -04:00
+23
-23
@@ -217,7 +217,7 @@ u32 UpdatePlayerCollision(void) {
|
||||
}
|
||||
}
|
||||
}
|
||||
layer = GetLayerByIndex(gPlayerEntity.base.collisionLayer);
|
||||
layer = GetTileBuffer(gPlayerEntity.base.collisionLayer);
|
||||
ptr1 = &gUnk_080B4468[gPlayerEntity.base.animationState & 6];
|
||||
position = COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr1[0], -ptr1[1]);
|
||||
tileType = GetTileType(position, gPlayerEntity.base.collisionLayer);
|
||||
@@ -509,13 +509,13 @@ u32 UpdatePlayerCollision(void) {
|
||||
if (gPlayerState.field_0x35 != 0) {
|
||||
return 0;
|
||||
}
|
||||
SetTile(0x4054, position, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4054, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
case 0x4053:
|
||||
if (gPlayerState.field_0x35 != 6) {
|
||||
return 0;
|
||||
}
|
||||
SetTile(0x4054, position, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4054, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
case 0x4055:
|
||||
position--;
|
||||
@@ -529,7 +529,7 @@ u32 UpdatePlayerCollision(void) {
|
||||
}
|
||||
for (index = 0; index < 3; index++) {
|
||||
if (sub_0801A8D0(gPlayerClones[index], 0) == position) {
|
||||
SetTile(0x4059, position, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4059, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
@@ -546,7 +546,7 @@ u32 UpdatePlayerCollision(void) {
|
||||
}
|
||||
for (index = 0; index < 3; index++) {
|
||||
if (sub_0801A8D0(gPlayerClones[index], 6) == position) {
|
||||
SetTile(0x4059, position, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4059, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
@@ -563,7 +563,7 @@ u32 UpdatePlayerCollision(void) {
|
||||
if ((gPlayerEntity.base.frame & 1) == 0) {
|
||||
return 0;
|
||||
}
|
||||
SetTile(0x4074, position, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4074, position, gPlayerEntity.base.collisionLayer);
|
||||
gPlayerState.pushedObject = 0xa0;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
gPlayerState.flags |= PL_BUSY;
|
||||
@@ -582,7 +582,7 @@ u32 UpdatePlayerCollision(void) {
|
||||
if ((gPlayerEntity.base.frame & 1) == 0) {
|
||||
return 0;
|
||||
}
|
||||
SetTile(0x4074, position, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4074, position, gPlayerEntity.base.collisionLayer);
|
||||
sub_080001D0(0xd, position, gPlayerEntity.base.collisionLayer);
|
||||
return 1;
|
||||
default:
|
||||
@@ -638,7 +638,7 @@ bool32 sub_0801A370(LayerStruct* layer, u32 position) {
|
||||
if (!sub_0801A4F8()) {
|
||||
return FALSE;
|
||||
}
|
||||
topLayer = GetLayerByIndex(2);
|
||||
topLayer = GetTileBuffer(2);
|
||||
offset = gUnk_080B4488[gPlayerEntity.base.animationState >> 1];
|
||||
pos = position + offset;
|
||||
tileType = GetTileType(pos, gPlayerEntity.base.collisionLayer);
|
||||
@@ -748,7 +748,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
||||
if (this == NULL) {
|
||||
return 0xffff;
|
||||
}
|
||||
layer = GetLayerByIndex(this->collisionLayer);
|
||||
layer = GetTileBuffer(this->collisionLayer);
|
||||
metatileTypes = layer->metatileTypes;
|
||||
index1 = 4;
|
||||
index2 = 2;
|
||||
@@ -904,7 +904,7 @@ u32 sub_0801A8D0(Entity* this, u32 param_2) {
|
||||
if (this == NULL)
|
||||
return 0xffff;
|
||||
|
||||
mapData = GetLayerByIndex(this->collisionLayer)->mapData;
|
||||
mapData = GetTileBuffer(this->collisionLayer)->mapData;
|
||||
if (param_2 == 0) {
|
||||
position = COORD_TO_TILE_OFFSET(this, 0, 8);
|
||||
tile = mapData[position];
|
||||
@@ -930,7 +930,7 @@ u32 sub_0801A8D0(Entity* this, u32 param_2) {
|
||||
bool32 sub_0801A980(void) {
|
||||
u16 tileType;
|
||||
const s16* ptr;
|
||||
GetLayerByIndex(gPlayerEntity.base.collisionLayer);
|
||||
GetTileBuffer(gPlayerEntity.base.collisionLayer);
|
||||
ptr = &gUnk_080B44A8[gPlayerEntity.base.animationState & 6];
|
||||
tileType =
|
||||
GetTileType(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), gPlayerEntity.base.collisionLayer);
|
||||
@@ -982,7 +982,7 @@ bool32 sub_0801AA58(Entity* this, u32 param_2, u32 param_3) {
|
||||
Entity* object;
|
||||
u32 temp;
|
||||
|
||||
layer = GetLayerByIndex(this->collisionLayer);
|
||||
layer = GetTileBuffer(this->collisionLayer);
|
||||
if (((layer->collisionData[param_2 + gUnk_080B4488[param_3 >> 3]] == 0) ||
|
||||
((u8)(layer->collisionData[param_2 + gUnk_080B4488[param_3 >> 3]] - 0x20) < 0x20))) {
|
||||
|
||||
@@ -1007,7 +1007,7 @@ bool32 sub_0801AA58(Entity* this, u32 param_2, u32 param_3) {
|
||||
void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
u16* metatiles;
|
||||
u16* mapData;
|
||||
u16* mapDataClone;
|
||||
u16* mapDataOriginal;
|
||||
u16 index;
|
||||
u16 innerIndex;
|
||||
u32 tmp2;
|
||||
@@ -1020,7 +1020,7 @@ void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
tmp3 = 2;
|
||||
}
|
||||
tmp2 = tmp3 << 0xc;
|
||||
mapDataClone = layer->mapDataClone;
|
||||
mapDataOriginal = layer->mapDataOriginal;
|
||||
mapData = layer->mapData;
|
||||
|
||||
for (index = 0; index < 0x40; index++) {
|
||||
@@ -1028,7 +1028,7 @@ void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
if (mapData[0] < 0x4000) {
|
||||
tmp1 = mapData[0] << 2;
|
||||
} else {
|
||||
tmp1 = sub_0801AC68(tmp2, mapDataClone[0]);
|
||||
tmp1 = sub_0801AC68(tmp2, mapDataOriginal[0]);
|
||||
}
|
||||
metatiles = layer->metatiles + tmp1;
|
||||
specialData[0] = metatiles[0];
|
||||
@@ -1039,7 +1039,7 @@ void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
if (mapData[1] < 0x4000) {
|
||||
tmp1 = mapData[1] << 2;
|
||||
} else {
|
||||
tmp1 = sub_0801AC68(tmp2 + 1, mapDataClone[1]);
|
||||
tmp1 = sub_0801AC68(tmp2 + 1, mapDataOriginal[1]);
|
||||
}
|
||||
metatiles = layer->metatiles + tmp1;
|
||||
specialData[0] = metatiles[0];
|
||||
@@ -1050,7 +1050,7 @@ void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
if (mapData[2] < 0x4000) {
|
||||
tmp1 = mapData[2] << 2;
|
||||
} else {
|
||||
tmp1 = sub_0801AC68(tmp2 + 2, mapDataClone[2]);
|
||||
tmp1 = sub_0801AC68(tmp2 + 2, mapDataOriginal[2]);
|
||||
}
|
||||
metatiles = layer->metatiles + tmp1;
|
||||
specialData[0] = metatiles[0];
|
||||
@@ -1061,7 +1061,7 @@ void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
if (mapData[3] < 0x4000) {
|
||||
tmp1 = mapData[3] << 2;
|
||||
} else {
|
||||
tmp1 = sub_0801AC68(tmp2 + 3, mapDataClone[3]);
|
||||
tmp1 = sub_0801AC68(tmp2 + 3, mapDataOriginal[3]);
|
||||
}
|
||||
metatiles = layer->metatiles + tmp1;
|
||||
specialData[0] = metatiles[0];
|
||||
@@ -1071,7 +1071,7 @@ void sub_0801AB08(u16* specialData, LayerStruct* layer) {
|
||||
specialData += 2;
|
||||
|
||||
mapData += 4;
|
||||
mapDataClone += 4;
|
||||
mapDataOriginal += 4;
|
||||
tmp2 = (u16)(tmp2 + 4);
|
||||
}
|
||||
specialData = specialData + 0x80;
|
||||
@@ -1215,13 +1215,13 @@ void sub_0801AE44(bool32 loadGfx) {
|
||||
|
||||
void SetMultipleTiles(const TileData* tileData, u32 basePosition, u32 layer) {
|
||||
while (tileData->tile != -1) {
|
||||
SetTile((u16)tileData->tile, basePosition + tileData->position, layer);
|
||||
SetBottomTile((u16)tileData->tile, basePosition + tileData->position, layer);
|
||||
tileData++;
|
||||
}
|
||||
}
|
||||
|
||||
// Add a new entry at the end of gUnk_0200B240
|
||||
void sub_0801AF48(u32 data, u32 position, u32 layer) {
|
||||
void RegisterInteractTile(u32 data, u32 position, u32 layer) {
|
||||
u32 index;
|
||||
if ((data < 0x4000) && (gRoomTransition.field30 == 0)) {
|
||||
index = gRoomVars.tileEntityCount;
|
||||
@@ -1233,7 +1233,7 @@ void sub_0801AF48(u32 data, u32 position, u32 layer) {
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteLoadedTileEntity(u32 position, s32 layer) {
|
||||
void UnregisterInteractTile(u32 position, s32 layer) {
|
||||
u32 count;
|
||||
struct_0200B240* ptr;
|
||||
u32 positionLayer;
|
||||
@@ -1289,7 +1289,7 @@ void sub_0801AFE4(void) {
|
||||
for (x = 0; x < width; x++) {
|
||||
for (ptr = gUnk_080B44D0; ptr->collision != 0; ptr++) {
|
||||
if (ptr->collision == *collisionData) {
|
||||
SetTile(ptr->tileIndex, y * 0x40 + x, 1);
|
||||
SetBottomTile(ptr->tileIndex, y * 0x40 + x, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ u32 sub_0804A044(Entity* entA, Entity* entB, u32 arg2) {
|
||||
|
||||
//! @bug flags & 5 can never equal 0xA
|
||||
if (flags && ((flags & 5) != 0xA)) {
|
||||
layer = GetLayerByIndex(entA->collisionLayer);
|
||||
layer = GetTileBuffer(entA->collisionLayer);
|
||||
if (xDiff < 0) {
|
||||
xDiff = -xDiff;
|
||||
}
|
||||
|
||||
+2
-2
@@ -371,7 +371,7 @@ CollisionResult CollisionNoOp(Entity* org, Entity* tgt, u32 direction, ColSettin
|
||||
// target: item
|
||||
CollisionResult CollisionGroundItem(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
|
||||
COLLISION_OFF(tgt);
|
||||
tgt->contactFlags = org->hurtType | 0x80;
|
||||
tgt->contactFlags = org->hurtType | CONTACT_TAKE_DAMAGE;
|
||||
if ((tgt->type == 0x5F || tgt->type == 0x60) && sub_08081420(tgt))
|
||||
tgt->health = 0;
|
||||
return RESULT_COLLISION_WITHOUT_SET;
|
||||
@@ -503,7 +503,7 @@ CollisionResult sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSetting
|
||||
sub_08079D84();
|
||||
org->iframes = 90;
|
||||
} else {
|
||||
gPlayerEntity.base.contactFlags = tgt->hurtType | 0x80;
|
||||
gPlayerEntity.base.contactFlags = tgt->hurtType | CONTACT_TAKE_DAMAGE;
|
||||
gPlayerEntity.base.iframes = 12;
|
||||
gPlayerEntity.base.knockbackDuration = 16;
|
||||
gPlayerEntity.base.knockbackDirection = DirectionTurnAround(direction);
|
||||
|
||||
@@ -96,7 +96,7 @@ void AcroBandit_OnTick(AcroBanditEntity* this) {
|
||||
void AcroBandit_OnCollision(AcroBanditEntity* this) {
|
||||
Entity* brother;
|
||||
|
||||
if (super->contactFlags != 0x80 && super->contactFlags != 0x81) {
|
||||
if (super->contactFlags != CONTACT_TAKE_DAMAGE && super->contactFlags != (CONTACT_TAKE_DAMAGE | 0x1)) {
|
||||
if (super->type == 1) {
|
||||
if (super->action < 7 && super->knockbackDuration != 0) {
|
||||
brother = super->child;
|
||||
|
||||
+5
-5
@@ -337,7 +337,7 @@ bool32 sub_080305BC(ArmosEntity* this) {
|
||||
|
||||
bool32 sub_08030650(ArmosEntity* this) {
|
||||
if (super->type == 0) {
|
||||
if (super->contactFlags == 0x80) {
|
||||
if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
return 1;
|
||||
}
|
||||
} else if (this->unk_80 != 2) {
|
||||
@@ -403,11 +403,11 @@ void sub_080307D4(ArmosEntity* this) {
|
||||
void sub_080307EC(ArmosEntity* this) {
|
||||
u32 position = COORD_TO_TILE(super);
|
||||
this->unk_78 = GetTileIndex(position, super->collisionLayer);
|
||||
SetTile(0x4022, position, (u32)super->collisionLayer);
|
||||
SetBottomTile(0x4022, position, (u32)super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08030834(ArmosEntity* this) {
|
||||
SetTile(this->unk_78, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_78, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
bool32 sub_0803086C(ArmosEntity* this) {
|
||||
@@ -435,11 +435,11 @@ bool32 sub_0803086C(ArmosEntity* this) {
|
||||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
SetTile(0x4022, pos, super->collisionLayer);
|
||||
SetBottomTile(0x4022, pos, super->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
if (CheckPlayerInRegion(centerX, centerY + 6, 2, 5) != 0) {
|
||||
SetTile(0x4049, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(0x4049, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ void Beetle_OnTick(BeetleEntity* this) {
|
||||
|
||||
void Beetle_OnCollision(BeetleEntity* this) {
|
||||
switch (super->contactFlags) {
|
||||
case 0x80:
|
||||
case CONTACT_TAKE_DAMAGE:
|
||||
if (gPlayerState.framestate == PL_STATE_CLIMB) {
|
||||
Beetle_OnTick(this);
|
||||
} else {
|
||||
@@ -50,7 +50,7 @@ void Beetle_OnCollision(BeetleEntity* this) {
|
||||
InitializeAnimation(super, 6);
|
||||
}
|
||||
break;
|
||||
case 0x93:
|
||||
case CONTACT_TAKE_DAMAGE | 0x13:
|
||||
Beetle_OnTick(this);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ void Bobomb_OnTick(BobombEntity* this) {
|
||||
}
|
||||
|
||||
void Bobomb_OnCollision(BobombEntity* this) {
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
||||
@@ -56,7 +56,7 @@ void BowMoblin_OnCollision(BowMoblinEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, (EntityActionArray)BowMoblin_Functions);
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
sub_0803C5F0(this);
|
||||
pEVar1 = super->child;
|
||||
if (pEVar1 != NULL) {
|
||||
|
||||
@@ -442,7 +442,7 @@ void sub_08028FFC(BusinessScrubEntity* this) {
|
||||
super->x.HALF.HI = this->unk_78;
|
||||
super->y.HALF.HI = this->unk_7a;
|
||||
InitializeAnimation(super, 0);
|
||||
SetTile(0x4022, this->unk_76, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->unk_76, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08029078(BusinessScrubEntity* this) {
|
||||
@@ -456,7 +456,7 @@ void sub_08029078(BusinessScrubEntity* this) {
|
||||
super->spriteIndex = 0xd0;
|
||||
sub_08028FDC(this);
|
||||
sub_080290E0(this, 1);
|
||||
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
SetBottomTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ void sub_0802B540(Entity* this) {
|
||||
|
||||
void sub_0802B56C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->contactFlags & 0x80) {
|
||||
if (this->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
this->speed = 0x40;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -34,7 +34,7 @@ void sub_0801FAF8(ChuchuEntity* this);
|
||||
void sub_0801FB14(ChuchuEntity* this);
|
||||
void sub_0801FB34(ChuchuEntity* this);
|
||||
void sub_0801FB68(ChuchuEntity* this);
|
||||
u32 sub_0801FBD0(ChuchuEntity* this);
|
||||
u32 CheckWaterTile(ChuchuEntity* this);
|
||||
void Chuchu_JumpAtPlayer(ChuchuEntity* this);
|
||||
|
||||
extern void (*const Chuchu_Functions[])(ChuchuEntity*);
|
||||
@@ -72,7 +72,7 @@ void Chuchu(ChuchuEntity* this) {
|
||||
/* ... */
|
||||
break;
|
||||
case 2:
|
||||
sub_080043A8(super);
|
||||
CreateDrownFX(super);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ void sub_0801F0C8(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0801F12C(ChuchuEntity* this) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
sub_0801F328(this);
|
||||
} else {
|
||||
if ((super->subtimer++ & 7) == 0) {
|
||||
@@ -232,7 +232,7 @@ void sub_0801F1B0(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
if (super->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
sub_0801F328(this);
|
||||
} else {
|
||||
sub_0801F340(this);
|
||||
@@ -261,7 +261,7 @@ void sub_0801F270(ChuchuEntity* this) {
|
||||
|
||||
ProcessMovement5(super);
|
||||
GetNextFrame(super);
|
||||
if (sub_0801FBD0(this))
|
||||
if (CheckWaterTile(this))
|
||||
return;
|
||||
|
||||
if (--super->timer != 0)
|
||||
@@ -390,7 +390,7 @@ void sub_0801F4EC(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0801F508(ChuchuEntity* this) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
this->unk_83 = 0;
|
||||
sub_0801F730(this);
|
||||
} else {
|
||||
@@ -429,7 +429,7 @@ void sub_0801F584(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
if (super->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
this->unk_83 = 0;
|
||||
sub_0801F730(this);
|
||||
} else {
|
||||
@@ -464,7 +464,7 @@ void sub_0801F688(ChuchuEntity* this) {
|
||||
if (this->unk_83)
|
||||
this->unk_83--;
|
||||
|
||||
if (sub_0801FBD0(this) || this->unk_83) {
|
||||
if (CheckWaterTile(this) || this->unk_83) {
|
||||
super->direction = sub_08049F84(super, 1);
|
||||
ProcessMovement5(super);
|
||||
GetNextFrame(super);
|
||||
@@ -572,7 +572,7 @@ void sub_0801F884(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0801F8C0(ChuchuEntity* this) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
sub_0801FAE0(this);
|
||||
} else if (sub_08049FDC(super, 1) == 0) {
|
||||
sub_0801F730(this);
|
||||
@@ -605,7 +605,7 @@ void sub_0801F940(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
if (super->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
sub_0801FAE0(this);
|
||||
} else {
|
||||
super->action = 6;
|
||||
@@ -635,7 +635,7 @@ void sub_0801F9E0(ChuchuEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0801FA30(ChuchuEntity* this) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
if (CheckWaterTile(this)) {
|
||||
super->direction = sub_08049F84(super, 1);
|
||||
ProcessMovement5(super);
|
||||
GetNextFrame(super);
|
||||
@@ -714,7 +714,7 @@ void sub_0801FB68(ChuchuEntity* this) {
|
||||
super->zVelocity = 0;
|
||||
}
|
||||
|
||||
u32 sub_0801FBD0(ChuchuEntity* this) {
|
||||
u32 CheckWaterTile(ChuchuEntity* this) {
|
||||
if (GetActTile(super) == 0x10) {
|
||||
return 1;
|
||||
} else {
|
||||
|
||||
@@ -561,7 +561,7 @@ void sub_080262A8(ChuchuBossEntity* this) {
|
||||
gPlayerEntity.base.animationState = 0;
|
||||
gRoomControls.camera_target = super;
|
||||
gRoomControls.scrollSpeed = 1;
|
||||
SetTile(0x4022, 0x2c8, 1);
|
||||
SetBottomTile(0x4022, 0x2c8, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1346,7 +1346,7 @@ void sub_080272D4(ChuchuBossEntity* this) {
|
||||
super->hitbox->height = (u32)((0x10000 / this->unk_74.HALF_U.HI) * 5) >> 6;
|
||||
if (*(char*)&this->unk_84 == 0)
|
||||
break;
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if (super->iframes != 0) {
|
||||
((ChuchuBossEntity*)super->child)->unk_68->base.iframes = super->iframes;
|
||||
super->child->parent->iframes = super->iframes;
|
||||
@@ -1697,7 +1697,7 @@ bool32 sub_08027AA4(ChuchuBossEntity* this) {
|
||||
s32 iVar4;
|
||||
Helper* pHelper;
|
||||
|
||||
if ((super->contactFlags & 0x80) == 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
|
||||
@@ -58,7 +58,7 @@ void CloudPiranha_OnCollision(CloudPiranhaEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, gUnk_080CF4F0);
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if (super->hitType == 0x5a) {
|
||||
switch (super->contactFlags & 0x3f) {
|
||||
case 0x14:
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ void Crow_OnTick(CrowEntity* this) {
|
||||
}
|
||||
|
||||
void Crow_OnCollision(CrowEntity* this) {
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if ((super->contactFlags & 0x3f) == 0) {
|
||||
COLLISION_OFF(super);
|
||||
super->subtimer = 16;
|
||||
|
||||
+2
-1
@@ -335,7 +335,8 @@ void sub_080210E4(DarkNutEntity* this) {
|
||||
}
|
||||
|
||||
sub_08021644(this);
|
||||
if ((super->frame & 0x10) && (!ProcessMovement0(super) || (super->child && (super->child->contactFlags & 0x80)))) {
|
||||
if ((super->frame & 0x10) &&
|
||||
(!ProcessMovement0(super) || (super->child && (super->child->contactFlags & CONTACT_TAKE_DAMAGE)))) {
|
||||
sub_080213D0(this, 0);
|
||||
} else {
|
||||
if (--this->unk_76 == 0)
|
||||
|
||||
@@ -48,7 +48,7 @@ void DoorMimic_OnCollision(DoorMimicEntity* this) {
|
||||
}
|
||||
|
||||
void DoorMimic_OnDeath(DoorMimicEntity* this) {
|
||||
SetTile(this->unk_7c, this->unk_7e, super->collisionLayer);
|
||||
SetBottomTile(this->unk_7c, this->unk_7e, super->collisionLayer);
|
||||
CreateFx(super, FX_POT_SHATTER, 0);
|
||||
EnemyDisableRespawn(super);
|
||||
DeleteThisEntity();
|
||||
@@ -125,7 +125,7 @@ void sub_080221C0(DoorMimicEntity* this) {
|
||||
u32 tile = COORD_TO_TILE(super) + gUnk_080B4488[super->type2];
|
||||
this->unk_7e = tile;
|
||||
this->unk_7c = GetTileIndex(tile, super->collisionLayer);
|
||||
SetTile(gUnk_080CB79C[super->type2], tile, super->collisionLayer);
|
||||
SetBottomTile(gUnk_080CB79C[super->type2], tile, super->collisionLayer);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
+4
-4
@@ -79,15 +79,15 @@ void Enemy50_OnCollision(Enemy50Entity* this) {
|
||||
sub_08041134(this);
|
||||
sub_0803F6EC(this);
|
||||
}
|
||||
if (super->hitType == 0x25 && super->contactFlags == 0x80) {
|
||||
if (super->hitType == 0x25 && super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
super->action = 8;
|
||||
InitializeAnimation(super, 3);
|
||||
} else {
|
||||
if (super->contactFlags == 0x80) {
|
||||
if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
this->unk_7c = 0x78;
|
||||
sub_08041128(this);
|
||||
}
|
||||
if (super->contactFlags == 0x9d) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
|
||||
super->zVelocity = Q_16_16(1.5);
|
||||
}
|
||||
if (super->confusedTime != 0) {
|
||||
@@ -422,7 +422,7 @@ void sub_0804122C(Enemy50Entity* this) {
|
||||
|
||||
#ifndef EU
|
||||
bool32 sub_08041300(Enemy50Entity* this) {
|
||||
if ((super->hitType == 0x25) && (super->contactFlags == 0x80)) {
|
||||
if ((super->hitType == 0x25) && (super->contactFlags == CONTACT_TAKE_DAMAGE)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return super->action == 8 || super->action == 9;
|
||||
|
||||
+8
-8
@@ -85,10 +85,10 @@ void Enemy64_Init(Enemy64Entity* this) {
|
||||
Entity* tail;
|
||||
|
||||
if (CheckFlags(0x7c)) {
|
||||
SetTile(0x4081, 10, 2);
|
||||
SetTile(0x4081, 0x4a, 2);
|
||||
SetTile(0x4081, 0x8a, 2);
|
||||
SetTile(0x4081, 0xca, 2);
|
||||
SetBottomTile(0x4081, 10, 2);
|
||||
SetBottomTile(0x4081, 0x4a, 2);
|
||||
SetBottomTile(0x4081, 0x8a, 2);
|
||||
SetBottomTile(0x4081, 0xca, 2);
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
sub_0807B7D8(0x323, 10, 1);
|
||||
@@ -440,19 +440,19 @@ void Enemy64_Action4_SubAction7(Enemy64Entity* this) {
|
||||
DeleteThisEntity();
|
||||
} else if (super->timer == 16) {
|
||||
sub_0807B7D8(0x36, 0xca, 1);
|
||||
SetTile(0x4081, 0xca, 2);
|
||||
SetBottomTile(0x4081, 0xca, 2);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
} else if (super->timer == 24) {
|
||||
sub_0807B7D8(0x36, 0x8a, 1);
|
||||
SetTile(0x4081, 0x8a, 2);
|
||||
SetBottomTile(0x4081, 0x8a, 2);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
} else if (super->timer == 32) {
|
||||
sub_0807B7D8(0x36, 0x4a, 1);
|
||||
SetTile(0x4081, 0x4a, 2);
|
||||
SetBottomTile(0x4081, 0x4a, 2);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
} else if (super->timer == 40) {
|
||||
sub_0807B7D8(0x36, 10, 1);
|
||||
SetTile(0x4081, 10, 2);
|
||||
SetBottomTile(0x4081, 10, 2);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-13
@@ -82,14 +82,14 @@ void Eyegore_OnTick(EyegoreEntity* this) {
|
||||
void Eyegore_OnCollision(EyegoreEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
if ((super->contactFlags == 0x95) || (super->contactFlags == 0x8e)) {
|
||||
if ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15)) || (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe))) {
|
||||
Entity* entity = super->contactedEntity;
|
||||
tmp = (((entity->direction + 4) & 0x18) ^ 0x10) >> 3;
|
||||
if (tmp == super->animationState) {
|
||||
if ((tmp & 1) != 0) {
|
||||
if (0x10 < ((entity->y.HALF.HI + entity->z.HALF.HI) - (super->y.HALF.HI + super->z.HALF.HI)) + 0x14U) {
|
||||
} else {
|
||||
if (super->contactFlags == 0x8e) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe)) {
|
||||
super->health = 0;
|
||||
} else {
|
||||
super->health--;
|
||||
@@ -105,7 +105,7 @@ void Eyegore_OnCollision(EyegoreEntity* this) {
|
||||
EnqueueSFX(SFX_BUTTON_PRESS);
|
||||
sub_08031344(this);
|
||||
} else {
|
||||
if (super->contactFlags == 0x8e) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe)) {
|
||||
super->health = 0;
|
||||
} else {
|
||||
super->health--;
|
||||
@@ -335,18 +335,18 @@ void sub_08030F00(EyegoreEntity* this) {
|
||||
this->unk_84 = tileIndex;
|
||||
tileIndex = GetTileIndex(position + 0x41, super->collisionLayer);
|
||||
this->unk_86 = tileIndex;
|
||||
SetTile(0x4022, position, super->collisionLayer);
|
||||
SetTile(0x4022, position + 1, super->collisionLayer);
|
||||
SetTile(0x4022, position + 0x40, super->collisionLayer);
|
||||
SetTile(0x4022, position + 0x41, super->collisionLayer);
|
||||
SetBottomTile(0x4022, position, super->collisionLayer);
|
||||
SetBottomTile(0x4022, position + 1, super->collisionLayer);
|
||||
SetBottomTile(0x4022, position + 0x40, super->collisionLayer);
|
||||
SetBottomTile(0x4022, position + 0x41, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08030FB4(EyegoreEntity* this) {
|
||||
u32 position = COORD_TO_TILE_OFFSET(super, 8, 0x14);
|
||||
SetTile(this->unk_80, position, super->collisionLayer);
|
||||
SetTile(this->unk_82, position + 1, super->collisionLayer);
|
||||
SetTile(this->unk_84, position + 0x40, super->collisionLayer);
|
||||
SetTile(this->unk_86, position + 0x41, super->collisionLayer);
|
||||
SetBottomTile(this->unk_80, position, super->collisionLayer);
|
||||
SetBottomTile(this->unk_82, position + 1, super->collisionLayer);
|
||||
SetBottomTile(this->unk_84, position + 0x40, super->collisionLayer);
|
||||
SetBottomTile(this->unk_86, position + 0x41, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08031024(EyegoreEntity* this) {
|
||||
@@ -439,8 +439,8 @@ void sub_08031024(EyegoreEntity* this) {
|
||||
void sub_08031250(EyegoreEntity* this) {
|
||||
u32 tmp2;
|
||||
u32 tmp = (u32)super->animationState * 4;
|
||||
sub_08008796(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp], super->y.HALF.HI + gUnk_080CE2C0[tmp + 1]);
|
||||
sub_08008796(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp + 2], super->y.HALF.HI + gUnk_080CE2C0[tmp + 3]);
|
||||
DoTileInteraction(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp], super->y.HALF.HI + gUnk_080CE2C0[tmp + 1]);
|
||||
DoTileInteraction(super, 9, super->x.HALF.HI + gUnk_080CE2C0[tmp + 2], super->y.HALF.HI + gUnk_080CE2C0[tmp + 3]);
|
||||
if (this->unk_79 != 0) {
|
||||
tmp2 = 0;
|
||||
if ((super->x.HALF.HI - (u32)this->unk_74) + 2 < 5) {
|
||||
|
||||
@@ -93,13 +93,13 @@ void FlyingPot_OnTick(FlyingPotEntity* this) {
|
||||
void FlyingPot_OnCollision(FlyingPotEntity* this) {
|
||||
sub_08037418(this);
|
||||
|
||||
if (super->contactFlags == 0x9D) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
|
||||
super->action = FLYING_POT_ACTION_6;
|
||||
COLLISION_OFF(super);
|
||||
super->zVelocity = Q_16_16(2.625);
|
||||
super->spritePriority.b1 = 1;
|
||||
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
} else if (super->z.HALF.HI != 0) {
|
||||
sub_08037408(this);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ void FlyingPot_SubAction2(FlyingPotEntity* this) {
|
||||
COLLISION_OFF(super);
|
||||
super->spriteOffsetX = 0;
|
||||
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
}
|
||||
|
||||
if (sub_0806F520(super)) {
|
||||
@@ -177,7 +177,7 @@ void FlyingPot_Init(FlyingPotEntity* this) {
|
||||
|
||||
tile = TILE(super->x.HALF.HI, super->y.HALF.HI);
|
||||
this->tileIndex = GetTileIndex(tile, super->collisionLayer);
|
||||
SetTile(0x4000, tile, super->collisionLayer);
|
||||
SetBottomTile(0x4000, tile, super->collisionLayer);
|
||||
InitializeAnimation(super, 5);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ void FlyingPot_Action1(FlyingPotEntity* this) {
|
||||
sub_08037418(this);
|
||||
|
||||
if (GetTileTypeByEntity(super) != 0x4000) {
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
sub_08037408(this);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void FlyingPot_Action2(FlyingPotEntity* this) {
|
||||
super->flags2 = 0xF;
|
||||
super->hitbox = &gUnk_080FD34C;
|
||||
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ void sub_08037418(FlyingPotEntity* this) {
|
||||
u32 tile = COORD_TO_TILE(super);
|
||||
|
||||
if (GetTileIndex(tile, super->collisionLayer) == 0x4067) {
|
||||
SetTile(this->tileIndex, tile, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, tile, super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ void FlyingSkull_OnTick(FlyingSkullEntity* this) {
|
||||
void FlyingSkull_OnCollision(FlyingSkullEntity* this) {
|
||||
sub_0803A100(this);
|
||||
|
||||
if (super->contactFlags == 0x9d) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
|
||||
super->action = 7;
|
||||
COLLISION_OFF(super);
|
||||
super->zVelocity = Q_16_16(2.625);
|
||||
super->spritePriority.b1 = 1;
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
} else if (super->z.HALF.HI) {
|
||||
sub_0803A0E0(this);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void sub_08039CE0(FlyingSkullEntity* this) {
|
||||
super->timer = 1;
|
||||
super->z.HALF.HI = -1;
|
||||
super->spriteOffsetX = 0;
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
if (sub_0806F520(super)) {
|
||||
@@ -121,7 +121,7 @@ void sub_08039D74(FlyingSkullEntity* this) {
|
||||
|
||||
tmp = COORD_TO_TILE(super);
|
||||
this->unk_0x74 = GetTileIndex(tmp, super->collisionLayer);
|
||||
SetTile(0x4060, tmp, super->collisionLayer);
|
||||
SetBottomTile(0x4060, tmp, super->collisionLayer);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ void sub_08039DD8(FlyingSkullEntity* this) {
|
||||
|
||||
if (super->type == 0) {
|
||||
if (GetTileTypeByEntity(super) == 0x4073) {
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
sub_0803A0E0(this);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void sub_08039DD8(FlyingSkullEntity* this) {
|
||||
if (player != NULL) {
|
||||
player->type2 = 1;
|
||||
CopyPosition(super, player);
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
DeleteEntity(super);
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void sub_08039EE4(FlyingSkullEntity* this) {
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD340;
|
||||
gPlayerEntity.base.animationState;
|
||||
this->unk_0x76 = gPlayerEntity.base.animationState;
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08039F4C(FlyingSkullEntity* this) {
|
||||
@@ -200,7 +200,7 @@ void sub_08039FAC(FlyingSkullEntity* this) {
|
||||
super->hitType = 0xa0;
|
||||
super->flags2 = 0xf;
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD34C;
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ void sub_0803A0E0(FlyingSkullEntity* this) {
|
||||
void sub_0803A100(FlyingSkullEntity* this) {
|
||||
u32 tile = COORD_TO_TILE(super);
|
||||
if (GetTileIndex(tile, super->collisionLayer) == 0x4067) {
|
||||
SetTile(this->unk_0x74, tile, super->collisionLayer);
|
||||
SetBottomTile(this->unk_0x74, tile, super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -59,11 +59,11 @@ void Ghini_OnCollision(GhiniEntity* this) {
|
||||
sub_0803F630(this);
|
||||
sub_0803F6EC(this);
|
||||
}
|
||||
if ((super->hitType == 0x25) && (super->contactFlags == 0x80)) {
|
||||
if ((super->hitType == 0x25) && (super->contactFlags == CONTACT_TAKE_DAMAGE)) {
|
||||
super->action = 8;
|
||||
InitializeAnimation(super, 3);
|
||||
} else {
|
||||
if (super->contactFlags == 0x9d) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
|
||||
super->zVelocity = 0x18000;
|
||||
}
|
||||
if (super->confusedTime != 0) {
|
||||
|
||||
+2
-2
@@ -52,7 +52,7 @@ void Gibdo_OnTick(GibdoEntity* this) {
|
||||
}
|
||||
|
||||
void Gibdo_OnCollision(GibdoEntity* this) {
|
||||
if (super->contactFlags == 0x87) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
|
||||
if (super->action == 0x6) {
|
||||
sub_08037ACC(this);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ void Gibdo_OnCollision(GibdoEntity* this) {
|
||||
Gibdo_CreateObjects(this);
|
||||
} else {
|
||||
if (super->action != 0x6) {
|
||||
if (super->hitType == 0x27 && super->contactFlags == 0x80) {
|
||||
if (super->hitType == 0x27 && super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
sub_08037A14(this);
|
||||
} else {
|
||||
if ((u8)(super->action - 1) < 2) {
|
||||
|
||||
+2
-2
@@ -659,7 +659,7 @@ void sub_0802D86C(GleerokEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((super->contactFlags & 0x80) && this->unk_74 == 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) && this->unk_74 == 0) {
|
||||
if ((super->contactFlags & 0x7f) == 0x1d) {
|
||||
super->zVelocity = Q_16_16(3.0);
|
||||
super->parent->subAction = 4;
|
||||
@@ -1039,7 +1039,7 @@ void sub_0802E0B8(GleerokEntity* this) {
|
||||
super->type2 = 4;
|
||||
InitializeAnimation(super, 0x4e);
|
||||
} else {
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if (super->iframes > 0) {
|
||||
SoundReq(SFX_BOSS_HIT);
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ void sub_080464C0(GyorgFemaleEntity* this) {
|
||||
void sub_08046518(void) {
|
||||
u16* ptr = gMapTop.metatileTypes;
|
||||
u16* sl = &gMapTop.mapData[sub_08046518_offset];
|
||||
u16* stack1 = &gMapTop.mapDataClone[sub_08046518_offset];
|
||||
u16* stack1 = &gMapTop.mapDataOriginal[sub_08046518_offset];
|
||||
u8* stack2 = &gMapTop.unkData3[sub_08046518_offset];
|
||||
u8* r6 = &gMapTop.collisionData[sub_08046518_offset];
|
||||
u32 i;
|
||||
|
||||
@@ -20,7 +20,7 @@ void HangingSeed_OnTick(Entity* this) {
|
||||
}
|
||||
|
||||
void HangingSeed_OnCollision(Entity* this) {
|
||||
if (this->contactFlags & 0x80) {
|
||||
if (this->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
CreateFx(this, FX_BUSH, 0x80);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -373,8 +373,8 @@ void sub_0802C1C0(HelmasaurEntity* this) {
|
||||
|
||||
void sub_0802C1CC(HelmasaurEntity* this) {
|
||||
const s8* ptr = &gUnk_080CD464[super->animationState << 2];
|
||||
sub_08008796(super, 9, super->x.HALF.HI + ptr[0], super->y.HALF.HI + ptr[1]);
|
||||
sub_08008796(super, 9, super->x.HALF.HI + ptr[2], super->y.HALF.HI + ptr[3]);
|
||||
DoTileInteraction(super, 9, super->x.HALF.HI + ptr[0], super->y.HALF.HI + ptr[1]);
|
||||
DoTileInteraction(super, 9, super->x.HALF.HI + ptr[2], super->y.HALF.HI + ptr[3]);
|
||||
}
|
||||
|
||||
void sub_0802C218(HelmasaurEntity* this) {
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ void Keaton_Action3(KeatonEntity* this) {
|
||||
}
|
||||
|
||||
void Keaton_Action4(KeatonEntity* this) {
|
||||
if (super->child && (super->child->contactFlags & 0x80)) {
|
||||
if (super->child && (super->child->contactFlags & CONTACT_TAKE_DAMAGE)) {
|
||||
sub_0803275C(this);
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ void Leever_OnTick(LeeverEntity* this) {
|
||||
}
|
||||
|
||||
void Leever_OnCollision(LeeverEntity* this) {
|
||||
if (super->contactFlags == 0x80) {
|
||||
if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
if (super->action == 3) {
|
||||
this->unk_74 = 1;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ void LikeLike_OnCollision(LikeLikeEntity* this) {
|
||||
} else {
|
||||
if (super->action == 7) {
|
||||
LikeLike_ReleasePlayer(this);
|
||||
} else if (super->contactFlags & 0x80) {
|
||||
u8 tmp = super->contactFlags & ~0x80;
|
||||
} else if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
u8 tmp = super->contactFlags & ~CONTACT_TAKE_DAMAGE;
|
||||
if (tmp == 0) {
|
||||
super->action = 7;
|
||||
super->timer = 95;
|
||||
|
||||
@@ -518,7 +518,7 @@ void sub_0802A098(MadderpillarEntity* this) {
|
||||
|
||||
void sub_0802A0F8(MadderpillarEntity* this) {
|
||||
if (super->health != 0) {
|
||||
if ((super->contactFlags & 0x80) && super->iframes != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) && super->iframes != 0) {
|
||||
Entity* entity = super;
|
||||
u32 i;
|
||||
for (i = 0; i < 6; i++) {
|
||||
@@ -549,7 +549,7 @@ void sub_0802A16C(MadderpillarEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0802A18C(MadderpillarEntity* this) {
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
||||
@@ -167,7 +167,8 @@ void MazaalBracelet_OnCollision(MazaalBraceletEntity* this) {
|
||||
|
||||
if (super->type < 2) {
|
||||
if (super->action != 0x2b) {
|
||||
if ((0 < super->iframes) && ((super->contactFlags == 0x95 || (super->contactFlags == 0x8e)))) {
|
||||
if ((0 < super->iframes) && ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15) ||
|
||||
(super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe))))) {
|
||||
super->action = 0x28;
|
||||
COLLISION_OFF(super);
|
||||
entity = (MazaalBraceletEntity*)super->parent;
|
||||
@@ -1299,7 +1300,7 @@ u32 sub_0803B870(MazaalBraceletEntity* this) {
|
||||
Entity* entity;
|
||||
|
||||
entity = super->child;
|
||||
if ((entity->contactFlags & 0x80) != 0 && (gPlayerState.flags & PL_CAPTURED)) {
|
||||
if ((entity->contactFlags & CONTACT_TAKE_DAMAGE) != 0 && (gPlayerState.flags & PL_CAPTURED)) {
|
||||
super->action = 0x18;
|
||||
super->timer = 68;
|
||||
super->spriteSettings.draw = 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ void sub_08034CC4(MazaalMacroEntity* this) {
|
||||
this->unk_78 = 0x4b0;
|
||||
sub_08034F70(this);
|
||||
InitializeAnimation(super, super->type);
|
||||
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetBottomTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
|
||||
entity = CreateEnemy(MAZAAL_MACRO, 2);
|
||||
if (entity != NULL) {
|
||||
super->child = entity;
|
||||
|
||||
@@ -101,7 +101,7 @@ void Moldworm_OnCollision(MoldwormEntity* this) {
|
||||
super->iframes = -8;
|
||||
this->unk_7f = 0;
|
||||
this->unk_7b = 0;
|
||||
if (super->contactFlags == 0x80 || super->contactFlags == 0x9e) {
|
||||
if (super->contactFlags == CONTACT_TAKE_DAMAGE || super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1e)) {
|
||||
super->type2 = 0;
|
||||
this->unk_80 = 0x14;
|
||||
} else {
|
||||
@@ -441,7 +441,7 @@ void sub_08023894(MoldwormEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0802390C(MoldwormEntity* this) {
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
Entity* ent = super->child;
|
||||
do {
|
||||
ent->iframes = super->iframes;
|
||||
@@ -449,7 +449,7 @@ void sub_0802390C(MoldwormEntity* this) {
|
||||
} else {
|
||||
Entity* ent = super->child;
|
||||
do {
|
||||
if (ent->contactFlags & 0x80) {
|
||||
if (ent->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
u8 bVar2 = 0xff - ent->health;
|
||||
if (bVar2 != 0) {
|
||||
u32 tmp;
|
||||
|
||||
@@ -55,7 +55,7 @@ void Mulldozer_OnCollision(MulldozerEntity* this) {
|
||||
EnemyCreateFX(super, 0x1c);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, Mulldozer_Functions);
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
|
||||
switch (super->contactFlags & 0x3f) {
|
||||
case 2:
|
||||
case 3:
|
||||
|
||||
@@ -117,7 +117,7 @@ void sub_08037E14(Entity* this) {
|
||||
s32 x, y;
|
||||
this->timer = 8;
|
||||
dir = (GetFacingDirection(this, &gPlayerEntity.base) + 4) & 0x18;
|
||||
layer = (u8*)GetLayerByIndex(this->collisionLayer)->collisionData;
|
||||
layer = (u8*)GetTileBuffer(this->collisionLayer)->collisionData;
|
||||
ptr = gUnk_080CF498 + (dir >> 2);
|
||||
x = this->x.HALF.HI + *ptr;
|
||||
y = this->y.HALF.HI + *(ptr + 1);
|
||||
|
||||
+3
-3
@@ -61,7 +61,7 @@ void Peahat_OnTick(PeahatEntity* this) {
|
||||
|
||||
void Peahat_OnCollision(PeahatEntity* this) {
|
||||
if (this->unk_82) {
|
||||
if (super->contactFlags == 0x94) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x14)) {
|
||||
Entity* entity = CreateEnemy(PEAHAT, PeahatForm_Propeller);
|
||||
if (entity != NULL) {
|
||||
CopyPosition(super, entity);
|
||||
@@ -74,14 +74,14 @@ void Peahat_OnCollision(PeahatEntity* this) {
|
||||
super->iframes = -30;
|
||||
this->unk_81 = 0;
|
||||
InitializeAnimation(super, super->animationState);
|
||||
} else if (super->contactFlags == 0x9b) {
|
||||
} else if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1b)) {
|
||||
super->animationState = PeahatAnimation_BrokenPropeller;
|
||||
super->action = 5;
|
||||
super->speed = 0x80;
|
||||
super->iframes = -30;
|
||||
this->unk_81 = 0;
|
||||
InitializeAnimation(super, super->animationState);
|
||||
} else if (super->contactFlags == 0x80) {
|
||||
} else if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
if (super->animationState == PeahatAnimation_Flying) {
|
||||
super->action = 1;
|
||||
super->timer = 30;
|
||||
|
||||
+3
-2
@@ -65,7 +65,7 @@ void Pesto_OnTick(PestoEntity* this) {
|
||||
|
||||
void Pesto_OnCollision(PestoEntity* this) {
|
||||
if (super->hitType != 0x6e) {
|
||||
if (super->contactFlags == 0x80) {
|
||||
if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
this->unk_86 = 0x30;
|
||||
|
||||
if ((this->unk_83 & 0xf) == 3 && super->action == 6) {
|
||||
@@ -446,7 +446,8 @@ void sub_080244E8(PestoEntity* this) {
|
||||
super->timer = 12;
|
||||
this->unk_83 &= ~0x80;
|
||||
entity = super->child;
|
||||
SetTile(((PestoEntity*)entity)->unk_70, COORD_TO_TILE(entity), entity->collisionLayer);
|
||||
SetBottomTile(((PestoEntity*)entity)->unk_70, COORD_TO_TILE(entity),
|
||||
entity->collisionLayer);
|
||||
DeleteEntity(entity);
|
||||
super->z.HALF.HI -= 0xe;
|
||||
this->unk_78 -= 0xe;
|
||||
|
||||
@@ -100,7 +100,7 @@ void sub_080223E4(Entity* this) {
|
||||
|
||||
entity = this->child;
|
||||
if (entity != NULL) {
|
||||
entity->contactFlags = 0x94;
|
||||
entity->contactFlags = (CONTACT_TAKE_DAMAGE | 0x14);
|
||||
entity->iframes = 0x10;
|
||||
#ifndef EU
|
||||
entity->knockbackDuration = 0xc;
|
||||
|
||||
@@ -51,7 +51,7 @@ void Rollobite_OnCollision(RollobiteEntity* this) {
|
||||
InitializeAnimation(super, super->animationState + 8);
|
||||
}
|
||||
|
||||
if (super->contactFlags != 0x80) {
|
||||
if (super->contactFlags != CONTACT_TAKE_DAMAGE) {
|
||||
if (super->action == 4 || super->action == 5) {
|
||||
super->action = 4;
|
||||
super->timer = 180;
|
||||
@@ -60,7 +60,7 @@ void Rollobite_OnCollision(RollobiteEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
if (super->contactFlags == 0x93)
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13))
|
||||
Rollobite_OnTick(this);
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ bool32 Rollobite_TryToHoleUp(RollobiteEntity* this) {
|
||||
super->y.HALF.HI += 13;
|
||||
super->zVelocity = Q_16_16(2.0);
|
||||
InitializeAnimation(super, super->animationState + 0x14);
|
||||
SetTile(0x4034, tile, super->collisionLayer);
|
||||
SetBottomTile(0x4034, tile, super->collisionLayer);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ void RupeeLike(RupeeLikeEntity* this) {
|
||||
u32 uVar1;
|
||||
|
||||
if (super->type2 == 0) {
|
||||
uVar1 = (u8)sub_080043E8(super);
|
||||
uVar1 = (u8)GetTileHazardType(super);
|
||||
if (uVar1 != 0) {
|
||||
if (super->action == 4) {
|
||||
sub_080296D8(this);
|
||||
|
||||
@@ -44,7 +44,7 @@ void ScissorsBeetle_OnCollision(ScissorsBeetleEntity* this) {
|
||||
}
|
||||
|
||||
EnemyFunctionHandlerAfterCollision(super, ScissorsBeetle_Functions);
|
||||
if ((super->contactFlags & 0x80) && super->action != 4) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) && super->action != 4) {
|
||||
u32 knockbackDir;
|
||||
child = super->child;
|
||||
child->iframes = super->iframes;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ void Spark_OnTick(Entity* this) {
|
||||
void Spark_OnCollision(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (this->contactFlags & 0x80) {
|
||||
if (this->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if ((this->contactFlags & 0x7f) == 0x14) {
|
||||
COLLISION_OFF(this);
|
||||
this->iframes = 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ void SpearMoblin_OnCollision(SpearMoblinEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
|
||||
EnemyFunctionHandlerAfterCollision(super, SpearMoblin_Functions);
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if (super->action != 4) {
|
||||
sub_08028754(this);
|
||||
} else {
|
||||
@@ -398,7 +398,7 @@ bool32 sub_080288A4(SpearMoblinEntity* this) {
|
||||
|
||||
void sub_080288C0(SpearMoblinEntity* this) {
|
||||
Entity* entity = super->child;
|
||||
if ((entity != NULL) && (entity->contactFlags & 0x80)) {
|
||||
if ((entity != NULL) && (entity->contactFlags & CONTACT_TAKE_DAMAGE)) {
|
||||
super->knockbackDirection = entity->knockbackDirection;
|
||||
super->iframes = -entity->iframes;
|
||||
super->knockbackSpeed = entity->knockbackSpeed;
|
||||
|
||||
@@ -49,7 +49,7 @@ void SpinyBeetle_OnCollision(SpinyBeetleEntity* this) {
|
||||
}
|
||||
|
||||
EnemyFunctionHandlerAfterCollision(super, SpinyBeetle_Functions);
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if (super->iframes > 0 && super->child) {
|
||||
sub_08033E1C(this);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ void SpinyBeetle_Init(SpinyBeetleEntity* this) {
|
||||
this->unk_7b = 0;
|
||||
this->tile = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tile, super->collisionLayer);
|
||||
SetTile(0x4022, this->tile, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->tile, super->collisionLayer);
|
||||
obj = CreateObject(OBJECT_ON_BEETLE, super->type, 0);
|
||||
|
||||
if (obj == NULL) {
|
||||
@@ -259,7 +259,7 @@ void sub_08033B44(SpinyBeetleEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
SetTile(0x4022, this->tile, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->tile, super->collisionLayer);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ void SpinyChuchu_OnCollision(SpinyChuchuEntity* this) {
|
||||
super->hitType = 0x5c;
|
||||
InitializeAnimation(super, 1);
|
||||
}
|
||||
} else if (super->contactFlags == 0x94) {
|
||||
} else if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x14)) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
super->action = 5;
|
||||
InitializeAnimation(super, 1);
|
||||
|
||||
+1
-1
@@ -437,7 +437,7 @@ void sub_08039AD4(StalfosEntity* this) {
|
||||
super->action = 0xb;
|
||||
super->child = projectile;
|
||||
InitAnimationForceUpdate(super, super->animationState + 0x18);
|
||||
SetTile(0x4067, position, super->collisionLayer);
|
||||
SetBottomTile(0x4067, position, super->collisionLayer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ void Takkuri_OnTick(TakkuriEntity* this) {
|
||||
}
|
||||
|
||||
void Takkuri_OnCollision(TakkuriEntity* this) {
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if ((super->contactFlags & 0x7f) == 0) {
|
||||
u32 direction;
|
||||
sub_0803C0AC(super);
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ void Tektite_OnCollision(TektiteEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, Tektite_Functions);
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
|
||||
switch (super->contactFlags & 0x3f) {
|
||||
case 0x14:
|
||||
super->action = 1;
|
||||
|
||||
@@ -51,7 +51,7 @@ void TektiteGolden_OnCollision(TektiteGoldenEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, TektiteGolden_Functions);
|
||||
if (super->contactFlags == 0x94) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x14)) {
|
||||
super->action = 1;
|
||||
super->subAction = 0;
|
||||
super->timer = 20;
|
||||
|
||||
@@ -1401,7 +1401,7 @@ static void sub_08043C40(VaatiArmEntity* this, VaatiArm_HeapStruct1* heapStruct)
|
||||
static bool32 sub_08043C98(VaatiArmEntity* this) {
|
||||
#if defined EU || defined JP
|
||||
Entity* e1 = &((VaatiArm_HeapStruct*)super->myHeap)->entities[3]->base;
|
||||
if ((e1->contactFlags == 0x9d)) {
|
||||
if ((e1->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d))) {
|
||||
sub_08043D08(this);
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -1410,7 +1410,7 @@ static bool32 sub_08043C98(VaatiArmEntity* this) {
|
||||
#else
|
||||
Entity* e1 = &((VaatiArm_HeapStruct*)super->myHeap)->entities[2]->base;
|
||||
Entity* e2 = &((VaatiArm_HeapStruct*)super->myHeap)->entities[3]->base;
|
||||
if ((e1->contactFlags == 0x9d) || (e2->contactFlags == 0x9d)) {
|
||||
if ((e1->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) || (e2->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d))) {
|
||||
sub_08043D08(this);
|
||||
gRoomTransition.field_0x38 |= 2;
|
||||
return TRUE;
|
||||
@@ -1423,7 +1423,7 @@ static bool32 sub_08043C98(VaatiArmEntity* this) {
|
||||
static void sub_08043CD4(VaatiArmEntity* this) {
|
||||
u32 i;
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (((VaatiArm_HeapStruct*)super->myHeap)->entities[i]->base.contactFlags == 0x9d) {
|
||||
if (((VaatiArm_HeapStruct*)super->myHeap)->entities[i]->base.contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
|
||||
this->unk_7c = 0x78;
|
||||
this->unk_7d = i;
|
||||
return;
|
||||
|
||||
@@ -58,7 +58,7 @@ void VaatiBall(VaatiBallEntity* this) {
|
||||
super->health = -1;
|
||||
}
|
||||
|
||||
if (super->contactFlags & 0x80) {
|
||||
if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
|
||||
if ((super->contactFlags & 0x3f) == 0 && super->action == 6) {
|
||||
ModHealth(-2);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ void VaatiProjectile_OnTick(VaatiProjectileEntity* this) {
|
||||
void VaatiProjectile_OnCollision(VaatiProjectileEntity* this) {
|
||||
Entity* entity;
|
||||
|
||||
if (super->contactFlags == 0x80) {
|
||||
if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
|
||||
#ifndef EU
|
||||
if (super->health != 0) {
|
||||
#endif
|
||||
@@ -285,6 +285,6 @@ void sub_0803E4D8(VaatiProjectileEntity* this) {
|
||||
|
||||
tile = TILE(super->x.HALF.HI, super->y.HALF.HI + 8);
|
||||
if (sub_080B1B44(tile, gPlayerEntity.base.collisionLayer) != 0xff) {
|
||||
SetTile(0x4074, tile, gPlayerEntity.base.collisionLayer);
|
||||
SetBottomTile(0x4074, tile, gPlayerEntity.base.collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ void VaatiRebornEnemyType1Action1(VaatiRebornEnemyEntity* this) {
|
||||
super->hitType = 0x2f;
|
||||
InitAnimationForceUpdate(super, this->unk_74);
|
||||
} else {
|
||||
if (((super->contactFlags & 0x80) != 0) && (0 < super->iframes)) {
|
||||
if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (0 < super->iframes)) {
|
||||
parent->iframes = super->iframes;
|
||||
parent->contactFlags = super->contactFlags;
|
||||
}
|
||||
@@ -665,7 +665,7 @@ void VaatiRebornEnemyType1PreAction(VaatiRebornEnemyEntity* this) {
|
||||
}
|
||||
parent = super->parent;
|
||||
this->unk_77 = 0;
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
|
||||
if (gUnk_080D04D0[((VaatiRebornEnemyEntity*)parent)->unk_86] > super->health) {
|
||||
if (2 < ++((VaatiRebornEnemyEntity*)parent)->unk_86) {
|
||||
COLLISION_OFF(super);
|
||||
|
||||
@@ -1097,11 +1097,11 @@ void sub_080409B0(VaatiTransfiguredEntity* this) {
|
||||
Knockback1(super);
|
||||
}
|
||||
} else {
|
||||
if (((super->contactFlags & 0x80) != 0) && (0 < super->iframes)) {
|
||||
if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (0 < super->iframes)) {
|
||||
InitScreenShake(12, 1);
|
||||
SoundReq(SFX_BOSS_HIT);
|
||||
}
|
||||
if ((super->contactFlags == 0x8a) && (gPlayerState.chargeState.action == 5)) {
|
||||
if ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xa)) && (gPlayerState.chargeState.action == 5)) {
|
||||
super->health = 0xc0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void VaatiTransfiguredEye_OnCollision(VaatiTransfiguredEyeEntity* this) {
|
||||
|
||||
if (super->type != 0) {
|
||||
pEVar4 = super->parent->parent;
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
|
||||
bVar1 = super->contactFlags & 0x3f;
|
||||
if ((bVar1 == 0xe) || (bVar1 == 0x15)) {
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ const s8 gUnk_080D0EB0[] = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x0
|
||||
0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd };
|
||||
|
||||
void VaatiWrath(VaatiWrathEntity* this) {
|
||||
if (((super->type == 0) && ((super->contactFlags & 0x80) != 0)) && (super->health == 0)) {
|
||||
if (((super->type == 0) && ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0)) && (super->health == 0)) {
|
||||
COLLISION_ON(super);
|
||||
super->health = 0xff;
|
||||
if (--this->unk_84 == 0) {
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ void Wisp_OnCollision(WispEntity* this) {
|
||||
Entity* entity;
|
||||
|
||||
bits = super->contactFlags;
|
||||
if ((bits & 0x80) == 0) {
|
||||
if ((bits & CONTACT_TAKE_DAMAGE) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ void WizzrobeFire_OnCollision(WizzrobeEntity* this) {
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, WizzrobeFire_Functions);
|
||||
if (super->health == 0) {
|
||||
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) {
|
||||
super->timer = 40;
|
||||
super->subtimer = 0;
|
||||
super->flags &= ~0x80;
|
||||
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
EnqueueSFX(SFX_156);
|
||||
InitializeAnimation(super, super->direction >> 3);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ void WizzrobeIce_OnCollision(WizzrobeEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, WizzrobeIce_Functions);
|
||||
if (super->contactFlags == 0x87) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
|
||||
Entity* obj = CreateObject(FLAME, 3, 0);
|
||||
if (obj != NULL) {
|
||||
obj->spritePriority.b0 = 3;
|
||||
@@ -35,7 +35,7 @@ void WizzrobeIce_OnCollision(WizzrobeEntity* this) {
|
||||
}
|
||||
}
|
||||
if (super->health == 0) {
|
||||
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
|
||||
super->timer = 40;
|
||||
super->subtimer = 0;
|
||||
super->flags &= ~0x80;
|
||||
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
EnqueueSFX(SFX_156);
|
||||
InitializeAnimation(super, super->direction >> 3);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void WizzrobeWind_OnCollision(WizzrobeEntity* this) {
|
||||
EnemyCreateFX(super, FX_STARS);
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, WizzrobeWind_Functions);
|
||||
if (super->contactFlags == 0x87) {
|
||||
if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
|
||||
Entity* obj = CreateObject(FLAME, 3, 0);
|
||||
if (obj != NULL) {
|
||||
obj->spritePriority.b0 = 3;
|
||||
@@ -42,7 +42,7 @@ void WizzrobeWind_OnCollision(WizzrobeEntity* this) {
|
||||
}
|
||||
}
|
||||
if (super->health == 0) {
|
||||
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) {
|
||||
super->subtimer = 0;
|
||||
super->flags &= ~0x80;
|
||||
EnqueueSFX(SFX_156);
|
||||
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
InitializeAnimation(super, super->direction >> 3);
|
||||
}
|
||||
break;
|
||||
@@ -208,7 +208,7 @@ void sub_0802F888(WizzrobeEntity* this) {
|
||||
super->direction = (sub_08049F84(super, 3) + 4) & 0x18;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tilePosition, super->collisionLayer);
|
||||
SetTile(0x4071, this->tilePosition, super->collisionLayer);
|
||||
SetBottomTile(0x4071, this->tilePosition, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0802F8E4(WizzrobeEntity* this) {
|
||||
|
||||
+2
-2
@@ -314,9 +314,9 @@ void EnemyDetachFX(Entity* entity) {
|
||||
/** Unsets bitfield 0x80 before calling GetNextFunction, so that the enemyFunction 1 is not called. */
|
||||
void EnemyFunctionHandlerAfterCollision(Entity* entity, void (*const fntable[])()) {
|
||||
u32 idx;
|
||||
entity->contactFlags &= ~0x80;
|
||||
entity->contactFlags &= ~CONTACT_TAKE_DAMAGE;
|
||||
idx = GetNextFunction(entity);
|
||||
entity->contactFlags |= 0x80;
|
||||
entity->contactFlags |= CONTACT_TAKE_DAMAGE;
|
||||
fntable[idx](entity);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -219,8 +219,8 @@ void PlayerUpdate(PlayerEntity* this) {
|
||||
}
|
||||
HandlePlayerLife(super);
|
||||
DoPlayerAction(this);
|
||||
if ((super->z.WORD == 0) && (super->action == 1 || super->action == 9))
|
||||
sub_08008790(super, 8);
|
||||
if ((super->z.WORD == 0) && (super->action == PLAYER_NORMAL || super->action == PLAYER_MINISH))
|
||||
DoTileInteractionHere(super, 8);
|
||||
sub_080171F0();
|
||||
}
|
||||
sub_08078FB0(super);
|
||||
@@ -236,7 +236,7 @@ static void HandlePlayerLife(Entity* this) {
|
||||
gUnk_0200AF00.rActionInteractTile = R_ACTION_NONE;
|
||||
gUnk_0200AF00.rActionGrabbing = R_ACTION_NONE;
|
||||
|
||||
if ((gPlayerEntity.base.contactFlags & 0x80) && (gPlayerEntity.base.iframes > 0))
|
||||
if ((gPlayerEntity.base.contactFlags & CONTACT_TAKE_DAMAGE) && (gPlayerEntity.base.iframes > 0))
|
||||
SoundReq(SFX_86);
|
||||
|
||||
gPlayerState.flags &= ~(PL_FALLING | PL_CONVEYOR_PUSHED);
|
||||
@@ -323,7 +323,7 @@ static void sub_080171F0(void) {
|
||||
if (gPlayerEntity.unk_7a != 0)
|
||||
gPlayerEntity.unk_7a--;
|
||||
|
||||
gPlayerEntity.base.contactFlags &= ~0x80;
|
||||
gPlayerEntity.base.contactFlags &= ~CONTACT_TAKE_DAMAGE;
|
||||
if (gPlayerEntity.base.action != PLAYER_DROWN)
|
||||
COPY_FLAG_FROM_TO(gPlayerState.flags, 0x2, 0x10000);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "object.h"
|
||||
|
||||
s32 sub_080774A0(void);
|
||||
extern s32 sub_0800875A(Entity*, u32, ItemBehavior*);
|
||||
extern s32 DoItemTileInteraction(Entity*, u32, ItemBehavior*);
|
||||
extern void UpdatePlayerMovement(void);
|
||||
extern bool32 sub_0807B5B0(Entity*);
|
||||
void sub_08077130(ItemBehavior*, u32);
|
||||
@@ -70,7 +70,7 @@ void sub_080771C8(ItemBehavior* this, u32 index) {
|
||||
CreateObjectWithParent(&gPlayerEntity.base, MOLE_MITTS_PARTICLE, this->playerFrame, 1);
|
||||
}
|
||||
if ((this->playerFrame & 0x10) != 0) {
|
||||
if (sub_0800875A(&gPlayerEntity.base, 0xd, this) == 0) {
|
||||
if (DoItemTileInteraction(&gPlayerEntity.base, 0xd, this) == 0) {
|
||||
SetItemAnim(this, ANIM_MOLEMITTS_MISS);
|
||||
this->stateID = 3;
|
||||
SoundReq(SFX_ITEM_GLOVES_AIR);
|
||||
|
||||
@@ -14,7 +14,7 @@ void sub_08076518(ItemBehavior*, u32);
|
||||
void sub_080765E0(ItemBehavior*, u32);
|
||||
void sub_0807660C(ItemBehavior*, u32);
|
||||
|
||||
extern s32 sub_0800875A(Entity*, u32, ItemBehavior*);
|
||||
extern s32 DoItemTileInteraction(Entity*, u32, ItemBehavior*);
|
||||
|
||||
extern const u16 gUnk_0811BE38[];
|
||||
extern const u16 gUnk_0811BE40[];
|
||||
@@ -168,7 +168,7 @@ void sub_080762D8(ItemBehavior* this, u32 index) {
|
||||
|
||||
if (!gPlayerState.jump_status) {
|
||||
|
||||
if (gPlayerState.heldObject == 1 && sub_0800875A(&gPlayerEntity.base, 6, this) != 0) {
|
||||
if (gPlayerState.heldObject == 1 && DoItemTileInteraction(&gPlayerEntity.base, 6, this) != 0) {
|
||||
sub_08076088(this, NULL, index);
|
||||
return;
|
||||
} else if (gUnk_0811BE38[gPlayerEntity.base.animationState >> 1] & gPlayerState.playerInput.heldInput) {
|
||||
|
||||
@@ -53,9 +53,9 @@ void DiggingCaveEntranceManager_Init(DiggingCaveEntranceManager* this) {
|
||||
tile = 0x81 << 7; // 0x4080
|
||||
for (entrance = GetDiggingCaveEntranceForRoom(entrance, room); entrance != 0;
|
||||
entrance = GetDiggingCaveEntranceForRoom(entrance, room)) {
|
||||
SetTile(tile, entrance->sourceTilePosition + TILE_POS(-1, 1), 1);
|
||||
SetTile(tile, entrance->sourceTilePosition + TILE_POS(0, 1), 1);
|
||||
SetTile(tile, entrance->sourceTilePosition + TILE_POS(1, 1), 1);
|
||||
SetBottomTile(tile, entrance->sourceTilePosition + TILE_POS(-1, 1), 1);
|
||||
SetBottomTile(tile, entrance->sourceTilePosition + TILE_POS(0, 1), 1);
|
||||
SetBottomTile(tile, entrance->sourceTilePosition + TILE_POS(1, 1), 1);
|
||||
entrance++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ void FlameManager_Main(FlameManager* this) {
|
||||
this->field_0x38 = TILE(this->field_0x38, this->field_0x3a);
|
||||
if (GetTileType(this->field_0x38, 2) == 0x75) {
|
||||
super->action = 1;
|
||||
SetTile(0x406a, this->field_0x38, 1);
|
||||
SetBottomTile(0x406a, this->field_0x38, 1);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -26,7 +26,7 @@ void FlameManager_Main(FlameManager* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (GetTileType(this->field_0x38, 2) == 0x76) {
|
||||
SetTile(0x406b, this->field_0x38, 1);
|
||||
SetBottomTile(0x406b, this->field_0x38, 1);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void sub_0805CBD0(Manager29* this) {
|
||||
this->unk_38 = (this->unk_38 >> 4 & 0x3fU) | (((this->unk_3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
this->unk_3a = (this->unk_3c >> 4 & 0x3f) | (((this->unk_36 + this->unk_37 * 0x100) >> 4 & 0x3fU) << 6);
|
||||
this->unk_3c = GetTileType(this->unk_38, this->unk_34);
|
||||
layer = GetLayerByIndex(this->unk_34);
|
||||
layer = GetTileBuffer(this->unk_34);
|
||||
this->unk_28 = (u16*)layer->metatileTypes;
|
||||
this->unk_2c = &layer->mapData[(s16)this->unk_3a];
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ void TileChangeObserveManager_Init(TileChangeObserveManager* this) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
super->action = 1;
|
||||
tile = &GetLayerByIndex(this->field_0x3a)->mapData[this->tilePosition];
|
||||
tile = &GetTileBuffer(this->field_0x3a)->mapData[this->tilePosition];
|
||||
this->observedTile = tile;
|
||||
this->initialTile = tile[0];
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "functions.h"
|
||||
|
||||
void WaterfallBottomManager_Main(WaterfallBottomManager* this) {
|
||||
SetTile(0x4014, 0x5c3, 1);
|
||||
SetBottomTile(0x4014, 0x5c3, 1);
|
||||
if ((gRoomControls.origin_y + 200 < gPlayerEntity.base.y.HALF.HI) &&
|
||||
((u32)(gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x) - 0x30 < 0x11)) {
|
||||
gPlayerEntity.base.collisionLayer = 3;
|
||||
|
||||
+1
-1
@@ -1612,7 +1612,7 @@ void CalculateEntityTileCollisions(Entity* this, u32 direction, u32 collisionTyp
|
||||
u32 hitboxUnkX;
|
||||
u32 hitboxUnkY;
|
||||
|
||||
layer = GetLayerByIndex(this->collisionLayer)->collisionData;
|
||||
layer = GetTileBuffer(this->collisionLayer)->collisionData;
|
||||
hb = this->hitbox;
|
||||
xMin = this->x.HALF.HI + hb->offset_x;
|
||||
yMin = this->y.HALF.HI + hb->offset_y;
|
||||
|
||||
@@ -78,20 +78,20 @@ void sub_08067418(CastorWildsStatueEntity* this) {
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
if (super->type == 0) {
|
||||
super->hitbox = (Hitbox*)&gUnk_08110E94;
|
||||
SetTile(0x4022, this->tilePos - 1, super->collisionLayer);
|
||||
SetTile(0x4022, this->tilePos, super->collisionLayer);
|
||||
SetTile(0x4022, this->tilePos + 0x3f, super->collisionLayer);
|
||||
SetTile(0x4022, this->tilePos + 0x40, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->tilePos - 1, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->tilePos, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->tilePos + 0x3f, super->collisionLayer);
|
||||
SetBottomTile(0x4022, this->tilePos + 0x40, super->collisionLayer);
|
||||
} else {
|
||||
super->collisionLayer = 3;
|
||||
super->spriteOrientation.flipY = 1;
|
||||
super->spriteRendering.b3 = 1;
|
||||
super->spritePriority.b0 = 2;
|
||||
if (CheckLocalFlag(HIKYOU_00_SEKIZOU) == 0) {
|
||||
SetTile(0x4022, 0xe81, 1);
|
||||
SetTile(0x4022, 0xe82, 1);
|
||||
SetTile(0x4022, 0xe83, 1);
|
||||
SetTile(0x4022, 0xec3, 1);
|
||||
SetBottomTile(0x4022, 0xe81, 1);
|
||||
SetBottomTile(0x4022, 0xe82, 1);
|
||||
SetBottomTile(0x4022, 0xe83, 1);
|
||||
SetBottomTile(0x4022, 0xec3, 1);
|
||||
}
|
||||
}
|
||||
InitScriptForNPC(super);
|
||||
|
||||
@@ -36,12 +36,12 @@ void sub_0806DD90(Entity* this) {
|
||||
InitializeAnimation(this, animIndex);
|
||||
x = this->x.HALF.HI;
|
||||
y = this->y.HALF.HI;
|
||||
SetTile(0x4072, TILE(x - 0x18, y - 0x10), this->collisionLayer);
|
||||
SetTile(0x4072, TILE(x - 0x18, y), this->collisionLayer);
|
||||
SetTile(0x4072, TILE(x - 0x18, y + 0x10), this->collisionLayer);
|
||||
SetTile(0x4072, TILE(x + 0x18, y - 0x10), this->collisionLayer);
|
||||
SetTile(0x4072, TILE(x + 0x18, y), this->collisionLayer);
|
||||
SetTile(0x4072, TILE(x + 0x18, y + 0x10), this->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(x - 0x18, y - 0x10), this->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(x - 0x18, y), this->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(x - 0x18, y + 0x10), this->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(x + 0x18, y - 0x10), this->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(x + 0x18, y), this->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(x + 0x18, y + 0x10), this->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0806DEC8(Entity* this) {
|
||||
|
||||
+1
-1
@@ -235,7 +235,7 @@ void sub_08069B44(DogEntity* this) {
|
||||
super->action = 4;
|
||||
}
|
||||
if ((super->type == 2) && (CheckLocalFlag(MACHI_02_DOG) == 0)) {
|
||||
SetTile(0x4072, TILE(super->x.HALF.HI, super->y.HALF.HI - 8), super->collisionLayer);
|
||||
SetBottomTile(0x4072, TILE(super->x.HALF.HI, super->y.HALF.HI - 8), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -539,12 +539,12 @@ void sub_080626E0(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_08062788(Entity* this, ScriptExecutionContext* context) {
|
||||
SetTile(0x4072, 0x60b, 1);
|
||||
SetTile(0x4072, 0x60c, 1);
|
||||
SetTile(0x4072, 0x60d, 1);
|
||||
SetTile(0x4072, 0x64b, 1);
|
||||
SetTile(0x4072, 0x64c, 1);
|
||||
SetTile(0x4072, 0x64d, 1);
|
||||
SetBottomTile(0x4072, 0x60b, 1);
|
||||
SetBottomTile(0x4072, 0x60c, 1);
|
||||
SetBottomTile(0x4072, 0x60d, 1);
|
||||
SetBottomTile(0x4072, 0x64b, 1);
|
||||
SetBottomTile(0x4072, 0x64c, 1);
|
||||
SetBottomTile(0x4072, 0x64d, 1);
|
||||
}
|
||||
|
||||
void sub_080627E8(Entity* this, ScriptExecutionContext* context) {
|
||||
|
||||
+4
-4
@@ -68,7 +68,7 @@ u32 PointInsideRadius(s32, s32, s32);
|
||||
|
||||
u32 sub_080611D4(Entity*);
|
||||
extern u32 sub_08079FD4(Entity*, u32);
|
||||
extern void sub_08016AD2(Entity*);
|
||||
extern void UpdateCollisionLayer(Entity*);
|
||||
|
||||
bool32 sub_08061630(NPC5Entity*, s32, s32, s32);
|
||||
bool32 sub_08061720(NPC5Entity*, s32, s32, s32);
|
||||
@@ -471,7 +471,7 @@ bool32 sub_08061170(NPC5Entity* this) {
|
||||
}
|
||||
return FALSE;
|
||||
} else {
|
||||
sub_08016AD2(super);
|
||||
UpdateCollisionLayer(super);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ u32 sub_080611D4(Entity* this) {
|
||||
ptr = (s8*)gUnk_0810AC4C;
|
||||
a = ptr[x];
|
||||
b = ptr[x + 1];
|
||||
uVar2 = GetRelativeCollisionTile(this, a, b);
|
||||
uVar2 = GetActTileRelative(this, a, b);
|
||||
ptr2 = gUnk_0810AC54;
|
||||
|
||||
do {
|
||||
@@ -525,7 +525,7 @@ u32 sub_080611D4(Entity* this) {
|
||||
|
||||
u32 sub_08061230(NPC5Entity* this) {
|
||||
if ((((UnkHeap*)super->myHeap)->unk_0 & 1) == 0) {
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ void ObjectUpdate(Entity* this) {
|
||||
this->iframes++;
|
||||
if (!EntityDisabled(this)) {
|
||||
gObjectFunctions[this->id](this);
|
||||
this->contactFlags &= ~0x80;
|
||||
this->contactFlags &= ~CONTACT_TAKE_DAMAGE;
|
||||
}
|
||||
DrawEntity(this);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ void sub_0808BBE0(Entity* this) {
|
||||
ptr = &gUnk_0812144C[diff * 2];
|
||||
SetAffineInfo(this, ptr[0], ptr[1], 0);
|
||||
} else {
|
||||
this->contactFlags &= ~0x80;
|
||||
this->contactFlags &= ~CONTACT_TAKE_DAMAGE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void BarrelSpiderweb_Action1(Entity* this) {
|
||||
tmp = -0x170;
|
||||
this->y.HALF.HI = gRoomControls.origin_y - ((this->parent)->zVelocity + tmp);
|
||||
sub_0808BBE0(this);
|
||||
if (this->contactFlags == 0x93) {
|
||||
if (this->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13)) {
|
||||
this->timer--;
|
||||
this->spriteSettings.draw = 1;
|
||||
if (this->timer == 0) {
|
||||
@@ -114,7 +114,7 @@ void BarrelSpiderweb_Action2(Entity* this) {
|
||||
this->subtimer -= 8;
|
||||
SetAffineInfo(this, 0x200 - this->subtimer, 0x200 - this->subtimer, 0);
|
||||
}
|
||||
if (this->contactFlags == 0x93) {
|
||||
if (this->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13)) {
|
||||
this->direction = GetFacingDirection(this, &gPlayerEntity.base);
|
||||
LinearMoveUpdate(this);
|
||||
if (EntityWithinDistance(this, gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI - 6, 0x1c)) {
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void DirtParticle_Init(DirtParticleEntity* this) {
|
||||
|
||||
void DirtParticle_Action1(DirtParticleEntity* this) {
|
||||
DirtParticleEntity* entity;
|
||||
if ((super->contactFlags & 0x80) == 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) == 0) {
|
||||
return;
|
||||
}
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
@@ -128,7 +128,7 @@ void DirtParticle_Action3(DirtParticleEntity* this) {
|
||||
sub_08087B9C,
|
||||
sub_08087B9C,
|
||||
};
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
|
||||
gUnk_08120A80[super->subAction](this);
|
||||
} else {
|
||||
super->action = 1;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -50,7 +50,7 @@ void EyeSwitch_Init(EyeSwitchEntity* this) {
|
||||
}
|
||||
|
||||
void EyeSwitch_Action1(EyeSwitchEntity* this) {
|
||||
if ((super->contactFlags == 0x95 || super->contactFlags == 0x8e) &&
|
||||
if ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15) || super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe)) &&
|
||||
(DirectionRoundUp(super->contactedEntity->direction) >> 3 == (super->animationState & 3))) {
|
||||
super->action = 2;
|
||||
COLLISION_OFF(super);
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ void Fairy(FairyEntity* this) {
|
||||
Fairy_Init, Fairy_Action1, Fairy_Action2, Fairy_Action3, Fairy_Action4,
|
||||
};
|
||||
|
||||
if (((super->contactFlags & 0x80) != 0)) {
|
||||
if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0)) {
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
case 0x14:
|
||||
super->action = 3;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user