Draw.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Declare drawinc_x!, drawinc_y!, drawinc_a&, drawinc_hdl&
Var drawinc_pen&=1
Proc Paint
Parameters hdl&
drawinc_hdl&=hdl&
EndProc
Proc Go
Parameters h&
StartPaint drawinc_hdl&
Case drawinc_pen& : Line drawinc_x!,drawinc_y! - drawinc_x!+(Sin((@Pi()/180)*drawinc_a&)*h&),drawinc_y!-(Cos((@Pi()/180)*drawinc_a&)*h&)
EndPaint
drawinc_x!=drawinc_x!+(Sin((@Pi()/180)*drawinc_a&)*h&)
drawinc_y!=drawinc_y!-(Cos((@Pi()/180)*drawinc_a&)*h&)
EndProc
Proc Turn
Parameters a&
a& = a& mod 360
Case a&<0 : a&=a&+360
drawinc_a&=(drawinc_a&+a&) mod 360
EndProc
Proc Angle
Parameters a&
a& = a& mod 360
Case a&<0 : a&=a&+360
drawinc_a&=a&
EndProc
Proc Goto
Parameters x&,y&
drawinc_x!=x&
drawinc_y!=y&
EndProc
Proc ResetScreen
Goto(0,0)
drawinc_a&=0
PenDown()
StartPaint drawinc_hdl&
CLS RGB(255,255,255)
EndPaint
EndProc
Proc Center
Goto(width(drawinc_hdl&)/2,height(drawinc_hdl&)/2)
EndProc
Proc PenDown
drawinc_pen&=1
EndProc
Proc PenUp
drawinc_pen&=0
EndProc