#!/usr/bin/perl
# Maze Text          rdc.2014.047

# Generates an embedded multi-line banner stereogram using slanted / diagonal lines,
# with option of user define colors. Great for obscuring text within an image forming
# a maze like PNG file. The perl script is controlled by a ini-file.  If one does not
# exists the script will generate a new one to work from.
#
# Sample image generated by mazetext.pl
#
# http://pages.suddenlink.net/cronin135/scripts/MazeText.png
#
# Original Date: 2010.016

# Revised:
# 2013.344 - Allows different ini on command line, and User specified png output file.
# 2014.034 - Delta computational fix.
# 2014.040 - Added HTEXT tag.
# 2014.047 - Added showhex for text

use GD;

my @bsFgRED,@bsFgGREEN,@bsFgBLUE;
my @bsBgRED,@bsBgGREEN,@bsBgBLUE;
my @fsFgRED,@fsFgGREEN,@fsFgBLUE;
my @fsBgRED,@fsBgGREEN,@fsBgBLUE;
my @Text;
my $Density=9;
my $ShowHex="False",$sShowHex="\n ";
my $Pattern="line";
my $iniFile="MazeText.ini";
my $pngFile="MazeText";

if ($#ARGV == 0) {
 $pngFile=$iniFile=$ARGV[0];
 $pngFile =~ s{.*/}{};    # strip the path effort 1
 $pngFile =~ s{.*\\}{};   # strip the path effort 2
 $pngFile =~ s{\.[^.]+$}{}; # now strip the extension
}

$bsFgRED[2]=$bsFgGREEN[2]=$bsFgBLUE[2]=1;
$bsBgRED[2]=$bsBgGREEN[2]=$bsBgBLUE[2]=1;
$fsFgRED[2]=$fsFgGREEN[2]=$fsFgBLUE[2]=1;
$fsBgRED[2]=$fsBgGREEN[2]=$fsBgBLUE[2]=1;

$iniFile=$ARGV[0] if ($#ARGV == 0);
warn "--- $iniFile ---\n\n";
if ( ! -e "$iniFile") {
 warn "\nperl MazeText.pl [your.ini]\n\n If no ini file provided, script\n defaults to MazeText.ini.\n";
 open(OUT,">$iniFile") || die "$!\n";
 print OUT << 'SYNTAX';
# To vary a color use the syntax COLOR:HI/LO COLOR:STEP
#
# i.e. bsRGBfg=0,255:200:-5,0   will vary the Green from 255 to 200 in decrements of 5.
#
#       R  G  B
bsRGBfg=0:255:15,255:0:-15,0
bsRGBbg=0,0,0
fsRGBfg=0,255,0
fsRGBbg=0,0,0
# Density 0 thru 14 (default 9)
Density=9
# Have MazeText show a HTEXT summary of all text
ShowHex=False
# Add as many Text or HText tags as you want.
# Use Text for standard ASCII characters
# Use HText for 2-digit Hexdecimal ASCII characters.
htext=104d415a455445585411
TEXT= BY DAVID
TEXT=  CRONIN
SYNTAX
 close(OUT);
 warn "\n An $iniFile file has been created.\n";
 warn " Edit and rerun MazeText.\n";
 exit 1;
}

open(IN,"<$iniFile") || die "$!\n";
while ($i=<IN>) {
 chomp $i;
 ($Tag,$Value)=split("=",$i);
 $Tag=uc($Tag);
 if ($Tag =~ /^BSRGBFG/) {
  ($bsFgRED[0],$bsFgGREEN[0],$bsFgBLUE[0])=split(",",$Value);
  $bsFgRED[1]=  $bsFgRED[0];
  $bsFgGREEN[1]=$bsFgGREEN[0];
  $bsFgBLUE[1]= $bsFgBLUE[0];
  ($bsFgRED[0],  $bsFgRED[1],  $bsFgRED[2])  =split(':',$bsFgRED[0])   if ($bsFgRED[0] =~ /:/);
  ($bsFgGREEN[0],$bsFgGREEN[1],$bsFgGREEN[2])=split(':',$bsFgGREEN[0]) if ($bsFgGREEN[0] =~ /:/);
  ($bsFgBLUE[0], $bsFgBLUE[1], $bsFgBLUE[2]) =split(':',$bsFgBLUE[0])  if ($bsFgBLUE[0] =~ /:/);
 }
 
 if ($Tag =~ /^BSRGBBG/) {
  ($bsBgRED[0],$bsBgGREEN[0],$bsBgBLUE[0])=split(",",$Value);
  $bsBgRED[1]=  $bsBgRED[0];
  $bsBgGREEN[1]=$bsBgGREEN[0];
  $bsBgBLUE[1]= $bsBgBLUE[0];
  ($bsBgRED[0],  $bsBgRED[1],  $bsBgRED[2])  =split(':',$bsBgRED[0])   if ($bsBgRED[0] =~ /:/);
  ($bsBgGREEN[0],$bsBgGREEN[1],$bsBgGREEN[2])=split(':',$bsBgGREEN[0]) if ($bsBgGREEN[0] =~ /:/);
  ($bsBgBLUE[0], $bsBgBLUE[1], $bsBgBLUE[2]) =split(':',$bsBgBLUE[0])  if ($bsBgBLUE[0] =~ /:/);
 }

 if ($Tag =~ /^FSRGBFG/) {
  ($fsFgRED[0],$fsFgGREEN[0],$fsFgBLUE[0])=split(",",$Value);
  $fsFgRED[1]=  $fsFgRED[0];
  $fsFgGREEN[1]=$fsFgGREEN[0];
  $fsFgBLUE[1]= $fsFgBLUE[0];
  ($fsFgRED[0],  $fsFgRED[1],  $fsFgRED[2])  =split(':',$fsFgRED[0])   if ($fsFgRED[0] =~ /:/);
  ($fsFgGREEN[0],$fsFgGREEN[1],$fsFgGREEN[2])=split(':',$fsFgGREEN[0]) if ($fsFgGREEN[0] =~ /:/);
  ($fsFgBLUE[0], $fsFgBLUE[1], $fsFgBLUE[2]) =split(':',$fsFgBLUE[0])  if ($fsFgBLUE[0] =~ /:/);
 }
 
 if ($Tag =~ /^FSRGBBG/) {
  ($fsBgRED[0],$fsBgGREEN[0],$fsBgBLUE[0])=split(",",$Value);
  $fsBgRED[1]=  $fsBgRED[0];
  $fsBgGREEN[1]=$fsBgGREEN[0];
  $fsBgBLUE[1]= $fsBgBLUE[0];
  ($fsBgRED[0],  $fsBgRED[1],  $fsBgRED[2])  =split(':',$fsBgRED[0])   if ($fsBgRED[0] =~ /:/);
  ($fsBgGREEN[0],$fsBgGREEN[1],$fsBgGREEN[2])=split(':',$fsBgGREEN[0]) if ($fsBgGREEN[0] =~ /:/);
  ($fsBgBLUE[0], $fsBgBLUE[1], $fsBgBLUE[2]) =split(':',$fsBgBLUE[0])  if ($fsBgBLUE[0] =~ /:/);
 }
 
 $ShowHex=$Value if ($Tag =~ /^SHOWHEX/);
 $Density=$Value if ($Tag =~ /^DENSITY/);
 $Pattern=$Value if ($Tag =~ /^PATTERN/);
 $pngFile=$Value if ($Tag =~ /^PNGFILE/);
 if ($Tag =~ /^HTEXT/) {
  $hValue="";
  if ((length($Value) % 2) == 0) {
   for($i=0;$i<length($Value);$i+=2) {
    $hValue .= chr(hex(substr($Value,$i,2)));
   }
  } else {
   warn "WARNING: A HTEXT tag is not properly formatted.\n         $Value\n\n";
  }
  push @Text,$hValue;
 }
 push @Text,$Value if ($Tag =~ /^TEXT/);
}
close(IN);

die "\n\nFATAL: No text to build from. Script ending...\n\n" if ($#Text == -1);

$maxFr=0;
# Find largest variance on color shift.
$Delta = int(abs(  $bsFgRED[0]-  $bsFgRED[1]) / abs(  $bsFgRED[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs($bsFgGREEN[0]-$bsFgGREEN[1]) / abs($bsFgGREEN[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs( $bsFgBLUE[0]- $bsFgBLUE[1]) / abs( $bsFgBLUE[2])); $maxFr = $Delta if ($Delta > $maxFr);

$Delta = int(abs(  $bsBgRED[0]-  $bsBgRED[1]) / abs(  $bsBgRED[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs($bsBgGREEN[0]-$bsBgGREEN[1]) / abs($bsBgGREEN[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs( $bsBgBLUE[0]- $bsBgBLUE[1]) / abs( $bsBgBLUE[2])); $maxFr = $Delta if ($Delta > $maxFr);

$Delta = int(abs(  $fsFgRED[0]-  $fsFgRED[1]) / abs(  $fsFgRED[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs($fsFgGREEN[0]-$fsFgGREEN[1]) / abs($fsFgGREEN[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs( $fsFgBLUE[0]- $fsFgBLUE[1]) / abs( $fsFgBLUE[2])); $maxFr = $Delta if ($Delta > $maxFr);

$Delta = int(abs(  $fsBgRED[0]-  $fsBgRED[1]) / abs(  $fsBgRED[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs($fsBgGREEN[0]-$fsBgGREEN[1]) / abs($fsBgGREEN[2])); $maxFr = $Delta if ($Delta > $maxFr);
$Delta = int(abs( $fsBgBLUE[0]- $fsBgBLUE[1]) / abs( $fsBgBLUE[2])); $maxFr = $Delta if ($Delta > $maxFr);

warn " * Generating " . ($maxFr + 1) * 2 . " image files.\n\n" if ($maxFr > 0);

our @matrix;
init();
$oBanner="";

for ($nPARM=0; $nPARM <= $#Text; $nPARM++) {
 $mxLEN = length($Text[$nPARM]) if (length($Text[$nPARM]) > $mxLEN );
}

for ($nPARM=0; $nPARM <= $#Text; $nPARM++) {
 $cPad=" " x ($mxLEN - length($Text[$nPARM]));
 $cBANNER = $Text[$nPARM] . $cPad;
 for ($j=0; $j<length($cBANNER); $j++) {
  $sShowHex .= lpad(sprintf("%X",ord(substr($cBANNER,$j,1))),2,"0");
 }
 $sShowHex .= "\n ";
 for ($nROW=0;$nROW<=7;$nROW++) {
  for ($nPOS=0;$nPOS<length($cBANNER);$nPOS++) {
   $nPTR = ord(substr($cBANNER,$nPOS,1));
   $nBIT = 128;
   for ($nBITR=7;$nBITR>=0;$nBITR--) {
    if ($matrix[($nPTR-1) * 8 + $nROW] & $nBIT) {$oBanner .= "1"; } else { $oBanner .= "0"; }
    $nBIT = $nBIT >> 1;
   }
  }
  push @Banner,$oBanner;
  $oBanner="";
 }
}

#foreach $i (@Banner) { warn "$i\n";}

# Now that the banner map is generated, Now it's time to
# build the png file(s)

$Denisty=3 if ($Density < 0 || $Density > 14);
$iX=8;
$iY=8;
$iX=24 if ($Density > 3);
$iY=24 if ($Density > 3);

$mY = ($#Banner + 1) * $iY;
$mX = $mxLEN * 8 * $iX;

for($Frame=0;$Frame <= $maxFr; $Frame++) {

 $FS[$Frame] = new GD::Image($iX+1,$iY+1);
 $BS[$Frame] = new GD::Image($iX+1,$iY+1);
 $IM[$Frame] = new GD::Image($mX,$mY);

 $IBlack=$IM[$Frame]->colorAllocate($bsBgRED[0],$bsBgGREEN[0],$bsBgBLUE[0]);
 $IM[$Frame]->fill(0,0,$IBlack);

 $BsFg=$BS[$Frame]->colorAllocate($bsFgRED[0],$bsFgGREEN[0],$bsFgBLUE[0]);
 $BsBg=$BS[$Frame]->colorAllocate($bsBgRED[0],$bsBgGREEN[0],$bsBgBLUE[0]);

 $FsFg=$FS[$Frame]->colorAllocate($fsFgRED[0],$fsFgGREEN[0],$fsFgBLUE[0]);
 $FsBg=$FS[$Frame]->colorAllocate($fsBgRED[0],$fsBgGREEN[0],$fsBgBLUE[0]);

 $FS[$Frame]->fill(0,0,$FsBg);
 $BS[$Frame]->fill(0,0,$BsBg);

 if ($Density < 4 ) {
  $BS[$Frame]->line(0,0,8,8,$BsFg);
  $BS[$Frame]->line(0,8,0,8,$BsFg);
  $BS[$Frame]->line(8,0,8,0,$BsFg);
 
  $FS[$Frame]->line(0,8,8,0,$FsFg);
  $FS[$Frame]->line(0,0,0,0,$FsFg);
  $FS[$Frame]->line(8,8,8,8,$FsFg);
 
  $BS[$Frame]->line(0,3,5,8,$BsFg) if ($Density > 2);
  $BS[$Frame]->line(0,2,6,8,$BsFg) if ($Density > 1);
  $BS[$Frame]->line(0,1,7,8,$BsFg) if ($Density > 0);

  $BS[$Frame]->line(1,0,8,7,$BsFg) if ($Density > 0);
  $BS[$Frame]->line(2,0,8,6,$BsFg) if ($Density > 1);
  $BS[$Frame]->line(3,0,8,5,$BsFg) if ($Density > 2);
  $BS[$Frame]->line(0,7,1,8,$BsFg) if ($Density > 0);
  $BS[$Frame]->line(0,6,2,8,$BsFg) if ($Density > 1);
  $BS[$Frame]->line(0,5,3,8,$BsFg) if ($Density > 2);
  $BS[$Frame]->line(5,0,8,3,$BsFg) if ($Density > 2);
  $BS[$Frame]->line(6,0,8,2,$BsFg) if ($Density > 1);
  $BS[$Frame]->line(7,0,8,1,$BsFg) if ($Density > 0);

  $FS[$Frame]->line(0,5,5,0,$FsFg) if ($Density > 2);
  $FS[$Frame]->line(0,6,6,0,$FsFg) if ($Density > 1);
  $FS[$Frame]->line(0,7,7,0,$FsFg) if ($Density > 0);
  $FS[$Frame]->line(1,8,8,1,$FsFg) if ($Density > 0);
  $FS[$Frame]->line(2,8,8,2,$FsFg) if ($Density > 1);
  $FS[$Frame]->line(3,8,8,3,$FsFg) if ($Density > 2);
  $FS[$Frame]->line(0,1,1,0,$FsFg) if ($Density > 0);
  $FS[$Frame]->line(0,2,2,0,$FsFg) if ($Density > 1);
  $FS[$Frame]->line(0,3,3,0,$FsFg) if ($Density > 2);
  $FS[$Frame]->line(7,8,8,7,$FsFg) if ($Density > 0);
  $FS[$Frame]->line(6,8,8,6,$FsFg) if ($Density > 1);
  $FS[$Frame]->line(5,8,8,5,$FsFg) if ($Density > 2);
  for ($r=0; $r <= $#Banner; $r++) {
   for ($c=0; $c <= length($Banner[$r]); $c++) {
    if (substr($Banner[$r],$c,1) == "0" ) {
     $IM[$Frame]->copy($FS[$Frame],$c*8,$r*8,0,0,8,8);
    } else {
     $IM[$Frame]->copy($BS[$Frame],$c*8,$r*8,0,0,8,8);
    }
   }
  }
 } else {
  $BS[$Frame]->line(0,0,24,24,$BsFg);
  $BS[$Frame]->line(0,24,0,24,$BsFg);
  $BS[$Frame]->line(24,0,24,0,$BsFg);
  $FS[$Frame]->line(0,24,24,0,$FsFg);
  $FS[$Frame]->line(0,0,0,0,$FsFg);
  $FS[$Frame]->line(24,24,24,24,$FsFg);
 
  for ($sc=0; $sc<=$Density-4; $sc++) {
   $BS[$Frame]->line(0,$sc,24-$sc,24,$BsFg);
   $BS[$Frame]->line(1+$sc,0,24,23-$sc,$BsFg);
   $BS[$Frame]->line(0,23-$sc,1+$sc,24,$BsFg);
   $BS[$Frame]->line(24-$sc,0,24,0+$sc,$BsFg);
 
   $FS[$Frame]->line(0,23-$sc,23-$sc,0,$FsFg);
   $FS[$Frame]->line($sc,24,24,$sc,$FsFg);
   $FS[$Frame]->line(0,$sc,$sc,0,$FsFg);
   $FS[$Frame]->line(23-$sc,24,24,23-$sc,$FsFg);
  }

  for ($r=0; $r <= $#Banner; $r++) {
   for ($c=0; $c <= length($Banner[$r]); $c++) {
    if (substr($Banner[$r],$c,1) == "0" ) {
     $IM[$Frame]->copy($FS[$Frame],$c*24,$r*24,0,0,24,24);
    } else {
     $IM[$Frame]->copy($BS[$Frame],$c*24,$r*24,0,0,24,24);
    }
   }
  }
 }

   $bsFgRED[0] += $bsFgRED[2] if (abs($bsFgRED[0] - $bsFgRED[1]) > abs($bsFgRED[2]));
 $bsFgGREEN[0] += $bsFgGREEN[2] if (abs($bsFgGREEN[0] - $bsFgGREEN[1]) > abs($bsFgGREEN[2]));
  $bsFgBLUE[0] += $bsFgBLUE[2] if (abs($bsFgBLUE[0] - $bsFgBLUE[1]) > abs($bsFgBLUE[2]));
   $bsBgRED[0] += $bsBgRED[2] if (abs($bsBgRED[0] - $bsBgRED[1]) > abs($bsBgRED[2]));
 $bsBgGREEN[0] += $bsBgGREEN[2] if (abs($bsBgGREEN[0] - $bsBgGREEN[1]) > abs($bsBgGREEN[2]));
  $bsBgBLUE[0] += $bsBgBLUE[2] if (abs($bsBgBLUE[0] - $bsBgBLUE[1]) > abs($bsBgBLUE[2]));
   $fsFgRED[0] += $fsFgRED[2] if (abs($fsFgRED[0] - $fsFgRED[1]) > abs($fsFgRED[2]));
 $fsFgGREEN[0] += $fsFgGREEN[2] if (abs($fsFgGREEN[0] - $fsFgGREEN[1]) > abs($fsFgGREEN[2]));
  $fsFgBLUE[0] += $fsFgBLUE[2] if (abs($fsFgBLUE[0] - $fsFgBLUE[1]) > abs($fsFgBLUE[2]));
   $fsBgRED[0] += $fsBgRED[2] if (abs($fsBgRED[0] - $fsBgRED[1]) > abs($fsBgRED[2]));
 $fsBgGREEN[0] += $fsBgGREEN[2] if (abs($fsBgGREEN[0] - $fsBgGREEN[1]) > abs($fsBgGREEN[2]));
  $fsBgBLUE[0] += $fsBgBLUE[2] if (abs($fsBgBLUE[0] - $fsBgBLUE[1]) > abs($fsBgBLUE[2]));
}

for($Frame=0;$Frame <= $maxFr; $Frame++) {
 # make sure we are writing to a binary stream
 binmode STDOUT;

 # Convert the image to PNG and print it on standard output
 $outFile = $pngFile . "F" . lpad($Frame,4,"0") . ".png";
 open(OUT,">$outFile");
 binmode OUT;
 print OUT $IM[$Frame]->png;
 close(OUT);
 warn "Your $outFile has been generated !\n";

 if ($maxFr > 0) {
  # Convert the image to PNG and print it on standard output
  $outFile = $pngFile . "R". lpad($Frame,4,"0") . ".png";
  open(OUT,">$outFile");
  binmode OUT;
  print OUT $IM[$maxFr - $Frame]->png;
  close(OUT);
  warn "Your $outFile has been generated !\n";
 }
}

warn "$sShowHex\n" if ( $ShowHex =~ /^True/i );

exit 0;

sub lpad {
 my $lpadvar,$lpadlen,$lpadchr,$lpadresult="";
 ($lpadvar,$lpadlen,$lpadchr)=@_;
 if (length($lpadvar) < $lpadlen) { $lpadresult=$lpadchr x ($lpadlen-length($lpadvar)) . $lpadvar; } else { $lpadresult=$lpadvar; }
 return $lpadresult;
}

sub rpad {
 my $rpadvar,$rpadlen,$rpadchr,$rpadresult="";
 ($rpadvar,$rpadlen,$rpadchr)=@_;
 if (length($rpadvar) < $rpadlen) { $rpadresult=$rpadvar . $rpadchr x ($rpadlen-length($rpadvar)); } else { $rpadresult=$rpadvar; }
 return $rpadresult;
}

# Font table was extracted from A graphics adapter BIOS
# From dos debug-command...
# c>debug
# -A 100
# 1429:0100 MOV AX,1130
# 1429:0103 MOV BH,2
# 1429:0105 INT 10
# 1429:0107 NOP
# 1429:0108 INT 20
# 1429:010A
# -G=100 107
#
# ES:BP is beginning of ROM BIOS font table.  However, I begin from chr(1) rather than chr(0).
#
# AX=1130  BX=0200  CX=0008  DX=0031  SP=FFEE  BP=9B61  SI=0000  DI=0000
# DS=1429  ES=C000  SS=1429  CS=1429  IP=0107   NV UP EI PL NZ NA PO NC
# 1429:0107 90            NOP
# -D C000:9B61
# C000:9B60     00 00 00 00 00 00 00-00 00 00 00 00 00 00 00    ...............
# C000:9B70  00 7E 81 A5 81 81 BD 99-81 7E 00 00 00 00 00 7E   .~.......~.....~
# C000:9B80  FF DB FF FF C3 E7 FF 7E-00 00 00 00 00 00 6C EE   .......~......l.
# C000:9B90  FE FE FE 7C 38 10 00 00-00 00 00 00 10 38 7C FE   ...|8........8|.
# -

sub init {
@matrix=(0x7E,0x81,0xA5,0x81,0xBD,0x99,0x81,0x7E,
         0x7E,0xFF,0xDB,0xFF,0xC3,0xE7,0xFF,0x7E,
         0x6C,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00,
         0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,
         0x38,0x7C,0x38,0xFE,0xFE,0x7C,0x38,0x7C,
         0x10,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x7C,
         0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00,
         0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,
         0x0F,0x07,0x0F,0x7D,0xCC,0xCC,0xCC,0x78,
         0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x7F,0x63,0x7F,0x63,0x63,0x67,0xE6,0xC0,
         0x99,0x5A,0x3C,0xE7,0xE7,0x3C,0x5A,0x99,
         0x80,0xE0,0xF8,0xFE,0xF8,0xE0,0x80,0x00,
         0x02,0x0E,0x3E,0xFE,0x3E,0x0E,0x02,0x00,
         0x18,0x3C,0x7E,0x18,0x18,0x7E,0x3C,0x18,
         0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x00,
         0x7F,0xDB,0xDB,0x7B,0x1B,0x1B,0x1B,0x00,
         0x3E,0x63,0x38,0x6C,0x6C,0x38,0xCC,0x78,
         0x00,0x00,0x00,0x00,0x7E,0x7E,0x7E,0x00,
         0x18,0x3C,0x7E,0x18,0x7E,0x3C,0x18,0xFF,
         0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x00,
         0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,
         0x00,0x18,0x0C,0xFE,0x0C,0x18,0x00,0x00,
         0x00,0x30,0x60,0xFE,0x60,0x30,0x00,0x00,
         0x00,0x00,0xC0,0xC0,0xC0,0xFE,0x00,0x00,
         0x00,0x24,0x66,0xFF,0x66,0x24,0x00,0x00,
         0x00,0x18,0x3C,0x7E,0xFF,0xFF,0x00,0x00,
         0x00,0xFF,0xFF,0x7E,0x3C,0x18,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00,
         0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,
         0x6C,0x6C,0xFE,0x6C,0xFE,0x6C,0x6C,0x00,
         0x30,0x7C,0xC0,0x78,0x0C,0xF8,0x30,0x00,
         0x00,0xC6,0xCC,0x18,0x30,0x66,0xC6,0x00,
         0x38,0x6C,0x38,0x76,0xDC,0xCC,0x76,0x00,
         0x60,0x60,0xC0,0x00,0x00,0x00,0x00,0x00,
         0x18,0x30,0x60,0x60,0x60,0x30,0x18,0x00,
         0x60,0x30,0x18,0x18,0x18,0x30,0x60,0x00,
         0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,
         0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x60,
         0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,
         0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,
         0x7C,0xC6,0xCE,0xDE,0xF6,0xE6,0x7C,0x00,
         0x30,0x70,0x30,0x30,0x30,0x30,0xFC,0x00,
         0x78,0xCC,0x0C,0x38,0x60,0xCC,0xFC,0x00,
         0x78,0xCC,0x0C,0x38,0x0C,0xCC,0x78,0x00,
         0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x1E,0x00,
         0xFC,0xC0,0xF8,0x0C,0x0C,0xCC,0x78,0x00,
         0x38,0x60,0xC0,0xF8,0xCC,0xCC,0x78,0x00,
         0xFC,0xCC,0x0C,0x18,0x30,0x30,0x30,0x00,
         0x78,0xCC,0xCC,0x78,0xCC,0xCC,0x78,0x00,
         0x78,0xCC,0xCC,0x7C,0x0C,0x18,0x70,0x00,
         0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x00,
         0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x60,
         0x18,0x30,0x60,0xC0,0x60,0x30,0x18,0x00,
         0x00,0x00,0xFC,0x00,0x00,0xFC,0x00,0x00,
         0x60,0x30,0x18,0x0C,0x18,0x30,0x60,0x00,
         0x78,0xCC,0x0C,0x18,0x30,0x00,0x30,0x00,
         0x7C,0xC6,0xDE,0xDE,0xDE,0xC0,0x78,0x00,
         0x30,0x78,0xCC,0xCC,0xFC,0xCC,0xCC,0x00,
         0xFC,0x66,0x66,0x7C,0x66,0x66,0xFC,0x00,
         0x3C,0x66,0xC0,0xC0,0xC0,0x66,0x3C,0x00,
         0xF8,0x6C,0x66,0x66,0x66,0x6C,0xF8,0x00,
         0xFE,0x62,0x68,0x78,0x68,0x62,0xFE,0x00,
         0xFE,0x62,0x68,0x78,0x68,0x60,0xF0,0x00,
         0x3C,0x66,0xC0,0xC0,0xCE,0x66,0x3E,0x00,
         0xCC,0xCC,0xCC,0xFC,0xCC,0xCC,0xCC,0x00,
         0x78,0x30,0x30,0x30,0x30,0x30,0x78,0x00,
         0x1E,0x0C,0x0C,0x0C,0xCC,0xCC,0x78,0x00,
         0xE6,0x66,0x6C,0x78,0x6C,0x66,0xE6,0x00,
         0xF0,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,
         0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00,
         0xC6,0xE6,0xF6,0xDE,0xCE,0xC6,0xC6,0x00,
         0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x38,0x00,
         0xFC,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00,
         0x78,0xCC,0xCC,0xCC,0xDC,0x78,0x1C,0x00,
         0xFC,0x66,0x66,0x7C,0x6C,0x66,0xE6,0x00,
         0x78,0xCC,0xE0,0x70,0x1C,0xCC,0x78,0x00,
         0xFC,0xB4,0x30,0x30,0x30,0x30,0x78,0x00,
         0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xFC,0x00,
         0xCC,0xCC,0xCC,0xCC,0xCC,0x78,0x30,0x00,
         0xC6,0xC6,0xC6,0xD6,0xFE,0xEE,0xC6,0x00,
         0xC6,0xC6,0x6C,0x38,0x38,0x6C,0xC6,0x00,
         0xCC,0xCC,0xCC,0x78,0x30,0x30,0x78,0x00,
         0xFE,0xC6,0x8C,0x18,0x32,0x66,0xFE,0x00,
         0x78,0x60,0x60,0x60,0x60,0x60,0x78,0x00,
         0xC0,0x60,0x30,0x18,0x0C,0x06,0x02,0x00,
         0x78,0x18,0x18,0x18,0x18,0x18,0x78,0x00,
         0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
         0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x78,0x0C,0x7C,0xCC,0x76,0x00,
         0xE0,0x60,0x60,0x7C,0x66,0x66,0xDC,0x00,
         0x00,0x00,0x78,0xCC,0xC0,0xCC,0x78,0x00,
         0x1C,0x0C,0x0C,0x7C,0xCC,0xCC,0x76,0x00,
         0x00,0x00,0x78,0xCC,0xFC,0xC0,0x78,0x00,
         0x38,0x6C,0x60,0xF0,0x60,0x60,0xF0,0x00,
         0x00,0x00,0x76,0xCC,0xCC,0x7C,0x0C,0xF8,
         0xE0,0x60,0x6C,0x76,0x66,0x66,0xE6,0x00,
         0x30,0x00,0x70,0x30,0x30,0x30,0x78,0x00,
         0x0C,0x00,0x0C,0x0C,0x0C,0xCC,0xCC,0x78,
         0xE0,0x60,0x66,0x6C,0x78,0x6C,0xE6,0x00,
         0x70,0x30,0x30,0x30,0x30,0x30,0x78,0x00,
         0x00,0x00,0xCC,0xFE,0xFE,0xD6,0xC6,0x00,
         0x00,0x00,0xF8,0xCC,0xCC,0xCC,0xCC,0x00,
         0x00,0x00,0x78,0xCC,0xCC,0xCC,0x78,0x00,
         0x00,0x00,0xDC,0x66,0x66,0x7C,0x60,0xF0,
         0x00,0x00,0x76,0xCC,0xCC,0x7C,0x0C,0x1E,
         0x00,0x00,0xDC,0x76,0x66,0x60,0xF0,0x00,
         0x00,0x00,0x7C,0xC0,0x78,0x0C,0xF8,0x00,
         0x10,0x30,0x7C,0x30,0x30,0x34,0x18,0x00,
         0x00,0x00,0xCC,0xCC,0xCC,0xCC,0x76,0x00,
         0x00,0x00,0xCC,0xCC,0xCC,0x78,0x30,0x00,
         0x00,0x00,0xC6,0xD6,0xFE,0xFE,0x6C,0x00,
         0x00,0x00,0xC6,0x6C,0x38,0x6C,0xC6,0x00,
         0x00,0x00,0xCC,0xCC,0xCC,0x7C,0x0C,0xF8,
         0x00,0x00,0xFC,0x98,0x30,0x64,0xFC,0x00,
         0x1C,0x30,0x30,0xE0,0x30,0x30,0x1C,0x00,
         0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00,
         0xE0,0x30,0x30,0x1C,0x30,0x30,0xE0,0x00,
         0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0x00,
         0x3C,0x66,0x60,0x66,0x3C,0x18,0x0C,0x38,
         0x00,0x66,0x00,0x66,0x66,0x66,0x3F,0x00,
         0x0E,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00,
         0x7E,0xC3,0x3C,0x06,0x3E,0x66,0x3F,0x00,
         0x66,0x00,0x3C,0x06,0x3E,0x66,0x3F,0x00,
         0x70,0x00,0x3C,0x06,0x3E,0x66,0x3F,0x00,
         0x18,0x18,0x3C,0x06,0x3E,0x66,0x3F,0x00,
         0x00,0x00,0x3C,0x60,0x60,0x3C,0x18,0x38,
         0x7E,0xC3,0x3C,0x66,0x7E,0x60,0x3C,0x00,
         0x66,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00,
         0x70,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00,
         0x66,0x00,0x38,0x18,0x18,0x18,0x3C,0x00,
         0x3E,0x63,0x1C,0x0C,0x0C,0x0C,0x1E,0x00,
         0x70,0x00,0x38,0x18,0x18,0x18,0x3C,0x00,
         0x63,0x1C,0x36,0x63,0x7F,0x63,0x63,0x00,
         0x18,0x18,0x00,0x3C,0x66,0x7E,0x66,0x00,
         0x0E,0x00,0x7E,0x30,0x3C,0x30,0x7E,0x00,
         0x00,0x00,0x7F,0x0C,0x7F,0xCC,0x7F,0x00,
         0x3F,0x6C,0xCC,0xFF,0xCC,0xCC,0xCF,0x00,
         0x3C,0x66,0x00,0x3C,0x66,0x66,0x3C,0x00,
         0x00,0x66,0x00,0x3C,0x66,0x66,0x3C,0x00,
         0x00,0x70,0x00,0x3C,0x66,0x66,0x3C,0x00,
         0x3C,0x66,0x00,0x66,0x66,0x66,0x3F,0x00,
         0x00,0x70,0x00,0x66,0x66,0x66,0x3F,0x00,
         0x00,0x66,0x00,0x66,0x66,0x3E,0x06,0x7C,
         0xC3,0x18,0x3C,0x66,0x66,0x3C,0x18,0x00,
         0x66,0x00,0x66,0x66,0x66,0x66,0x3C,0x00,
         0x0C,0x0C,0x3F,0x60,0x60,0x3F,0x0C,0x0C,
         0x1C,0x36,0x32,0x78,0x30,0x73,0x7E,0x00,
         0x66,0x66,0x3C,0x7E,0x18,0x7E,0x18,0x18,
         0xF8,0xCC,0xCC,0xFA,0xC6,0xCF,0xC6,0xC7,
         0x0E,0x1B,0x18,0x3C,0x18,0x18,0x18,0x70,
         0x0E,0x00,0x3C,0x06,0x3E,0x66,0x3F,0x00,
         0x1C,0x00,0x38,0x18,0x18,0x18,0x3C,0x00,
         0x00,0x0E,0x00,0x3C,0x66,0x66,0x3C,0x00,
         0x00,0x0E,0x00,0x66,0x66,0x66,0x3F,0x00,
         0x3B,0x6E,0x00,0x3E,0x33,0x33,0x33,0x00,
         0x3B,0x6E,0x33,0x3B,0x3F,0x37,0x33,0x00,
         0x3C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,
         0x38,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,
         0x18,0x00,0x18,0x30,0x60,0x66,0x3C,0x00,
         0x00,0x00,0x00,0x7E,0x60,0x60,0x00,0x00,
         0x00,0x00,0x00,0x7E,0x06,0x06,0x00,0x00,
         0xC3,0xC6,0xCC,0xDE,0x33,0x66,0xCC,0x0F,
         0xC3,0xC6,0xCC,0xDB,0x37,0x6F,0xCF,0x03,
         0x18,0x00,0x18,0x18,0x3C,0x3C,0x18,0x00,
         0x00,0x33,0x66,0xCC,0x66,0x33,0x00,0x00,
         0x00,0xCC,0x66,0x33,0x66,0xCC,0x00,0x00,
         0x88,0x22,0x88,0x22,0x88,0x22,0x88,0x22,
         0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,
         0xBB,0xEE,0xBB,0xEE,0xBB,0xEE,0xBB,0xEE,
         0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
         0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,
         0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,
         0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,
         0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,
         0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,
         0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,
         0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
         0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,
         0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,
         0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,
         0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,
         0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,
         0x18,0x18,0x18,0x18,0xFF,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0xFF,0x18,0x18,0x18,
         0x18,0x18,0x18,0x18,0x1F,0x18,0x18,0x18,
         0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,
         0x18,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,
         0x18,0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,
         0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,
         0x36,0x36,0x37,0x30,0x3F,0x00,0x00,0x00,
         0x00,0x00,0x3F,0x30,0x37,0x36,0x36,0x36,
         0x36,0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,
         0x00,0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,
         0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,
         0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,
         0x36,0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,
         0x18,0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,
         0x36,0x36,0x36,0x36,0xFF,0x00,0x00,0x00,
         0x00,0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,
         0x00,0x00,0x00,0x00,0xFF,0x36,0x36,0x36,
         0x36,0x36,0x36,0x36,0x3F,0x00,0x00,0x00,
         0x18,0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,
         0x00,0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,
         0x00,0x00,0x00,0x00,0x3F,0x36,0x36,0x36,
         0x36,0x36,0x36,0x36,0xFF,0x36,0x36,0x36,
         0x18,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,
         0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,
         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
         0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
         0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
         0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
         0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,
         0x00,0x00,0x3B,0x6E,0x6C,0x6E,0x3B,0x00,
         0x3C,0x66,0x66,0x6C,0x66,0x66,0x7C,0x60,
         0x00,0x7E,0x66,0x60,0x60,0x60,0x60,0x00,
         0x00,0x00,0x7F,0x36,0x36,0x36,0x36,0x00,
         0x7F,0x31,0x18,0x0C,0x18,0x31,0x7F,0x00,
         0x00,0x00,0x3F,0x66,0x66,0x66,0x3C,0x00,
         0x00,0x00,0x33,0x33,0x33,0x33,0x3E,0x60,
         0x00,0x3B,0x6E,0x0C,0x18,0x18,0x18,0x00,
         0x7E,0x18,0x3C,0x66,0x66,0x3C,0x18,0x7E,
         0x1C,0x36,0x63,0x7F,0x63,0x36,0x1C,0x00,
         0x1C,0x36,0x63,0x63,0x36,0x36,0x77,0x00,
         0x1C,0x30,0x18,0x3C,0x66,0x66,0x3C,0x00,
         0x00,0x00,0x7E,0xDB,0xDB,0x7E,0x00,0x00,
         0x06,0x0C,0x7E,0xDB,0xDB,0x7E,0x60,0xC0,
         0x1C,0x30,0x60,0x7C,0x60,0x30,0x1C,0x00,
         0x1C,0x36,0x63,0x63,0x63,0x63,0x63,0x00,
         0x00,0x7E,0x00,0x7E,0x00,0x7E,0x00,0x00,
         0x18,0x18,0x7E,0x18,0x18,0x00,0x7E,0x00,
         0x30,0x18,0x0C,0x18,0x30,0x00,0x7E,0x00,
         0x0C,0x18,0x30,0x18,0x0C,0x00,0x7E,0x00,
         0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,
         0x18,0x18,0x18,0x18,0xD8,0xD8,0x70,0x00,
         0x18,0x18,0x00,0x7E,0x00,0x18,0x18,0x00,
         0x00,0x70,0xDB,0x0E,0x70,0xDB,0x0E,0x00,
         0x3C,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
         0x0F,0x0C,0x0C,0x0C,0xCC,0x6C,0x3C,0x1C,
         0x78,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,
         0x38,0x6C,0x18,0x30,0x7C,0x00,0x00,0x00,
         0x00,0x00,0x3C,0x3C,0x3C,0x3C,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
 return;
}