- Draw program optimization
- 02 Feb 2022 10:53:35 am
- Last edited by DragonScholar71 on 07 Feb 2022 04:25:43 pm; edited 3 times in total
This program is a picture making program. you draw the picture, exit the program, and save the picture. but since I'm horrible at optimization, i need help doing it.
Controls
[2nd] - draw mode
[alpha] - erase mode
[Math] - Neutral mode (Also what it starts on)
[X,θ,T,n] - toggle fast move.
[Y=] - Horizontal line
[Window] - Vertical line
[Zoom] - Type text
[Trace] - Shades from point A to point B
[Graph] - Draws a line from point A to point B
Code:
Edit: Fixed all errors and added the 2 other functions
Edit: Fixed erase function on the typing
Controls
[2nd] - draw mode
[alpha] - erase mode
[Math] - Neutral mode (Also what it starts on)
[X,θ,T,n] - toggle fast move.
[Y=] - Horizontal line
[Window] - Vertical line
[Zoom] - Type text
[Trace] - Shades from point A to point B
[Graph] - Draws a line from point A to point B
Code:
ClrDraw
0->Xmin
94->Xmax
~62->Ymin
0->Ymax
47->A
~31->B
1->C
0->D
0->E
0->F
While 1
Pt-Change(A,B
Repeat Ans
getKey:End
Ans->G
Pt-Change(A,B
If G=105 and J:Then
If K
Line(A,B,J,K
If I:Then
If B<J:Then
B->T
J->B
T->J
End
For(Q,J,B
Line(A,Q,I,Q
End
End
T->B:0->I:0->J:0->K:DelVar T
End
If not(J:Then
If D=1:Pt-On(A,B
If D=2:Pt-Off(A,B
If G=21:1->D
If G=31:2->D
If G=41:0->D
End
4(G=32 xor C=5)+1->C
A-C(G=24)->A:A+C(G=26)->A
B-C(G=34)->B:B+C(G=25)->B
If G<21:Then
If G=14:Then
A->I
B->J
Pt-Change(A,B
End
If G=15:Then
A->J
B->K
Pt-Change(A,B
End
If G=11
Horizontal B
If G=12
Vertical A
If G=13:Then
" ->Str1
Repeat G=105
Repeat Ans
getKey:End
Ans->G
0->Q
If length(Str1)>4
3->Q
If G>34 and G<105
sub(Str1,1,length(Str1)-Q)+sub("ABC EFGHIJKLMNOPQRSTUVWXYZ$[<|] :[|>]",G-5iPart(.1G+4),1)+" "->Str1
If G=23
sub(Str1,1,length(Str1)-4)+" "->Str1
Text(abs(B),A,Str1
End
End
End
End
Edit: Fixed all errors and added the 2 other functions
Edit: Fixed erase function on the typing