commit 3323eb087ad7bcf5b4c2cd127e78beaa58078b0f
parent 72193df1d4e22076f2cce8b4f3d7e95a558ec111
Author: Brian Cassidy <bricas@cpan.org>
Date: Tue, 21 Feb 2012 11:47:24 -0400
remove commented code
Diffstat:
M | ansilove/ansilove.c | | | 257 | ------------------------------------------------------------------------------- |
1 file changed, 0 insertions(+), 257 deletions(-)
diff --git a/ansilove/ansilove.c b/ansilove/ansilove.c
@@ -2334,263 +2334,6 @@ void alXbinLoader(char *input, char output[], char bits[])
gdImageDestroy(im_InvertFont);
}
-///*****************************************************************************/
-///* PROCESS XBIN PALETTE */
-///*****************************************************************************/
-//
-// if ($xbin_flags['palette']==1)
-// {
-// if (!$background = imagecreate(128,16))
-// {
-// error("Can't allocate background buffer image memory");
-// }
-//
-// for ($loop=0;$loop<16;$loop++)
-// {
-// $index=($loop*3)+11;
-// $colors[$loop]=imagecolorallocate($background,(ord($input_file_buffer[$index])<<2 | ord($input_file_buffer[$index])>>4),(ord($input_file_buffer[$index+1])<<2 | ord($input_file_buffer[$index+1])>>4),(ord($input_file_buffer[$index+2])<<2 | ord($input_file_buffer[$index+2])>>4));
-// }
-//
-// for ($loop=0;$loop<16;$loop++)
-// {
-// imagefilledrectangle($background,$loop<<3,0,($loop<<3)+8,16,$colors[$loop]);
-// }
-//
-// $background_size_x=8;
-// }
-// else
-// {
-// if (!$background = imagecreatefrompng(dirname(__FILE__).'/fonts/ansilove_background.png'))
-// {
-// error("Can't open file ansilove_background.png");
-// }
-//
-// $background_size_x=9;
-// }
-//
-//
-//
-///*****************************************************************************/
-///* PROCESS XBIN FONT */
-///*****************************************************************************/
-//
-// if ($xbin_flags['font']==1)
-// {
-// if (!$font = imagecreate(2048,$xbin_header['Fontsize']*16))
-// {
-// error("Can't allocate font buffer image memory");
-// }
-//
-// if (!$font_inverted = imagecreate(2048,$xbin_header['Fontsize']))
-// {
-// error("Can't allocate temporary font buffer image memory");
-// }
-//
-// imagepalettecopy($font,$background);
-// imagepalettecopy($font_inverted,$background);
-//
-// $color_index=imagecolorsforindex($background,0);
-// $colors[16]=imagecolorallocate($font,$color_index['red'],$color_index['green'],$color_index['blue']);
-// $colors[20]=imagecolorallocate($font_inverted,200,220,169);
-//
-// imagefilledrectangle($font_inverted,0,0,2048,$xbin_header['Fontsize'],$colors[20]);
-// imagecolortransparent($font_inverted,$colors[20]);
-//
-// for ($loop=0;$loop<256;$loop++)
-// {
-// for ($xbin_font_size_y = 0;$xbin_font_size_y<$xbin_header['Fontsize'];$xbin_font_size_y++)
-// {
-// $xbin_character_line=ord($input_file_buffer[11+$xbin_flags['palette']*48+$xbin_font_size_y+($loop*$xbin_header['Fontsize'])]);
-//
-// for ($loop_column=0;$loop_column<8;$loop_column++)
-// {
-// $xbin_character_column=128/pow(2,$loop_column);
-//
-// if (($xbin_character_line & $xbin_character_column)!=$xbin_character_column)
-// {
-// imagesetpixel($font_inverted,($loop*8)+$loop_column,$xbin_font_size_y,$colors[0]);
-// }
-// }
-// }
-// }
-//
-// for ($loop=1;$loop<16;$loop++)
-// {
-// imagefilledrectangle($font,0,$loop*$xbin_header['Fontsize'],2048,($loop*$xbin_header['Fontsize'])+$xbin_header['Fontsize'],$loop);
-// }
-// imagefilledrectangle($font,0,0,2048,$xbin_header['Fontsize']-1,$colors[16]);
-//
-// for ($loop=0;$loop<16;$loop++)
-// {
-// imagecopy ($font, $font_inverted, 0,$loop*$xbin_header['Fontsize'],0,0,2048,$xbin_header['Fontsize']);
-// }
-// imagecolortransparent($font,$colors[0]);
-//
-// font_size_x = 8;
-// font_size_y = $xbin_header['Fontsize'];
-// }
-// else
-// {
-// if (!$font = imagecreatefrompng (dirname(__FILE__).'/fonts/ansilove_font_pc_80x25.png'))
-// {
-// error("Can't open file font_file");
-// }
-//
-// font_size_x = 9;
-// font_size_y = 16;
-//
-// imagecolortransparent($font,20);
-// }
-//
-//
-//
-///*****************************************************************************/
-///* PROCESS XBIN */
-///*****************************************************************************/
-//
-// $loop=11+$xbin_flags['palette']*48+$xbin_flags['font']*256*$xbin_header['Fontsize'];
-//
-// if ($xbin_flags['compress']==1)
-// {
-// while ($loop<$input_file_size)
-// {
-// $character=ord($input_file_buffer[$loop]);
-//
-// $compression=$character & 192;
-// $repeat=1+($character & 63);
-//
-// if ($compression==0)
-// {
-// for ($i=0;$i<$repeat*2;$i++)
-// {
-// $xbin_buffer[]=ord($input_file_buffer[$loop+1+$i]);
-// }
-//
-// $loop=$loop+1+($repeat*2);
-// }
-//
-// if ($compression==64)
-// {
-// for ($i=0;$i<$repeat;$i++)
-// {
-// $xbin_buffer[]=ord($input_file_buffer[$loop+1]);
-// $xbin_buffer[]=ord($input_file_buffer[$loop+2+$i]);
-// }
-//
-// $loop=$loop+2+$repeat;
-// }
-//
-// if ($compression==128)
-// {
-// for ($i=0;$i<$repeat;$i++)
-// {
-// $xbin_buffer[]=ord($input_file_buffer[$loop+2+$i]);
-// $xbin_buffer[]=ord($input_file_buffer[$loop+1]);
-// }
-//
-// $loop=$loop+2+$repeat;
-// }
-//
-// if ($compression==192)
-// {
-// for ($i=0;$i<$repeat;$i++)
-// {
-// $xbin_buffer[]=ord($input_file_buffer[$loop+1]);
-// $xbin_buffer[]=ord($input_file_buffer[$loop+2]);
-// }
-//
-// $loop+=3;
-// }
-// }
-// }
-// else
-// {
-// while ($loop<$input_file_size)
-// {
-// $xbin_buffer[]=ord($input_file_buffer[$loop]);
-// $loop++;
-// }
-// }
-//
-//
-//
-///*****************************************************************************/
-///* ALLOCATE IMAGE BUFFER MEMORY */
-///*****************************************************************************/
-//
-// if (!$xbin = imagecreatetruecolor($xbin_header['Width']*8,$xbin_header['Height']*font_size_y))
-// {
-// error("Can't allocate buffer image memory");
-// }
-//
-// imagecolorallocate($xbin,0,0,0);
-//
-//
-//
-///*****************************************************************************/
-///* RENDER XBIN */
-///*****************************************************************************/
-//
-// for ($loop=0;$loop<sizeof($xbin_buffer);$loop+=2)
-// {
-// if ($position_x==$xbin_header['Width'])
-// {
-// $position_x=0;
-// $position_y++;
-// }
-//
-// $character=($xbin_buffer[$loop]);
-// $attribute=($xbin_buffer[$loop+1]);
-//
-// $color_background=($attribute & 240)>>4;
-// $color_foreground=$attribute & 15;
-//
-// imagecopy($xbin, $background,$position_x*8,$position_y*font_size_y,$color_background*$background_size_x,0,8,font_size_y);
-// imagecopy($xbin,$font,$position_x*8,$position_y*font_size_y,$character*font_size_x,$color_foreground*font_size_y,8,font_size_y);
-//
-// $position_x++;
-// }
-//
-//
-//
-///*****************************************************************************/
-///* CREATE OUTPUT FILE */
-///*****************************************************************************/
-//
-// if ($thumbnail)
-// {
-// $position_y_max=$xbin_header['Height'];
-// $columns=$xbin_header['Width'];
-//
-// thumbnail($xbin,$output,$columns,font_size_y,$position_y_max);
-// }
-// else
-// {
-// if ($output=='online')
-// {
-// Header("Content-type: image/png");
-// ImagePNG($xbin);
-// }
-// else
-// {
-// ImagePNG($xbin,$output);
-// }
-// }
-//
-///*****************************************************************************/
-///* FREE MEMORY */
-///*****************************************************************************/
-//
-// imagedestroy($xbin);
-// imagedestroy($background);
-// imagedestroy($font);
-//
-// if ($xbin_flags['font']==1)
-// {
-// imagedestroy($font_inverted);
-// }
-//}
-
// Reads SAUCE via a filename.
sauce *sauceReadFileName(char *fileName)
{