scmap: correct tileset detection
authorShiar <shiar@shiar.org>
Sun, 21 Sep 2008 01:24:50 +0000 (03:24 +0200)
committerShiar <shiar@shiar.org>
Mon, 17 Nov 2008 16:28:24 +0000 (17:28 +0100)
Only lower 3 bits indicate tileset.  Other (unknown) bits are also set
in some maps, resulting in an incorrect detection.

scmap

diff --git a/scmap b/scmap
index 28ade8c9a0945d22353816ac28a8f969c89d4586..06b5ebecb1b1bd3d2a790d642097435670ac5121 100755 (executable)
--- a/scmap
+++ b/scmap
@@ -49,7 +49,7 @@ sub world {
        my $self = shift;
        # ERA:          0        1        2       3        4      5      6   7
        my @worlds = qw(badlands platform install ashworld jungle desert ice twilight);
-       return $worlds[$self->era] || "?";
+       return $worlds[$self->era & 7] || "?";
 }
 
 #        MTXM TILE