improve scmap color coding to tile function
[perl/schtarr.git] / scmap
diff --git a/scmap b/scmap
index 5167e01484b48202cf1178361035c8b4657d7d5e..28ade8c9a0945d22353816ac28a8f969c89d4586 100755 (executable)
--- a/scmap
+++ b/scmap
@@ -83,7 +83,13 @@ if (defined $mapsep{$SHOWMAP}) {
                        my $tile = $tileset->tileavg($_);
                        my $div = 1;#$tile->{walk} > 1 ? 1 : 1.8;
                        my @rgb = map {int($_ / $div)} @{ $tile->{col} };
-                       if (($tile->{walk} & 1) == 0 and $tile->{walk} < 10) {
+                       if ($tile->{walk} & 16) {
+                               $rgb[1] += 48;  # green for ramps
+                       }
+                       elsif ($tile->{walk} & 8) {
+                               $rgb[0] = 255;  # red for obstructions
+                       }
+                       elsif (($tile->{walk} & 1) == 0) {
 #                              $rgb[2] += 128;
                                $rgb[0] *= 3;
                                $rgb[1] *= 3;