Advertisement
Guest User

RainBoxCls() Function - PlayBASIC Source Code

a guest
Feb 28th, 2022
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. RainBoxCls() Function - PlayBASIC Source Code
  2. https://www.underwaredesign.com/forums/index.php?topic=4627.0
  3.  
  4.  
  5.  
  6.  
  7. setfps 10
  8.  
  9. StartRGB = $223344
  10. EndRGB = $f000ff
  11. frame =10
  12.  
  13. do
  14.  
  15. RainBowCls(StartRGB,EndRGB)
  16.  
  17. frame--
  18. if frame<0
  19. StartRGB = EndRGB
  20. EndRGB = RndRGB()
  21. Frame=10
  22. endif
  23.  
  24.  
  25. sync
  26. loop spacekey()
  27.  
  28. explicit true
  29.  
  30. Function RainBowCLS(StartRGB,DestRGB)
  31.  
  32. local lp,w,h,Scaler#
  33. w=getsurfacewidth()
  34. h=getsurfaceheight()
  35.  
  36. Scaler#=100.0/h
  37. for lp =0 to h-1
  38. local NewRGB=RGBAlphaBlend(StartRGB,DestRGB, lp*Scaler#)
  39. boxc 0,lp,w,lp+1,true,NewRGB
  40. next
  41.  
  42. EndFunction
  43.  
  44. explicit false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement