From b461211fb539286a826ab790985f769a647fc053 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 6 Feb 2019 20:46:18 +0000 Subject: [PATCH] Bugfix and a widescreen/tallscreen fix --- src/NpcAct160.cpp | 3 ++- src/NpcAct320.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NpcAct160.cpp b/src/NpcAct160.cpp index 78274ad7..19912819 100644 --- a/src/NpcAct160.cpp +++ b/src/NpcAct160.cpp @@ -11,6 +11,7 @@ #include "Frame.h" #include "Caret.h" #include "MycParam.h" +#include "CommonDefines.h" //Puu Black void ActNpc160(NPCHAR *npc) @@ -923,7 +924,7 @@ void ActNpc173(NPCHAR *npc) rcRight[2] = {48, 152, 72, 176}; rcRight[3] = {72, 152, 96, 176}; - if (npc->x <= gMC.x + 0x28000 && npc->x >= gMC.x - 0x28000 && npc->y <= gMC.y + 0x1E000 && npc->y >= gMC.y - 0x1E000) + if (npc->x <= gMC.x + (WINDOW_WIDTH * 0x200) && npc->x >= gMC.x - (WINDOW_WIDTH * 0x200) && npc->y <= gMC.y + (WINDOW_HEIGHT * 0x200) && npc->y >= gMC.y - (WINDOW_HEIGHT * 0x200)) { switch (npc->act_no) { diff --git a/src/NpcAct320.cpp b/src/NpcAct320.cpp index 345be7fd..3530a0e8 100644 --- a/src/NpcAct320.cpp +++ b/src/NpcAct320.cpp @@ -37,7 +37,7 @@ void ActNpc334(NPCHAR *npc) npc->y = gMC.y - 0x400; } // Fallthrough - case 1: + case 10: if (++npc->act_wait / 8 & 1) npc->ani_no = 0; else