home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / prgs / gfx / ehb.b next >
Text File  |  1977-12-31  |  1KB  |  57 lines

  1.  
  2. '..A test of Extra-Halfbrite screen mode in ACE.
  3. '..Based upon a C program in "Inside Amiga Graphics", p 263-266.
  4. '..David J Benn, August 1994.
  5.  
  6. DEFINT a-z
  7.  
  8. const nibble = 4
  9.  
  10. screen 1,320,200,6,6
  11.  
  12. for i=0 to 31
  13.   read RGB
  14.  
  15.   R = SHR(RGB AND &H0F00,2*nibble)
  16.   G = SHR(RGB AND &H00F0,nibble)
  17.   B = RGB AND &H000F
  18.   
  19.   palette i,R/15,G/15,B/15
  20. next
  21.  
  22. '..color-table
  23. DATA &H888,&HF00,&H0F0,&H00F
  24. DATA &HFF0,&H0FF,&HF0F,&HFFF
  25. DATA &HA04,&H0A4,&HA40,&H40A
  26. DATA &H4A0,&H04A,&HAA0,&HA0A
  27. DATA &H953,&H369,&H84A,&HC3B
  28. DATA &H8E4,&H5CB,&H678,&H983
  29. DATA &H77A,&H9B4,&HD4D,&HCF7
  30. DATA &H3B9,&H95E,&HDD5,&H4F7
  31.  
  32. window 1,,(0,0)-(320,200),32,1
  33.  
  34. '..demo
  35. for c=0 to 15
  36.   {* color bars for colors 0..15 *}
  37.   color c
  38.   line (18*c,20)-(18*c+17,40),,bf
  39.  
  40.   {* ...and the halfbrite versions *} 
  41.   color c+32
  42.   line (18*c,50)-(18*c+17,70),,bf
  43.  
  44.   {* color bars for colors 16..31 *}
  45.   color c+16
  46.   line (18*c,110)-(18*c+17,130),,bf
  47.  
  48.   {* ...and the halfbrite versions *} 
  49.   color c+48
  50.   line (18*c,140)-(18*c+17,160),,bf
  51. next
  52.  
  53. while inkey$="":sleep:wend
  54.  
  55. window close 1
  56. screen close 1
  57.