mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
Replace FLAG_UNK_800000
with FLAG_HAS_PRIMS
(#1572)
Finishes the migration from `FLAG_UNK_800000` to `FLAG_HAS_PRIMS`.
This commit is contained in:
parent
c56e3dacde
commit
703bf35fc3
@ -266,12 +266,10 @@ extern u8 g_BmpCastleMap[0x20000];
|
||||
#define FLAG_UNK_80000 0x80000
|
||||
#define FLAG_UNK_100000 0x100000
|
||||
#define FLAG_UNK_400000 0x400000
|
||||
#define FLAG_UNK_800000 0x800000
|
||||
#define FLAG_UNK_00200000 0x00200000
|
||||
|
||||
// When an entity used AllocPrimitives and their primIndex set.
|
||||
// At their destruction they need to free the prims with FreePrimitives.
|
||||
#define FLAG_HAS_PRIMS 0x00800000
|
||||
#define FLAG_HAS_PRIMS 0x800000
|
||||
#define FLAG_UNK_00200000 0x00200000
|
||||
|
||||
#define FLAG_UNK_01000000 0x01000000
|
||||
#define FLAG_UNK_02000000 0x02000000
|
||||
|
@ -1502,7 +1502,7 @@ void EntityLevelUpAnimation(Entity* self) {
|
||||
return;
|
||||
}
|
||||
PlaySfx(NA_SE_PL_MAX_HP_MP_INCREASED);
|
||||
self->flags = FLAG_UNK_04000000 | FLAG_UNK_800000 | FLAG_UNK_20000 |
|
||||
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000 |
|
||||
FLAG_UNK_10000;
|
||||
CreateEntFactoryFromEntity(self, 0x4A002CU, 0);
|
||||
self->posX.i.hi = PLAYER.posX.i.hi;
|
||||
|
@ -290,7 +290,7 @@ void EntitySubwpnThrownDagger(Entity* self) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_800000;
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
|
||||
self->facingLeft = PLAYER.facingLeft;
|
||||
func_8011A290(self);
|
||||
self->hitboxWidth = 4;
|
||||
@ -2551,7 +2551,7 @@ void func_80129864(Entity* self) {
|
||||
self->palette = PAL_OVL(0x19F);
|
||||
self->drawMode = DRAW_UNK_40 | DRAW_TPAGE2 | DRAW_TPAGE;
|
||||
self->zPriority = 0x1C3;
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_800000 |
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
|
||||
FLAG_UNK_100000 | FLAG_UNK_20000 | FLAG_UNK_10000;
|
||||
self->drawFlags = FLAG_DRAW_ROTZ;
|
||||
if (self->params & 0x7F00) {
|
||||
@ -2633,7 +2633,7 @@ void func_80129864(Entity* self) {
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_800000 | FLAG_UNK_100000 |
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_100000 |
|
||||
FLAG_UNK_10000;
|
||||
s1 = rcos(self->ext.et_80129864.unk82) >> 8;
|
||||
self->ext.et_80129864.unk82 += 0x80;
|
||||
|
@ -104,7 +104,7 @@ void EntityStopWatch(Entity* self) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_800000 |
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
|
||||
FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
prim->tpage = 0x1E;
|
||||
@ -644,7 +644,7 @@ void EntityBatEcho(Entity* self) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
self->flags = FLAG_UNK_800000 | FLAG_UNK_40000;
|
||||
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000;
|
||||
prim = (Primitive*)&g_PrimBuf[self->primIndex];
|
||||
self->ext.batEcho.unk84 = prim;
|
||||
for (i = 0; i < 0x11; i++) {
|
||||
|
@ -1314,7 +1314,7 @@ void RicEntitySubwpnThrownDagger(Entity* self) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_800000;
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
|
||||
self->facingLeft = PLAYER.facingLeft;
|
||||
// Not sure what this unkB0 does, but it seems to be
|
||||
// a standard part of the Ext, and may not be entity specific.
|
||||
|
@ -251,7 +251,7 @@ void func_801B69F8(Entity* entity) {
|
||||
if (func_801B6480(D_8018B304)) {
|
||||
D_801BC350 = D_801D6B00 = D_801BC3E8 = 0;
|
||||
D_8003C704 = 1;
|
||||
entity->flags |= FLAG_UNK_800000 | FLAG_UNK_2000;
|
||||
entity->flags |= FLAG_HAS_PRIMS | FLAG_UNK_2000;
|
||||
entity->primIndex = g_Dialogue.primIndex[2];
|
||||
++entity->step;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void func_801BD8F0(Entity* self) {
|
||||
SetStep(7);
|
||||
return;
|
||||
}
|
||||
self->flags |= FLAG_UNK_800000;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
self->primIndex = sp48;
|
||||
prim = &g_PrimBuf[sp48];
|
||||
self->ext.prim = prim;
|
||||
|
@ -240,7 +240,7 @@ static void func_ptr_80170008(Entity* self) {
|
||||
return;
|
||||
}
|
||||
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_800000;
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
|
||||
self->velocityY = FIX(1.0 / 2.0);
|
||||
range = 24;
|
||||
posX = (rand() % range) - 0xC;
|
||||
|
@ -390,7 +390,7 @@ static void func_ptr_80170008(Entity* self) {
|
||||
return;
|
||||
}
|
||||
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_800000;
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
|
||||
self->velocityY = FIX(3.0 / 4.0);
|
||||
|
||||
range = 16;
|
||||
|
@ -237,7 +237,7 @@ static void EntityWeaponAttack(Entity* self) {
|
||||
prim->r3 = 0x80;
|
||||
prim->drawMode |= DRAW_COLORS;
|
||||
}
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_UNK_800000;
|
||||
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
|
||||
SetWeaponProperties(self, 0);
|
||||
self->hitboxOffX = 0x2B;
|
||||
self->hitboxWidth = 0x1E;
|
||||
|
@ -54,7 +54,7 @@ void EntityWeaponAttack(Entity* self) {
|
||||
|
||||
self->ext.weapon.unk7E = 0x7F;
|
||||
self->facingLeft = 0;
|
||||
self->flags = FLAG_UNK_04000000 | FLAG_UNK_800000 | FLAG_UNK_40000;
|
||||
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000;
|
||||
self->zPriority = PLAYER.zPriority + 4;
|
||||
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY | FLAG_DRAW_ROTZ;
|
||||
self->rotX = self->rotY = 0x100;
|
||||
|
@ -67,7 +67,7 @@ void EntityWeaponAttack(Entity* self) {
|
||||
self->palette += anim->palette;
|
||||
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
if (self->primIndex != -1) {
|
||||
self->flags = FLAG_UNK_800000 | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
}
|
||||
self->zPriority = PLAYER.zPriority - 2;
|
||||
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
|
||||
|
@ -361,7 +361,7 @@ static s32 func_ptr_80170004(Entity* self) {
|
||||
return;
|
||||
}
|
||||
|
||||
self->flags = FLAG_UNK_800000 | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
for (i = 0; i < PrimCount; i++) {
|
||||
prim->drawMode = DRAW_UNK_200 | DRAW_UNK_100 | DRAW_TPAGE2 |
|
||||
|
@ -159,7 +159,7 @@ void func_ptr_80170008(Entity* self) {
|
||||
return;
|
||||
}
|
||||
|
||||
self->flags = FLAG_UNK_800000 | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
|
@ -238,7 +238,7 @@ void func_ptr_80170008(Entity* self) {
|
||||
return;
|
||||
}
|
||||
|
||||
self->flags = FLAG_UNK_800000 | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
|
@ -62,7 +62,7 @@ void EntityWeaponAttack(Entity* self) {
|
||||
|
||||
self->primIndex = primIndex;
|
||||
if (primIndex != -1) {
|
||||
self->flags |= FLAG_UNK_800000;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
for (i = 0; i < 12; i++) {
|
||||
if (i <= 3) {
|
||||
@ -138,7 +138,7 @@ void EntityWeaponAttack(Entity* self) {
|
||||
i = 0;
|
||||
|
||||
xValues = D_17E000_8017AEF4;
|
||||
self->flags |= FLAG_UNK_800000;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
|
||||
for (; i < 12; i++) {
|
||||
|
@ -63,7 +63,7 @@ void EntityWeaponAttack(Entity* self) {
|
||||
|
||||
self->primIndex = primIndex;
|
||||
if (primIndex != -1) {
|
||||
self->flags |= FLAG_UNK_800000;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
for (i = 0; i < 12; i++) {
|
||||
if (i <= 3) {
|
||||
@ -131,7 +131,7 @@ void EntityWeaponAttack(Entity* self) {
|
||||
i = 0;
|
||||
|
||||
xValues = D_18C000_8017AF94;
|
||||
self->flags |= FLAG_UNK_800000;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
|
||||
for (; i < 12; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user