Background color
Author |
Message |
Won Ton
|
Posted: Thu Jun 03, 2004 7:40 pm Post subject: Background color |
|
|
hi, ok, i have this program (below)
the stickman can move back and forth, but i have a blue background....and when it moves...it just earse the blue...is there a way to make the blue permante?
setscreen ("graphics")
setscreen ("nocursor")
var duration : int := 5
var x : int := 50
drawline (0, 24, 640, 24, black)
drawfillbox (0, 24, 640, 0, green)
drawfillbox (0, 24, 640, 900, blue)
loop
loop
drawoval (50 + x, 195, 30, 30, black)
drawline (50 + x, 80, 50 + x, 165, black)
drawline (50 + x, 80, 5 + x, 25, black)
drawline (50 + x, 80, 95 + x, 25, black)
drawline (50 + x, 140, 115 + x, 130, black)
drawline (50 + x, 140, 110 + x, 150, black)
delay (duration)
drawoval (50 + x, 195, 30, 30, 0)
drawline (50 + x, 80, 50 + x, 165, 0)
drawline (50 + x, 80, 5 + x, 25, 0)
drawline (50 + x, 80, 95 + x, 25, 0)
drawline (50 + x, 140, 115 + x, 130, 0)
drawline (50 + x, 140, 110 + x, 150, 0)
x := x + 1
exit when x > maxx
end loop
loop
drawoval (50 + x, 195, 30, 30, black)
drawline (50 + x, 80, 50 + x, 165, black)
drawline (50 + x, 80, 5 + x, 25, black)
drawline (50 + x, 80, 95 + x, 25, black)
drawline (50 + x, 140, 115 + x, 130, black)
drawline (50 + x, 140, 110 + x, 150, black)
delay (duration)
drawoval (50 + x, 195, 30, 30, 0)
drawline (50 + x, 80, 50 + x, 165, 0)
drawline (50 + x, 80, 5 + x, 25, 0)
drawline (50 + x, 80, 95 + x, 25, 0)
drawline (50 + x, 140, 115 + x, 130, 0)
drawline (50 + x, 140, 110 + x, 150, 0)
x := x - 1
exit when x < - 40
end loop
end loop |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Paul
|
Posted: Thu Jun 03, 2004 7:47 pm Post subject: (No subject) |
|
|
code: |
setscreen ("graphics")
setscreen ("nocursor")
setscreen ("offscreenonly")
var duration : int := 5
var x : int := 50
var pic: int
drawline (0, 24, 640, 24, black)
drawfillbox (0, 24, 640, 0, green)
drawfillbox (0, 24, 640, 900, blue)
pic:=Pic.New (0,0,maxx,maxy)
loop
loop
View.Update
Pic.Draw (pic,0,0,picCopy)
drawoval (50 + x, 195, 30, 30, black)
drawline (50 + x, 80, 50 + x, 165, black)
drawline (50 + x, 80, 5 + x, 25, black)
drawline (50 + x, 80, 95 + x, 25, black)
drawline (50 + x, 140, 115 + x, 130, black)
drawline (50 + x, 140, 110 + x, 150, black)
delay (duration)
drawoval (50 + x, 195, 30, 30, 0)
drawline (50 + x, 80, 50 + x, 165, 0)
drawline (50 + x, 80, 5 + x, 25, 0)
drawline (50 + x, 80, 95 + x, 25, 0)
drawline (50 + x, 140, 115 + x, 130, 0)
drawline (50 + x, 140, 110 + x, 150, 0)
x := x + 1
exit when x > maxx
end loop
loop
View.Update
Pic.Draw (pic,0,0,picCopy)
drawoval (50 + x, 195, 30, 30, black)
drawline (50 + x, 80, 50 + x, 165, black)
drawline (50 + x, 80, 5 + x, 25, black)
drawline (50 + x, 80, 95 + x, 25, black)
drawline (50 + x, 140, 115 + x, 130, black)
drawline (50 + x, 140, 110 + x, 150, black)
delay (duration)
drawoval (50 + x, 195, 30, 30, 0)
drawline (50 + x, 80, 50 + x, 165, 0)
drawline (50 + x, 80, 5 + x, 25, 0)
drawline (50 + x, 80, 95 + x, 25, 0)
drawline (50 + x, 140, 115 + x, 130, 0)
drawline (50 + x, 140, 110 + x, 150, 0)
x := x - 1
exit when x < - 40
end loop
end loop
|
|
|
|
|
|
|
s_climax
|
Posted: Thu Jun 03, 2004 7:48 pm Post subject: (No subject) |
|
|
code: | setscreen ("graphics;offscreenonly") %Combined with View.Update reduces flickering
setscreen ("nocursor")
var duration : int := 5
var x : int := 50
colorback (blue) %Makes the background blue
drawline (0, 24, 640, 24, black)
drawfillbox (0, 24, 640, 0, green)
drawfillbox (0, 24, 640, 900, blue)
loop
loop
drawoval (50 + x, 195, 30, 30, black)
drawline (50 + x, 80, 50 + x, 165, black)
drawline (50 + x, 80, 5 + x, 25, black)
drawline (50 + x, 80, 95 + x, 25, black)
drawline (50 + x, 140, 115 + x, 130, black)
drawline (50 + x, 140, 110 + x, 150, black)
delay (duration)
drawoval (50 + x, 195, 30, 30, 0)
drawline (50 + x, 80, 50 + x, 165, 0)
drawline (50 + x, 80, 5 + x, 25, 0)
drawline (50 + x, 80, 95 + x, 25, 0)
drawline (50 + x, 140, 115 + x, 130, 0)
drawline (50 + x, 140, 110 + x, 150, 0)
View.Update %Combined with offscreenonly reduces flickering
cls
x := x + 1
exit when x > maxx
end loop
loop
drawoval (50 + x, 195, 30, 30, black)
drawline (50 + x, 80, 50 + x, 165, black)
drawline (50 + x, 80, 5 + x, 25, black)
drawline (50 + x, 80, 95 + x, 25, black)
drawline (50 + x, 140, 115 + x, 130, black)
drawline (50 + x, 140, 110 + x, 150, black)
delay (duration)
drawoval (50 + x, 195, 30, 30, 0)
drawline (50 + x, 80, 50 + x, 165, 0)
drawline (50 + x, 80, 5 + x, 25, 0)
drawline (50 + x, 80, 95 + x, 25, 0)
drawline (50 + x, 140, 115 + x, 130, 0)
drawline (50 + x, 140, 110 + x, 150, 0)
View.Update %Combined with offscreenonly reduces flickering
cls %Clears the screen
x := x - 1
exit when x < -40
end loop
end loop
|
|
|
|
|
|
|
Paul
|
Posted: Thu Jun 03, 2004 8:15 pm Post subject: (No subject) |
|
|
well... with my way if he wanted a more complex background, it'd still work |
|
|
|
|
|
|
|