MeijisIrlnd notes::
Call startZork(false)
to use cin / cout, or startZork(false)
to have input read from e_inputQueue, and output written to e_outputQueue. YMMV!
This is a C++-17 port of the final 616-point Zork, written at MIT around 1978-1981. The goal was to do a port as directly as possible, meaning that the original logic, structures, functions, modules, etc. are ported as-is. Therefore, it is not necessarily the most "C++" way of doing things. The main exceptions to the MDL code are saving/restoring, which uses the Boost serialization libraries, and I/O, which uses C++ cin/cout. Restarting also needs platform-specific code to find the application's location. There is also no attempt to obfuscate or encrypt any of the text, rooms, puzzles, and so on. With the number of walkthroughs on the internet, it seems pointless to take such precautions.
A map of the 585-point version is here. It is missing three puzzles, but I could not find a more complete one. One additional modification: Use the "TERMINAL" command in Zork to simulate the feel of a 1970's-era terminal output.
Builds are supported for Linux (gcc-7 required) and Windows (32 and 64 bit, Visual Studio 2017 required). There is nothing using any non-standard C++ anywhere in the code, so it should be simple to port to other platforms. It also makes extensive use of C++-17 features, and thus a C++-17-compliant compiler is required.
Build requirements:
Boost (www.boost.org) - Requires the program_options and the serialization libraries. This build used version 1.70.0.
CMake Build Recipe (Tested in Ubuntu 18.04 w/ gcc 9.2.1).
From project folder:
$ mkdir build
$ cd build
$ cmake ..
$ make
Party like it is 1979 ...