finish player.c

This commit is contained in:
theo3
2021-12-27 17:14:52 -08:00
parent 079260dbd6
commit 24750a6bb5
89 changed files with 2566 additions and 4879 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ void sub_08021AD8(Entity* this) {
}
void sub_08021B64(Entity* this) {
if (gPlayerState.flags & 4) {
if (gPlayerState.flags & PL_DROWNING) {
this->action = 3;
this->z.WORD = 0;
InitializeAnimation(this, 2);
+4 -4
View File
@@ -21,7 +21,7 @@ void sub_08037A14();
extern void sub_0804A4E4(Entity*, Entity*);
extern Entity* sub_08049DF4(u32);
u32 sub_0804A044(Entity*, Entity*, u32);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void (*const gGibdo[6])(Entity*);
extern void (*const gUnk_080CF2AC[9])(Entity*);
@@ -347,8 +347,8 @@ void sub_08037A58(Entity* this) {
}
void sub_08037ACC(Entity* this) {
gPlayerState.flags &= 0xFFFFFEFF;
gPlayerEntity.flags |= 0x80;
gPlayerState.flags &= ~0x100;
COLLISION_ON(&gPlayerEntity);
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(this->animationState);
gPlayerEntity.knockbackDuration = 4;
@@ -359,7 +359,7 @@ void sub_08037B10(Entity* this) {
u32 h;
gPlayerEntity.iframes = 0xc;
h = ModHealth(-8);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
if (h == 0) {
sub_08037A58(this);
this->field_0x76.HALF.LO = 0xf0;
+1 -1
View File
@@ -186,7 +186,7 @@ void sub_0802BE18(Entity* this) {
void sub_0802BE48(Entity* this) {
if (!sub_080AEFE0(this)) {
sub_0802C218(this);
sub_08080964(8, 0);
InitScreenShake(8, 0);
} else {
GetNextFrame(this);
sub_0802C1CC(this);
+2 -2
View File
@@ -11,7 +11,7 @@ extern void (*const gUnk_080D0418[6])(Entity*);
extern void (*const gUnk_080D0430[3])(Entity*);
extern void (*const gUnk_080D043C[3])(Entity*);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void sub_0803CE14(Entity*);
extern void sub_0803CE3C(Entity*);
extern void sub_08079D84(void);
@@ -56,7 +56,7 @@ void sub_0803CD40(Entity* this) {
ModHealth(-2);
sub_0800449C(&gPlayerEntity, 122);
SoundReqClipped(&gPlayerEntity, 122);
sub_08079D84();
sub_0803CE3C(this);
+7 -7
View File
@@ -20,7 +20,7 @@ void sub_0803B798(void);
void sub_0803BA8C(Entity*, u32);
void sub_0803B724(Entity*);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
void sub_0803A170(Entity*);
void sub_0803A188(Entity*);
@@ -434,7 +434,7 @@ void sub_0803A740(Entity* this) {
this->actionDelay = 10;
this->parent->field_0x7c.BYTES.byte1 |= 0x40;
sub_0803B8E8(this, 0x13);
sub_08080964(10, 0);
InitScreenShake(10, 0);
SoundReq(SFX_158);
}
}
@@ -713,7 +713,7 @@ void sub_0803ACC0(Entity* this) {
this->z.HALF.HI = 0;
this->actionDelay = 0xc;
this->subAction = 3;
sub_08080964(8, 0);
InitScreenShake(8, 0);
SoundReq(SFX_158);
sub_0803B804(this);
}
@@ -735,7 +735,7 @@ void sub_0803ACC0(Entity* this) {
this->z.HALF.HI = 0;
this->action = 0x1a;
this->actionDelay = 0x3c;
sub_08080964(0x1e, 0);
InitScreenShake(0x1e, 0);
SoundReq(SFX_158);
sub_0803B804(this);
return;
@@ -859,7 +859,7 @@ void sub_0803AFE0(Entity* this) {
this->actionDelay = 0xf0;
*(u8*)&this->cutsceneBeh = 3;
this->z.HALF.HI = 0;
sub_08080964(0xa0, 0);
InitScreenShake(0xa0, 0);
SoundReq(SFX_158);
}
}
@@ -931,7 +931,7 @@ void sub_0803B144(Entity* this) {
this->action = 0x2a;
InitializeAnimation(this, 0x16);
sub_0803B8E8(this, 0x14);
sub_08080964(8, 0);
InitScreenShake(8, 0);
}
}
@@ -1238,7 +1238,7 @@ void sub_0803B798(void) {
void sub_0803B804(Entity* this) {
gPlayerEntity.iframes = 30;
ModHealth(-4);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
}
void sub_0803B824(Entity* this) {
+1 -1
View File
@@ -320,7 +320,7 @@ void sub_080342C8(Entity* this) {
this->field_0x7c.HALF.HI = 0x708;
this->field_0x7c.BYTES.byte1 = 0;
this->field_0x80.HALF.HI = 0;
sub_08080964(0x1e, 0);
InitScreenShake(0x1e, 0);
SoundReq(SFX_1A1);
}
}
+1 -1
View File
@@ -195,7 +195,7 @@ void sub_08034F70(Entity* this) {
void sub_08034FA0(Entity* this) {
if (0 < this->iframes) {
this->child->iframes = this->iframes;
sub_08080964(0xc, 1);
InitScreenShake(0xc, 1);
}
switch (this->type2) {
case 0:
+4 -4
View File
@@ -1,7 +1,7 @@
#include "enemy.h"
#include "functions.h"
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern bool32 sub_08023A38(u32);
extern void sub_08023990(Entity*, u32, u32);
extern void sub_08023A88(Entity*, u32);
@@ -263,7 +263,7 @@ void sub_0802351C(Entity* this) {
if (this->field_0x7c.BYTES.byte3 == 0) {
if (this->type2 == 0) {
gPlayerEntity.animationState = this->animationState & 7;
gPlayerState.flags |= 0x80000;
gPlayerState.flags |= PL_TRAPPED;
PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10);
gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7];
}
@@ -398,14 +398,14 @@ void sub_08023894(Entity* this) {
this->parent->field_0x7c.BYTES.byte3 = 1;
InitializeAnimation(this, this->animationState);
if (this->parent->type2 == 0) {
gPlayerState.flags |= 0x200000;
gPlayerState.flags |= PL_RELEASED;
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
gPlayerEntity.direction = DirectionRoundUp(GetFacingDirection(*(Entity**)&this->field_0x74, this));
gPlayerEntity.animationState = gPlayerEntity.direction >> 2;
gPlayerEntity.iframes = 12;
ModHealth(-0x10);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
}
}
}
+3 -3
View File
@@ -811,7 +811,7 @@ void OctorokBoss_Action1_ChargeAttack(Entity* this) {
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x3c;
OctorokBoss_SetAttackTimer(this);
sub_08080964(0x3c, 0);
InitScreenShake(0x3c, 0);
SoundReq(SFX_158);
SoundReq(SFX_14C);
}
@@ -946,7 +946,7 @@ void OctorokBoss_ExecuteAttackVacuum(Entity* this) {
}
}
} else {
gPlayerState.flags &= 0xfffff7ff;
gPlayerState.flags &= ~PL_FROZEN;
}
}
}
@@ -1077,7 +1077,7 @@ void OctorokBoss_Burning_SubAction1(Entity* this) {
this->field_0x46 = 0x200;
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x1e;
sub_08080964(0x1e, 0);
InitScreenShake(0x1e, 0);
SoundReq(SFX_158);
SoundReq(SFX_14C);
}
+5 -5
View File
@@ -5,7 +5,7 @@
#include "save.h"
extern u32 sub_080002E0(u16, u32);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_080AEFB4(Entity*);
@@ -809,7 +809,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
ResetPlayer();
gPlayerState.flags |= 0x100;
gPlayerState.field_0xa |= 0x80;
gPlayerState.playerAction = 0xe;
gPlayerState.queued_action = PLAYER_0807204C;
gPlayerState.field_0x38 = 0x14;
gPlayerState.field_0x39 = 1;
*(u8*)&gPlayerState.field_0x3a = 0;
@@ -821,7 +821,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
this->field_0x86.HALF.HI++;
player->iframes = 8;
ModHealth(-2);
sub_0800449C(player, 0x7a);
SoundReqClipped(player, 0x7a);
}
}
}
@@ -830,10 +830,10 @@ END_NONMATCH
void sub_08024F50(Entity* this) {
gPlayerState.field_0xa = 0;
gPlayerState.flags &= 0xfffffeff;
gPlayerState.flags &= ~0x100;
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.action = 1;
gPlayerEntity.flags |= 0x80;
COLLISION_ON(&gPlayerEntity);
gPlayerEntity.iframes = -0x3c;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.speed = 0;
+1 -1
View File
@@ -233,7 +233,7 @@ void sub_080296C8(Entity* this) {
void sub_080296D8(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags &= 0xffffffef;
gPlayerState.flags &= ~0x10;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.iframes = 0xa6;
+1 -1
View File
@@ -662,7 +662,7 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
}
if (0 < this->iframes) {
SoundReq(0x127);
sub_08080964(0xc, 1);
InitScreenShake(0xc, 1);
if (this->actionDelay == 0)
this->actionDelay = 0x48;
}
+4 -4
View File
@@ -266,7 +266,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->actionDelay = 0xc0;
COLLISION_ON(this);
SoundReq(SFX_14C);
sub_08080964(0x14, 4);
InitScreenShake(0x14, 4);
break;
case 1:
if (--this->actionDelay == 0) {
@@ -321,7 +321,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->field_0x86.HALF.LO = 0;
sub_080408EC(this);
SoundReq(SFX_14C);
sub_08080964(0x1e, 4);
InitScreenShake(0x1e, 4);
} else {
if (this->field_0xf != 0) {
if (--this->field_0xf == 0) {
@@ -399,7 +399,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->field_0xf = 1;
}
SoundReq(SFX_14C);
sub_08080964(0x1e, 4);
InitScreenShake(0x1e, 4);
break;
case 2:
if (--this->actionDelay == 0) {
@@ -1069,7 +1069,7 @@ void sub_080409B0(Entity* this) {
}
} else {
if (((this->bitfield & 0x80) != 0) && (0 < this->iframes)) {
sub_08080964(0xc, 1);
InitScreenShake(0xc, 1);
SoundReq(SFX_BOSS_HIT);
}
if ((this->bitfield == 0x8a) && (gPlayerState.field_0xa0[0] == 5)) {
+2 -2
View File
@@ -475,7 +475,7 @@ void VaatiWrathType0ActionB(Entity* this) {
this->actionDelay = 0xf0;
this->health = 8;
this->hitType = 0x38;
sub_08080964(0x14, 0);
InitScreenShake(0x14, 0);
InitAnimationForceUpdate(this, 6);
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type2, 0x16);
}
@@ -709,7 +709,7 @@ void sub_08041E78(Entity* this) {
fx->x.HALF.HI += *temp++;
fx->y.HALF.HI += *temp;
fx->spritePriority.b0 = 3;
sub_08080964(4, 0);
InitScreenShake(4, 0);
}
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ void sub_08033564(Entity* this) {
this->spriteSettings.draw = FALSE;
COLLISION_OFF(this);
this->field_0x7c.HALF.LO = 0x27c;
gPlayerState.flags |= 0x4000;
gPlayerState.flags |= PL_DRUGGED;
gSave.stats.effect = this->type + 1;
gSave.stats.effectTimer = 600;
if (this->type == 0) {