Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - restorearea() restore last saved screen http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 restorearea()       Restore last saved screen
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc restorearea extern

 Arguments
   None.

 Return
   None.

 Description
   The restorearea() procedure restores the last screen saved by either the
   savescreen() or savearea() procedure.

   The savearea() and restorearea() procedures behave as a stack. That is,
   the first item saved is the last item restored. Use savescrn() and
   restorescrn() routines if you require saving/restoring of screens in an
   arbitrary sequence.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_restorearea
   // As long as screens can be restored in the order they are saved, the
   // restorearea() function eliminates the need to manage screen variables.
   savescreen()               // #1 entire screen saved
   DrawScreen( 'a' )
   savearea( 0, 0, 4, 70 )    // #2
   DrawScreen( 'b' )
   savearea( 10, 20, 24, 40 ) // #3
   DrawScreen( 'c' )
   wait
   restorearea()              // restores screen 3
   wait
   restorearea()              // restores screen 2
   wait
   restorearea()              // restores entire screen
   wait
   endproc

   proc main
   Test_restorearea()
   endproc

See Also: savearea() savescreen()

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