Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QWIKC20 & Multi-Level Virtual Windows - <b>---------------------------------------------------------------------------</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ---------------------------------------------------------------------------
 qstoretomem                                                           QWIKC
 ---------------------------------------------------------------------------
 Function       Saves a rows-by-columns block from the current screen to
                memory.
 Syntax         void qstoretomem( unsigned char row, unsigned char col,
                                  unsigned char rows, unsigned char cols,
                                  void far *dest );
 Remarks        row, col, rows, and cols locates the block on the current
                screen as specified by qscr.  This block will be copied to
                dest, the destination, as one contiguous array.  By changing
                qscr, you can even save blocks from virtual screens!  Be
                sure to set qsnow to false for the fastest speed on virtual
                screens.
 Return value   None.
 Screens        All video pages and virtual screens.
 EOS            Unaltered.
 Restrictions   Stay within the screen limits.  Not intended for copying
                between video pages (esp. CGA).
 Example        Save a 12x40 block from the CRT screen at (5,10), clear the
                screen, and restore the block:

   #include <stdio.h>
   #include <conio.h>
   #include "qwikc20.h"

   #define memrows 12
   #define memcols 40

   /* Storage size in bytes required is: rows * cols >> 1 */
   int block[memrows][memcols];    /* 12 x 40 block */

   main() {
       qinit();
       qfill( 1, 1, crt_rows, crt_cols, WHITE+BLUE_BG, '*'); /* Fill CRT */
       qstoretomem( 5, 10, memrows, memcols, block );      /* Save block */
       qfill(1,1, crt_rows, crt_cols, YELLOW+BLACK_BG,' '); /* Clear CRT */
       qstoretoscr( 5, 10, memrows, memcols, block );     /* Take a look */
       getch();

       return;
   }


See Also: qstoretoscr()

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