the-infocom-files / trinity

Trinity
24 stars 5 forks source link

Restoring to superbrief mode prints an extra space #45

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

This happens when restoring a game where the saved game is in superbrief mode:

>RESTORE
Enter a file name.
Default is "trinity.qzl":

[RESTORE completed.]

Meadow
You've discovered a golden meadow, bordered on every side by a dense forest. The
air is filled with dragonflies, and the wood echoes with the cry of mourning
doves.

A giant toadstool is growing nearby.

A triangular shadow inches across the ground. Its sharp point is sweeping
northward, away from the toadstool.

If the savegame isn't in superbrief mode, only one blank line is printed after "[RESTORE completed.]". That's because V-SAVE (where the execution resumes on a successful restore) does this:

     <COMPLETED "RESTORE">
     <CRLF>
     <V-LOOK>

And the COMPLETED routine (like the FAILED routine) explicitly prints an extra line break in superbrief mode:

<ROUTINE COMPLETED (STR)
     <TELL CR "[" .STR " completed.]" CR>
     <V-$REFRESH <>>
     <COND (<ZERO? ,VERBOSITY>
        <CRLF>)>
     <RTRUE>>

<ROUTINE FAILED (STR)
     <TELL CR "[" .STR " failed.]" CR>
     <V-$REFRESH <>>
     <COND (<ZERO? ,VERBOSITY>
        <CRLF>)>
     <RTRUE>>

I assume that's by design (in superbrief mode there's usually no blank line before the prompt, but I guess these messages are supposed to stand out a bit), though not in this one particular case. So if it's worth fixing at all, the fix should probably be in V-SAVE.

eriktorbjorn commented 4 years ago

I first noticed this phenomenon when comparing the output of a successful and failed $VERIFY in superbrief mode:

>$VERIFY
Interpreter 1 Version F

[Verifying.]

[Disk correct.]
>
$VERIFY
Interpreter 1 Version F

[Verifying.]

[$VERIFY failed.]

>

That's because V-$VERIFY uses FAILED for a failed $VERIFY, but an ordinary TELL for a successful one. But this, I think, is even less worth fixing.