From d95033cde37c08ba7a82af5920d9e2dd4c9e98ac Mon Sep 17 00:00:00 2001 From: mardahl Date: Sun, 11 Mar 2001 18:52:23 +0000 Subject: [PATCH] PeterM: made some small mods so that this program would work better on "large" images. git-svn-id: svn+ssh://svn.code.sf.net/p/crossfire/code/trunk/arch@847 282e977c-c81d-0410-88c4-b93c2d0d6712 --- dev/split-png-linux.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/split-png-linux.pl b/dev/split-png-linux.pl index 7af3d78cd..166ebab47 100755 --- a/dev/split-png-linux.pl +++ b/dev/split-png-linux.pl @@ -21,7 +21,7 @@ for ($i=0; $i <= $#ARGV; $i++) { $#name--; $destdir=join(m#/#, @name); - if ($source =~ /(\w+)\.(\d)(\d)(\d)\.png/ ) { + if ($source =~ /([\w-]+)\.(\d)(\d)(\d)\.png/ ) { $base = $1; $facing = $3; $animation = $4; @@ -60,7 +60,12 @@ for ($i=0; $i <= $#ARGV; $i++) { # Deal with naming convention. piece 10 should be A, A ascii # code starts at 65. if ($piece > 9 ) { + if($piece > 9 + 26) { + $np = chr( $piece + 55 + 6 ) + } else { + $np = chr($piece + 55); + } } else { $np = $piece; }