ref: 1321ba522d7dfaa5479d69bc142427d6332e776a
parent: 4a8877713e6851c8170865c652b36965a0153a7c
parent: ffa4b16376bf1f2f0c0c5479337b46c093ece6ca
author: Clownacy <Clownacy@users.noreply.github.com>
date: Mon Jul 6 09:46:09 EDT 2020
Merge branch 'accurate' into portable
--- a/src/BossLife.cpp
+++ b/src/BossLife.cpp
@@ -17,10 +17,10 @@
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;
--- a/src/NpcAct040.cpp
+++ b/src/NpcAct040.cpp
@@ -274,11 +274,11 @@
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;
--- a/src/NpcAct060.cpp
+++ b/src/NpcAct060.cpp
@@ -831,11 +831,11 @@
{
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;
--- a/src/NpcAct300.cpp
+++ b/src/NpcAct300.cpp
@@ -145,7 +145,7 @@
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 @@
}
}
- if (n == 0x200)
+ if (n == NPC_MAX)
{
npc->cond = 0;
break;