CMosPatterns.mesa
by Ch. Jacobi August 11, 1983 3:56 pm
last edited Christian Jacobi February 16, 1984 2:38 pm
Last Edited by: Monier, September 24, 1984 12:25:00 pm PDT
Last Edited by: Jacobi, October 29, 1984 11:47:19 am PST
DIRECTORY
CD,
CDColors,
CMos;
CMosPatterns: CEDAR PROGRAM
IMPORTS CDColors, CMos =
BEGIN
r: CARDINAL = 1;
l: CARDINAL = 256;
backgroundb8: CARDINAL = 0;
green1b8: CARDINAL = 1;
green2b8: CARDINAL = 2;
blueb8: CARDINAL = 4;
pinktrb8: CARDINAL = 8;
redb8: CARDINAL = 16;
yellowtrb8: CARDINAL = 32;
blackb8: CARDINAL = 255;
DefineDimmer8: PROC[lev: CD.Level, color: CARDINAL] = INLINE {
CDColors.DefineColor[lev, Checker8[color, backgroundb8], bit8, back];
};
Checker8: PROC[col1, col2: CARDINAL] RETURNS[REF CDColors.Brick] = INLINE {
RETURN[NEW[CDColors.Brick ← [col1*l+col2*r, col2*l+col1*r, col1*l+col2*r, col2*l+col1*r]]]
};
Full8: PROC[color: CARDINAL] RETURNS [b: REF CDColors.Brick] = INLINE {
RETURN[Checker8[color, color]]
};
Init: PROC [] =
BEGIN
CDColors.DefineColor[CMos.ndif, Full8[green1b8], bit8];
CDColors.DefineColor[CMos.pdif, Full8[green2b8], bit8];
CDColors.DefineColor[CMos.met, Full8[blueb8], bit8];
CDColors.DefineColor[CMos.met2, Full8[pinktrb8], bit8];
CDColors.DefineColor[CMos.pol, Full8[redb8], bit8];
CDColors.DefineColor[CMos.nwel, Full8[yellowtrb8], bit8];
CDColors.DefineColor[CMos.cut, Full8[blackb8], bit8];
CDColors.DefineColor[CMos.cut2, Checker8[blackb8, blueb8], bit8];
CDColors.DefineColor[CMos.bur, Checker8[blackb8, 0], bit8];
CDColors.DefineColor[CMos.nwelCont, Checker8[green2b8, blueb8], bit8];
CDColors.DefineColor[CMos.pwelCont, Checker8[green1b8, blueb8], bit8];
CDColors.DefineColor[CMos.ovg, Checker8[blueb8, pinktrb8], bit8];
CDColors.DefineColor[CMos.snerd, NEW[CDColors.Brick ← [12345, 7865, 543, 0]], bit8];
CDColors.DefineColor[CMos.pwel, NEW[CDColors.Brick ← [4, 0, 0, 0]], bit8];
CDColors.DefineColor[CD.backGround, NEW[CDColors.Brick ← [8, 0, 256*8, 0]], bit8];
DefineDimmer8[CMos.ndif, green1b8];
DefineDimmer8[CMos.pdif, green2b8];
DefineDimmer8[CMos.met, blueb8];
DefineDimmer8[CMos.met2, pinktrb8];
DefineDimmer8[CMos.pol, redb8];
DefineDimmer8[CMos.nwel, yellowtrb8];
DefineDimmer8[CMos.cut, blackb8];
DefineDimmer8[CMos.cut2, blackb8];
-- no change for bur, nwelCont, pwelCont, and ovgc
END;
Init[];
END.