home *** CD-ROM | disk | FTP | other *** search
- (*
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ eco_pal was conceived, designed and written ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ by floor a.c. naaijkens for ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ultihouse software / the eco group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ (c) mcmxcii by eurocon panational corporation. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ all rights reserved for the eco group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- *)
- {$A-,B-,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}
- unit eco_pal;
-
- interface
-
- uses
- crt, eco_lib
-
- ;
-
- type
- attributes = record
- fore, back: byte;
- end;
-
- function getcolor(
- x_pos, y_pos, winf, winb, wintype: byte;
- var fore, back: byte;
- msg: string
- ): byte;
-
-
- implementation
-
-
-
- function getcolor;
- var
- f, b : shortint;
- key : word;
- tempfore,
- tempback : byte;
- blink : boolean;
-
-
- procedure __changecursor;
- var
- colbyte1,
- colbyte2,
- charbyte : byte;
-
- begin
- colbyte1 := random(16); colbyte2 := random(16);
- __write(f, b, colbyte1, colbyte2, 'Φ');
- delay(150);
- end;
-
-
- procedure drawsquare;
- var i, j: shortint;
- begin
- __setblwin(blink);
- for i := 0 to 15 do for j := 0 to 15 do
- __write(x_pos+2+i*2, y_pos+1+j, i, j, '■');
- end;
-
-
- begin
- blink := false; randomize;
- if wintype=1 then wintype := 00 else wintype := 15;
- tempfore := fore; tempback := back; tempfore := 0; tempback := 7;
- if x_pos>46 then x_pos := 46; if x_pos<1 then x_pos := 1;
- if y_pos>8 then y_pos := 8; if y_pos<1 then y_pos := 1;
- __bandwin(true, x_pos, y_pos, x_pos+34, y_pos+17, 0, 7, sh_default, wintype);
- __clrscn(x_pos+1, y_pos+1, x_pos+33, y_pos+16, 7, 1, ' ');
- __betwscn(x_pos, x_pos+34, y_pos+17, tempfore, tempback,
- ' TAB: Blink ══ Intensity '
- );
- __betwscn(x_pos, x_pos+34, y_pos, 0, 7, msg); drawsquare;
- f := x_pos+2+2*tempfore; b := y_pos+1+tempback;
- __write(f, b, tempfore, tempback, chr(232));
- repeat
- while not keypressed do __changecursor;
- key := __retkey;
- __write(f, b, tempfore, tempback, '■');
- if (key=_up) or (key=_padup) then dec(b);
- if (key=_down) or (key=_paddown) then inc(b);
- if (key=_left) or (key=_padleft) then dec(f, 2);
- if (key=_right) or (key=_padright) then inc(f, 2);
- if (key=_home) or (key=_padhome) then begin dec(b); dec(f, 2) end;
- if (key=_end) or (key=_padend) then begin inc(b); dec(f, 2) end;
- if (key=_pgdn) or (key=_padpgdn) then begin inc(b); inc(f, 2) end;
- if (key=_pgup) or (key=_padpgup) then begin dec(b); inc(f, 2) end;
- if (key=_tab) then begin blink := not(blink); drawsquare end;
- if b<y_pos + 1 then b := y_pos + 16;
- if b>y_pos + 16 then b := y_pos + 1;
- if f<x_pos + 2 then f := x_pos + 32;
- if f>x_pos + 32 then f := x_pos + 2;
- tempfore := (f - x_pos) div 2 - 1;
- tempback := b - y_pos - 1;
- __betwscn(x_pos, x_pos+34, y_pos+17, tempfore, tempback,
- ' TAB: Blink ══ Intensity ');
- until (
- (key=_esc) or (key=_enter) or (key=_padenter)
- );
- if (
- (key=_enter) or (key=_padenter)
- ) then begin fore := tempfore; back := tempback end;
- getcolor := __attr(fore, back);
- end;
-
-
- end. { of unit, no begin }
-