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 - restoreareafromfile() restore screen area from a screen file http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 restoreareafromfile() Restore screen area from a screen file
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   func logical restoreareafromfile extern
   param const char cFile

 Arguments
   cFile is the name of the file containing saved screen image.

 Return
   A logical indicating the success of operation.

 Description
   This function restores a screen area from a disk file which was created
   by a prior call to saveareatofile().

   These functions make use of a special file format which also contains
   the coordinates of the saved area. Make sure that when restoring, the
   current screen size is the same as it was during save.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_restoreareafromfile
   DrawScreen( 'A' )                        // draw a screen
   saveareatofile( 0, 0, __max_row, __max_col, "screen.sav" ) // save screen
   wait
   DrawScreen( 'B' )                        // darw another screen
   wait
   restoreareafromfile( "screen.sav" )      // restore screen
   wait
   erase "screen.sav"                       // clean up
   endproc

   proc main
   Test_restoreareafromfile()
   endproc

See Also: saveareatofile()

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