mirror of https://github.com/zeldaret/tmc.git
introduce enemy id enum
This commit is contained in:
parent
f477e63fa4
commit
b86539d363
|
@ -1,8 +0,0 @@
|
|||
#ifndef GUARD_CREATEENEMY_H
|
||||
#define GUARD_CREATEENEMY_H
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
Entity* CreateEnemy(u8, u8);
|
||||
|
||||
#endif // GUARD_CREATEENEMY_H
|
106
include/enemy.h
106
include/enemy.h
|
@ -4,6 +4,112 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
typedef enum {
|
||||
/*0x00*/ OCTOROCK,
|
||||
/*0x01*/ CHUCHU,
|
||||
/*0x02*/ LEEVER,
|
||||
/*0x03*/ PEAHAT,
|
||||
/*0x04*/ ROLLOBITE,
|
||||
/*0x05*/ DARK_NUT,
|
||||
/*0x06*/ HANGING_SEED,
|
||||
/*0x07*/ BEETLE,
|
||||
/*0x08*/ KEESE,
|
||||
/*0x09*/ DOOR_MIMIC,
|
||||
/*0x0a*/ ROCK_CHUCHU,
|
||||
/*0x0b*/ SPINY_CHUCHU,
|
||||
/*0x0c*/ CUCCO_CHICK_AGGR,
|
||||
/*0x0d*/ MOLDORM,
|
||||
/*0x0e*/ ENEMY_E,
|
||||
/*0x0f*/ MOLDWORM,
|
||||
/*0x10*/ SLUGGULA,
|
||||
/*0x11*/ PESTO,
|
||||
/*0x12*/ PUFFSTOOL,
|
||||
/*0x13*/ CHUCHU_BOSS,
|
||||
/*0x14*/ LIKE_LIKE,
|
||||
/*0x15*/ SPEAR_MOBLIN,
|
||||
/*0x16*/ BUSINESS_SCRUB,
|
||||
/*0x17*/ RUPEE_LIKE,
|
||||
/*0x18*/ MADDERPILLAR,
|
||||
/*0x19*/ WATER_DROP,
|
||||
/*0x1a*/ WALL_MASTER,
|
||||
/*0x1b*/ BOMB_PEAHAT,
|
||||
/*0x1c*/ SPARK,
|
||||
/*0x1d*/ CHASER,
|
||||
/*0x1e*/ SPIKED_BEETLE,
|
||||
/*0x1f*/ SENSOR_BLADE_TRAP,
|
||||
/*0x20*/ HELMASAUR,
|
||||
/*0x21*/ FALLING_BOULDER,
|
||||
/*0x22*/ BOBOMB,
|
||||
/*0x23*/ WALL_MASTER_2,
|
||||
/*0x24*/ GLEEROCK,
|
||||
/*0x25*/ VAATI_EYES_MACRO,
|
||||
/*0x26*/ TEKTITE,
|
||||
/*0x27*/ WIZZROBE_WIND,
|
||||
/*0x28*/ WIZZROBE_FIRE,
|
||||
/*0x29*/ WIZZROBE_ICE,
|
||||
/*0x2a*/ ARMOS,
|
||||
/*0x2b*/ EYEGORE,
|
||||
/*0x2c*/ ROPE,
|
||||
/*0x2d*/ SMALL_PESTO,
|
||||
/*0x2e*/ ACRO_BANDIT,
|
||||
/*0x2f*/ BLADE_TRAP,
|
||||
/*0x30*/ KEATON,
|
||||
/*0x31*/ CROW,
|
||||
/*0x32*/ MULLDOZER,
|
||||
/*0x33*/ BOMBAROSSA,
|
||||
/*0x34*/ WISP,
|
||||
/*0x35*/ SPINY_BEETLE,
|
||||
/*0x36*/ MAZAAL_HEAD,
|
||||
/*0x37*/ MAZAAL_MACRO,
|
||||
/*0x38*/ MAZAAL_HAND,
|
||||
/*0x39*/ OCTOROCK_BOSS,
|
||||
/*0x3a*/ FLYING_POT,
|
||||
/*0x3b*/ GOBDO,
|
||||
/*0x3c*/ OCTOROCK_GOLDEN,
|
||||
/*0x3d*/ TEKTITE_GOLDEN,
|
||||
/*0x3e*/ ROPE_GOLDEN,
|
||||
/*0x3f*/ CLOUD_PIRANHA,
|
||||
/*0x40*/ SCISSORS_BEETLE,
|
||||
/*0x41*/ CUCCO_AGGR,
|
||||
/*0x42*/ STALFOS,
|
||||
/*0x43*/ FLYING_SKULL,
|
||||
/*0x44*/ MAZAAL_BRACELET,
|
||||
/*0x45*/ TAKKURI,
|
||||
/*0x46*/ BOW_MOBLIN,
|
||||
/*0x47*/ LAKITU,
|
||||
/*0x48*/ LAKITU_CLOUD,
|
||||
/*0x49*/ ENEMY_49,
|
||||
/*0x4a*/ VAATI_REBORN_ENEMY,
|
||||
/*0x4b*/ VAATI_PROJECTILE,
|
||||
/*0x4c*/ BALL_CHAIN_SOLIDER,
|
||||
/*0x4d*/ ENEMY_4D,
|
||||
/*0x4e*/ GHINI,
|
||||
/*0x4f*/ VAATI_TRANSFIGURED,
|
||||
/*0x50*/ ENEMY_50,
|
||||
/*0x51*/ VAATI_WRATH,
|
||||
/*0x52*/ VAATI_ARM,
|
||||
/*0x53*/ DUST,
|
||||
/*0x54*/ VAATI_BALL,
|
||||
/*0x55*/ OCTOROCK2,
|
||||
/*0x56*/ SLIME,
|
||||
/*0x57*/ MINI_SLIME,
|
||||
/*0x58*/ FIREBALL_GUY,
|
||||
/*0x59*/ MINI_FIREBALL_GUY,
|
||||
/*0x5a*/ ENEMY_5A,
|
||||
/*0x5b*/ BUSINESS_SCRUB_PROLOGUE,
|
||||
/*0x5c*/ GYORG_FEMALE,
|
||||
/*0x5d*/ GYORG_MALE,
|
||||
/*0x5e*/ CURTAIN,
|
||||
/*0x5f*/ ENEMY_5F,
|
||||
/*0x60*/ GYORG_CHILD,
|
||||
/*0x61*/ GYORG_FEMALE_EYE,
|
||||
/*0x62*/ ENEMY_62,
|
||||
/*0x63*/ GYORG_FEMALE_MOUTH,
|
||||
/*0x64*/ ENEMY_64,
|
||||
/*0x65*/ TREE_ITEM,
|
||||
/*0x66*/ ENEMY_66
|
||||
} Enemy;
|
||||
|
||||
extern void Octorok(Entity*);
|
||||
extern void Chuchu(Entity*);
|
||||
extern void Leever(Entity*);
|
||||
|
|
|
@ -234,7 +234,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
|
|||
}
|
||||
if (itemID != 0) {
|
||||
if (itemID == 0xff) {
|
||||
itemEntity = CreateEnemy(7, 0);
|
||||
itemEntity = CreateEnemy(BEETLE, 0);
|
||||
if (itemEntity != NULL) {
|
||||
itemEntity->x.HALF.HI = arg0->x.HALF.HI;
|
||||
itemEntity->y.HALF.HI = arg0->y.HALF.HI;
|
||||
|
|
206
src/enemy.c
206
src/enemy.c
|
@ -4,108 +4,108 @@
|
|||
|
||||
// clang-format off
|
||||
void (*const gEnemyFunctions[])(Entity* ent) = {
|
||||
/*0x00*/ Octorok,
|
||||
/*0x01*/ Chuchu,
|
||||
/*0x02*/ Leever,
|
||||
/*0x03*/ Peahat,
|
||||
/*0x04*/ Rollobite,
|
||||
/*0x05*/ DarkNut,
|
||||
/*0x06*/ HangingSeed,
|
||||
/*0x07*/ Beetle,
|
||||
/*0x08*/ Keese,
|
||||
/*0x09*/ DoorMimic,
|
||||
/*0x0a*/ RockChuchu,
|
||||
/*0x0b*/ SpinyChuchu,
|
||||
/*0x0c*/ CuccoChickAggr,
|
||||
/*0x0d*/ Moldorm,
|
||||
/*0x0e*/ EnemyE,
|
||||
/*0x0f*/ Moldworm,
|
||||
/*0x10*/ Sluggula,
|
||||
/*0x11*/ Pesto,
|
||||
/*0x12*/ Puffstool,
|
||||
/*0x13*/ ChuchuBoss,
|
||||
/*0x14*/ LikeLike,
|
||||
/*0x15*/ SpearMoblin,
|
||||
/*0x16*/ BusinessScrub,
|
||||
/*0x17*/ RupeeLike,
|
||||
/*0x18*/ Madderpillar,
|
||||
/*0x19*/ WaterDrop,
|
||||
/*0x1a*/ WallMaster,
|
||||
/*0x1b*/ BombPeahat,
|
||||
/*0x1c*/ Spark,
|
||||
/*0x1d*/ Chaser,
|
||||
/*0x1e*/ SpikedBeetle,
|
||||
/*0x1f*/ SensorBladeTrap,
|
||||
/*0x20*/ Helmasaur,
|
||||
/*0x21*/ FallingBoulder,
|
||||
/*0x22*/ Bobomb,
|
||||
/*0x23*/ WallMaster2,
|
||||
/*0x24*/ Gleerok,
|
||||
/*0x25*/ VaatiEyesMacro,
|
||||
/*0x26*/ Tektite,
|
||||
/*0x27*/ WizzrobeWind,
|
||||
/*0x28*/ WizzrobeFire,
|
||||
/*0x29*/ WizzrobeIce,
|
||||
/*0x2a*/ Armos,
|
||||
/*0x2b*/ Eyegore,
|
||||
/*0x2c*/ Rope,
|
||||
/*0x2d*/ SmallPesto,
|
||||
/*0x2e*/ AcroBandit,
|
||||
/*0x2f*/ BladeTrap,
|
||||
/*0x30*/ Keaton,
|
||||
/*0x31*/ Crow,
|
||||
/*0x32*/ Mulldozer,
|
||||
/*0x33*/ Bombarossa,
|
||||
/*0x34*/ Wisp,
|
||||
/*0x35*/ SpinyBeetle,
|
||||
/*0x36*/ MazaalHead,
|
||||
/*0x37*/ MazaalMacro,
|
||||
/*0x38*/ MazaalHand,
|
||||
/*0x39*/ OctorokBoss,
|
||||
/*0x3a*/ FlyingPot,
|
||||
/*0x3b*/ Gibdo,
|
||||
/*0x3c*/ OctorokGolden,
|
||||
/*0x3d*/ TektiteGolden,
|
||||
/*0x3e*/ RopeGolden,
|
||||
/*0x3f*/ CloudPiranha,
|
||||
/*0x40*/ ScissorsBeetle,
|
||||
/*0x41*/ CuccoAggr,
|
||||
/*0x42*/ Stalfos,
|
||||
/*0x43*/ FlyingSkull,
|
||||
/*0x44*/ MazaalBracelet,
|
||||
/*0x45*/ Takkuri,
|
||||
/*0x46*/ BowMoblin,
|
||||
/*0x47*/ Lakitu,
|
||||
/*0x48*/ LakituCloud,
|
||||
/*0x49*/ Enemy49,
|
||||
/*0x4a*/ VaatiRebornEnemy,
|
||||
/*0x4b*/ VaatiProjectile,
|
||||
/*0x4c*/ BallChainSoldier,
|
||||
/*0x4d*/ Enemy4D,
|
||||
/*0x4e*/ Ghini,
|
||||
/*0x4f*/ VaatiTransfigured,
|
||||
/*0x50*/ Enemy50,
|
||||
/*0x51*/ VaatiWrath,
|
||||
/*0x52*/ VaatiArm,
|
||||
/*0x53*/ Dust,
|
||||
/*0x54*/ VaatiBall,
|
||||
/*0x55*/ Octorok,
|
||||
/*0x56*/ Slime,
|
||||
/*0x57*/ MiniSlime,
|
||||
/*0x58*/ FireballGuy,
|
||||
/*0x59*/ MiniFireballGuy,
|
||||
/*0x5a*/ Enemy5A,
|
||||
/*0x5b*/ BusinessScrubPrologue,
|
||||
/*0x5c*/ GyorgFemale,
|
||||
/*0x5d*/ GyorgMale,
|
||||
/*0x5e*/ Curtain,
|
||||
/*0x5f*/ Enemy5F,
|
||||
/*0x60*/ GyorgChild,
|
||||
/*0x61*/ GyorgFemaleEye,
|
||||
/*0x62*/ Enemy62,
|
||||
/*0x63*/ GyorgFemaleMouth,
|
||||
/*0x64*/ Enemy64,
|
||||
/*0x65*/ TreeItem,
|
||||
/*0x66*/ Enemy66
|
||||
[OCTOROCK] = Octorok,
|
||||
[CHUCHU] = Chuchu,
|
||||
[LEEVER] = Leever,
|
||||
[PEAHAT] = Peahat,
|
||||
[ROLLOBITE] = Rollobite,
|
||||
[DARK_NUT] = DarkNut,
|
||||
[HANGING_SEED] = HangingSeed,
|
||||
[BEETLE] = Beetle,
|
||||
[KEESE] = Keese,
|
||||
[DOOR_MIMIC] = DoorMimic,
|
||||
[ROCK_CHUCHU] = RockChuchu,
|
||||
[SPINY_CHUCHU] = SpinyChuchu,
|
||||
[CUCCO_CHICK_AGGR] = CuccoChickAggr,
|
||||
[MOLDORM] = Moldorm,
|
||||
[ENEMY_E] = EnemyE,
|
||||
[MOLDWORM] = Moldworm,
|
||||
[SLUGGULA] = Sluggula,
|
||||
[PESTO] = Pesto,
|
||||
[PUFFSTOOL] = Puffstool,
|
||||
[CHUCHU_BOSS] = ChuchuBoss,
|
||||
[LIKE_LIKE] = LikeLike,
|
||||
[SPEAR_MOBLIN] = SpearMoblin,
|
||||
[BUSINESS_SCRUB] = BusinessScrub,
|
||||
[RUPEE_LIKE] = RupeeLike,
|
||||
[MADDERPILLAR] = Madderpillar,
|
||||
[WATER_DROP] = WaterDrop,
|
||||
[WALL_MASTER] = WallMaster,
|
||||
[BOMB_PEAHAT] = BombPeahat,
|
||||
[SPARK] = Spark,
|
||||
[CHASER] = Chaser,
|
||||
[SPIKED_BEETLE] = SpikedBeetle,
|
||||
[SENSOR_BLADE_TRAP] = SensorBladeTrap,
|
||||
[HELMASAUR] = Helmasaur,
|
||||
[FALLING_BOULDER] = FallingBoulder,
|
||||
[BOBOMB] = Bobomb,
|
||||
[WALL_MASTER_2] = WallMaster2,
|
||||
[GLEEROCK] = Gleerok,
|
||||
[VAATI_EYES_MACRO] = VaatiEyesMacro,
|
||||
[TEKTITE] = Tektite,
|
||||
[WIZZROBE_WIND] = WizzrobeWind,
|
||||
[WIZZROBE_FIRE] = WizzrobeFire,
|
||||
[WIZZROBE_ICE] = WizzrobeIce,
|
||||
[ARMOS] = Armos,
|
||||
[EYEGORE] = Eyegore,
|
||||
[ROPE] = Rope,
|
||||
[SMALL_PESTO] = SmallPesto,
|
||||
[ACRO_BANDIT] = AcroBandit,
|
||||
[BLADE_TRAP] = BladeTrap,
|
||||
[KEATON] = Keaton,
|
||||
[CROW] = Crow,
|
||||
[MULLDOZER] = Mulldozer,
|
||||
[BOMBAROSSA] = Bombarossa,
|
||||
[WISP] = Wisp,
|
||||
[SPINY_BEETLE] = SpinyBeetle,
|
||||
[MAZAAL_HEAD] = MazaalHead,
|
||||
[MAZAAL_MACRO] = MazaalMacro,
|
||||
[MAZAAL_HAND] = MazaalHand,
|
||||
[OCTOROCK_BOSS] = OctorokBoss,
|
||||
[FLYING_POT] = FlyingPot,
|
||||
[GOBDO] = Gibdo,
|
||||
[OCTOROCK_GOLDEN] = OctorokGolden,
|
||||
[TEKTITE_GOLDEN] = TektiteGolden,
|
||||
[ROPE_GOLDEN] = RopeGolden,
|
||||
[CLOUD_PIRANHA] = CloudPiranha,
|
||||
[SCISSORS_BEETLE] = ScissorsBeetle,
|
||||
[CUCCO_AGGR] = CuccoAggr,
|
||||
[STALFOS] = Stalfos,
|
||||
[FLYING_SKULL] = FlyingSkull,
|
||||
[MAZAAL_BRACELET] = MazaalBracelet,
|
||||
[TAKKURI] = Takkuri,
|
||||
[BOW_MOBLIN] = BowMoblin,
|
||||
[LAKITU] = Lakitu,
|
||||
[LAKITU_CLOUD] = LakituCloud,
|
||||
[ENEMY_49] = Enemy49,
|
||||
[VAATI_REBORN_ENEMY] = VaatiRebornEnemy,
|
||||
[VAATI_PROJECTILE] = VaatiProjectile,
|
||||
[BALL_CHAIN_SOLIDER] = BallChainSoldier,
|
||||
[ENEMY_4D] = Enemy4D,
|
||||
[GHINI] = Ghini,
|
||||
[VAATI_TRANSFIGURED] = VaatiTransfigured,
|
||||
[ENEMY_50] = Enemy50,
|
||||
[VAATI_WRATH] = VaatiWrath,
|
||||
[VAATI_ARM] = VaatiArm,
|
||||
[DUST] = Dust,
|
||||
[VAATI_BALL] = VaatiBall,
|
||||
[OCTOROCK2] = Octorok,
|
||||
[SLIME] = Slime,
|
||||
[MINI_SLIME] = MiniSlime,
|
||||
[FIREBALL_GUY] = FireballGuy,
|
||||
[MINI_FIREBALL_GUY] = MiniFireballGuy,
|
||||
[ENEMY_5A] = Enemy5A,
|
||||
[BUSINESS_SCRUB_PROLOGUE] = BusinessScrubPrologue,
|
||||
[GYORG_FEMALE] = GyorgFemale,
|
||||
[GYORG_MALE] = GyorgMale,
|
||||
[CURTAIN] = Curtain,
|
||||
[ENEMY_5F] = Enemy5F,
|
||||
[GYORG_CHILD] = GyorgChild,
|
||||
[GYORG_FEMALE_EYE] = GyorgFemaleEye,
|
||||
[ENEMY_62] = Enemy62,
|
||||
[GYORG_FEMALE_MOUTH] = GyorgFemaleMouth,
|
||||
[ENEMY_64] = Enemy64,
|
||||
[TREE_ITEM] = TreeItem,
|
||||
[ENEMY_66] = Enemy66
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
|
||||
|
@ -12,7 +13,6 @@ extern u32 sub_080322A4(Entity*);
|
|||
void sub_080322E8(Entity*);
|
||||
extern void sub_08032338(Entity*);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern u8 gEntCount;
|
||||
|
@ -212,33 +212,33 @@ void sub_08031C58(Entity* this) {
|
|||
u32 tmp = Random();
|
||||
tmp &= 3;
|
||||
|
||||
a = CreateEnemy(0x2e, 1);
|
||||
a = CreateEnemy(ACRO_BANDIT, 1);
|
||||
a->type2 = 0;
|
||||
a->parent = NULL;
|
||||
a->field_0x74.HALF.LO = tmp;
|
||||
sub_08031E48(this, a);
|
||||
a->attachedEntity = CreateEnemy(0x2e, 1);
|
||||
a->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
|
||||
|
||||
b = a->attachedEntity;
|
||||
b->type2 = 1;
|
||||
b->parent = a;
|
||||
b->field_0x74.HALF.LO = tmp;
|
||||
sub_08031E48(this, b);
|
||||
b->attachedEntity = CreateEnemy(0x2e, 1);
|
||||
b->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
|
||||
|
||||
a = b->attachedEntity;
|
||||
a->type2 = 2;
|
||||
a->parent = b;
|
||||
a->field_0x74.HALF.LO = tmp;
|
||||
sub_08031E48(this, a);
|
||||
a->attachedEntity = CreateEnemy(0x2e, 1);
|
||||
a->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
|
||||
|
||||
b = a->attachedEntity;
|
||||
b->type2 = 3;
|
||||
b->parent = a;
|
||||
b->field_0x74.HALF.LO = tmp;
|
||||
sub_08031E48(this, b);
|
||||
b->attachedEntity = CreateEnemy(0x2e, 1);
|
||||
b->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
|
||||
|
||||
a = b->attachedEntity;
|
||||
a->type2 = 4;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "player.h"
|
||||
#include "random.h"
|
||||
#include "object.h"
|
||||
|
@ -8,7 +9,6 @@
|
|||
extern void sub_08078954(Entity*);
|
||||
extern void sub_08078930(Entity*);
|
||||
extern s32 sub_080012DC(Entity*);
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
extern void sub_08079BD8(Entity*);
|
||||
|
||||
|
@ -340,7 +340,7 @@ void sub_0802AD54(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_0802ADDC(Entity* this) {
|
||||
Entity* ent = CreateEnemy(0x1b, this->type + 2);
|
||||
Entity* ent = CreateEnemy(BOMB_PEAHAT, this->type + 2);
|
||||
if (ent != NULL) {
|
||||
ent->type2 = !!sub_0802B234(this);
|
||||
ent->parent = this;
|
||||
|
@ -568,7 +568,7 @@ void sub_0802B1BC(Entity* this) {
|
|||
|
||||
void sub_0802B204(Entity* this) {
|
||||
if (sub_080044EC(this, 0x2800) == 1) {
|
||||
Entity* ent = CreateEnemy(0x22, 1);
|
||||
Entity* ent = CreateEnemy(BOBOMB, 1);
|
||||
if (ent) {
|
||||
CopyPosition(this, ent);
|
||||
ent->parent = this->parent;
|
||||
|
|
|
@ -71,7 +71,7 @@ void sub_08045454(Entity* this) {
|
|||
|
||||
/* Create 2-5 new MiniFireballGuy */
|
||||
for (i = 0; i < count; i++)
|
||||
entities[i] = CreateEnemy(0x59, this->type);
|
||||
entities[i] = CreateEnemy(MINI_FIREBALL_GUY, this->type);
|
||||
|
||||
off = gUnk_080D1810;
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
|
@ -190,7 +190,7 @@ void sub_0803773C(Entity* this) {
|
|||
void sub_0803775C(Entity* this) {
|
||||
Entity* x;
|
||||
if (!(--this->actionDelay)) {
|
||||
x = CreateEnemy(0x42, 0);
|
||||
x = CreateEnemy(STALFOS, 0);
|
||||
if (x != 0) {
|
||||
sub_0804A4E4(this, x);
|
||||
sub_08037C0C(this, x);
|
||||
|
|
|
@ -669,7 +669,7 @@ void sub_08047508(Entity* this) {
|
|||
this->field_0x76.HWORD = this->direction << 8;
|
||||
}
|
||||
if (--this->field_0x7c.HALF.HI == 0) {
|
||||
Entity* tmp = CreateEnemy(0x62, Random() & 3);
|
||||
Entity* tmp = CreateEnemy(ENEMY_62, Random() & 3);
|
||||
if (tmp) {
|
||||
tmp->parent = this;
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ void sub_0804763C(Entity* this) {
|
|||
this->field_0x76.HWORD = this->direction << 8;
|
||||
}
|
||||
if (--this->field_0x7c.HALF.HI == 0) {
|
||||
Entity* tmp = CreateEnemy(0x62, Random() & 3);
|
||||
Entity* tmp = CreateEnemy(ENEMY_62, Random() & 3);
|
||||
if (tmp) {
|
||||
tmp->parent = this;
|
||||
}
|
||||
|
@ -831,7 +831,7 @@ void sub_08047978(Entity* this) {
|
|||
if (--this->field_0x7c.HALF.HI == 0) {
|
||||
Entity* tmp;
|
||||
this->field_0x7c.HALF.HI = 0xF0;
|
||||
tmp = CreateEnemy(0x62, Random() & 3);
|
||||
tmp = CreateEnemy(ENEMY_62, Random() & 3);
|
||||
if (tmp) {
|
||||
tmp->parent = this;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ void sub_0802BCA8(Entity* this) {
|
|||
this->damageType = 0x19;
|
||||
this->field_0x3a = this->field_0x3a & 0xfb;
|
||||
this->field_0x1c = 0x12;
|
||||
ent = CreateEnemy(0x20, 1);
|
||||
ent = CreateEnemy(HELMASAUR, 1);
|
||||
if (ent) {
|
||||
ent->animationState = this->animationState;
|
||||
CopyPosition(this, ent);
|
||||
|
|
|
@ -82,32 +82,32 @@ void sub_0802999C(Entity* this) {
|
|||
if (gEntCount < 0x44) {
|
||||
Entity *ent1, *ent2, *ent3, *ent4, *ent5, *ent6;
|
||||
|
||||
ent1 = CreateEnemy(0x18, 1);
|
||||
ent1 = CreateEnemy(MADDERPILLAR, 1);
|
||||
ent1->parent = this;
|
||||
PositionRelative(this, ent1, 0, 5);
|
||||
this->attachedEntity = ent1;
|
||||
|
||||
ent2 = CreateEnemy(0x18, 2);
|
||||
ent2 = CreateEnemy(MADDERPILLAR, 2);
|
||||
ent2->parent = this;
|
||||
PositionRelative(this, ent2, 0, 4);
|
||||
ent1->attachedEntity = ent2;
|
||||
|
||||
ent3 = CreateEnemy(0x18, 3);
|
||||
ent3 = CreateEnemy(MADDERPILLAR, 3);
|
||||
ent3->parent = this;
|
||||
PositionRelative(this, ent3, 0, 3);
|
||||
ent2->attachedEntity = ent3;
|
||||
|
||||
ent4 = CreateEnemy(0x18, 4);
|
||||
ent4 = CreateEnemy(MADDERPILLAR, 4);
|
||||
ent4->parent = this;
|
||||
PositionRelative(this, ent4, 0, 2);
|
||||
ent3->attachedEntity = ent4;
|
||||
|
||||
ent5 = CreateEnemy(0x18, 5);
|
||||
ent5 = CreateEnemy(MADDERPILLAR, 5);
|
||||
ent5->parent = this;
|
||||
PositionRelative(this, ent5, 0, 1);
|
||||
ent4->attachedEntity = ent5;
|
||||
|
||||
ent6 = CreateEnemy(0x18, 6);
|
||||
ent6 = CreateEnemy(MADDERPILLAR, 6);
|
||||
ent6->attachedEntity = this;
|
||||
ent6->parent = this;
|
||||
PositionRelative(this, ent6, 0, 0);
|
||||
|
|
|
@ -55,19 +55,19 @@ void sub_08022C58(Entity* this) {
|
|||
if (gEntCount >= 0x45)
|
||||
return;
|
||||
|
||||
tail0 = CreateEnemy(0xd, 1);
|
||||
tail0 = CreateEnemy(MOLDORM, 1);
|
||||
this->attachedEntity = tail0;
|
||||
tail0->spritePriority.b0 = 5;
|
||||
tail0->parent = this;
|
||||
CopyPosition(this, tail0);
|
||||
|
||||
tail1 = CreateEnemy(0xd, 2);
|
||||
tail1 = CreateEnemy(MOLDORM, 2);
|
||||
tail0->attachedEntity = tail1;
|
||||
tail1->spritePriority.b0 = 5;
|
||||
tail1->parent = this;
|
||||
CopyPosition(this, tail1);
|
||||
|
||||
tail2 = CreateEnemy(0xd, 3);
|
||||
tail2 = CreateEnemy(MOLDORM, 3);
|
||||
tail1->attachedEntity = tail2;
|
||||
tail2->spritePriority.b0 = 5;
|
||||
tail2->parent = this;
|
||||
|
|
|
@ -111,28 +111,28 @@ void sub_080231BC(Entity* this) {
|
|||
if (gEntCount < 0x40) {
|
||||
Entity* ent;
|
||||
|
||||
ent = this->attachedEntity = CreateEnemy(0xf, 1);
|
||||
ent = this->attachedEntity = CreateEnemy(MOLDWORM, 1);
|
||||
ent->parent = this;
|
||||
|
||||
ent = ent->attachedEntity = CreateEnemy(0xf, 2);
|
||||
ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 2);
|
||||
ent->parent = this;
|
||||
|
||||
ent = ent->attachedEntity = CreateEnemy(0xf, 3);
|
||||
ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 3);
|
||||
ent->parent = this;
|
||||
|
||||
ent = ent->attachedEntity = CreateEnemy(0xf, 4);
|
||||
ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 4);
|
||||
ent->parent = this;
|
||||
|
||||
ent = ent->attachedEntity = CreateEnemy(0xf, 5);
|
||||
ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 5);
|
||||
ent->parent = this;
|
||||
|
||||
ent = ent->attachedEntity = CreateEnemy(0xf, 6);
|
||||
ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 6);
|
||||
ent->parent = this;
|
||||
|
||||
ent = ent->attachedEntity = CreateEnemy(0xf, 7);
|
||||
ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 7);
|
||||
ent->parent = this;
|
||||
|
||||
ent->attachedEntity = CreateEnemy(0xf, 8);
|
||||
ent->attachedEntity = CreateEnemy(MOLDWORM, 8);
|
||||
*(Entity**)&ent->attachedEntity->field_0x74 = ent;
|
||||
ent = ent->attachedEntity;
|
||||
ent->parent = this;
|
||||
|
|
|
@ -51,7 +51,7 @@ void Peahat_OnTick(Entity* this) {
|
|||
void sub_0801FFDC(Entity* this) {
|
||||
if (this->field_0x82.HALF.LO) {
|
||||
if (this->bitfield == 0x94) {
|
||||
Entity* ent = CreateEnemy(3, PeahatForm_Propeller);
|
||||
Entity* ent = CreateEnemy(PEAHAT, PeahatForm_Propeller);
|
||||
if (ent) {
|
||||
CopyPosition(this, ent);
|
||||
ent->height.HALF.HI -= 8;
|
||||
|
|
|
@ -41,7 +41,7 @@ void sub_08022254(Entity* this) {
|
|||
case 0x16:
|
||||
case 0x1c:
|
||||
CreateFx(this, 4, 0);
|
||||
ent = CreateEnemy(1, 1);
|
||||
ent = CreateEnemy(CHUCHU, 1);
|
||||
if (ent) {
|
||||
ent->type2 = 1;
|
||||
ent->iframes = -8;
|
||||
|
|
|
@ -91,7 +91,7 @@ void sub_080293DC(Entity* this) {
|
|||
void sub_0802940C(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
ent = CreateEnemy(0x17, this->type);
|
||||
ent = CreateEnemy(RUPEE_LIKE, this->type);
|
||||
if (ent != NULL) {
|
||||
sub_0804A720(this);
|
||||
ent->parent = this;
|
||||
|
|
|
@ -99,7 +99,7 @@ void sub_080450A8(Entity* this) {
|
|||
|
||||
/* Create 2-4 new MiniSlime */
|
||||
for (i = 0; i < count; i++)
|
||||
entities[i] = CreateEnemy(0x57, this->type);
|
||||
entities[i] = CreateEnemy(MINI_SLIME, this->type);
|
||||
|
||||
off = gUnk_080D16D4;
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
|
@ -130,7 +130,7 @@ void sub_08023CE0(Entity* this) {
|
|||
GetNextFrame(this);
|
||||
if (this->frames.all) {
|
||||
if (this->frames.all & 0x80) {
|
||||
Entity* ent = CreateEnemy(0x10, 1);
|
||||
Entity* ent = CreateEnemy(SLUGGULA, 1);
|
||||
if (ent) {
|
||||
sub_0804A4E4(this, ent);
|
||||
DeleteThisEntity();
|
||||
|
@ -161,7 +161,7 @@ void sub_08023E54(Entity* this) {
|
|||
|
||||
if (this->field_0xf++ > 27) {
|
||||
this->field_0xf = 0;
|
||||
ent = CreateEnemy(0x10, 2);
|
||||
ent = CreateEnemy(SLUGGULA, 2);
|
||||
if (ent) {
|
||||
const s8* ptr = &gUnk_080CBDF7[this->animationState * 2];
|
||||
PositionRelative(this, ent, ptr[0] << 0x10, ptr[1] << 0x10);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "coord.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
extern void sub_080317F8(Entity*);
|
||||
|
||||
extern void (*gUnk_080CE530[])(Entity*);
|
||||
|
@ -122,7 +122,7 @@ void sub_080317F8(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08031840(Entity* this) {
|
||||
Entity* enemy = CreateEnemy(0x2d, this->type);
|
||||
Entity* enemy = CreateEnemy(SMALL_PESTO, this->type);
|
||||
if (enemy != NULL) {
|
||||
CopyPosition(this, enemy);
|
||||
enemy->parent = this;
|
||||
|
|
Loading…
Reference in New Issue