Set some Entity flags to enum values (#1722)

This commit is contained in:
Josh Schreuder 2024-10-04 02:22:33 +10:00 committed by GitHub
parent 887e32510b
commit 2fe2e117f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7 additions and 7 deletions

View File

@ -1709,7 +1709,7 @@ void RunMainEngine(void) {
D_801375A8 = D_801375A0 - PLAYER.posY.val;
for (i = 0, ent = &g_Entities[0]; i < LEN(g_Entities); i++,
ent++) {
if (ent->flags & 0x20000) {
if (ent->flags & FLAG_UNK_20000) {
ent->posX.val -= D_801375A4;
ent->posY.val -= D_801375A8;
}

View File

@ -123,7 +123,7 @@ void UpdatePlayerEntities(void) {
entity->posY.i.hi > 256 || entity->posY.i.hi < -16)) {
DestroyEntity(g_CurrentEntity);
} else {
if (entity->flags & 0x100000) {
if (entity->flags & FLAG_UNK_100000) {
UpdateAnim(NULL, D_800ACFB4);
}
}

View File

@ -2283,7 +2283,7 @@ void func_80123B40(Entity* self) {
PLAYER = copy;
if (!(self->flags & 0x800000)) {
if (!(self->flags & FLAG_HAS_PRIMS)) {
DestroyEntity(self);
return;
}

View File

@ -612,7 +612,7 @@ void HitDetection(void) {
if (!(entFrom5C->hitFlags & 0xF)) {
entFrom5C->hitFlags |= 0x10;
}
if ((entFrom5C->flags & 0x10) && (iterEnt2->attack)) {
if ((entFrom5C->flags & FLAG_UNK_10) && (iterEnt2->attack)) {
if (iterEnt2->hitEffect & 0x80) {
g_api.PlaySfx(SFX_METAL_CLANG_E);
} else {

View File

@ -546,7 +546,7 @@ void HitDetection(void) {
if (!(entFrom5C->hitFlags & 0xF)) {
entFrom5C->hitFlags |= 0x10;
}
if ((entFrom5C->flags & 0x10) && (iterEnt2->attack)) {
if ((entFrom5C->flags & FLAG_UNK_10) && (iterEnt2->attack)) {
if (iterEnt2->hitEffect & 0x80) {
g_api.PlaySfx(SFX_METAL_CLANG_E);
} else {

View File

@ -114,7 +114,7 @@ void EntityBlade(Entity* self) {
if ((self->step & 1) && (self->hitFlags & 3)) {
func_801CE1E8(0xE);
}
if ((self->flags & 0x100) && (self->step < 0x18U) &&
if ((self->flags & FLAG_DEAD) && (self->step < 0x18U) &&
(((self + 13)->ext.GH_Props.unk88 != 0) ||
((self + 10)->ext.GH_Props.unk88 != 0))) {
PlaySfxPositional(0x750);

View File

@ -21,7 +21,7 @@ void EntitySpittleBone(Entity* self) {
InitializeEntity(D_80180CAC);
self->drawFlags = FLAG_DRAW_ROTZ;
self->rotZ = 0;
self->flags &= ~(FLAG_UNK_2000 | 0x200);
self->flags &= ~(FLAG_UNK_2000 | FLAG_UNK_200);
self->facingLeft = self->params;
break;