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 - detectmaxrowcol() autodetect the current screen size http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 detectmaxrowcol()   Autodetect the current screen size
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc detectmaxrowcol extern

 Arguments
   None.

 Return
   None.

 Description
   This routine reads the current video mode and automatically sets the
   system variables __max_row and __max_col to the currently available
   number of screen rows and columns.

   This procedure is automatically called at start-up to adjust the
   contents of __max_row and __max_col according to the current video mode.
   Therefore, you normally need to call this procedure only after changing
   the video mode from within an application.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_detectmaxrowcol
   ? __max_row, __max_col        // print current values
   // here run an external program that changes screen mode
   ? __max_row, __max_col        // still print the same values
   detectmaxrowcol()             // detect change in screen dimensions
   ? __max_row, __max_col        // print updated values
   endproc

   proc main
   Test_detectmaxrowcol()
   endproc

See Also: __max_col __max_row setmaxrowcol()

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