Glimmr Automap

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Debugging (not for release)

    Dumping automap data is an action out of world applying to nothing. Understand "automap dump" or "dump map" or "dump automap" as dumping automap data. Understand "map dump" as dumping automap data when glulx graphics is supported.

    Carry out dumping automap data:
        say "Map measures [map width] by [map height], totalling [map height * map width] tiles.[line break]Window measures [width of the assigned window of the map-renderer] x [height of the assigned window of the map-renderer] px.[line break]Scaled tile measures [tile-width of associated tileset of the map-renderer * arbitrary scaling factor of the assigned window of the map-renderer] x [tile-height of associated tileset of the map-renderer * arbitrary scaling factor of the assigned window of the map-renderer] px.[line break]Canvas measures [canvas-width of the associated canvas of the map-renderer] x [canvas-height of the associated canvas of the map-renderer] canvas units.";
        say "Dump of automap data:[paragraph break][fixed letter spacing]";
        let scan be 0;
        repeat with count running from 1 to (map width * map height):
            increase scan by 1;
            if scan > map width:
                say "[line break]";
                let scan be 1;
            if map glyph of count is 32:
                say "... ";
            otherwise if map glyph of count < 10:
                say " [map glyph of count] ";
            otherwise if map glyph of count < 100:
                say " [map glyph of count] ";
            otherwise:
                say "[map glyph of count] ";
        say "[variable letter spacing][line break]".
        
    Dumping automap links is an action out of world applying to nothing. Understand "automap link/links dump" or "dump links" or "dump map links"or "dump automap links" as dumping automap links. Understand "map link dump" as dumping automap links when glulx graphics is supported.

    Carry out dumping automap links:
        say "Map measures [map width] by [map height], totalling [map height * map width] tiles.[line break]Window measures [width of the assigned window of the map-renderer] x [height of the assigned window of the map-renderer] px.[line break]Scaled tile measures [tile-width of associated tileset of the map-renderer * arbitrary scaling factor of the assigned window of the map-renderer] x [tile-height of associated tileset of the map-renderer * arbitrary scaling factor of the assigned window of the map-renderer] px.[line break]Canvas measures [canvas-width of the associated canvas of the map-renderer] x [canvas-height of the associated canvas of the map-renderer] canvas units.";
        say "Dump of automap hyperlink data:[paragraph break][fixed letter spacing]";
        let scan be 0;
        repeat with count running from 1 to (map width * map height):
            increase scan by 1;
            if scan > map width:
                say "[line break]";
                let scan be 1;
            if linked room-ID of count is 0:
                say ".. ";
            otherwise:
                say "[glulx equivalent of the linked room-ID of count] ";
        say "[variable letter spacing][line break]".