home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-21 | 27.5 KB | 1,663 lines |
- .de }n
- .bp
- .sp .5i
- ..
- .wh -.8i }n
- .sp .5i
- .po -.4i
- .ll 7.5i
- .ps 9
- .vs 9
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_ADAPTER() Report the type of video adapter installed
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_ADAPTER()
- Report the type of video adapter installed
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_ADAPTER() -> nResult
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- Integer representing type of video adapter
- .sp
- .in 0.64i
- .br
- 0 - monochrome
- .br
- 1 - CGA
- .br
- 2 - EGA
- .br
- 3 - VGA
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function is valuable if you use a graphics library and need to
- know what type of graphics adapter is installed\.
- .sp
- The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
- To use another assembler, you will need to rearrange the PROC and
- SEGMENT directives, and also the ENDP and ENDS directives (a very
- minor task)\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- iVideo := FT_ADAPTER()
- .sp
- .br
- DO CASE
- .in 0.64i
- .br
- CASE iVideo == 0
- .in 0.88i
- .br
- QOUT( "You have a monochrome adapter\." )
- .in 0.64i
- .br
- CASE iVideo == 1
- .in 0.88i
- .br
- QOUT( "You have a CGA adapter\." )
- .in 0.64i
- .br
- CASE iVideo == 2
- .in 0.88i
- .br
- QOUT( "You have an EGA adapter\." )
- .in 0.64i
- .br
- CASE iVideo == 3
- .in 0.88i
- .br
- QOUT( "You have a VGA adapter\." )
- .in 0.4i
- .br
- ENDCASE
- .sp
- .in 0.08i
- \fBSource:\fR ADAPTER\.ASM
- .sp
- \fBAuthor:\fR Ted Means
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_SETMODE()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_CLS() Clear screen
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_CLS()
- Clear screen
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_CLS( <nTRow>, <nLCol>, <nBRow>, <nRCol>, <nColor> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- .ta 2.48i
- \fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR and \fB<nRCol>\fR are the screen coordinates
- .br
- .ta
- to clear\.
- .sp
- \fB<nColor>\fR is an integer representing the color attribute\.
- The formula is:
- .sp
- .in 0.56i
- nFore + ( nBack * 16 )
- .sp
- .in 0.4i
- The default is black\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This is a high speed function to clear the screen at the given
- coordinates with the given color attribute\. This does not change
- Clipper\'s color settings\. It uses direct video writes for speed\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 )
- .sp
- This example will clear the entire screen with the colors
- bright white on magenta\.
- .sp
- .in 0.08i
- \fBSource:\fR VIDEO1\.C
- .sp
- \fBAuthor:\fR Robert A\. DiFalco
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_GETMODE() Get the video mode
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_GETMODE()
- Get the video mode
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_GETMODE() -> nVMode
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The video mode, as a numeric\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- Use this function to find out what mode your display adapter is in\.
- Uses DOS interrupt 10h to get the mode\. For a table of modes
- available on various graphics adapters, refer to a book such
- as Wilton\'s "Programmer\'s Guide to PC & PS/2 Video Systems"
- (Microsoft Press)
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.64i
- function main( cMode )
- .sp
- .in 0.8i
- .br
- FT_SETMODE( val( cMode ) )
- .br
- QOut( "Video mode is: " + str( FT_GETMODE() ) )
- .br
- return ( nil )
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR VIDMODE\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_GETVCUR() Return info about the cursor on a specified video page
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_GETVCUR()
- Return info about the cursor on a specified video page
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_GETVCUR( [ <nPage> ] ) -> <aCurInfo>
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.32i
- \fB<nPage>\fR is the video page to get the cursor information for\.
- Defaults to the current page, as returned by FT_GETVPG()\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- A four-element array (<aCurInfo>), set up as follows:
- .sp
- .br
- aCurInfo[1] = Top line of cursor
- .br
- aCurInfo[2] = Bottom line of cursor
- .br
- aCurInfo[3] = Character row
- .br
- aCurInfo[4] = Character column
- .sp
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .sp
- .in 0.32i
- FT_GETVCUR() uses FT_INT86() to invoke interrupt 10h, function
- 3, to return the character cursor location for the specified
- video page\.
- .sp
- The top line and bottom line of cursor are set depending on
- the current cursor mode, and are only meaningful in alphanumeric
- video modes\.
- .sp
- For more information on graphics programming, cursors, and
- cursor modes, refer to Richard Wilton\'s _Programmer\'s Guide to
- PC and PS/2 Video Systems_ (Microsoft Press)\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .sp
- .in 0.4i
- .ta 2.24i
- .br
- aCurInfo := getVCur( 1 ) // Get info on cursor pos in page 1
- .br
- .ta
- .ta 3.12i
- .br
- QOut("Row: " + str( aCurInfo[3] ) + " Col: " + str( aCurInfo[4] ) )
- .br
- .ta
- .sp
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR VIDCUR\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_GETVPG() Get the currently selected video page
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_GETVPG()
- Get the currently selected video page
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_GETVPG() -> <nPage>
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- None\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The video page, as a numeric\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- Get the currently selected video page
- .sp
- For more information on graphics programming and video pages,
- consult a reference such as _Programmer\'s Guide to PC and PS/2
- Video Systems_ (Microsoft Press)\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- nPage := FT_GETVPG()
- .sp
- .in 0.08i
- \fBSource:\fR PAGE\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_SETVPG()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_RESTATT() Restore the attribute bytes of a specified screen region\.
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_RESTATT()
- Restore the attribute bytes of a specified screen region\.
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_RESTATT( <nTop>, <nLeft>, <nBottom>, <nRight>, <cAttributes> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, and \fB<nRight>\fR define the screen region\.
- \fB<cAttributes>\fR is a character string containing the attribute bytes
- .in 1.52i
- for the screen region\. This will most often be a string
- previously returned by FT_SAVEATT(), but any character
- string may be used (provided it is of the proper size)\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function is similar to Clipper\'s RestScreen(), except that it only
- restores the attribute bytes\. This is useful if you want to change the
- screen color without affecting the text\.
- .sp
- *** INTERNALS ALERT ***
- .sp
- This function calls the Clipper internal __gtMaxCol to obtain the
- maximum column value for the current video mode\. If you\'re too gutless
- to use internals, then this function isn\'t for you\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- // Restore attributes of row 4
- .br
- FT_RESTATT( 4, 0, 4, maxcol(), cBuffer)
- .sp
- .br
- // Restore attributes to middle of screen
- .br
- FT_RESTATT(10,20,14,59,cBuffer)
- .sp
- .in 0.08i
- \fBSource:\fR RESTATT\.ASM
- .sp
- \fBAuthor:\fR Ted Means
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_SAVEATT()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_REVATTR() Reverse colors of specified screen coordinates
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_REVATTR()
- Reverse colors of specified screen coordinates
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_REVATTR( <nTRow>, <nLCol>, <nBRow>, <nRCol> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR, and \fB<nRCol>\fR are the coordinates of the
- screen region\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This is a high speed function to reverse the color of a specified
- screen region without disturbing any text on the screen\. This
- function will correctly reverse the color attributes in a region
- containing multiple color combinations\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- FT_REVATTR( 0, 0, MaxRow(), MaxCol() )
- .sp
- This example will change the entire screen\'s colors to their reverse
- .ta 2.32i
- attributes without changing or overwriting any text\.
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR VIDEO1\.C
- .sp
- \fBAuthor:\fR Robert A\. DiFalco
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_REVCHR() Reverse the color of a single character on the screen
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_REVCHR()
- Reverse the color of a single character on the screen
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_REVCHR( <nTRow>, <nLCol> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTRow>\fR, \fB<nLCol>\fR are the screen coordinates of the character\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This is a high speed function to reverse the color of a single
- character on the screen without changing the character itself\.
- This function is the same as FT_REVATTR() except that it changes
- only one character on screen and hence is faster and uses less memory\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- FT_REVCHR( 10, 20 )
- .sp
- This example will change the text and background at 10, 20 to it\'s
- reverse color attributes without changing or overwriting the
- character itself\.
- .sp
- .in 0.08i
- \fBSource:\fR VIDEO1\.C
- .sp
- \fBAuthor:\fR Robert A\. DiFalco
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_RGNSTACK() Push or pop a saved screen region on or off the stack
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_RGNSTACK()
- Push or pop a saved screen region on or off the stack
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_RGNSTACK( <cAction>, [ <nTop> ], [ <nLeft> ], [ <nBottom> ],
- .in 0.64i
- \fB[ <nRight> ] ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<cAction>\fR determines what action FT_RGNSTACK() will take\. The
- allowable values for this parameter are "push", "pop", and "pop all"\.
- If the function is called with any other string as the first parameter
- no action is performed\.
- .sp
- \fB<cAction>\fR with a value of "push" will push a saved screen region onto
- the stack\. A value of "pop" will restore the most recently pushed
- screen region\. "pop all" tells the function to restore all screen
- images which are currently on the stack\.
- .sp
- The use of \fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, and \fB<nRight>\fR depends on the
- \fB<cAction>\fR parameter\. If \fB<cAction>\fR is "push", the next four parameters
- define the screen region to save\. If \fB<cAction>\fR is "pop" or "pop all"
- the following four parameters are ignored\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- FT_RGNSTACK() returns NIL\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_RGNSTACK() allows multiple screens to be saved and restored from
- a stack\. The stack is implemented with Clipper static array that is
- visible only to FT_RGNSTACK()\.
- .sp
- The purpose of FT_RGNSTACK() is to allow multiple screen regions to be
- managed without the need to remember the original coordinates or to
- create variables for each one\.
- .sp
- When called with "push", FT_RGNSTACK() places the saved screen area
- at the end of the static array\. The array size is incremented by one
- to accommodate the new screen area\.
- .sp
- When called with "pop", the function restores the screen image stored
- in the last element of the array, and the array size is decremented by
- one\. If "pop all" is specified, all the saved screens are restored
- until the array is empty\.
- .sp
- FT_RGNSTACK() calls FT_SAVRGN() and FT_RSTRGN()\. Refer to the
- documentation for these two functions for more information\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- The following example uses FT_RGNSTACK() to save and restore various
- sections of the screen\.
- .sp
- .ta 3.28i
- .br
- @ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1\'s
- .br
- .ta
- .ta 3.28i
- .br
- FT_RGNSTACK("push", 10, 05, 15, 15) // push a region
- .br
- .ta
- .ta 3.28i
- .br
- @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2\'s
- .br
- .ta
- .ta 3.28i
- .br
- FT_RGNSTACK("push", 10, 20, 15, 30) // push a region
- .br
- .ta
- .ta 3.28i
- .br
- @ 00, 00, 24, 79 BOX "333333333" // fill the screen with 3\'s
- .br
- .ta
- .ta 3.28i
- .br
- FT_RGNSTACK("push", 10, 35, 15, 45) // push a region
- .br
- .ta
- .ta 3.28i
- .br
- @ 00, 00, 24, 79 BOX "444444444" // fill the screen with 4\'s
- .br
- .ta
- .ta 3.28i
- .br
- FT_RGNSTACK("push", 10, 50, 15, 60) // push a region
- .br
- .ta
- .ta 3.28i
- .br
- @ 00, 00, 24, 79 BOX "555555555" // fill the screen with 5\'s
- .br
- .ta
- .ta 3.28i
- .br
- FT_RGNSTACK("push", 10, 65, 15, 75) // push a region
- .br
- .ta
- .br
- CLEAR
- .ta 2.08i
- .br
- FT_RGNSTACK("pop") // restore the 5\'s region
- .br
- .ta
- .ta 2.08i
- .br
- FT_RGNSTACK("pop") // restore the 4\'s region
- .br
- .ta
- .ta 2.08i
- .br
- FT_RGNSTACK("pop all") // restore the 3\'s, 2\'s and 1\'s regions
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR SCREGION\.PRG
- .sp
- \fBAuthor:\fR David A\. Richardson
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_SAVRGN()
- , FT_RSTRGN()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_RSTRGN() Restore region of the screen saved with FT_SAVRGN()
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_RSTRGN()
- Restore region of the screen saved with FT_SAVRGN()
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_RSTRGN( <cScreen>, [ <nTop> ], [ <nLeft> ] ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<cScreen>\fR is a screen region previously returned from FT_SAVRGN()\.
- .sp
- \fB<nTop>\fR and \fB<nLeft>\fR are optional parameters that define a new location
- for the upper left corner of the screen area contained in \fB<cScreen>\.
- Allowable values are 0 through 255\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- FT_RSTRGN() returns NIL\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_RSTRGN() restores a screen region previously saved with
- FT_SAVRGN()\. Calling FT_RSTRGN() with <cScreen> as the only
- parameter will restore the saved region to its original location\.
- <nTop> and <nLeft> may be used to define a new location for the
- upper left corner of the saved region\.
- .sp
- <nTop> and <nLeft> are dependent upon each other\. You may not
- specify one without the other\.
- .sp
- FT_RSTRGN() calls Clipper\'s RESTSCREEN()\. Refer to the Clipper
- documentation for more information regarding this function\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- The following example uses FT_RSTRGN() to restore a saved portion
- of the screen to different locations\.
- .sp
- .ta 3.04i
- .br
- @ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1\'s
- .br
- .ta
- .ta 3.04i
- .br
- cScreen = FT_SAVRGN(10, 10, 20, 30) // save a region
- .br
- .ta
- .ta 3.04i
- .br
- @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2\'s
- .br
- .ta
- .ta 3.04i
- .br
- FT_RSTRGN(cScreen) // restore the 1\'s region
- .br
- .ta
- .ta 3.04i
- .br
- @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2\'s
- .br
- .ta
- .ta 3.04i
- .br
- FT_RSTRGN(cScreen, 15, 15) // restore to a different location
- .br
- .ta
- .ta 3.04i
- .br
- @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2\'s
- .br
- .ta
- .ta 3.04i
- .br
- FT_RSTRGN(cScreen, 20, 60) // restore to a different location
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR SCREGION\.PRG
- .sp
- \fBAuthor:\fR David A\. Richardson
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_SAVRGN()
- , FT_RGNSTACK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SAVEATT() Save the attribute bytes of a specified screen region\.
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SAVEATT()
- Save the attribute bytes of a specified screen region\.
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- .ta 4i
- \fBFT_SAVEATT( <nTop>, <nLeft>, <nBottom>, <nRight> ) -> cAttributes
- .br
- .ta
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, and \fB<nRight>\fR define the screen region\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- A character string containing the screen attribute bytes for the
- specified region\. If the memory to store the return value could
- not be allocated, the function returns NIL\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function is similar to Clipper\'s SaveScreen(), except that it only
- saves the attribute bytes\. This is useful if you want to change the
- screen color without affecting the text\.
- .sp
- *** INTERNALS ALERT ***
- .sp
- This function calls the Clipper internal __gtMaxCol to obtain the
- maximum column value for the current video mode\. If you\'re too gutless
- to use internals, then this function isn\'t for you\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- // Save attributes of row 4
- .br
- cBuffer := FT_SAVEATT( 4, 0, 4, maxcol())
- .sp
- .br
- // Save attributes from middle of screen
- .br
- cBuffer := FT_SAVEATT(10,20,14,59)
- .sp
- .in 0.08i
- \fBSource:\fR SAVEATT\.ASM
- .sp
- \fBAuthor:\fR Ted Means
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_RESTATT()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SAVRGN() Save a screen region for later display
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SAVRGN()
- Save a screen region for later display
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SAVRGN( <nTop>, <nLeft>, <nBottom>, <nRight> ) -> cScreen
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, and \fB<nRight>\fR define the portion of the
- screen to save\. Allowable values are 0 through 255\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- FT_SAVRGN() returns the saved screen region and its coordinates
- as a character string\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_SAVRGN() is similar to Clipper\'s SAVESCREEN(), but it saves the
- screen coordinates as well as the display information\. The saved
- area can be restored by passing the returned string to FT_RSTRGN()\.
- .sp
- Note that the strings returned from FT_SAVRGN() and Clipper\'s
- SAVESCREEN() are not interchangeable\. A screen region saved with
- with FT_SAVRGN() must be restored using FT_RSTRGN()\.
- .sp
- FT_SAVRGN() calls Clipper\'s SAVESCREEN()\. Refer to the Clipper
- documentation for more information regarding this function\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- The following example uses FT_SAVRGN() and FT_RSTRGN() to save
- and restore a portion of the screen\.
- .sp
- .ta 3.12i
- .br
- @ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1\'s
- .br
- .ta
- .ta 3.12i
- .br
- cScreen = FT_SAVRGN(10, 10, 20, 30) // save a region
- .br
- .ta
- .ta 3.12i
- .br
- @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2\'s
- .br
- .ta
- .ta 3.12i
- .br
- FT_RSTRGN(cScreen) // restore the 1\'s region
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR SCREGION\.PRG
- .sp
- \fBAuthor:\fR David A\. Richardson
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_RSTRGN()
- , FT_RGNSTACK()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SETATTR() Change color attributes of screen region
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SETATTR()
- Change color attributes of screen region
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SETATTR( <nTRow>, <nLCol>, <nBRow>, <nRCol>, <nColor> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR, and \fB<nRCol>\fR are the coordinates of the
- screen region\.
- .sp
- \fB<nColor>\fR is an integer representing the new color attribute\.
- The formula is:
- .sp
- .in 0.72i
- nFore + ( nBack * 16 )
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This is a high speed function to change the colors of a specified
- region of the screen without disturbing any text\. Uses direct
- video writes\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- FT_SETATTR( 0, 0, MaxRow(), MaxCol(), 165 )
- .sp
- This example will change the entire screen\'s colors to bright white on
- magenta without changing or overwriting any text on the screen\.
- .sp
- .in 0.08i
- \fBSource:\fR VIDEO1\.C
- .sp
- \fBAuthor:\fR Robert A\. DiFalco
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SETMODE() Set the video mode
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SETMODE()
- Set the video mode
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SETMODE( <nMode> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nMode>\fR is one of the DOS video modes\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- Use this function to put your display adapter into a video mode\.
- Uses DOS interrupt 10h to set the mode\. For a table of modes
- available on various graphics adapters, refer to a book such
- as Wilton\'s "Programmer\'s Guide to PC & PS/2 Video Systems"
- (Microsoft Press)
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.64i
- FUNCTION Main( cMode )
- .sp
- .in 0.8i
- .br
- FT_SETMODE( VAL( cMode ) )
- .br
- QOUT( "Video mode is: " + STR( FT_GETMODE() ) )
- .br
- RETURN ( NIL )
- .sp
- .in 0.08i
- \fBSource:\fR VIDMODE\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_ADAPTER()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SETVCUR() Set the cursor position on a specified video page
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SETVCUR()
- Set the cursor position on a specified video page
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SETVCUR( [ <nPage> ], [ <nRow> ], [ <nCol> ] ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nPage>\fR is the video page (defaults to current page, determined
- .in 1.04i
- by FT_GETVPG()
- .sp
- .in 0.4i
- .ta 0.64i
- \fB<nRow>\fR is the row coordinate (defaults to 0 )
- .br
- .ta
- .sp
- .ta 0.64i
- \fB<nCol>\fR is the column coordinate (defaults to 0 )
- .br
- .ta
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_SETVCUR() sets the cursor position on a specific video page\.
- It uses FT_INT86() to invoke interrupt 10h, function 2\.
- .sp
- For more information on graphics programming, cursors, and video
- pages, refer to Richard Wilton\'s _Programmer\'s Guide to PC and
- PS/2 Video Systems_ (Microsoft Press)\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .sp
- .in 0.4i
- // Set the position to row 5, column 10 on video page 1:
- .sp
- .in 0.96i
- FT_SETVCUR( 1, 5, 10 )
- .sp
- .in 0.08i
- \fBSource:\fR VIDCUR\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SETVPG() Set the current video page
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SETVPG()
- Set the current video page
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SETVPG( <nPage> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nMode>\fR is a valid video page\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- Selects the video page\.
- .sp
- For more information on graphics programming and video pages,
- consult a reference such as "Programmer\'s Guide to PC and PS/2
- Video Systems" (Microsoft Press)\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- // The following sets the current video page to 1
- .sp
- FT_SETVPG( 1 )
- .sp
- .in 0.08i
- \fBSource:\fR PAGE\.PRG
- .sp
- \fBAuthor:\fR Glenn Scott
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_GETVPG()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SHADOW() Draw a non-destructive shadow on the screen
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SHADOW()
- Draw a non-destructive shadow on the screen
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SHADOW( <nTop>, <nLeft>, <nBottom>, <nRight> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- .ta 0.8i
- \fB<nTop>\fR is the top row of the shadow area\.
- .br
- .ta
- .sp
- .ta 0.8i
- \fB<nLeft>\fR is the upper left column of the shadow area\.
- .br
- .ta
- .sp
- \fB<nBottom>\fR is the bottom row of the shadow area\.
- .sp
- .ta 0.8i
- \fB<nRight>\fR is the lower right column of the shadow area\.
- .br
- .ta
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function was designed to have my application emulate the
- non-destructive shadowing of the PC-TOOLS application\. This function
- was written in Assembly language for speed since, the same function
- written in Clipper was too slow\. The size of this function could be
- reduced by re-writing the SET_CUR_POSITION, READ_CHARACTER, and
- WRITE_CHARACTER macros as procedures\. Note: this will slow it down
- a tad, since stack manipulation will be involved\.
- .sp
- 1\. If you are using the SAVESCREEN() function to save your screen,
- .in 0.72i
- remember to save enough screen for the shadow\. The shadow will
- require 1 row and 2 columns\.
- .sp
- .in 1.04i
- save_win = SAVESCREEN(Trow,Tcol,Brow+1,Bcol+2)
- .sp
- .in 0.4i
- .ta 2.32i
- 2\. *** INTERNALS ALERT *** This function uses several Clipper internal
- .br
- .ta
- .in 0.72i
- routines\. If using internals scares you, then stay away from this
- function, you gutless weasel\.
- .sp
- .in 0.4i
- The source code is written to MASM specifications\. To use another
- assembler, either invoke that assembler\'s MASM compatibility switch,
- or make the required modifications to the source code\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .ta 3.44i
- .br
- LOCAL Save_Win := SaveScreen(10,10,21,52) // save enough for the shadow
- .br
- .ta
- .ta 3.44i
- .br
- FT_SHADOW(10,10,20,50) // draw shadow
- .br
- .ta
- .sp
- .in 0.64i
- .br
- \.\.\.
- .in 0.8i
- .br
- do what ya\' like
- .in 0.64i
- .br
- \.\.\.
- .sp
- .in 0.4i
- .ta 3.2i
- .br
- RestScreen(10,10,21,52,Save_Win) // restore screen
- .br
- .ta
- .br
- RETURN
- .sp
- .in 0.08i
- \fBSource:\fR SHADOW\.ASM
- .sp
- \fBAuthor:\fR Reginald B\. Walton; Modified by Ted Means
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_VIDSTR() Display string on screen in specified attribute
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_VIDSTR()
- Display string on screen in specified attribute
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_VIDSTR( <nRow>, <nCol>, <cString> [, <nColor> ] ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nRow>\fR and \fB<nCol>\fR are the screen coordinates\.
- .sp
- \fB<cString>\fR is the string to be printed on the screen\.
- .sp
- \fB<nColor>\fR is an integer representing the color attribute\.
- The formula is:
- .sp
- .in 0.56i
- nFore + ( nBack * 16 )
- .sp
- .in 0.4i
- FT_VIDSTR() will display the string in the current color if
- \fB<nColor>\fR is not passed\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This is a high speed function to display a string of any ASCII
- characters on screen in a specified color attribute\. This function
- is useful for constructing screens with a lot of text or repetitive
- screen prints where speed is important\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- FT_VIDSTR( 10, 20, "Enter Name :", 165 )
- .sp
- This example will print the specified text at coordinates 10, 20
- in bright white on top of Magenta\.
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR VIDEO1\.C
- .sp
- \fBAuthor:\fR Robert A\. DiFalco
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_WRTCHR() Display character on screen
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_WRTCHR()
- Display character on screen
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_WRTCHR( <nRow>, <nCol>, <cChar>, <nColor> ) -> NIL
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nRow>\fR and \fB<nCol>\fR are the screen coordinates\.
- .sp
- \fB<cChar>\fR is the single character to print on the screen\.
- .sp
- \fB<nColor>\fR is an integer representing the color attribute\.
- The formula is:
- .sp
- .in 0.64i
- nFore + ( nBack * 16 )
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- NIL
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This is a high speed function to display a single ASCII character
- on screen in a specified color attribute\. This function is useful
- for constructing screens with a lot of text or repetitive screen prints
- where speed is important\. It is faster and requires less memory than
- FT_VIDSTR()\. A working example is contained in ClrTable\.Prg\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.48i
- .br
- FOR nX = 1 to MaxRow()
- .in 0.72i
- .br
- FOR nY = 1 to MaxCol()
- .in 0.96i
- .br
- FT_PRNTCHR( nX, nY, "\(sq", (nX - 1)+(nY * 16) )
- .in 0.72i
- .br
- NEXT
- .in 0.48i
- .br
- NEXT
- .sp
- This example will write the ASCII character 249 to every location
- on screen in every possible color combination\. It will recognize
- the status of SetBlink()\. It uses direct video writes for speed\.
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR VIDEO1\.C
- .sp
- \fBAuthor:\fR Robert A\. DiFalco
-