Got NpcAct000.cpp to compile in MSVC2003 and made NPCs 0/1 ASM-accurate

This commit is contained in:
Clownacy 2019-02-19 04:33:50 +00:00
parent 8e76e38591
commit 754bed870c

View file

@ -15,18 +15,14 @@
//Null //Null
void ActNpc000(NPCHAR *npc) void ActNpc000(NPCHAR *npc)
{ {
RECT rect[1]; RECT rect[1] = {0x00, 0x00, 0x10, 0x10};
rect[0] = {0x00, 0x00, 0x10, 0x10};
switch (npc->act_no) if (npc->act_no == 0)
{ {
case 0: npc->act_no = 1;
npc->act_no = 1;
if (npc->direct == 2) if (npc->direct == 2)
npc->y += 0x2000; npc->y += 0x2000;
break;
} }
npc->rect = rect[0]; npc->rect = rect[0];
@ -35,10 +31,48 @@ void ActNpc000(NPCHAR *npc)
//Experience //Experience
void ActNpc001(NPCHAR *npc) void ActNpc001(NPCHAR *npc)
{ {
//When not in wind //In wind
if (gBack.type != 5 && gBack.type != 6) if (gBack.type == 5 || gBack.type == 6)
{ {
if (!npc->act_no) if (npc->act_no == 0)
{
//Set state
npc->act_no = 1;
//Set random speed
npc->ym = Random(-0x80, 0x80);
npc->xm = Random(0x7F, 0x100);
}
//Blow to the left
npc->xm -= 8;
//Destroy when off-screen
if (npc->x < 0xA000)
npc->cond = 0;
#ifdef FIX_BUGS
//Limit speed
if (npc->xm < -0x600)
npc->xm = -0x600;
#else
//Limit speed (except pixel applied it to the X position)
if (npc->x < -0x600)
npc->x = -0x600;
#endif
//Bounce off walls
if (npc->flag & 1)
npc->xm = 0x100;
if (npc->flag & 2)
npc->ym = 0x40;
if (npc->flag & 8)
npc->ym = -0x40;
}
//When not in wind
else
{
if (npc->act_no == 0)
{ {
//Set state //Set state
npc->act_no = 1; npc->act_no = 1;
@ -63,13 +97,13 @@ void ActNpc001(NPCHAR *npc)
//Bounce off walls //Bounce off walls
if (npc->flag & 1 && npc->xm < 0) if (npc->flag & 1 && npc->xm < 0)
npc->xm = -npc->xm; npc->xm *= -1;
if (npc->flag & 4 && npc->xm > 0) if (npc->flag & 4 && npc->xm > 0)
npc->xm = -npc->xm; npc->xm *= -1;
//Bounce off ceiling //Bounce off ceiling
if (npc->flag & 2 && npc->ym < 0) if (npc->flag & 2 && npc->ym < 0)
npc->ym = -npc->ym; npc->ym *= -1;
//Bounce off floor //Bounce off floor
if (npc->flag & 8) if (npc->flag & 8)
@ -84,7 +118,7 @@ void ActNpc001(NPCHAR *npc)
{ {
PlaySoundObject(45, 1); PlaySoundObject(45, 1);
if (++npc->count2 > 2) if (++npc->count2 > 2)
npc->y -= 512; npc->y -= 0x200;
} }
else else
{ {
@ -101,64 +135,36 @@ void ActNpc001(NPCHAR *npc)
if (npc->ym > 0x5FF) if (npc->ym > 0x5FF)
npc->ym = 0x5FF; npc->ym = 0x5FF;
} }
//In wind
else
{
if (!npc->act_no)
{
//Set state
npc->act_no = 1;
//Set random speed
npc->ym = Random(-0x80, 0x80);
npc->xm = Random(0x7F, 0x100);
}
//Blow to the left
npc->xm -= 8;
//Destroy when off-screen
if (npc->x <= 0x9FFF)
npc->cond = 0;
#ifdef FIX_BUGS
//Limit speed
if (npc->xm < -0x5FF)
npc->xm = -0x5FF;
#else
//Limit speed (except pixel applied it to the X position)
if (npc->x < -0x5FF)
npc->x = -0x5FF;
#endif
//Bounce off walls
if (npc->flag & 1)
npc->xm = 0x100;
if (npc->flag & 2)
npc->ym = 0x40;
if (npc->flag & 8)
npc->ym = -0x40;
}
//Move //Move
npc->x += npc->xm; npc->x += npc->xm;
npc->y += npc->ym; npc->y += npc->ym;
//Get framerects //Get framerects
RECT rect[6]; RECT rect[6] = {
rect[0] = {0x00, 0x10, 0x10, 0x20}; {0x00, 0x10, 0x10, 0x20},
rect[1] = {0x10, 0x10, 0x20, 0x20}; {0x10, 0x10, 0x20, 0x20},
rect[2] = {0x20, 0x10, 0x30, 0x20}; {0x20, 0x10, 0x30, 0x20},
rect[3] = {0x30, 0x10, 0x40, 0x20}; {0x30, 0x10, 0x40, 0x20},
rect[4] = {0x40, 0x10, 0x50, 0x20}; {0x40, 0x10, 0x50, 0x20},
rect[5] = {0x50, 0x10, 0x60, 0x20}; {0x50, 0x10, 0x60, 0x20},
};
RECT rcNo = {0, 0, 0, 0}; RECT rcNo = {0, 0, 0, 0};
//Animate //Animate
++npc->ani_wait; ++npc->ani_wait;
if (npc->direct) if (npc->direct == 0)
{
if (npc->ani_wait > 2)
{
npc->ani_wait = 0;
if (++npc->ani_no > 5)
npc->ani_no = 0;
}
}
else
{ {
if (npc->ani_wait > 2) if (npc->ani_wait > 2)
{ {
@ -167,27 +173,23 @@ void ActNpc001(NPCHAR *npc)
npc->ani_no = 5; npc->ani_no = 5;
} }
} }
else if (npc->ani_wait > 2)
{
npc->ani_wait = 0;
if (++npc->ani_no > 5)
npc->ani_no = 0;
}
npc->rect = rect[npc->ani_no]; npc->rect = rect[npc->ani_no];
//Size //Size
if (npc->act_no) if (npc->act_no)
{ {
if (npc->exp == 5) switch (npc->exp)
{ {
npc->rect.top += 16; case 5:
npc->rect.bottom += 16; npc->rect.top += 16;
} npc->rect.bottom += 16;
else if (npc->exp == 20) break;
{
npc->rect.top += 32; case 20:
npc->rect.bottom += 32; npc->rect.top += 32;
npc->rect.bottom += 32;
break;
} }
npc->act_no = 1; npc->act_no = 1;
@ -200,7 +202,7 @@ void ActNpc001(NPCHAR *npc)
//Blink after 400 frames //Blink after 400 frames
if (npc->count1 > 400) if (npc->count1 > 400)
{ {
if (npc->count1 / 2 & 1) if (npc->count1 / 2 % 2)
npc->rect = rcNo; npc->rect = rcNo;
} }
} }
@ -209,23 +211,25 @@ void ActNpc001(NPCHAR *npc)
void ActNpc002(NPCHAR *npc) void ActNpc002(NPCHAR *npc)
{ {
//Rects //Rects
RECT rcLeft[7]; RECT rcLeft[7] = {
rcLeft[0] = {32, 0, 64, 24}; {32, 0, 64, 24},
rcLeft[1] = {0, 0, 32, 24}; {0, 0, 32, 24},
rcLeft[2] = {32, 0, 64, 24}; {32, 0, 64, 24},
rcLeft[3] = {64, 0, 96, 24}; {64, 0, 96, 24},
rcLeft[4] = {96, 0, 128, 24}; {96, 0, 128, 24},
rcLeft[5] = {128, 0, 160, 24}; {128, 0, 160, 24},
rcLeft[6] = {160, 0, 192, 24}; {160, 0, 192, 24},
};
RECT rcRight[7]; RECT rcRight[7] = {
rcRight[0] = {32, 24, 64, 48}; {32, 24, 64, 48},
rcRight[1] = {0, 24, 32, 48}; {0, 24, 32, 48},
rcRight[2] = {32, 24, 64, 48}; {32, 24, 64, 48},
rcRight[3] = {64, 24, 96, 48}; {64, 24, 96, 48},
rcRight[4] = {96, 24, 128, 48}; {96, 24, 128, 48},
rcRight[5] = {128, 24, 160, 48}; {128, 24, 160, 48},
rcRight[6] = {160, 24, 192, 48}; {160, 24, 192, 48},
};
//Turn when touching a wall //Turn when touching a wall
if (npc->flag & 1) if (npc->flag & 1)
@ -328,32 +332,34 @@ void ActNpc003(NPCHAR *npc)
if (++npc->count1 > 100) if (++npc->count1 > 100)
npc->cond = 0; npc->cond = 0;
npc->rect = {0, 0, 0, 0}; RECT rect = {0, 0, 0, 0};
npc->rect = rect;
} }
//Smoke //Smoke
void ActNpc004(NPCHAR *npc) void ActNpc004(NPCHAR *npc)
{ {
RECT rcLeft[8]; RECT rcLeft[8] = {
RECT rcUp[8]; {16, 0, 17, 1},
{16, 0, 32, 16},
{32, 0, 48, 16},
{48, 0, 64, 16},
{64, 0, 80, 16},
{80, 0, 96, 16},
{96, 0, 112, 16},
{112, 0, 128, 16},
};
rcLeft[0] = {16, 0, 17, 1}; RECT rcUp[8] = {
rcLeft[1] = {16, 0, 32, 16}; {16, 0, 17, 1},
rcLeft[2] = {32, 0, 48, 16}; {80, 48, 96, 64},
rcLeft[3] = {48, 0, 64, 16}; {0, 128, 16, 144},
rcLeft[4] = {64, 0, 80, 16}; {16, 128, 32, 144},
rcLeft[5] = {80, 0, 96, 16}; {32, 128, 48, 144},
rcLeft[6] = {96, 0, 112, 16}; {48, 128, 64, 144},
rcLeft[7] = {112, 0, 128, 16}; {64, 128, 80, 144},
{80, 128, 96, 144},
rcUp[0] = {16, 0, 17, 1}; };
rcUp[1] = {80, 48, 96, 64};
rcUp[2] = {0, 128, 16, 144};
rcUp[3] = {16, 128, 32, 144};
rcUp[4] = {32, 128, 48, 144};
rcUp[5] = {48, 128, 64, 144};
rcUp[6] = {64, 128, 80, 144};
rcUp[7] = {80, 128, 96, 144};
if (npc->act_no) if (npc->act_no)
{ {
@ -408,16 +414,17 @@ void ActNpc004(NPCHAR *npc)
//Critter (Green, Egg Corridor) //Critter (Green, Egg Corridor)
void ActNpc005(NPCHAR *npc) void ActNpc005(NPCHAR *npc)
{ {
RECT rcLeft[3]; RECT rcLeft[3] = {
RECT rcRight[3]; {0, 48, 16, 64},
{16, 48, 32, 64},
{32, 48, 48, 64},
};
rcLeft[0] = {0, 48, 16, 64}; RECT rcRight[3] = {
rcLeft[1] = {16, 48, 32, 64}; {0, 64, 16, 80},
rcLeft[2] = {32, 48, 48, 64}; {16, 64, 32, 80},
{32, 64, 48, 80},
rcRight[0] = {0, 64, 16, 80}; };
rcRight[1] = {16, 64, 32, 80};
rcRight[2] = {32, 64, 48, 80};
switch (npc->act_no) switch (npc->act_no)
{ {
@ -512,20 +519,21 @@ void ActNpc005(NPCHAR *npc)
//Beetle (Goes left and right, Egg Corridor) //Beetle (Goes left and right, Egg Corridor)
void ActNpc006(NPCHAR *npc) void ActNpc006(NPCHAR *npc)
{ {
RECT rcLeft[5]; RECT rcLeft[5] = {
RECT rcRight[5]; {0, 80, 16, 96},
{16, 80, 32, 96},
{32, 80, 48, 96},
{48, 80, 64, 96},
{64, 80, 80, 96},
};
rcLeft[0] = {0, 80, 16, 96}; RECT rcRight[5] = {
rcLeft[1] = {16, 80, 32, 96}; {0, 96, 16, 112},
rcLeft[2] = {32, 80, 48, 96}; {16, 96, 32, 112},
rcLeft[3] = {48, 80, 64, 96}; {32, 96, 48, 112},
rcLeft[4] = {64, 80, 80, 96}; {48, 96, 64, 112},
{64, 96, 80, 112},
rcRight[0] = {0, 96, 16, 112}; };
rcRight[1] = {16, 96, 32, 112};
rcRight[2] = {32, 96, 48, 112};
rcRight[3] = {48, 96, 64, 112};
rcRight[4] = {64, 96, 80, 112};
switch (npc->act_no) switch (npc->act_no)
{ {
@ -638,16 +646,17 @@ void ActNpc006(NPCHAR *npc)
//Basil //Basil
void ActNpc007(NPCHAR *npc) void ActNpc007(NPCHAR *npc)
{ {
RECT rcLeft[3]; RECT rcLeft[3] = {
RECT rcRight[3]; {256, 64, 288, 80},
{256, 80, 288, 96},
{256, 96, 288, 112},
};
rcLeft[0] = {256, 64, 288, 80}; RECT rcRight[3] = {
rcLeft[1] = {256, 80, 288, 96}; {288, 64, 320, 80},
rcLeft[2] = {256, 96, 288, 112}; {288, 80, 320, 96},
{288, 96, 320, 112},
rcRight[0] = {288, 64, 320, 80}; };
rcRight[1] = {288, 80, 320, 96};
rcRight[2] = {288, 96, 320, 112};
switch (npc->act_no) switch (npc->act_no)
{ {
@ -720,14 +729,15 @@ void ActNpc007(NPCHAR *npc)
//Beetle (Follows you, Egg Corridor) //Beetle (Follows you, Egg Corridor)
void ActNpc008(NPCHAR *npc) void ActNpc008(NPCHAR *npc)
{ {
RECT rcLeft[2]; RECT rcLeft[2] = {
RECT rcRight[2]; {80, 80, 96, 96},
{96, 80, 112, 96},
};
rcLeft[0] = {80, 80, 96, 96}; RECT rcRight[2] = {
rcLeft[1] = {96, 80, 112, 96}; {80, 96, 96, 112},
{96, 96, 112, 112},
rcRight[0] = {80, 96, 96, 112}; };
rcRight[1] = {96, 96, 112, 112};
switch (npc->act_no) switch (npc->act_no)
{ {
@ -872,16 +882,17 @@ void ActNpc009(NPCHAR *npc)
npc->x += npc->xm; npc->x += npc->xm;
npc->y += npc->ym; npc->y += npc->ym;
RECT rect_left[3]; RECT rect_left[3] = {
RECT rect_right[3]; {0, 0, 40, 24},
{80, 0, 120, 24},
{120, 0, 160, 24},
};
rect_left[0] = {0, 0, 40, 24}; RECT rect_right[3] = {
rect_left[1] = {80, 0, 120, 24}; {0, 24, 40, 48},
rect_left[2] = {120, 0, 160, 24}; {80, 24, 120, 48},
{120, 24, 160, 48},
rect_right[0] = {0, 24, 40, 48}; };
rect_right[1] = {80, 24, 120, 48};
rect_right[2] = {120, 24, 160, 48};
if (npc->direct == 0) if (npc->direct == 0)
npc->rect = rect_left[npc->ani_no]; npc->rect = rect_left[npc->ani_no];
@ -983,18 +994,19 @@ void ActNpc010(NPCHAR *npc)
npc->x += npc->xm; npc->x += npc->xm;
npc->y += npc->ym; npc->y += npc->ym;
RECT rect_left[4]; RECT rect_left[4] = {
RECT rect_right[4]; {0, 0, 40, 24},
{40, 0, 80, 24},
{80, 0, 120, 24},
{120, 0, 160, 24},
};
rect_left[0] = {0, 0, 40, 24}; RECT rect_right[4] = {
rect_left[1] = {40, 0, 80, 24}; {0, 24, 40, 48},
rect_left[2] = {80, 0, 120, 24}; {40, 24, 80, 48},
rect_left[3] = {120, 0, 160, 24}; {80, 24, 120, 48},
{120, 24, 160, 48},
rect_right[0] = {0, 24, 40, 48}; };
rect_right[1] = {40, 24, 80, 48};
rect_right[2] = {80, 24, 120, 48};
rect_right[3] = {120, 24, 160, 48};
if (gMC.x > npc->x) if (gMC.x > npc->x)
npc->direct = 2; npc->direct = 2;
@ -1019,11 +1031,11 @@ void ActNpc011(NPCHAR *npc)
npc->y += npc->ym; npc->y += npc->ym;
npc->x += npc->xm; npc->x += npc->xm;
RECT rect_left[3]; RECT rect_left[3] = {
{208, 104, 224, 120},
rect_left[0] = {208, 104, 224, 120}; {224, 104, 240, 120},
rect_left[1] = {224, 104, 240, 120}; {240, 104, 256, 120},
rect_left[2] = {240, 104, 256, 120}; };
if (++npc->ani_wait > 1) if (++npc->ani_wait > 1)
{ {
@ -1323,38 +1335,39 @@ void ActNpc012(NPCHAR *npc)
npc->x += npc->xm; npc->x += npc->xm;
npc->y += npc->ym; npc->y += npc->ym;
RECT rect_left[14]; RECT rect_left[14] = {
RECT rect_right[14]; {0, 0, 40, 24},
{160, 0, 200, 24},
{80, 0, 120, 24},
{120, 0, 160, 24},
{240, 0, 280, 24},
{200, 0, 240, 24},
{280, 0, 320, 24},
{0, 0, 0, 0},
{80, 48, 120, 72},
{0, 48, 40, 72},
{0, 0, 40, 24},
{40, 48, 80, 72},
{0, 0, 40, 24},
{280, 0, 320, 24},
};
rect_left[0] = {0, 0, 40, 24}; RECT rect_right[14] = {
rect_left[1] = {160, 0, 200, 24}; {0, 24, 40, 48},
rect_left[2] = {80, 0, 120, 24}; {160, 24, 200, 48},
rect_left[3] = {120, 0, 160, 24}; {80, 24, 120, 48},
rect_left[4] = {240, 0, 280, 24}; {120, 24, 160, 48},
rect_left[5] = {200, 0, 240, 24}; {240, 24, 280, 48},
rect_left[6] = {280, 0, 320, 24}; {200, 24, 240, 48},
rect_left[7] = {0, 0, 0, 0}; {280, 24, 320, 48},
rect_left[8] = {80, 48, 120, 72}; {0, 0, 0, 0},
rect_left[9] = {0, 48, 40, 72}; {80, 72, 120, 96},
rect_left[10] = {0, 0, 40, 24}; {0, 72, 40, 96},
rect_left[11] = {40, 48, 80, 72}; {0, 24, 40, 48},
rect_left[12] = {0, 0, 40, 24}; {40, 72, 80, 96},
rect_left[13] = {280, 0, 320, 24}; {0, 24, 40, 48},
{280, 24, 320, 48},
rect_right[0] = {0, 24, 40, 48}; };
rect_right[1] = {160, 24, 200, 48};
rect_right[2] = {80, 24, 120, 48};
rect_right[3] = {120, 24, 160, 48};
rect_right[4] = {240, 24, 280, 48};
rect_right[5] = {200, 24, 240, 48};
rect_right[6] = {280, 24, 320, 48};
rect_right[7] = {0, 0, 0, 0};
rect_right[8] = {80, 72, 120, 96};
rect_right[9] = {0, 72, 40, 96};
rect_right[10] = {0, 24, 40, 48};
rect_right[11] = {40, 72, 80, 96};
rect_right[12] = {0, 24, 40, 48};
rect_right[13] = {280, 24, 320, 48};
if (npc->direct == 0) if (npc->direct == 0)
npc->rect = rect_left[npc->ani_no]; npc->rect = rect_left[npc->ani_no];
@ -1373,12 +1386,12 @@ void ActNpc012(NPCHAR *npc)
//Forcefield //Forcefield
void ActNpc013(NPCHAR *npc) void ActNpc013(NPCHAR *npc)
{ {
RECT rect[4]; RECT rect[4] = {
{128, 0, 144, 16},
rect[0] = {128, 0, 144, 16}; {144, 0, 160, 16},
rect[1] = {144, 0, 160, 16}; {160, 0, 176, 16},
rect[2] = {160, 0, 176, 16}; {176, 0, 192, 16},
rect[3] = {176, 0, 192, 16}; };
if (++npc->ani_wait > 0) if (++npc->ani_wait > 0)
{ {
@ -1395,11 +1408,11 @@ void ActNpc013(NPCHAR *npc)
//Santa's Key //Santa's Key
void ActNpc014(NPCHAR *npc) void ActNpc014(NPCHAR *npc)
{ {
RECT rect[3]; RECT rect[3] = {
{192, 0, 208, 16},
rect[0] = {192, 0, 208, 16}; {208, 0, 224, 16},
rect[1] = {208, 0, 224, 16}; {224, 0, 240, 16},
rect[2] = {224, 0, 240, 16}; };
if (npc->act_no == 0) if (npc->act_no == 0)
{ {
@ -1435,11 +1448,11 @@ void ActNpc014(NPCHAR *npc)
//Chest (closed) //Chest (closed)
void ActNpc015(NPCHAR *npc) void ActNpc015(NPCHAR *npc)
{ {
RECT rcLeft[3]; RECT rcLeft[3] = {
{240, 0, 256, 16},
rcLeft[0] = {240, 0, 256, 16}; {256, 0, 272, 16},
rcLeft[1] = {256, 0, 272, 16}; {272, 0, 288, 16},
rcLeft[2] = {272, 0, 288, 16}; };
switch (npc->act_no) switch (npc->act_no)
{ {
@ -1492,26 +1505,26 @@ void ActNpc015(NPCHAR *npc)
//Save point //Save point
void ActNpc016(NPCHAR *npc) void ActNpc016(NPCHAR *npc)
{ {
RECT rects[8]; RECT rect[8] = {
{96, 16, 112, 32},
rects[0] = {96, 16, 112, 32}; {112, 16, 128, 32},
rects[1] = {112, 16, 128, 32}; {128, 16, 144, 32},
rects[2] = {128, 16, 144, 32}; {144, 16, 160, 32},
rects[3] = {144, 16, 160, 32}; {160, 16, 176, 32},
rects[4] = {160, 16, 176, 32}; {176, 16, 192, 32},
rects[5] = {176, 16, 192, 32}; {192, 16, 208, 32},
rects[6] = {192, 16, 208, 32}; {208, 16, 224, 32},
rects[7] = {208, 16, 224, 32}; };
switch (npc->act_no) switch (npc->act_no)
{ {
case 0: case 0:
npc->bits |= 0x2000u; npc->bits |= 0x2000;
npc->act_no = 1; npc->act_no = 1;
if (npc->direct == 2) if (npc->direct == 2)
{ {
npc->bits &= ~0x2000u; npc->bits &= ~0x2000;
npc->ym = -0x200; npc->ym = -0x200;
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
@ -1521,36 +1534,36 @@ void ActNpc016(NPCHAR *npc)
// Fallthrough // Fallthrough
case 1: case 1:
if (npc->flag & 8) if (npc->flag & 8)
npc->bits |= 0x2000u; npc->bits |= 0x2000;
break; break;
} }
if ( ++npc->ani_wait > 2 ) if (++npc->ani_wait > 2)
{ {
npc->ani_wait = 0; npc->ani_wait = 0;
++npc->ani_no; ++npc->ani_no;
} }
if ( npc->ani_no > 7 ) if (npc->ani_no > 7)
npc->ani_no = 0; npc->ani_no = 0;
npc->ym += 0x40; npc->ym += 0x40;
if ( npc->ym > 0x5FF ) if (npc->ym > 0x5FF)
npc->ym = 0x5FF; npc->ym = 0x5FF;
npc->y += npc->ym; npc->y += npc->ym;
npc->rect = rects[npc->ani_no]; npc->rect = rect[npc->ani_no];
} }
// Health refill // Health refill
void ActNpc017(NPCHAR *npc) void ActNpc017(NPCHAR *npc)
{ {
RECT rect[2]; RECT rect[2] = {
{288, 0, 304, 16},
rect[0] = {288, 0, 304, 16}; {304, 0, 320, 16},
rect[1] = {304, 0, 320, 16}; };
int aa; int aa;
@ -1626,10 +1639,10 @@ void ActNpc017(NPCHAR *npc)
// Door // Door
void ActNpc018(NPCHAR *npc) void ActNpc018(NPCHAR *npc)
{ {
RECT rect[2]; RECT rect[2] = {
{224, 16, 240, 40},
rect[0] = {224, 16, 240, 40}; {192, 112, 208, 136},
rect[1] = {192, 112, 208, 136}; };
switch (npc->act_no) switch (npc->act_no)
{ {
@ -1720,18 +1733,19 @@ void ActNpc019(NPCHAR *npc)
npc->x += npc->xm; npc->x += npc->xm;
npc->y += npc->ym; npc->y += npc->ym;
RECT rect_left[4]; RECT rect_left[4] = {
RECT rect_right[4]; {0, 0, 40, 24},
{160, 0, 200, 24},
{80, 0, 120, 24},
{120, 0, 160, 24},
};
rect_left[0] = {0, 0, 40, 24}; RECT rect_right[4] = {
rect_left[1] = {160, 0, 200, 24}; {0, 24, 40, 48},
rect_left[2] = {80, 0, 120, 24}; {160, 24, 200, 48},
rect_left[3] = {120, 0, 160, 24}; {80, 24, 120, 48},
{120, 24, 160, 48},
rect_right[0] = {0, 24, 40, 48}; };
rect_right[1] = {160, 24, 200, 48};
rect_right[2] = {80, 24, 120, 48};
rect_right[3] = {120, 24, 160, 48};
if (npc->direct == 0) if (npc->direct == 0)
npc->rect = rect_left[npc->ani_no]; npc->rect = rect_left[npc->ani_no];