XXX: TileSet: imager
[perl/schtarr.git] / scmap
diff --git a/scmap b/scmap
index e5a2798665d04d132b23f200632b14902b88005b..2787355bd25d81bd784a4aa8e3bc3492320405a9 100755 (executable)
--- a/scmap
+++ b/scmap
@@ -89,11 +89,7 @@ if (defined $mapsep{$SHOWMAP}) {
 
                        # 512x512 ~ 7s
                        my $tile = $tileset->tile($_);
-                       $img->setscanline(
-                               x => $x*4, y => $y*4 + $_, pixels => pack('(CCCx)*',
-                                       map { @$_ } @{ $tile->{subcol} }[$_*4 .. $_*4 + 3]
-                               ),
-                       ) for 0..3;
+                       $img->paste(src => $tile->{sprite}, left => $x*4, top => $y*4);
 
                        # 4096x4096 ~ 75s
 #                      my $tile = $tileset->sprite($tileset->{map}->[$_]);