home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: Hang es video
/
CHIP_ZENESZERKESZTO_2005.ISO
/
audio_1
/
softstep
/
softstep3.msi
/
Data1.cab
/
drawballclk.ufn
< prev
next >
Wrap
Text File
|
2001-07-14
|
2KB
|
133 lines
0
0
0
0
0.
1.
2. Initialize = nLED(8),~Ex(me+5), ; do the initialize-once stuff~V0.(in7), V1.(in8), ; initialize starting X, Y~v4.(in3+1), v5.(in4+1), ; initialize ball size~v2.(1), v3.(1), ; initialize direction flags~PixPenColor(255),~PixFillColor(255),~PixFillStyle(0),~PixPenWidth(3),~PixDrawMode(7),~PixEllipse(v0, v1, v4, v5), ; draw first ball~goto(me+1)~
3. Run/Stop = Switch(run,me+1,0)
4. Draw Shape = pixactive(uid), PixAutoRepaint(0)~PixEllipse(v0, v1, v4, v5), ; erase old~switch(((v6=in5) and (v7=in6)), 0, me+1) ; change size if changed~v4.(in3+3), v5.(in4+3),~e.(Edge(v0, v1, v4, v5, PixFrameWidth, PixFrameHeight)), ; check edges~f.(iif(e,e,f)), led(f),~v2.(iif( e and 3, iif(e and 1, -1, 1), v2)), ; direction flags~v3.(iif( e and 12, iif(e and 4, -1, 1),v3)),~v0.(v0+(in1*v2)), v1.(v1+(in2*v3)), ; update x,y position~PixEllipse(v0, v1, v4, v5), ~out(e), ; output flags if direction changed~PixRepaint, PixAutoRepaint(1)
5. Change Frame Size = PixSize(FetchX(0, in5)+4, FetchX(0, in6)+4),~PixPatternSet(0, 0, 0),~PixShapeSet(1, 0, 1, rgb(128,128,128)),~PixShape(0, 0, PixFrameWidth, PixFrameHeight, 2000),~v6.(in5), v7.(in6) ; Only run when in4 or in5 has changed
6. Tool Tips = ToolTip(, ~"Step X", "Step Y", ; In1, In2~"Ball Width", "Ball Height", ; In3, In4~"Frame Width", "Frame Height", ; In5, In6~"Start X", "Start Y") ; In7, In8
7. Initialize Once = PixNumFrames(uid), pixactive(uid),~PixMove(uid * 100,100), ~pixon, pixontop(1),~MakeXTable(0, 300), ; initialize translation table for frame size~ex(me-2), ; set frame size~ex(me-1), ; set tool tips~numlabel(uid)~
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.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.