use id enums in mazaal

This commit is contained in:
Henny022p 2021-05-02 03:02:41 +02:00
parent 56229827f3
commit 943484970c
3 changed files with 18 additions and 17 deletions

View File

@ -177,10 +177,10 @@ void sub_0803A274(Entity* this) {
if (gEntCount < 0x45) {
if (this->type == 0) {
pEVar1 = CreateEnemy(0x38, 0);
pEVar1 = CreateEnemy(MAZAAL_HAND, 0);
pEVar1->parent = this;
this->attachedEntity = pEVar1;
pEVar1 = CreateEnemy(0x44, 2);
pEVar1 = CreateEnemy(MAZAAL_BRACELET, 2);
pEVar1->parent = this;
*(Entity**)&this->field_0x74 = pEVar1;
pEVar1 = CreateObject(OBJECT_7E, 1, 0);
@ -188,10 +188,10 @@ void sub_0803A274(Entity* this) {
pEVar1->attachedEntity = this->attachedEntity;
PositionRelative(this->parent, this, 0x100000, 0x200000);
} else {
pEVar1 = CreateEnemy(0x38, 1);
pEVar1 = CreateEnemy(MAZAAL_HAND, 1);
pEVar1->parent = this;
this->attachedEntity = pEVar1;
pEVar1 = CreateEnemy(0x44, 3);
pEVar1 = CreateEnemy(MAZAAL_BRACELET, 3);
pEVar1->parent = this;
*(Entity**)&this->field_0x74 = pEVar1;
pEVar1 = CreateObject(OBJECT_7E, 2, 0);
@ -968,7 +968,7 @@ void sub_0803B1B8(Entity* this) {
temp->y.HALF.HI += this->hitbox->offset_y;
temp->spritePriority.b0 = 3;
}
temp = CreateObject(0, 0x5e, 0);
temp = CreateObject(GROUND_ITEM, 0x5e, 0);
if (temp != (Entity*)0x0) {
temp->actionDelay = 0;
temp->direction = 0x90;
@ -1083,7 +1083,7 @@ void sub_0803B3F4(Entity* this) {
void sub_0803B480(Entity* this) {
Entity* target;
if (((this->field_0x7c.HALF.HI & 0x1f) == 0) && (target = CreateObject(0x2d, 1, 0), target != (Entity*)0x0)) {
if (((this->field_0x7c.HALF.HI & 0x1f) == 0) && (target = CreateObject(SMOKE, 1, 0), target != (Entity*)0x0)) {
PositionRelative(this, target, gUnk_080CFD08[this->type] << 0x10, 0);
}
if (--this->field_0x7c.HALF.HI == 0) {
@ -1210,7 +1210,7 @@ void sub_0803B724(Entity* param_1) {
u8 temp;
if (((param_1->field_0xf < 3) && (param_1->cutsceneBeh.HALF.LO != 0)) &&
(pEVar1 = CreateEnemy(7, 1), pEVar1 != (Entity*)0x0)) {
(pEVar1 = CreateEnemy(BEETLE, 1), pEVar1 != (Entity*)0x0)) {
pEVar1->type2 = 1;
random_value = Random();
temp = gUnk_080CFD1B[param_1->type];

View File

@ -4,6 +4,7 @@
#include "screen.h"
#include "audio.h"
#include "random.h"
#include "object.h"
#include "functions.h"
extern void UnloadOBJPalette(Entity*);
@ -135,9 +136,9 @@ void sub_08033F3C(Entity* this) {
this->field_0x6c.HALF.HI |= 1;
this->field_0x80.HALF.LO = 0;
InitializeAnimation(this, 0);
pEVar1 = CreateEnemy(0x36, 1);
pEVar1 = CreateEnemy(MAZAAL_HEAD, 1);
pEVar1->parent = this;
pEVar2 = CreateObject(0x7e, 0, 0);
pEVar2 = CreateObject(OBJECT_7E, 0, 0);
pEVar2->parent = this;
if (gScreenTransition.field_0x39 == 0) {
this->action = 0xd;
@ -145,15 +146,15 @@ void sub_08033F3C(Entity* this) {
this->actionDelay = 0xfc;
this->flags = this->flags & 0x7f;
} else {
pEVar2 = CreateEnemy(0x44, 0);
pEVar2 = CreateEnemy(MAZAAL_BRACELET, 0);
pEVar2->parent = this;
*(Entity**)&pEVar2->field_0x78 = this;
*(Entity**)&this->field_0x74 = pEVar2;
pEVar2 = CreateEnemy(0x44, 1);
pEVar2 = CreateEnemy(MAZAAL_BRACELET, 1);
pEVar2->parent = this;
*(Entity**)&pEVar2->field_0x78 = pEVar1;
*(Entity**)&this->field_0x78 = pEVar2;
CreateEnemy(0x36, 4)->parent = this;
CreateEnemy(MAZAAL_HEAD, 4)->parent = this;
}
}
}
@ -670,7 +671,7 @@ NONMATCH("asm/non_matching/mazaal/sub_080348A4.inc", u32 sub_080348A4(Entity* th
InitializeAnimation(hand_, 5);
break;
case 8:
pEVar4 = CreateEnemy(0x36, hand_->type + 2);
pEVar4 = CreateEnemy(MAZAAL_HEAD, hand_->type + 2);
if (pEVar4 != NULL) {
pEVar4->parent = this;
}

View File

@ -83,7 +83,7 @@ void sub_08034CC4(Entity* this) {
sub_08034F70(this);
InitializeAnimation(this, this->type);
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
entity = CreateEnemy(0x37, 2);
entity = CreateEnemy(MAZAAL_MACRO, 2);
if (entity != NULL) {
this->attachedEntity = entity;
entity->parent = this;
@ -97,7 +97,7 @@ void sub_08034D4C(Entity* this) {
GetNextFrame(this);
if (--this->field_0x78.HWORD == 0) {
if ((this->field_0xf < 8) && (entity = CreateEnemy(0x4b, 0), entity != (Entity*)0x0)) {
if ((this->field_0xf < 8) && (entity = CreateEnemy(VAATI_PROJECTILE, 0), entity != (Entity*)0x0)) {
entity->direction = (s32)Random() % 5 + 0xc;
entity->x.HALF.HI = (gRoomControls.width / 2) + gRoomControls.roomOriginX;
entity->y.HALF.HI = gRoomControls.roomOriginY + 8;
@ -231,7 +231,7 @@ void sub_08035050(Entity* this) {
this->flags = this->flags & 0x7f;
this->currentHealth = 0;
entity = CreateEnemy(0x4b, 0);
entity = CreateEnemy(VAATI_PROJECTILE, 0);
if (entity != NULL) {
entity->type2 = 1;
entity->collisionLayer = 3;
@ -258,7 +258,7 @@ u32 sub_08035084(Entity* this) {
if (i == vulnPillar) {
entity = this;
} else {
entity = CreateEnemy(0x37, 1);
entity = CreateEnemy(MAZAAL_MACRO, 1);
}
entity->x.HALF.HI = gRoomControls.roomOriginX + *coords;
entity->y.HALF.HI = gRoomControls.roomOriginY + *(coords + 1);