From d4db63ce4895a250c186aa609ce3652d3ccdc5ff Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 2 Oct 2019 22:17:22 +0200 Subject: [PATCH] [hellfire] GetAutomapType bin exact (#1777) --- Source/automap.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/automap.cpp b/Source/automap.cpp index 5dc743fb1..9dc033042 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -632,10 +632,17 @@ WORD GetAutomapType(int x, int y, BOOL view) } rv = automaptype[(BYTE)dungeon[x][y]]; - if (rv == 7 - && GetAutomapType(x - 1, y, FALSE) & (MAPFLAG_HORZARCH << 8) - && GetAutomapType(x, y - 1, FALSE) & (MAPFLAG_VERTARCH << 8)) { - rv = 1; + if (rv == 7) { +#ifdef HELLFIRE + if ((BYTE)(GetAutomapType(x - 1, y, FALSE) >> 8) & MAPFLAG_HORZARCH) { + if ((BYTE)(GetAutomapType(x, y - 1, FALSE) >> 8) & MAPFLAG_VERTARCH) { +#else + if ((GetAutomapType(x - 1, y, FALSE) >> 8) & MAPFLAG_HORZARCH) { + if ((GetAutomapType(x, y - 1, FALSE) >> 8) & MAPFLAG_VERTARCH) { +#endif + rv = 1; + } + } } return rv; }