1			X M R I S V4.04
2                        X M R E D V1.02
3		Copyright (C) 1995, 1994, 1993, 1992 Nathan Sidwell
4RCS $Id: README,v 4.6 1995/12/14 13:53:27 nathan Exp $
5
6Modify the Imakefile as appropriate for your system. This should just mean
7setting SCORE to point to the score file directory, and maybe setting
8THEBINDIR and THEMANDIR. Both the FONT and the SCORE are checked for sanity.
9
10The source will compile with both ANSI and K&R compilers, provided that
11they both correctly define __STDC__. You can also use FUNCPROTO to specify
12partial conformance. FUNCPROTO is used in the same way that Xfuncproto.h
13uses it. Namely bit 0 specifies function prototypes and ANSI declarations,
14bit 1 specifies if varargs are used like ansi does, bit 2 specifies if
15const is available, bit 3 specifies if function args should be prototyped.
16Most KnR compilers can take FUNCPROTO=5 or 7.
17Some DEC 5000 systems appear to have incorrectly set up xmkmf, there are some
18lines in the Imakefile which will need to be uncommented to get them
19to compile properly. The openwindows include files for solaris are
20broken for K&R compilers (problems with _XString and _Xconst). The
21offending files are Intrinsic.h, Xfuncproto.h, and Xresource.h
22
23There are a few things which may cause problems with different
24platforms. The timer interrupt stuff, in timer.c, knows about
25BSD, SYSV, __hpux and POSIX signals, make sure that the correct define
26is given to the compiler from the Imakefile. The elapsed time should
27use gettimeofday, if you haven't got that function, then supply
28the define USETIME, this will give less accurate timing. Also
29gettimeofday may or may not need a timezone argument, this is checked
30by the system type in timer.c.
31
32Set SCORE to the name of the high score directory.
33The score file uses lockf or flock by default, this doesn't work
34on some distributed filing systems. If so,
35define USELOCKFILE, and a lock file is used to do the locking with
36open(O_CREAT | O_EXCL). The name of the lock file is xmris.lock.
37For this to work the high score directory must be writeable, which
38is not the case with lockf. Personal high score files are also put
39in this directory, if xmris can create them there, otherwise they
40will be put in the users' home directory.
41
42You may need to force static linking, and not use shared libraries, or
43store a library load path with the binary with the linker -R option.
44The EXTRA_LOAD_FLAGS can be used for this. (This may be necessary for
45a setuid version, as these programs only search /usr/lib to do the
46dynamic linking, disregarding LD_LIBRARY_PATH, for obvious reasons.)
47
48The make file is configured so that 'make install' will install a setuid
49xmris owned by games in the BINDIR. Set up the score directory
50appropriately, copying the example garden files into it.
51You can alter OWNER, SCOREFILEFLAGS and INSTPGMFLAGS as you require.
52If you do not want to install xmris into the normal locations, then
53alter THEBINDIR, THEMANDIR and XAPPLOADDIR appropriately.
54
55To make on your system type
56
57	xmkmf
58	make
59	make install
60	make install.man
61
62Xmred uses the same database as xmris, so that it can pick up the color
63resources. This means that it will not use its fallback resources if you have
64an old Xmris resource file installed. The result will be xmred laying itself
65out incorrectly, such that you will not be able to use it.
66
67The scram program is used to generate the sprites in the smallest
68number of bitplanes. You will get some warnings warnings of the form
69'Warning: Noswap color 'COLOR_WHITE' has no pixels', these may be ignored.
70
71To remove all the garbage left by a make you can do
72
73	make clean
74
75This removes all the object files, and all the sprites generated by scram.
76
77There is are two debug options to the compiler, NDEBUG, which inhibits
78asserts, if defined. Also DEBUGEVENTLOOP which prints the X events, as they
79are seen.
80
81Please report modifications, so that they can be considered for
82inclusion in later releases (especially true of system specific stuff).
83
84email to nathan@pact.srf.ac.uk
85
86XMRIS has been tested on the following systems, os's and compilers
87(but not all combinations of them!), and X release R4, R5 & R6, and
88openwindows. Interestingly on a 40MHz sparc classic, openwindows is
89a tad to slow, but X11R5 has no problems, even with the fastest
90animation.
91
92Platform:
93Sparc 1 monochrome, 8bit pseudo colour
94Sparc 1+
95Sparc IPC 8bit pseudo colour
96Sparc 2
97Sparc classic
98DECstation 5000
99pmax 3100 8bit greyscale
100pmax 5000 colour
101HP 9000/720
102i386 PC
103
104OS:
105Sunos 4.1, 4.1.1, 4.1.2
106Solaris 2.1, 2.2
107Ultrix 4.0, 4.2a
108RiscOS 5.0B
109Mach 2.5
110HP-UX 7.05, 8.05, 8.07
111linux
112
113compiler:
114gcc 1.38
115cc
116sun cc
117sun c++
118gcc 2.3.3
119
120Have fun.
121
122nathan
123