Added more NPCs

Now with Muscle Doctor
This commit is contained in:
Clownacy 2019-02-08 21:30:08 +00:00
parent 88947cd016
commit 26bcbdbef7
4 changed files with 1411 additions and 16 deletions

View file

@ -258,11 +258,21 @@ void ActNpc252(NPCHAR *npc);
void ActNpc253(NPCHAR *npc);
void ActNpc254(NPCHAR *npc);
void ActNpc255(NPCHAR *npc);
void ActNpc256(NPCHAR *npc);
void ActNpc257(NPCHAR *npc);
void ActNpc258(NPCHAR *npc);
void ActNpc259(NPCHAR *npc);
void ActNpc260(NPCHAR *npc);
void ActNpc261(NPCHAR *npc);
void ActNpc262(NPCHAR *npc);
void ActNpc263(NPCHAR *npc);
void ActNpc264(NPCHAR *npc);
void ActNpc265(NPCHAR *npc);
void ActNpc266(NPCHAR *npc);
void ActNpc267(NPCHAR *npc);
void ActNpc268(NPCHAR *npc);
void ActNpc269(NPCHAR *npc);
void ActNpc270(NPCHAR *npc);
void ActNpc271(NPCHAR *npc);
void ActNpc272(NPCHAR *npc);
void ActNpc273(NPCHAR *npc);

View file

@ -1193,6 +1193,167 @@ void ActNpc255(NPCHAR *npc)
npc->rect = rcRight[npc->ani_no];
}
//Doctor (facing away)
void ActNpc256(NPCHAR *npc)
{
RECT rcLeft[6];
rcLeft[0] = {48, 160, 72, 192};
rcLeft[1] = {72, 160, 96, 192};
rcLeft[2] = {0, 128, 24, 160};
rcLeft[3] = {24, 128, 48, 160};
rcLeft[4] = {0, 160, 24, 192};
rcLeft[5] = {24, 160, 48, 192};
switch ( npc->act_no )
{
case 0:
gSuperXpos = 0;
npc->act_no = 1;
npc->y -= 0x1000;
// Fallthrough
case 1:
npc->ani_no = 0;
break;
case 10:
npc->act_no = 11;
npc->ani_wait = 0;
npc->ani_no = 0;
npc->count1 = 0;
// Fallthrough
case 11:
if (++npc->ani_wait > 5)
{
npc->ani_wait = 0;
++npc->ani_no;
}
if (npc->ani_no > 1)
{
npc->ani_no = 0;
++npc->count1;
}
if (npc->count1 > 5)
npc->act_no = 1;
break;
case 20:
npc->act_no = 21;
// Fallthrough
case 21:
npc->ani_no = 2;
break;
case 40:
npc->act_no = 41;
SetNpChar(257, npc->x - 0x1C00, npc->y - 0x2000, 0, 0, 0, 0, 0x100);
SetNpChar(257, npc->x - 0x1C00, npc->y - 0x2000, 0, 0, 2, 0, 0xAA);
// Fallthrough
case 41:
npc->ani_no = 4;
break;
case 50:
npc->act_no = 51;
npc->ani_wait = 0;
npc->ani_no = 4;
npc->count1 = 0;
// Fallthrough
case 51:
if (++npc->ani_wait > 5)
{
npc->ani_wait = 0;
++npc->ani_no;
}
if (npc->ani_no > 5)
{
npc->ani_no = 4;
++npc->count1;
}
if (npc->count1 > 5)
npc->act_no = 41;
break;
}
npc->rect = rcLeft[npc->ani_no];
}
//Red crystal
void ActNpc257(NPCHAR *npc)
{
RECT rc[3];
rc[0] = {176, 32, 184, 48};
rc[1] = {184, 32, 192, 48};
rc[2] = {0, 0, 0, 0};
switch (npc->act_no)
{
case 0:
npc->act_no = 1;
// Fallthrough
case 1:
if (gSuperXpos)
npc->act_no = 10;
break;
case 10:
if (npc->x < gSuperXpos)
npc->xm += 0x55;
if (npc->x > gSuperXpos)
npc->xm -= 0x55;
if (npc->y < gSuperYpos)
npc->ym += 0x55;
if (npc->y > gSuperYpos)
npc->ym -= 0x55;
if (npc->xm > 0x400)
npc->xm = 0x400;
if (npc->xm < -0x400)
npc->xm = -0x400;
if (npc->ym > 0x400)
npc->ym = 0x400;
if (npc->ym < -0x400)
npc->ym = -0x400;
npc->x += npc->xm;
npc->y += npc->ym;
break;
}
if (++npc->ani_wait > 3)
{
npc->ani_wait = 0;
++npc->ani_no;
}
if (npc->ani_no > 1)
npc->ani_no = 0;
if (npc->direct == 0 && npc->xm > 0)
npc->ani_no = 2;
if (npc->direct == 2 && npc->xm < 0)
npc->ani_no = 2;
npc->rect = rc[npc->ani_no];
}
//Mimiga (sleeping)
void ActNpc258(NPCHAR *npc)
{
RECT rc = {48, 32, 64, 48};
npc->rect = rc;
}
//Curly (carried and unconcious)
void ActNpc259(NPCHAR *npc)
{

File diff suppressed because it is too large Load diff

View file

@ -312,21 +312,21 @@ NPCFUNCTION gpNpcFuncTbl[361] =
ActNpc253,
ActNpc254,
ActNpc255,
nullptr,
nullptr,
nullptr,
ActNpc256,
ActNpc257,
ActNpc258,
ActNpc259,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
ActNpc260,
ActNpc261,
ActNpc262,
ActNpc263,
ActNpc264,
ActNpc265,
ActNpc266,
ActNpc267,
ActNpc268,
nullptr,
nullptr,
ActNpc269,
ActNpc270,
ActNpc271,
ActNpc272,
ActNpc273,