{converts MPAL's to .PAL's Version: 20.06.1995}
{   - (c) Ansgar Scherp, Joachim Gelhaus }
uses dos,crt;
var pal:array[0..255,1..3] of byte;
    z:byte;
    f1,f2:file of byte;

begin
  writeln('.MPA -> .PAL Converter');
  writeln('Convert: ',paramstr(1),' to ',paramstr(2));
  assign(f1,paramstr(1));
  assign(f2,paramstr(2));
  reset(f1);
  rewrite(f2);
  repeat
    read(f1,z);
    read(f1,pal[z,1]);
    read(f1,pal[z,2]);
    read(f1,pal[z,3]);
  until eof(f1);
  for z:=0 to 255 do begin
    write(f2,pal[z,1]);
    write(f2,pal[z,2]);
    write(f2,pal[z,3]);
  end;
  close(F1);
  close(f2);
end.

