home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 November / VPR9811A.BIN / FFILLY / NandD / rgb2bgr.h < prev   
Text File  |  1998-06-27  |  515b  |  22 lines

  1. //rgb2bgr.h
  2. //16進数でテキスト系の色設定をおこなう関数
  3.  
  4. int textCol(int color){
  5.     int red,green,blue;
  6.     blue=color/(256*256);
  7.     if(blue>255)blue=255;
  8.     green=(color-blue*256*256)/256;
  9.     red=color-blue*256*256-green*256;
  10.     TextColor(red,green,blue);
  11. }
  12.  
  13. int bgCol(int color){
  14.     int red,green,blue;
  15.     blue=color/(256*256);
  16.     if(blue>255)blue=255;
  17.     green=(color-blue*256*256)/256;
  18.     red=color-blue*256*256-green*256;
  19.     BgColor(red,green,blue);
  20. }
  21. //関数名の頭を小文字にした
  22.