Giter Club home page Giter Club logo

frotz's Introduction

This project has moved to https://gitlab.com/DavidGriffith/frotz

FROTZ V2.45pre - An interpreter for all Infocom and other Z-machine games.
Complies with standard 1.0 of Graham Nelson's specification.

Originally written by Stefan Jokisch in 1995-1997.
Ported to Unix by Galen Hazelwood.
Reference code and Unix port currently maintained by David Griffith.

- Compiles and runs on most common flavors of Unix, both open source and not.
- Plays all Z-code games including V6.
- Sound support through libao.
- Config files.
- Configurable error checking.
- Distributed under the GNU Public License.


For information on what Interactive Fiction is and how to play it, see the
file "HOW_TO_PLAY".

For installation information, see the file "INSTALL".

For update history, see the file "Changelog".

For information on known bugs in Frotz, see the file "BUGS".

The latest information on and source code of Unix Frotz is available at 
https://gitlab.com/DavidGriffith/frotz
The old repository at Github is now deprecated. It will serve as a 
mirror for the time being, but will eventually be deleted.

The latest release of Unix Frotz is available from the Interactive
Fiction Archive at:
http://www.ifarchive.org/if-archive/infocom/interpreters/frotz/
	frotz-<version>.tar.gz
and
ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/frotz/
	frotz-<version>.tar.gz


The Interactive Fiction Archive has several mirrors which may be better
choices depending on where you live.  Here is a partial list.

in the USA:         http://mirror.ifarchive.org/
                    http://ifarchive.jmac.org/
                    http://ifmirror.russotto.net/
                    http://ifarchive.flavorplex.com/
                    http://ifarchive.smallwhitehouse.org/
                    http://ifarchive.wurb.com/
                    http://ifarchive.plover.net/
                    http://www.ifarchive.info/
                    http://ifarchive.ifreviews.org/
                    http://mirrors.ibiblio.org/interactive-fiction/
in Ireland:         http://ifarchive.heanet.ie/
in Austria:         http://ifarchive.giga.or.at/

FTP based mirrors are also available:

in the USA:         ftp://ifarchive.ifreviews.org/if-archive/
in Austria:         ftp://ftp.giga.or.at/pub/ifarchive/
in Finland:         ftp://ftp.funet.fi/pub/mirrors/ftp.ifarchive.org/if-archive/

And via Gopher:

in the USA:         gopher://gopher.661.org/1/if-archive/

frotz's People

Contributors

blanham avatar clusterfudge avatar davidgriffith avatar erikd avatar escondida avatar everlastingwonder avatar fornwall avatar fundamental avatar laanwj avatar llasram avatar stefanjokisch avatar superxkooda avatar timtelcik avatar tkorvola avatar tschmidty69 avatar unix-ninja avatar welash avatar zoeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frotz's Issues

Decide how Ctrl-C should be handled

All this time, Ctrl-C caused Frotz to immediately and cleanly exit. This behavior is expected for command-line programs, but not necessarily so for full-screen programs. I have often found myself thinking in terms of a shell prompt. There, Ctrl-C will abort the line currently being typed. Perhaps that should be what Ctrl-C does in Frotz. Ctrl-Q seems like a much better choice for an immediate exit.

I'll need to fiddle around in src/curses/ux_init.c in os_init_screen() to tame raw mode. Why is it in cbreak mode?

Can't build dumb version

I'm attempting to compile the dumb version for use with grue, and I'm running into this error:

src/dumb/dumb_input.c:82:13: error: conflicting types for ‘getline’
In file included from src/dumb/../common/frotz.h:29:0,
                 from src/dumb/dumb_frotz.h:9,
                 from src/dumb/dumb_input.c:7:
/usr/include/stdio.h:671:20: note: previous declaration of ‘getline’ was here
make: *** [src/dumb/dumb_input.o] Error 1

This is on Debian 7 with the provided Makefile.

Frotz tries too hard to read game files

I just noticed that Frotz will segfault if told to load arbitrary files that aren't Z-machine games or Blorb files. This indicates that it's trying too hard to read the file or at least the checks for a Z-machine file or Blorb file are going wrong.

Do something about checking before overwrite.

With the dumb interface, Frotz will check before overwriting a file (save, transcript, or recording). With the curses interface, this is not done. I need to decide if always checking for overwrite is desirable or to provide a command-line switch for this.

