home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FGFX11.ZIP / EFFECTS.FOR < prev    next >
Text File  |  1994-04-11  |  23KB  |  653 lines

  1. C*****************************************************************************
  2. C                                                                            *
  3. C  EFFECTS.FOR                                                               *
  4. C                                                                            *
  5. C  This program demonstrates several methods of fading in an image from an   *
  6. C  off-screen video page using either Fastgraph or Fastgraph/Light.  The set *
  7. C  of routines provided herein are written for 320 x 200 graphics video      *
  8. C  modes, but they could easily be extended to work in other resolutions.    *
  9. C                                                                            *
  10. C  The examples are by no means all inclusive.  Rather, their purpose is to  *
  11. C  illustrate a few methods of creating special effects with Fastgraph or    *
  12. C  Fastgraph/Light.                                                          *
  13. C                                                                            *
  14. C  To compile this program and link it with Fastgraph:                       *
  15. C                                                                            *
  16. C     FL /FPi /4I2 /4Nt /AM EFFECTS.FOR /link FGM                            *
  17. C                                                                            *
  18. C  This program also can be linked with Fastgraph/Light if you replace the   *
  19. C  FGM library reference with FGLM.                                          *
  20. C                                                                            *
  21. C  Fastgraph (tm) and Fastgraph/Light (tm) are graphics libraries published  *
  22. C  by Ted Gruber Software.  For more info, please call, write, or FAX.       *
  23. C                                                                            *
  24. C  Ted Gruber Software                           orders/info (702) 735-1980  *
  25. C  PO Box 13408                                          FAX (702) 735-4603  *
  26. C  Las Vegas, NV  89112                                  BBS (702) 796-7134  *
  27. C                                                                            *
  28. C*****************************************************************************
  29.  
  30. $INCLUDE: 'C:\FG\INTRFACE.FOR'
  31.  
  32.       PROGRAM MAIN
  33.  
  34.       INTEGER DELAY, SCROLL_DELAY
  35.       COMMON  DELAY, SCROLL_DELAY
  36.  
  37.       INTEGER OLD_MODE, NEW_MODE
  38.       INTEGER COUNT
  39.       INTEGER STATUS
  40.       INTEGER*4 START_TIME
  41.  
  42.       INTEGER FG_ALLOCATE, FG_FREEPAGE
  43.       INTEGER FG_BESTMODE, FG_GETMODE, FG_MEASURE
  44.       INTEGER*4 FG_GETCLOCK
  45.  
  46. C *** make sure a 320 x 200 color graphics mode is available
  47.  
  48.       NEW_MODE = FG_BESTMODE(320,200,2)
  49.       IF (NEW_MODE .LT. 0 .OR. NEW_MODE .EQ. 12) THEN
  50.          STOP 'This program requires a 320 x 200 color graphics mode.'
  51.       END IF
  52.  
  53. C *** determine the number of delay units per half clock tick
  54.  
  55.       DELAY = FG_MEASURE() / 2
  56.  
  57. C *** initialize Fastgraph for the selected video mode
  58.  
  59.       OLD_MODE = FG_GETMODE()
  60.       CALL FG_SETMODE(NEW_MODE)
  61.       STATUS = FG_ALLOCATE(1)
  62.       
  63. C *** display a packed pixel run file on a hidden page
  64.  
  65.       CALL FG_SETHPAGE(1)
  66.       CALL FG_SETPAGE(1)
  67.       CALL FG_MOVE(0,199)
  68.       CALL FG_DISPFILE('FG.PPR'//CHAR(0),320,1)
  69.       CALL FG_SETPAGE(0)
  70.  
  71. C *** compute the number of delay units needed to make the text scroll
  72. C *** down at the same rate, regardless of the CPU speed or video mode
  73.  
  74.       COUNT = 0
  75.       CALL FG_WAITFOR(1)
  76.       START_TIME = FG_GETCLOCK()
  77. 10    CALL FG_SCROLL(0,319,0,7,4,1)
  78.       COUNT = COUNT + 1
  79.       IF (FG_GETCLOCK() .EQ. START_TIME) GO TO 10
  80.  
  81.       SCROLL_DELAY = (DELAY / 8) - (DELAY * 2) / COUNT
  82.       IF (SCROLL_DELAY .LT. 0) SCROLL_DELAY = 0
  83.  
  84. C *** demonstrate the inward tunnel effect
  85.  
  86.       CALL ANNOUNCE('inward tunnel effect')
  87.       CALL INWARD_TUNNEL_EFFECT(0)
  88.       CALL FG_WAITFOR(27)
  89.       CALL ANNOUNCE('inward tunnel effect with delay')
  90.       CALL INWARD_TUNNEL_EFFECT(DELAY)
  91.       CALL FG_WAITFOR(27)
  92.  
  93. C *** demonstrate the outward tunnel effect
  94.  
  95.       CALL ANNOUNCE('outward tunnel effect')
  96.       CALL OUTWARD_TUNNEL_EFFECT(0)
  97.       CALL FG_WAITFOR(27)
  98.       CALL ANNOUNCE('outward tunnel effect with delay')
  99.       CALL OUTWARD_TUNNEL_EFFECT(DELAY)
  100.       CALL FG_WAITFOR(27)
  101.  
  102. C *** demonstrate the diagonal fade
  103.  
  104.       CALL ANNOUNCE('diagonal fade')
  105.       CALL DIAGONAL_FADE(0)
  106.       CALL FG_WAITFOR(27)
  107.       CALL ANNOUNCE('diagonal fade with delay')
  108.       CALL DIAGONAL_FADE(DELAY/2)
  109.       CALL FG_WAITFOR(27)
  110.  
  111. C *** demonstrate the horizontal random fade
  112.  
  113.       CALL ANNOUNCE('horizontal random fade')
  114.       CALL HORIZONTAL_RANDOM_FADE(DELAY)
  115.       CALL FG_WAITFOR(27)
  116.  
  117. C *** demonstrate the curtain effect
  118.  
  119.       CALL ANNOUNCE('curtain')
  120.       CALL CURTAIN(DELAY/8)
  121.       CALL FG_WAITFOR(27)
  122.  
  123. C *** demonstrate the spiral effect
  124.  
  125.       CALL ANNOUNCE('spiral')
  126.       CALL SPIRAL_NORMAL(DELAY*2)
  127.       CALL FG_WAITFOR(27)
  128.  
  129. C *** demonstrate the layered spiral effect
  130.  
  131.       CALL ANNOUNCE('layered spiral')
  132.       CALL SPIRAL_LAYERED(DELAY)
  133.       CALL FG_WAITFOR(27)
  134.  
  135. C *** demonstrate the dual spiral effect
  136.  
  137.       CALL ANNOUNCE('dual spiral')
  138.       CALL SPIRAL_DUAL(DELAY/2)
  139.       CALL FG_WAITFOR(27)
  140.  
  141. C *** demonstrate the split screen effect
  142.  
  143.       CALL ANNOUNCE('split screen')
  144.       CALL SPLIT_SCREEN(DELAY/2)
  145.       CALL FG_WAITFOR(27)
  146.  
  147. C *** demonstrate the unveil effect
  148.  
  149.       CALL ANNOUNCE('unveil')
  150.       CALL UNVEIL(DELAY/4)
  151.       CALL FG_WAITFOR(27)
  152.  
  153. C *** demonstrate the "venetian blind" effect
  154.  
  155.       CALL ANNOUNCE('venetian blind')
  156.       CALL VENETIAN_BLIND(DELAY)
  157.       CALL FG_WAITFOR(27)
  158.  
  159. C *** restore the original video mode and screen attributes
  160.  
  161.       STATUS = FG_FREEPAGE(1)
  162.       CALL FG_SETMODE(OLD_MODE)
  163.       CALL FG_RESET
  164.  
  165.       STOP ' '
  166.       END
  167.  
  168. C*****************************************************************************
  169. C                                                                            *
  170. C  ANNOUNCE                                                                  *
  171. C                                                                            *
  172. C  Display the name of the special effect we're about to see.                *
  173. C                                                                            *
  174. C*****************************************************************************
  175.  
  176.       SUBROUTINE ANNOUNCE(MESSAGE)
  177.       CHARACTER*(*) MESSAGE
  178.  
  179.       INTEGER LENGTH, Y
  180.  
  181. C *** clear the screen
  182.  
  183.       CALL FG_ERASE
  184.  
  185. C *** display the specified message at the top row
  186.  
  187.       CALL FG_SETCOLOR(15)
  188.       LENGTH = LEN(MESSAGE)
  189.       CALL FG_LOCATE(0,20-LENGTH/2)
  190.       CALL FG_TEXT(MESSAGE,LENGTH)
  191.  
  192. C *** scroll the message to the center of the screen
  193.  
  194.       CALL FG_SETCOLOR(0)
  195.  
  196.       DO 10 Y = 0,95,4
  197.          CALL FG_SCROLL(0,319,Y,Y+7,4,1)
  198.          CALL FG_STALL(SCROLL_DELAY)
  199. 10    CONTINUE
  200.  
  201. C *** wait 1.5 seconds
  202.  
  203.       CALL FG_WAITFOR(27)
  204.  
  205.       RETURN
  206.       END
  207.  
  208. C*****************************************************************************
  209. C                                                                            *
  210. C  IRANDOM                                                                   *
  211. C                                                                            *
  212. C  Random number generator used in some of the effects.  It returns an       *
  213. C  integer between min and max inclusive.                                    *
  214. C                                                                            *
  215. C*****************************************************************************
  216.  
  217.       INTEGER FUNCTION IRANDOM(MIN,MAX)
  218.       INTEGER MIN, MAX
  219.  
  220.       INTEGER SEED, TEMP
  221.       DATA SEED /12345/
  222.  
  223.       TEMP = IEOR(SEED,ISHFT(SEED,-7))
  224.       SEED = IAND(IEOR(ISHFT(TEMP,8),TEMP),#7FFF)
  225.       IRANDOM = MOD(SEED,MAX-MIN+1) + MIN
  226.  
  227.       RETURN
  228.       END
  229.  
  230. C*****************************************************************************
  231. C                                                                            *
  232. C  CURTAIN                                                                   *
  233. C                                                                            *
  234. C  Reveal each row, one at a time, starting from the bottom and proceeding   *
  235. C  to the top.  This gives the effect of a curtain rising, hence the name.   *
  236. C                                                                            *
  237. C*****************************************************************************
  238.  
  239.       SUBROUTINE CURTAIN(DELAY)
  240.       INTEGER DELAY
  241.  
  242.       INTEGER Y
  243.  
  244.       DO 10 Y = 199,0,-1
  245.          CALL FG_RESTORE(0,319,Y,Y)
  246.          CALL FG_STALL(DELAY)
  247. 10    CONTINUE
  248.  
  249.       RETURN
  250.       END
  251.  
  252. C***************************************************************************** 
  253. C                                                                            *
  254. C  DIAGONAL_FADE                                                             *
  255. C                                                                            *
  256. C  This reveals the hidden page in two diagonal segments, separated by an    *
  257. C  imaginary line extending from the lower left corner to the upper right    *
  258. C  corner of the screen.  We start with the top line of the left segment and *
  259. C  the bottom line of the right segment, and continue until the entire       *
  260. C  screen is revealed.                                                       *
  261. C                                                                            *
  262. C*****************************************************************************
  263.  
  264.       SUBROUTINE DIAGONAL_FADE(DELAY)
  265.       INTEGER DELAY
  266.  
  267.       INTEGER XMIN, XMAX
  268.       INTEGER YMIN, YMAX
  269.  
  270.       XMIN = 0
  271.       XMAX = 319
  272.       YMIN = 0
  273.       YMAX = 199
  274.  
  275. 10    IF (XMAX .GT. 0) THEN
  276.          CALL FG_RESTORE(0,XMAX,YMIN,YMIN+4)
  277.          CALL FG_RESTORE(XMIN,319,YMAX-4,YMAX)
  278.          CALL FG_STALL(DELAY)
  279.  
  280.          XMIN = XMIN + 8
  281.          XMAX = XMAX - 8
  282.          YMIN = YMIN + 5
  283.          YMAX = YMAX - 5
  284.          GO TO 10
  285.       ENDIF
  286.  
  287.       RETURN
  288.       END
  289.  
  290. C*****************************************************************************
  291. C                                                                            *
  292. C  HORIZONTAL_RANDOM_FADE                                                    *
  293. C                                                                            *
  294. C  In this effect, the screen is divided into a series of two-pixel high     *
  295. C  rows.  Each row is revealed in random parts from left to right.  This     *
  296. C  process repeats 20 times, once for each row.  At the end, a call to the   *
  297. C  CALL FG_restore routine guarantees that all rows are transferred.              *
  298. C                                                                            *
  299. C*****************************************************************************
  300.  
  301.       SUBROUTINE HORIZONTAL_RANDOM_FADE(DELAY)
  302.       INTEGER DELAY
  303.  
  304.       INTEGER I, J
  305.       INTEGER XWIDTH
  306.       INTEGER XMIN, XMAX
  307.       INTEGER Y
  308.       INTEGER XPOS(0:99)
  309.  
  310.       DO 10 J = 0,99
  311.          XPOS(J) = 0
  312. 10    CONTINUE
  313.  
  314.       DO 30 I = 1,20
  315.          DO 20 J = 0,99
  316.             XMIN = XPOS(J)
  317.             IF (XMIN .LT. 320) THEN
  318.                XMAX = XMIN + IRANDOM(1,10) * 8
  319.                IF (XMAX .GT. 320) XMAX = 320
  320.                Y = J * 2
  321.                CALL FG_RESTORE(XMIN,XMAX-1,Y,Y+1)
  322.                XPOS(J) = XMAX
  323.             END IF
  324. 20       CONTINUE
  325.          CALL FG_STALL(DELAY)
  326. 30    CONTINUE
  327.  
  328. C *** make sure we got them all
  329.  
  330.       CALL FG_RESTORE(0,319,0,199)
  331.  
  332.       RETURN
  333.       END
  334.  
  335. C*****************************************************************************
  336. C                                                                            *
  337. C  INWARD_TUNNEL_EFFECT                                                      *
  338. C                                                                            *
  339. C  Starting at the screen edges, reveal the screen through a series of       *
  340. C  concentric hollow rectangles.                                             *
  341. C                                                                            *
  342. C*****************************************************************************
  343.  
  344.       SUBROUTINE INWARD_TUNNEL_EFFECT(DELAY)
  345.       INTEGER DELAY
  346.  
  347.       INTEGER XMIN, XMAX
  348.       INTEGER YMIN, YMAX
  349.  
  350.       XMIN = 0
  351.       XMAX = 319
  352.       YMIN = 0
  353.       YMAX = 199
  354.  
  355. 10    IF (XMIN .LT. XMAX) THEN
  356.          CALL FG_RESTORE(0,319,YMIN,YMIN+4)
  357.          CALL FG_RESTORE(XMAX-7,XMAX,0,199)
  358.          CALL FG_RESTORE(0,319,YMAX-4,YMAX)
  359.          CALL FG_RESTORE(XMIN,XMIN+7,0,199)
  360.          CALL FG_STALL(DELAY)
  361.  
  362.          XMIN = XMIN + 8
  363.          XMAX = XMAX - 8
  364.          YMIN = YMIN + 5
  365.          YMAX = YMAX - 5
  366.          GO TO 10
  367.       ENDIF
  368.  
  369.       RETURN
  370.       END
  371.  
  372. C*****************************************************************************
  373. C                                                                            *
  374. C  OUTWARD_TUNNEL_EFFECT                                                     *
  375. C                                                                            *
  376. C  Starting at the screen center, reveal the screen through a series of      *
  377. C  concentric hollow rectangles.                                             *
  378. C                                                                            *
  379. C*****************************************************************************
  380.  
  381.       SUBROUTINE OUTWARD_TUNNEL_EFFECT(DELAY)
  382.       INTEGER DELAY
  383.  
  384.       INTEGER XMIN, XMAX
  385.       INTEGER YMIN, YMAX
  386.  
  387.       XMIN = 152
  388.       XMAX = 167
  389.       YMIN = 95
  390.       YMAX = 104
  391.  
  392. 10    IF (XMIN .GE. 0) THEN
  393.          CALL FG_RESTORE(XMIN,XMAX,YMIN,YMIN+5)
  394.          CALL FG_RESTORE(XMAX-7,XMAX,YMIN,YMAX)
  395.          CALL FG_RESTORE(XMIN,XMAX,YMAX-4,YMAX)
  396.          CALL FG_RESTORE(XMIN,XMIN+7,YMIN,YMAX)
  397.          CALL FG_STALL(DELAY)
  398.  
  399.          XMIN = XMIN - 8
  400.          XMAX = XMAX + 8
  401.          YMIN = YMIN - 5
  402.          YMAX = YMAX + 5
  403.          GO TO 10
  404.       ENDIF
  405.  
  406.       RETURN
  407.       END
  408.  
  409. C*****************************************************************************
  410. C                                                                            *
  411. C  SPIRAL_DUAL                                                               *
  412. C                                                                            *
  413. C  In this effect, we reveal the screen through two spirals.  One spiral     *
  414. C  emanates clockwise from the screen edges to the screen center, while the  *
  415. C  other emanates counterclockwise from the center to the screen edges.      *
  416. C                                                                            *
  417. C*****************************************************************************
  418.  
  419.       SUBROUTINE SPIRAL_DUAL(DELAY)
  420.       INTEGER DELAY
  421.  
  422.       INTEGER XMIN_OUTER, XMAX_OUTER
  423.       INTEGER YMIN_OUTER, YMAX_OUTER
  424.       INTEGER XMIN_INNER, XMAX_INNER
  425.       INTEGER YMIN_INNER, YMAX_INNER
  426.  
  427.       XMIN_OUTER = 0
  428.       XMAX_OUTER = 319
  429.       YMIN_OUTER = 0
  430.       YMAX_OUTER = 199
  431.  
  432.       XMIN_INNER = 152
  433.       XMAX_INNER = 167
  434.       YMIN_INNER = 95
  435.       YMAX_INNER = 104
  436.  
  437. 10    IF (XMIN_OUTER .LT. XMIN_INNER) THEN
  438.          CALL FG_RESTORE(XMIN_OUTER,XMAX_OUTER,YMIN_OUTER,YMIN_OUTER+4)
  439.          CALL FG_STALL(DELAY)
  440.          CALL FG_RESTORE(XMIN_INNER,XMAX_INNER,YMAX_INNER-4,YMAX_INNER)
  441.          CALL FG_STALL(DELAY)
  442.          CALL FG_RESTORE(XMAX_OUTER-7,XMAX_OUTER,YMIN_OUTER,YMAX_OUTER)
  443.          CALL FG_STALL(DELAY)
  444.          CALL FG_RESTORE
  445.      +      (XMAX_INNER+1,XMAX_INNER+8,YMIN_INNER,YMAX_INNER)
  446.          CALL FG_STALL(DELAY)
  447.          CALL FG_RESTORE(XMIN_OUTER,XMAX_OUTER,YMAX_OUTER-4,YMAX_OUTER)
  448.          CALL FG_STALL(DELAY)
  449.          CALL FG_RESTORE
  450.      +      (XMIN_INNER-8,XMAX_INNER,YMIN_INNER,YMIN_INNER+4)
  451.          CALL FG_STALL(DELAY)
  452.          CALL FG_RESTORE(XMIN_OUTER,XMIN_OUTER+7,YMIN_OUTER,YMAX_OUTER)
  453.          CALL FG_STALL(DELAY)
  454.          CALL FG_RESTORE
  455.      +      (XMIN_INNER-8,XMIN_INNER-1,YMIN_INNER,YMAX_INNER+5)
  456.          CALL FG_STALL(DELAY)
  457.  
  458.          XMIN_OUTER = XMIN_OUTER + 8
  459.          XMAX_OUTER = XMAX_OUTER - 8
  460.          YMIN_OUTER = YMIN_OUTER + 5
  461.          YMAX_OUTER = YMAX_OUTER - 5
  462.  
  463.          XMIN_INNER = XMIN_INNER - 8
  464.          XMAX_INNER = XMAX_INNER + 8
  465.          YMIN_INNER = YMIN_INNER - 5
  466.          YMAX_INNER = YMAX_INNER + 5
  467.  
  468.          GO TO 10
  469.       END IF
  470.  
  471.       RETURN
  472.       END
  473.  
  474. C*****************************************************************************
  475. C                                                                            *
  476. C  SPIRAL_LAYERED                                                            *
  477. C                                                                            *
  478. C  This effect is similar to the normal spiral.  Instead of revealing the    *
  479. C  screen in one iteration, this effect does so in four iterations (layers), *
  480. C  each moving more toward the screen center.                                *
  481. C                                                                            *
  482. C*****************************************************************************
  483.  
  484.       SUBROUTINE SPIRAL_LAYERED(DELAY)
  485.       INTEGER DELAY
  486.  
  487.       INTEGER I
  488.       INTEGER XMIN, XMAX
  489.       INTEGER YMIN, YMAX
  490.  
  491.       DO 20 I = 0,3
  492.          XMIN = I * 8
  493.          XMAX = 319 - XMIN
  494.          YMIN = I * 5
  495.          YMAX = 199 - YMIN
  496.  
  497. 10       IF (XMIN .LT. XMAX) THEN
  498.             CALL FG_RESTORE(XMIN,XMAX,YMIN,YMIN+4)
  499.             CALL FG_STALL(DELAY)
  500.             CALL FG_RESTORE(XMAX-7,XMAX,YMIN,YMAX)
  501.             CALL FG_STALL(DELAY)
  502.             CALL FG_RESTORE(XMIN,XMAX,YMAX-4,YMAX)
  503.             CALL FG_STALL(DELAY)
  504.             CALL FG_RESTORE(XMIN,XMIN+7,YMIN,YMAX)
  505.             CALL FG_STALL(DELAY)
  506.  
  507.             XMIN = XMIN + 32
  508.             XMAX = XMAX - 32
  509.             YMIN = YMIN + 20
  510.             YMAX = YMAX - 20
  511.             GO TO 10
  512.          END IF
  513. 20    CONTINUE
  514.  
  515.       RETURN
  516.       END
  517.  
  518. C*****************************************************************************
  519. C                                                                            *
  520. C  SPIRAL_NORMAL                                                             *
  521. C                                                                            *
  522. C  This is a spiral effect in which we reveal the screen as a series of      *
  523. C  rectangles, emanating from the screen edges and proceeding clockwise to   *
  524. C  the center of the screen.                                                 *
  525. C                                                                            *
  526. C*****************************************************************************
  527.  
  528.       SUBROUTINE SPIRAL_NORMAL(DELAY)
  529.       INTEGER DELAY
  530.  
  531.       INTEGER XMIN, XMAX
  532.       INTEGER YMIN, YMAX
  533.  
  534.       XMIN = 0
  535.       XMAX = 319
  536.       YMIN = 0
  537.       YMAX = 199
  538.  
  539. 10    IF (XMIN .LT. XMAX) THEN
  540.          CALL FG_RESTORE(XMIN,XMAX,YMIN,YMIN+19)
  541.          CALL FG_STALL(DELAY)
  542.          CALL FG_RESTORE(XMAX-31,XMAX,YMIN,YMAX)
  543.          CALL FG_STALL(DELAY)
  544.          CALL FG_RESTORE(XMIN,XMAX,YMAX-19,YMAX)
  545.          CALL FG_STALL(DELAY)
  546.          CALL FG_RESTORE(XMIN,XMIN+31,YMIN,YMAX)
  547.          CALL FG_STALL(DELAY)
  548.  
  549.          XMIN = XMIN + 32
  550.          XMAX = XMAX - 32
  551.          YMIN = YMIN + 20
  552.          YMAX = YMAX - 20
  553.          GO TO 10
  554.       END IF
  555.  
  556.       RETURN
  557.       END
  558.  
  559. C*****************************************************************************
  560. C                                                                            *
  561. C  SPLIT_SCREEN                                                              *
  562. C                                                                            *
  563. C  Reveal the top half of from left to right while revealing the bottom half *
  564. C  from right to left.                                                       *
  565. C                                                                            *
  566. C*****************************************************************************
  567.  
  568.       SUBROUTINE SPLIT_SCREEN(DELAY)
  569.       INTEGER DELAY
  570.  
  571.       INTEGER XMIN, XMAX
  572.  
  573.       XMIN = 0
  574.       XMAX = 319
  575.  
  576. 10    IF (XMAX .GT. 0) THEN
  577.          CALL FG_RESTORE(XMIN,XMIN+7,0,99)
  578.          CALL FG_RESTORE(XMAX-7,XMAX,100,199)
  579.          CALL FG_STALL(DELAY)
  580.          XMIN = XMIN + 8
  581.          XMAX = XMAX - 8
  582.          GO TO 10
  583.       END IF
  584.  
  585.       RETURN
  586.       END
  587.  
  588. C*****************************************************************************
  589. C                                                                            *
  590. C  UNVEIL                                                                    *
  591. C                                                                            *
  592. C  Starting at the center, reveal the screen in small horizontal increments  *
  593. C  until we reach the left and right edges.                                  *
  594. C                                                                            *
  595. C*****************************************************************************
  596.  
  597.       SUBROUTINE UNVEIL(DELAY)
  598.       INTEGER DELAY
  599.  
  600.       INTEGER XMIN, XMAX
  601.  
  602.       XMIN = 152
  603.       XMAX = 167
  604.  
  605. 10    IF (XMIN .GE. 0) THEN
  606.          CALL FG_RESTORE(XMIN,XMIN+7,0,199)
  607.          CALL FG_RESTORE(XMAX-7,XMAX,0,199)
  608.          CALL FG_STALL(DELAY)
  609.          XMIN = XMIN - 8
  610.          XMAX = XMAX + 8
  611.          GO TO 10
  612.       END IF
  613.  
  614.       RETURN
  615.       END
  616.  
  617. C*****************************************************************************
  618. C                                                                            *
  619. C  VENETIAN_BLIND                                                            *
  620. C                                                                            *
  621. C  Reveal the screen in four iterations, each revealing every fourth row.    *
  622. C  The effect produced resembles opening a Venetian blind.                   *
  623. C                                                                            *
  624. C*****************************************************************************
  625.  
  626.       SUBROUTINE VENETIAN_BLIND(DELAY)
  627.       INTEGER DELAY
  628.  
  629.       INTEGER Y
  630.  
  631.       DO 10 Y = 0,199,4
  632.          CALL FG_RESTORE(0,319,Y,Y)
  633. 10    CONTINUE
  634.       CALL FG_STALL(DELAY)
  635.  
  636.       DO 20 Y = 1,199,4
  637.          CALL FG_RESTORE(0,319,Y,Y)
  638. 20    CONTINUE
  639.       CALL FG_STALL(DELAY)
  640.  
  641.       DO 30 Y = 2,199,4
  642.          CALL FG_RESTORE(0,319,Y,Y)
  643. 30    CONTINUE
  644.       CALL FG_STALL(DELAY)
  645.  
  646.       DO 40 Y = 3,199,4
  647.          CALL FG_RESTORE(0,319,Y,Y)
  648. 40    CONTINUE
  649.       CALL FG_STALL(DELAY)
  650.  
  651.       RETURN
  652.       END
  653.