Automap

version 4 by Mark Tilford

  • Home page
  • Beginning
  • Previous



  • Section 99 - Debug verbs - Not for release

    [To check hyperlink availability:
        (- if (glk_gestalt(gestalt_Hyperlinks, 0))
            print "Hyperlinks supported!^";
        else
            print "Hyperlinks not supported!^";
        -).

    When play begins:
        if the automap hyperlinks option is active,
            Check hyperlink availability.
    ]
    Map viewing is an action out of world applying to nothing. Understand "map view" as map viewing.

    Carry out map viewing:
        say "Viewing rooms coregional with [location].";
        repeat with viewed room running through all rooms coregional with location begin;
            say "[viewed room] [if viewed room is not currently_mapped](currently unmapped ???) [end if]is at [map_x of viewed room], [map_y of viewed room].";
        end repeat;
        say "[line break]Viewing rooms not coregional with [location].";
        repeat with viewed room running through all rooms not coregional with location begin;
            say "[viewed room] [if viewed room is not currently_mapped](currently unmapped) [end if]is at [map_x of viewed room], [map_y of viewed room].";
        end repeat;

    Map dumping is an action out of world applying to nothing. Understand "map dump" as map dumping.
    Map link dumping is an action out of world applying to nothing. Understand "map link dump" as map link dumping.

    Include (-
    [ Automap_dump i;
        for (i = 0: i < MAP_WIDTH * MAP_HEIGHT; ++ i)
            print Automap_chars->i, " ";
    ];

    [ Automap_link_dump i j;
    #ifdef AUTOMAP_HYPERLINKS;
        for (i = 0; i < MAP_WIDTH * MAP_HEIGHT; ++ i) {
            j = Automap_links --> i;
            if (j ~= 0 && glk_gestalt(gestalt_Hyperlinks, 0))
                glk_set_hyperlink(j);
            print j, " ";
            if (j ~= 0 && glk_gestalt(gestalt_Hyperlinks, 0))
                glk_set_hyperlink(0);
        }
    #endif;
    ];
    -);


    To say automap dump:
        (- Automap_dump(); -).

    To say automap link dump:
        (- Automap_link_dump(); -).

    Carry out map dumping:
        say "MAP DUMP:[line break][automap dump].".
        
    Carry out map link dumping:
        say "MAP LINK DUMP:[line break][automap link dump].".
        
    Automap ends here.