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 - scrndirect() set up direct screen driver http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 scrndirect()        Set up direct screen driver
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc scrndirect extern

 Arguments
   None.

 Return
   None.

 Description
   The scrndirect() procedure channels Force screen output directly to
   video memory, bypassing the BIOS and DOS routines for video hardware.

   The Force runtime library contains replaceable drivers for screen and
   keyboard I/O. Force library contains three standard modules for screen
   output: scrndos(), scrnbios() and scrndirect(). The default screen driver
   is scrndirect().

   The screen drivers affect any command that can be sent to an
   alternate file. It does not redirect the output of the say or get
   commands, which have a different output system.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_scrndirect
   // default screen driver is the direct screen driver
   ? "This line only appears on screen"
   scrndos()
   ? "This output is redirectable to a file when invoked"
   ? "like test.exe > output.txt"
   wait
   scrndirect()
   @ row() + 3, col()                   // correct cursor position
   ? "This line will again not go to the redirected output"
   endproc

   proc main
   Test_scrndirect()
   endproc

See Also: scrnbios() scrndos() scrndriver()

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