Mercurial > hg > Game > Cerium
view bin/get_xml_image.pl @ 1223:20e3c81b6f9f draft
add freetype path in Cell Makefile
author | root@luis.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sat, 23 Jul 2011 12:14:08 +0900 |
parents | 3e1caef39798 |
children |
line wrap: on
line source
#!/usr/bin/perl use MIME::Base64; my $image; my $buf; while(<>) { if (/<image name="(.*)">/) { $image= $1; $buf = ''; } elsif (/<\/image>/ ) { open(OUT, ">/tmp/$image") ; print OUT decode_base64($buf); $image = ''; } elsif ($image) { $buf .= $_; } }