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