name asm funcs

This commit is contained in:
theo3
2021-12-25 21:28:44 -08:00
parent 11bb0e7656
commit 079260dbd6
93 changed files with 193 additions and 187 deletions
+4 -4
View File
@@ -108,7 +108,7 @@ void sub_080318DC(Entity* this) {
void sub_08031A60(Entity* this) {
if (this->iframes > 0)
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
sub_08001324(this);
}
@@ -351,7 +351,7 @@ void sub_08031EE8(Entity* this) {
}
void sub_08031F54(Entity* this) {
sub_08003FC4(this, gUnk_080CE5F0[this->type2]);
GravityUpdate(this, gUnk_080CE5F0[this->type2]);
if (this->type2 * -0xe <= this->z.HALF.HI) {
this->action = 3;
this->actionDelay = 20;
@@ -426,7 +426,7 @@ void sub_08032008(Entity* this) {
}
void sub_08032148(Entity* this) {
if (sub_08003FC4(this, 0x2000))
if (GravityUpdate(this, 0x2000))
return;
sub_08032290(this);
@@ -481,7 +481,7 @@ void sub_08032204(Entity* this) {
}
void sub_08032248(Entity* this) {
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
if (this->frame & 0x80) {
((Entity*)this->field_0x7c.WORD)->actionDelay--;
+3 -3
View File
@@ -133,7 +133,7 @@ void sub_08021984(Entity* this) {
EnqueueSFX(0x12d);
}
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
this->action = 2;
this->actionDelay = 16;
this->field_0xf = 1;
@@ -200,7 +200,7 @@ void sub_08021AD8(Entity* this) {
EnqueueSFX(0x7c);
}
sub_080AEFE0(this);
if (!sub_08003FC4(this, 0x1800))
if (!GravityUpdate(this, 0x1800))
this->frameDuration = 1;
}
@@ -259,7 +259,7 @@ void sub_08021C58(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x1800) == 0)
if (GravityUpdate(this, 0x1800) == 0)
this->frameDuration = 1;
}
+8 -8
View File
@@ -134,7 +134,7 @@ void sub_0801EFD8(Entity* this) {
sub_0801FB68(this);
InitializeAnimation(this, 8);
}
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
GetNextFrame(this);
}
}
@@ -146,7 +146,7 @@ void sub_0801F02C(Entity* this) {
}
void sub_0801F048(Entity* this) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
GetNextFrame(this);
if (this->type == 0) {
sub_0804A7D4(this);
@@ -218,7 +218,7 @@ void sub_0801F1B0(Entity* this) {
EnqueueSFX(299);
}
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x4000) == 0)
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
GetNextFrame(this);
@@ -278,7 +278,7 @@ void sub_0801F2CC(Entity* this) {
}
void sub_0801F2F8(Entity* this) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
GetNextFrame(this);
if (this->frame & 0x80) {
sub_0801F340(this);
@@ -409,7 +409,7 @@ void sub_0801F584(Entity* this) {
EnqueueSFX(299);
}
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x4000) == 0)
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
@@ -471,7 +471,7 @@ void sub_0801F6CC(Entity* this) {
}
void sub_0801F6F8(Entity* this) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
GetNextFrame(this);
if (this->frame & 0x80) {
this->action = 4;
@@ -586,7 +586,7 @@ void sub_0801F940(Entity* this) {
EnqueueSFX(299);
}
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x4000) == 0)
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
GetNextFrame(this);
@@ -646,7 +646,7 @@ void sub_0801FA78(Entity* this) {
}
void sub_0801FAAC(Entity* this) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
GetNextFrame(this);
if (this->frame & 0x80) {
sub_0801FB14(this);
+3 -3
View File
@@ -52,7 +52,7 @@ void sub_08022988(Entity* this) {
}
ProcessMovement(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
} else {
@@ -64,7 +64,7 @@ void sub_08022988(Entity* this) {
}
void sub_080229F8(Entity* this) {
if (sub_08003FC4(this, 0x2800) == 0) {
if (GravityUpdate(this, 0x2800) == 0) {
if (--this->actionDelay == 0) {
this->action = 4;
this->actionDelay = 6;
@@ -88,7 +88,7 @@ void sub_08022A40(Entity* this) {
}
ProcessMovement(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
} else {
+1 -1
View File
@@ -49,7 +49,7 @@ void sub_080453E8(Entity* this) {
void sub_08045430(Entity* this) {
sub_080AEFE0(this);
GetNextFrame(this);
if (sub_08003FC4(this, 0x1800) == 0)
if (GravityUpdate(this, 0x1800) == 0)
sub_08045524(this);
}
+1 -1
View File
@@ -227,7 +227,7 @@ void sub_0802BEEC(Entity* this) {
this->direction = this->animationState << 3;
InitializeAnimation(this, this->animationState + 4);
}
} else if (!sub_08003FC4(this, 0x1c00)) {
} else if (!GravityUpdate(this, 0x1c00)) {
this->action = 8;
this->actionDelay = 30;
this->speed = 0x120;
+1 -1
View File
@@ -224,7 +224,7 @@ void Lakitu_LightningDelay(Entity* this) {
}
void Lakitu_Cloudless(Entity* this) {
if (sub_08003FC4(this, 0x1800) == 0 && this->animIndex <= 19) {
if (GravityUpdate(this, 0x1800) == 0 && this->animIndex <= 19) {
InitAnimationForceUpdate(this, this->animationState + 20);
this->spritePriority.b1 = 0;
+1 -1
View File
@@ -927,7 +927,7 @@ void sub_0803B100(Entity* this) {
void sub_0803B144(Entity* this) {
UpdateAnimationSingleFrame(this->child);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
this->action = 0x2a;
InitializeAnimation(this, 0x16);
sub_0803B8E8(this, 0x14);
+1 -1
View File
@@ -315,7 +315,7 @@ void sub_080342C8(Entity* this) {
this->spriteOffsetX = gUnk_080CECEC[this->actionDelay >> 1 & 7];
} else {
this->spriteOffsetX = 0;
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
this->action = 0xc;
this->field_0x7c.HALF.HI = 0x708;
this->field_0x7c.BYTES.byte1 = 0;
+1 -1
View File
@@ -43,7 +43,7 @@ void sub_08045618(Entity* this) {
void sub_08045654(Entity* this) {
sub_080AEFE0(this);
GetNextFrame(this);
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
sub_08045678(this);
}
}
+2 -2
View File
@@ -238,7 +238,7 @@ void Peahat_Stunned(Entity* this) {
GetNextFrame(this);
break;
case PeahatAnimation_SlicedPropeller:
sub_08003FC4(this, 0x1c00);
GravityUpdate(this, 0x1c00);
if (this->z.HALF.HI == 0) {
this->action = 7;
this->actionDelay = 150;
@@ -316,7 +316,7 @@ void Peahat_Takeoff(Entity* this) {
} else if (this->frame & 1) {
sub_0800442E(this);
} else {
sub_08003FC4(this, 0x1c00);
GravityUpdate(this, 0x1c00);
ProcessMovement(this);
}
}
+5 -5
View File
@@ -104,7 +104,7 @@ void sub_0802511C(Entity* this) {
}
void sub_0802514C(Entity* this) {
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
if (sub_0806F520(this)) {
gUnk_080CBFEC[this->subAction](this);
} else {
@@ -209,7 +209,7 @@ void sub_0802538C(Entity* this) {
if (this->frame == 0) {
GetNextFrame(this);
} else {
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
if (this->zVelocity < 0x2000) {
this->action = 4;
InitializeAnimation(this, 2);
@@ -220,7 +220,7 @@ void sub_0802538C(Entity* this) {
void sub_080253D4(Entity* this) {
GetNextFrame(this);
if (!sub_08003FC4(this, 0x2000)) {
if (!GravityUpdate(this, 0x2000)) {
if (this->field_0xf == 0) {
this->action = 5;
InitializeAnimation(this, 3);
@@ -256,7 +256,7 @@ void sub_0802544C(Entity* this) {
}
void sub_0802547C(Entity* this) {
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
GetNextFrame(this);
if ((this->actionDelay & 7) == 0) {
sub_08025BD4(this);
@@ -268,7 +268,7 @@ void sub_0802547C(Entity* this) {
}
void sub_080254B4(Entity* this) {
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
if (this->frame & 0x80) {
if (this->z.HALF.HI == 0) {
if (this->cutsceneBeh.HWORD == 0) {
+1 -1
View File
@@ -206,7 +206,7 @@ void Rollobite_Unroll(Entity* this) {
}
void Rollobite_LinedUp(Entity* this) {
if (sub_08003FC4(this, 0x1c00) == 0) {
if (GravityUpdate(this, 0x1c00) == 0) {
this->action = 7;
this->spritePriority.b0 = 7;
}
+1 -1
View File
@@ -83,7 +83,7 @@ void sub_08031480(Entity* this) {
SoundReq(SFX_12D);
}
} else {
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
this->action = 2;
this->field_0xf = 0xf;
this->spriteSettings.draw = 1;
+1 -1
View File
@@ -117,7 +117,7 @@ void sub_08023CE0(Entity* this) {
EnqueueSFX(0x12d);
InitializeAnimation(this, 4);
}
} else if (!sub_08003FC4(this, 0x1800)) {
} else if (!GravityUpdate(this, 0x1800)) {
this->action = 3;
this->spriteSettings.draw = 1;
EnqueueSFX(0x84);
+1 -1
View File
@@ -173,7 +173,7 @@ void sub_0802B8E0(Entity* this) {
}
void sub_0802B948(Entity* this) {
if (!sub_08003FC4(this, 0x1800)) {
if (!GravityUpdate(this, 0x1800)) {
this->action = 1;
this->actionDelay = 1;
}
+4 -4
View File
@@ -86,7 +86,7 @@ void sub_080225A0(Entity* this) {
}
void sub_080225BC(Entity* this) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
if (this->frame & 1) {
sub_0804A7D4(this);
} else {
@@ -125,7 +125,7 @@ void sub_08022654(Entity* this) {
InitializeAnimation(this, 0);
/* fallthrough */
case 1:
if (sub_08003FC4(this, 0x1800))
if (GravityUpdate(this, 0x1800))
return;
this->subAction = 2;
@@ -204,7 +204,7 @@ void sub_080227AC(Entity* this) {
}
void sub_0802281C(Entity* this) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
GetNextFrame(this);
if (this->frame & 0x80) {
this->action = 2;
@@ -218,7 +218,7 @@ void sub_08022854(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
this->action = 7;
this->hitType = 0x5c;
InitializeAnimation(this, 5);
+1 -1
View File
@@ -56,7 +56,7 @@ void nullsub_16(Entity* this) {
void sub_0802F1F0(Entity* this) {
sub_08001242(this);
if (this->z.HALF.HI != 0) {
sub_08003FC4(this, this->field_0x80.HWORD);
GravityUpdate(this, this->field_0x80.HWORD);
}
}
+1 -1
View File
@@ -55,7 +55,7 @@ void sub_08037F58(Entity* this) {
void sub_08037F84(Entity* this) {
sub_08001242(this);
if (this->z.HALF.HI != 0) {
sub_08003FC4(this, 0x3000);
GravityUpdate(this, 0x3000);
}
}
+1 -1
View File
@@ -972,7 +972,7 @@ void sub_08043520(Entity* this) {
Entity* entity;
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
sub_08003FC4(entity, 0x1a00);
GravityUpdate(entity, 0x1a00);
if ((entity->zVelocity < 0) && (-6 < entity->z.HALF.HI)) {
entity->z.HALF.HI = -6;
this->subAction = 3;
+2 -2
View File
@@ -313,7 +313,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
}
break;
}
if (sub_08003FC4(this, 0x2800) == 0) {
if (GravityUpdate(this, 0x2800) == 0) {
this->field_0x80.HALF.LO = 5;
this->actionDelay = 0x10;
COLLISION_ON(this);
@@ -379,7 +379,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
}
break;
case 1:
if (sub_08003FC4(this, 0x2800) != 0)
if (GravityUpdate(this, 0x2800) != 0)
break;
this->field_0x80.HALF.LO += 1;
switch (this->cutsceneBeh.HALF.LO) {
+1 -1
View File
@@ -470,7 +470,7 @@ void VaatiWrathType0ActionB(Entity* this) {
UpdateAnimationSingleFrame(this);
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type1);
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
this->subAction = 1;
this->actionDelay = 0xf0;
this->health = 8;
+1 -1
View File
@@ -34,7 +34,7 @@ void sub_0802A250(Entity* this) {
}
void sub_0802A2B4(Entity* this) {
if (!sub_08003FC4(this, 0x2800)) {
if (!GravityUpdate(this, 0x2800)) {
this->action = 2;
this->spritePriority.b0 = 7;
EnqueueSFX(0x84);
+1 -1
View File
@@ -74,7 +74,7 @@ void CuccoChick_Fusion(Entity* this) {
this->spriteSettings.draw = 1;
this->frameIndex = 1;
} else {
if (sub_08003FC4(this, 0x3000) == 0) {
if (GravityUpdate(this, 0x3000) == 0) {
this->zVelocity = 0x10000;
}
}
+1 -1
View File
@@ -79,7 +79,7 @@ void sub_08068780(Entity* this) {
if (this->frame & 0x40) {
this->frame &= 0xbf;
if (sub_080040A8(this) == 0) {
if (CheckOnScreen(this) == 0) {
SoundReq(gUnk_0811153E[(s32)Random() % 3]);
} else {
EnqueueSFX(gUnk_08111538[(s32)Random() % 3]);
+1 -1
View File
@@ -265,7 +265,7 @@ void sub_08060DFC(Entity* this) {
sub_0806F69C(this);
sub_08060E94(this);
uVar1 = sub_08003FC4(this, 0x2000);
uVar1 = GravityUpdate(this, 0x2000);
if (uVar1 == 0) {
this->action = 7;
this->collisionLayer = 1;
+2 -2
View File
@@ -96,7 +96,7 @@ void sub_080604DC(Entity* this) {
int iVar2;
Entity* ent;
if (this->spriteSettings.draw == 1 && sub_080040A8(this)) {
if (this->spriteSettings.draw == 1 && CheckOnScreen(this)) {
if ((this->frame & 1) != 0) {
this->frame &= 0xfe;
ent = CreateFx(this, 17, 0x40);
@@ -163,7 +163,7 @@ void sub_08060528(Entity* this) {
this->field_0x6a.HWORD -= 1;
}
}
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
if (((this->field_0x6c.HALF.HI != 0) && (this->zVelocity == 0)) && this->z.WORD == 0) {
this->field_0x6c.HALF.HI = 0;
sub_080606C0(this);
+2 -2
View File
@@ -174,7 +174,7 @@ void sub_0806AEA8(Entity* this) {
int old = this->field_0x82.HWORD;
this->field_0x82.HWORD &= ~0x20;
if (old & 0x20) {
sub_08003FC4(this, 0x4000);
GravityUpdate(this, 0x4000);
}
HandleEntity0x82Actions(this);
this->field_0x82.HWORD = old;
@@ -226,7 +226,7 @@ void sub_0806AF70(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806AF78(Entity* this, ScriptExecutionContext* context) {
sub_08003FC4(this, 0x1800);
GravityUpdate(this, 0x1800);
if (0 <= this->z.WORD && this->zVelocity < 1) {
this->z.WORD = 0;
sub_0806AF70(this, context);
+2 -2
View File
@@ -137,7 +137,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
break;
case 2:
sub_0806F62C(this, 0x100, 0x80);
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
if (!(this->frame & 1)) {
UpdateAnimationSingleFrame(this);
}
@@ -148,7 +148,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
case 3:
sub_0806F62C(this, 0x100, 0x80);
UpdateAnimationSingleFrame(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
context->unk_18++;
InitAnimationForceUpdate(this, 0x1E);
}
+2 -2
View File
@@ -44,12 +44,12 @@ void sub_0809CF54(Entity* this) {
void sub_0809CFEC(Entity* this) {
sub_0806F69C(this);
sub_08003FC4(this, *(s16*)&this->field_0x68.HWORD);
GravityUpdate(this, *(s16*)&this->field_0x68.HWORD);
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
this->field_0xf = 0;
}
} else if (sub_080040A8(this) == 0) {
} else if (CheckOnScreen(this) == 0) {
DeleteThisEntity();
}
UpdateAnimationSingleFrame(this);
+4 -4
View File
@@ -216,7 +216,7 @@ void sub_080811EC(Entity* this) {
sub_0806F69C(this);
}
sub_08003FC4(this, 0x2800);
GravityUpdate(this, 0x2800);
if (this->zVelocity <= 0) {
this->action = 2;
COLLISION_ON(this);
@@ -302,7 +302,7 @@ void sub_0808136C(Entity* this) {
this->y.WORD = other->y.WORD;
this->spriteOrientation.flipY = other->spriteOrientation.flipY;
this->spriteRendering.b3 = other->spriteRendering.b3;
sub_08003FC4(this, 0x2800);
GravityUpdate(this, 0x2800);
} else {
sub_08081404(this, 1);
}
@@ -410,14 +410,14 @@ void sub_0808153C(Entity* this) {
return;
if (this->field_0x68.HALF.LO == 0) {
if (!sub_08003FC4(this, 0x1000) && !sub_0800442E(this)) {
if (!GravityUpdate(this, 0x1000) && !sub_0800442E(this)) {
this->field_0x68.HALF.LO = 1;
this->zVelocity = 0x1E000;
sub_0808148C(this->type);
UpdateSpriteForCollisionLayer(this);
}
} else {
if (!sub_08003FC4(this, 0x2800)) {
if (!GravityUpdate(this, 0x2800)) {
this->field_0x68.HALF.LO = 2;
sub_0808148C(this->type);
}
+2 -2
View File
@@ -57,7 +57,7 @@ void sub_0808BF14(Entity* this) {
}
void sub_0808BF58(Entity* this) {
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
switch (this->subAction) {
case 0:
if (this->zVelocity <= 98303) {
@@ -125,7 +125,7 @@ void sub_0808C01C(Entity* this, u32 r1) {
}
void sub_0808C0AC(Entity* this) {
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
switch (this->subAction) {
case 0:
if (this->zVelocity <= 98303) {
+1 -1
View File
@@ -53,7 +53,7 @@ void sub_0808F0D0(Entity* this) {
void sub_0808F14C(Entity* this) {
sub_0808F2B0(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
this->action++;
SoundReq(SFX_WATER_SPLASH);
}
+7 -7
View File
@@ -104,7 +104,7 @@ Object6ATypeAction sub_08096290;
extern void sub_08080CB4(Entity*);
extern u32 sub_080002B8(Entity*);
extern u32 sub_080040A8(Entity*);
extern u32 CheckOnScreen(Entity*);
extern void sub_08078850(Entity*, u32, u32, u8*);
void sub_08095754(Object6AEntity*);
@@ -355,7 +355,7 @@ void sub_08094E30(Object6AEntity* this) {
case 3:
super->z.WORD -= super->zVelocity;
super->zVelocity -= 0x2000;
if (!sub_080040A8(super)) {
if (!CheckOnScreen(super)) {
DeleteThisEntity();
}
break;
@@ -695,7 +695,7 @@ void sub_080954DC(Object6AEntity* this) {
break;
}
this->off += 4;
if (super->subAction != 0 && !sub_080040A8(super))
if (super->subAction != 0 && !CheckOnScreen(super))
DeleteThisEntity();
if (super->direction & 0x80)
super->spriteSettings.flipX = 0;
@@ -1090,9 +1090,9 @@ void sub_08095DBC(Object6AEntity* this) {
super->zVelocity = 0x40000;
super->speed = 0xC000;
}
sub_08003FC4(super, super->speed);
GravityUpdate(super, super->speed);
GetNextFrame(super);
if (!sub_080040A8(super))
if (!CheckOnScreen(super))
DeleteThisEntity();
}
}
@@ -1241,7 +1241,7 @@ void sub_08096168(Object6AEntity* this) {
}
GetNextFrame(super);
sub_0806F62C(super, super->speed, super->direction);
if (!sub_080040A8(super))
if (!CheckOnScreen(super))
DeleteThisEntity();
}
@@ -1301,7 +1301,7 @@ void sub_0809629C(Object6AEntity* this, u32 type) {
}
ExecuteScriptForEntity(super, 0);
HandleEntity0x82Actions(super);
sub_08003FC4(super, 0x1000);
GravityUpdate(super, 0x1000);
tmp = super->type;
super->type = type;
sub_08080CB4(super);
+1 -1
View File
@@ -256,7 +256,7 @@ void sub_08082824(Entity* this) {
this->spriteSettings.flipY = 1;
}
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
sub_08082850(this, NULL);
}
}
+11 -11
View File
@@ -401,7 +401,7 @@ static NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void PlayerBounceUpd
sub_08079E08();
UpdateFloorType();
if (sub_08078EFC() || sub_08003FC4(this, 0x2000))
if (sub_08078EFC() || GravityUpdate(this, 0x2000))
return;
gPlayerState.jumpStatus = 0;
@@ -615,7 +615,7 @@ static void sub_08071130(Entity* this) {
sub_0806F69C(this);
if (sub_08003FC4(this, 0x2000))
if (GravityUpdate(this, 0x2000))
return;
gPlayerState.jumpStatus = 0;
@@ -880,7 +880,7 @@ static ASM_FUNC("asm/non_matching/player/PortalShrinkUpdate.inc", void PortalShr
static void PortalEnterUpdate(Entity* this) {
if (this->actionDelay == 0) {
if (sub_08003FC4(this, 0x2000))
if (GravityUpdate(this, 0x2000))
return;
this->spriteSettings.draw = FALSE;
@@ -976,7 +976,7 @@ static void PlayerTalkEzloInit(Entity* this) {
return;
}
if (!sub_08003FC4(this, 0x2000))
if (!GravityUpdate(this, 0x2000))
gPlayerState.jumpStatus = 0;
}
@@ -1142,7 +1142,7 @@ static void PlayerMinishDieInit(Entity* this) {
if (gPlayerState.flags & (0x10 | 0x100))
return;
if (sub_08003FC4(this, 0x2000)) {
if (GravityUpdate(this, 0x2000)) {
if (gPlayerState.flags & PL_NO_CAP)
gPlayerState.animation = 0x420;
else
@@ -1287,7 +1287,7 @@ static void sub_08071E04(Entity* this) {
static void sub_08071E74(Entity* this) {
u32 temp;
sub_08003FC4(this, 0x2000);
GravityUpdate(this, 0x2000);
sub_08079E08();
temp = this->actionDelay--;
if (temp == 0)
@@ -1353,7 +1353,7 @@ static void PlayerFrozenInit(Entity* this) {
}
static void PlayerFrozenUpdate(Entity* this) {
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
UpdateSpriteForCollisionLayer(this);
gPlayerState.jumpStatus = 0;
if (gPlayerState.field_0x14 == 0) {
@@ -1457,7 +1457,7 @@ static void sub_08072168(Entity* this) {
UpdateAnimationSingleFrame(this);
i = (u16)sub_0806F854(this, 0, -12) ? 0x4000 : 0x2000;
sub_08003FC4(this, i);
GravityUpdate(this, i);
if (gPlayerState.field_0x3a) {
sub_0806F69C(this);
} else {
@@ -1553,7 +1553,7 @@ static void sub_08072354(Entity* this) {
sub_0806F854(this, 0, -12);
UpdateAnimationSingleFrame(this);
sub_08079744(this);
if (sub_08003FC4(this, 0x2000))
if (GravityUpdate(this, 0x2000))
return;
this->spritePriority.b1 = 0;
@@ -1929,7 +1929,7 @@ static void sub_08072B5C(Entity* this) {
static void sub_08072C48(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_0806F69C(this);
if (sub_08003FC4(this, 0x2000))
if (GravityUpdate(this, 0x2000))
return;
sub_08008790(this, 7);
@@ -2054,7 +2054,7 @@ static NONMATCH("asm/non_matching/player/sub_08072D54.inc", void sub_08072D54(En
}
this->actionDelay = bVar1;
if (!sub_08003FC4(this, 0x2000)) {
if (!GravityUpdate(this, 0x2000)) {
COLLISION_ON(this);
if (this->collisionLayer == 1) {
sub_0800455E(this);
+1 -1
View File
@@ -25,7 +25,7 @@ void sub_0807037C(Entity* this) {
void sub_08070398(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
DeleteThisEntity();
}
}
+1 -1
View File
@@ -28,7 +28,7 @@ void sub_08019410(Entity* this) {
void sub_08019444(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
DeleteThisEntity();
}
}
+1 -1
View File
@@ -90,7 +90,7 @@ void ArrowProjectile_Action3(Entity* this) {
}
void ArrowProjectile_Action4(Entity* this) {
if (sub_08003FC4(this, 0x2800) == 0) {
if (GravityUpdate(this, 0x2800) == 0) {
CreateDust(this);
DeleteThisEntity();
} else {
+2 -2
View File
@@ -55,7 +55,7 @@ void BoneProjectile_Action1(Entity* this) {
void BoneProjectile_Action2(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
this->action = 3;
COLLISION_OFF(this);
this->speed = 0xe0;
@@ -75,7 +75,7 @@ void BoneProjectile_Action3(Entity* this) {
void BoneProjectile_Action4(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
DeleteEntity(this);
}
}
+2 -2
View File
@@ -89,7 +89,7 @@ void GleerokProjectile_Init(Entity* this) {
void GleerokProjectile_Action1(Entity* this) {
if (this->type == 3) {
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
sub_08008790(this, 7);
CreateFx(this, FX_ROCK, 0);
DeleteThisEntity();
@@ -101,7 +101,7 @@ void GleerokProjectile_Action1(Entity* this) {
this->field_0xf = 0x1e;
sub_08004596(this, GetFacingDirection(this, &gPlayerEntity));
}
if (sub_08003FC4(this, 0) == 0) {
if (GravityUpdate(this, 0) == 0) {
this->action = 2;
sub_080A90D8(this);
if (this->type == 2) {
+1 -1
View File
@@ -198,7 +198,7 @@ void MandiblesProjectile_Action4(Entity* this) {
}
}
} else {
if (sub_080040A8(this) == 0) {
if (CheckOnScreen(this) == 0) {
DeleteThisEntity();
}
}
+2 -2
View File
@@ -154,7 +154,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
OctorokBossProjectile_Action2(this);
}
GetNextFrame(this);
if (sub_08003FC4(this, 0x1800) != 0) {
if (GravityUpdate(this, 0x1800) != 0) {
sub_080AE58C(this, this->direction >> 3, 0);
if (this->collisions == 0) {
sub_0806F62C(this, (s32)this->speed, (u32)this->direction);
@@ -189,7 +189,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
DeleteThisEntity();
break;
case 3:
if (sub_08003FC4(this, 0x1800) != 0) {
if (GravityUpdate(this, 0x1800) != 0) {
return;
}
CreateFx(this, FX_ROCK, 0);
+1 -1
View File
@@ -56,7 +56,7 @@ void RockProjectile_Action1(Entity* this) {
void RockProjectile_Action2(Entity* this) {
sub_0806F69C(this);
GetNextFrame(this);
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
DeleteEntity(this);
}
}
+1 -1
View File
@@ -120,7 +120,7 @@ void StalfosProjectile_Action3(Entity* this) {
if (this->zVelocity < 0) {
this->spriteSettings.flipY = 1;
}
if (sub_08003FC4(this, 0x2000) == 0) {
if (GravityUpdate(this, 0x2000) == 0) {
sub_080A9BA8(this);
}
}
+1 -1
View File
@@ -76,7 +76,7 @@ void V1FireProjectile_Init(Entity* this) {
void V1FireProjectile_Action1(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
if (sub_08003FC4(this, 0) == 0) {
if (GravityUpdate(this, 0) == 0) {
this->action = 2;
this->actionDelay = 0xf;
InitializeAnimation(this, 0x54);
+2 -2
View File
@@ -96,7 +96,7 @@ void sub_080ABD70(Entity* this) {
ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABE04.inc", void sub_080ABE04(Entity* this))
void sub_080ABE88(Entity* this) {
if (sub_08003FC4(this, 0x1800) == 0) {
if (GravityUpdate(this, 0x1800) == 0) {
CreateFx(this, FX_ROCK, 0);
DeleteThisEntity();
}
@@ -118,7 +118,7 @@ void sub_080ABEA8(Entity* this) {
}
void sub_080ABF04(Entity* this) {
if (sub_080040A8(this) == 0) {
if (CheckOnScreen(this) == 0) {
DeleteThisEntity();
}
sub_0806F69C(this);
+6 -6
View File
@@ -391,7 +391,7 @@ void HandleEntity0x82Actions(Entity* entity) {
}
break;
case 1 << 5:
sub_08003FC4(entity, 0x2000);
GravityUpdate(entity, 0x2000);
break;
}
}
@@ -1440,9 +1440,9 @@ void ScriptCommand_0807EF3C(Entity* entity, ScriptExecutionContext* context) {
context->unk_18 = 1;
entity->zVelocity = ((s16)context->scriptInstructionPointer[1]) << 8;
context->x.HALF.LO = context->scriptInstructionPointer[2] << 8;
sub_08003FC4(entity, (u16)context->x.HALF.LO);
GravityUpdate(entity, (u16)context->x.HALF.LO);
} else {
if (!sub_08003FC4(entity, (u16)context->x.HALF.LO))
if (!GravityUpdate(entity, (u16)context->x.HALF.LO))
return;
}
gActiveScriptInfo.commandSize = 0;
@@ -1952,14 +1952,14 @@ void sub_0807F854(Entity* entity, ScriptExecutionContext* context) {
}
void sub_0807F8BC(Entity* entity, ScriptExecutionContext* context) {
if (sub_080040A8(entity))
if (CheckOnScreen(entity))
context->condition = 1;
else
context->condition = 0;
}
void sub_0807F8D0(Entity* entity, ScriptExecutionContext* context) {
sub_08003FC4(entity, context->intVariable);
GravityUpdate(entity, context->intVariable);
gActiveScriptInfo.flags |= 1;
}
@@ -2129,7 +2129,7 @@ void sub_0807FBCC(Entity* entity, ScriptExecutionContext* context) {
void sub_0807FBD4(Entity* entity, ScriptExecutionContext* context) {
sub_0806F62C(entity, entity->speed, entity->direction);
if (sub_080040A8(entity))
if (CheckOnScreen(entity))
gActiveScriptInfo.commandSize = 0;
}