diff options
author | June McEnroe <june@causal.agency> | 2019-01-08 15:44:32 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-01-08 15:44:32 -0500 |
commit | 8de54b3a2bb69d168014bea0dd230e0b2235441d (patch) | |
tree | e6eac359358ac880bed89eedb48a2740120c39e2 | |
parent | Factor out default paths (diff) | |
download | torus-8de54b3a2bb69d168014bea0dd230e0b2235441d.tar.gz torus-8de54b3a2bb69d168014bea0dd230e0b2235441d.zip |
Draw lines to tile edge
Diffstat (limited to '')
-rw-r--r-- | client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client.c b/client.c index af2f985..431f425 100644 --- a/client.c +++ b/client.c @@ -652,14 +652,16 @@ static void inputLine(bool keyCode, wchar_t ch) { break; default: return; } } - if ((uint8_t)(cellX + dx) >= CellCols) return; - if ((uint8_t)(cellY + dy) >= CellRows) return; uint8_t leave = lineCell(tile.cells[cellY][cellX], dx, dy); uint8_t enter = lineCell(tile.cells[cellY + dy][cellX + dx], -dx, -dy); if (leave) clientPut(input.color, leave); + + if ((uint8_t)(cellX + dx) >= CellCols) return; + if ((uint8_t)(cellY + dy) >= CellRows) return; clientMove(dx, dy); + if (enter) clientPut(input.color, enter); } |