Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2020-07-06 13:46:09 +01:00
commit 1321ba522d
4 changed files with 8 additions and 8 deletions

View file

@ -17,10 +17,10 @@ void InitBossLife(void)
BOOL StartBossLife(int code_event)
{
int i = 0;
while (i < 0x200 && gNPC[i].code_event != code_event)
while (i < NPC_MAX && gNPC[i].code_event != code_event)
++i;
if (i == 0x200)
if (i == NPC_MAX)
return FALSE;
gBL.flag = TRUE;

View file

@ -274,11 +274,11 @@ void ActNpc042(NPCHAR *npc)
npc->ym = 0;
npc->act_no = 14;
for (n = 0; n < 0x200; ++n)
for (n = 0; n < NPC_MAX; ++n)
if (gNPC[n].code_event == 501)
break;
if (n == 0x200)
if (n == NPC_MAX)
{
npc->act_no = 0;
break;

View file

@ -831,11 +831,11 @@ void ActNpc066(NPCHAR *npc)
{
case 0:
int a;
for (a = 0; a < 0x200; ++a)
for (a = 0; a < NPC_MAX; ++a)
if (gNPC[a].code_event == 1000)
break;
if (a == 0x200)
if (a == NPC_MAX)
break;
npc->tgt_x = gNPC[a].x;

View file

@ -145,7 +145,7 @@ void ActNpc302(NPCHAR *npc)
if (npc->direct != 0)
{
for (n = 0xAA; n < 0x200; ++n)
for (n = 0xAA; n < NPC_MAX; ++n)
{
if (gNPC[n].cond & 0x80 && gNPC[n].code_event == npc->direct)
{
@ -154,7 +154,7 @@ void ActNpc302(NPCHAR *npc)
}
}
if (n == 0x200)
if (n == NPC_MAX)
{
npc->cond = 0;
break;