home *** CD-ROM | disk | FTP | other *** search
/ Chip: Hang es video / CHIP_ZENESZERKESZTO_2005.ISO / audio_1 / softstep / softstep3.msi / Data1.cab / drawcircles.ufn < prev    next >
Text File  |  2001-07-03  |  2KB  |  135 lines

  1. 0
  2. 2
  3. 0
  4. 0
  5. EDGEDETECT(current, position, size, outer, inner=0) = IIF(position <= inner, 1, IIF((position+size) >= outer, -1, current)) ~; current must be +/-1, returns current if not at edge~
  6. NEWCOLOR(flag, oldflag, oldcolor) = iif(flag == oldflag, oldcolor,rgb(ran*256, ran*256, ran*256))
  7. 0. 
  8. 1. 
  9. 2. Initialize = PixOn, ~PixLoad(-1, "hivprot", "", "gif", 1) ; load a background~V0.(1), V1.(1),             ; initialize starting X, Y~v2.(-1), v3.(-1),           ; initialize direction flags~v4.(0) ; initialize color~PixDrawMode(7),             ; xor drawing~PixFillColor(0),~PixFillStyle(1),~PixPenWidth(7),~RunStop(0),~goto(me+1),~
  10. 3. Draw Shape = PixAutoRepaint(0),        ; turn off auto repaint for flicker free animation~a.(v2), b.(v3),                         ; save current direction flags~v2.(edgedetect(v2, v0, 40, PixFrameWidth)),       ; get new X direction flag~v3.(edgedetect(v3, v1, 40, PixFrameHeight)),       ; get new Y direction flag~x.(v0), y.(v1),                          ; save previous x,y~v0.(v0+(v2*IN1)), v1.(v1+(v3*IN2)),     ; calculate new position~c.(v4),  v4.(newcolor(in3, v5, C)), v5.(IN3), ; new color if In3 changes~PixPenColor(c),~PixEllipse(x, y, 40, 40),                ; erase the old one~PixPenColor(v4),~PixEllipse(v0, v1, 40, 40),              ; draw the new one~PixRepaint, PixAutoRepaint(1),    ; force repaint, restore default AutoRepaint~out( iif( a==v2, 0, 1) + iif( b==v3, 0, 2)) ; output flags if direction changed
  11. 4. 
  12. 5. 
  13. 6. 
  14. 7. 
  15. 8. 
  16. 9. 
  17. 10. 
  18. 11. 
  19. 12. 
  20. 13. 
  21. 14. 
  22. 15. 
  23. 16. 
  24. 17. 
  25. 18. 
  26. 19. 
  27. 20. 
  28. 21. 
  29. 22. 
  30. 23. 
  31. 24. 
  32. 25. 
  33. 26. 
  34. 27. 
  35. 28. 
  36. 29. 
  37. 30. 
  38. 31. 
  39. 32. 
  40. 33. 
  41. 34. 
  42. 35. 
  43. 36. 
  44. 37. 
  45. 38. 
  46. 39. 
  47. 40. 
  48. 41. 
  49. 42. 
  50. 43. 
  51. 44. 
  52. 45. 
  53. 46. 
  54. 47. 
  55. 48. 
  56. 49. 
  57. 50. 
  58. 51. 
  59. 52. 
  60. 53. 
  61. 54. 
  62. 55. 
  63. 56. 
  64. 57. 
  65. 58. 
  66. 59. 
  67. 60. 
  68. 61. 
  69. 62. 
  70. 63. 
  71. 64. 
  72. 65. 
  73. 66. 
  74. 67. 
  75. 68. 
  76. 69. 
  77. 70. 
  78. 71. 
  79. 72. 
  80. 73. 
  81. 74. 
  82. 75. 
  83. 76. 
  84. 77. 
  85. 78. 
  86. 79. 
  87. 80. 
  88. 81. 
  89. 82. 
  90. 83. 
  91. 84. 
  92. 85. 
  93. 86. 
  94. 87. 
  95. 88. 
  96. 89. 
  97. 90. 
  98. 91. 
  99. 92. 
  100. 93. 
  101. 94. 
  102. 95. 
  103. 96. 
  104. 97. 
  105. 98. 
  106. 99. 
  107. 100. 
  108. 101. 
  109. 102. 
  110. 103. 
  111. 104. 
  112. 105. 
  113. 106. 
  114. 107. 
  115. 108. 
  116. 109. 
  117. 110. 
  118. 111. 
  119. 112. 
  120. 113. 
  121. 114. 
  122. 115. 
  123. 116. 
  124. 117. 
  125. 118. 
  126. 119. 
  127. 120. 
  128. 121. 
  129. 122. 
  130. 123. 
  131. 124. 
  132. 125. 
  133. 126. 
  134. 127.
  135.