Glimmr Automap

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Graphlinking the map

    A clicking graphlink rule when the current graphlink window is a map-display window (this is the automap forward graphlinking rule):
        repeat through the Table of Graphlink Glulx Replacement Commands in reverse order:
            if the current graphlink window is g-win entry:
                if the current graphlink x >= p-left entry and the current graphlink x <= p-right entry and the current graphlink y >= p-top entry and the current graphlink y <= p-bottom entry:
                    now glulx replacement command is "";
                    now the current graphlink is linkid entry;
                    if there is an alt entry:
                        #if utilizing Glimmr debugging;
                        say "[>console][GLAM]Mouse input received on graphlink '[current graphlink]' in window [italic type][current graphlink window][roman type]: ([current graphlink x], [current graphlink y]). Automap graphlink rules triggered for room [i][glulx equivalent of alt entry][/i].[<]";
                        #end if;
                        follow the automap graphlink rules for the glulx equivalent of alt entry;[the glulx equivalent is a type-casting routine. It returns a room.]
                    otherwise:
                        #if utilizing Glimmr debugging;
                        say "[>console][GLAM]Mouse input received on graphlink '[current graphlink]' in window [italic type][current graphlink window][roman type]: ([current graphlink x], [current graphlink y]). Automap graphlink rules triggered.[<]";
                        #end if;
                        follow the automap graphlink rules for the current graphlink;
                    rule succeeds;
                    
    A clicking graphlink rule when the current graphlink window is a map-display window (this is the automap background graphlinking rule):
        unless the no query functionality option is active:
            deactivate the current map label;
            now the image-ID of UI-query is the resting state of UI-query;
            deactivate UI-query-explanation;
            follow the refresh windows rule;
            #if utilizing Glimmr debugging;
            say "[>console][GLAM]Mouse input received in window [i][current graphlink window][/i] (no link triggered): ([current graphlink x], [current graphlink y]). Query canceled.[<]";
            #end if;
            rule succeeds;
        #if utilizing Glimmr debugging;
        say "[>console][GLAM]Mouse input received in window [i][current graphlink window][/i] (no link triggered): ([current graphlink x], [current graphlink y]).[<]";
        #end if;
        rule fails.