mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-10-07 10:33:37 +00:00
Delete tools/update.h
It was probably created by accident
This commit is contained in:
parent
0e805bafc6
commit
6cebe27c78
@ -1,84 +0,0 @@
|
|||||||
|
|
||||||
void Update(void) {
|
|
||||||
s16 i;
|
|
||||||
Entity* entity;
|
|
||||||
s32* unk;
|
|
||||||
|
|
||||||
for (i = 0; i < 0x20; i++) {
|
|
||||||
if (g_ItemIconSlots[i]) {
|
|
||||||
g_ItemIconSlots[i]--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unk = &g_unkGraphicsStruct.BottomCornerTextTimer;
|
|
||||||
if (*unk) {
|
|
||||||
if (!--*unk) {
|
|
||||||
g_api.FreePrimitives(g_unkGraphicsStruct.BottomCornerTextPrims);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (entity = &g_Entities[STAGE_ENTITY_START];
|
|
||||||
entity < &g_Entities[TOTAL_ENTITY_COUNT]; entity++) {
|
|
||||||
if (!entity->pfnUpdate)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (entity->step) {
|
|
||||||
s32 unk34 = entity->flags;
|
|
||||||
if (unk34 & FLAG_DESTROY_IF_OUT_OF_CAMERA) {
|
|
||||||
s16 posX = i = entity->posX.i.hi;
|
|
||||||
s16 posY = entity->posY.i.hi;
|
|
||||||
if (unk34 & FLAG_DESTROY_IF_BARELY_OUT_OF_CAMERA) {
|
|
||||||
if ((u16)(posX + 64) > 384 || (u16)(posY + 64) > 352) {
|
|
||||||
DestroyEntity(entity);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ((u16)(posX + 128) > 512 || (u16)(posY + 128) > 480) {
|
|
||||||
DestroyEntity(entity);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((unk34 & 0x02000000)) {
|
|
||||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
|
||||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
|
||||||
if (posY > test) {
|
|
||||||
DestroyEntity(entity);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unk34 & 0xF) {
|
|
||||||
entity->palette =
|
|
||||||
UNK_Invincibility0[(entity->nFramesInvincibility << 1) |
|
|
||||||
(unk34 & 1)];
|
|
||||||
entity->flags--;
|
|
||||||
if ((entity->flags & 0xF) == 0) {
|
|
||||||
entity->palette = entity->hitEffect;
|
|
||||||
entity->hitEffect = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(unk34 & 0x20000000) || (unk34 & 0x10000000) ||
|
|
||||||
((u16)(entity->posX.i.hi + 64) <= 384) &&
|
|
||||||
((u16)(entity->posY.i.hi + 64) <= 352)) {
|
|
||||||
if (!entity->stunFrames ||
|
|
||||||
(entity->stunFrames--, unk34 & 0x100000)) {
|
|
||||||
if (!g_unkGraphicsStruct.D_800973FC || unk34 & 0x2100 ||
|
|
||||||
(unk34 & 0x200 && !(g_GameTimer & 3))) {
|
|
||||||
g_CurrentEntity = entity;
|
|
||||||
entity->pfnUpdate(entity);
|
|
||||||
entity->unk44 = 0;
|
|
||||||
entity->hitFlags = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
g_CurrentEntity = entity;
|
|
||||||
entity->pfnUpdate(entity);
|
|
||||||
entity->unk44 = 0;
|
|
||||||
entity->hitFlags = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user