source: git/src/gen_img2aven

Last change on this file was 028716d, checked in by Olly Betts <olly@…>, 8 months ago

aven: Fix 1.4.10 regression in plotting of labels

Each splay end was blocking out a small rectangle which no label could
overlap. Reported by Špela Borko.

  • Property mode set to 100755
File size: 1.0 KB
RevLine 
[028716d]1#!/usr/bin/perl -w
2use strict;
3
4sub img_SFLAG_SURFACE { 0x01 }
5sub img_SFLAG_UNDERGROUND { 0x02 }
6sub img_SFLAG_ENTRANCE { 0x04 }
7sub img_SFLAG_EXPORTED { 0x08 }
8sub img_SFLAG_FIXED { 0x10 }
9sub img_SFLAG_ANON { 0x20 }
10sub img_SFLAG_WALL { 0x40 }
11
12sub PLOT_ORDER_KEY_SURFACE { 0x0080 }
13sub PLOT_ORDER_KEY_UNDERGROUND { 0x0100 }
14sub PLOT_ORDER_KEY_ENTRANCE { 0x0200 }
15sub PLOT_ORDER_KEY_EXPORTED { 0x0400 }
16sub PLOT_ORDER_KEY_FIXED { 0x0800 }
17sub PLOT_ORDER_KEY_NOT_ANON { 0x1000 }
18sub PLOT_ORDER_KEY_NOT_WALL { 0x2000 }
19
20my @tab;
21for (0 .. 0x7f) {
22    my $k = 0;
23    $k |= PLOT_ORDER_KEY_SURFACE if ($_ & img_SFLAG_SURFACE);
24    $k |= PLOT_ORDER_KEY_UNDERGROUND if ($_ & img_SFLAG_UNDERGROUND);
25    $k |= PLOT_ORDER_KEY_ENTRANCE if ($_ & img_SFLAG_ENTRANCE);
26    $k |= PLOT_ORDER_KEY_EXPORTED if ($_ & img_SFLAG_EXPORTED);
27    $k |= PLOT_ORDER_KEY_FIXED if ($_ & img_SFLAG_FIXED);
28    $k |= PLOT_ORDER_KEY_NOT_ANON unless ($_ & img_SFLAG_ANON);
29    $k |= PLOT_ORDER_KEY_NOT_WALL unless ($_ & img_SFLAG_WALL);
30    printf "\t0x%04x,\n", $k;}
Note: See TracBrowser for help on using the repository browser.