This commit is contained in:
theo3
2022-03-28 21:01:02 -07:00
parent 6000b4f2d3
commit 65b80571b2
41 changed files with 117 additions and 118 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ void BladeTrap(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->child = GetCurrentRoomProperty(this->type);
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
}
if (!(this->direction & 0x80)) {
LinearMoveUpdate(this);
@@ -24,6 +24,6 @@ void BladeTrap(Entity* this) {
if (!(this->direction & 0x80)) {
EnqueueSFX(SFX_METAL_CLINK);
}
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
}
}
+2 -2
View File
@@ -27,7 +27,7 @@ void Bombarossa_OnTick(BombarossaEntity* this) {
InitializeAnimation(super, 0);
if (super->type != 0) {
super->child = GetCurrentRoomProperty(super->type);
sub_080A2CC0(super, (u16**)&super->child, &this->unk_0x76);
UpdateRailMovement(super, (u16**)&super->child, &this->unk_0x76);
}
}
@@ -68,7 +68,7 @@ void sub_0803350C(BombarossaEntity* this) {
}
if (--this->unk_0x76 == 0) {
sub_080A2CC0(super, (u16**)&super->child, &this->unk_0x76);
UpdateRailMovement(super, (u16**)&super->child, &this->unk_0x76);
}
}
+5 -5
View File
@@ -309,7 +309,7 @@ void Enemy64_Action4(Enemy64Entity* this) {
void Enemy64_Action4_SubAction0(Enemy64Entity* this) {
SoundReq(SFX_BOSS_DIE);
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
SetPlayerControl(CONTROL_2);
super->subAction = 2;
super->timer = 0x1e;
@@ -320,7 +320,7 @@ void Enemy64_Action4_SubAction0(Enemy64Entity* this) {
}
void Enemy64_Action4_SubAction1(Enemy64Entity* this) {
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
SetPlayerControl(CONTROL_2);
super->subAction = 2;
super->timer = 1;
@@ -438,7 +438,7 @@ void sub_08049998(Enemy64Entity* this, u32 param_2) {
tmpX = super->x.HALF.HI;
tmpY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (((this->unk_7c & 1) != 0) && sub_08079F8C()) {
if (((this->unk_7c & 1) != 0) && PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI = (super->x.HALF.HI - tmpX) + gPlayerEntity.x.HALF.HI;
gPlayerEntity.y.HALF.HI = (super->y.HALF.HI - tmpY) + gPlayerEntity.y.HALF.HI;
}
@@ -447,7 +447,7 @@ void sub_08049998(Enemy64Entity* this, u32 param_2) {
void sub_080499F0(Enemy64Entity* this) {
u32 tmp;
if ((((super->action != 0) && (gPlayerEntity.z.HALF.HI == 0)) && (sub_08079F8C())) && ((this->unk_7c & 1) == 0)) {
if ((((super->action != 0) && (gPlayerEntity.z.HALF.HI == 0)) && (PlayerCanBeMoved())) && ((this->unk_7c & 1) == 0)) {
if (EntityWithinDistance(&gPlayerEntity, super->x.HALF.HI, super->y.HALF.HI, 0x24) &&
((this->unk_7c & 2) == 0)) {
tmp = sub_080045DA((s32)gPlayerEntity.x.HALF.HI - super->x.HALF.HI,
@@ -491,7 +491,7 @@ void sub_08049B20(Enemy64Entity* this) {
tmpX = super->x.HALF.HI;
tmpY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (((this->unk_7c & 1) != 0) && sub_08079F8C()) {
if (((this->unk_7c & 1) != 0) && PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI = (super->x.HALF.HI - tmpX) + gPlayerEntity.x.HALF.HI;
gPlayerEntity.y.HALF.HI = (super->y.HALF.HI - tmpY) + gPlayerEntity.y.HALF.HI;
}
+3 -3
View File
@@ -1035,7 +1035,7 @@ void sub_08047DF0(GyorgMaleEntity* this, u32 unk1) {
oldY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (this->unk_7c & 1) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI += super->x.HALF.HI - oldX;
gPlayerEntity.y.HALF.HI += super->y.HALF.HI - oldY;
}
@@ -1053,7 +1053,7 @@ void sub_08047E58(GyorgMaleEntity* this) {
oldY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (this->unk_7c & 1) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI += super->x.HALF.HI - oldX;
gPlayerEntity.y.HALF.HI += super->y.HALF.HI - oldY;
}
@@ -1126,7 +1126,7 @@ void sub_08048004(GyorgMaleEntity* this) {
COLLISION_OFF(super);
if (gPlayerEntity.z.HALF.HI != 0)
return;
if (!sub_08079F8C())
if (!PlayerCanBeMoved())
return;
if (this->unk_7c & 1) {
u32 b = super->spriteRendering.b3;
+1 -1
View File
@@ -118,7 +118,7 @@ void sub_0803CDD8(Entity* this) {
void sub_0803CE14(Entity* this) {
u8 direction;
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
direction = this->direction;
if (direction & 0x80) {
+1 -1
View File
@@ -144,7 +144,7 @@ void sub_08034E68(Entity* this) {
sub_08035120(this);
}
if (gRoomTransition.field_0x39 == 0) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
this->action = 3;
scriptExecutionContext = StartCutscene(this, (u16*)script_MazaalMacroDefeated);
*(ScriptExecutionContext**)&this->cutsceneBeh = scriptExecutionContext;
+1 -1
View File
@@ -561,7 +561,7 @@ void VaatiWrathType0ActionD(Entity* this) {
void sub_08041BE8(Entity* this) {
Entity* entity;
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
this->subAction = 1;
this->timer = 120;
this->updatePriority = PRIO_NO_BLOCK;