source: git/src/gen_img2aven @ 76cf7f1

RELEASE/1.2debug-cidebug-ci-sanitiserswalls-data
Last change on this file since 76cf7f1 was 1ca095a, checked in by Olly Betts <olly@…>, 11 years ago
  • .gitignore,src/gen_img2aven: Commit script to generate img2aven.h.
  • Property mode set to 100755
File size: 773 bytes
Line 
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
12my @tab;
13for (0 .. 0x7f) {
14    my @f;
15    push @f, "LFLAG_SURFACE" if ($_ & img_SFLAG_SURFACE);
16    push @f, "LFLAG_UNDERGROUND" if ($_ & img_SFLAG_UNDERGROUND);
17    push @f, "LFLAG_ENTRANCE" if ($_ & img_SFLAG_ENTRANCE);
18    push @f, "LFLAG_EXPORTED" if ($_ & img_SFLAG_EXPORTED);
19    push @f, "LFLAG_FIXED" if ($_ & img_SFLAG_FIXED);
20    push @f, "LFLAG_NOT_ANON" unless ($_ & img_SFLAG_ANON);
21    push @f, "LFLAG_NOT_WALL" unless ($_ & img_SFLAG_WALL);
22    push @f, "0" if @f == 0;
23    print "\t".join("|", @f).",\n";
24}
Note: See TracBrowser for help on using the repository browser.