From f3b31087e394c4e09590146ee847b931147c51aa Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 15 Aug 2023 19:54:16 -0400 Subject: [PATCH] Use `MAP_CONNECTION_PADDING_WIDTH` in `MACRO connection` Fixes #1033 --- data/maps/attributes.asm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm index 07f4a7fad04..2ad2d4cf27c 100644 --- a/data/maps/attributes.asm +++ b/data/maps/attributes.asm @@ -31,52 +31,52 @@ MACRO connection ; Calculate tile offsets for source (current) and target maps DEF _src = 0 - DEF _tgt = (\4) + 3 + DEF _tgt = (\4) + MAP_CONNECTION_PADDING_WIDTH if _tgt < 0 DEF _src = -_tgt DEF _tgt = 0 endc if !STRCMP("\1", "north") - DEF _blk = \3_WIDTH * (\3_HEIGHT - 3) + _src + DEF _blk = \3_WIDTH * (\3_HEIGHT - MAP_CONNECTION_PADDING_WIDTH) + _src DEF _map = _tgt - DEF _win = (\3_WIDTH + 6) * \3_HEIGHT + 1 + DEF _win = (\3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * \3_HEIGHT + 1 DEF _y = \3_HEIGHT * 2 - 1 DEF _x = (\4) * -2 - DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + DEF _len = CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH - (\4) if _len > \3_WIDTH DEF _len = \3_WIDTH endc elif !STRCMP("\1", "south") DEF _blk = _src - DEF _map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt - DEF _win = \3_WIDTH + 7 + DEF _map = (CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * (CURRENT_MAP_HEIGHT + MAP_CONNECTION_PADDING_WIDTH) + _tgt + DEF _win = \3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2 + 1 DEF _y = 0 DEF _x = (\4) * -2 - DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + DEF _len = CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH - (\4) if _len > \3_WIDTH DEF _len = \3_WIDTH endc elif !STRCMP("\1", "west") - DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - 3 - DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt - DEF _win = (\3_WIDTH + 6) * 2 - 6 + DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - MAP_CONNECTION_PADDING_WIDTH + DEF _map = (CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * _tgt + DEF _win = (\3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * 2 - MAP_CONNECTION_PADDING_WIDTH * 2 DEF _y = (\4) * -2 DEF _x = \3_WIDTH * 2 - 1 - DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + DEF _len = CURRENT_MAP_HEIGHT + MAP_CONNECTION_PADDING_WIDTH - (\4) if _len > \3_HEIGHT DEF _len = \3_HEIGHT endc elif !STRCMP("\1", "east") DEF _blk = (\3_WIDTH * _src) - DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 - DEF _win = \3_WIDTH + 7 + DEF _map = (CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * _tgt + CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH + DEF _win = \3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2 + 1 DEF _y = (\4) * -2 DEF _x = 0 - DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + DEF _len = CURRENT_MAP_HEIGHT + MAP_CONNECTION_PADDING_WIDTH - (\4) if _len > \3_HEIGHT DEF _len = \3_HEIGHT endc