Browse Source

Draw lines to tile edge

Causal Agent 2 months ago
parent
commit
ff29f89d37
Signed by: Curtis McEnroe <june@causal.agency> GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      client.c

+ 4
- 2
client.c View File

@@ -652,14 +652,16 @@ static void inputLine(bool keyCode, wchar_t ch) {
652 652
 			break; default: return;
653 653
 		}
654 654
 	}
655
-	if ((uint8_t)(cellX + dx) >= CellCols) return;
656
-	if ((uint8_t)(cellY + dy) >= CellRows) return;
657 655
 
658 656
 	uint8_t leave = lineCell(tile.cells[cellY][cellX], dx, dy);
659 657
 	uint8_t enter = lineCell(tile.cells[cellY + dy][cellX + dx], -dx, -dy);
660 658
 
661 659
 	if (leave) clientPut(input.color, leave);
660
+
661
+	if ((uint8_t)(cellX + dx) >= CellCols) return;
662
+	if ((uint8_t)(cellY + dy) >= CellRows) return;
662 663
 	clientMove(dx, dy);
664
+
663 665
 	if (enter) clientPut(input.color, enter);
664 666
 }
665 667
 

Loading…
Cancel
Save