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>restscreen() - restore a screen from a memory variable</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     restscreen() - restore a screen from a memory variable
  Usage:    restscreen([<r1>,<c1>,<r2>,<c2>],<memvar>)
  Params:   integer <r1> - top row
            integer <c1> - left column
            integer <r2> - bottom row
            integer <c2> - right column
            string <memvar> - the screen variable created by a
            previous savescreen().

            the 4 row/col coordinates are optional. If left off
            the entire screen is assumed.

  Returns:  nothing

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

                 screen = savescreen()
                 * saves the entire screen

                 do something

                 restscreen(screen)
                 * restores the entire screen

                 screen2 = savescreen(10,10,20,70,screen)
                 * saves a portion of the screen from the
                 * previously saved screen to screen2

                 restscreen(10,10,20,70,screen2)
                 * restores a portion of a previously saved
                 * screen to the video buffer.

                 setscreen(screen)
                 restscreen(10,10,20,70,screen2)
                 setscreen()
                 * restores screen2 into <screen> without it
                 * appearing on the video page being displayed.

  Note:     You can only save a screen from a previously saved
            screen if the original screen variable was a full screen
            or you used the setscreen() function to re-size the
            screen as a virtual window. The virtual window is one you
            created through savescreen() or initscreen(). If you
            use setscreen() to re-size and point all video output to
            the new sized virtual screen, restscreen() will use the
            new size of the virtual screen as if it were a full screen.
            After you have re-sized the screen through the setscreen()
            function restscreen() uses the coordinates set by setscreen()
            as the screen size. that way you can restore screens out of
            virtual screens that are actually smaller than the size of the
            real video screen. To then restore the screen to the real
            screen, use setscreen() with no parameters to set all output
            back to the real video screen and restore the screen as you
            normally would using restscreen. Remember to pass the
            correct row and column coordinates to restscreen(). You can
            use screens saved by savescreen() as virtual pages in memory.
            You can also restore screens to virtual pages in memory, see
            setscreen()


See Also: savescreen() initscreen() setattr() scrtodisk() setscreen()

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