converted enemy ptr table

This commit is contained in:
theo3
2020-06-14 18:49:49 -07:00
parent f499c38032
commit 52f003086a
110 changed files with 59818 additions and 59597 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ extern void sub_0806F69C();
extern void sub_08004488();
extern Entity* sub_0804B128();
void sub_08032358(Entity* ent) {
void BladeTrap(Entity* ent) {
u16 uVar1;
Entity* pEVar2;
u16* puVar3;
+110
View File
@@ -0,0 +1,110 @@
#include "global.h"
#include "entity.h"
#include "enemy.h"
void (*const gEnemyFunctions[])(Entity* ent) =
{
Octorok,
Chuchu,
Leever,
Peahat,
Rollobite,
DarkNut,
HangingSeed,
Beetle,
Keese,
DoorMimic,
RockChuchu,
SpinyChuchu,
CuccoChickAggr,
Moldorm,
EnemyE,
Moldworm,
Sluggula,
Pesto,
Puffstool,
ChuchuBoss,
LikeLike,
SpearMoblin,
BusinessScrub,
RupeeLike,
Madderpillar,
WaterDrop,
WallMaster,
BombPeahat,
Spark,
Chaser,
SpikedBeetle,
SensorBladeTrap,
Helmasaur,
FallingBoulder,
Bobomb,
WallMaster2,
Gleerok,
VaatiEyesMacro,
Tektite,
WizzrobeWind,
WizzrobeFire,
WizzrobeIce,
Armos,
Eyegore,
Rope,
SmallPesto,
AcroBandit,
BladeTrap,
Keaton,
Crow,
Mulldozer,
Bombarossa,
Wisp,
SpinyBeetle,
MazaalHead,
MazaalMacro,
MazaalHand,
OctorokBoss,
FlyingPot,
Gibdo,
OctorokGolden,
TektiteGolden,
RopeGolden,
CloudPiranha,
ScissorsBeetle,
CuccoAggr,
Stalfos,
FlyingSkull,
MazaalBracelet,
Takkuri,
BowMoblin,
Lakitu,
LakituCloud,
Enemy49,
VaatiRebornEnemy,
VaatiProjectile,
BallChainSoldier,
Enemy4D,
Ghini,
VaatiTransfigured,
Enemy50,
VaatiWrath,
VaatiArm,
Dust,
VaatiBall,
Octorok,
Slime,
MiniSlime,
FireballGuy,
MiniFireballGuy,
Enemy5A,
BusinessScrubPrologue,
GyorgFemale,
GyorgMale,
Curtain,
Enemy5F,
GyorgChild,
GyorgFemaleEye,
Enemy62,
GyorgFemaleMouth,
Enemy64,
TreeItem,
Enemy66
};
+21 -29
View File
@@ -10,66 +10,58 @@ extern void CreateFx();
extern void (*gMailboxBehaviors[4])(Entity*);
void sub_080631E8(Entity* ent) {
gMailboxBehaviors[ent->action](ent);
void sub_080631E8(Entity* this) {
gMailboxBehaviors[this->action](this);
if (ent->action != 0) {
sub_0806ED78(ent);
if (this->action != 0) {
sub_0806ED78(this);
}
}
void sub_08063210(Entity* ent)
void sub_08063210(Entity* this)
{
ent->action = 1;
InitAnimationForceUpdate(ent, 0);
return;
this->action = 1;
InitAnimationForceUpdate(this, 0);
}
void sub_08063220(Entity* ent)
void sub_08063220(Entity* this)
{
u8 bVar1;
if (ent->interactType != 0) {
ent->action = 2;
if (this->interactType != 0) {
this->action = 2;
bVar1 = 8;
} else {
bVar1 = 0;
}
if (ent->field_0x58 != bVar1) {
InitAnimationForceUpdate(ent);
if (this->field_0x58 != bVar1) {
InitAnimationForceUpdate(this);
} else {
sub_08063280(ent, bVar1);
sub_08063280(this, bVar1);
}
}
void sub_08063254(Entity* ent)
void sub_08063254(Entity* this, u32 unused)
{
sub_08063280(ent);
if ((ent->frames.all & 0x80) != 0) {
ent->action = 3;
sub_08063280(this, unused);
if ((this->frames.all & 0x80) != 0) {
this->action = 3;
TextboxNoOverlapFollow(0);
}
return;
}
void sub_08063278(Entity* ent)
void sub_08063278(Entity* this, u32 unused)
{
sub_08063280(ent);
return;
sub_08063280(this, unused);
}
void sub_08063280(Entity* ent)
void sub_08063280(Entity* this, u32 unused)
{
Entity* e; // r4@1
u8 var; // r2@1
e = ent;
e = this;
UpdateAnimationSingleFrame();
var = e->frames.all & 0x7F;
e->frames.all = e->frames.all ^ var;
+1 -1
View File
@@ -24,7 +24,7 @@ extern void (*gUnk_080CA158[4])(Entity*);
extern u8 gUnk_080CA170[8];
// Main
void sub_0801EAB0(Entity* ent) {
void Octorok(Entity* ent) {
EnemyFunctionHandler(ent, gOctorok);
SetChildOffset(ent, 0, 1, -16);
}
+1 -1
View File
@@ -28,7 +28,7 @@ extern void (*gUnk_080D16A4[])(Entity*);
extern u8 gUnk_080D16D0;
extern EntityHandler gUnk_03003DB8;
void sub_08044F50(Entity* this)
void Slime(Entity* this)
{
EnemyFunctionHandler(this, &gUnk_080D16A4);