Text Window Input-Output Control

version 2 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Hacked code for including inline graphics

    Include (-

    [ VM_Picture resource_ID;
        if (glk_gestalt(gestalt_Graphics, 0)) {
            glk_image_draw( (+ current text output window +).ref_number, resource_ID, imagealign_InlineCenter, 0);
        } else {
            print "[Picture number ", resource_ID, " here.]^";
        }
    ];

    !No change made to sound effect code by Text Window I-O Control; included only as part of the same source code section as the figure display code.

    [ VM_SoundEffect resource_ID;
        if (glk_gestalt(gestalt_Sound, 0)) {
            glk_schannel_play(gg_foregroundchan, resource_ID);
        } else {
            print "[Sound effect number ", resource_ID, " here.]^";
        }
    ];

    -) instead of "Audiovisual Resources" in "Glulx.i6t"