Figure out some specific bitmask values of Data::StarCraft::Tileset
->tileavg->{walk} (besides for &1 for obvious walkability, and ignoring
anything above the random pick of 10).
Ramps (height transfers) are always &16 at some point, so mark those
with green because they're usually very significant control points.
&2 and 4 seem to indicate ground level. Not highlighted yet because
tile color usually gives a good clue already. Maybe a special mode
later.
&8 appears to be high level, but never for ground, but only sole objects
like statues (blocking vision?). Don't know what to do with those
exactly, but set a bright red color for now to identify them.
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;