This commit is contained in:
theo3
2021-12-14 23:31:27 -08:00
parent 83fc028502
commit 34e69959df
198 changed files with 1578 additions and 1550 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ void sub_08098D1C(Entity* this) {
this->spriteSettings.draw = TRUE;
sub_08098E88(this);
}
SetDefaultPriority(this, 6);
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
InitAnimationForceUpdate(this, 0);
}
+1 -1
View File
@@ -211,7 +211,7 @@ void sub_0809B5EC(Entity* this) {
u32 sub_0809B688(Entity* this) {
u32 ret;
ret = sub_080041A0(this, &gPlayerEntity, 6, 12);
ret = EntityInRectRadius(this, &gPlayerEntity, 6, 12);
if (ret == 1 && gPlayerState.field_0xd != 16) {
ret = 0;
}
+8 -8
View File
@@ -16,7 +16,7 @@ extern u32 sub_08081E3C(Entity*);
void sub_08081AE0(Entity* this) {
COLLISION_OFF(this);
this->updatePriority = 3;
this->updatePriority = PRIO_NO_BLOCK;
this->y.HALF.HI++;
if (this->cutsceneBeh.HWORD != 0) {
this->collisionLayer = this->cutsceneBeh.HWORD;
@@ -158,11 +158,11 @@ Entity* sub_08081D74(Entity* this) {
}
} else {
if (gPlayerState.flags & 0x400000) {
if (sub_080041A0(this, gUnk_03004040[0], 5, 6)) {
if (EntityInRectRadius(this, gUnk_03004040[0], 5, 6)) {
ent = gUnk_03004040[0];
} else if (sub_080041A0(this, gUnk_03004040[1], 5, 6)) {
} else if (EntityInRectRadius(this, gUnk_03004040[1], 5, 6)) {
ent = gUnk_03004040[1];
} else if (sub_080041A0(this, gUnk_03004040[2], 5, 6)) {
} else if (EntityInRectRadius(this, gUnk_03004040[2], 5, 6)) {
ent = gUnk_03004040[2];
}
}
@@ -176,7 +176,7 @@ u32 sub_08081E0C(Entity* this) {
if (tmp->z.HALF.HI != 0 || !sub_08079F8C()) {
return 0;
} else {
return sub_080041A0(this, tmp, 5, 6);
return EntityInRectRadius(this, tmp, 5, 6);
}
}
@@ -234,13 +234,13 @@ u32 sub_08081F00(u32* unk1, u32* unk2) {
void sub_08081F24(Entity* this) {
Entity* fx = CreateFx(this, FX_DASH, 0x40);
if (fx) {
fx->updatePriority = 3;
fx->updatePriority = PRIO_NO_BLOCK;
fx->x.HALF.HI += 7;
fx->y.HALF.HI += 5;
}
fx = CreateFx(this, FX_DASH, 0x40);
if (fx) {
fx->updatePriority = 3;
fx->updatePriority = PRIO_NO_BLOCK;
fx->x.HALF.HI -= 7;
fx->y.HALF.HI += 5;
}
@@ -252,7 +252,7 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
return 1;
if (--this->actionDelay > 6) {
if (this->child)
this->child->spriteOffsetY = 0xfc;
this->child->spriteOffsetY = -4;
} else {
if (this->actionDelay == 6) {
SetFlag(this->field_0x86.HWORD);
+1 -1
View File
@@ -120,7 +120,7 @@ void sub_0809F69C(Entity* this) {
void sub_0809F6CC(Entity* this) {
if (((gRoomControls.unk6 & 4) == 0) && (--this->actionDelay == 0)) {
gPlayerState.field_0x8b = 1;
gPlayerState.controlMode = 1;
DeleteThisEntity();
}
}
+2 -2
View File
@@ -469,7 +469,7 @@ void GreatFairy_InitializeAnimation(Entity* this) {
this->type2 = this->type % temp;
this->collisionLayer = 2;
InitializeAnimation(this, this->type2);
SetDefaultPriority(this, 2);
SetDefaultPriority(this, PRIO_MESSAGE);
}
Entity* GreatFairy_CreateForm(Entity* this, u32 curForm, u32 parameter) {
@@ -516,7 +516,7 @@ void sub_08087424(Entity* this, ScriptExecutionContext* context) {
if (ent != NULL) {
ent->parent = &gPlayerEntity;
CopyPosition(&gPlayerEntity, ent);
SetDefaultPriority(ent, 2);
SetDefaultPriority(ent, PRIO_MESSAGE);
}
switch (context->intVariable) {
+1 -1
View File
@@ -31,7 +31,7 @@ static void sub_0808E6A0(Entity* this) {
this->spriteSettings.draw = 0;
this->hitbox = &gUnk_08121C58;
this->collisionLayer = 3;
this->updatePriority = 3;
this->updatePriority = PRIO_NO_BLOCK;
}
static void sub_0808E6E4(Entity* this) {
+4 -4
View File
@@ -27,7 +27,7 @@ static bool32 sub_080867CC(u32);
void sub_0808681C(Entity*);
static u8 sub_08086954(Entity*);
extern u32 sub_080562CC(u32, u32, u32, u32);
extern u32 CheckRegionOnScreen(u32, u32, u32, u32);
extern void sub_08078AC0(u32, u32, u32);
extern void (*const gUnk_081206B4[])(Entity*);
@@ -46,14 +46,14 @@ void sub_080866D8(Entity* this) {
this->action = 1;
*((u32*)(&this->field_0x68)) = 0;
this->field_0x6c.HALF.LO = this->actionDelay;
SetDefaultPriority(this, 6);
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
}
prop = GetCurrentRoomProperty(this->field_0x6c.HALF.LO);
for (i = 0; prop->unk0 != 0xFFFF && i < 32; prop++, i++) {
int mask = 1 << i;
if ((*((u32*)(&this->field_0x68)) & mask) == 0 && sub_080867CC(prop->unk5) &&
sub_080562CC(prop->unk0, prop->unk2, 32, 32)) {
CheckRegionOnScreen(prop->unk0, prop->unk2, 32, 32)) {
entity = CreateObject(HOUSE_DOOR_EXT, prop->unk7, prop->unk6);
if (entity) {
entity->field_0x6c.HALF.LO = i;
@@ -85,7 +85,7 @@ static bool32 sub_080867CC(u32 arg0) {
}
void sub_080867E4(Entity* this) {
if (!sub_080562CC(this->field_0x68.HWORD, this->field_0x6a.HWORD, 32, 32)) {
if (!CheckRegionOnScreen(this->field_0x68.HWORD, this->field_0x6a.HWORD, 32, 32)) {
*((u32*)(&this->parent->field_0x68)) = *((u32*)(&this->parent->field_0x68)) & ~(1 << this->field_0x6c.HALF.LO);
DeleteThisEntity();
}
+2 -2
View File
@@ -120,7 +120,7 @@ void sub_08080F20(Entity* this) {
this->field_0x6c.HWORD = 0;
this->field_0x68.HALF.LO = 0;
this->actionDelay = 0;
SetDefaultPriority(this, 3);
SetDefaultPriority(this, PRIO_NO_BLOCK);
this->field_0x1c = sub_0808147C(this->type);
gUnk_0811E7E8[this->field_0x68.HALF.HI](this);
} else {
@@ -338,7 +338,7 @@ void sub_08081404(Entity* this, u32 arg1) {
bool32 sub_08081420(Entity* this) {
if (CheckShouldPlayItemGetCutscene(this)) {
SetDefaultPriority(this, 6);
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
CreateItemEntity(this->type, this->type2, 0);
return TRUE;
} else {
+1 -1
View File
@@ -34,7 +34,7 @@ void LilypadSmall(Entity* this) {
u32 sub_08097ADC(Entity* this) {
if ((gPlayerState.flags & PL_MINISH) == 0) {
return 0;
} else if (sub_080041A0(this, &gPlayerEntity, 8, 8) == 0) {
} else if (EntityInRectRadius(this, &gPlayerEntity, 8, 8) == 0) {
return 0;
} else if (sub_08079F8C() == 0) {
return 0;
+1 -1
View File
@@ -94,7 +94,7 @@ void sub_080917DC(Entity* this) {
}
void sub_080918A4(Entity* this) {
if (sub_080041A0(this, &gPlayerEntity, 2, 2) != 0) {
if (EntityInRectRadius(this, &gPlayerEntity, 2, 2) != 0) {
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
if (gPlayerEntity.z.HALF.HI > -0x10) {
+1 -1
View File
@@ -31,7 +31,7 @@ void sub_08090F00(Entity* this) {
DeleteThisEntity();
}
}
if ((gPlayerState.flags & PL_MINISH) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
if ((gPlayerState.flags & PL_MINISH) && EntityInRectRadius(this, &gPlayerEntity, 4, 4) &&
(gPlayerEntity.z.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
DoExitTransition(GetCurrentRoomProperty(this->actionDelay));
}
+1 -1
View File
@@ -55,6 +55,6 @@ void sub_08086A6C(Entity* ent) {
uVar1 = Random();
ent->zVelocity = 163840;
ent->direction = (uVar1 >> 16) & 31;
ent->direction = DirectionNormalize(uVar1 >> 16);
ent->speed = uVar1 & 480;
}
+1 -1
View File
@@ -56,7 +56,7 @@ void sub_08099E58(Entity* this) {
}
void sub_08099E8C(Entity* this) {
if (sub_080041A0(this, &gPlayerEntity, 0xc, 0xc)) {
if (EntityInRectRadius(this, &gPlayerEntity, 0xc, 0xc)) {
if (this->subAction == 0) {
sub_08099ECC(this);
RequestPriorityDuration(this, 0x1e);
+1 -1
View File
@@ -40,7 +40,7 @@ void sub_0809F318(Entity* this) {
this->spriteOrientation.flipY = 2;
this->action = 1;
sub_0801D2B4(this, gUnk_08124704[this->type]);
SetDefaultPriority(this, 7);
SetDefaultPriority(this, PRIO_HIGHEST);
}
void sub_0809F374(Entity* this) {
+2 -2
View File
@@ -41,7 +41,7 @@ void sub_0808B474(Entity* this) {
this->palette.b.b0 = tmp;
this->spritePriority.b0 = 6;
this->hitbox = &gHitbox_1;
this->updatePriority = 3;
this->updatePriority = PRIO_NO_BLOCK;
InitializeAnimation(this, 0);
if (CheckFlags(this->field_0x86.HWORD)) {
sub_0808B830(this);
@@ -207,7 +207,7 @@ void sub_0808B73C(Entity* this) {
u32 sub_0808B7C8(Entity* this) {
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.health != 0 &&
sub_08079F8C() && sub_080041A0(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
sub_08079F8C() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
if (this->actionDelay == 0 && gPlayerEntity.action == 0x1b) {
sub_080791D0();
}