ref: e4c520bb7c931f3595a19e9440bc2a5fe835c9c0
parent: a9e8b37d498468ad9f1b7c624344f1537eaacd84
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Feb 6 15:18:19 EST 2019
Added NPC334 (sweat)
--- a/Makefile
+++ b/Makefile
@@ -84,6 +84,7 @@
NpcAct260 \
NpcAct280 \
NpcAct300 \
+ NpcAct320 \
NpcAct340 \
NpChar \
NpcHit \
--- a/src/NpcAct.h
+++ b/src/NpcAct.h
@@ -197,6 +197,8 @@
void ActNpc302(NPCHAR *npc);
+void ActNpc334(NPCHAR *npc);
+
void ActNpc355(NPCHAR *npc);
void ActNpc359(NPCHAR *npc);
--- /dev/null
+++ b/src/NpcAct320.cpp
@@ -1,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];
+}
--- a/src/NpcTbl.cpp
+++ b/src/NpcTbl.cpp
@@ -390,7 +390,7 @@
nullptr,
nullptr,
nullptr,
- nullptr,
+ ActNpc334,
nullptr,
nullptr,
nullptr,
--
⑨