home
download
installation
documentation
port notes
links

X Port Notes

One of the goals of the X port was to eliminate all dependencies on 8086 code and VGA graphics. This involved several modifications to the id source, and the addition of a few new files.

Modified Files

TBD

New Files

singon.dat

This is the sigon screen image, extracted from signon.obj. id supplied this as signon.obj, a DOS object file linked with the executable. It defines the symbol signon which is a 64k array of raw screen data (320*200 bytes).

Obviously, a DOS object file is not much use in a Unix environment, so I extracted the 64k data from the object with a small C program written with Borland C.

The signon data is read in in the function SignonScreen in file wl_main.c.

colors.c

This is the main game color palette. In the id source this was supplied as a DOS object file gamepal.obj. The file defines the 768 byte array gamepal. It contains 256 palette entries in the order red, green then blue. This file was converted to the C file colors.c, by some forgotten method.

colors.c

Provides routines for setting up and modifying color tables.

graphics.c

Drawing routines. Uses Xlib.

xmain.c

X initialisation and event handling.

missing.c

Some small routines not in libc.

timer.c

Simulates the TimeCount variable which in the original code is incremented 70 times a second in the sound driver id_sd_a.asm.

Here we use gettimeofday to get the system time and convert that to a 1/70s tick.


Last updated 7th March 1999
© Copyright 1999 David Haslam dch@sirius.demon.co.uk