File: animatedhelp.kbs

package info (click to toggle)
basic256 0.9.6.69a-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,304 kB
  • sloc: cpp: 7,778; yacc: 926; lex: 575; sh: 21; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# animatedhelp.kbs - show another use of imgload
clg
fastgraphics
imgload 150,150,"test.bmp"
x = 50
y = 50
r = 0
while true
   x = x + rand * 10
   y = y + rand * 10
   r = r + rand * .2
   if x < 0 then x = graphwidth
   if x > graphwidth then x = 0
   if y < 0 then y = graphheight
   if y > graphheight then y = 0
   save$ = getslice(x-15,y-15,30,30)
   imgload x, y, 1, r, "help.png"
   refresh
   pause .05
   putslice x-15,y-15,save$
end while