Advertisement
gocha

line+avi sample for HSP3 by gocha (tinyavi.as sample)

May 2nd, 2013
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. ;-----------------------------------------------------------------------------
  2. ; line+avi sample for HSP3 by gocha
  3. ;-----------------------------------------------------------------------------
  4.  
  5. #include "tinyavi.as"
  6.  
  7. #runtime "hsp3c"
  8. #packopt name "lineavi"
  9.  
  10. onexit goto *p_exit
  11.  
  12. fps = 60
  13. gosub *resetdraw
  14. title "Close to stop!"
  15.  
  16. ;---------------------------------------
  17. ; >> メイン
  18. ;---------------------------------------
  19. *main
  20. redraw 0
  21. gosub *dodraw
  22. redraw 1
  23.  
  24. ; フレーム処理
  25. tvw_add: frame++
  26. await dt
  27. goto *main
  28.  
  29. ;---------------------------------------
  30. ; >> 線を描写
  31. ;---------------------------------------
  32. *dodraw
  33. color rnd(256), rnd(256), rnd(256)
  34. line rnd(wx), rnd(wy), wx/2, wy/2
  35. return
  36.  
  37. ;---------------------------------------
  38. ; >> 初期化処理
  39. ;---------------------------------------
  40. *resetdraw
  41. randomize
  42.  
  43. frame = 0
  44. dt = 1000/fps
  45.  
  46. wx = 256: wy = 224
  47. screen 0, wx, wy
  48. gsel 0, 1 : cls
  49. title "line+avi sample"
  50.  
  51. tvw_start "line.avi", fps
  52. tvw_add
  53. return
  54.  
  55. ;---------------------------------------
  56. ; >> 終了処理
  57. ;---------------------------------------
  58. *p_exit
  59. tvw_end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement