Mercurial Hosting > harelet
comparison harelet.c @ 7:1bb981516d87
Automated Vimcurial commmit
author | VilyaemKenyaz |
---|---|
date | Sat, 09 Sep 2023 17:11:20 -0400 |
parents | ec82c868b8b0 |
children | c60e4315cb7e |
comparison
equal
deleted
inserted
replaced
6:ec82c868b8b0 | 7:1bb981516d87 |
---|---|
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include "basedfilelib.h" | 10 #include "basedfilelib.h" |
11 #include "minibasediolib.h" | 11 |
12 #ifdef __linux__ | |
13 #include "linuxconio.h" | |
14 #endif | |
15 | |
16 #ifdef _WIN32 | |
17 #include <Windows.h>> | |
18 #include <conio.h> | |
19 #endif | |
12 | 20 |
13 #define DEEPNESS 5 | 21 #define DEEPNESS 5 |
14 #define MAXPOINT 4096 | 22 #define MAXPOINT 4096 |
15 #define UNITS "G20" | 23 #define UNITS "G20" |
16 #define SPEED 20 | 24 #define SPEED 20 |
34 * Description - Renders the screen | 42 * Description - Renders the screen |
35 * Author - William King | 43 * Author - William King |
36 * Date - Sep 08 2023 | 44 * Date - Sep 08 2023 |
37 * *******************************************/ | 45 * *******************************************/ |
38 void Render(){ | 46 void Render(){ |
39 | 47 clrscr(); |
40 printf("\x1b[0;0f]"); | 48 gotoxy(0,0); |
41 puts("HARELET A CAD PROGRAM BY VILYAEM KENYAZ, PEEP SOFTWARE 2023"); | 49 puts("HARELET A CAD PROGRAM BY VILYAEM KENYAZ, PEEP SOFTWARE 2023"); |
42 printf("Number of Points: %d X: %d Y: %d STEPSIZE: %d DWN?: %d\n",numpoints,X,Y,step,down); | 50 printf("Number of Points: %d X: %d Y: %d STEPSIZE: %d DWN?: %d\n",numpoints,X,Y,step,down); |
43 | 51 |
44 //Render points | 52 //Render points |
45 for(int i = 0;i != MAXPOINT;i++){ | 53 for(int i = 0;i != MAXPOINT;i++){ |
46 printf("\x1b[0;0f]"); | 54 gotoxy(0,10); |
55 /* | |
47 //Move X | 56 //Move X |
48 for(int j = 0;j != points[i].X;j++){ | 57 for(int j = 0;j != points[i].X;j++){ |
49 | 58 |
50 printf(""); | 59 printf(""); |
51 | 60 |
56 | 65 |
57 puts(""); | 66 puts(""); |
58 | 67 |
59 | 68 |
60 } | 69 } |
70 */ | |
71 | |
72 gotoxy(points[i].X,points[i].Y); | |
73 | |
61 if(points[i].down == 0){ | 74 if(points[i].down == 0){ |
62 puts("X"); | 75 puts("X"); |
63 } | 76 } |
64 else{ | 77 else{ |
65 puts("*"); | 78 puts("*"); |
66 } | 79 } |
67 | 80 |
81 | |
68 } | 82 } |
69 | 83 |
70 //Render cursor | 84 //Render cursor |
85 /* | |
71 DocTop(); | 86 DocTop(); |
72 for(int i = 0;i != X;i++){ | 87 for(int i = 0;i != X;i++){ |
73 printf(""); | 88 printf(""); |
74 | 89 |
75 } | 90 } |
76 for(int i = 0;i != Y;i++){ | 91 for(int i = 0;i != Y;i++){ |
77 puts(""); | 92 puts(""); |
78 } | 93 } |
94 */ | |
95 | |
96 gotoxy(X,Y); | |
97 | |
79 puts("&"); | 98 puts("&"); |
80 | 99 |
81 | 100 |
82 | 101 |
83 } | 102 } |