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]
 ---------------------------------------------------------------------------
 qstoretoscr                                                           QWIKC
 ---------------------------------------------------------------------------
 Function       Writes a rows-by-columns block to the current screen from
                memory.
 Syntax         void qstoretoscr( unsigned char row, unsigned char col,
                                  unsigned char rows, unsigned char cols,
                                  void far *source );
 Remarks        row and col locates the upper left corner of the block on
                the current screen as specified by qscr.  A block will be
                written from source, which is one contiguous array, and
                placed on the screen as a rows-by-cols block.  By changing
                qscr, you can even place blocks to virtual screens!  Be sure
                to set qsnow to 0 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) in the
                heap, clear the screen, and restore the block:

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

   #define memrows 12
   #define memcols 40

   /* Storage size in bytes required is: rows * cols << 1 */
   int *block;

   main() {
       qinit();
       qfill( 1, 1, crt_rows, crt_cols, WHITE+BLUE_BG, '*' ); /* Fill CRT */
       block=malloc(memrows * memcols << 1);              /* Reserve heap */
       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 */
       free(block);                                          /* Free heap */
       getch();
       return;
   }


See Also: qstoretomem()

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