diff harelet.c @ 7:1bb981516d87

Automated Vimcurial commmit
author VilyaemKenyaz
date Sat, 09 Sep 2023 17:11:20 -0400
parents ec82c868b8b0
children c60e4315cb7e
line wrap: on
line diff
--- a/harelet.c	Sat Sep 09 16:44:53 2023 -0400
+++ b/harelet.c	Sat Sep 09 17:11:20 2023 -0400
@@ -8,7 +8,15 @@
 #include <stdlib.h>
 #include <string.h>
 #include "basedfilelib.h"
-#include "minibasediolib.h"
+
+#ifdef __linux__
+#include "linuxconio.h"
+#endif
+
+#ifdef _WIN32
+#include <Windows.h>>
+#include <conio.h>
+#endif
 
 #define DEEPNESS 5
 #define MAXPOINT 4096
@@ -36,14 +44,15 @@
  * Date - Sep 08 2023
  * *******************************************/
 void Render(){
-
- 	printf("\x1b[0;0f]");
+	clrscr();
+	gotoxy(0,0);
 	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);
 
 	//Render points
 	for(int i = 0;i != MAXPOINT;i++){
- 		printf("\x1b[0;0f]");
+		gotoxy(0,10);
+		/*
 		//Move X
 		for(int j = 0;j != points[i].X;j++){
 
@@ -58,6 +67,10 @@
 
 
 		}
+		*/
+
+		gotoxy(points[i].X,points[i].Y);
+
 		if(points[i].down == 0){
 			puts("X");
 		}
@@ -65,9 +78,11 @@
 			puts("*");
 		}
 
+
 	}
 
 	//Render cursor
+	/*
 	DocTop();
 	for(int i = 0;i != X;i++){
 		printf("");
@@ -76,6 +91,10 @@
 	for(int i = 0;i != Y;i++){
 		puts("");
 	}
+	*/
+
+	gotoxy(X,Y);
+
 	puts("&");