Rename movement functions

This commit is contained in:
octorock
2022-02-12 20:00:08 +01:00
parent d6c79aa263
commit b69a6d223c
141 changed files with 2334 additions and 2992 deletions
+41 -41
View File
@@ -13,18 +13,18 @@ extern u8 gCollidableCount;
extern u8 gUnk_080B3740[];
typedef struct {
u8 _0;
u8 _1;
u8 _2;
u8 _3;
u8 _4;
u8 _5;
s8 _6;
u8 _7;
u8 _8;
u8 _9;
u8 _a;
u8 _b;
/*0x00*/ u8 orgKnockbackSpeed;
/*0x01*/ u8 orgIframes;
/*0x02*/ u8 orgKnockbackDuration;
/*0x03*/ u8 tgtDamage;
/*0x04*/ u8 orgConfusedTime;
/*0x05*/ u8 tgtKnockbackSpeed;
/*0x06*/ s8 tgtIframes;
/*0x07*/ u8 tgtKnockbackDuration;
/*0x08*/ u8 orgDamage;
/*0x09*/ u8 tgtConfusedTime;
/*0x0a*/ u8 _a;
/*0x0b*/ u8 _b;
} ColSettings;
extern ColSettings gCollisionMtx[173 * 34];
@@ -362,7 +362,7 @@ s32 sub_08017B1C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
} else {
org->knockbackDuration = 0x10;
org->iframes = -20;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
}
return 1;
}
@@ -374,7 +374,7 @@ s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (x << 24 <= 0) {
tgt->field_0x1d = 0;
tgt->subAction = 2;
tgt->field_0x46 = 0;
tgt->knockbackSpeed = 0;
}
}
} else {
@@ -399,7 +399,7 @@ s32 sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
org->health = sub_08017874(org, tgt);
org->knockbackDuration = 12;
org->iframes = 30;
org->field_0x46 = 384;
org->knockbackSpeed = 384;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -416,7 +416,7 @@ s32 sub_08017C40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
org->knockbackDuration = 12;
org->iframes = 16;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -432,7 +432,7 @@ s32 sub_08017CBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->knockbackDuration = 12;
tgt->iframes = 16;
tgt->confusedTime = -16;
tgt->field_0x46 = 768;
tgt->knockbackSpeed = 768;
if (org->iframes == 0)
org->iframes = -1;
}
@@ -444,7 +444,7 @@ s32 sub_08017D28(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
org->field_0x7a.HWORD = 600;
org->knockbackDuration = 12;
org->iframes = 16;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -484,7 +484,7 @@ int sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
gPlayerEntity.iframes = 12;
gPlayerEntity.knockbackDuration = 16;
gPlayerEntity.knockbackDirection = DirectionTurnAround(direction);
gPlayerEntity.field_0x46 = 640;
gPlayerEntity.knockbackSpeed = 640;
}
if (tgt->iframes == 0)
tgt->iframes = -1;
@@ -493,7 +493,7 @@ int sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
s32 sub_08017E88(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
org->knockbackDuration = 2;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -509,11 +509,11 @@ s32 sub_08017EB0(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->damage = temp;
gPlayerEntity.knockbackDuration = 12;
gPlayerEntity.iframes = 16;
gPlayerEntity.field_0x46 = 384;
gPlayerEntity.knockbackSpeed = 384;
} else if (org->kind == PLAYER_ITEM && org->id == 5) {
org->knockbackDuration = 8;
org->iframes = -6;
org->field_0x46 = 384;
org->knockbackSpeed = 384;
gPlayerEntity.iframes = 0x80;
}
if (tgt->iframes == 0)
@@ -608,10 +608,10 @@ s32 sub_080180E8(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (DirectionNormalize(tgt->direction - v3) <= 0x18) {
org->knockbackDuration = 12;
org->iframes = -16;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
tgt->knockbackDuration = 12;
tgt->iframes = -16;
tgt->field_0x46 = 768;
tgt->knockbackSpeed = 768;
sub_08017940(org, tgt);
return 1;
}
@@ -700,27 +700,27 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
if (!temp) {
u32 tmp2;
org->field_0x46 = 16 * settings->_0;
org->iframes = settings->_1;
org->knockbackSpeed = 16 * settings->orgKnockbackSpeed;
org->iframes = settings->orgIframes;
if (org->iframes == 0)
org->iframes = -1;
org->knockbackDuration = settings->_2;
tgt->damage = settings->_3;
org->knockbackDuration = settings->orgKnockbackDuration;
tgt->damage = settings->tgtDamage;
tmp2 = 0xFF;
if (settings->_3 != 0)
if (settings->tgtDamage != 0)
org->health = sub_08017874(org, tgt);
if (settings->_4 > org->confusedTime)
org->confusedTime = settings->_4;
tgt->field_0x46 = 16 * settings->_5;
tgt->iframes = settings->_6;
if (settings->_6 == 0)
if (settings->orgConfusedTime > org->confusedTime)
org->confusedTime = settings->orgConfusedTime;
tgt->knockbackSpeed = 16 * settings->tgtKnockbackSpeed;
tgt->iframes = settings->tgtIframes;
if (settings->tgtIframes == 0)
tgt->iframes = -1;
tgt->knockbackDuration = settings->_7;
tmp2 &= org->damage = settings->_8;
tgt->knockbackDuration = settings->tgtKnockbackDuration;
tmp2 &= org->damage = settings->orgDamage;
if (tmp2 != 0)
tgt->health = sub_08017874(tgt, org);
if (settings->_9 > tgt->confusedTime)
tgt->confusedTime = settings->_9;
if (settings->tgtConfusedTime > tgt->confusedTime)
tgt->confusedTime = settings->tgtConfusedTime;
}
if (settings->_a & 1)
sub_08017940(org, tgt);
@@ -735,13 +735,13 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
parent->knockbackDuration = tgt->knockbackDuration;
if (parent->confusedTime == 0)
parent->confusedTime = tgt->confusedTime;
parent->field_0x46 = tgt->field_0x46;
parent->knockbackSpeed = tgt->knockbackSpeed;
parent->field_0x4c = org;
}
}
if (org->kind == PLAYER_ITEM) {
if (org->id == 1) {
if (settings->_8) {
if (settings->orgDamage) {
sub_080179EC(org, tgt);
}
} else if (org->id == 4) {
@@ -749,7 +749,7 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
sub_08017A90(org, tgt);
}
} else if (org->id == 3) {
if (settings->_9) {
if (settings->tgtConfusedTime) {
SoundReqClipped(tgt, SFX_HIT);
}
} else if (org->id == 5) {
+6 -6
View File
@@ -86,21 +86,21 @@ u32 sub_0806F3E4(Entity* ent) {
return 0;
switch (gPlayerState.field_0x1d) {
case 1:
ent->field_0x46 += 64;
ent->knockbackSpeed += 64;
break;
case 2:
ent->field_0x46 += 128;
ent->knockbackSpeed += 128;
break;
case 3:
ent->field_0x46 += 192;
ent->knockbackSpeed += 192;
break;
}
if (ent->field_0x46 > 0x500)
ent->field_0x46 = 0x500;
if (ent->knockbackSpeed > 0x500)
ent->knockbackSpeed = 0x500;
p = &gUnk_08126EE4[gPlayerEntity.animationState & 0xE];
tmp_ent.x.HALF.HI = p[0] + gPlayerEntity.x.HALF.HI;
tmp_ent.y.HALF.HI = p[1] + gPlayerEntity.y.HALF.HI;
LinearMoveDirection(ent, ent->field_0x46, GetFacingDirection(ent, &tmp_ent));
LinearMoveDirection(ent, ent->knockbackSpeed, GetFacingDirection(ent, &tmp_ent));
if (sub_0800419C(&tmp_ent, ent, 4, 4)) {
u32 state = ent->field_0x1c & 0xF;
if (state == 2) {
+2 -2
View File
@@ -400,7 +400,7 @@ void sub_08032008(Entity* this) {
if (this->direction & 0xf)
this->spriteSettings.flipX = (this->direction >> 4 ^ 1);
ProcessMovement(this);
ProcessMovement0(this);
} else {
if (this->field_0x76.HALF.HI == 0) {
if (EntityWithinDistance(this, parent->x.HALF.HI, parent->y.HALF.HI, 1) == 0) {
@@ -457,7 +457,7 @@ void sub_08032160(Entity* this) {
}
void sub_080321E8(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (sub_080044EC(this, 0x2000) == 0)
this->action = 8;
+1 -1
View File
@@ -331,7 +331,7 @@ void sub_080309E8(ArmosEntity* this) {
}
void sub_08030A04(ArmosEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
if ((super->frame & 1) != 0) {
super->frame = super->frame & 0xfe;
EnqueueSFX(SFX_101);
+9 -10
View File
@@ -23,15 +23,14 @@ const u8 gUnk_080D0724[];
const u16 gUnk_080D0728[];
const u16 gUnk_080D0730[];
extern u32 sub_0804A044(Entity*, Entity*, u32);
extern void sub_0803E86C(BallChainSoldierEntity*);
extern void sub_0803E9A4(BallChainSoldierEntity*);
extern bool32 sub_0803E9D4(BallChainSoldierEntity*);
extern void sub_0803E8CC(BallChainSoldierEntity*);
extern void sub_0803E92C(BallChainSoldierEntity*);
extern bool32 sub_0803EA64(BallChainSoldierEntity*);
extern void sub_0803E94C(BallChainSoldierEntity*, u32);
extern bool32 sub_0803EAD0(BallChainSoldierEntity*, u32);
void sub_0803E86C(BallChainSoldierEntity*);
void sub_0803E9A4(BallChainSoldierEntity*);
bool32 sub_0803E9D4(BallChainSoldierEntity*);
void sub_0803E8CC(BallChainSoldierEntity*);
void sub_0803E92C(BallChainSoldierEntity*);
bool32 sub_0803EA64(BallChainSoldierEntity*);
void sub_0803E94C(BallChainSoldierEntity*, u32);
bool32 sub_0803EAD0(BallChainSoldierEntity*, u32);
void BallChainSoldier(Entity* this) {
EnemyFunctionHandler(this, (EntityActionArray)BallChainSoldier_Functions);
@@ -92,7 +91,7 @@ void sub_0803E61C(BallChainSoldierEntity* this) {
sub_0803E9A4(this);
if (sub_0803E9D4(this) == 0) {
if (super->knockbackDuration == 0) {
if (ProcessMovement(super) == 0) {
if (ProcessMovement0(super) == 0) {
sub_0803E86C(this);
return;
}
+4 -6
View File
@@ -8,8 +8,6 @@
#include "enemy.h"
#include "functions.h"
extern u32 PlayerInRange(Entity*, u32, u32);
u32 sub_08021D00(Entity*);
void sub_08021D44(Entity* this, u32 direction);
@@ -114,7 +112,7 @@ void sub_080218CC(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (sub_080044EC(this, 0x1c00) == 0)
this->frameDuration = 1;
}
@@ -184,7 +182,7 @@ void sub_08021A64(Entity* this) {
}
sub_08021D44(this, tmp);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
}
@@ -206,7 +204,7 @@ void sub_08021AD8(Entity* this) {
this->direction = (u8)tmp;
EnqueueSFX(SFX_PLY_JUMP);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (!GravityUpdate(this, 0x1800))
this->frameDuration = 1;
}
@@ -265,7 +263,7 @@ void sub_08021B64(Entity* this) {
void sub_08021C58(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x1800) == 0)
this->frameDuration = 1;
}
+1 -3
View File
@@ -10,13 +10,11 @@
#include "room.h"
#include "functions.h"
extern void sub_080A2CC0(Entity*, void*, void*);
void BladeTrap(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->child = GetCurrentRoomProperty(this->type);
sub_080A2CC0(this, &this->child, &this->field_0x74);
sub_080A2CC0(this, &this->child, &this->field_0x74.HWORD);
}
if (!(this->direction & 0x80)) {
LinearMoveUpdate(this);
+1 -4
View File
@@ -11,9 +11,6 @@
#include "object.h"
#include "functions.h"
extern void sub_08078930(Entity*);
extern void sub_08078954(Entity*);
void sub_0802CB68(Entity*);
void sub_0802CBC4(Entity*);
void sub_0802CC18(Entity*);
@@ -161,7 +158,7 @@ void sub_0802C8D8(Entity* this) {
void sub_0802C91C(Entity* this) {
GetNextFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
if (this->field_0x82.HALF.LO) {
if (this->collisions) {
sub_0800417E(this, this->collisions);
-2
View File
@@ -14,8 +14,6 @@ typedef struct {
void (*const Bombarossa_Functions[])(Entity*);
const s8 gUnk_080CEB50[];
extern void sub_080A2CC0(Entity*, void*, void*);
void sub_0803350C(BombarossaEntity* this);
void Bombarossa(Entity* this) {
+1 -1
View File
@@ -365,7 +365,7 @@ void sub_0803C6DC(BowMoblinEntity* this) {
super->speed = tmp;
}
ProcessMovement(super);
ProcessMovement0(super);
GetNextFrame(super);
}
+8 -8
View File
@@ -14,18 +14,18 @@
#include "game.h"
#include "item.h"
void sub_08028E9C(Entity*);
void sub_08028EDC(Entity*);
bool32 sub_08028F98(Entity*, u32);
bool32 sub_08028FDC(Entity*);
void sub_08028FFC(Entity*);
void sub_08029078(Entity*);
void sub_080290E0(Entity*, u32);
void sub_080290FC(Entity*);
bool32 sub_0802915C(Entity*);
bool32 sub_080291DC(Entity*);
void sub_0802922C(Entity*);
void sub_08028E9C(Entity*);
void sub_08028FFC(Entity*);
void sub_0802925C(Entity*);
void sub_080290E0(Entity*, u32);
bool32 sub_08028F98(Entity*, u32);
void sub_08029078(Entity*);
bool32 sub_08028FDC(Entity*);
void sub_080290FC(Entity*);
void sub_08028EDC(Entity*);
extern const struct SalesOffering gUnk_080CC954[];
extern const u8 gUnk_080CC9C0[];
+1 -3
View File
@@ -12,6 +12,7 @@ typedef struct {
u32 unk_84;
} BusinessScrubPrologueEntity;
extern void sub_080954AC(Entity*, u32);
extern u16 script_BusinessScrubIntro[];
void (*const BusinessScrubPrologue_Functions[])(Entity*);
@@ -20,9 +21,6 @@ const u8 gUnk_080D1A38[];
const s8 gUnk_080D1A3E[];
const u16 gUnk_080D1A4E[];
extern void sub_08095C48(Entity* this);
extern void sub_080954AC(Entity*, u32);
void sub_08046030(BusinessScrubPrologueEntity*, u32);
bool32 sub_08045F54(BusinessScrubPrologueEntity*, u32);
void sub_08045FF0(BusinessScrubPrologueEntity*);
+1 -6
View File
@@ -8,12 +8,7 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080012DC(Entity*);
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AF038(Entity*);
extern void (*const gUnk_080012C8[])(Entity*);
extern void (*const Chaser_Functions[])(Entity*);
extern void (*const gUnk_080CD298[])(Entity*);
@@ -54,7 +49,7 @@ void sub_0802B56C(Entity* this) {
this->speed = 0x40;
}
if (sub_080AF038(this)) {
if (ProcessMovement12(this)) {
if (this->animIndex != 1) {
InitializeAnimation(this, 1);
}
+9 -17
View File
@@ -9,14 +9,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080012DC(Entity*);
extern void sub_08001318(Entity*);
extern void sub_080043A8(Entity*);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_0804AA1C(Entity*);
extern void sub_080AF160(Entity*);
extern Entity* gUnk_020000B0;
void sub_0801F328(Entity*);
@@ -200,7 +192,7 @@ void sub_0801F12C(Entity* this) {
if ((this->field_0xf++ & 7) == 0) {
this->direction = sub_08049F84(this, 1);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
if (PlayerInRange(this, 1, 0x38)) {
@@ -222,7 +214,7 @@ void sub_0801F1B0(Entity* this) {
this->hitType = 90;
EnqueueSFX(SFX_12B);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
@@ -257,7 +249,7 @@ void sub_0801F270(Entity* this) {
this->direction = sub_08049F84(this, 1);
}
sub_080AF160(this);
ProcessMovement5(this);
GetNextFrame(this);
if (sub_0801FBD0(this))
return;
@@ -405,7 +397,7 @@ void sub_0801F508(Entity* this) {
if (tmp == 4) {
this->direction = sub_08049F84(this, 1);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
}
@@ -418,7 +410,7 @@ void sub_0801F584(Entity* this) {
this->hitType = 91;
EnqueueSFX(SFX_12B);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
@@ -464,7 +456,7 @@ void sub_0801F688(Entity* this) {
if (sub_0801FBD0(this) || this->field_0x82.HALF.HI) {
this->direction = sub_08049F84(this, 1);
sub_080AF160(this);
ProcessMovement5(this);
GetNextFrame(this);
} else {
sub_0801F748(this);
@@ -583,7 +575,7 @@ void sub_0801F8C0(Entity* this) {
if (tmp == 4) {
this->direction = GetFacingDirection(this, gUnk_020000B0);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
}
@@ -595,7 +587,7 @@ void sub_0801F940(Entity* this) {
this->frame ^= 1;
EnqueueSFX(SFX_12B);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
@@ -635,7 +627,7 @@ void sub_0801F9E0(Entity* this) {
void sub_0801FA30(Entity* this) {
if (sub_0801FBD0(this)) {
this->direction = sub_08049F84(this, 1);
sub_080AF160(this);
ProcessMovement5(this);
GetNextFrame(this);
} else if (sub_08049FDC(this, 1) == 0) {
this->action = 9;
+1 -2
View File
@@ -6,8 +6,7 @@
*/
#include "enemy.h"
void sub_08027870(Entity*);
#include "functions.h"
extern void (*const ChuchuBoss_Functions[])(Entity*);
extern void (*const gUnk_080CC1B0[])(Entity*);
+13 -13
View File
@@ -30,16 +30,16 @@ const u16 gUnk_080CF828[];
const s8 gCuccoAggrFxHorizontalOffsets[];
const u8 gCuccoAggrFx[];
extern void sub_080391B4(CuccoAggrEntity* this);
extern void sub_08039218(CuccoAggrEntity* this);
extern void CuccoAggr_CreateFx(CuccoAggrEntity* this);
extern void sub_08039120(CuccoAggrEntity* this);
extern void sub_08039140(CuccoAggrEntity* this);
extern void sub_0803901C(CuccoAggrEntity* this);
extern void sub_08039298(CuccoAggrEntity* this);
extern void sub_080390F8(CuccoAggrEntity* this);
extern void sub_080390C0(CuccoAggrEntity* this);
extern bool32 CuccoAggr_IsOutsideScroll(CuccoAggrEntity* this);
void sub_080391B4(CuccoAggrEntity* this);
void sub_08039218(CuccoAggrEntity* this);
void CuccoAggr_CreateFx(CuccoAggrEntity* this);
void sub_08039120(CuccoAggrEntity* this);
void sub_08039140(CuccoAggrEntity* this);
void sub_0803901C(CuccoAggrEntity* this);
void sub_08039298(CuccoAggrEntity* this);
void sub_080390F8(CuccoAggrEntity* this);
void sub_080390C0(CuccoAggrEntity* this);
bool32 CuccoAggr_IsOutsideScroll(CuccoAggrEntity* this);
void CuccoAggr(Entity* this) {
u32 index = sub_080012DC(this);
@@ -122,7 +122,7 @@ void sub_08038E18(CuccoAggrEntity* this) {
super->spritePriority.b1 = 1;
super->spritePriority.b0 = 4;
super->direction = Random() & 0x1f;
ProcessMovement(super);
ProcessMovement0(super);
UpdateSpriteForCollisionLayer(super);
}
}
@@ -148,7 +148,7 @@ void sub_08038ED0(CuccoAggrEntity* this) {
}
void sub_08038EE0(CuccoAggrEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
GetNextFrame(super);
sub_08039298(this);
if (GravityUpdate(super, 0x1C00) == 0) {
@@ -172,7 +172,7 @@ void sub_08038F20(CuccoAggrEntity* this) {
void sub_08038F44(CuccoAggrEntity* this) {
super->direction = GetFacingDirection(&gPlayerEntity, super);
sub_080390F8(this);
ProcessMovement(super);
ProcessMovement0(super);
sub_080044EC(super, 0x1800);
GetNextFrame(super);
sub_08039298(this);
+2 -2
View File
@@ -56,7 +56,7 @@ void sub_08022988(Entity* this) {
EnqueueSFX(SFX_VO_CHEEP);
}
ProcessMovement(this);
ProcessMovement0(this);
if (GravityUpdate(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
@@ -92,7 +92,7 @@ void sub_08022A40(Entity* this) {
this->frameIndex = 1;
}
ProcessMovement(this);
ProcessMovement0(this);
if (GravityUpdate(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
+1 -1
View File
@@ -13,7 +13,7 @@ void Curtain_OnTick(Entity* this) {
}
void Curtain_OnCollision(Entity* this) {
if (this->field_0x46) {
if (this->knockbackSpeed != 0) {
this->action = 2;
this->flags &= ~ENT_COLLIDE;
this->spritePriority.b0 = 7;
+15 -18
View File
@@ -14,26 +14,23 @@ typedef struct {
} PACKED stuct_080CAB14;
void sub_08021218(Entity*, u32, u32);
void sub_08021588(Entity*);
void sub_080213D0(Entity*, u32);
void sub_0802124C(Entity*);
u32 sub_08021274(u32, u32);
void sub_08021390(Entity*);
void sub_0802159C(Entity*);
void sub_0804AA1C(Entity*);
void sub_080213B0(Entity*);
void sub_080213D0(Entity*, u32);
void sub_080213F0(Entity*);
void sub_08021400(Entity*);
void sub_08021414(Entity*);
void sub_08021424(Entity*);
u32 sub_080214FC(Entity*);
void sub_08021540(Entity*);
void sub_08021588(Entity*);
void sub_0802159C(Entity*);
void sub_08021600(Entity*);
void sub_080213B0(Entity*);
u32 PlayerInRange(Entity*, u32, u32);
u32 sub_0802169C(Entity*, Entity*);
void sub_0802124C(Entity*);
void sub_08021644(Entity*);
void sub_08021414(Entity*);
void sub_08021400(Entity*);
u32 sub_08021274(u32, u32);
u32 sub_08021664(Entity*, Entity*);
u32 sub_0804A044(Entity*, Entity*, u32);
void sub_08021424(Entity*);
u32 sub_0802169C(Entity*, Entity*);
extern Entity* gUnk_020000B0;
@@ -157,7 +154,7 @@ void sub_08020DD4(Entity* this) {
} else {
if (--this->actionDelay == 0)
sub_08021540(this);
ProcessMovement(this);
ProcessMovement0(this);
UpdateAnimationSingleFrame(this);
}
}
@@ -191,7 +188,7 @@ void sub_08020E98(Entity* this) {
sub_08021218(this, 7, this->animationState);
} else {
this->direction = GetFacingDirection(gUnk_020000B0, this);
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
this->action = 8;
sub_08021218(this, 7, this->animationState);
} else {
@@ -205,7 +202,7 @@ void sub_08020E98(Entity* this) {
sub_08021414(this);
} else {
this->direction = GetFacingDirection(this, gUnk_020000B0);
ProcessMovement(this);
ProcessMovement0(this);
sub_0802124C(this);
sub_08021644(this);
}
@@ -324,7 +321,7 @@ void sub_080210E4(Entity* this) {
}
sub_08021644(this);
if ((this->frame & 0x10) && (!ProcessMovement(this) || (this->child && (this->child->bitfield & 0x80)))) {
if ((this->frame & 0x10) && (!ProcessMovement0(this) || (this->child && (this->child->bitfield & 0x80)))) {
sub_080213D0(this, 0);
} else {
if (--this->field_0x76.HWORD == 0)
@@ -519,7 +516,7 @@ void sub_08021424(Entity* this) {
sub_080212B0(this);
} else {
this->direction = CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, x, y);
if (!ProcessMovement(this)) {
if (!ProcessMovement0(this)) {
sub_080212B0(this);
} else {
UpdateAnimationSingleFrame(this);
-1
View File
@@ -9,7 +9,6 @@
#include "enemy.h"
#include "functions.h"
extern void sub_08049CF4(Entity*);
void sub_080221C0(Entity*);
typedef struct {
+2 -2
View File
@@ -273,7 +273,7 @@ void Enemy50_Action6(Enemy50Entity* this) {
sub_08004596(super, GetFacingDirection(super, gUnk_020000B0));
}
sub_0803F66C(this);
sub_080AEFB4(super);
ProcessMovement1(super);
} else {
super->action = 7;
super->actionDelay = 0x1e;
@@ -316,7 +316,7 @@ void Enemy50_Action9(Enemy50Entity* this) {
super->animationState = 0xff;
super->iframes = -0xc;
super->knockbackDuration = 0x14;
super->field_0x46 = 0x180;
super->knockbackSpeed = 0x180;
super->knockbackDirection = gPlayerEntity.animationState << 2 ^ 0x10;
sub_08041128(this);
sub_0803F6EC(this);
+2 -2
View File
@@ -451,7 +451,7 @@ void sub_08031250(EyegoreEntity* this) {
super->y.HALF.HI = this->unk_76;
this->unk_79 = tmp2 | this->unk_79;
}
if (((this->unk_79 & 0x80) == 0) && (ProcessMovement(super) == 0)) {
if (((this->unk_79 & 0x80) == 0) && (ProcessMovement0(super) == 0)) {
if ((this->unk_78 & 0x80) != 0) {
this->unk_78 = 0x82;
} else {
@@ -459,7 +459,7 @@ void sub_08031250(EyegoreEntity* this) {
}
}
} else {
ProcessMovement(super);
ProcessMovement0(super);
}
}
+1 -3
View File
@@ -17,8 +17,6 @@ extern const u16 gUnk_080CD568[];
extern const u8 gUnk_080CD580[];
extern const s16 gUnk_080CD58C[];
extern void sub_080AEFB4(Entity*);
void FallingBoulder(Entity* this) {
EnemyFunctionHandler(this, FallingBoulder_Functions);
}
@@ -115,7 +113,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
y = gRoomControls.origin_y + gRoomControls.height - this->y.HALF.HI;
if (y >= 5) {
sub_080AEFB4(this);
ProcessMovement1(this);
} else {
LinearMoveUpdate(this);
if (this->z.HALF.HI - y > 0x38) {
+1 -1
View File
@@ -52,7 +52,7 @@ void sub_080453E8(Entity* this) {
}
void sub_08045430(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
GetNextFrame(this);
if (GravityUpdate(this, 0x1800) == 0)
sub_08045524(this);
+1 -1
View File
@@ -221,7 +221,7 @@ void sub_0803A080(FlyingSkullEntity* this) {
void sub_0803A09C(FlyingSkullEntity* this) {
GetNextFrame(super);
sub_080AEFE0(super);
ProcessMovement2(super);
if (super->collisions) {
sub_0803A0E0(this);
+3 -3
View File
@@ -231,7 +231,7 @@ void Ghini_Action6(GhiniEntity* this) {
sub_08004596(super, GetFacingDirection(super, gUnk_020000B0));
}
sub_0803F66C(this);
sub_080AEFB4(super);
ProcessMovement1(super);
GetNextFrame(super);
} else {
super->action = 7;
@@ -274,7 +274,7 @@ void Ghini_Action9(GhiniEntity* this) {
super->animationState = 0xff;
super->iframes = -0xc;
super->knockbackDuration = 0x14;
super->field_0x46 = 0x180;
super->knockbackSpeed = 0x180;
super->knockbackDirection = gPlayerEntity.animationState << 2 ^ 0x10;
sub_0803F51C(this);
sub_0803F6EC(this);
@@ -311,7 +311,7 @@ void sub_0803F58C(GhiniEntity* this) {
s32 yBefore;
yBefore = super->y.WORD;
sub_080AEFB4(super);
ProcessMovement1(super);
yAfter = super->y.WORD;
super->y.WORD = yAfter - (yAfter - yBefore) / 2;
}
+5 -5
View File
@@ -120,7 +120,7 @@ void sub_080375A4(GibdoEntity* this) {
sub_08037794(this);
} else {
UpdateAnimationSingleFrame(super);
if (ProcessMovement(super) == 0) {
if (ProcessMovement0(super) == 0) {
if (!(--super->field_0xf)) {
sub_080379BC(this);
}
@@ -148,7 +148,7 @@ void sub_08037624(GibdoEntity* this) {
} else {
UpdateAnimationSingleFrame(super);
UpdateAnimationSingleFrame(super);
if (ProcessMovement(super) == 0) {
if (ProcessMovement0(super) == 0) {
if (!(--super->field_0xf)) {
sub_080379BC(this);
}
@@ -170,7 +170,7 @@ void sub_08037690(GibdoEntity* this) {
} else {
if ((super->frame & 1) != 0) {
super->hitType = 0x27;
ProcessMovement(super);
ProcessMovement0(super);
}
}
}
@@ -359,7 +359,7 @@ void sub_08037A58(GibdoEntity* this) {
super->iframes = 0xf4;
super->knockbackDirection = DirectionFromAnimationState(super->animationState) ^ 0x10;
super->knockbackDuration = 8;
super->field_0x46 = 0x180;
super->knockbackSpeed = 0x180;
this->field_0x76 = 0x3c;
InitAnimationForceUpdate(super, super->animationState + 0x10);
}
@@ -370,7 +370,7 @@ void sub_08037ACC(GibdoEntity* this) {
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(super->animationState);
gPlayerEntity.knockbackDuration = 4;
gPlayerEntity.field_0x46 = 0x180;
gPlayerEntity.knockbackSpeed = 0x180;
}
// Damage player maybe?
+6 -6
View File
@@ -189,7 +189,7 @@ void sub_0802BE18(Entity* this) {
}
void sub_0802BE48(Entity* this) {
if (!sub_080AEFE0(this)) {
if (!ProcessMovement2(this)) {
sub_0802C218(this);
InitScreenShake(8, 0);
} else {
@@ -208,7 +208,7 @@ void sub_0802BE80(Entity* this) {
}
if (this->speed > 0) {
sub_080AEFE0(this);
ProcessMovement2(this);
sub_0802C18C(this);
} else {
sub_0802C1C0(this);
@@ -218,7 +218,7 @@ void sub_0802BE80(Entity* this) {
void sub_0802BEBC(Entity* this) {
this->direction ^= 0x10;
sub_080AEFE0(this);
ProcessMovement2(this);
this->direction ^= 0x10;
if (!sub_080044EC(this, Q_16_16(0.125))) {
sub_0802C1C0(this);
@@ -240,7 +240,7 @@ void sub_0802BEEC(Entity* this) {
}
void sub_0802BF3C(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
u32 sprite;
@@ -322,7 +322,7 @@ bool32 sub_0802C06C(Entity* this) {
for (i = 0; i < 8; i++) {
x += xdiff;
y += ydiff;
if (sub_080AE4CC(layer, x, y, 0))
if (IsTileCollision(layer, x, y, 0))
return FALSE;
}
@@ -342,7 +342,7 @@ bool32 sub_0802C0E8(Entity* this) {
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
u32 ret = FALSE;
if (!sub_0806FC24(TILE(x, y), 9)) {
if (sub_080AE4CC(layer, x, y, 0)) {
if (IsTileCollision(layer, x, y, 0)) {
ret = 1;
} else {
ret = 0;
+2 -2
View File
@@ -74,7 +74,7 @@ void sub_0803248C(Entity* this) {
if (this->actionDelay == 0) {
sub_08032650(this);
}
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
this->actionDelay = 1;
}
UpdateAnimationSingleFrame(this);
@@ -126,7 +126,7 @@ void sub_08032574(Entity* this) {
return;
}
if (--this->field_0x76.HWORD == 0 || !sub_080AEFE0(this)) {
if (--this->field_0x76.HWORD == 0 || !ProcessMovement2(this)) {
sub_0803275C(this);
return;
}
+1 -2
View File
@@ -10,7 +10,6 @@
extern void GenericKnockback2(Entity*);
extern void Keese_StartFly(Entity*);
extern void sub_080AEFB4(Entity*);
extern void sub_08021F24(Entity*);
extern void (*const Keese_Functions[])(Entity*);
@@ -83,7 +82,7 @@ void Keese_Fly(Entity* this) {
if (this->frame & 0x80) {
sub_08021F24(this);
} else {
sub_080AEFB4(this);
ProcessMovement1(this);
}
this->spriteOffsetY = gKeeseSpriteOffsets[this->frame];
}
+1 -1
View File
@@ -271,7 +271,7 @@ void sub_0803CAD0(Entity* this) {
this->direction =
CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, this->field_0x74.HWORD, this->field_0x76.HWORD);
sub_080AEFE0(this);
ProcessMovement2(this);
}
}
+2 -7
View File
@@ -13,17 +13,12 @@
#include "effects.h"
#include "enemy.h"
extern u32 GetNextFunction(Entity*);
extern void (*const LakituCloud_Functions[6])(Entity*);
extern void (*const gUnk_080D0430[3])(Entity*);
extern void (*const gUnk_080D043C[3])(Entity*);
extern void SoundReqClipped(Entity*, u32);
extern void sub_0803CE14(Entity*);
extern void sub_0803CE3C(Entity*);
extern void sub_08079D84(void);
extern void sub_080A2CC0(Entity*, Entity**, u16*);
void sub_0803CE14(Entity*);
void sub_0803CE3C(Entity*);
void LakituCloud(Entity* this) {
LakituCloud_Functions[GetNextFunction(this)](this);
+1 -1
View File
@@ -180,7 +180,7 @@ void Leever_Move(Entity* this) {
}
}
ProcessMovement(this);
ProcessMovement0(this);
}
// clang-format off
+1 -1
View File
@@ -122,7 +122,7 @@ void sub_08027EFC(Entity* this) {
this->field_0x82.HALF.LO = this->direction;
this->actionDelay = 8;
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
} else {
this->action = 6;
+1 -1
View File
@@ -450,7 +450,7 @@ void sub_0802A098(Entity* this) {
}
uVar1 = this->x.HALF.HI;
uVar2 = this->y.HALF.HI;
ProcessMovement(this);
ProcessMovement0(this);
if (sub_08029F48(this)) {
sub_08029E0C(this);
sub_08029EEC(this);
+1 -1
View File
@@ -48,7 +48,7 @@ void sub_08045618(Entity* this) {
}
void sub_08045654(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
GetNextFrame(this);
if (GravityUpdate(this, 0x1800) == 0) {
sub_08045678(this);
+1 -1
View File
@@ -88,7 +88,7 @@ void sub_080452FC(Entity* this) {
}
void sub_08045374(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0)
this->action = 1;
+1 -1
View File
@@ -101,7 +101,7 @@ void sub_08022D40(Entity* this) {
}
} else {
sub_08022F14(this);
ProcessMovement(this);
ProcessMovement0(this);
if (this->collisions) {
sub_0800417E(this, this->collisions);
+1 -1
View File
@@ -219,7 +219,7 @@ void sub_08023398(Entity* this) {
} else {
int prevX = this->x.WORD;
int prevY = this->y.WORD;
ProcessMovement(this);
ProcessMovement0(this);
if (this->x.WORD == prevX && this->y.WORD == prevY) {
this->field_0x7c.BYTES.byte0--;
}
+3 -3
View File
@@ -159,11 +159,11 @@ void Mulldozer_Action5(MulldozerEntity* this) {
sub_080332A8(this);
}
sub_080331E8(this);
ProcessMovement(super);
ProcessMovement0(super);
}
void Mulldozer_Action6(MulldozerEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
sub_08032F48(this);
if (--super->field_0xf == 0) {
super->field_0xf = 2;
@@ -206,7 +206,7 @@ void sub_08032F64(MulldozerEntity* this) {
sub_08032F24(this);
}
sub_08032F48(this);
ProcessMovement(super);
ProcessMovement0(super);
}
void sub_08032F90(MulldozerEntity* this) {
+1 -1
View File
@@ -113,7 +113,7 @@ void Octorok_Idle(Entity* this) {
}
void Octorok_Move(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
if (Octorok_FacesPlayer(this) && gOctorokSpitChanceModifier[this->type] <= (Random() & 3)) {
+7 -7
View File
@@ -239,7 +239,7 @@ void OctorokBoss_Hit_SubAction1(Entity* this) {
3;
#endif
this->speed = 0x100;
ProcessMovement(this);
ProcessMovement0(this);
} else {
// Freeze
if (this->type2 == 0) {
@@ -784,7 +784,7 @@ void OctorokBoss_Action1_WaitForTurn(Entity* this) {
GET_ATTACK_WAIT_TURNS(this)--;
OctorokBoss_ResetToSubAction0(this);
} else {
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
GET_TIMER(this) = 0;
}
}
@@ -802,7 +802,7 @@ void OctorokBoss_Action1_ChargeAttack(Entity* this) {
bool32 knockbackCondition;
if (GET_TIMER(this) == 0) {
ProcessMovement(this);
ProcessMovement0(this);
knockbackCondition = 0;
if ((this->direction != 0) && (this->direction != 0x10)) {
knockbackCondition = ((u32)this->collisions & 0xee00) != 0;
@@ -812,7 +812,7 @@ void OctorokBoss_Action1_ChargeAttack(Entity* this) {
}
if (knockbackCondition != 0) {
this->knockbackDuration = 0x20;
this->field_0x46 = 0x200;
this->knockbackSpeed = 0x200;
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x3c;
OctorokBoss_SetAttackTimer(this);
@@ -1068,7 +1068,7 @@ void OctorokBoss_Burning_SubAction0(Entity* this) {
}
void OctorokBoss_Burning_SubAction1(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
if (this->collisions != 0) {
this->subAction = 2;
GET_HELPER(this)->targetAngle = GET_ANGLE_HI(this);
@@ -1079,7 +1079,7 @@ void OctorokBoss_Burning_SubAction1(Entity* this) {
GET_HELPER(this)->targetAngle = -GET_HELPER(this)->targetAngle ^ 0x80;
}
this->knockbackDuration = 0x18;
this->field_0x46 = 0x200;
this->knockbackSpeed = 0x200;
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x1e;
InitScreenShake(0x1e, 0);
@@ -1099,7 +1099,7 @@ void OctorokBoss_Burning_SubAction2(Entity* this) {
this->subAction = 1;
this->direction = ((u8)-GET_ANGLE_HI(this) ^ 0x80) >> 3;
this->collisions = 0;
ProcessMovement(this);
ProcessMovement0(this);
} else {
if ((u8)(GET_HELPER(this)->targetAngle - GET_ANGLE_HI(this)) >= 0x81) {
GET_ANGLE(this) -= GET_ANGULAR_VEL(this);
+2 -2
View File
@@ -64,7 +64,7 @@ void sub_08037D0C(Entity* this) {
}
UpdateAnimationVariableFrames(this, 2);
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
sub_08037E14(this);
} else if (--this->actionDelay == 0) {
sub_08037E14(this);
@@ -116,7 +116,7 @@ void sub_08037E14(Entity* this) {
ptr = gUnk_080CF498 + (dir >> 2);
x = this->x.HALF.HI + *ptr;
y = this->y.HALF.HI + *(ptr + 1);
if (sub_080AE4CC(layer, x, y, 0)) {
if (IsTileCollision(layer, x, y, 0)) {
this->direction = Random() & 0x18;
} else {
this->direction = dir;
+6 -6
View File
@@ -171,7 +171,7 @@ void Peahat_Fly(Entity* this) {
}
}
sub_080AEFE0(this);
ProcessMovement2(this);
GetNextFrame(this);
}
@@ -205,7 +205,7 @@ void Peahat_ChargeTarget(Entity* this) {
if ((gRoomTransition.frameCount & 3) == 0)
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
}
sub_080AEFE0(this);
ProcessMovement2(this);
} else {
sub_080205F8(this);
}
@@ -223,7 +223,7 @@ void Peahat_ChargeEnd(Entity* this) {
if (this->actionDelay & 1)
this->speed -= 8;
sub_080AEFE0(this);
ProcessMovement2(this);
UpdateAnimationVariableFrames(this, 4);
}
}
@@ -241,7 +241,7 @@ void Peahat_Stunned(Entity* this) {
if (this->direction == 0xff)
this->direction = this->knockbackDirection;
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
break;
case PeahatAnimation_SlicedPropeller:
@@ -307,7 +307,7 @@ void Peahat_Hop(Entity* this) {
if (this->frame & 1) {
sub_0800442E(this);
} else {
ProcessMovement(this);
ProcessMovement0(this);
}
}
@@ -324,7 +324,7 @@ void Peahat_Takeoff(Entity* this) {
sub_0800442E(this);
} else {
GravityUpdate(this, 0x1c00);
ProcessMovement(this);
ProcessMovement0(this);
}
}
+1 -1
View File
@@ -548,7 +548,7 @@ void sub_08024940(Entity* this) {
}
}
sub_080AEFB4(this);
ProcessMovement1(this);
GetNextFrame(this);
}
+1 -1
View File
@@ -582,7 +582,7 @@ void sub_08025C2C(Entity* this) {
bool32 sub_08025C44(Entity* this) {
if ((this->frame & 1) == 0) {
return ProcessMovement(this);
return ProcessMovement0(this);
} else {
return FALSE;
}
+1 -1
View File
@@ -87,7 +87,7 @@ void sub_08022390(Entity* this) {
}
if (this->field_0xf == 0) {
ProcessMovement(this);
ProcessMovement0(this);
} else {
this->field_0xf = this->field_0xf - 1;
}
+4 -5
View File
@@ -21,7 +21,6 @@ void sub_08020A7C(Entity*);
bool32 Rollobite_TryToHoleUp(Entity*);
bool32 Rollobite_IsRolledUp(Entity*);
extern void sub_080AE7E8(Entity*, u32, u32, u32);
extern void sub_08078930(Entity*);
void Rollobite(Entity* this) {
@@ -61,8 +60,8 @@ void Rollobite_OnKnockback(Entity* this) {
this->knockbackDuration = 0;
} else if (Rollobite_IsRolledUp(this)) {
this->knockbackDuration--;
sub_080AE58C(this, this->knockbackDirection, 10);
sub_080AE7E8(this, this->field_0x46, this->knockbackDirection, 10);
CalculateEntityTileCollisions(this, this->knockbackDirection, 10);
ProcessMovementInternal(this, this->knockbackSpeed, this->knockbackDirection, 10);
} else {
GenericKnockback(this);
}
@@ -124,7 +123,7 @@ void Rollobite_Walk(Entity* this) {
GetNextFrame(this);
if (this->frame & 0x1) {
this->frame &= ~0x1;
if (!ProcessMovement(this))
if (!ProcessMovement0(this))
this->actionDelay = 1;
}
@@ -192,7 +191,7 @@ void Rollobite_RolledUp(Entity* this) {
EnqueueSFX(SFX_104);
if ((this->direction & 0x80) == 0)
sub_080AEFE0(this);
ProcessMovement2(this);
}
}
+1 -1
View File
@@ -180,5 +180,5 @@ u32 sub_0803163C(Entity* this) {
h = this->field_0x7a.HWORD;
}
this->speed = h;
return ProcessMovement(this);
return ProcessMovement0(this);
}
+1 -1
View File
@@ -69,7 +69,7 @@ void sub_0803827C(Entity* this) {
}
}
UpdateAnimationVariableFrames(this, 0x2);
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
sub_080383AC(this);
} else {
if (!(--this->actionDelay)) {
+1 -1
View File
@@ -145,7 +145,7 @@ void sub_080294D4(Entity* this) {
sub_08004596(this, GetFacingDirection(this, &gPlayerEntity));
sub_0802969C(this);
}
ProcessMovement(this);
ProcessMovement0(this);
sub_080296C8(this);
} else {
this->action = 6;
+2 -2
View File
@@ -155,7 +155,7 @@ void sub_08038B08(ScissorsBeetleEntity* this) {
}
void sub_08038B64(ScissorsBeetleEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
UpdateAnimationSingleFrame(super);
if (--super->field_0xf == 0) {
super->field_0xf = 2;
@@ -165,7 +165,7 @@ void sub_08038B64(ScissorsBeetleEntity* this) {
void sub_08038B90(ScissorsBeetleEntity* this) {
UpdateAnimationSingleFrame(super);
ProcessMovement(super);
ProcessMovement0(super);
sub_0800445C(super);
}
+3 -4
View File
@@ -9,7 +9,6 @@
#include "functions.h"
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AF038(Entity*);
extern u8 gUnk_02027EB4[];
extern u8 gUnk_0200D654[];
@@ -61,7 +60,7 @@ void sub_0802BA18(Entity* this) {
}
void sub_0802BA8C(Entity* this) {
if (!sub_080AF038(this)) {
if (!ProcessMovement12(this)) {
sub_0802BB10(this);
} else {
switch (this->direction >> 3) {
@@ -86,7 +85,7 @@ void sub_0802BA8C(Entity* this) {
}
void sub_0802BAFC(Entity* this) {
if (!sub_080AF038(this)) {
if (!ProcessMovement12(this)) {
this->action = 1;
}
}
@@ -101,7 +100,7 @@ void sub_0802BB10(Entity* this) {
bool32 sub_0802BB2C(Entity* this, u32 param_2) {
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
const s8* ptr = &gUnk_080CD3DC[param_2 >> 2];
return sub_080AE4CC(layer, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1], 0);
return IsTileCollision(layer, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1], 0);
}
// clang-format off
+1 -1
View File
@@ -78,7 +78,7 @@ void sub_08045018(Entity* this) {
}
void sub_08045088(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
this->action = 1;
+1 -1
View File
@@ -76,7 +76,7 @@ void sub_08023C5C(Entity* this) {
}
void sub_08023C8C(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
sub_08023E54(this);
if (--this->actionDelay == 0) {
+1 -1
View File
@@ -55,7 +55,7 @@ void sub_0802B35C(Entity* this) {
bool32 is_head;
GetNextFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
is_head = this->type == 0;
if (this->collisions == 0) {
if (--this->field_0xf == 0) {
+3 -3
View File
@@ -235,7 +235,7 @@ void sub_08028528(Entity* this) {
}
if (0x20 < this->field_0x7a.HALF.HI) {
ProcessMovement(this);
ProcessMovement0(this);
}
GetNextFrame(this);
@@ -370,7 +370,7 @@ void sub_08028858(Entity* this) {
this->speed = 0;
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
@@ -383,7 +383,7 @@ void sub_080288C0(Entity* this) {
if (ent && (ent->bitfield & 0x80)) {
this->knockbackDirection = ent->knockbackDirection;
this->iframes = -ent->iframes;
this->field_0x46 = ent->field_0x46;
this->knockbackSpeed = ent->knockbackSpeed;
this->knockbackDuration = ent->knockbackDuration;
ent->knockbackDuration = 0;
}
+3 -3
View File
@@ -94,7 +94,7 @@ void sub_0802B744(Entity* this) {
this->action = 2;
this->actionDelay = 0x1e;
} else {
if (!ProcessMovement(this)) {
if (!ProcessMovement0(this)) {
this->actionDelay = 1;
}
}
@@ -127,7 +127,7 @@ void sub_0802B7FC(Entity* this) {
}
void sub_0802B820(Entity* this) {
if (!sub_080AEFE0(this)) {
if (!ProcessMovement2(this)) {
this->actionDelay = 1;
}
GetNextFrame(this);
@@ -152,7 +152,7 @@ void sub_0802B880(Entity* this) {
}
void sub_0802B8B0(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
switch (sub_080044EC(this, 0x1800)) {
case 0:
this->action = 7;
+1 -1
View File
@@ -325,7 +325,7 @@ void sub_08033D78(SpinyBeetleEntity* this) {
break;
default:
if (sub_080002E0(tile, super->collisionLayer) - 1 > 0x3e)
ProcessMovement(super);
ProcessMovement0(super);
break;
}
}
+2 -2
View File
@@ -175,7 +175,7 @@ void sub_080226EC(Entity* this) {
this->direction = sub_08049F84(this, 1);
}
ProcessMovement(this);
ProcessMovement0(this);
}
GetNextFrame(this);
@@ -224,7 +224,7 @@ void sub_0802281C(Entity* this) {
void sub_08022854(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
this->action = 7;
this->hitType = 0x5c;
+5 -5
View File
@@ -188,7 +188,7 @@ void Stalfos_Action2(StalfosEntity* this) {
void Stalfos_Action3(StalfosEntity* this) {
if (sub_08039758(this) == 0) {
if (ProcessMovement(super)) {
if (ProcessMovement0(super)) {
UpdateAnimationSingleFrame(super);
if (--this->unk_78 == 0) {
sub_0803998C(this);
@@ -201,7 +201,7 @@ void Stalfos_Action3(StalfosEntity* this) {
}
void Stalfos_Action4(StalfosEntity* this) {
sub_080AEFE0(super);
ProcessMovement2(super);
if (GravityUpdate(super, 0x1800) == 0) {
sub_0803998C(this);
this->unk_7c = 0x5a;
@@ -210,7 +210,7 @@ void Stalfos_Action4(StalfosEntity* this) {
}
void Stalfos_Action5(StalfosEntity* this) {
sub_080AEFE0(super);
ProcessMovement2(super);
GravityUpdate(super, 0x1800);
if (super->zVelocity < 0) {
super->action = 6;
@@ -260,7 +260,7 @@ void Stalfos_Action9(StalfosEntity* this) {
}
void Stalfos_Action11(StalfosEntity* this) {
sub_080AEFE0(super);
ProcessMovement2(super);
UpdateAnimationSingleFrame(super);
if (--this->unk_78 == 0) {
sub_08039AD4(this);
@@ -365,7 +365,7 @@ void sub_0803992C(StalfosEntity* this) {
super->speed = 0xe0;
super->direction = super->animationState << 3;
this->unk_78 = (u16)gUnk_080CF900[Random() & 0xf];
sub_080AE58C(super, super->direction, 0);
CalculateEntityTileCollisions(super, super->direction, 0);
if ((gUnk_080CF910[super->animationState] & super->collisions) != 0) {
InitAnimationForceUpdate(super, super->animationState);
} else {
+1 -1
View File
@@ -116,7 +116,7 @@ void sub_0802F300(Entity* this) {
u32 rand;
GetNextFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
temp = this->z.HALF.HI;
rand = Random() & 0xf;
+1 -1
View File
@@ -104,7 +104,7 @@ void sub_08038048(Entity* this) {
u32 rand;
UpdateAnimationVariableFrames(this, 2);
ProcessMovement(this);
ProcessMovement0(this);
temp = this->z.HALF.HI;
rand = Random() & 0xf;
+1 -1
View File
@@ -698,7 +698,7 @@ void sub_08042EF4(Entity* this) {
}
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
entity->direction = this->direction;
ProcessMovement(entity);
ProcessMovement0(entity);
}
}
+1 -1
View File
@@ -246,7 +246,7 @@ void sub_0802F04C(Entity* this) {
oldX = this->x.HALF.HI;
oldY = this->y.HALF.HI;
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
sub_0802EFB8(this);
return;
}
+2 -4
View File
@@ -9,8 +9,6 @@
#include "area.h"
#include "functions.h"
extern void sub_080AEFB4(Entity*);
void VaatiRebornEnemyType0PreAction(Entity*);
void VaatiRebornEnemyType1PreAction(Entity*);
void VaatiRebornEnemyType0Action0(Entity*);
@@ -218,7 +216,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
this->y.HALF.HI--;
}
}
sub_080AEFB4(this);
ProcessMovement1(this);
}
}
UpdateAnimationSingleFrame(this);
@@ -416,7 +414,7 @@ void VaatiRebornEnemyType0Action5(Entity* this) {
}
if (this->field_0x86.HALF.HI != 0) {
sub_080AEFB4(this);
ProcessMovement1(this);
}
UpdateAnimationSingleFrame(this);
}
+1 -1
View File
@@ -249,7 +249,7 @@ void VaatiTransfiguredType0Action1(Entity* this) {
}
}
if (this->field_0x80.HALF.LO != 0xff) {
ProcessMovement(this);
ProcessMovement0(this);
}
UpdateAnimationSingleFrame(this);
}
+1 -1
View File
@@ -248,7 +248,7 @@ void VaatiWrathType0Action3(Entity* this) {
sub_08042004(this);
UpdateAnimationSingleFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
roomY = gRoomControls.origin_y;
bound = roomY + 0x90;
+1 -1
View File
@@ -105,7 +105,7 @@ void sub_080336A8(Entity* this) {
} else if (this->collisions != 0) {
sub_0800417E(this, this->collisions);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
+1 -1
View File
@@ -261,7 +261,7 @@ void sub_0802F9C8(WizzrobeEntity* this) {
}
} else {
if (super->type2 != 0) {
ProcessMovement(super);
ProcessMovement0(super);
if (super->collisions != 0) {
super->flags &= 0x7f;
this->timer1 = 0x28;
+1789 -246
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -155,7 +155,7 @@ void sub_080646A4(Entity* this, ScriptExecutionContext* context) {
}
context->postScriptActions |= 0x2;
ProcessMovement(this);
ProcessMovement0(this);
x = this->x.HALF.HI;
diff = x - (s16)this->field_0x6c.HWORD;
if (diff > 0x10) {
+1 -1
View File
@@ -87,7 +87,7 @@ void sub_08069068(Entity* ent) {
InitAnimationForceUpdate(ent, ent->animationState + 4);
}
ProcessMovement(ent);
ProcessMovement0(ent);
UpdateAnimationSingleFrame(ent);
{
+1 -1
View File
@@ -136,7 +136,7 @@ void sub_08069D54(Entity* this) {
this->actionDelay -= 1;
if (this->actionDelay != 0) {
UpdateAnimationSingleFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
collisions = this->collisions;
if (this->x.HALF.HI < this->field_0x6e.HWORD) {
+1 -1
View File
@@ -364,7 +364,7 @@ NONMATCH("asm/non_matching/kid/sub_08062948.inc", void sub_08062948(Entity* this
InitializeAnimation(this, uVar3);
this->field_0x80.HALF.LO = (u16)this->animIndex;
}
ProcessMovement(this);
ProcessMovement0(this);
iVar4 = this->x.HALF.HI - this->field_0x6c.HALF.LO;
if (0x10 < iVar4) {
this->x.HALF.HI = this->field_0x6c.HALF.LO + 0x10;
+1 -1
View File
@@ -76,7 +76,7 @@ void sub_080663D4(Entity* this) {
InitializeAnimation(this, (this->direction >> 3) + 4);
this->subAction = this->subAction + 1;
}
ProcessMovement(this);
ProcessMovement0(this);
}
sub_08078B48();
GetNextFrame(this);
+13 -14
View File
@@ -42,7 +42,6 @@ u32 PointInsideRadius(s32, s32, s32);
extern u8 gUnk_0200D654[];
extern u8 gUnk_02027EB4[];
extern u32 sub_080AF1EC(Entity*);
u32 sub_080611D4(Entity*);
extern u32 sub_08079FD4(Entity*, u32);
extern void sub_08016AD2(Entity*);
@@ -395,7 +394,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061170.inc", bool32 sub_08061170(Entity* t
u32 tmp;
UpdateAnimationSingleFrame(this);
if (sub_080AF1EC(this) == 0) {
if (ProcessMovement6(this) == 0) {
direction = sub_080611D4(this);
if (direction != 0xff) {
this->action = 6;
@@ -636,7 +635,7 @@ void sub_08061464(Entity* this, u32 param_a, u32 param_b) {
bool32 sub_08061630(Entity* this, s32 x, s32 y, s32 param) {
u32 param_y = y;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_08061A74(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = x;
((UnkHeap*)this->myHeap)->unk_8 = param_y;
@@ -653,7 +652,7 @@ bool32 sub_08061630(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_080616A8(Entity* this, s32 x, s32 y, s32 param) {
u32 param_y = y;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_08061A1C(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = x;
((UnkHeap*)this->myHeap)->unk_8 = param_y;
@@ -670,7 +669,7 @@ bool32 sub_080616A8(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_08061720(Entity* this, s32 x, s32 y, s32 param) {
u32 param_x = x;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_080619F0(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = param_x;
((UnkHeap*)this->myHeap)->unk_8 = y;
@@ -687,7 +686,7 @@ bool32 sub_08061720(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_08061798(Entity* this, s32 x, s32 y, s32 param) {
u32 param_x = x;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_08061A48(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = param_x;
((UnkHeap*)this->myHeap)->unk_8 = y;
@@ -704,7 +703,7 @@ bool32 sub_08061798(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_08061810(Entity* this, s32 x, s32 y, s32 param) {
u32 param_y = y;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_08061A74(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = x;
((UnkHeap*)this->myHeap)->unk_8 = param_y;
@@ -721,7 +720,7 @@ bool32 sub_08061810(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_08061888(Entity* this, s32 x, s32 y, s32 param) {
u32 param_y = y;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_08061A1C(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = x;
((UnkHeap*)this->myHeap)->unk_8 = param_y;
@@ -738,7 +737,7 @@ bool32 sub_08061888(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_08061900(Entity* this, s32 x, s32 y, s32 param) {
u32 param_x = x;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_080619F0(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = param_x;
((UnkHeap*)this->myHeap)->unk_8 = y;
@@ -755,7 +754,7 @@ bool32 sub_08061900(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_08061978(Entity* this, s32 x, s32 y, s32 param) {
u32 param_x = x;
u8* layer = (this->collisionLayer == 2) ? gUnk_0200D654 : gUnk_02027EB4;
while (!sub_080AE4CC(layer, x, y, 6)) {
while (!IsTileCollision(layer, x, y, 6)) {
if (sub_08061A48(layer, x, y, param)) {
((UnkHeap*)this->myHeap)->unk_7 = param_x;
((UnkHeap*)this->myHeap)->unk_8 = y;
@@ -771,7 +770,7 @@ bool32 sub_08061978(Entity* this, s32 x, s32 y, s32 param) {
bool32 sub_080619F0(u8* layer, s32 x, s32 y, s32 param) {
while (param <= y) {
if (sub_080AE4CC(layer, x, y, 6) != 0) {
if (IsTileCollision(layer, x, y, 6) != 0) {
return FALSE;
}
y -= 8;
@@ -781,7 +780,7 @@ bool32 sub_080619F0(u8* layer, s32 x, s32 y, s32 param) {
bool32 sub_08061A1C(u8* layer, s32 x, s32 y, s32 param) {
while (param >= x) {
if (sub_080AE4CC(layer, x, y, 6) != 0) {
if (IsTileCollision(layer, x, y, 6) != 0) {
return FALSE;
}
x += 8;
@@ -791,7 +790,7 @@ bool32 sub_08061A1C(u8* layer, s32 x, s32 y, s32 param) {
bool32 sub_08061A48(u8* layer, s32 x, s32 y, s32 param) {
while (param >= y) {
if (sub_080AE4CC(layer, x, y, 6) != 0) {
if (IsTileCollision(layer, x, y, 6) != 0) {
return FALSE;
}
y += 8;
@@ -801,7 +800,7 @@ bool32 sub_08061A48(u8* layer, s32 x, s32 y, s32 param) {
bool32 sub_08061A74(u8* layer, s32 x, s32 y, s32 param) {
while (param <= x) {
if (sub_080AE4CC(layer, x, y, 6) != 0) {
if (IsTileCollision(layer, x, y, 6) != 0) {
return FALSE;
}
x -= 8;
+1 -1
View File
@@ -190,7 +190,7 @@ void sub_08061E90(Entity* this, ScriptExecutionContext* context) {
if (animIndex != this->animIndex) {
InitializeAnimation(this, animIndex);
}
ProcessMovement(this);
ProcessMovement0(this);
iVar4 = this->x.HALF.HI - *(s16*)&this->field_0x6a.HWORD;
if (0x10 < iVar4) {
this->x.HALF.HI = this->field_0x6a.HWORD + 0x10;
+7 -7
View File
@@ -130,7 +130,7 @@ void sub_0806EE04(Entity* ent, void* a2, u32 a3) {
ent->child = a2;
ent->field_0x3c = a3;
ent->hitType = 0;
ent->field_0x46 = 0;
ent->knockbackSpeed = 0;
ent->field_0x16 = 0;
}
@@ -141,7 +141,7 @@ u32 sub_0806EE20(Entity* ent) {
if (ent->child)
return gUnk_08114EFC[ent->field_0x16](ent);
} else {
ent->field_0x46 = 8;
ent->knockbackSpeed = 8;
v3 = GetFacingDirection(ent, &gPlayerEntity);
ent->knockbackDirection = sub_0806F5A4(v3);
}
@@ -154,8 +154,8 @@ u32 sub_0806EE70(Entity* ent) {
u32 result;
u16 xy[2];
if (++ent->field_0x46 > 8) {
ent->field_0x46 = 0;
if (++ent->knockbackSpeed > 8) {
ent->knockbackSpeed = 0;
sub_0806EF14(ent);
}
LinearMoveUpdate(ent);
@@ -172,7 +172,7 @@ u32 sub_0806EE70(Entity* ent) {
}
u32 sub_0806EED0(Entity* ent) {
if (!--ent->field_0x46)
if (!--ent->knockbackSpeed)
return sub_0806EF74(ent, 2);
return 0;
}
@@ -214,13 +214,13 @@ u32 sub_0806EFAC(Entity* ent, u16* a2) {
u32 sub_0806EFBC(Entity* ent, u16* a2) {
ent->field_0x16 = 1;
ent->field_0x46 = 8;
ent->knockbackSpeed = 8;
return 0;
}
u32 sub_0806EFCC(Entity* ent, u16* a2) {
ent->field_0x16 = 2;
ent->field_0x46 = a2[1];
ent->knockbackSpeed = a2[1];
return 0;
}
+1 -1
View File
@@ -65,7 +65,7 @@ void sub_0809CD0C(Entity* this) {
gPlayerEntity.iframes = 16;
gPlayerEntity.knockbackDirection = 16;
gPlayerEntity.knockbackDuration = 12;
gPlayerEntity.field_0x46 = 16;
gPlayerEntity.knockbackSpeed = 16;
}
}
}
+2 -2
View File
@@ -203,7 +203,7 @@ void sub_080811D8(Entity* this) {
void sub_080811EC(Entity* this) {
if (this->field_0x68.HALF.HI != 6) {
sub_080AEFE0(this);
ProcessMovement2(this);
} else {
LinearMoveUpdate(this);
}
@@ -389,7 +389,7 @@ void sub_08081500(Entity* this) {
UpdateSpriteForCollisionLayer(this);
}
sub_080AEFE0(this);
ProcessMovement2(this);
}
}
}
-5
View File
@@ -6,11 +6,6 @@
#include "flags.h"
#include "functions.h"
extern void sub_0809EB30(Entity*);
extern void sub_0809EAD8(Entity*);
extern void sub_0809EABC(Entity*);
extern void sub_080A2CC0(Entity*, Entity**, u16*);
extern void (*const gUnk_081243B4[])(Entity*);
extern void (*const gUnk_081243BC[])(Entity*);
extern void (*const gUnk_081243C4[])(Entity*);
+1 -1
View File
@@ -114,7 +114,7 @@ void sub_08085A44(LilypadLargeEntity* this) {
}
}
sub_08085EFC(this);
sub_080AF134(super);
ProcessMovement4(super);
sub_08085F1C(this);
}
+1 -1
View File
@@ -22,7 +22,7 @@ void ObjectB2(Entity* this) {
}
this->speed = this->parent->speed;
LinearMoveUpdate(this);
if (sub_080AE4CC((u8*)this->child, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
if (IsTileCollision((u8*)this->child, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
DeleteThisEntity();
}
if (this->speed < 0x41) {
+1 -1
View File
@@ -37,7 +37,7 @@ void sub_08086A28(Entity* ent) {
if (iVar1 == 0) {
ent->action = 2;
}
ProcessMovement(ent);
ProcessMovement0(ent);
CopyPosition(ent, ent->child);
}
}
+1 -1
View File
@@ -205,7 +205,7 @@ bool32 sub_0809953C(SmallIceBlockEntity* this) {
if (uVar3 != 0) {
return 0;
}
sub_080AEFE0(super);
ProcessMovement2(super);
sub_0800445C(super);
if (super->actionDelay != 0) {
super->speed += 0x10;
+1 -3
View File
@@ -3,8 +3,6 @@
#include "functions.h"
#include "object.h"
extern s32 sub_080AF090(Entity*);
extern void (*const gArrowProjectile[])(Entity*);
extern void (*const gArrowProjectileActions[])(Entity*);
@@ -78,7 +76,7 @@ void ArrowProjectile_Action2(Entity* this) {
} else if (--this->actionDelay == 0) {
DeleteThisEntity();
}
sub_080AF090(this);
ProcessMovement3(this);
}
void ArrowProjectile_Action3(Entity* this) {
+3 -7
View File
@@ -2,10 +2,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const BoneProjectile_Functions[])(Entity*);
extern void (*const BoneProjectile_Actions[])(Entity*);
@@ -36,9 +32,9 @@ void BoneProjectile_Init(Entity* this) {
void BoneProjectile_Action1(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
ProcessMovement3(this);
if (this->collisions == 0) {
if (IsProjectileOffScreen(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
@@ -54,7 +50,7 @@ void BoneProjectile_Action1(Entity* this) {
void BoneProjectile_Action2(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
ProcessMovement3(this);
if (GravityUpdate(this, 0x1800) == 0) {
this->action = 3;
COLLISION_OFF(this);
+3 -8
View File
@@ -1,11 +1,6 @@
#include "entity.h"
#include "enemy.h"
extern void CreateItemOnGround(Entity*);
extern s32 sub_080AF090(Entity*);
extern void sub_080043A8(Entity*);
extern void CreateChestSpawner(Entity*);
extern u32 IsColliding(Entity*, Entity*);
#include "functions.h"
extern void (*const CannonballProjectile_Functions[])(Entity*);
extern void (*const CannonballProjectile_Actions[])(Entity*);
@@ -44,7 +39,7 @@ void CannonballProjectile_Init(Entity* this) {
void CannonballProjectile_Action1(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) == 0) {
if (ProcessMovement3(this) == 0) {
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
}
@@ -53,7 +48,7 @@ void CannonballProjectile_Action1(Entity* this) {
void CannonballProjectile_Action2(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
ProcessMovement3(this);
if ((sub_080AB634(this) == 0) && (this->collisions != 0)) {
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
+7 -12
View File
@@ -2,11 +2,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern u32 IsColliding(Entity*, Entity*);
extern void (*const DekuSeedProjectile_Functions[])(Entity*);
extern void (*const DekuSeedProjectile_Actions[])(Entity*);
@@ -54,8 +49,8 @@ void DekuSeedProjectile_Action1(Entity* this) {
Entity* parent;
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
if (ProcessMovement3(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteThisEntity();
}
sub_08016AD2(this);
@@ -75,20 +70,20 @@ void DekuSeedProjectile_Action1(Entity* this) {
this->knockbackDirection = -this->direction;
this->bitfield = 0x80;
this->knockbackDuration = 0xc;
this->field_0x46 = 0;
this->knockbackSpeed = 0;
parent->iframes = 0x10;
parent->knockbackDirection = this->direction;
parent->bitfield = 0xc2;
parent->knockbackDuration = 0xc;
parent->field_0x46 = 0;
parent->knockbackSpeed = 0;
}
}
}
void DekuSeedProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
if (ProcessMovement3(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteThisEntity();
}
if (--this->actionDelay == 0) {
@@ -112,7 +107,7 @@ void DekuSeedProjectile_Action3(Entity* this) {
void DekuSeedProjectile_Action4(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
ProcessMovement3(this);
switch (sub_080044EC(this, 0x2800)) {
case 0:
DeleteThisEntity();
+1 -1
View File
@@ -28,7 +28,7 @@ void DirtBallProjectile_OnTick(Entity* this) {
}
void sub_080A881C(Entity* this) {
this->field_0x46 = 0;
this->knockbackSpeed = 0;
if (this->type == 0) {
this->parent->child = NULL;
if (this->bitfield == 0x80) {
+2 -6
View File
@@ -3,10 +3,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const FireProjectile_Actions[])(Entity*);
void FireProjectile(Entity* this) {
@@ -52,8 +48,8 @@ void FireProjectile_Action1(Entity* this) {
void FireProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
if (ProcessMovement3(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
+1 -1
View File
@@ -62,7 +62,7 @@ void GuardLineOfSight(Entity* this) {
DeleteThisEntity();
}
LinearMoveUpdate(this);
if (sub_080AE4CC(gUnk_02027EB4, this->x.HALF.HI, this->y.HALF.HI, 2) != 0) {
if (IsTileCollision(gUnk_02027EB4, this->x.HALF.HI, this->y.HALF.HI, 2)) {
DeleteThisEntity();
}
}
+4 -6
View File
@@ -2,9 +2,7 @@
#include "enemy.h"
#include "coord.h"
#include "player.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
#include "functions.h"
extern void (*const GyorgMaleEnergyProjectile_Functions[])(Entity*);
extern void (*const GyorgMaleEnergyProjectile_Actions[])(Entity*);
@@ -72,9 +70,9 @@ void GyorgMaleEnergyProjectile_Action1(Entity* this) {
}
void GyorgMaleEnergyProjectile_Action2(Entity* this) {
sub_080AF090(this);
ProcessMovement3(this);
GetNextFrame(this);
if (IsProjectileOffScreen(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteThisEntity();
}
if (--this->actionDelay == 0) {
@@ -86,7 +84,7 @@ void GyorgMaleEnergyProjectile_Action2(Entity* this) {
}
void GyorgMaleEnergyProjectile_Action3(Entity* this) {
sub_080AF090(this);
ProcessMovement3(this);
GetNextFrame(this);
if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
+2 -6
View File
@@ -3,10 +3,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const IceProjectile_Actions[])(Entity*);
void IceProjectile(Entity* this) {
@@ -54,8 +50,8 @@ void IceProjectile_Action1(Entity* this) {
void IceProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
if (ProcessMovement3(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
+3 -5
View File
@@ -1,8 +1,6 @@
#include "entity.h"
#include "enemy.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
#include "functions.h"
extern void (*const LakituLightning_Functions[])(Entity*);
extern void (*const LakituLightning_Actions[])(Entity*);
@@ -33,12 +31,12 @@ void LakituLightning_Init(Entity* this) {
void LakituLightning_Action1(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
ProcessMovement3(this);
if ((this->collisions != 0) || (--this->actionDelay == 0)) {
CreateFx(this, FX_BLUE_EFC, 0);
DeleteThisEntity();
}
if (IsProjectileOffScreen(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteThisEntity();
}
}
+1 -1
View File
@@ -46,7 +46,7 @@ void sub_080A9EBC(Entity* this) {
case 4:
this->field_0xf = 0;
ModHealth(-2);
sub_080AF090(this);
ProcessMovement3(this);
UpdateAnimationSingleFrame(this);
break;
case 3:
+2 -2
View File
@@ -28,7 +28,7 @@ void sub_080A832C(Entity* this) {
if (this->bitfield == 0x80) {
this->iframes = 0x10;
this->knockbackDuration = 0xc;
this->field_0x46 = 0x180;
this->knockbackSpeed = 0x180;
this->parent->bitfield = this->bitfield;
}
tmp = this->iframes;
@@ -38,7 +38,7 @@ void sub_080A832C(Entity* this) {
this->parent->iframes = -tmp;
}
this->parent->knockbackDuration = this->knockbackDuration;
this->parent->field_0x46 = this->field_0x46;
this->parent->knockbackSpeed = this->knockbackSpeed;
this->parent->knockbackDirection = this->knockbackDirection;
this->knockbackDuration = 0;
}
+3 -3
View File
@@ -103,7 +103,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
this->parent->iframes = 0x1e;
if (this->parent->field_0x7c.BYTES.byte0 != 0) {
this->parent->knockbackDuration = 0x18;
this->parent->field_0x46 = 0x200;
this->parent->knockbackSpeed = 0x200;
this->parent->knockbackDirection = this->direction >> 3;
}
SoundReq(SFX_BOSS_HIT);
@@ -113,7 +113,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
UpdateAnimationSingleFrame(this);
this->field_0x78.HWORD--;
LinearMoveAngle(this, this->speed, this->direction);
sub_080AE58C(this, this->direction >> 3, 0);
CalculateEntityTileCollisions(this, this->direction >> 3, 0);
if ((this->collisions & 0xee00) != 0) {
this->direction = -this->direction;
}
@@ -150,7 +150,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
}
GetNextFrame(this);
if (GravityUpdate(this, 0x1800) != 0) {
sub_080AE58C(this, this->direction >> 3, 0);
CalculateEntityTileCollisions(this, this->direction >> 3, 0);
if (this->collisions == 0) {
LinearMoveAngle(this, (s32)this->speed, (u32)this->direction);
} else {
+3 -7
View File
@@ -2,10 +2,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const RockProjectile_Functions[])(Entity*);
extern void (*const RockProjectile_Actions[])(Entity*);
@@ -37,8 +33,8 @@ void RockProjectile_Init(Entity* this) {
void RockProjectile_Action1(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
if (ProcessMovement3(this) != 0) {
if (IsProjectileOffScreen(this)) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
@@ -63,7 +59,7 @@ void RockProjectile_Action2(Entity* this) {
void RockProjectile_Action3(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
ProcessMovement3(this);
switch (sub_080044EC(this, 0x2800)) {
case 0:
DeleteEntity(this);

Some files were not shown because too many files have changed in this diff Show More