unable to start game.

Loaded Game: zork
events.js:182
throw er; // Unhandled 'error' event
^

Error: spawn dfrotz ENOENT
at _errnoException (util.js:1021:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

-m parameter for Dumb Frotz not covered in the help menu

Dumb Frotz has a -m argument. When used, this skips "MORE" breaks in the text. If you're using dumb frotz on top of such an interface, getting rid of the "MORE" breaks can be very helpfu.

However, for some reason running "dfrotz -h" will not tell you that such an argument exists, I came across it through this forum post: http://www.intfiction.org/forum/viewtopic.php?f=38&t=18125

Repo steps:
Type in "dfrotz -h" to see the help menu for Dumb Frotz

Expect:
That the help menu would tell you about the -m argument

Actual:
The help menu doesn't mention the -m argument.

Thank you again to all who helped build such a great program as frotz, many fun times using it and I've installed it on so many systems. Really great stuff.

High Pulseaudio load

Frotz puts a lot of load on Pulseaudio, even in games with no sound. Pulseaudio CPU usage is constantly in the 110-140% range on my machine when Frotz is running and no sound playing (by Frotz or anything else). I bisected this to f27d632 but haven't debugged further.

dumbfrotz won't read Blorb files

Hello, when using the latest version of frotz (built on Linux with unchanged Makefile) and trying to run Child's Play, I get:

./dfrotz ChildsPlay.zblorb
Fatal error: Unknown Z-code version

Running ./frotz ChildsPlay.zblorb works perfectly and gives no errors.

Any help would be greatly appreciated (I do need dumbfrotz specifically because I'm interested in an stdin/stdout interpreter) :)

DOS Frotz crashes on real hardware

I posted to a few places asking for people to test DOS Frotz on real hardware. So far, only one person replied. The test machine was a 486DX4 running at 75 Mhz with 24M of RAM and no sound card. It crashes horrible after three but less than ten moves. Test game is LostPig.z8. The computer's display was photographed and sent to me. I'm just going to release 2.44 now. This is the transcription:

>go west
Grunk no allowed in field. That probably OK, because Grunk no think pig tall
enought to climb over wall.

>look around
Grunk not see that there.

>find the goddam pig
Grunk no know where that at.

>lol
Grunk not know what that mean.

>go east
Forest look dark. Pig probably some place in there, but Grunk not know which way
to go. Not want end up lost in forest with no pig.

>go west
        dos mem corrupt, first_mcb=0277
prev 0899:0000|4D 9A 08 80 64 E9 91 03 46 52 4F 54 5A 00 00 M?.?d??.FROTZ...
notM26D1A:0000|58 60 1D EA 23 25 FC A5 7B 54 1E 70 23 f2 6B X`..?#%??{T.p#?k

PANIC: before 4a: MCB chain corrupted
System halted

Audio works but only for one sound at a time

I've managed to get audio playback working for AIFF, OGGV, and MOD, but this only works for one sound being played at a time. According to the specs, AIFF can be played at the same time as an OGGV or MOD, but at no time may an OGGV and MOD play at the same time. My code seems to enforce this restriction, but I am having lots of trouble getting AIFF and OGGV/MOD streams mixed. When I start a long-lasting OGGV or MOD clip, then cause an AIFF to play, I get distortion, slowdown, and finally a segfault. I can't figure out what the problem is or even any reference code on doing this the right way.

@erikd, this is what I described to you around a month ago in #xiph. Please take a look at it. The relevant branch is ao-curses.

Frotz 2.45pre does not compile for Apple MacOS Sierra 10.12 plus MacPorts

Issue

Frotz 2.45pre does not compile for Apple MacOS Sierra 10.12 plus MacPorts

System Info

$ uname -a
Darwin tim-mbp13 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

$ port version
Version: 2.4.1

Build Log

$ cat src/common/defines.h
#define VERSION "2.45pre"

$ make clean

$ make
Creating src/common/git_hash.h
head: -: No such file or directory
Generating src/common/defines.h
Generating src/curses/defines.h
gcc -Wall -Wextra -std=gnu99 -g -o src/common/buffer.o -c src/common/buffer.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/err.o -c src/common/err.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/fastmem.o -c src/common/fastmem.c
src/common/fastmem.c:722:6: warning: variable 'gfp' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (os_read_file_name (new_name, f_setup.save_name, FILE_RESTORE) == 0)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:770:9: note: uninitialized use occurs here
    if (gfp == NULL && f_setup.restore_mode)
        ^~~
src/common/fastmem.c:722:2: note: remove the 'if' if its condition is always false
        if (os_read_file_name (new_name, f_setup.save_name, FILE_RESTORE) == 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:695:6: warning: variable 'gfp' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (os_read_file_name (new_name, default_name, FILE_LOAD_AUX) == 0)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:770:9: note: uninitialized use occurs here
    if (gfp == NULL && f_setup.restore_mode)
        ^~~
src/common/fastmem.c:695:2: note: remove the 'if' if its condition is always false
        if (os_read_file_name (new_name, default_name, FILE_LOAD_AUX) == 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:685:14: note: initialize the variable 'gfp' to silence this warning
    FILE *gfp;
             ^
              = NULL
2 warnings generated.
gcc -Wall -Wextra -std=gnu99 -g -o src/common/files.o -c src/common/files.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/hotkey.o -c src/common/hotkey.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/input.o -c src/common/input.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/main.o -c src/common/main.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/math.o -c src/common/math.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/object.o -c src/common/object.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/process.o -c src/common/process.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/quetzal.o -c src/common/quetzal.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/random.o -c src/common/random.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/redirect.o -c src/common/redirect.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/screen.o -c src/common/screen.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/sound.o -c src/common/sound.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/stream.o -c src/common/stream.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/table.o -c src/common/table.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/text.o -c src/common/text.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/variable.o -c src/common/variable.c

Archiving common code...
/usr/bin/ar rc src/frotz_common.a src/common/buffer.o src/common/err.o src/common/fastmem.o src/common/files.o src/common/hotkey.o src/common/input.o src/common/main.o src/common/math.o src/common/object.o src/common/process.o src/common/quetzal.o src/common/random.o src/common/redirect.o src/common/screen.o src/common/sound.o src/common/stream.o src/common/table.o src/common/text.o src/common/variable.o
/usr/bin/ranlib src/frotz_common.a

gcc -Wall -Wextra -std=gnu99 -g -o src/curses/ux_init.o -c src/curses/ux_init.c
In file included from src/curses/ux_init.c:46:
src/curses/ux_blorb.h:24:5: error: unknown type name 'ulong'; did you mean 'long'?
    ulong type;
    ^~~~~
    long
src/curses/ux_init.c:996:11: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
    dummy = dummy;
    ~~~~~ ^ ~~~~~
1 warning and 1 error generated.
make: *** [src/curses/ux_init.o] Error 1

Frotz 2.45pre does not compile for Apple MacOS Sierra 10.12 plus MacPorts

Frotz 2.45pre does not compile for Apple MacOS Sierra 10.12 plus MacPorts

System Info

$ uname -a
Darwin tim-mbp13 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

Build Log

$ cat src/common/defines.h
#define VERSION "2.45pre"

$ make clean

$ make
Creating src/common/git_hash.h
head: -: No such file or directory
Generating src/common/defines.h
Generating src/curses/defines.h
gcc -Wall -Wextra -std=gnu99 -g -o src/common/buffer.o -c src/common/buffer.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/err.o -c src/common/err.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/fastmem.o -c src/common/fastmem.c
src/common/fastmem.c:722:6: warning: variable 'gfp' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (os_read_file_name (new_name, f_setup.save_name, FILE_RESTORE) == 0)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:770:9: note: uninitialized use occurs here
    if (gfp == NULL && f_setup.restore_mode)
        ^~~
src/common/fastmem.c:722:2: note: remove the 'if' if its condition is always false
        if (os_read_file_name (new_name, f_setup.save_name, FILE_RESTORE) == 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:695:6: warning: variable 'gfp' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (os_read_file_name (new_name, default_name, FILE_LOAD_AUX) == 0)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:770:9: note: uninitialized use occurs here
    if (gfp == NULL && f_setup.restore_mode)
        ^~~
src/common/fastmem.c:695:2: note: remove the 'if' if its condition is always false
        if (os_read_file_name (new_name, default_name, FILE_LOAD_AUX) == 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/fastmem.c:685:14: note: initialize the variable 'gfp' to silence this warning
    FILE *gfp;
             ^
              = NULL
2 warnings generated.
gcc -Wall -Wextra -std=gnu99 -g -o src/common/files.o -c src/common/files.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/hotkey.o -c src/common/hotkey.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/input.o -c src/common/input.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/main.o -c src/common/main.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/math.o -c src/common/math.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/object.o -c src/common/object.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/process.o -c src/common/process.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/quetzal.o -c src/common/quetzal.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/random.o -c src/common/random.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/redirect.o -c src/common/redirect.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/screen.o -c src/common/screen.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/sound.o -c src/common/sound.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/stream.o -c src/common/stream.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/table.o -c src/common/table.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/text.o -c src/common/text.c
gcc -Wall -Wextra -std=gnu99 -g -o src/common/variable.o -c src/common/variable.c

Archiving common code...
/usr/bin/ar rc src/frotz_common.a src/common/buffer.o src/common/err.o src/common/fastmem.o src/common/files.o src/common/hotkey.o src/common/input.o src/common/main.o src/common/math.o src/common/object.o src/common/process.o src/common/quetzal.o src/common/random.o src/common/redirect.o src/common/screen.o src/common/sound.o src/common/stream.o src/common/table.o src/common/text.o src/common/variable.o
/usr/bin/ranlib src/frotz_common.a

gcc -Wall -Wextra -std=gnu99 -g -o src/curses/ux_init.o -c src/curses/ux_init.c
In file included from src/curses/ux_init.c:46:
src/curses/ux_blorb.h:24:5: error: unknown type name 'ulong'; did you mean 'long'?
    ulong type;
    ^~~~~
    long
src/curses/ux_init.c:996:11: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
    dummy = dummy;
    ~~~~~ ^ ~~~~~
1 warning and 1 error generated.
make: *** [src/curses/ux_init.o] Error 1

@output_stream handled improperly

This was sent in by David Fillmore today:

According to the Z-Machine specification:
"In Version 6, a width field may optionally be given: if this is non-zero, text will then be justified as if it were in the window with that number (if width is positive) or a box -width pixels wide (if negative). Then the table will contain not ordinary text but formatted text: see print_form."

Frotz, on the other hand, tries to get the width of a window of number -width if the value is <= 0, but passes the width value through directly if it is positive. This results in the interpreter crashing with an "Illegal window" error if the width value is less than -7.

Sample Inform6 code tickling this bug:

Switches v6;
Array formatted table 50;
[ main x;
  @output_stream 3 formatted (-30);  ! Frotz treats this as a window number and crashes.
  print "ooh, hello there^boy^how are you";
  @output_stream (-3);
  @print_form formatted;
  @read_char 1 -> x;
];

Choose a coding style

Frotz has had a lot of contributors over the years, and there's never been any standard for what the code should actually look like. It's understandable; it's an old project. However, this can get distracting when indents within even a single function use spaces and tabs (dogs and cats living together, mass hysteria!) at random, have inconsistent bracing, and so forth.

Fortunately, indent(1) and find(1) exist! I propose that we choose a code formatting standard and stick with it, starting by running indent over the project.

Personally, I vote for K&R style, since Kernighan & Ritchie were pretty good at C. Pie-in-the-sky I'd modify that to one-true-brace style, but as far as I can tell neither GNU nor BSD indent supports that.

The magic invocation I've tested is this:
indent -kr -bad -c1 -cd1 -cp1 -nlp -ts4

The switches beyond -kr are to make the output a bit more like that of the book, rather than GNU's baffling choices (indenting comments halfway across the screen, etc.). -ts4 means that indent will use tab stops of 4 spaces for its work; this should have no effect on how the code actually appears in your editor.

I'm happy to do the work myself, too, though I should note that I'm not really comfortable with suddenly appearing to take credit for every single line of code in the project...

Saving transcripts using dumb frotz (dfrotz)

When I try to save transcripts using the dumb frotz interface (dfrotz) I receive a segmentation fault.

Here is an example of what I am trying to do:

>echo "transcript. myfilename. south. quit. yes" | ./dfrotz -S0 -m Advent.z5

Welcome to Adventure!
(Please type HELP for instructions and information.)
.
ADVENTURE
The Interactive Original
By Will Crowther (1976) and Don Woods (1977)
[...]

At End Of Road
You are standing at the end of a road before a small brick building. Around
you is a forest. A small stream flows out of the building and down a gully.
.
At End Of Road                                 Score: 36    Moves: 0
.
> >Please enter a filename [(null)]:
EOT

DOS Frotz sometimes won't exit when told to do so

Submitted by auraes at
https://www.intfiction.org/forum/viewtopic.php?f=38&t=3937&start=10#p139443

Frotz under Dosbox: (Lubuntu 16.04.3 LTS)
With some games, i can't quit the game without kill dosbox !

https://ifarchive.org/if-archive/games/zcode/Advent.z5

frotz ADVENT.Z5
>quit
Are you sure you want to quit?
>y

(I can't, I must kill Dosbox!)
I recompiled the source code game Advent.inf with the latest version of the compiler and libraries and now it works.

https://ifarchive.org/if-archive/games/zcode/LostPig.z8

frotz LOSTPIG.Z8
>quit
Really all done with story?
>y

(I can't, I must kill Dosbox!)
I don't have the source code of the game so I can't try to recompile it.

Saving can overwrite arbitrary files

I run a Discord Bot that runs games on instances of DumbFrotz. However, when saving a game, one can specify an arbitrary filepath for the save, potentially overwriting other files in the entire filesystem.

Examples of dangerous filepaths one can specify:

  • /home/pi/Desktop/save
  • ../save

Replacing save with any filename will simply overwrite them.

Suggestions:
A flag when initializing DFrotz to output the raw savedata to STDOUT to be read externally by the program managing it.

"Hard Drive on Fire!" error message

I'm using a ported 2.43 version on a Kindle, using its inbuilt Linux.
I get a "Hard drive on fire!" error message when trying to run frotz.
What does this error indicate and how to avoid it at runtime?
Browsing through the code, I see that it has something to do with the HOMEDIR environment variable.

readline support

Would readline support be possible? Or running frotz with rlwrap perhaps.

Output doesn't mark italics, bold, monospace

As dumbfrotz purely outputs to console, I would assume stylings for italics, bold and monospace would be stripped.

Given its uses in places where such stylings are possible (e.g. IRC, Discord, Slack), it would be useful if there were a flag that caused outputs to include them.

Formatting could use the characters used in most IRC clients or ANSI escape codes (although the latter does not seem to have any support for monospace styling, given the nature of CLIs).

Handle terminal resizing

I thought that the Z-machine could not handle having the terminal size changing. Apparently it can because Fizmo seems to have no trouble doing this.

Can't compile blorb in dev (reordering cc options fixed it)

Standard compile after moving just -lcurses to the end still failed

cc -Wall -Wextra -std=gnu99 -g -I/usr/local/include -lao -ldl -lpthread -lm -lsndfile -lvorbisfile -lmodplug -lsamplerate -L/usr/local/lib src/frotz_common.a src/frotz_curses.a src/blorblib.a -o frotz -lncurses
src/frotz_curses.a(ux_audio.o): In function `audiobuffer_init':
/home/homeassistant/WORK/frotz/src/curses/ux_audio.c:112: undefined reference to `sem_init'
/home/homeassistant/WORK/frotz/src/curses/ux_audio.c:113: undefined reference to `sem_init'
/home/homeassistant/WORK/frotz/src/curses/ux_audio.c:114: undefined reference to `sem_post'
src/frotz_curses.a(ux_audio.o): In function `os_init_sound':

Was able to compile manually wiht this line and everything worked well

cc -Wall -Wextra -std=gnu99 -g -I/usr/local/include src/frotz_common.a src/frotz_curses.a src/blorblib.a -o frotz -lncurses -lao -ldl -lpthread -lm -lsndfile -lvorbisfile -lmodplug -lsamplerate -L/usr/local/lib

what is a xxx? includes trailing question mark in definition lookup

Thanks for keeping these awesome games alive. Here's a very minor issue I found.

Scenario

Running Zork I from Lost Treasures of Infocom
LinuxUbuntu FrotzV2.43
Typed: "what is a grue?"

Expected Results

[grue definition]

Actual Results

I don't know the word "grue?".

Fault isolation

"what is a grue" returns expected result

Figure out if/how to deal with XDG config file stuff

I'm not sure how I was planning to do things in src/curses/ux_init.c with XDG configuration. That is, if or how to put config files in $HOME/.config.

I put this chunk of code into the master branch near the top of os_process_arguments():

        if (getenv("XDG_CONFIG_HOME")) {
                snprintf(configfile, FILENAME_MAX,
                        "%s/frotz/frotz.conf", getenv("XDG_CONFIG_HOME"));
        } else {
                snprintf(configfile, FILENAME_MAX,
                        "%s/.config/frotz/frotz.conf", home);
        }

        if (!getconfig(configfile)) {
                snprintf(configfile, FILENAME_MAX, "%s/.frotzrc", home);
        }
    
        if (!getconfig(configfile)) {
                snprintf(configfile, FILENAME_MAX, "%s/frotz.conf", CONFIG_DIR);
                getconfig(configfile);  /* we're not concerned if this fails */
        }

While in ao-curses, it remained like this:

    /* First check for a "$HOME/.frotzrc". */
    /* If not found, look for CONFIG_DIR/frotz.conf */
    /* $HOME/.frotzrc overrides CONFIG_DIR/frotz.conf */

    strncpy(configfile, home, FILENAME_MAX);
    strncat(configfile, "/", 1);

    strncat(configfile, USER_CONFIG, strlen(USER_CONFIG));
    if (!getconfig(configfile)) {
        strncpy(configfile, CONFIG_DIR, FILENAME_MAX);
        strncat(configfile, "/", 1);    /* added by DJP */
        strncat(configfile, MASTER_CONFIG, FILENAME_MAX-10);
        getconfig(configfile);  /* we're not concerned if this fails */
    }

Sound sucks

Sound needs to be able to play without blocking the rest of the program. I thought that simply forking would work, like it did with the OSS sound support, but I ran into weird problems when it came to needing to stop sounds. Threads then became the way to go. I don't have a solid handle on how to do this yet.

The other big part of sound support is making sure the sounds play correctly. OGG and MOD files will play correctly, but AIFF might or might not. 2-channel, 16-bit, 44100 Hz samples play fine. 1-channel, 8-bit, 11025 Hz samples play too fast and high.

Check for glulx exec in blorb

Perhaps Frotz should check for a Glulx exec in the supplied Blorb file. If found, then Frotz will say something about needing a Glulx interpreter.

Makefile declares INCL and FLAGS, but never uses them

The Makefile has the following declaration:

FLAGS = $(OPTS) $(CURSES_DEFS) $(INCL)

However, it is not used anywhere in the code. So setting INCL is useless, because the only place it is used is in declaring FLAGS, and $(FLAGS) is never used.

zcode_path is problematic

It was reported to me that the zcode path option in the frotz config file isn't being properly used.

With a story file called just “BALLYHOO”:

modok:frotz-master jon$ ./frotz BALLYHOO
Error: Cannot read blorb file ./BALLYHOO.blb.

Fatal error: Cannot open story file

With a story file and an extension:

modok:frotz-master jon$ ./frotz ZORK1.z5 
Error: Cannot read blorb file ./ZORK.blb.

Fatal error: Cannot open story file

With a full path, it works. The blorb file error is visible after the game
quits, so that doesn’t seem to be related.

modok:frotz-master jon$ ./frotz
/Users/jon/Applications/Infocom/Data/ZORK1.z5 
Error: Cannot read blorb file
/Users/jon/Applications/Infocom/Data/ZORK1.blb.

Accents and other special characters missing

Hi,

I am trying to use an spanish translation for "Adventure", but accents and other characters like ñ letter and opening "¡" are missing.
It seems Frotz is still missing UTF-8, right?

sfrotz -h and -w options work with pixels, not characters

I noticed that the -h and -w options for sfrotz don't work as they do for the curses and dumb interfaces. They specify pixels instead of characters. This should probably be fixed, worked around, or have options for setting pixel dimensions moved to other options.

Fatal error: Text buffer overflow

Inform 7 can compile and produce a .z8 file that crashes the interpreter. story here: https://raw.githubusercontent.com/BroadcastGames/Inform7_StoryCode0/master/storyFilesPile0/Inform7ZMachineStyles0.ni - run the .z8 and go North, North and it crashes. Latest version built on Ubuntu. Thank you.

North Overflow is a room, north of North Escape. "Here you go. [fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E. More: [fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E. Even More: [fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E[fixed letter spacing]A[variable letter spacing]B[bold type]C[italic type]D[roman type]E. Inform 7 build 6M62 limit. 012345678901234567890123456789."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.