Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>savescreen() - save a screen to a memory variable</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     savescreen() - save a screen to a memory variable
  Usage:    <string> = savescreen([<r1>,<c1>,<r2>,<c2>],[<screen>])
  Params:   optional integers <r1>,<c1>,<r2>,<c2> - the four
            coordinates of the screen to save where <r1> is the
            top row, <c1> is the left column, <r2> is the bottom
            row and <c2> is the right column. If these four
            parameters are omitted then the entire screen is saved.
            The entire screen size can be changed when the setscreen()
            function is used.

            string <screen> - a previously saved full screen
            optionally you can pass savescreen() a previously
            saved screen as the fifth parameter. If a fifth
            parameter is found, then the portion of the screen you
            want to save will be saved from that variable instead
            of the real video buffer. This is useful to re-paint
            windows on the screen without the annoying flicker since
            you can restore only a portion of the previously saved
            screen to the video buffer. To save a screen from a
            previously saved screen you must pass all the row column
            coordinates, and the previously saved screen must be
            a full screen unless you have redefined the max/min
            row/col coordinates via setscreen().

  Returns:  a string memory variable that contains the contents
            of the screen you are saving.

 ---------------------------------- Example ---------------------------------

                 * save the entire screen
                 tempscrn = savescreen()

                 * draw a box
                 box(10,10,23,60,"",23)

                 * wait a minute
                 waitkey(1092)

                 * move the box
                 box(10,15,23,65,"",23)

                 * repaint the screen only where the box was,
                 * without restoring the whole screen
                 smallscrn = savescreen(10,10,23,14,tempscrn)
                 restscreen(10,10,23,14,smallscrn)

  Note:     You can use a screen saved by savescreen() as a virtual
            video page in memory. See the setscreen() function.
            You can also save a screen from a virtual page in memory,
            or you can resize the virtual screen with setscreen()
            and restore the portion of the re-sized screen to the real
            video screen. Using setscreen() and virtual screens, you
            can create fast and interesting effects such as wipes
            and scrolling of windows and screens.


See Also: restscreen() initscreen() scrtodisk() disktoscr()

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