home *** CD-ROM | disk | FTP | other *** search
- DOCUMENTATION FOR CLIPPER PALETTE FUNCTION
-
- This function will enable users of an EGA Monitor and Graphics Card to
- make use of the 64 colors available with these devices instead of the regular
- 16 colors. You should note that, although you may use all 64 colors within a
- program, only 16 are available at any one time. You will still set the colors
- in Clipper with the standard method (ie: "SET COLOR TO bg/n" would still be
- the method of calling, but you may substitute any of the 64 colors for either
- the "bg" or the "n"). You should be familiar with the scheme that BASIC uses
- for its color numbers, however, since this will be the way that you specify
- which palette must be changed. You should also have an idea about what colors
- the EGA will use for its "0 through 63" color numbers.
- You should also be aware that this .OBJ code does NOT check for the
- existence of an EGA System, and probably will not work properly with anything
- but that. But if you're writing a program for systems that you know are EGA,
- or have some other means of checking for this type of system, then this
- function will be very useful to you in preparing some beautifully colored
- program screens.
- If you wish to try a program making use of this system, just use this
- function and include the .OBJ in with your link command, and you can replace
- those (very overused) 16 colors with all of the colors available on the EGA
- System. This function is very similar to the BASIC Palette function (from
- which it derives its name.
- Some sample source code follows to give you an idea of the syntax and
- their results.
- The SCRMODE function is also included which will enable you to retrun to
- the regular color definitions after your program completes. You should
- specify the command "SET COLOR TO" or "SET COLOR TO w/n" before calling this
- function and CLEAR the screen after calling it to ensure that it performs as
- its supposed to. NOTE: SCRMODE is used WITHOUT parameters and merely returns
- to the normal EGA Screen, the same as the DOS "MODE CO80" command will do.
-
- Palette(0, 39)
- Palette(1, 8)
- Palette(2, 10)
- Palette(3, 43)
- Palette(7, 54)
- Palette(10, 23)
- Palette(15, 63)
- SET COLOR TO W/BG
- CLEAR
- @ 0, 0 TO 42, 79 DOUBLE
- SET COLOR TO w+/bg
- @ 4, 17 SAY "press any key..."
- Inkey(0)
- @ 2, 4, TO 20, 77
- @ 4, 20 SAY "THIS IS A TEST OF THE PALETTE FUNCTION"
- Inkey(0)
- @ 9, 7 CLEAR TO 18, 60
- SET COLOR TO g+/b
- @ 10, 28 SAY "AND THIS IS ANOTHER TEST"
- SET COLOR TO g/w
- @ 15, 40 SAY ""
- Inkey(0)
- set color to
- Scrmode()
- CLEAR
- QUIT
-
- Well, that's about it! Any questions regarding the use or creation of
- this function can be directed to me (Paul V. Slabowski) on either the Silver
- Bullet BBS, Long Island (516)345-5116, or on Compuserve at User ID #
- 71331,1707. I'll get back to you as soon as I can.
-
- Have Fun!
-
- P.V.S.