Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
8.7 KiB

  1. #ifdef OLDDITHER
  2. #include "dpal775.h"
  3. #include "look775.h"
  4. #include "dtab775.h"
  5. #else
  6. BYTE lookup775[245] = {
  7. 0, 16, 10, 4,252, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 11,
  8. 27, 12, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,250, 40,
  9. 41, 42,254, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
  10. 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
  11. 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
  12. 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,
  13. 104,105,106,107,108,109,110,111,112, 13,113, 14,114,115,116,117,
  14. 118,119,120,121,122,123,124,125, 15,126,248,127,128,129,130,131,
  15. 132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,
  16. 148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,
  17. 164,165,166,247,168,169,170,171,172,173,174,175,176,177,178,179,
  18. 180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,
  19. 196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,
  20. 212,213,249,214,215,216,253,217,218,219,220,221,222,223,224,225,
  21. 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,
  22. 251,242,243,244,255};
  23. BYTE rdith775[297] = {
  24. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  25. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  26. 0,0,0,0,0,0,0,0,0,0,0,35,35,35,35,35,
  27. 35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
  28. 35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
  29. 35,35,35,35,35,70,70,70,70,70,70,70,70,70,70,70,
  30. 70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
  31. 70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
  32. 105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
  33. 105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
  34. 105,105,105,105,105,105,105,105,105,105,140,140,140,140,140,140,
  35. 140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
  36. 140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
  37. 140,140,140,140,140,175,175,175,175,175,175,175,175,175,175,175,
  38. 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
  39. 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,210,
  40. 210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
  41. 210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
  42. 210,210,210,210,210,210,210,210,210};
  43. BYTE gdith775[297] = {
  44. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  45. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  46. 0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,
  47. 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
  48. 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
  49. 5,5,5,5,5,10,10,10,10,10,10,10,10,10,10,10,
  50. 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
  51. 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
  52. 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
  53. 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
  54. 15,15,15,15,15,15,15,15,15,15,20,20,20,20,20,20,
  55. 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
  56. 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
  57. 20,20,20,20,20,25,25,25,25,25,25,25,25,25,25,25,
  58. 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
  59. 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,30,
  60. 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
  61. 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
  62. 30,30,30,30,30,30,30,30,30};
  63. BYTE dpal775[256][3] = {
  64. {0x00, 0x00, 0x00},{0xbf, 0x00, 0x00},{0x00, 0xbf, 0x00},{0xbf, 0xbf, 0x00},
  65. {0x00, 0x00, 0xbf},{0xbf, 0x00, 0xbf},{0x00, 0xbf, 0xbf},{0xc0, 0xc0, 0xc0},
  66. {0xc0, 0xdc, 0xc0},{0xa4, 0xc8, 0xf0},{0x00, 0x00, 0x7F},{0x00, 0x7F, 0x00},
  67. {0x00, 0x7F, 0x7F},{0x7F, 0x00, 0x00},{0x7F, 0x00, 0x7F},{0x7F, 0x7F, 0x00},
  68. {0x00, 0x00, 0x40},{0x00, 0x2b, 0x00},{0x00, 0x2b, 0x40},{0x00, 0x2b, 0x7F},
  69. {0x00, 0x2b, 0xbf},{0x00, 0x2b, 0xff},{0x00, 0x55, 0x00},{0x00, 0x55, 0x40},
  70. {0x00, 0x55, 0x7F},{0x00, 0x55, 0xbf},{0x00, 0x55, 0xff},{0x00, 0x7F, 0x40},
  71. {0x00, 0x7F, 0xbf},{0x00, 0x7F, 0xff},{0x00, 0xaa, 0x00},{0x00, 0xaa, 0x40},
  72. {0x00, 0xaa, 0x7F},{0x00, 0xaa, 0xbf},{0x00, 0xaa, 0xff},{0x00, 0xd5, 0x00},
  73. {0x00, 0xd5, 0x40},{0x00, 0xd5, 0x7F},{0x00, 0xd5, 0xbf},{0x00, 0xd5, 0xff},
  74. {0x00, 0xff, 0x40},{0x00, 0xff, 0x7F},{0x00, 0xff, 0xbf},{0x2b, 0x00, 0x00},
  75. {0x2b, 0x00, 0x40},{0x2b, 0x00, 0x7F},{0x2b, 0x00, 0xbf},{0x2b, 0x00, 0xff},
  76. {0x2b, 0x2b, 0x00},{0x2b, 0x2b, 0x40},{0x2b, 0x2b, 0x7F},{0x2b, 0x2b, 0xbf},
  77. {0x2b, 0x2b, 0xff},{0x2b, 0x55, 0x00},{0x2b, 0x55, 0x40},{0x2b, 0x55, 0x7F},
  78. {0x2b, 0x55, 0xbf},{0x2b, 0x55, 0xff},{0x2b, 0x7F, 0x00},{0x2b, 0x7F, 0x40},
  79. {0x2b, 0x7F, 0x7F},{0x2b, 0x7F, 0xbf},{0x2b, 0x7F, 0xff},{0x2b, 0xaa, 0x00},
  80. {0x2b, 0xaa, 0x40},{0x2b, 0xaa, 0x7F},{0x2b, 0xaa, 0xbf},{0x2b, 0xaa, 0xff},
  81. {0x2b, 0xd5, 0x00},{0x2b, 0xd5, 0x40},{0x2b, 0xd5, 0x7F},{0x2b, 0xd5, 0xbf},
  82. {0x2b, 0xd5, 0xff},{0x2b, 0xff, 0x00},{0x2b, 0xff, 0x40},{0x2b, 0xff, 0x7F},
  83. {0x2b, 0xff, 0xbf},{0x2b, 0xff, 0xff},{0x55, 0x00, 0x00},{0x55, 0x00, 0x40},
  84. {0x55, 0x00, 0x7F},{0x55, 0x00, 0xbf},{0x55, 0x00, 0xff},{0x55, 0x2b, 0x00},
  85. {0x55, 0x2b, 0x40},{0x55, 0x2b, 0x7F},{0x55, 0x2b, 0xbf},{0x55, 0x2b, 0xff},
  86. {0x55, 0x55, 0x00},{0x55, 0x55, 0x40},{0x55, 0x55, 0x7F},{0x55, 0x55, 0xbf},
  87. {0x55, 0x55, 0xff},{0x55, 0x7F, 0x00},{0x55, 0x7F, 0x40},{0x55, 0x7F, 0x7F},
  88. {0x55, 0x7F, 0xbf},{0x55, 0x7F, 0xff},{0x55, 0xaa, 0x00},{0x55, 0xaa, 0x40},
  89. {0x55, 0xaa, 0x7F},{0x55, 0xaa, 0xbf},{0x55, 0xaa, 0xff},{0x55, 0xd5, 0x00},
  90. {0x55, 0xd5, 0x40},{0x55, 0xd5, 0x7F},{0x55, 0xd5, 0xbf},{0x55, 0xd5, 0xff},
  91. {0x55, 0xff, 0x00},{0x55, 0xff, 0x40},{0x55, 0xff, 0x7F},{0x55, 0xff, 0xbf},
  92. {0x55, 0xff, 0xff},{0x7F, 0x00, 0x40},{0x7F, 0x00, 0xbf},{0x7F, 0x00, 0xff},
  93. {0x7F, 0x2b, 0x00},{0x7F, 0x2b, 0x40},{0x7F, 0x2b, 0x7F},{0x7F, 0x2b, 0xbf},
  94. {0x7F, 0x2b, 0xff},{0x7F, 0x55, 0x00},{0x7F, 0x55, 0x40},{0x7F, 0x55, 0x7F},
  95. {0x7F, 0x55, 0xbf},{0x7F, 0x55, 0xff},{0x7F, 0x7F, 0x40},{0x7F, 0x7F, 0xbf},
  96. {0x7F, 0x7F, 0xff},{0x7F, 0xaa, 0x00},{0x7F, 0xaa, 0x40},{0x7F, 0xaa, 0x7F},
  97. {0x7F, 0xaa, 0xbf},{0x7F, 0xaa, 0xff},{0x7F, 0xd5, 0x00},{0x7F, 0xd5, 0x40},
  98. {0x7F, 0xd5, 0x7F},{0x7F, 0xd5, 0xbf},{0x7F, 0xd5, 0xff},{0x7F, 0xff, 0x00},
  99. {0x7F, 0xff, 0x40},{0x7F, 0xff, 0x7F},{0x7F, 0xff, 0xbf},{0x7F, 0xff, 0xff},
  100. {0xaa, 0x00, 0x00},{0xaa, 0x00, 0x40},{0xaa, 0x00, 0x7F},{0xaa, 0x00, 0xbf},
  101. {0xaa, 0x00, 0xff},{0xaa, 0x2b, 0x00},{0xaa, 0x2b, 0x40},{0xaa, 0x2b, 0x7F},
  102. {0xaa, 0x2b, 0xbf},{0xaa, 0x2b, 0xff},{0xaa, 0x55, 0x00},{0xaa, 0x55, 0x40},
  103. {0xaa, 0x55, 0x7F},{0xaa, 0x55, 0xbf},{0xaa, 0x55, 0xff},{0xaa, 0x7F, 0x00},
  104. {0xaa, 0x7F, 0x40},{0xaa, 0x7F, 0x7F},{0xaa, 0x7F, 0xbf},{0xaa, 0x7F, 0xff},
  105. {0xaa, 0xaa, 0x00},{0xaa, 0xaa, 0x40},{0xaa, 0xaa, 0x7F},{0xaa, 0xaa, 0xbf},
  106. {0xaa, 0xaa, 0xff},{0xaa, 0xd5, 0x00},{0xaa, 0xd5, 0x40},{0xaa, 0xd5, 0x7F},
  107. {0xaa, 0xd5, 0xbf},{0xaa, 0xd5, 0xff},{0xaa, 0xff, 0x00},{0xaa, 0xff, 0x40},
  108. {0xaa, 0xff, 0x7F},{0xaa, 0xff, 0xbf},{0xaa, 0xff, 0xff},{0xd5, 0x00, 0x00},
  109. {0xd5, 0x00, 0x40},{0xd5, 0x00, 0x7F},{0xd5, 0x00, 0xbf},{0xd5, 0x00, 0xff},
  110. {0xd5, 0x2b, 0x00},{0xd5, 0x2b, 0x40},{0xd5, 0x2b, 0x7F},{0xd5, 0x2b, 0xbf},
  111. {0xd5, 0x2b, 0xff},{0xd5, 0x55, 0x00},{0xd5, 0x55, 0x40},{0xd5, 0x55, 0x7F},
  112. {0xd5, 0x55, 0xbf},{0xd5, 0x55, 0xff},{0xd5, 0x7F, 0x00},{0xd5, 0x7F, 0x40},
  113. {0xd5, 0x7F, 0x7F},{0xd5, 0x7F, 0xbf},{0xd5, 0x7F, 0xff},{0xd5, 0xaa, 0x00},
  114. {0xd5, 0xaa, 0x40},{0xd5, 0xaa, 0x7F},{0xd5, 0xaa, 0xbf},{0xd5, 0xaa, 0xff},
  115. {0xd5, 0xd5, 0x00},{0xd5, 0xd5, 0x40},{0xd5, 0xd5, 0x7F},{0xd5, 0xd5, 0xbf},
  116. {0xd5, 0xd5, 0xff},{0xd5, 0xff, 0x00},{0xd5, 0xff, 0x40},{0xd5, 0xff, 0x7F},
  117. {0xd5, 0xff, 0xbf},{0xd5, 0xff, 0xff},{0xff, 0x00, 0x40},{0xff, 0x00, 0x7F},
  118. {0xff, 0x00, 0xbf},{0xff, 0x2b, 0x00},{0xff, 0x2b, 0x40},{0xff, 0x2b, 0x7F},
  119. {0xff, 0x2b, 0xbf},{0xff, 0x2b, 0xff},{0xff, 0x55, 0x00},{0xff, 0x55, 0x40},
  120. {0xff, 0x55, 0x7F},{0xff, 0x55, 0xbf},{0xff, 0x55, 0xff},{0xff, 0x7F, 0x00},
  121. {0xff, 0x7F, 0x40},{0xff, 0x7F, 0x7F},{0xff, 0x7F, 0xbf},{0xff, 0x7F, 0xff},
  122. {0xff, 0xaa, 0x00},{0xff, 0xaa, 0x40},{0xff, 0xaa, 0x7F},{0xff, 0xaa, 0xbf},
  123. {0xff, 0xaa, 0xff},{0xff, 0xd5, 0x00},{0xff, 0xd5, 0x40},{0xff, 0xd5, 0x7F},
  124. {0xff, 0xd5, 0xbf},{0xff, 0xd5, 0xff},{0xff, 0xff, 0x40},{0xff, 0xff, 0x7F},
  125. {0xff, 0xff, 0xbf},{0x00, 0x00, 0x01},{0xff, 0xfb, 0xf0},{0xa0, 0xa0, 0xa4},
  126. {0x80, 0x80, 0x80},{0xff, 0x00, 0x00},{0x00, 0xff, 0x00},{0xff, 0xff, 0x00},
  127. {0x00, 0x00, 0xff},{0xff, 0x00, 0xff},{0x00, 0xff, 0xff},{0xff, 0xff, 0xff}};
  128. #endif
  129. int rlevel[40] =
  130. {0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,6,6,6};
  131. int glevel[40] =
  132. {0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,6,6,6};
  133. int blevel[40] =
  134. {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4};