mirror of
https://github.com/zeldaret/tmc
synced 2026-08-18 05:38:50 -04:00
merge upstream
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
*
|
||||
* @brief Graveyard Key object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "asm.h"
|
||||
#include "collision.h"
|
||||
#include "effects.h"
|
||||
@@ -93,7 +92,7 @@ void GraveyardKey_Init(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
if ((this->direction & DIR_NOT_MOVING_CHECK)) {
|
||||
dir = this->direction;
|
||||
if (dir == (DIR_NOT_MOVING_CHECK | 0x1)) {
|
||||
this->direction = (((gPlayerEntity.animationState * 4 + (Random() & 3)) - 2) & 0x1f) ^ DirectionSouth;
|
||||
this->direction = (((gPlayerEntity.base.animationState * 4 + (Random() & 3)) - 2) & 0x1f) ^ DirectionSouth;
|
||||
}
|
||||
}
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
@@ -131,7 +130,7 @@ void GraveyardKey_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
this->zVelocity = param_2->unk14 << 3;
|
||||
} else {
|
||||
this->action++;
|
||||
this->collisionLayer = gPlayerEntity.collisionLayer;
|
||||
this->collisionLayer = gPlayerEntity.base.collisionLayer;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
if (param_2->funcEnt != NULL) {
|
||||
param_2->funcEnt(this);
|
||||
@@ -178,13 +177,14 @@ void sub_0809D91C(Entity* this) {
|
||||
bool32 sub_0809D93C(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
u32 uVar1;
|
||||
|
||||
if (gPlayerEntity.action == PLAYER_BOUNCE && ((param_2->unk0c >> gPlayerEntity.animationState & 1) != 0)) {
|
||||
uVar1 = (gPlayerEntity.x.HALF.HI - this->x.HALF.HI) + param_2->unk08 + param_2->unk0a;
|
||||
if (gPlayerEntity.base.action == PLAYER_BOUNCE &&
|
||||
((param_2->unk0c >> gPlayerEntity.base.animationState & 1) != 0)) {
|
||||
uVar1 = (gPlayerEntity.base.x.HALF.HI - this->x.HALF.HI) + param_2->unk08 + param_2->unk0a;
|
||||
if (param_2->unk0a * 2 <= (u16)uVar1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uVar1 = (gPlayerEntity.y.HALF.HI - (this->y.HALF.HI + param_2->y)) + param_2->unk09 + param_2->unk0b;
|
||||
uVar1 = (gPlayerEntity.base.y.HALF.HI - (this->y.HALF.HI + param_2->y)) + param_2->unk09 + param_2->unk0b;
|
||||
if (param_2->unk0b * 2 > (u16)uVar1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user