Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>pull_drape() / save_drape()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PULL_DRAPE() / SAVE_DRAPE()

    Have you ever seen a commercial software package that displayed the
    title screen as though curtains were being drawn back?  PULL_DRAPE()
    and SAVE_DRAPE() allow you to do pull it off, and in 100% good old
    Clipper.

    First, you must prepare a screen file by using SAVE_DRAPE(). Paint
    your screen, then call SAVE_DRAPE() with the following syntax:

    SAVE_DRAPE(<screen file>)

    Required Parameter

    <screen file> is the name of the file to save the screen in.

    Note that this does not merely SAVE SCREEN TO; it chops the screen
    into 80 buffers, one for each column.  This is the only way that
    this effect will work properly.

    When you want to restore the screen with the curtain effect, use
    PULL_DRAPE().  This function restores the screen column by column
    starting from the middle and working its way outwards to the left
    and right edges of the screen.  Syntax for PULL_DRAPE() is:

    PULL_DRAPE(<screen file> [, <delay>])

    Required Parameter

    <screen file> is the name of the file containing the saved screen.

    Optional Parameter

    <delay> is a numeric expression representing the delay factor to use
    in opening the drapes.  Values between 10 and 100 are recommended,
    although you should experiment to determine what works best on your
    particular computer.  The default delay setting is 20.

    Sample Usage

    The following pseudo-code illustrates how you may wish to use
    PULL_DRAPE() and SAVE_DRAPE() in your program.  Although you may be
    tempted to delete the screen-painting code once you have created
    your screen file, I strongly advise that you leave it in, in the
    event that the screen file gets misplaced or deleted.  This example
    assumes that our screen file is called TITLE.SCR.

    IF FILE('title.scr')                      
       PULL_DRAPE('title.scr', 25)            
    ELSE                                      
       |                                      
       | code to display your title screen    
       | throw in TTY() to keep it interesting
       |                                      
       ** create screen file for next time    
       SAVE_DRAPE('title.scr')                
    ENDIF                                     

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson