Flexible Windows

version 13/130803 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next

  • section - Identify glx rubbish

    A glulx zeroing-reference rule (this is the default removing references rule):
        doll-up properties; [ rebuild I7 properties, if we need to. ]
        if rocks are currently unassigned, follow the allocate rocks rule;
        repeat with g running through g-windows begin;
            if g is not main-window
                now the ref-number of g is 0;
                now g is g-unpresent;
            end if;
        end repeat;

    To doll-up properties: (- CreatePropertyOffsets(); -)

    Definition: a g-window is on-call if the rock-value of it is the current glulx rock.

    A glulx resetting-windows rule (this is the default reobtaining references rule):
        let g be a random on-call g-window; [ get the particular window we're looking to build]
        if g is a g-window and the current glulx rock is not zero begin;
            now the ref-number of g is the current glulx rock-ref;
            now g is g-present; [ the window is RIGHT HERE ]
        end if;

        [ by the end of this, all the windows which are actually present are marked thus, and have ref numbers. All those which aren't present are also marked. We then match this up to requirements. ]

    The first glulx object-updating rule:
        set main-window ref;
        follow the delete-unrequired rule;
        follow the create-required rule.

    This is the delete-unrequired rule:
        while the number of g-unrequired g-present g-windows is not zero
            shut down a random g-unrequired g-present g-window;
        end while.

    This is the create-required rule:
        while the number of g-required g-unpresent g-windows is not zero
            open up a random g-required g-unpresent g-window;
        end while.