ChickenMan
Experienced Member
I found a nice Adventure Game on an Excalibur 64 (and Aussie computer running CP/M 2.2) disk called "The Twilight Zone". It came compete with its C source code as well. However playing the game, it cant be completed due to an error found. The C code can be fixed but I have no idea what version of C was used to compile it. Near the start of the code it says
/* Compile by: c -k -f -s500 -w60 tz */
and right at the end it has
#include "stdlib.c"
Does anyone recognise this version of C that would allow me to re-compile to a working game?
Many thanks for any help
Alan
The start of the source code
/* TWILIGHT ZONE GAME
From 810717 (original assembler version) to 830125 in Z80 assembler.
831025 rr begin conversion to C 0.10
831028 rr convert some more 0.11
831028 rr more yet 0.12
831101 rr dictionary in room file 0.13
831104 rr add terminal file stuff 0.14
831106 rr simplify 0.15
831107 rr simplify 0.16
831108 rr misc fixup 0.17
831109 rr more misc fixup 0.18
831112 jd fixup to message routines 0.19
831114 rr further fixups, add save, load 0.20
*/
#define VRS 0
#define RLS 20
/* Compile by: c -k -f -s500 -w60 tz */
int rc, cnt, i;
char buffer[ 25000 ]; /* buffer for reading file */
char *p, *room[ 256 ]; /* buffer pointer, rooms */
char *wlk_msg[ 24 ]; /* points to walker messages */
char inp_buf[ 34 ]; /* input buffer */
int inp_cnt = 0; /* input buffer pointer */
char trmbuf[ 128 ]; /* storage for terminal file */
int width, height, defint, uselst, yfirst, method, addx, addy;
char *inistr, *clrscn, *clreos, *clreol, *curoff, *curon,
*curbeg, *curmid, *curend, *hiint, *loint, *revvid, *norvid,
*inslin, *dellin;
/* Dictionary: words should be strung together, separated by spaces.
Only the unique part should be included. Contained in first line
of TZ.R. Every word including the last one must be followed by spaces.
Incidentally, all lines of TZ.R should be terminated only by
line feeds. */
char *dic_ptr;
/* Controls used in messages are:
* clear screen
^ position cursor to message line (causes CEOL)
\ carriage return/line feed (causes CEOL)
| position cursor to user input line (HEIGHT-2)
_ include answer here (e.g. _4____)
*/
/* The following pieces of information must be saved */
int rm_num = 0; /* room number */
int seed; /* random seed */
int wtchct = 0; /* tv watch count */
int beerct = 0; /* drink beer count */
int cratct = 0; /* open crate count */
int pushct = 0; /* push button count */
int pushfl = 0; /* push button error flag */
int answer[ 5 ] = { 0, 1, 2, 3, 4 }; /* digits of answer */
struct walker {
int inrm; /* in room flag */
int rsel; /* room pointer */
int dsel; /* description selector */
int locn[ 8 ]; /* rooms walker appears at */
};
/* Woman walker descriptor */
struct walker woman = {
0, 0, 0,
4, 52, 64, 94, 109, 185, 201, 248 };
/* Man walker descriptor */
struct walker man = {
0, 0, 0,
3, 49, 97, 105, 111, 144, 166, 175 };
/* Compile by: c -k -f -s500 -w60 tz */
and right at the end it has
#include "stdlib.c"
Does anyone recognise this version of C that would allow me to re-compile to a working game?
Many thanks for any help
Alan
The start of the source code
/* TWILIGHT ZONE GAME
From 810717 (original assembler version) to 830125 in Z80 assembler.
831025 rr begin conversion to C 0.10
831028 rr convert some more 0.11
831028 rr more yet 0.12
831101 rr dictionary in room file 0.13
831104 rr add terminal file stuff 0.14
831106 rr simplify 0.15
831107 rr simplify 0.16
831108 rr misc fixup 0.17
831109 rr more misc fixup 0.18
831112 jd fixup to message routines 0.19
831114 rr further fixups, add save, load 0.20
*/
#define VRS 0
#define RLS 20
/* Compile by: c -k -f -s500 -w60 tz */
int rc, cnt, i;
char buffer[ 25000 ]; /* buffer for reading file */
char *p, *room[ 256 ]; /* buffer pointer, rooms */
char *wlk_msg[ 24 ]; /* points to walker messages */
char inp_buf[ 34 ]; /* input buffer */
int inp_cnt = 0; /* input buffer pointer */
char trmbuf[ 128 ]; /* storage for terminal file */
int width, height, defint, uselst, yfirst, method, addx, addy;
char *inistr, *clrscn, *clreos, *clreol, *curoff, *curon,
*curbeg, *curmid, *curend, *hiint, *loint, *revvid, *norvid,
*inslin, *dellin;
/* Dictionary: words should be strung together, separated by spaces.
Only the unique part should be included. Contained in first line
of TZ.R. Every word including the last one must be followed by spaces.
Incidentally, all lines of TZ.R should be terminated only by
line feeds. */
char *dic_ptr;
/* Controls used in messages are:
* clear screen
^ position cursor to message line (causes CEOL)
\ carriage return/line feed (causes CEOL)
| position cursor to user input line (HEIGHT-2)
_ include answer here (e.g. _4____)
*/
/* The following pieces of information must be saved */
int rm_num = 0; /* room number */
int seed; /* random seed */
int wtchct = 0; /* tv watch count */
int beerct = 0; /* drink beer count */
int cratct = 0; /* open crate count */
int pushct = 0; /* push button count */
int pushfl = 0; /* push button error flag */
int answer[ 5 ] = { 0, 1, 2, 3, 4 }; /* digits of answer */
struct walker {
int inrm; /* in room flag */
int rsel; /* room pointer */
int dsel; /* description selector */
int locn[ 8 ]; /* rooms walker appears at */
};
/* Woman walker descriptor */
struct walker woman = {
0, 0, 0,
4, 52, 64, 94, 109, 185, 201, 248 };
/* Man walker descriptor */
struct walker man = {
0, 0, 0,
3, 49, 97, 105, 111, 144, 166, 175 };