The list of options is described below. The gamefile should be the filename of a Z-code file or a PICKLE archive containing a Z-code file.
The interface is heavily (well, completely) based on ATK, an X toolkit developed at CMU. Really, I would have preferred to actually do this in ATK... except that then you'd need ATK to run it, and that's 50 megabytes of source code. (Honest.) So I just did an imitation.
In the text window:
Left-click to move the dot to the mouse location.
Click-and-drag to select a large region.
Right-click to extend the selection to the mouse location.
Double-clicking selects a word (or extends the selection one word at a time).
In the scroll bar:
Left-click on the arrows to scroll to the top or bottom.
Right-click on the arrows to scroll up or down one line.
Click-and-drag on the elevator will scroll up and down smoothly.
Left-click in the bar (without dragging) will scroll down by an amount controlled by where in the bar you click. The farther down the bar, the more it scrolls. This is computed so that if you left-click next to a line, that line scrolls to the top of the screen.
Right-click in the bar (without dragging) will scroll up in a similar manner. The top line will scroll down to where you clicked.
The commands listed below are the defaults. They can be customized with the bindings X resource (see below.) \<none> indicates a function which by default is not bound to any key.
ctrl-f (forward-char) Move dot forward one character.
ctrl-b (backward-char) Move dot backward one character.
meta-f (forward-word) Move dot forward one word.
meta-b (backward-word) Move dot backward one word.
ctrl-a (beginning-of-line) Move dot to beginning of line.
ctrl-e (end-of-line) Move dot to end of line.
PageDown, ctrl-v (scroll-down) Scroll down one page.
PageUp, meta-v (scroll-up) Scroll up one page.
delete (delete-char) Delete character before the dot.
ctrl-d (delete-next-char) Delete character after the dot.
meta-delete (delete-word) Delete word before the dot.
meta-d (delete-next-word) Delete word after the dot.
ctrl-w (kill-region) Cut selection to cut buffer.
meta-w (copy-region) Copy selection to cut buffer.
ctrl-y (yank) Copy the cut buffer in at the dot.
ctrl-k (kill-line) Cut from dot to end of line into the cut buffer.
ctrl-u (kill-input) Cut all text typed so far into the cut buffer.
UpArrow, meta-= (backward-history) Move back one line in command history buffer.
DownArrow, meta-` (forward-history) Move back one line in command history buffer.
meta-0...meta-9 (macro) Insert a macro string at the dot. By default, all macros are undefined at startup, but you can change this with the bindings option.
meta-r (define-macro) The next macro key hit will be redefined to be the selection. If there is no selection, or if the next key hit is not a macro key, an error is displayed.
ctrl-l (redraw-all-windows) Redraw text and status windows.
\<none> (redraw-status) Redraw status window.
\<none> (redraw-screen) Redraw text window.
meta-z (zoom-status) Expand status window to maximum size (only when the autoresize option is on.)
meta-s (shrink-status) Shrink status window to minimum size (only when the autoresize option is on.)
meta-c (clear-status) Clear any extra text below the status line in the status window.
Enter, Return (enter) Accept the text that has been typed.
Escape (escape) Set escape mode; next key hit will be taken as a meta key.
ctrl-g (cancel) Cancel escape mode, and anything else that's going on.
Help, ctrl-_ (explain-key) Explain the next key hit; this displays the function that the key is bound to, and its argument, if any.
All normal keys (insert-self) Insert whatever key is bound to this at the dot.
\<none> (no-op) Do nothing. Bind a key to this to disable it.
Command-line options go on the command line, looking like,
xzip -option value gamefile
Note that even binary options like "justify" must be given a value, "yes" or "no".
Resources are usually placed in your .Xdefaults or Xresources file, depending on your system setup. They have the format
xzip.resourcename: value
These are the resources and options that you can currently set. The default values are in italics.
The status window always uses the fixed-width fonts; the text window usually (but not always) uses proportional fonts.
key=function [, "argument"]; key=function [, "argument"] ...
where key is the name of a key, preceded by c- to indicate a control key and m- to indicate a meta key. function should be one of the function names listed in parentheses in the "Key Bindings" section. "argument" (which is optional) should be a quoted string which will be passed to the function. Currently, only the macro function takes an argument.
So, for example,
xzip.bindings: c-x=kill-input; m-i=macro,"inventory"; m-d=no-op
would mean that ctrl-x will delete all input, and meta-i will enter the string "inventory", and meta-d will do nothing. You can have more than one key bound to a function, but you can only have one function bound to a key; later bindings will override earlier ones.
Ok, I lied; there's one behavior which is set by an environment variable. If you set INFOCOM_PATH to a directory or colon-separated list of directories, xzip will look there for a story file if it doesn't find it in the current directory.
Certain games (notably Trinity and Curses! ) display pop-up windows, by using the status line in a slightly funky way. They expand the status line, display some text, and then immediately shrink the status line again.
I have done my best to support this in xzip \'s two-window system. The pop-up window will be visible from when it is created until the first time you hit Return. Then the status window will shrink again. This gives you one "turn" to read the pop-up, which should be sufficient. (In one-window, non-scrolling interpreters, the pop-up appears over your old text, and scrolls away as you continue play.)
If you turn off the autoclear option, pop-ups will not be erased; use meta-z to expand the status window and read them after the window shrinks, and meta-c to erase them manually. If you do not erase the pop-up, a later pop-up may partially overwrite it, which looks ugly.
If you turn off the autoshrink option, the status window will not shrink, but the pop-up will still be erased (unless you have turned off autoclear as well.)
If a timed input (such as Border Zone uses) expires while you are editing a line, the dot jumps to the end of the line.
If a style change occurs in the middle of a word, xzip thinks it's okay to break the word there (when wrapping lines.)
Reverse text has gaps in it in full-justified lines. It also has gaps between lines, in the text window.
The keybindings are ignored while xzip is waiting for a single keystroke (as opposed to a line of input.) ctrl-l is hardwired to work, but any other key will just be taken literally.
Scrolling is slow and awful on X servers without backing store.
Ignores meta modifier on special keyboard keys (Home, PageUp, etc)
Parsing of keys in bindings could be cleverer. It ought to understand /123 octal notation at least.
Ought to have separate font and color prefs for the status window.
Sometimes makes you place a window by hand, even though the geometry is specified.
The Z-code engine is taken from ZIP V2.0.7 by Mark Howell (howell_ma@movies.enet.dec.com)
For more information, see the web page: http://www.eblong.com/zarf/xzip.html
You are expressly forbidden to use this program on an Infocom game data file if, in so doing, you violate the copyright notice supplied with the original Infocom game.
Parts of this program (the files xinit.c, xio.c, xkey.c, xmess.c, xstat.c, xtext.c) are copyrighted by Andrew Plotkin. These files may be distributed, modified, and used freely, with the exception noted above.
I do not know the exact copyright status of the rest, except that it was written by Mark Howell and thus is probably copyrighted by him. He released it for free, so to the best of my knowledge, it can also be distributed, modified, and used freely, with the exception noted above.