changeset 10:c73aed540bdd

Automated Vimcurial commmit
author VilyaemKenyaz
date Tue, 12 Sep 2023 07:17:22 -0400
parents 4eb02dffc00f
children 1d4df12de9e3
files .harelet.c.swp harelet harelet.c
diffstat 3 files changed, 12 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
Binary file .harelet.c.swp has changed
Binary file harelet has changed
--- a/harelet.c	Tue Sep 12 07:02:31 2023 -0400
+++ b/harelet.c	Tue Sep 12 07:17:22 2023 -0400
@@ -46,7 +46,7 @@
  * *******************************************/
 void Render(){	
 	clrscr();
-	gotoxy(0,30);
+	gotoxy(0,3);
 	puts("HARELET A CAD PROGRAM BY VILYAEM KENYAZ, PEEP SOFTWARE 2023");
 	printf("Number of Points: %d X: %d Y: %d STEPSIZE: %d DWN?: %d\n",numpoints,X,Y,step,down);
 
@@ -75,6 +75,9 @@
 
 	puts("&");
 
+	//Move cursor to top of document, so its not trailing the cadcursor
+	gotoxy(0,0);
+
 
 
 }
@@ -138,40 +141,6 @@
 	clrscr();
 	while(1){
 		Render();
-		/*
-		   scanf("%c",&action);
-		   switch(action){
-		   case 'a':
-		   points[numpoints].X = X;
-		   points[numpoints].Y = Y;
-		   points[numpoints].down = down;
-		   numpoints++;
-		   break;
-		   case 'h': 
-
-		   X += step;
-		   break;
-		   case 'j': 
-		   Y += step;
-		   break;
-		   case 'k': 
-		   Y -= step;
-		   break;
-		   case 'l': 
-		   X -= step;
-		   break;
-		   case 's':		
-		   puts("Enter new step:");
-		   scanf("%d",&step);
-		   break;
-
-		   case 'c':		Compile();
-		   break;
-		   default:
-		   break;
-		   }
-		   */
-
 		//New CONIO controls
 		switch(getchar()){
 		case 'h': 
@@ -199,6 +168,14 @@
 		   	points[numpoints].down = down;
 		   	numpoints++;
 			break;
+		case 'd':
+			if(down == 1){
+			down = 0;
+			}
+			else{
+			down = 1;
+			}
+			break;
 
 		case 'c': 
 			Compile();