Merge branch 'master' into enemies

This commit is contained in:
octorock
2023-12-29 23:07:22 +01:00
165 changed files with 624 additions and 603 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ void AcroBandit_Type0Action5(AcroBanditEntity* this) {
GetNextFrame(super);
if (super->frame & ANIM_DONE) {
if (gEntCount < MAX_ENTITIES - 4) {
if (gEntCount < MAX_ENTITIES - 5) {
u32 tmp = Random();
tmp &= 3;
+4 -4
View File
@@ -226,7 +226,7 @@ void BusinessScrub_Action3(BusinessScrubEntity* this) {
if (iVar1 != NULL) {
iVar1->spritePriority.b0 = 3;
iVar1->z.HALF.HI -= 12;
SetDefaultPriority(iVar1, PRIO_MESSAGE);
SetEntityPriority(iVar1, PRIO_MESSAGE);
}
SetFlag(this->unk_86);
sub_0802925C(this);
@@ -262,7 +262,7 @@ void BusinessScrub_Action5(BusinessScrubEntity* this) {
struct SalesOffering* offer = (struct SalesOffering*)this->unk_7c;
u32 subtype;
if ((gMessage.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
if ((gMessage.state & MESSAGE_ACTIVE) == 0 && sub_0802915C(this) && !sub_08056338()) {
if (offer->price <= gSave.stats.rupees) {
if (BusinessScrub_CheckRefillFitsBag(this)) {
/* Bag full. */
@@ -331,11 +331,11 @@ void BusinessScrub_Action6(BusinessScrubEntity* this) {
}
void BusinessScrub_Action7(BusinessScrubEntity* this) {
if ((gMessage.doTextBox & 0x7f) == 0) {
if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
struct SalesOffering* offer = (struct SalesOffering*)this->unk_7c;
super->action = 4;
super->subAction = gMessage.doTextBox & 0x7f;
super->subAction = gMessage.state & MESSAGE_ACTIVE;
super->timer = 1;
if (!CheckLocalFlag(offer->local_flag)) {
SetLocalFlag(offer->local_flag);
+2 -2
View File
@@ -60,7 +60,7 @@ void BusinessScrubPrologue_OnCollision(BusinessScrubPrologueEntity* this) {
gPlayerState.field_0x27[0] = 0xff;
EnqueueSFX(SFX_EM_DEKUSCRUB_HIT);
SetDefaultPriority(super, PRIO_MESSAGE);
SetEntityPriority(super, PRIO_MESSAGE);
}
}
}
@@ -195,7 +195,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
if (entity != NULL) {
entity->spritePriority.b0 = 3;
entity->z.HALF.HI -= 0xc;
SetDefaultPriority(entity, PRIO_MESSAGE);
SetEntityPriority(entity, PRIO_MESSAGE);
}
}
break;
+6 -6
View File
@@ -269,7 +269,7 @@ void ChuchuBoss_OnDeath(ChuchuBossEntity* this) {
Entity* child;
Entity* parent;
sub_08078B48();
PausePlayer();
if (super->type == 0) {
if (super->subAction != 12) {
super->subAction = 12;
@@ -463,7 +463,7 @@ void sub_08026090(ChuchuBossEntity* this) {
}
CopyPosition(super->child, super);
} else {
sub_08078B48();
PausePlayer();
if (super->timer-- == 0) {
gRoomControls.camera_target = &gPlayerEntity;
DeleteThisEntity();
@@ -542,7 +542,7 @@ void sub_0802626C(ChuchuBossEntity* this) {
gPauseMenuOptions.disabled = 1;
gUnk_080CC20C[this->unk_84->unk_03](this);
if (gPlayerEntity.action != PLAYER_ROOMTRANSITION && gPlayerEntity.action != PLAYER_ROOM_EXIT) {
sub_08078B48();
PausePlayer();
}
}
@@ -1126,7 +1126,7 @@ void sub_08026E1C(ChuchuBossEntity* this) {
}
if ((sub_08027C54(this)) && this->unk_84->unk_04 == 2) {
sub_08027C7C(this, 0x3f);
sub_08078B48();
PausePlayer();
}
}
@@ -1155,7 +1155,7 @@ void sub_08026FA4(ChuchuBossEntity* this) {
ChuchuBossEntity* pEVar3;
ChuchuBossEntity* pEVar4;
sub_08078B48();
PausePlayer();
COLLISION_OFF(super);
pEVar4 = (ChuchuBossEntity*)super->child;
pEVar3 = (ChuchuBossEntity*)super->parent;
@@ -1361,7 +1361,7 @@ void sub_080272D4(ChuchuBossEntity* this) {
if (sub_08027C54(super->child) == 0 || ((ChuchuBossEntity*)super->child)->unk_84->unk_04 != 2) {
SoundReq(SFX_BOSS_HIT);
} else {
sub_08078B48();
PausePlayer();
gRoomControls.camera_target = super->child;
gPauseMenuOptions.disabled = 1;
gRoomControls.camera_target->subAction = 9;
+1 -1
View File
@@ -87,7 +87,7 @@ void FireballGuy_Action2(FireballGuyEntity* this) {
/* Can we create enough new entities? */
count = typeEntityCount[super->type];
if (MAX_ENTITIES + 1 - count <= gEntCount)
if (MAX_ENTITIES - count <= gEntCount)
return;
/* Create 2-5 new MiniFireballGuy */
+3 -3
View File
@@ -151,7 +151,7 @@ void Gleerok(GleerokEntity* this) {
}
void Gleerok_OnDeath(GleerokEntity* this) {
sub_08078B48();
PausePlayer();
switch (super->type) {
case 2:
@@ -426,7 +426,7 @@ void sub_0802D3B8(GleerokEntity* this) {
void sub_0802D650(GleerokEntity* this) {
#ifdef EU
sub_08078B48();
PausePlayer();
#endif
gUnk_080CD7E4[super->subAction](this);
@@ -1020,7 +1020,7 @@ void sub_0802E0B8(GleerokEntity* this) {
if (this->unk_79 > 1) {
super->health = 0;
super->action = 0;
sub_08078B48();
PausePlayer();
SoundReq(SFX_BOSS_DIE);
return;
} else {
+5 -5
View File
@@ -72,7 +72,7 @@ void LikeLike_OnCollision(LikeLikeEntity* this) {
void LikeLike_OnDeath(LikeLikeEntity* this) {
if (super->timer == 2 && this->stolenItem != 0xff) {
SetDefaultPriority(super, PRIO_NO_BLOCK);
SetEntityPriority(super, PRIO_NO_BLOCK);
LikeLike_ReturnStolenItem(this->stolenItem);
}
GenericDeath(super);
@@ -259,12 +259,12 @@ void sub_080281A0(LikeLikeEntity* this) {
bool32 LikeLike_StealItem(u32 item) {
bool32 ret = FALSE;
if (GetInventoryValue(item) == 1) {
if (ItemIsShield(gSave.stats.itemButtons[SLOT_A])) {
gSave.stats.itemButtons[SLOT_A] = ITEM_NONE;
if (ItemIsShield(gSave.stats.equipped[SLOT_A])) {
gSave.stats.equipped[SLOT_A] = ITEM_NONE;
}
if (ItemIsShield(gSave.stats.itemButtons[SLOT_B])) {
gSave.stats.itemButtons[SLOT_B] = ITEM_NONE;
if (ItemIsShield(gSave.stats.equipped[SLOT_B])) {
gSave.stats.equipped[SLOT_B] = ITEM_NONE;
}
SetInventoryValue(item, 0);
+6 -6
View File
@@ -113,17 +113,17 @@ void OctorokBoss_Hit(OctorokBossEntity* this) {
if (super->subAction != 3) {
gRoomControls.camera_target = &this->heap->tailObjects[0]->base;
this->heap->field_0x7 = 0x5a;
sub_08078B48();
PausePlayer();
}
} else {
if (this->heap->field_0x7 != 0) {
this->heap->field_0x7--;
sub_08078B48();
PausePlayer();
}
}
OctorokBoss_Hit_SubActions[super->subAction](this);
if (super->subAction > 3) {
sub_08078B48();
PausePlayer();
}
sub_0800445C(super);
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
@@ -136,7 +136,7 @@ void OctorokBoss_Hit_SubAction0(OctorokBossEntity* this) {
if (this->bossPhase == 4) {
super->subAction = 4;
gPauseMenuOptions.disabled = 1;
sub_08078B48();
PausePlayer();
SoundReq(SFX_BOSS_DIE);
} else {
if (IS_FROZEN(this) == FALSE) {
@@ -442,7 +442,7 @@ void OctorokBoss_Intro(OctorokBossEntity* this) {
OctorokBoss_Intro_SubAction0, OctorokBoss_Intro_SubAction1, OctorokBoss_Intro_SubAction2,
OctorokBoss_Intro_SubAction3, OctorokBoss_Intro_SubAction4, OctorokBoss_Intro_SubAction5,
};
sub_08078B48();
PausePlayer();
gPauseMenuOptions.disabled = 1;
sub_08036F60(this);
OctorokBoss_Intro_SubActions[super->subAction](this);
@@ -796,7 +796,7 @@ void OctorokBoss_Action1_Attack(OctorokBossEntity* this) {
gPlayerEntity.spriteSettings.draw = 0;
gPlayerEntity.flags &= ~ENT_COLLIDE;
gPlayerEntity.collisionLayer = 2;
sub_08078B48();
PausePlayer();
PutAwayItems();
gPlayerEntity.parent = super;
sub_08036914(&gPlayerEntity, (u8) - (this->angle.HALF.HI + 0x80), 0x3800);
+1 -1
View File
@@ -111,7 +111,7 @@ void sub_080450A8(SlimeEntity* this) {
/* Can we create enough new entities? */
count = typeEntityCount[super->type];
if (MAX_ENTITIES + 1 - count <= gEntCount)
if (MAX_ENTITIES - count <= gEntCount)
return;
/* Create 2-4 new MiniSlime */
+1 -1
View File
@@ -547,7 +547,7 @@ void VaatiTransfiguredType0Action7(Entity* this) {
Entity* pEVar3;
u32 uVar4;
sub_08078B48();
PausePlayer();
if (this->timer) {
if (--this->timer == 0) {
SetRoomFlag(2);
+2 -2
View File
@@ -99,8 +99,8 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
Entity* child;
u8 bVar2;
bVar2 = gMessage.doTextBox & 0x7f;
if ((gMessage.doTextBox & 0x7f) == 0) {
bVar2 = gMessage.state & MESSAGE_ACTIVE;
if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
this->action = 1;
this->spriteSettings.draw = 0;
this->field_0x80.HALF.LO = bVar2;
+1 -1
View File
@@ -634,7 +634,7 @@ void sub_08041D14(Entity* this) {
Entity* pEVar1;
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
if ((gMessage.doTextBox & 0x7f) == 0) {
if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
if (this->timer != 0) {
this->timer--;
} else {