From 5c4d854d5cb7ce8f42738f005107dbd767401aa9 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 10 Nov 2019 13:54:00 -0500 Subject: [PATCH] set NonSecretCode based on the bitmap for any opened secret doors rather then forcing applications to set this to a single bitmap. this results in much nicer looking secret doors that don't randomly flip bitmaps at all during and after opening. --- ack_lib/ACKDOOR.C | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ack_lib/ACKDOOR.C b/ack_lib/ACKDOOR.C index 928ab07..e85bf6d 100644 --- a/ack_lib/ACKDOOR.C +++ b/ack_lib/ACKDOOR.C @@ -274,6 +274,9 @@ if (i == 1 && xGridGlobal[xMapPosn] & DOOR_TYPE_SECRET) // Get grid map position that corresponds with the x wall // position of where the door starts xSecretmPos = xMapPosn; + + aeGlobal->NonSecretCode = xGridGlobal[xMapPosn] & 0xff; + if (iLastX > xPlayer) // Door is to the right of player { xSecretmPos1 = xMapPosn + 1; @@ -301,6 +304,9 @@ if (i == 2 && yGridGlobal[yMapPosn] & DOOR_TYPE_SECRET) return (DoorCode | POV_DOORLOCKED); ySecretmPos = yMapPosn; + + aeGlobal->NonSecretCode = yGridGlobal[yMapPosn] & 0xff; + if (iLastY > yPlayer) { LastMapPosn = yMapPosn;