Added NPC334 (sweat)
This commit is contained in:
parent
a9e8b37d49
commit
e4c520bb7c
4 changed files with 60 additions and 1 deletions
1
Makefile
1
Makefile
|
@ -84,6 +84,7 @@ SOURCES = \
|
||||||
NpcAct260 \
|
NpcAct260 \
|
||||||
NpcAct280 \
|
NpcAct280 \
|
||||||
NpcAct300 \
|
NpcAct300 \
|
||||||
|
NpcAct320 \
|
||||||
NpcAct340 \
|
NpcAct340 \
|
||||||
NpChar \
|
NpChar \
|
||||||
NpcHit \
|
NpcHit \
|
||||||
|
|
|
@ -197,6 +197,8 @@ void ActNpc300(NPCHAR *npc);
|
||||||
|
|
||||||
void ActNpc302(NPCHAR *npc);
|
void ActNpc302(NPCHAR *npc);
|
||||||
|
|
||||||
|
void ActNpc334(NPCHAR *npc);
|
||||||
|
|
||||||
void ActNpc355(NPCHAR *npc);
|
void ActNpc355(NPCHAR *npc);
|
||||||
|
|
||||||
void ActNpc359(NPCHAR *npc);
|
void ActNpc359(NPCHAR *npc);
|
||||||
|
|
56
src/NpcAct320.cpp
Normal file
56
src/NpcAct320.cpp
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
#include "NpcAct.h"
|
||||||
|
|
||||||
|
#include "MyChar.h"
|
||||||
|
#include "NpChar.h"
|
||||||
|
#include "Game.h"
|
||||||
|
#include "Sound.h"
|
||||||
|
#include "Back.h"
|
||||||
|
#include "Triangle.h"
|
||||||
|
|
||||||
|
//Sweat
|
||||||
|
void ActNpc334(NPCHAR *npc)
|
||||||
|
{
|
||||||
|
RECT rcLeft[2];
|
||||||
|
RECT rcRight[2];
|
||||||
|
|
||||||
|
rcLeft[0] = {160, 184, 168, 200};
|
||||||
|
rcLeft[1] = {168, 184, 176, 200};
|
||||||
|
|
||||||
|
rcRight[0] = {176, 184, 184, 200};
|
||||||
|
rcRight[1] = {184, 184, 192, 200};
|
||||||
|
|
||||||
|
switch (npc->act_no)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
npc->act_no = 10;
|
||||||
|
|
||||||
|
if (npc->direct == 0)
|
||||||
|
{
|
||||||
|
npc->x += 0x1400;
|
||||||
|
npc->y -= 0x2400;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc->x = gMC.x - 0x1400;
|
||||||
|
npc->y = gMC.y - 0x400;
|
||||||
|
}
|
||||||
|
// Fallthrough
|
||||||
|
case 1:
|
||||||
|
if (++npc->act_wait / 8 & 1)
|
||||||
|
npc->ani_no = 0;
|
||||||
|
else
|
||||||
|
npc->ani_no = 1;
|
||||||
|
|
||||||
|
if (npc->act_wait >= 64)
|
||||||
|
npc->cond = 0;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (npc->direct == 0)
|
||||||
|
npc->rect = rcLeft[npc->ani_no];
|
||||||
|
else
|
||||||
|
npc->rect = rcRight[npc->ani_no];
|
||||||
|
}
|
|
@ -390,7 +390,7 @@ NPCFUNCTION gpNpcFuncTbl[361] =
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
ActNpc334,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
|
|
Loading…
Add table
Reference in a new issue