Extract entity definitions

This commit is contained in:
octorock
2021-11-11 18:12:33 +01:00
parent e44d0e3fc9
commit b1e2175ffb
72 changed files with 3337 additions and 8518 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const BoneProjectile_Functions[])(Entity*);
@@ -38,7 +38,7 @@ void BoneProjectile_Action1(Entity* this) {
GetNextFrame(this);
sub_080AF090(this);
if (this->collisions == 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
+3 -3
View File
@@ -5,7 +5,7 @@
#include "flags.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern u32 sub_080177A0(Entity*, Entity*);
@@ -57,7 +57,7 @@ void DekuSeedProjectile_Action1(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
sub_08016AD2(this);
@@ -90,7 +90,7 @@ void DekuSeedProjectile_Action1(Entity* this) {
void DekuSeedProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
if (--this->actionDelay == 0) {
+2 -2
View File
@@ -5,7 +5,7 @@
#include "audio.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const FireProjectile_Actions[])(Entity*);
@@ -54,7 +54,7 @@ void FireProjectile_Action1(Entity* this) {
void FireProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
+2 -2
View File
@@ -5,7 +5,7 @@
#include "audio.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void (*const GyorgMaleEnergyProjectile_Functions[])(Entity*);
extern void (*const GyorgMaleEnergyProjectile_Actions[])(Entity*);
@@ -52,7 +52,7 @@ void GyorgMaleEnergyProjectile_Action1(Entity* this) {
void GyorgMaleEnergyProjectile_Action2(Entity* this) {
sub_080AF090(this);
GetNextFrame(this);
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
if (--this->actionDelay == 0) {
+6 -6
View File
@@ -5,9 +5,9 @@
#include "functions.h"
extern u8 gEntCount;
extern Hitbox gUnk_080FD458;
extern Hitbox gUnk_080FD168;
extern Hitbox gUnk_080FD448;
extern Hitbox gHitbox_21;
extern Hitbox gHitbox_1;
extern Hitbox gHitbox_20;
extern void (*const gUnk_0812A994[])(Entity*);
extern void (*const GyorgTail_Actions[])(Entity*);
@@ -95,7 +95,7 @@ void sub_080AC510(Entity* this) {
this->spriteSettings.b.draw = 1;
this->collisionLayer = 2;
if (*(u16*)&this->type == 0x300) {
this->hitbox = &gUnk_080FD458;
this->hitbox = &gHitbox_21;
}
}
}
@@ -112,9 +112,9 @@ void sub_080AC560(Entity* this) {
this->action = 1;
this->collisionLayer = 2;
if (this->type == 0) {
this->hitbox = &gUnk_080FD168;
this->hitbox = &gHitbox_1;
} else {
this->hitbox = &gUnk_080FD448;
this->hitbox = &gHitbox_20;
}
this->frameIndex = 0xff;
this->spriteSettings.b.draw = 1;
+2 -2
View File
@@ -5,7 +5,7 @@
#include "audio.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const IceProjectile_Actions[])(Entity*);
@@ -56,7 +56,7 @@ void IceProjectile_Action1(Entity* this) {
void IceProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
+2 -2
View File
@@ -3,7 +3,7 @@
#include "effects.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void (*const LakituLightning_Functions[])(Entity*);
extern void (*const LakituLightning_Actions[])(Entity*);
@@ -39,7 +39,7 @@ void LakituLightning_Action1(Entity* this) {
CreateFx(this, FX_BLUE_EFC, 0);
DeleteThisEntity();
}
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
}
+2 -2
View File
@@ -10,7 +10,7 @@ extern Entity* sub_08049DF4(u32);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern s32 sub_080AF090(Entity*);
extern u32 sub_0806F824(Entity*, Entity*, u32, u32);
extern Hitbox gUnk_080FD150;
extern Hitbox gHitbox_0;
extern void (*const MandiblesProjectile_Functions[])(Entity*);
extern void (*const MandiblesProjectile_Actions[])(Entity*);
@@ -148,7 +148,7 @@ void MandiblesProjectile_Action3(Entity* this) {
uVar1 = entity->animationState;
this->direction = uVar1 << 2;
this->animationState = uVar1 << 0x1a >> 0x1a;
this->hitbox = &gUnk_080FD150;
this->hitbox = &gHitbox_0;
if (CheckIsDungeon() != 0) {
this->spriteOrientation.flipY = 1;
}
+2 -2
View File
@@ -3,7 +3,7 @@
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const RockProjectile_Functions[])(Entity*);
@@ -38,7 +38,7 @@ void RockProjectile_Init(Entity* this) {
void RockProjectile_Action1(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteEntity(this);
} else {
sub_08016AD2(this);
+2 -2
View File
@@ -3,7 +3,7 @@
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void (*const TorchTrapProjectile_Functions[])(Entity*);
extern void (*const TorchTrapProjectile_Actions[])(Entity*);
@@ -45,7 +45,7 @@ void TorchTrapProjectile_Action2(Entity* this) {
if (this->collisions != 0) {
DeleteThisEntity();
}
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
}
+2 -2
View File
@@ -6,7 +6,7 @@
#include "functions.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void (*const V3ElectricProjectile_Functions[])(Entity*);
extern void (*const V3ElectricProjectile_Actions[])(Entity*);
@@ -67,7 +67,7 @@ void V3ElectricProjectile_Action2(Entity* this) {
DeleteThisEntity();
}
GetNextFrame(this);
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
if (this->actionDelay < 0x1e) {
+2 -2
View File
@@ -4,7 +4,7 @@
#include "audio.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void (*const V3HandProjectile_Functions[])(Entity*);
@@ -27,7 +27,7 @@ void V3HandProjectile_OnTick(Entity* this) {
DeleteThisEntity();
}
GetNextFrame(this);
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
}
+3 -3
View File
@@ -5,7 +5,7 @@
#include "effects.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void (*const V3TennisBallProjectile_Functions[])(Entity*);
extern void (*const V3TennisBallProjectile_Actions[])(Entity*);
@@ -34,7 +34,7 @@ void V3TennisBallProjectile_Init(Entity* this) {
void V3TennisBallProjectile_Action1(Entity* this) {
sub_080AF090(this);
GetNextFrame(this);
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
}
@@ -46,7 +46,7 @@ void V3TennisBallProjectile_Action2(Entity* this) {
}
GetNextFrame(this);
sub_080ACB90(this);
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteThisEntity();
}
}
+2 -2
View File
@@ -4,7 +4,7 @@
#include "audio.h"
extern s32 sub_080AF090(Entity*);
extern s32 sub_080A7EB0(Entity*);
extern s32 IsProjectileOffScreen(Entity*);
extern void sub_08016AD2(Entity*);
extern void (*const WindProjectile_Actions[])(Entity*);
@@ -60,7 +60,7 @@ void WindProjectile_Action1(Entity* this) {
void WindProjectile_Action2(Entity* this) {
GetNextFrame(this);
if (sub_080AF090(this) != 0) {
if (sub_080A7EB0(this) != 0) {
if (IsProjectileOffScreen(this) != 0) {
DeleteEntity(this);
} else {
sub_08016AD2(this);