home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!news.tek.com!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v18i052: spellcast - strategy game for X11, Patch1
- Date: 23 Jul 1993 22:25:16 GMT
- Organization: Tektronix, Inc, Redmond, OR, USA
- Lines: 233
- Approved: billr@saab.CNA.TEK.COM
- Message-ID: <22pogc$lgb@ying.cna.tek.com>
- NNTP-Posting-Host: saab.cna.tek.com
- Xref: uunet comp.sources.games:1852
-
- Submitted-by: "Andrew C. Plotkin" <ap1i+@andrew.cmu.edu>
- Posting-number: Volume 18, Issue 52
- Archive-name: spellcast/patch1
- Patch-To: spellcast: Volume 18, Issue 27-33
- Environment: X11, Xlib
-
-
- [[From the author...
- The following patch file fixes a number of minor bugs. The biggest is that,
- basically, SunOS hates realloc(), and I use realloc() all the time, so people
- on Sun machines were getting incredible numbers of crashes and memory
- problems. The fix is to uncomment the line
- #OTHERLIBS = -lbsdmalloc
- in the patched Makefile, which links against a working malloc library.
-
- Thanks to the many people who sent me bug reports and patches. There
- were a couple of actual game improvements, which are not included
- below. If I ever get around to the Great Rewrite, I'll put them in then.
-
- Note: All of the bug fixes below were in my post to
- comp.sources.games.bugs on July 20th. (Except for the changes to
- patchlevel.h, Makefile, README.)
-
- --Z]]
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patches01
- # Wrapped by billr@saab on Fri Jul 23 15:22:40 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patches01' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patches01'\"
- else
- echo shar: Extracting \"'patches01'\" \(6055 characters\)
- sed "s/^X//" >'patches01' <<'END_OF_FILE'
- Xdiff -c ./Makefile /tmp/nspel/Makefile
- X*** ./Makefile Fri Jul 23 15:44:17 1993
- X--- /tmp/nspel/Makefile Fri Jul 23 14:46:32 1993
- X***************
- X*** 18,23 ****
- X--- 18,27 ----
- X DESTMAN=$(DESTDIR)/man/man6
- X DESTLIB=$(DESTDIR)/lib/spellcast
- X
- X+ # If you are compiling on a Sun and you find the game crashes
- X+ # all the time, try uncommenting the next line.
- X+ #OTHERLIBS = -lbsdmalloc
- X+
- X CFLAGS = -g -I/usr/local/include -I./bitmaps -DBODYFONT=$(FONT1) \
- X -DBODYFONT_ALT=$(FONT2) -DBODYFONT_ALT2=$(FONT3) -DTRANSCRIPTDIR=$(LOGDIR)
- X LFLAGS = -g
- X***************
- X*** 31,37 ****
- X
- X # spellcast: the X executable
- X spellcast: $(OBJS) $(XOBJS)
- X! $(CC) $(LFLAGS) -o spellcast $(OBJS) $(XOBJS) $(XLIB)
- X
- X # stupid: the stupid stdin/stdout version of the game
- X stupid: stupid.o $(OBJS)
- X--- 35,41 ----
- X
- X # spellcast: the X executable
- X spellcast: $(OBJS) $(XOBJS)
- X! $(CC) $(LFLAGS) -o spellcast $(OBJS) $(XOBJS) $(XLIB) $(OTHERLIBS)
- X
- X # stupid: the stupid stdin/stdout version of the game
- X stupid: stupid.o $(OBJS)
- Xdiff -c ./README /tmp/nspel/README
- X*** ./README Fri Jul 23 15:44:16 1993
- X--- /tmp/nspel/README Fri Jul 23 14:43:23 1993
- X***************
- X*** 7,14 ****
- X exhaustive detail.
- X
- X Compiling should be straightforward; spellcast uses only
- X! Xlib, with no widget sets or other libraries. The Makefile
- X! begins with a few definitions which you can change:
- X the directories where everything gets installed;
- X the default fonts that the program tries to load (usually
- X times 14, helvetica 12, and fixed, in that order);
- X--- 7,22 ----
- X exhaustive detail.
- X
- X Compiling should be straightforward; spellcast uses only
- X! Xlib, with no widget sets or other libraries.
- X!
- X! NOTE: Some (all?) versions of SunOS have a buggy
- X! realloc(), which causes spellcast to crash early and often.
- X! If you're on a Sparc and you have this problem, the fix
- X! is to compile with -lbsdmalloc. Uncomment the OTHERLIBS
- X! line in the Makefile.
- X!
- X! The Makefile begins with a few definitions which you
- X! can change:
- X the directories where everything gets installed;
- X the default fonts that the program tries to load (usually
- X times 14, helvetica 12, and fixed, in that order);
- Xdiff -c ./engine.c /tmp/nspel/engine.c
- X*** ./engine.c Fri Jul 23 15:46:05 1993
- X--- /tmp/nspel/engine.c Tue Jul 20 15:06:24 1993
- X***************
- X*** 73,78 ****
- X--- 73,80 ----
- X fred->both.fl_resist_heat = 0;
- X fred->both.resistant_cold = 0;
- X fred->both.fl_resist_cold = 0;
- X+ fred->both.fl_resist_icestorm = 0;
- X+ fred->both.mind_spell = -1;
- X fred->both.disease_time = (-1);
- X fred->both.poison_time = (-1);
- X fred->both.prot_from_evil = 0;
- X***************
- X*** 96,105 ****
- X--- 98,110 ----
- X fred->both.prot_from_evil = 0;
- X fred->both.haste = 0;
- X fred->both.timestop = 0;
- X+ fred->both.invisibility = 0;
- X+ fred->both.blindness = 0;
- X fred->both.poison_time = -1;
- X fred->both.disease_time = -1;
- X fred->both.mind_spell = -1;
- X clear_permstats(&(fred->both.perm));
- X+ clear_round(fred);
- X }
- X
- X char *gesture_name(val)
- Xdiff -c ./execute.c /tmp/nspel/execute.c
- X*** ./execute.c Fri Jul 23 15:45:56 1993
- X--- /tmp/nspel/execute.c Tue Jul 20 13:29:05 1993
- X***************
- X*** 11,17 ****
- X static void exec_counters(), exec_summons(), check_elements(), exec_cancels(), exec_protects();
- X extern void exec_enchants(), exec_attacks(), exec_heals();
- X
- X! static void clear_round(fred)
- X union being *fred;
- X {
- X int ix;
- X--- 11,17 ----
- X static void exec_counters(), exec_summons(), check_elements(), exec_cancels(), exec_protects();
- X extern void exec_enchants(), exec_attacks(), exec_heals();
- X
- X! void clear_round(fred)
- X union being *fred;
- X {
- X int ix;
- Xdiff -c ./patchlevel.h /tmp/nspel/patchlevel.h
- X*** ./patchlevel.h Fri Jul 23 15:44:38 1993
- X--- /tmp/nspel/patchlevel.h Fri Jul 23 14:35:02 1993
- X***************
- X*** 1 ****
- X! #define PATCHLEVEL "0"
- X--- 1 ----
- X! #define PATCHLEVEL "1"
- Xdiff -c ./xloop.c /tmp/nspel/xloop.c
- X*** ./xloop.c Fri Jul 23 15:44:32 1993
- X--- /tmp/nspel/xloop.c Tue Jul 20 14:09:28 1993
- X***************
- X*** 300,310 ****
- X py = &(players[pnum]);
- X for (ix=0; ix<py->sistats.visible; ix++) {
- X qline = py->sistats.top + ix;
- X if (py->statlist[qline].type == QuVal_Target_Wizard
- X && py->statlist[qline].index == pdonenum)
- X break;
- X }
- X! if (ix<py->sistats.visible) {
- X ypos = STATS_Y+ix*py->lineheight+py->lineheight;
- X py->gotexpose = 1;
- X if (!py->backstore) {
- X--- 300,312 ----
- X py = &(players[pnum]);
- X for (ix=0; ix<py->sistats.visible; ix++) {
- X qline = py->sistats.top + ix;
- X+ if (qline >= py->sistats.nlines) break;
- X if (py->statlist[qline].type == QuVal_Target_Wizard
- X && py->statlist[qline].index == pdonenum)
- X break;
- X }
- X! if (ix<py->sistats.visible
- X! && !(qline >= py->sistats.nlines)) {
- X ypos = STATS_Y+ix*py->lineheight+py->lineheight;
- X py->gotexpose = 1;
- X if (!py->backstore) {
- Xdiff -c ./xtalk.c /tmp/nspel/xtalk.c
- X*** ./xtalk.c Fri Jul 23 15:44:40 1993
- X--- /tmp/nspel/xtalk.c Tue Jul 20 15:56:31 1993
- X***************
- X*** 123,128 ****
- X--- 123,129 ----
- X redraw_talk_only(py, 1);
- X break;
- X case '\177':
- X+ case '\010':
- X if (py->talk_pt) {
- X py->talk_pt--;
- X for (cp = &(py->talk_buf[py->talk_pt]); *cp; cp++)
- Xdiff -c ./xtext.c /tmp/nspel/xtext.c
- X*** ./xtext.c Fri Jul 23 15:44:34 1993
- X--- /tmp/nspel/xtext.c Fri Jul 23 15:45:34 1993
- X***************
- X*** 115,121 ****
- X /* len will not be computed until line is finished */
- X py->lineindex[ln+1].width = 0;
- X start = NULL;
- X! if (py->lineindex[ln+1].start >= py->linebuf_size+MAXLINESIZE) {
- X py->linebuf_size *= 2;
- X py->linebuf = (char *)realloc(py->linebuf, py->linebuf_size);
- X }
- X--- 115,121 ----
- X /* len will not be computed until line is finished */
- X py->lineindex[ln+1].width = 0;
- X start = NULL;
- X! if (py->lineindex[ln+1].start+MAXLINESIZE >= py->linebuf_size) {
- X py->linebuf_size *= 2;
- X py->linebuf = (char *)realloc(py->linebuf, py->linebuf_size);
- X }
- X
- END_OF_FILE
- if test 6055 -ne `wc -c <'patches01'`; then
- echo shar: \"'patches01'\" unpacked with wrong size!
- fi
- # end of 'patches01'
- fi
- echo shar: End of shell archive.
- exit 0
-