merge master

This commit is contained in:
Henny022p
2022-01-31 17:30:51 +01:00
545 changed files with 17306 additions and 89017 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ void sub_08077534(ItemBehavior* this, u32 arg1) {
sub_08077DF4(this, 0x610);
break;
}
gPlayerEntity.flags &= 0x7f;
gPlayerEntity.flags &= ~ENT_COLLIDE;
}
void sub_08077618(ItemBehavior* this, u32 arg1) {
@@ -61,7 +61,7 @@ void sub_08077618(ItemBehavior* this, u32 arg1) {
void sub_08077640(ItemBehavior* this, u32 arg1) {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerEntity.flags |= ENT_COLLIDE;
sub_08077E78(this, arg1);
}
}
@@ -69,7 +69,7 @@ void sub_08077640(ItemBehavior* this, u32 arg1) {
void sub_0807766C(ItemBehavior* this, u32 arg1) {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerEntity.flags |= ENT_COLLIDE;
sub_08077E78(this, arg1);
}
}
+2 -2
View File
@@ -20,7 +20,7 @@ void OcarinaUse(ItemBehavior* this, u32 arg1) {
this->field_0x5[4] |= 0xf;
gPlayerEntity.animationState = 0x04;
gPlayerEntity.spriteSettings.flipX = 0;
gPlayerEntity.flags &= 0x7f;
gPlayerEntity.flags &= ~ENT_COLLIDE;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerState.flags |= PL_USE_OCARINA;
gPlayerState.field_0x27[0] = -1;
@@ -38,7 +38,7 @@ NONMATCH("asm/non_matching/ocarina/OcarinaUpdate.inc", void OcarinaUpdate(ItemBe
// TODO regalloc
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerEntity.flags |= ENT_COLLIDE;
gPlayerState.flags &= ~PL_USE_OCARINA;
gPlayerState.field_0x27[0] = 0;
gUnk_02034490.unk0 = 0;
+1 -1
View File
@@ -68,7 +68,7 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
if ((gPlayerEntity.zVelocity < 1) && ((gPlayerState.jump_status & 0x10) == 0)) {
this->stateID = 2;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerEntity.zVelocity = 0x20000;
gPlayerEntity.zVelocity = Q_16_16(2.0);
gPlayerState.jump_status |= 0x10;
gPlayerState.animation = 0x288;
SoundReq(SFX_172);
+75 -4
View File
@@ -4,8 +4,11 @@
#include "object.h"
extern void (*const gUnk_0811BD44[])(ItemBehavior*, u32);
extern void sub_08077B98(ItemBehavior*);
void sub_080759B8(ItemBehavior*, u32);
void sub_080754B8(ItemBehavior*, u32);
void sub_08075898(ItemBehavior*, u32);
extern u32 sub_08077EC8(ItemBehavior*);
@@ -16,11 +19,79 @@ void ItemSword(ItemBehavior* this, u32 arg1) {
gUnk_0811BD44[this->stateID](this, arg1);
}
#ifdef EU
ASM_FUNC("asm/non_matching/eu/sub_08075338.inc", void sub_08075338(ItemBehavior* this, u32 arg1))
#else
ASM_FUNC("asm/non_matching/itemSword/sub_08075338.inc", void sub_08075338(ItemBehavior* this, u32 arg1))
void sub_08075338(ItemBehavior* this, u32 arg1) {
u32 temp, temp2;
if (gPlayerState.flags & 0x80) {
this->field_0x5[4] |= 0x80;
sub_08077D38(this, arg1);
gPlayerState.animation = 0xc00;
SoundReq(SFX_PLY_VO1);
return;
}
if (gPlayerState.jump_status) {
if ((gPlayerState.jump_status & 7) != 3) {
if ((gPlayerState.jump_status & 0x78) == 0 && (u32)gPlayerEntity.zVelocity <= 0x17fff &&
(gPlayerState.field_0xac & 0x40) && gPlayerEntity.z.WORD) {
gPlayerState.jump_status |= 0x20;
gPlayerState.field_0xab = 7;
gPlayerState.field_0x3[1] |= (8 >> arg1) | ((8 >> arg1) << 4);
sub_08077B98(this);
this->stateID = 6;
sub_08075898(this, arg1);
return;
}
}
#ifndef EU
sub_080759B8(this, arg1);
return;
} else if (gPlayerEntity.z.WORD) {
#endif
sub_080759B8(this, arg1);
return;
}
if (gPlayerState.flags & 0x40000) {
if ((gPlayerState.field_0xac & 2) == 0) {
if (gPlayerState.item == NULL)
return;
DeleteEntity(gPlayerState.item);
gPlayerState.item = NULL;
return;
}
sub_08077D38(this, arg1);
sub_08077B98(this);
temp = (8 >> arg1);
gPlayerState.field_0x3[1] |= temp | (temp << 4);
gPlayerState.field_0xa |= temp;
gPlayerState.keepFacing |= temp;
this->stateID = 8;
this->field_0x5[2] = 0x14;
this->field_0xf = 6;
this->field_0x5[4] |= 0x80;
gPlayerState.field_0xab = 2;
gPlayerState.flags |= 0x8000000;
sub_08077DF4(this, 0x130);
SoundReq(SFX_PLY_VO3);
return;
}
if ((gPlayerState.sword_state & 0x80) == 0) {
gPlayerState.sword_state = 0;
sub_0806F948(&gPlayerEntity);
}
if (gPlayerState.item) {
if (gPlayerState.item->id != 1) {
DeleteEntity(gPlayerState.item);
gPlayerState.item = NULL;
}
}
sub_08077D38(this, arg1);
sub_08077B98(this);
}
ASM_FUNC("asm/non_matching/itemSword/sub_080754B8.inc", void sub_080754B8(ItemBehavior* this, u32 arg1))
+1 -1
View File
@@ -30,7 +30,7 @@ void sub_08076488(ItemBehavior* this, u32 arg1) {
}
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerEntity.flags |= ENT_COLLIDE;
gPlayerState.heldObject = 4;
bVar1 = ~(8 >> arg1);
gPlayerState.keepFacing = bVar1 & gPlayerState.keepFacing;