Document some Entity flags (#1591)

This commit is contained in:
Luciano Ciccariello 2024-09-08 22:21:35 +01:00 committed by GitHub
parent 6b26c7b0e9
commit 20e82b6013
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
89 changed files with 441 additions and 380 deletions

View File

@ -263,7 +263,7 @@ extern u8 g_BmpCastleMap[0x20000];
#define FLAG_UNK_8000 0x8000
#define FLAG_UNK_10000 0x10000
#define FLAG_UNK_20000 0x20000 // func_8011A9D8 will destroy if not set
#define FLAG_UNK_40000 0x40000
#define FLAG_POS_PLAYER_LOCKED 0x40000
#define FLAG_UNK_80000 0x80000
#define FLAG_UNK_100000 0x100000
#define FLAG_UNK_400000 0x400000
@ -272,10 +272,10 @@ extern u8 g_BmpCastleMap[0x20000];
#define FLAG_HAS_PRIMS 0x800000
#define FLAG_UNK_00200000 0x00200000
#define FLAG_UNK_01000000 0x01000000
#define FLAG_NOT_AN_ENEMY 0x01000000
#define FLAG_UNK_02000000 0x02000000
#define FLAG_UNK_04000000 0x04000000
#define FLAG_UNK_08000000 0x08000000
#define FLAG_KEEP_ALIVE_OFFCAMERA 0x04000000
#define FLAG_POS_CAMERA_LOCKED 0x08000000
#define FLAG_UNK_10000000 0x10000000
#define FLAG_UNK_20000000 0x20000000
#define FLAG_DESTROY_IF_BARELY_OUT_OF_CAMERA 0x40000000

View File

@ -1417,15 +1417,15 @@ void RunMainEngine(void) {
for (i = 0, ent = &g_Entities[0]; i < LEN(g_Entities); i++, ent++) {
ent_unk68 = ent->unk68;
if (ent_unk68 != 0) {
if (ent_unk68) {
ent->posX.val += ent_unk68 * D_801375B4 * 0x100;
ent->posY.val += ent_unk68 * D_801375B8 * 0x100;
} else {
if (ent->flags & FLAG_UNK_08000000) {
if (ent->flags & FLAG_POS_CAMERA_LOCKED) {
ent->posX.i.hi += D_801375B4;
ent->posY.i.hi += D_801375B8;
}
if ((ent->flags & FLAG_UNK_40000) != 0) {
if (ent->flags & FLAG_POS_PLAYER_LOCKED) {
ent->posX.val -= D_801375A4;
ent->posY.val -= D_801375A8;
}

View File

@ -206,7 +206,7 @@ void func_80109594() {
e->animSet = ANIMSET_DRA(1);
e->unk5A = i + 1;
e->palette = 0x8100;
e->flags = FLAG_UNK_20000 | FLAG_UNK_08000000;
e->flags = FLAG_UNK_20000 | FLAG_POS_CAMERA_LOCKED;
}
primIndex = AllocPrimitives(PRIM_TILE, 8);

View File

@ -35,7 +35,8 @@ void EntityNumberMovesToHpMeter(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->ext.hpNumMove.unk8C = 0;
self->ext.hpNumMove.unk8E = 2;
self->ext.hpNumMove.unk90 = 8;
@ -323,7 +324,8 @@ void EntityGuardText(Entity* self) {
FntPrint("str_y:%02x", self->ext.guardText.str_y);
switch (self->step) {
case 0:
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000 | FLAG_UNK_10000;
self->step++;
return;
case 1:
@ -353,8 +355,8 @@ void EntityGuardText(Entity* self) {
return;
}
// Would have been better to do |= FLAG_HAS_PRIMS
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000 |
FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->ext.guardText.timer = 0x38;
self->ext.guardText.halfHeight = 0;
self->ext.guardText.halfWidth = FIX_FRAC(self->ext.guardText.unk98) =
@ -552,7 +554,7 @@ void func_80119D3C(Entity* entity) {
entity->animCurFrame = 0xE;
entity->animSet = ANIMSET_DRA(3);
entity->ext.generic.unk80.modeS16.unk0 = 0x80;
entity->flags = FLAG_UNK_08000000;
entity->flags = FLAG_POS_CAMERA_LOCKED;
break;
case 1:
@ -640,7 +642,8 @@ void func_80119F70(Entity* entity) {
DestroyEntity(entity);
return;
}
entity->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
entity->flags =
FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
hitboxX = PLAYER.posX.i.hi + PLAYER.hitboxOffX;
hitboxY = PLAYER.posY.i.hi + PLAYER.hitboxOffY;
prim = &g_PrimBuf[entity->primIndex];

View File

@ -118,7 +118,7 @@ void UpdatePlayerEntities(void) {
entity->pfnUpdate(entity);
entity = g_CurrentEntity;
if (entity->entityId != 0) {
if (!(entity->flags & FLAG_UNK_04000000) &&
if (!(entity->flags & FLAG_KEEP_ALIVE_OFFCAMERA) &&
(entity->posX.i.hi > 288 || entity->posX.i.hi < -32 ||
entity->posY.i.hi > 256 || entity->posY.i.hi < -16)) {
DestroyEntity(g_CurrentEntity);
@ -193,7 +193,7 @@ void func_8011A870(void) {
entity->pfnUpdate(entity);
entity = g_CurrentEntity;
if (entity->entityId != 0) {
if (!(entity->flags & FLAG_UNK_04000000) &&
if (!(entity->flags & FLAG_KEEP_ALIVE_OFFCAMERA) &&
(entity->posX.i.hi < -0x20 || entity->posX.i.hi > 0x120 ||
entity->posY.i.hi < -0x10 || entity->posY.i.hi > 0x100)) {
DestroyEntity(entity);
@ -300,13 +300,13 @@ void EntityEntFactory(Entity* self) {
self->ext.factory.unk9C = *data_idx & 0xF; // index 4, lower 4 bits
self->ext.factory.unkA4 = *data_idx++ >> 4; // index 4, upper 4 bits
self->ext.factory.unk9A = *data_idx; // index 5
self->flags |= FLAG_UNK_04000000;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA;
self->step++;
switch (self->ext.factory.unkA4) {
case 0:
case 6:
self->flags |= FLAG_UNK_08000000;
self->flags |= FLAG_POS_CAMERA_LOCKED;
break;
case 4:
case 5:
@ -453,7 +453,7 @@ void EntityUnarmedAttack(Entity* entity) {
}
if (entity->step == 0) {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
GetEquipProperties(handId, &equip, 0);
entity->attack = equip.attack;
entity->attackElement = equip.element;
@ -484,7 +484,7 @@ void EntityDiveKickAttack(Entity* self) {
return;
}
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->facingLeft = PLAYER.facingLeft;
self->posY.i.hi = PLAYER.posY.i.hi;
self->posX.i.hi = PLAYER.posX.i.hi;
@ -514,7 +514,7 @@ void func_8011B480(Entity* entity) {
if (PLAYER.step != 5 || PLAYER.step_s != 3) {
DestroyEntity(entity);
} else {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
entity->facingLeft = PLAYER.facingLeft;
entity->posY.i.hi = PLAYER.posY.i.hi;
entity->posX.i.hi = PLAYER.posX.i.hi;
@ -533,7 +533,7 @@ void func_8011B530(Entity* entity) {
if (PLAYER.step != 0x25) {
DestroyEntity(entity);
} else if (entity->step == 0) {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
func_8011A328(entity, 5);
entity->step++;
}
@ -558,7 +558,7 @@ void func_8011B5A4(Entity* self) {
self->animSet = 5;
self->anim = D_800AD57C;
self->zPriority = PLAYER.zPriority + 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000 | FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000 | FLAG_UNK_10000;
self->palette = 0x8195;
paramsHi = self->params >> 8;
paramsLo = self->params & 0xFF;
@ -680,9 +680,9 @@ void EntityUnkId24(Entity* self) {
self->anim = D_800AD5FC;
// Weird thing here where we have to set flags to the same value twice
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority + 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->velocityY = FIX(-1);
if (upperparams == 0) {
@ -894,8 +894,8 @@ block_748:
#endif
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000 | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
for (var_s1 = 0; var_s1 < 8; var_s1++) {
D_800AD630[var_s1] = var_s1 << 9;
@ -1428,8 +1428,8 @@ void EntityPlayerOutline(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000 | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
// This is just not a for-loop, that's weird
for (i = 0; i < 1; i++) {
@ -1648,8 +1648,8 @@ void EntityGravityBootBeam(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
for (prim = &g_PrimBuf[self->primIndex]; prim != NULL;
prim = prim->next) {
prim->g0 = prim->r0 = 0;
@ -1710,7 +1710,7 @@ void EntityWingSmashTrail(Entity* entity) {
return;
}
if (entity->step == 0) {
entity->flags = FLAG_UNK_08000000;
entity->flags = FLAG_POS_CAMERA_LOCKED;
entity->animSet = PLAYER.animSet;
entity->animCurFrame = PLAYER.animCurFrame | ANIM_FRAME_LOAD;
entity->zPriority = PLAYER.zPriority - 2;

View File

@ -160,9 +160,9 @@ s16 D_800AD9B8[24][5] = {
};
// clang-format off
#define UNK_FLAGS_GROUP_1 FLAG_HAS_PRIMS | FLAG_UNK_08000000
#define UNK_FLAGS_GROUP_2 FLAG_HAS_PRIMS | FLAG_UNK_04000000
#define UNK_FLAGS_GROUP_3 FLAG_HAS_PRIMS | FLAG_UNK_08000000 | FLAG_UNK_04000000
#define UNK_FLAGS_GROUP_1 FLAG_HAS_PRIMS | FLAG_POS_CAMERA_LOCKED
#define UNK_FLAGS_GROUP_2 FLAG_HAS_PRIMS | FLAG_KEEP_ALIVE_OFFCAMERA
#define UNK_FLAGS_GROUP_3 FLAG_HAS_PRIMS | FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA
static unkStr_8011E4BC D_800ADAA8 = { 8, 0x7F, 0x7F, 0x7F, 2, 2, 2, 51, 0, UNK_FLAGS_GROUP_1};
static unkStr_8011E4BC D_800ADAB8 = {16, 0x7F, 0x7F, 0x7F, 1, 1, 2, 51, 1, UNK_FLAGS_GROUP_3};
static unkStr_8011E4BC D_800ADAC8 = { 8, 0x7F, 0x7F, 0x7F, 1, 1, 2, 51, 0, UNK_FLAGS_GROUP_1};
@ -529,7 +529,7 @@ void func_8011EDA8(Entity* self) {
self->palette = 0x8170;
}
}
self->flags = FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_UNK_08000000;
self->flags = FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_POS_CAMERA_LOCKED;
if (rand() % 4) {
self->zPriority = PLAYER.zPriority + 2;
@ -580,7 +580,8 @@ void func_8011F074(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_100000 | FLAG_UNK_20000 | FLAG_UNK_08000000;
entity->flags =
FLAG_UNK_100000 | FLAG_UNK_20000 | FLAG_POS_CAMERA_LOCKED;
entity->unk5A = 0x79;
entity->animSet = ANIMSET_DRA(14);
entity->zPriority = PLAYER.zPriority + 2;
@ -650,7 +651,7 @@ void EntityHitByLightning(Entity* self) {
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->ext.hitbylightning.unk7C =
((self->params & 0xF) << 9) + (rand() & 0x3F);
self->ext.hitbylightning.unk80 = rand();
@ -790,7 +791,7 @@ void EntityHitByIce(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
while (prim != NULL) {
prim->r0 = prim->r1 = prim->r2 = prim->r3 = (rand() & 0xF) + 0x30;
@ -924,8 +925,8 @@ void EntityHitByIce(Entity* self) {
prim->g0 = prim->g1 = prim->g2 = prim->g3;
prim->drawMode |= DRAW_UNK02;
prim->drawMode &= ~(DRAW_UNK_200 | DRAW_UNK_100);
self->flags |= FLAG_UNK_08000000;
self->flags &= ~(FLAG_UNK_20000 | FLAG_UNK_40000);
self->flags |= FLAG_POS_CAMERA_LOCKED;
self->flags &= ~(FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED);
if (--prim->v0 == 0) {
prim->drawMode |= DRAW_HIDE;
}
@ -972,8 +973,8 @@ void EntityTransparentWhiteCircle(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000 | FLAG_UNK_10000;
prim2 = prim1 = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++) {
prim1 = prim1->next;
@ -1154,8 +1155,8 @@ void EntityPlayerPinkEffect(Entity* self) {
switch (self->step) {
case 0:
self->flags = FLAG_UNK_04000000 | FLAG_UNK_40000 | FLAG_UNK_20000 |
FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_POS_PLAYER_LOCKED |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->ext.timer.t = data_idx->unk0[0];
if (data_idx->unk18 != 0x83) {
PlaySfx(SFX_TRANSFORM);
@ -1312,7 +1313,7 @@ void EntityPlayerDissolves(Entity* self) {
if (self->primIndex == -1) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_08000000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_CAMERA_LOCKED;
self->ext.dissolve.unk7C = 0;
temp1 = D_800AE140;
self->ext.dissolve.unk80 = rand() & 7;
@ -1503,8 +1504,8 @@ void EntityLevelUpAnimation(Entity* self) {
return;
}
PlaySfx(NA_SE_PL_MAX_HP_MP_INCREASED);
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000 |
FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_UNK_20000 | FLAG_UNK_10000;
CreateEntFactoryFromEntity(self, FACTORY(0x2C, 0x4A), 0);
self->posX.i.hi = PLAYER.posX.i.hi;
self->posY.i.hi = PLAYER.posY.i.hi - 48;
@ -1862,8 +1863,8 @@ void EntityMist(Entity* self) {
for (j = 0; j < 16; j++) {
prim = func_80121F58(1, j, prim, self->facingLeft);
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->step++;
self->ext.mist.timer = 0;
D_80138394 = 0;
@ -2019,7 +2020,7 @@ void EntityMist(Entity* self) {
for (j = 0; j < 16; j++) {
prim = func_80121F58(1, j, prim, self->facingLeft);
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 |
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
xVar4 = PLAYER.posX.i.hi + self->ext.mist.xCurrent;
yVar4 = PLAYER.posY.i.hi + self->ext.mist.yCurrent;
@ -2180,7 +2181,7 @@ void UnknownEntId48(Entity* self) {
self->enemyId = 4;
self->hitboxHeight = 8;
self->hitboxWidth = 8;
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
self->step++;
}
if (params == 0) {
@ -2237,7 +2238,8 @@ void func_80123A60(Entity* entity) {
entity->posY.i.hi = player->posY.i.hi;
if (entity->step == 0) {
func_8011A328(entity, 0xB);
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000;
entity->flags =
FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA;
entity->step++;
}
@ -2364,8 +2366,8 @@ void func_80123F78(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_10000 | FLAG_UNK_20000 | FLAG_UNK_04000000 |
FLAG_UNK_08000000;
entity->flags = FLAG_UNK_10000 | FLAG_UNK_20000 |
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_POS_CAMERA_LOCKED;
if (PLAYER.animSet != 1) {
DestroyEntity(entity);
break;

View File

@ -29,8 +29,8 @@ void EntityTeleport(Entity* self) {
if (self->primIndex == -1) {
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 2; i++) {
prim->x0 = 0xC0 * i;
@ -291,7 +291,7 @@ void EntitySubwpnThrownDagger(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->facingLeft = PLAYER.facingLeft;
func_8011A290(self);
self->hitboxWidth = 4;
@ -504,8 +504,8 @@ void EntitySubwpnThrownAxe(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->facingLeft = (PLAYER.facingLeft + 1) & 1;
SetSpeedX(FIX(-2));
self->velocityY = FIX(-6);
@ -762,7 +762,7 @@ void EntityHolyWater(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_08000000;
entity->flags = FLAG_POS_CAMERA_LOCKED;
entity->animSet = ANIMSET_DRA(9);
entity->animCurFrame = 0x1D;
entity->zPriority = PLAYER.zPriority - 2;
@ -895,7 +895,7 @@ void EntityHolyWaterBreakGlass(Entity* self) {
prim->priority = PLAYER.zPriority + 2;
}
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->ext.timer.t = 20;
self->step++;
return;
@ -977,7 +977,7 @@ void EntityHolyWaterFlame(Entity* self) {
DRAW_UNK02 | DRAW_COLORS | DRAW_HIDE;
prim = prim->next;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
func_8011A290(self);
self->hitboxWidth = 4;
self->posY.i.hi = self->posY.i.hi - 0xA;
@ -1182,7 +1182,7 @@ void EntitySubwpnCrashCrossParticles(Entity* self) {
if (self->step == 0) {
self->primIndex = AllocPrimitives(PRIM_GT4, 64);
if (self->primIndex != -1) {
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
// entity lives for 192 frames
self->ext.generic.unk7C.s = 192;
self->step++;
@ -1267,8 +1267,8 @@ void EntityHellfireHandler(Entity* self) {
g_Player.unk5C = -1;
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_20000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->posY.i.hi = 120;
// I think this is to make the yellow laser beam?
// it ends up looking like the library card effect.
@ -1405,7 +1405,7 @@ void EntityHellfireNormalFireball(Entity* entity) {
if (entity->params == 0) {
PlaySfx(SFX_FIREBALL_SHOT_A);
}
entity->flags = FLAG_UNK_100000 | FLAG_UNK_08000000;
entity->flags = FLAG_UNK_100000 | FLAG_POS_CAMERA_LOCKED;
entity->animSet = ANIMSET_DRA(9);
entity->anim = D_800B0798;
entity->zPriority = PLAYER.zPriority + 2;
@ -1456,7 +1456,7 @@ void EntityBatFireball(Entity* self) {
switch (self->step) {
case 0:
PlaySfx(SFX_QUICK_STUTTER_EXPLODE);
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->animSet = 9;
self->anim = D_800B0798;
self->zPriority = PLAYER.zPriority - 2;
@ -1508,7 +1508,7 @@ void EntityHellfireBigFireball(Entity* entity) {
PlaySfx(SFX_UNK_683);
}
entity->flags = FLAG_UNK_100000 | FLAG_UNK_08000000;
entity->flags = FLAG_UNK_100000 | FLAG_POS_CAMERA_LOCKED;
if (entity->params != 0) {
entity->posY.i.hi = entity->posY.i.hi + 16;
@ -1594,7 +1594,8 @@ void EntityExpandingCircle(Entity* entity) {
prim->priority = PLAYER.zPriority + 1;
prim->drawMode =
DRAW_TPAGE2 | DRAW_TPAGE | DRAW_COLORS | DRAW_TRANSP;
entity->flags = FLAG_UNK_40000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
entity->flags = FLAG_POS_PLAYER_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS;
entity->step++;
break;
}
@ -1656,8 +1657,8 @@ void func_80127CC8(Entity* entity) {
return;
}
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000 |
FLAG_HAS_PRIMS;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[entity->primIndex];
prim->r0 = prim->r1 = prim->r2 = prim->r3 = 192;
prim->g0 = prim->g1 = prim->g2 = prim->g3 = 64;
@ -1752,7 +1753,8 @@ void EntitySubwpnReboundStone(Entity* self) {
prim->y0 = prim->y1 = playerY;
prim->timer = 0x14;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->zPriority = PLAYER.zPriority + 2;
facingLeft = PLAYER.facingLeft;
@ -2011,7 +2013,7 @@ void EntitySubwpnThrownVibhuti(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
func_8011A290(self);
selfX = self->posX.i.hi;
selfY = self->posY.i.hi;
@ -2173,8 +2175,8 @@ void EntitySubwpnAgunea(Entity* self) {
DestroyEntity(self);
return;
} else {
self->flags =
FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS;
self->facingLeft = PLAYER.facingLeft;
func_8011A290(self);
self->hitboxHeight = 4;
@ -2339,7 +2341,7 @@ void EntityAguneaHitEnemy(Entity* self) {
DestroyEntity(self);
break;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->facingLeft = PLAYER.facingLeft;
self->ext.et_801291C4.unk84 = ((rand() & 0x3FF) - 0x200) & 0xFFF;
@ -2551,8 +2553,9 @@ 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_HAS_PRIMS |
FLAG_UNK_100000 | FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_100000 | FLAG_UNK_20000 | FLAG_UNK_10000;
self->drawFlags = FLAG_DRAW_ROTZ;
if (self->params & 0x7F00) {
func_8011A328(self, 3);
@ -2633,8 +2636,8 @@ void func_80129864(Entity* self) {
}
break;
case 3:
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_100000 |
FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS |
FLAG_UNK_100000 | FLAG_UNK_10000;
s1 = rcos(self->ext.et_80129864.unk82) >> 8;
self->ext.et_80129864.unk82 += 0x80;
self->ext.et_80129864.unk80 += s1;
@ -2746,8 +2749,8 @@ void EntitySummonSpirit(Entity* self) {
switch (self->step) {
case 0:
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000 |
FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_UNK_20000 | FLAG_UNK_10000;
g_unkGraphicsStruct.unk20 = 3;
self->ext.summonspirit.spawnTimer = 10;
func_80118C28(13);
@ -2812,8 +2815,8 @@ void EntitySummonSpirit(Entity* self) {
}
self->ext.summonspirit.timer = 0;
// This just adds FLAG_HAS_PRIMS. Not sure why it wasn't an |=.
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000 | FLAG_UNK_10000;
self->step++;
break;

View File

@ -20,8 +20,8 @@ void EntityStopWatchExpandingCircle(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++, prim = prim->next) {
prim->tpage = 0x1A;
@ -105,8 +105,8 @@ void EntityStopWatch(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
prim->tpage = 0x1E;
prim->clut = 0x17F;
@ -193,7 +193,7 @@ void EntityStopWatch(Entity* self) {
}
break;
case 4:
self->flags &= ~FLAG_UNK_40000;
self->flags &= ~FLAG_POS_PLAYER_LOCKED;
prim = &g_PrimBuf[self->primIndex];
prim->priority = 0xC2;
prim->drawMode &= ~DRAW_UNK_200;
@ -437,7 +437,8 @@ void func_8012B78C(Entity* entity) {
ret = AllocPrimitives(PRIM_GT4, 1);
entity->primIndex = ret;
if (entity->primIndex != -1) {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
entity->flags =
FLAG_UNK_20000 | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[entity->primIndex];
prim->tpage = 0x1C;
prim->clut = 0x19D;
@ -511,7 +512,8 @@ void EntitySubwpnBible(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
prim->tpage = 0x1E;
prim->clut = 0x17F;
@ -541,7 +543,7 @@ void EntitySubwpnBible(Entity* self) {
break;
case 3:
if (++self->ext.et_BibleSubwpn.unk7C >= 0x12C) {
self->flags &= ~FLAG_UNK_04000000;
self->flags &= ~FLAG_KEEP_ALIVE_OFFCAMERA;
self->velocityX = self->facingLeft ? FIX(-12) : FIX(12);
self->velocityY = FIX(-12);
PlaySfx(SFX_UNK_6B2);
@ -645,7 +647,7 @@ void EntityBatEcho(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED;
prim = (Primitive*)&g_PrimBuf[self->primIndex];
self->ext.batEcho.unk84 = prim;
for (i = 0; i < 0x11; i++) {

View File

@ -1019,8 +1019,8 @@ void func_8012F894(Entity* self) {
#ifdef VERSION_HD
self->zPriority = PLAYER.zPriority - 2;
#endif
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_20000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->step++;
}
animControl = 0;
@ -1297,7 +1297,8 @@ void func_80130264(Entity* self) {
#if defined(VERSION_HD)
self->zPriority = PLAYER.zPriority;
#endif
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->drawFlags = FLAG_DRAW_ROTZ;
self->rotPivotX = 0;
self->rotPivotY = 9;
@ -1407,7 +1408,8 @@ void func_80130618(Entity* self) {
#if defined(VERSION_HD)
self->zPriority = PLAYER.zPriority - 2;
#endif
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->drawFlags = FLAG_DRAW_ROTZ;
self->rotPivotX = 1;
self->rotPivotY = 8;
@ -1525,8 +1527,8 @@ void func_801309B4(Entity* self) {
#if defined(VERSION_HD)
self->zPriority = PLAYER.zPriority + 2;
#endif
self->flags = FLAG_UNK_04000000 | FLAG_UNK_100000 | FLAG_UNK_20000 |
FLAG_UNK_40000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_100000 |
FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->animFrameDuration = 1;
self->animFrameIdx = 4;
self->anim = D_800B0ABC;
@ -1541,8 +1543,8 @@ void func_801309B4(Entity* self) {
self->facingLeft = PLAYER.facingLeft;
self->posX.val = g_Entities[UNK_ENTITY_12].posX.val;
self->posY.val = g_Entities[UNK_ENTITY_12].posY.val + FIX(4);
self->flags =
FLAG_UNK_04000000 | FLAG_UNK_100000 | FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_100000 | FLAG_UNK_20000 |
FLAG_POS_PLAYER_LOCKED;
var_a1 = D_80138430 - 0x800;
if (D_80138430 > 0x980) {
@ -1686,7 +1688,8 @@ void func_80130E94(Entity* self) {
#if defined(VERSION_HD)
self->zPriority = PLAYER.zPriority - 3;
#endif
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->ext.timer.t = 0x20;
self->rotZ = D_80138430;
self->step++;
@ -1810,7 +1813,8 @@ void func_8013136C(Entity* self) {
self->animSet = 0xF;
self->unk5A = 0x7E;
self->palette = PLAYER.palette;
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->drawFlags = FLAG_DRAW_ROTZ;
self->rotPivotX = -8;
self->step++;
@ -2049,7 +2053,7 @@ void EntityGiantSpinningCross(Entity* self) {
self->hitboxWidth = 0xC;
self->posY.i.hi = 0x160;
self->velocityY = FIX(-6);
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->facingLeft = 0;
self->ext.giantcross.unk7C = 0;
self->ext.giantcross.unk7E = 0x400;

View File

@ -150,7 +150,7 @@ void RicInit(s16 initParam) {
e->animSet = ANIMSET_OVL(0x10);
e->unk5A = i + 1;
e->palette = 0x8120;
e->flags = FLAG_UNK_20000 | FLAG_UNK_08000000;
e->flags = FLAG_UNK_20000 | FLAG_POS_CAMERA_LOCKED;
}
primIndex = g_api.AllocPrimitives(PRIM_TILE, 6);

View File

@ -1235,7 +1235,8 @@ void RicEntityHitByHoly(Entity* entity) {
DestroyEntity(entity);
return;
}
entity->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
entity->flags =
FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
hitboxX = PLAYER.posX.i.hi + PLAYER.hitboxOffX;
hitboxY = PLAYER.posY.i.hi + PLAYER.hitboxOffY;
prim = &g_PrimBuf[entity->primIndex];
@ -1312,7 +1313,8 @@ void RicEntityHitByDark(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_UNK_08000000;
entity->flags =
FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_POS_CAMERA_LOCKED;
entity->unk5A = 0x79;
entity->animSet = ANIMSET_DRA(14);
entity->zPriority = PLAYER.zPriority + 2;
@ -1516,7 +1518,7 @@ void RicUpdatePlayerEntities(void) {
entity->pfnUpdate(entity);
entity = g_CurrentEntity;
if (entity->entityId) {
if (!(entity->flags & FLAG_UNK_04000000) &&
if (!(entity->flags & FLAG_KEEP_ALIVE_OFFCAMERA) &&
(entity->posX.i.hi < -32 || entity->posX.i.hi > 288 ||
entity->posY.i.hi < -16 || entity->posY.i.hi > 256)) {
DestroyEntity(entity);

View File

@ -27,25 +27,25 @@ void RicEntityFactory(Entity* self) {
self->ext.factory.unk9C = *data_idx & 0x7; // index 4, lower 4 bits
self->ext.factory.unkA4 = *data_idx++ >> 3; // index 4, upper 4 bits
self->ext.factory.unk9A = *data_idx; // index 5
self->flags |= FLAG_UNK_04000000;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA;
self->step++;
switch (self->ext.factory.unkA4) {
case 0:
self->flags |= FLAG_UNK_08000000;
self->flags |= FLAG_POS_CAMERA_LOCKED;
break;
case 4:
self->flags |= FLAG_UNK_20000;
case 2:
case 9:
self->flags |= FLAG_UNK_40000;
self->flags |= FLAG_POS_PLAYER_LOCKED;
case 3:
case 7:
self->posX.val = PLAYER.posX.val;
self->posY.val = PLAYER.posY.val;
break;
case 8:
self->flags |= FLAG_UNK_40000;
self->flags |= FLAG_POS_PLAYER_LOCKED;
self->posX.val = self->ext.factory.parent->posX.val;
self->posY.val = self->ext.factory.parent->posY.val;
break;
@ -165,7 +165,8 @@ void RicEntitySlideKick(Entity* entity) {
entity->posY.i.hi = PLAYER.posY.i.hi;
entity->facingLeft = PLAYER.facingLeft;
if (entity->step == 0) {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA;
entity->hitboxOffX = 0x14;
entity->hitboxOffY = 0xC;
entity->hitboxHeight = 9;
@ -194,7 +195,8 @@ void func_80160D2C(Entity* self) {
self->posY.i.hi = PLAYER.posY.i.hi;
self->facingLeft = PLAYER.facingLeft;
if (self->step == 0) {
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000;
self->flags =
FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA;
self->hitboxOffX = 0x14;
self->hitboxHeight = 9;
self->hitboxWidth = 9;
@ -228,7 +230,8 @@ void RicEntityBladeDash(Entity* self) {
self->posY.i.hi = PLAYER.posY.i.hi;
self->facingLeft = PLAYER.facingLeft;
if (self->step == 0) {
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA;
self->hitboxHeight = 20;
self->hitboxWidth = 20;
self->hitboxOffY = 0;
@ -252,7 +255,8 @@ void func_80160F0C(Entity* self) {
self->posY.i.hi = PLAYER.posY.i.hi;
self->facingLeft = PLAYER.facingLeft;
if (self->step == 0) {
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000;
self->flags =
FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA;
self->hitboxOffX = 0xC;
self->hitboxOffY = -0x1A;
self->hitboxWidth = 12;
@ -314,7 +318,7 @@ void RicEntitySmokePuff(Entity* self) {
self->animSet = 5;
self->anim = anim_smoke_puff;
self->zPriority = PLAYER.zPriority + 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000 | FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000 | FLAG_UNK_10000;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY | FLAG_DRAW_UNK8;
self->unk6C = 0x60;
@ -729,7 +733,7 @@ void func_80161C2C(Entity* self) {
self->palette = 0x8170;
}
}
self->flags = FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_UNK_08000000;
self->flags = FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_POS_CAMERA_LOCKED;
if (rand() % 4) {
self->zPriority = PLAYER.zPriority + 2;
@ -782,8 +786,8 @@ void func_80161EF8(Entity* self) {
case 0:
self->animSet = ANIMSET_DRA(2);
self->anim = anim_80154E38;
self->flags =
FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_UNK_10000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_UNK_100000 | FLAG_UNK_10000 |
FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority + 4;
self->velocityY = (rand() & 0x3FFF) - 0x10000;
self->step++;
@ -852,7 +856,8 @@ void RicEntityApplyMariaPowerAnim(Entity* self) {
posX = self->posX.i.hi;
posY = self->posY.i.hi + props->yPos;
self->posY.i.hi = posY;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->step++;
break;
case 1:
@ -918,8 +923,8 @@ void func_801623E0(Entity* entity) {
prim->clut = 0x13E;
prim->priority = PLAYER.zPriority + 8;
prim->drawMode = DRAW_DEFAULT;
entity->flags = FLAG_UNK_10000 | FLAG_UNK_40000 | FLAG_UNK_04000000 |
FLAG_HAS_PRIMS;
entity->flags = FLAG_UNK_10000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
entity->step++;
break;
@ -971,8 +976,8 @@ void func_80162604(Entity* entity) {
prim->clut = 0x162;
prim->priority = PLAYER.zPriority - 4;
prim->drawMode = DRAW_DEFAULT;
entity->flags = FLAG_UNK_10000 | FLAG_UNK_40000 |
FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
entity->flags = FLAG_UNK_10000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
entity->step++;
goto def;
} else {
@ -1053,7 +1058,7 @@ void RicEntityMariaPowers(Entity* self) {
prim->drawMode = DRAW_HIDE;
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_10000;
if (params == 3) {
self->flags |= FLAG_UNK_04000000;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA;
}
g_api.PlaySfx(0x881);
self->ext.et_80162870.unk82 = 12;
@ -1128,8 +1133,8 @@ static AnimationFrame anim_maria_offering_powers[] = {
void RicEntityMaria(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_100000 | FLAG_UNK_04000000 | FLAG_UNK_10000 |
FLAG_UNK_08000000;
entity->flags = FLAG_UNK_100000 | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_UNK_10000 | FLAG_POS_CAMERA_LOCKED;
entity->facingLeft = 1;
entity->unk5A = 0x66;
entity->zPriority = PLAYER.zPriority - 8;

View File

@ -112,8 +112,8 @@ void RicEntityPlayerBlinkWhite(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_20000 | FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000 | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 8; i++) {
D_80154F7C[i] = i << 9;
@ -396,7 +396,8 @@ void func_801641A0(Entity* entity) {
prim->priority = PLAYER.zPriority + 8;
prim->drawMode =
DRAW_TPAGE2 | DRAW_TPAGE | DRAW_COLORS | DRAW_TRANSP;
entity->flags = FLAG_UNK_40000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
entity->flags = FLAG_POS_PLAYER_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS;
entity->step++;
goto def;
} else {
@ -483,8 +484,8 @@ void RicEntityShrinkingPowerUpRing(Entity* self) {
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000 |
FLAG_UNK_10000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_10000;
prim2 = prim1 = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++) {
prim1 = prim1->next;
@ -705,7 +706,7 @@ void RicEntityHitByIce(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
while (prim != NULL) {
prim->r0 = prim->r1 = prim->r2 = prim->r3 = (rand() & 0xF) + 0x30;
@ -916,7 +917,7 @@ void RicEntityHitByLightning(Entity* self) {
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->ext.hitbylightning.unk7C =
((self->params & 0xF) << 9) + (rand() & 0x3F);
self->ext.hitbylightning.unk80 = rand();

View File

@ -27,8 +27,8 @@ void RicEntityTeleport(Entity* self) {
if (self->primIndex == -1) {
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_10000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 2; i++) {
prim->x0 = 0xC0 * i;
@ -756,8 +756,8 @@ void RicEntityArmBrandishWhip(Entity* entity) {
entity->facingLeft = PLAYER.facingLeft;
if (entity->step == 0) {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000 | FLAG_UNK_04000000 |
FLAG_UNK_10000;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_10000;
entity->animSet = ANIMSET_OVL(18);
entity->unk5A = 0x46;
entity->palette = 0x8120;
@ -792,8 +792,8 @@ static s16 D_80155D30[] = {0x10, 0x18, 0x11, 0x19, 0x12, 0x1A, 0x13, 0x1B, 0x14,
void func_80167964(Entity* entity) {
if (g_Player.unk46 != 0) {
if (entity->step == 0) {
entity->flags = FLAG_UNK_20000 | FLAG_UNK_40000 |
FLAG_UNK_04000000 | FLAG_UNK_10000;
entity->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED |
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_10000;
}
if (!(entity->params & 0xFF00)) {
g_Entities[D_80155D30[entity->animFrameDuration]].palette =
@ -886,7 +886,7 @@ void func_80167A70(Entity* self) {
prim->priority = PLAYER.zPriority + 2;
}
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->ext.timer.t = 20;
self->step++;
break;
@ -950,8 +950,8 @@ void RicEntityCrashHydroStorm(Entity* self) {
}
self->ext.subweapon.subweaponId = PL_W_HYDROSTORM;
RicSetSubweaponParams(self);
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
line = (PrimLineG2*)&g_PrimBuf[self->primIndex];
self->facingLeft = 0;
while (line != NULL) {

View File

@ -19,7 +19,7 @@ void RicEntitySubwpnHolyWater(Entity* self) {
}
switch (self->step) {
case 0:
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animSet = ANIMSET_OVL(0x12);
self->animCurFrame = 0x23;
self->zPriority = PLAYER.zPriority + 2;
@ -213,7 +213,7 @@ void RicEntitySubwpnHolyWaterFlame(Entity* self) {
prim = prim->next;
i++;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->ext.holywater.timer = 1;
self->step += 1;
break;
@ -340,7 +340,8 @@ void RicEntitySubwpnCrashCross(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->ext.crashcross.unk80 = 1;
self->zPriority = 0xC2;
self->ext.crashcross.subweaponId = PL_W_CRASH_CROSS;
@ -525,7 +526,8 @@ void RicEntitySubwpnCross(Entity* self) {
switch (self->step) {
case 0:
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_UNK_100000;
// gets used by shadow, must align with that entity
self->ext.crossBoomerang.unk84 = &D_80175088[D_80175888];
D_80175888++;
@ -673,7 +675,7 @@ void func_80169C10(Entity* entity) {
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
entity->primIndex = primIndex;
if (primIndex != -1) {
entity->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
entity->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
entity->velocityY = FIX(0.5);
entity->posX.i.hi =
((u16)entity->posX.i.hi - PosX) + (rand() & 0xF);
@ -711,7 +713,7 @@ void RicEntitySubwpnCrossTrail(Entity* self) {
switch (self->step) {
case 0:
self->flags = FLAG_UNK_04000000 | FLAG_UNK_08000000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_POS_CAMERA_LOCKED;
// the parent pointer is set in RicEntityFactory.
// the value of unk84 is set in RicEntitySubwpnCross
self->ext.crossBoomerang.unk84 =
@ -775,7 +777,8 @@ void RicEntitySubwpnCrashCrossParticles(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->ext.timer.t = 0xC0;
self->step += 1;
return;
@ -893,8 +896,8 @@ void RicEntitySubwpnAxe(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->facingLeft = (PLAYER.facingLeft + 1) & 1;
RicSetSpeedX(FIX(-2));
self->velocityY = FIX(-6);
@ -1116,8 +1119,8 @@ void RicEntityCrashAxe(Entity* self) {
return;
}
sp10 = 0;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->facingLeft = 0;
prim = &g_PrimBuf[self->primIndex];
self->ext.axeCrash.unk7C = ((u8)self->params << 9) + 0xC00;
@ -1185,7 +1188,7 @@ void RicEntityCrashAxe(Entity* self) {
g_api.PlaySfx(SFX_WEAPON_APPEAR);
}
g_Player.unk4E = 1;
self->flags &= ~(FLAG_UNK_04000000 | FLAG_UNK_20000);
self->flags &= ~(FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000);
}
temp_s1 = self->ext.axeCrash.unk9C;
self->ext.axeCrash.unk9C += 2;
@ -1319,7 +1322,7 @@ void RicEntitySubwpnDagger(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | 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.
@ -1568,7 +1571,8 @@ void RicEntitySubwpnReboundStone(Entity* self) {
prim->y0 = prim->y1 = playerY;
prim->timer = 20;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->zPriority = PLAYER.zPriority + 2;
facingLeft = PLAYER.facingLeft;
@ -1826,7 +1830,7 @@ void RicEntitySubwpnThrownVibhuti(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->ext.subweapon.subweaponId = PL_W_VIBHUTI;
RicSetSubweaponParams(self);
self->hitboxWidth = self->hitboxHeight = 4;
@ -1995,8 +1999,8 @@ void RicEntitySubwpnAgunea(Entity* self) {
DestroyEntity(self);
return;
} else {
self->flags =
FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS;
self->facingLeft = PLAYER.facingLeft;
self->ext.agunea.subweaponId = PL_W_AGUNEA;
RicSetSubweaponParams(self);
@ -2146,7 +2150,7 @@ void RicEntityAguneaHitEnemy(Entity* self) {
DestroyEntity(self);
break;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->facingLeft = PLAYER.facingLeft;
self->ext.et_801291C4.unk84 = ((rand() & 0x3FF) - 0x200) & 0xFFF;
@ -2325,7 +2329,7 @@ void RicEntityVibhutiCrashCloud(Entity* entity) {
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
entity->primIndex = primIndex;
if (primIndex != -1) {
entity->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
entity->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
entity->posX.val =
entity->ext.vibCrashCloud.parent->ext.vibhutiCrash.unk84;
entity->posY.val =
@ -2380,7 +2384,8 @@ void RicEntityCrashVibhuti(Entity* self) {
g_Player.unk4E = 1;
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 9; i++) {
prim->r0 = prim->g0 = prim->b0 = 0xFF;
@ -2461,7 +2466,7 @@ void RicEntityCrashVibhuti(Entity* self) {
void RicEntityCrashReboundStoneParticles(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_04000000;
entity->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
entity->ext.subweapon.subweaponId = PL_W_CRASH_REBOUND_STONE;
RicSetSubweaponParams(entity);
entity->hitboxWidth = 4;

View File

@ -22,7 +22,7 @@ void func_8016D9C4(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
primLine = (PrimLineG2*)&g_PrimBuf[self->primIndex];
for (i = 0; i < 4; i++) {
primLine->preciseX.val = PLAYER.posX.val;
@ -178,7 +178,7 @@ void RicEntityCrashReboundStoneExplosion(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 0x10; i++) {
@ -275,7 +275,7 @@ void RicEntityCrashReboundStoneExplosion(Entity* self) {
void RicEntityCrashReboundStone(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_20000 | FLAG_UNK_04000000;
entity->flags = FLAG_UNK_20000 | FLAG_KEEP_ALIVE_OFFCAMERA;
entity->ext.timer.t = 0x14;
entity->step++;
@ -332,7 +332,8 @@ void RicEntityCrashBibleBeam(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
if (self->facingLeft) {
self->ext.bibleBeam.unk7C = -16;
self->ext.bibleBeam.unk7E = -2;
@ -442,7 +443,8 @@ void RicEntityCrashBible(Entity* self) {
g_Player.unk4E = 1;
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->posX.val = PLAYER.posX.val;
self->posY.val = PLAYER.posY.val;
self->velocityY = FIX(-4);
@ -636,7 +638,7 @@ void func_8016F198(Entity* self) {
g_Player.unk4E = 1;
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++) {
prim->priority = 0xC2;
@ -759,7 +761,8 @@ void RicEntityCrashStopwatchDoneSparkle(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[self->primIndex];
prim->drawMode =
@ -1078,7 +1081,7 @@ void RicEntityCrashStopwatchDoneSparkle(Entity* self) {
void func_80170548(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_04000000;
entity->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
entity->ext.generic.unkB0 = 0x1E;
RicSetSubweaponParams(entity);
entity->hitboxWidth = 8;
@ -1098,7 +1101,7 @@ void func_801705EC(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_04000000;
entity->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
entity->ext.et_80161FF0.unk7E = 0;
entity->step++;
case 1:
@ -1190,7 +1193,8 @@ void RicEntityAguneaLightning(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 15; i++) {
prim->tpage = 0x1A;
@ -1321,7 +1325,8 @@ void RicEntityAguneaCircle(Entity* self) {
g_Player.unk4E = 1;
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED;
prim = &g_PrimBuf[self->primIndex];
self->posX.i.hi = PLAYER.posX.i.hi;
self->posY.i.hi = PLAYER.posY.i.hi - 0x20;
@ -1470,7 +1475,7 @@ void RicEntitySubwpnStopwatchCircle(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++) {
prim->tpage = 0x1A;
@ -1562,8 +1567,8 @@ void RicEntitySubwpnStopwatch(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
prim->tpage = 0x1E;
prim->clut = 0x17F;
@ -1668,7 +1673,7 @@ void RicEntitySubwpnStopwatch(Entity* self) {
break;
case 4:
prim = &g_PrimBuf[self->primIndex];
self->flags &= ~FLAG_UNK_40000;
self->flags &= ~FLAG_POS_PLAYER_LOCKED;
prim->priority = 0xC2;
prim->drawMode &= ~0x200;
prim = prim->next;
@ -1964,7 +1969,8 @@ void RicEntitySubwpnBibleTrail(Entity* entity) {
DestroyEntity(entity);
return;
}
entity->flags = FLAG_UNK_20000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
entity->flags =
FLAG_UNK_20000 | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
prim = &g_PrimBuf[entity->primIndex];
prim->tpage = 0x1C;
prim->clut = 0x19D;
@ -2028,7 +2034,8 @@ void RicEntitySubwpnBible(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
prim->tpage = 0x1E;
prim->clut = 0x17F;
@ -2058,7 +2065,7 @@ void RicEntitySubwpnBible(Entity* self) {
break;
case 3:
if (++self->ext.et_BibleSubwpn.unk7C >= 0x12C) {
self->flags &= ~FLAG_UNK_04000000;
self->flags &= ~FLAG_KEEP_ALIVE_OFFCAMERA;
self->velocityX = self->facingLeft ? FIX(-12) : FIX(12);
self->velocityY = FIX(-12);
g_api.PlaySfx(0x6B2);

View File

@ -149,7 +149,8 @@ void RicEntityCrashCrossBeam(Entity* self) {
self->hitboxWidth = 0xC;
self->posY.i.hi = 0x160;
self->velocityY = FIX(-6.0);
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->facingLeft = 0;
self->ext.giantcross.unk7C = 0;
self->ext.giantcross.unk7E = 0x400;

View File

@ -261,7 +261,7 @@ void CreateBlueTrailEntity(Entity* parent) {
entity->entityId = 0xDA;
entity->zPriority = parent->zPriority;
entity->facingLeft = parent->facingLeft;
entity->flags = FLAG_UNK_04000000;
entity->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
entity->posX.val = parent->posX.val;
entity->posY.val = parent->posY.val;
entity->ext.batFamBlueTrail.parent = parent;
@ -365,7 +365,7 @@ void func_801719E0(Entity* self) {
return;
}
func_8017170C(self, 0);
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 |
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
func_801710E8(self, D_801704A8);
self->ext.bat.unk84 = rand() % 4096;
@ -382,7 +382,7 @@ void func_801719E0(Entity* self) {
return;
}
func_8017170C(self, 0);
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 |
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_UNK_02000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
func_801710E8(self, D_801704A8);
if (!self->ext.bat.unk82) {
@ -428,14 +428,14 @@ void func_801719E0(Entity* self) {
self->ext.bat.unk8E = 0;
switch (self->entityId) {
case 0xD1:
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 |
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
func_801710E8(self, D_801704A8);
self->ext.bat.unk8C = rand() % 4096;
self->step++;
break;
case 0xD2:
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 |
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_UNK_02000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
func_801710E8(self, D_801704A8);
if (!self->ext.bat.unk82) {
@ -937,7 +937,7 @@ void BatFamiliarBlueTrail(Entity* self) {
DestroyEntity(self);
return;
} else {
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
D_80174B48 = &g_PrimBuf[self->primIndex];
for (i = 0; i < nPrim; i++) {
D_80174B48->tpage = 0x1B;
@ -1197,7 +1197,7 @@ s32 func_80173FE8(Entity* entity, s32 x, s32 y) {
void func_80174038(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = FLAG_UNK_20000 | FLAG_UNK_04000000;
entity->flags = FLAG_UNK_20000 | FLAG_KEEP_ALIVE_OFFCAMERA;
if (D_8003C704 != 0) {
D_80171090 = 99;
DestroyEntity(entity);

View File

@ -19,7 +19,7 @@ void CreateEventEntity(Entity* entityParent, s32 entityId, s32 params) {
entity->entityId = entityId;
entity->zPriority = entityParent->zPriority;
entity->facingLeft = entityParent->facingLeft;
entity->flags = FLAG_UNK_04000000;
entity->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
entity->posX.val = entityParent->posX.val;
entity->posY.val = entityParent->posY.val;
// Not necessarily making batFamBlueTrail here, but

View File

@ -353,7 +353,7 @@ void EntityMaria(Entity* self) {
return;
}
InitializeEntity(D_80180428);
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animSet = ANIMSET_OVL(1);
self->animCurFrame = 10;
self->unk5A = 0x48;

View File

@ -352,7 +352,7 @@ void HitDetection(void) {
g_CastleFlags[(miscVar1 >> 3) + 0x190] |= miscVar3;
}
if ((g_Status.relics[RELIC_FAERIE_SCROLL] & 2) &&
!(entFrom5C->flags & FLAG_UNK_01000000)) {
!(entFrom5C->flags & FLAG_NOT_AN_ENEMY)) {
if (g_unkGraphicsStruct.BottomCornerTextTimer != 0) {
g_api.FreePrimitives(
g_unkGraphicsStruct.BottomCornerTextPrims);
@ -360,7 +360,7 @@ void HitDetection(void) {
}
BottomCornerText(
g_api.enemyDefs[entFrom5C->enemyId].name, 0);
entFrom5C->flags |= FLAG_UNK_01000000;
entFrom5C->flags |= FLAG_NOT_AN_ENEMY;
}
miscVar2 = 0;
if ((iterEnt1->hitboxState & 8) &&
@ -405,7 +405,7 @@ void HitDetection(void) {
miscVar1 = 0;
}
if ((g_Status.relics[RELIC_SPIRIT_ORB] & 2) &&
!(entFrom5C->flags & FLAG_UNK_04000000) &&
!(entFrom5C->flags & FLAG_KEEP_ALIVE_OFFCAMERA) &&
miscVar1) {
otherEntity =
AllocEntity(&g_Entities[224], &g_Entities[256]);

View File

@ -31,7 +31,7 @@ void EntityMessageBox(Entity* self) {
case 0:
InitializeEntity(g_InitializeData0);
self->flags |= FLAG_UNK_10000;
self->flags ^= FLAG_UNK_08000000;
self->flags ^= FLAG_POS_CAMERA_LOCKED;
if (!self->params) {
self->params = 96; // default to 96 frames, or 1.5 seconds
}

View File

@ -8,7 +8,8 @@ extern u16 unk14_lifetime[];
void EntityUnkId14(Entity* self) {
if (!self->step) {
self->velocityY = unk14_yVel[self->ext.generic.unk94];
self->flags = FLAG_UNK_2000 | FLAG_UNK_04000000 | FLAG_UNK_08000000;
self->flags =
FLAG_UNK_2000 | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_POS_CAMERA_LOCKED;
self->palette = PAL_OVL(0x195);
self->animSet = ANIMSET_DRA(2);
self->animCurFrame = unk14_startFrame[self->params];

View File

@ -5,7 +5,8 @@ extern s32 unk15_yVel[];
// looks like a particle of dust fading away
void EntityUnkId15(Entity* self) {
if (!self->step) {
self->flags = FLAG_UNK_2000 | FLAG_UNK_04000000 | FLAG_UNK_08000000;
self->flags =
FLAG_UNK_2000 | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_POS_CAMERA_LOCKED;
self->palette = PAL_OVL(0x195);
self->animSet = ANIMSET_DRA(5);
self->animCurFrame = 1;

View File

@ -289,7 +289,7 @@ void HitDetection(void) {
g_CastleFlags[(miscVar1 >> 3) + 0x120] |= miscVar3;
}
if ((g_Status.relics[RELIC_FAERIE_SCROLL] & 2) &&
!(entFrom5C->flags & FLAG_UNK_01000000)) {
!(entFrom5C->flags & FLAG_NOT_AN_ENEMY)) {
if (g_unkGraphicsStruct.BottomCornerTextTimer != 0) {
g_api.FreePrimitives(
g_unkGraphicsStruct.BottomCornerTextPrims);
@ -297,7 +297,7 @@ void HitDetection(void) {
}
BottomCornerText(
g_api.enemyDefs[entFrom5C->enemyId].name, 0);
entFrom5C->flags |= FLAG_UNK_01000000;
entFrom5C->flags |= FLAG_NOT_AN_ENEMY;
}
miscVar2 = 0;
if ((iterEnt1->hitboxState & 8) &&
@ -342,7 +342,7 @@ void HitDetection(void) {
miscVar1 = 0;
}
if ((g_Status.relics[RELIC_SPIRIT_ORB] & 2) &&
!(entFrom5C->flags & FLAG_UNK_04000000) &&
!(entFrom5C->flags & FLAG_KEEP_ALIVE_OFFCAMERA) &&
miscVar1) {
otherEntity =
AllocEntity(&g_Entities[224], &g_Entities[256]);

View File

@ -9,8 +9,8 @@ void MakeEntityFromId(u16 entityId, Entity* src, Entity* dst) {
dst->unk5A = src->unk5A;
dst->zPriority = src->zPriority;
dst->animSet = src->animSet;
dst->flags = FLAG_UNK_2000 | FLAG_UNK_01000000 | FLAG_UNK_04000000 |
FLAG_UNK_08000000 | FLAG_DESTROY_IF_BARELY_OUT_OF_CAMERA |
dst->flags = FLAG_UNK_2000 | FLAG_NOT_AN_ENEMY | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_POS_CAMERA_LOCKED | FLAG_DESTROY_IF_BARELY_OUT_OF_CAMERA |
FLAG_DESTROY_IF_OUT_OF_CAMERA;
if (src->palette & PAL_OVL_FLAG) {

View File

@ -1722,7 +1722,7 @@ void EntityUnkId29(Entity* self) {
if (self->step == 0) {
InitializeEntity(D_80180B18);
self->zPriority = 0x2A;
self->flags &= ~FLAG_UNK_08000000;
self->flags &= ~FLAG_POS_CAMERA_LOCKED;
self->facingLeft = Random() & 1;
g_api.PlaySfxVolPan(SFX_THUNDER_B, 0x40, (self->posX.i.hi >> 0x4) - 8);
}
@ -1735,7 +1735,7 @@ void EntityUnkId2A(Entity* entity) {
if (entity->step == 0) {
InitializeEntity(D_80180B18);
entity->zPriority = 0x29;
entity->flags &= ~FLAG_UNK_08000000;
entity->flags &= ~FLAG_POS_CAMERA_LOCKED;
entity->animCurFrame = entity->params + 0x22;
entity->posX.i.hi = D_8018139C[entity->params << 1];
entity->posY.i.hi = D_8018139E[entity->params << 1];

View File

@ -146,7 +146,7 @@ void EntityForegroundTree(Entity* self) {
InitializeEntity(D_80180AD0);
EntRange = &g_Entities[192];
self->unk68 = var_s3;
self->flags |= FLAG_UNK_08000000;
self->flags |= FLAG_POS_CAMERA_LOCKED;
label:
if (*ptrParams <= 352) {
ent = AllocEntity(EntRange, &EntRange[64]);
@ -225,7 +225,7 @@ void EntityUnkId50(Entity* self) {
temp = &g_Entities[192];
self->unk68 = 0xC0;
self->ext.et_801BCC4C.unk7C = 0;
self->flags |= FLAG_UNK_08000000;
self->flags |= FLAG_POS_CAMERA_LOCKED;
label:
while (*ptr <= 288) {
newEntity = AllocEntity(temp, &temp[64]);
@ -283,7 +283,7 @@ void EntityUnkId52(Entity* self) {
ptr = D_801817F8;
temp = &g_Entities[192];
self->ext.et_801BCC4C.unk7C = 0;
self->flags |= FLAG_UNK_08000000;
self->flags |= FLAG_POS_CAMERA_LOCKED;
label:
while (*ptr <= 288) {
newEntity = AllocEntity(temp, &temp[64]);
@ -349,7 +349,7 @@ void EntityBackgroundTrees(Entity* self) {
self->posX.i.hi = 128;
self->primIndex = primIndex;
self->unk68 = 0x10;
self->flags |= FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
while (prim != NULL) {
prim->x0 = prim->x2 = var_a2;

View File

@ -1575,7 +1575,7 @@ void func_801B5DE8(Entity* self) {
if (self->step == 0) {
InitializeEntity(D_80180AA8);
self->zPriority = 0x2A;
self->flags &= ~FLAG_UNK_08000000;
self->flags &= ~FLAG_POS_CAMERA_LOCKED;
self->facingLeft = Random() & 1;
g_api.PlaySfxVolPan(SFX_THUNDER_B, 0x40, (self->posX.i.hi >> 0x4) - 8);
}
@ -1588,7 +1588,7 @@ void func_801B5E98(Entity* self) {
if (self->step == 0) {
InitializeEntity(D_80180AA8);
self->zPriority = 0x29;
self->flags &= ~FLAG_UNK_08000000;
self->flags &= ~FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = self->params + 0x22;
self->posX.i.hi = D_80181220[self->params][0];
self->posY.i.hi = D_80181220[self->params][1];

View File

@ -74,7 +74,7 @@ void EntitySpittleBone(Entity* self) {
if (newEntity != NULL) {
MakeEntityFromId(E_SPITTLEBONE, self, newEntity);
newEntity->facingLeft = self->facingLeft;
newEntity->flags = FLAG_UNK_2000 | FLAG_UNK_08000000 |
newEntity->flags = FLAG_UNK_2000 | FLAG_POS_CAMERA_LOCKED |
FLAG_DESTROY_IF_BARELY_OUT_OF_CAMERA |
FLAG_DESTROY_IF_OUT_OF_CAMERA;
newEntity->palette = 0x20D;

View File

@ -836,7 +836,7 @@ void func_801AF774(Entity* self) {
self->hitboxState = 0;
self->animCurFrame = 0;
self->drawMode |= (DRAW_TPAGE | 0x20);
self->flags &= ~FLAG_UNK_08000000;
self->flags &= ~FLAG_POS_CAMERA_LOCKED;
D_801C2578 = 1;
self->ext.et_801AF774.unk90 = 1;
primIndex = g_api.AllocPrimitives(PRIM_GT4, 0x5C);

View File

@ -85,7 +85,7 @@ void EntityCutscenePhotographFire(Entity* entity) {
entity->palette = 0x8285;
entity->drawFlags = FLAG_DRAW_UNK8;
entity->unk6C = 0x40;
entity->flags &= ~FLAG_UNK_08000000;
entity->flags &= ~FLAG_POS_CAMERA_LOCKED;
if (entity->params) {
entity->unk6C = 0x10;
entity->zPriority = 0x1FB;

View File

@ -254,7 +254,7 @@ void HitDetection(void) {
g_CastleFlags[(miscVar1 >> 3) + 0x190] |= miscVar3;
}
if ((g_Status.relics[RELIC_FAERIE_SCROLL] & 2) &&
!(entFrom5C->flags & FLAG_UNK_01000000)) {
!(entFrom5C->flags & FLAG_NOT_AN_ENEMY)) {
if (g_unkGraphicsStruct.BottomCornerTextTimer != 0) {
g_api.FreePrimitives(
g_unkGraphicsStruct.BottomCornerTextPrims);
@ -262,7 +262,7 @@ void HitDetection(void) {
}
BottomCornerText(
g_api.enemyDefs[entFrom5C->enemyId].name, 0);
entFrom5C->flags |= FLAG_UNK_01000000;
entFrom5C->flags |= FLAG_NOT_AN_ENEMY;
}
if (entFrom5C->hitPoints) {
if (iterEnt2->attack) {
@ -302,7 +302,7 @@ void HitDetection(void) {
miscVar1 = 0;
}
if ((g_Status.relics[RELIC_SPIRIT_ORB] & 2) &&
!(entFrom5C->flags & FLAG_UNK_04000000)) {
!(entFrom5C->flags & FLAG_KEEP_ALIVE_OFFCAMERA)) {
otherEntity =
AllocEntity(&g_Entities[224], &g_Entities[256]);
if (otherEntity != NULL) {

View File

@ -225,7 +225,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
SetWeaponProperties(self, 0);

View File

@ -77,7 +77,7 @@ s32 func_ptr_80170004(Entity* self) {
prim = prim->next;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
SetWeaponProperties(self, 0);
self->ext.weapon.lifetime = 128;
self->hitboxWidth = 18;
@ -176,7 +176,7 @@ extern AnimationFrame D_B000_8017AFC8[];
static void func_ptr_80170008(Entity* self) {
switch (self->step) {
case 0:
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->animSet = 9;
self->anim = D_B000_8017AFC8;
self->zPriority = PLAYER.zPriority - 2;

View File

@ -113,7 +113,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
SetWeaponProperties(self, 0);
self->step++;

View File

@ -40,7 +40,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE | DRAW_TPAGE2;
SetWeaponProperties(self, 0);

View File

@ -42,7 +42,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
SetWeaponProperties(self, 0);

View File

@ -36,7 +36,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
SetWeaponProperties(self, 0);

View File

@ -43,7 +43,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE | DRAW_TPAGE2;
SetWeaponProperties(self, 0);
@ -104,7 +104,7 @@ static void func_ptr_80170004(Entity* self) {
self->velocityY =
(rand() & 0x1FFF) + D_2E000_8017ABF0[(u8)self->params];
self->ext.weapon_006.unk88 = -(self->velocityY >> 4);
self->flags = FLAG_UNK_08000000 | FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_20000;
self->rotZ = rand();
if (!(self->params & ~0x8000)) {
@ -240,7 +240,7 @@ static void func_ptr_80170008(Entity* self) {
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->velocityY = FIX(1.0 / 2.0);
range = 24;
posX = (rand() % range) - 0xC;

View File

@ -214,7 +214,7 @@ void EntityWeaponAttack(Entity* self) {
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
SetWeaponProperties(self, 0);
@ -273,7 +273,7 @@ static void func_ptr_80170004(Entity* self) {
}
self->drawFlags = FLAG_DRAW_ROTY | FLAG_DRAW_ROTX;
self->rotX = self->rotY = 0x10;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->hitboxWidth = self->hitboxHeight = 9;
self->attack = 1;
self->attackElement = 0;
@ -390,7 +390,7 @@ static void func_ptr_80170008(Entity* self) {
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->velocityY = FIX(3.0 / 4.0);
range = 16;

View File

@ -48,7 +48,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -66,7 +66,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -202,7 +202,8 @@ static s32 EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;

View File

@ -48,7 +48,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -66,7 +66,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -202,7 +202,8 @@ void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;

View File

@ -72,7 +72,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -98,7 +98,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -202,7 +202,7 @@ s32 func_ptr_80170004(Entity* self) {
self->palette = PAL_OVL(0x194);
self->zPriority = self->ext.weapon.parent->zPriority + 4;
self->unk5A = self->ext.weapon.parent->unk5A;
self->flags = FLAG_UNK_100000 | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_UNK_100000 | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->anim = D_4A000_8017ABA0;
g_api.PlaySfx(SFX_THUNDER_A);
self->step++;
@ -259,7 +259,8 @@ void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -526,7 +527,7 @@ void func_ptr_80170024(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
fakePrim = (FakePrim*)&g_PrimBuf[self->primIndex];
fakePrim->drawMode = DRAW_HIDE;
fakePrim->priority = 0;
@ -589,8 +590,8 @@ void func_ptr_80170024(Entity* self) {
}
if (self->ext.shield.unkA0) {
if (--self->ext.shield.unkA0 == 0) {
self->flags |= FLAG_UNK_08000000;
self->flags &= ~FLAG_UNK_04000000;
self->flags |= FLAG_POS_CAMERA_LOCKED;
self->flags &= ~FLAG_KEEP_ALIVE_OFFCAMERA;
}
} else {
if (self->ext.shield.unk9A < 0x280) {

View File

@ -51,7 +51,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -69,7 +69,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -206,7 +206,8 @@ void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -447,7 +448,7 @@ static void func_ptr_80170024(Entity* self) {
self->palette = self->ext.shield.parent->palette;
self->facingLeft = self->ext.shield.parent->facingLeft;
if (self->params & 0x7F00) {
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = self->ext.shield.parent->animCurFrame;
self->drawFlags = FLAG_DRAW_UNK8;
self->drawMode = DRAW_TPAGE;
@ -457,7 +458,7 @@ static void func_ptr_80170024(Entity* self) {
self->step = 4;
} else {
self->anim = D_51000_8017ABCC;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->ext.shield.unkAE = self->ext.shield.parent->ext.shield.unkAE;
SetWeaponProperties(self, 0);
self->hitboxWidth = 8;

View File

@ -238,7 +238,7 @@ static void EntityWeaponAttack(Entity* self) {
prim->r3 = 0x80;
prim->drawMode |= DRAW_COLORS;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
SetWeaponProperties(self, 0);
self->hitboxOffX = 0x2B;
self->hitboxWidth = 0x1E;
@ -337,7 +337,8 @@ static s32 func_ptr_80170004(Entity* self) {
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->palette = 0x100;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
SetSpeedX(((rand() & FIX(0.25) - 1) * 2) | FIX(4.5));
self->ext.weapon_012.unk7E = 0x1C;
offsetY = PLAYER.posY.i.hi + PLAYER.hitboxOffY;
@ -452,7 +453,8 @@ static void func_ptr_80170008(Entity* self) {
self->facingLeft = self->ext.weapon.parent->facingLeft;
self->unk5A = self->ext.weapon.parent->unk5A;
self->zPriority = PLAYER.zPriority - 4;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
self->palette = self->ext.weapon.parent->palette;
self->drawFlags = self->ext.weapon.parent->drawFlags + FLAG_DRAW_UNK8;
self->rotZ = self->ext.weapon.parent->rotZ;

View File

@ -93,7 +93,8 @@ static void EntityWeaponAttack(Entity* self) {
self->animCurFrame = 6;
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
SetSpeedX(FIX(6));
self->posY.i.hi = PLAYER.posY.i.hi + PLAYER.hitboxOffY - 8;
if (PLAYER.step != Player_Crouch) {
@ -225,7 +226,8 @@ s32 func_ptr_80170004(Entity* self) {
self->facingLeft = self->ext.weapon.parent->facingLeft;
self->unk5A = self->ext.weapon.parent->unk5A;
self->zPriority = PLAYER.zPriority - 4;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
self->palette = self->ext.weapon.parent->ext.weapon.childPalette;
self->drawFlags = self->ext.weapon.parent->drawFlags + FLAG_DRAW_UNK8;
self->rotZ = self->ext.weapon.parent->rotZ;
@ -260,7 +262,7 @@ static void func_ptr_80170008(Entity* self) {
self->animCurFrame = 6;
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority + 2;
self->flags = FLAG_UNK_04000000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
self->drawFlags = FLAG_DRAW_ROTZ;
self->posY.i.hi = PLAYER.posY.i.hi + PLAYER.hitboxOffY - 8;
if (PLAYER.step != Player_Crouch) {
@ -432,7 +434,7 @@ static void func_ptr_8017000C(Entity* self) {
self->facingLeft = self->ext.weapon.parent->facingLeft;
self->unk5A = self->ext.weapon.parent->unk5A;
self->zPriority = self->ext.weapon.parent->zPriority;
self->flags = FLAG_UNK_04000000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA;
self->palette = self->ext.weapon.parent->palette + (self->params >> 8);
self->drawFlags = self->ext.weapon.parent->drawFlags | FLAG_DRAW_UNK80;
self->rotZ = self->ext.weapon.parent->rotZ;

View File

@ -49,8 +49,8 @@ void EntityWeaponAttack(Entity* self) {
self->animCurFrame = 8;
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_HAS_PRIMS |
FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA |
FLAG_HAS_PRIMS | FLAG_UNK_20000;
SetSpeedX(FIX(6));
self->velocityY = FIX(1);
offsetY = PLAYER.posY.i.hi + PLAYER.hitboxOffY;
@ -237,7 +237,8 @@ s32 func_ptr_80170004(Entity* self) {
angle = 0;
if (self->step == 0) {
self->facingLeft = self->ext.weapon.parent->facingLeft;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
self->ext.weapon.equipId = self->ext.weapon.parent->ext.weapon.equipId;
SetWeaponProperties(self, 0);
self->enemyId = self->ext.weapon.parent->enemyId;

View File

@ -34,7 +34,7 @@ void EntityWeaponAttack(Entity* self) {
self->animCurFrame = D_6D000_8017A6B8[((self->params >> 8) & 0x7F)];
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
SetSpeedX(FIX(8));
if (((self->params >> 8) & 0x7F) == 3) {
@ -113,7 +113,7 @@ s32 func_ptr_80170004(Entity* self) {
self->animCurFrame = self->ext.weapon.parent->animCurFrame;
self->facingLeft = self->ext.weapon.parent->facingLeft;
self->zPriority = self->ext.weapon.parent->zPriority - 2;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->palette = self->ext.weapon.parent->palette;
self->unk5A = self->ext.weapon.parent->unk5A;
self->ext.generic.unk7C.s = 10;
@ -138,7 +138,7 @@ static void func_ptr_80170008(Entity* self) {
self->animSet = 2;
self->anim = D_6D000_8017A6C0;
self->zPriority = PLAYER.zPriority - 4;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->velocityY = FIX(-1);
if (!(D_6D000_8017BFC8 & 1)) {
@ -191,7 +191,7 @@ void func_ptr_8017000C(Entity* self) {
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
self->primIndex = g_api.AllocPrimitives(PRIM_TILE, 32);
@ -409,7 +409,7 @@ s32 func_ptr_80170010(Entity* self) {
self->unk5A = 0x67;
}
self->anim = D_6D000_8017A770;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
if (params >= 0x10) {
@ -483,7 +483,7 @@ static s32 func_ptr_80170014(Entity* self) {
self->unk5A = 103;
}
self->anim = D_6D000_8017A770;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE | 0x20;
angle = ratan2(-self->ext.weapon.parent->velocityY,

View File

@ -41,7 +41,7 @@ static void EntityWeaponAttack(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS;
fakePrim = (FakePrim*)&g_PrimBuf[self->primIndex];
fakePrim->drawMode = DRAW_HIDE;
fakePrim->priority = 0;
@ -114,7 +114,7 @@ s32 func_ptr_80170004(Entity* self) {
self->animCurFrame = self->ext.weapon.parent->animCurFrame;
self->facingLeft = self->ext.weapon.parent->facingLeft;
self->zPriority = PLAYER.zPriority - 4;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->palette = self->ext.weapon.parent->palette;
self->unk5A = self->ext.weapon.parent->unk5A;
self->ext.weapon.lifetime = 0x16;
@ -152,7 +152,7 @@ static void func_ptr_8017000C(Entity* self) {
self->animCurFrame = 0x10;
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->drawFlags = DRAW_COLORS;
temp_a0 = PLAYER.posY.i.hi + PLAYER.hitboxOffY;
self->posY.i.hi = temp_a0 - 6;
@ -195,7 +195,7 @@ s32 func_ptr_80170010(Entity* self) {
self->animSet = 2;
self->anim = D_74000_8017A5B0;
self->zPriority = PLAYER.zPriority - 4;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->velocityY = FIX(-1.0);
if (!(D_74000_8017BD74 & 1)) {
@ -246,7 +246,7 @@ static s32 func_ptr_80170014(Entity* self) {
self->animCurFrame = 17;
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->velocityY = FIX(-2.25) - (rand() & 0x7FFF); // -2.5 +- 0.25
SetSpeedX((rand() & 0x7FFF) + FIX(1.25)); // 1.5 +- 0.25
self->posY.i.hi = PLAYER.posY.i.hi + PLAYER.hitboxOffY;

View File

@ -55,7 +55,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->facingLeft = 0;
self->flags = FLAG_UNK_04000000 | FLAG_UNK_100000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority - 4;
self->anim = D_82000_8017A6A8;
SetWeaponProperties(self, 1);
@ -148,7 +148,7 @@ s32 func_ptr_80170004(Entity* self) {
self->unk5A = self->ext.weapon.parent->unk5A;
self->facingLeft = 0;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY;

View File

@ -55,7 +55,8 @@ void EntityWeaponAttack(Entity* self) {
self->ext.weapon.unk7E = 0x7F;
self->facingLeft = 0;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_40000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority + 4;
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY | FLAG_DRAW_ROTZ;
self->rotX = self->rotY = 0x100;
@ -88,7 +89,7 @@ void EntityWeaponAttack(Entity* self) {
}
if (self->animFrameIdx == 5) {
self->unk6C = 0x80;
self->flags &= ~FLAG_UNK_40000;
self->flags &= ~FLAG_POS_PLAYER_LOCKED;
self->drawFlags |= FLAG_DRAW_UNK8;
self->step++;
}

View File

@ -78,7 +78,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_100000;
self->anim = D_90000_8017A850;
SetSpeedX((rand() & 0x3FFF) + 0xE000);
self->velocityY = FIX(-4.0);
@ -182,7 +182,7 @@ static void EntityWeaponAttack(Entity* self) {
self->posX.i.hi = 0x80;
self->zPriority = 0x1BA;
self->animCurFrame = 0x1D;
self->flags &= ~(FLAG_UNK_08000000 | FLAG_UNK_100000);
self->flags &= ~(FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000);
self->ext.karmacoin.timer = 0xE0;
self->unk6C = 0x80;
g_api.func_80118C28(8);
@ -438,7 +438,7 @@ static void func_ptr_80170008(Entity* self) {
if (self->step == 0) {
self->animSet = self->ext.weapon.parent->animSet;
self->unk5A = self->ext.weapon.parent->unk5A;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority;
if (D_90000_8017C238 % 4 == 1) {

View File

@ -247,7 +247,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = ((self->params >> 8) & 0x7F) + 1;
self->posY.i.hi -= 4;
SetSpeedX((rand() & 0x3FFF) + FIX(0.875)); // 1 +- 0.125
@ -447,7 +447,7 @@ s32 func_ptr_80170004(Entity* self) {
}
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = upperParams - 0x1C;
self->posY.i.hi -= 4;
SetSpeedX((rand() & 0x3FFF) + FIX(0.875));

View File

@ -35,7 +35,7 @@ void EntityWeaponAttack(Entity* self) {
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_100000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_100000 | FLAG_POS_PLAYER_LOCKED;
self->anim = D_9E000_8017A77C;
deltaX = (self->facingLeft) ? 32 : -32;
@ -82,7 +82,7 @@ s32 func_ptr_80170004(Entity* self) {
self->zPriority = PLAYER.zPriority + 2;
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
SetSpeedX(FIX(5));
self->ext.weapon.equipId = self->ext.weapon.parent->ext.weapon.equipId;
SetWeaponProperties(self, 0);

View File

@ -54,7 +54,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -84,7 +84,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -220,7 +220,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -488,7 +489,7 @@ static void func_ptr_80170024(Entity* self) {
DestroyEntity(self);
return;
}
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->ext.heraldSwirl.unk82 = 0;
self->ext.timer.t = 0;
self->ext.heraldSwirl.unk7E = 0;
@ -597,7 +598,7 @@ static void func_ptr_80170028(Entity* self) {
self->palette = self->ext.weapon.parent->palette;
self->unk5A = self->ext.weapon.parent->unk5A;
self->anim = D_A5000_8017AB58;
self->flags |= (FLAG_UNK_04000000 | FLAG_UNK_100000);
self->flags |= (FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_100000);
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY;
self->rotX = self->rotY = 0;

View File

@ -49,7 +49,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -67,7 +67,7 @@ static void EntityWeaponAttack(Entity* self) {
self->ext.darkShield.pal = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
self->ext.darkShield.palettePtr = D_AC000_8017ACF8[rand() & 3];
@ -229,7 +229,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -549,7 +550,7 @@ static void func_ptr_80170024(Entity* self) {
self->ext.shield.unk7D = self->ext.shield.parent->ext.shield.unk7D;
self->ext.shield.childPalette =
self->ext.shield.parent->ext.shield.childPalette + 1;
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->ext.shield.unk9A = rand() & 0xF;
self->ext.shield.unk94 = self->posX.i.hi = (rand() % 248) + 4;
self->posY.i.hi = (rand() & 0x3F) + 0xD8;

View File

@ -57,7 +57,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -75,7 +75,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -211,7 +211,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -508,7 +509,7 @@ static void func_ptr_80170024(Entity* self) {
(self->ext.shield.parent->posX.i.hi + (rand() % 160)) - 80;
self->posY.i.hi =
(self->ext.shield.parent->posY.i.hi + (rand() % 192)) - 64;
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->facingLeft = PLAYER.facingLeft;
self->rotX = self->rotY = 0;
self->rotZ = 0;

View File

@ -53,7 +53,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -71,7 +71,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -235,7 +235,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -545,7 +546,7 @@ static void func_ptr_80170024(Entity* self) {
DestroyEntity(self);
return;
}
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
for (prim = &g_PrimBuf[self->primIndex]; prim != NULL;
prim = prim->next) {
prim->drawMode = DRAW_HIDE;
@ -558,7 +559,7 @@ static void func_ptr_80170024(Entity* self) {
DestroyEntity(self);
return;
}
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
self->ext.shamanshieldstar.unk9C = 0xA0;
self->ext.shamanshieldstar.unk9E = 0x60;
self->ext.shamanshieldstar.unk80 = rand() % 15;

View File

@ -69,7 +69,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.weapon.lifetime = 128;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -87,7 +87,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -211,7 +211,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7C = 0x80;
self->ext.shield.unk7D = 0;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
self->posY.i.hi -= 8;
self->zPriority = 0x1B6;
@ -364,7 +365,7 @@ static void func_ptr_80170024(Entity* self) {
self->ext.medshieldlaser.childPalette = 0x111;
self->ext.medshieldlaser.unk7D = 0;
}
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
if ((self->params & 0xFF) != 0) {
if (self->facingLeft) {
self->posX.i.hi -= 14;

View File

@ -46,7 +46,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.weapon.lifetime = 128;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -64,7 +64,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -232,7 +232,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7C = 0x80;
self->ext.shield.unk7D = 0;
}
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
self->posY.i.hi -= 8;
self->zPriority = PLAYER.zPriority - 2;
@ -535,7 +536,7 @@ static void func_ptr_80170024(Entity* self) {
self->ext.shield.unk7D = self->ext.shield.parent->ext.shield.unk7D;
self->ext.shield.childPalette =
self->ext.shield.parent->ext.shield.childPalette + 3;
self->flags |= FLAG_UNK_04000000 | FLAG_HAS_PRIMS;
self->flags |= FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS;
if (self->facingLeft) {
xShift = -24;
} else {

View File

@ -66,7 +66,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.weapon.lifetime = 128;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == 2) && (PLAYER.step_s != 2)) {
@ -84,7 +84,7 @@ static void EntityWeaponAttack(Entity* self) {
self->ext.weapon.unk80 = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 + FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED + FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);

View File

@ -43,7 +43,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE | DRAW_TPAGE2 | DRAW_UNK_40;
SetWeaponProperties(self, 0);
@ -88,7 +88,7 @@ void func_ptr_8017000C(Entity* self) {
self->palette += 0x18;
self->unk5A += 2;
}
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animSet = 0xA;
self->animCurFrame = 0x64;
self->zPriority = PLAYER.zPriority + 2;
@ -199,7 +199,7 @@ s32 func_ptr_80170010(Entity* self) {
switch (self->step) {
case 0:
self->animSet = 9;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY | FLAG_DRAW_ROTZ;
self->rotX = self->rotY = 0x20;
self->anim = D_D6000_8017A514;

View File

@ -36,7 +36,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
if (self->params & 0x7F00) {
self->zPriority = PLAYER.zPriority - 2;

View File

@ -42,7 +42,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A = 0x66;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
if (self->params & 0x7F00) {
self->zPriority = PLAYER.zPriority - 2;
} else {

View File

@ -36,7 +36,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
SetWeaponProperties(self, 0);
self->step++;

View File

@ -118,7 +118,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE;
SetWeaponProperties(self, 0);
@ -167,7 +167,8 @@ static s32 func_ptr_80170004(Entity* self) {
self->animCurFrame = 0x3A;
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
self->drawMode = DRAW_TPAGE;
SetSpeedX(FIX(4.5));
self->ext.sword.unk7E = 0x1C;

View File

@ -40,7 +40,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE;
SetWeaponProperties(self, 0);

View File

@ -39,7 +39,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE | DRAW_TPAGE2;
SetWeaponProperties(self, 0);

View File

@ -43,7 +43,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
SetWeaponProperties(self, 0);
self->step++;
@ -241,7 +241,7 @@ s32 func_ptr_80170004(Entity* self) {
DestroyEntity(self);
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
func_107000_8017B0AC(self, &basePoint, 0);
// FAKE but makes register allocation work
randy = basePoint.x;
@ -347,7 +347,7 @@ static void func_ptr_80170008(Entity* self) {
self->anim = D_107000_8017A798;
self->animSet = 3;
self->zPriority = PLAYER.zPriority + 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
SetSpeedX(rand() + FIX(0.25));
self->velocityY = -(rand() + FIX(1));
self->step++;

View File

@ -41,7 +41,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
SetWeaponProperties(self, 0);
@ -116,7 +116,7 @@ s32 func_ptr_80170004(Entity* self) {
prim = prim->next;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->ext.weapon.equipId = self->ext.weapon.parent->ext.weapon.equipId;
SetWeaponProperties(self, 0);
self->enemyId = self->ext.weapon.parent->enemyId;

View File

@ -41,7 +41,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
SetWeaponProperties(self, 0);
@ -126,7 +126,7 @@ s32 func_ptr_80170004(Entity* self) {
prim = prim->next;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->ext.weapon.equipId = self->ext.weapon.parent->ext.weapon.equipId;
SetWeaponProperties(self, 0);
self->enemyId = self->ext.weapon.parent->enemyId;

View File

@ -55,7 +55,7 @@ static void EntityWeaponAttack(Entity* self) {
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->anim = D_11C000_8017A804;
self->posY.i.hi -= 4;
@ -124,7 +124,7 @@ s32 func_ptr_80170004(Entity* self) {
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->facingLeft = (self->facingLeft + 1) & 1;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->zPriority = self->ext.weapon.parent->zPriority - 2;
self->anim = D_11C000_8017A724;
self->drawFlags |= 3;
@ -196,7 +196,7 @@ static void func_ptr_80170008(Entity* self) {
self->animSet = self->ext.weapon.parent->animSet;
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->zPriority = self->ext.weapon.parent->zPriority - 2;
self->anim = D_11C000_8017A724;
self->posY.i.hi -= 0xA;
@ -227,7 +227,7 @@ static void func_ptr_8017000C(Entity* self) {
self->animSet = self->ext.weapon.parent->animSet;
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = self->ext.weapon.parent->zPriority + 2;
self->anim = D_11C000_8017A7DC;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;

View File

@ -261,7 +261,7 @@ void EntityWeaponAttack(Entity* self) {
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->anim = D_123000_8017A504;
self->posY.i.hi -= 4;
@ -325,7 +325,7 @@ s32 func_ptr_80170004(Entity* self) {
self->palette = self->ext.weapon.parent->palette;
self->facingLeft++;
self->facingLeft &= 1;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->zPriority = self->ext.weapon.parent->zPriority - 2;
self->anim = D_123000_8017A4A4;

View File

@ -83,7 +83,7 @@ static void EntityWeaponAttack(Entity* self) {
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = PLAYER.facingLeft;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->anim = D_12A000_8017A6B4;
self->posY.i.hi -= 4;
@ -154,7 +154,7 @@ s32 func_ptr_80170004(Entity* self) {
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->facingLeft = (self->facingLeft + 1) & 1;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->zPriority = self->ext.weapon.parent->zPriority - 2;
self->anim = D_12A000_8017A604;
self->drawFlags |= 3;
@ -231,7 +231,7 @@ static void func_ptr_80170008(Entity* self) {
self->animSet = self->ext.weapon.parent->animSet;
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->drawFlags = FLAG_DRAW_ROTZ;
self->zPriority = self->ext.weapon.parent->zPriority - 2;
self->posY.i.hi -= 0x10;
@ -283,7 +283,7 @@ static void func_ptr_8017000C(Entity* self) {
self->animSet = self->ext.weapon.parent->animSet;
self->unk5A = self->ext.weapon.parent->unk5A;
self->palette = self->ext.weapon.parent->palette;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = self->ext.weapon.parent->zPriority + 2;
self->anim = D_12A000_8017A684;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;

View File

@ -66,9 +66,10 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
if (self->primIndex != -1) {
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags =
FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
}
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
@ -155,7 +156,7 @@ s32 func_ptr_80170004(Entity* self) {
self->animCurFrame = PLAYER.animCurFrame + ANIM_FRAME_LOAD;
self->animSet = ANIMSET_DRA(1);
self->drawMode = DRAW_TPAGE;
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
self->unk5A = 0;
SetSpeedX(FIX(13.0));
self->velocityY = FIX(-1.0 / 8.0);
@ -217,8 +218,8 @@ static void func_ptr_80170008(Entity* self) {
self->palette += 0x18;
self->unk5A += 2;
}
self->flags = FLAG_UNK_04000000 | FLAG_UNK_100000 | FLAG_UNK_40000 |
FLAG_UNK_20000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_100000 |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
self->ext.weapon.equipId = self->ext.weapon.parent->ext.weapon.equipId;

View File

@ -361,7 +361,7 @@ static s32 func_ptr_80170004(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < PrimCount; i++) {
prim->drawMode = DRAW_UNK_200 | DRAW_UNK_100 | DRAW_TPAGE2 |

View File

@ -52,7 +52,7 @@ void EntityWeaponAttack(Entity* self) {
}
self->facingLeft = PLAYER.facingLeft;
self->zPriority = PLAYER.zPriority - 6;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
if (rand() & 7) {
self->primIndex = g_api.AllocPrimitives(PRIM_TILE, 0x20);
if (self->primIndex != -1) {
@ -309,7 +309,7 @@ s32 func_ptr_80170004(Entity* self) {
self->animSet += 2;
}
self->anim = D_14D000_8017A528;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->zPriority = PLAYER.zPriority + 2;
speed = (rand() % 1535) + 0x100;
self->velocityX = rcos((s32)speed) << 7;

View File

@ -42,7 +42,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
@ -155,7 +155,7 @@ void func_ptr_80170008(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++) {

View File

@ -45,7 +45,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
@ -146,7 +146,7 @@ s32 func_ptr_80170004(Entity* self) {
self->anim = D_15B000_8017B074;
self->zPriority = PLAYER.zPriority + 2;
self->facingLeft = 1;
self->flags = FLAG_UNK_100000 | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_UNK_100000 | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->drawFlags = FLAG_DRAW_ROTZ;
self->ext.weapon.unk80 = params * 512;
self->rotZ = self->ext.weapon.unk80 - FIX(1.0 / 64);
@ -233,7 +233,7 @@ void func_ptr_80170008(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 16; i++) {
@ -366,7 +366,7 @@ void func_ptr_8017000C(Entity* self) {
self->rotY = 0x80;
self->rotX = self->rotY = (rand() & 0x3F) | 0x80;
self->zPriority = PLAYER.zPriority + (rand() & 1) * 4;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
if (rand() % 3) {
self->drawMode = DRAW_UNK_40 | DRAW_TPAGE2 | DRAW_TPAGE;
@ -426,7 +426,7 @@ s32 func_ptr_80170010(Entity* self) {
switch (self->step) {
case 0:
self->facingLeft = 1;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->ext.weapon.unk80 = params * 512;
self->ext.weapon.equipId = self->ext.weapon.parent->ext.weapon.equipId;
SetWeaponProperties(self, 0);
@ -446,7 +446,7 @@ s32 func_ptr_80170010(Entity* self) {
break;
case 2:
self->ext.weapon.unk7E += 4;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
if (self->ext.weapon.unk7E >= 0x70) {
DestroyEntity(self);
return;
@ -478,7 +478,7 @@ static s32 func_ptr_80170014(Entity* self) {
}
self->anim = D_15B000_8017B10C;
self->zPriority = PLAYER.zPriority + 2;
self->flags = FLAG_UNK_08000000 | FLAG_UNK_100000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_UNK_100000;
self->drawFlags = FLAG_DRAW_ROTX | FLAG_DRAW_ROTY;
self->rotX = self->rotY = 0x100;
self->drawMode = DRAW_TPAGE | 0x20;

View File

@ -43,7 +43,7 @@ void EntityWeaponAttack(Entity* self) {
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
@ -219,7 +219,7 @@ s32 func_ptr_80170004(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 80; i++) {
prim->clut = 0x1B0;
@ -318,7 +318,7 @@ void func_ptr_80170008(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < PrimCount; i++) {
angle = i << 8;
@ -415,7 +415,7 @@ void func_ptr_8017000C(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
posX = self->posX.i.hi;
posY = self->posY.i.hi;
offsetX = point.x;
@ -511,7 +511,7 @@ s32 func_ptr_80170010(Entity* self) {
return;
}
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
if (params == 1) {
func_162000_8017BA38(self, &point, true);
} else {

View File

@ -322,7 +322,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
if (subType == 1) {
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
@ -404,7 +404,7 @@ s32 func_ptr_80170004(Entity* self) {
_a = 0;
}
D_169000_8017C0E0 = 0;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
SetWeaponProperties(self, 0);
self->step++;
break;
@ -481,7 +481,7 @@ static void func_ptr_80170008(Entity* self) {
if (color == 3) {
prim->drawMode &= ~(FLAG_DRAW_UNK20 | FLAG_DRAW_UNK40);
}
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags = FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_20000;
if (temp_s6 == 0) {
self->ext.weapon.equipId =
self->ext.weapon.parent->ext.weapon.equipId;

View File

@ -206,7 +206,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == 2) && (PLAYER.step_s != PLAYER.step)) {
@ -234,7 +234,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -396,7 +396,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
self->ext.shield.unk7D = 0;
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;
@ -727,7 +728,8 @@ s32 func_ptr_80170004(Entity* self) {
uvPtr = &D_170000_8017ABC4;
playerX = PLAYER.posX.i.hi;
playerY = PLAYER.posY.i.hi - 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
prim = &g_PrimBuf[self->primIndex];
for (i = 0; i < 11; i++) {
prim->u0 = prim->u2 = *uvPtr++;

View File

@ -39,7 +39,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
@ -158,7 +158,8 @@ s32 func_ptr_80170004(Entity* self) {
prim->priority = PLAYER.zPriority + 2;
prim->drawMode = DRAW_UNK_100 | DRAW_TPAGE2 | DRAW_TPAGE |
DRAW_COLORS | DRAW_UNK02 | DRAW_TRANSP;
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_20000;
if ((params == 0) || (params == 0xA) || (params == 0x14) ||
(params == 0x1E) || (params > 0x27 && params <= 0x31)) {
@ -274,7 +275,7 @@ static void func_ptr_80170008(Entity* self) {
self->animSet = 1;
self->drawMode = DRAW_TPAGE;
self->unk5A = 0;
self->flags = FLAG_UNK_04000000 | FLAG_UNK_20000;
self->flags = FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_UNK_20000;
SetSpeedX(FIX(8));
self->velocityY = FIX(-0.5);
@ -384,7 +385,8 @@ void func_ptr_8017000C(Entity* self) {
prim->drawMode = DRAW_UNK_100 | DRAW_TPAGE2 | DRAW_TPAGE |
DRAW_COLORS | DRAW_UNK02 | DRAW_TRANSP;
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_20000;
if (params == 0) {
SetWeaponProperties(self, 0);

View File

@ -57,7 +57,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
primIndex = g_api.AllocPrimitives(PRIM_LINE_G2, 0xC);

View File

@ -40,7 +40,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;
if (animIndex == 1) {
@ -127,8 +127,8 @@ s32 func_ptr_80170004(Entity* self) {
self->palette += 24;
self->unk5A += 2;
}
self->flags =
FLAG_HAS_PRIMS | FLAG_UNK_100000 | FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_HAS_PRIMS | FLAG_UNK_100000 |
FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->anim = D_185000_8017B174;
self->zPriority = PLAYER.zPriority + 4;
self->drawMode = DRAW_TPAGE2 | DRAW_TPAGE;

View File

@ -58,7 +58,7 @@ void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
primIndex = g_api.AllocPrimitives(PRIM_LINE_G2, 0xC);
@ -251,7 +251,8 @@ s32 func_ptr_80170004(Entity* self) {
prim->priority = PLAYER.zPriority + 2;
prim->drawMode = DRAW_UNK_100 | DRAW_TPAGE2 | DRAW_TPAGE |
DRAW_COLORS | DRAW_UNK02 | DRAW_TRANSP;
self->flags = FLAG_UNK_08000000 | FLAG_HAS_PRIMS | FLAG_UNK_20000;
self->flags =
FLAG_POS_CAMERA_LOCKED | FLAG_HAS_PRIMS | FLAG_UNK_20000;
if ((params == 0) || (params == 0xA) || (params == 0x14) ||
(params == 0x1E) || (params > 0x27 && params <= 0x31)) {

View File

@ -40,7 +40,7 @@ static void EntityWeaponAttack(Entity* self) {
self->unk5A += 2;
}
self->palette += anim->palette;
self->flags = FLAG_UNK_20000 | FLAG_UNK_40000;
self->flags = FLAG_UNK_20000 | FLAG_POS_PLAYER_LOCKED;
self->zPriority = PLAYER.zPriority - 2;
self->drawMode = DRAW_TPAGE | DRAW_TPAGE2;
SetWeaponProperties(self, 0);

View File

@ -48,7 +48,7 @@ static void EntityWeaponAttack(Entity* self) {
}
self->velocityY = FIX(-3.5);
self->ext.timer.t = 0x80;
self->flags = FLAG_UNK_08000000;
self->flags = FLAG_POS_CAMERA_LOCKED;
self->animCurFrame = 0x3E;
}
if ((PLAYER.step == Player_Crouch) && (PLAYER.step_s != 2)) {
@ -66,7 +66,7 @@ static void EntityWeaponAttack(Entity* self) {
self->palette = 0x110;
self->unk5A = 0x64;
}
self->flags = FLAG_UNK_40000 | FLAG_UNK_20000;
self->flags = FLAG_POS_PLAYER_LOCKED | FLAG_UNK_20000;
self->zPriority = PLAYER.zPriority - 2;
g_Player.unk48 = 1;
SetWeaponProperties(self, 0);
@ -208,7 +208,8 @@ static void EntityWeaponShieldSpell(Entity* self) {
}
self->posY.i.hi -= 8;
self->flags = FLAG_UNK_04000000 | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->flags =
FLAG_KEEP_ALIVE_OFFCAMERA | FLAG_HAS_PRIMS | FLAG_UNK_10000;
self->zPriority = PLAYER.zPriority - 2;
self->facingLeft = PLAYER.facingLeft;
self->animCurFrame = 0x3E;