Text Window Input-Output Control

version 2 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Hacked transcript routine

    Include (-

    [ SWITCH_TRANSCRIPT_ON_R;
        if (actor ~= player) rfalse;
        if (gg_scriptstr ~= 0) return GL__M(##ScriptOn, 1);
        if (gg_scriptfref == 0) {
            gg_scriptfref = glk_fileref_create_by_prompt($102, $05, GG_SCRIPTFREF_ROCK);
            if (gg_scriptfref == 0) jump S1Failed;
        }
        ! stream_open_file
        gg_scriptstr = glk_stream_open_file(gg_scriptfref, $05, GG_SCRIPTSTR_ROCK);
        if (gg_scriptstr == 0) jump S1Failed;
        BeginActivity( (+activating the transcript+) );
        ForActivity( (+activating the transcript+) );
        ! glk_window_set_echo_stream(gg_mainwin, gg_scriptstr);
        ! GL__M(##ScriptOn, 2);
        ! VersionSub();
        EndActivity( (+activating the transcript+) );
        return;
        .S1Failed;
        GL__M(##ScriptOn, 3);
    ];

    -) instead of "Switch Transcript On Rule" in "Glulx.i6t"