home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / EGA_VGA / EGACOLRS.ZIP / 64COLORS.DOC next >
Encoding:
Text File  |  1988-10-30  |  2.9 KB  |  68 lines

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